@deadair/sdk 0.7.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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/activity/activity.client.d.ts +12 -0
- package/dist/activity/activity.client.d.ts.map +1 -0
- package/dist/activity/types/activity.types.d.ts +60 -0
- package/dist/activity/types/activity.types.d.ts.map +1 -0
- package/dist/activity/types/index.d.ts +2 -0
- package/dist/activity/types/index.d.ts.map +1 -0
- package/dist/art/art.client.d.ts +21 -0
- package/dist/art/art.client.d.ts.map +1 -0
- package/dist/authentication/authentication.client.d.ts +33 -0
- package/dist/authentication/authentication.client.d.ts.map +1 -0
- package/dist/authentication/authentication.factor.client.d.ts +41 -0
- package/dist/authentication/authentication.factor.client.d.ts.map +1 -0
- package/dist/authentication/authentication.sessions.client.d.ts +20 -0
- package/dist/authentication/authentication.sessions.client.d.ts.map +1 -0
- package/dist/authentication/types/authentication.types.d.ts +846 -0
- package/dist/authentication/types/authentication.types.d.ts.map +1 -0
- package/dist/authentication/types/index.d.ts +3 -0
- package/dist/authentication/types/index.d.ts.map +1 -0
- package/dist/authentication/types/registration.types.d.ts +336 -0
- package/dist/authentication/types/registration.types.d.ts.map +1 -0
- package/dist/catalog/catalog.client.d.ts +96 -0
- package/dist/catalog/catalog.client.d.ts.map +1 -0
- package/dist/catalog/types/catalog.types.d.ts +593 -0
- package/dist/catalog/types/catalog.types.d.ts.map +1 -0
- package/dist/catalog/types/index.d.ts +2 -0
- package/dist/catalog/types/index.d.ts.map +1 -0
- package/dist/charts/charts.client.d.ts +17 -0
- package/dist/charts/charts.client.d.ts.map +1 -0
- package/dist/charts/types/charts.types.d.ts +54 -0
- package/dist/charts/types/charts.types.d.ts.map +1 -0
- package/dist/charts/types/index.d.ts +2 -0
- package/dist/charts/types/index.d.ts.map +1 -0
- package/dist/deadair.sdk.d.ts +49 -0
- package/dist/deadair.sdk.d.ts.map +1 -0
- package/dist/director/director.client.d.ts +98 -0
- package/dist/director/director.client.d.ts.map +1 -0
- package/dist/director/types/clock.types.d.ts +57 -0
- package/dist/director/types/clock.types.d.ts.map +1 -0
- package/dist/director/types/director.types.d.ts +212 -0
- package/dist/director/types/director.types.d.ts.map +1 -0
- package/dist/director/types/index.d.ts +3 -0
- package/dist/director/types/index.d.ts.map +1 -0
- package/dist/history/history.client.d.ts +12 -0
- package/dist/history/history.client.d.ts.map +1 -0
- package/dist/history/types/history.types.d.ts +44 -0
- package/dist/history/types/history.types.d.ts.map +1 -0
- package/dist/history/types/index.d.ts +2 -0
- package/dist/history/types/index.d.ts.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3509 -0
- package/dist/index.js.map +1 -0
- package/dist/news/news.client.d.ts +17 -0
- package/dist/news/news.client.d.ts.map +1 -0
- package/dist/news/types/index.d.ts +2 -0
- package/dist/news/types/index.d.ts.map +1 -0
- package/dist/news/types/news.types.d.ts +61 -0
- package/dist/news/types/news.types.d.ts.map +1 -0
- package/dist/nowplaying/nowplaying.client.d.ts +12 -0
- package/dist/nowplaying/nowplaying.client.d.ts.map +1 -0
- package/dist/nowplaying/types/index.d.ts +2 -0
- package/dist/nowplaying/types/index.d.ts.map +1 -0
- package/dist/nowplaying/types/nowplaying.types.d.ts +59 -0
- package/dist/nowplaying/types/nowplaying.types.d.ts.map +1 -0
- package/dist/onboarding/onboarding.client.d.ts +11 -0
- package/dist/onboarding/onboarding.client.d.ts.map +1 -0
- package/dist/onboarding/types/index.d.ts +2 -0
- package/dist/onboarding/types/index.d.ts.map +1 -0
- package/dist/onboarding/types/onboarding.types.d.ts +41 -0
- package/dist/onboarding/types/onboarding.types.d.ts.map +1 -0
- package/dist/personas/personas.client.d.ts +167 -0
- package/dist/personas/personas.client.d.ts.map +1 -0
- package/dist/personas/types/index.d.ts +2 -0
- package/dist/personas/types/index.d.ts.map +1 -0
- package/dist/personas/types/personas.types.d.ts +545 -0
- package/dist/personas/types/personas.types.d.ts.map +1 -0
- package/dist/playlists/playlists.client.d.ts +17 -0
- package/dist/playlists/playlists.client.d.ts.map +1 -0
- package/dist/playlists/types/index.d.ts +2 -0
- package/dist/playlists/types/index.d.ts.map +1 -0
- package/dist/playlists/types/playlists.types.d.ts +71 -0
- package/dist/playlists/types/playlists.types.d.ts.map +1 -0
- package/dist/playout/playout.client.d.ts +37 -0
- package/dist/playout/playout.client.d.ts.map +1 -0
- package/dist/playout/types/index.d.ts +2 -0
- package/dist/playout/types/index.d.ts.map +1 -0
- package/dist/playout/types/playout.types.d.ts +163 -0
- package/dist/playout/types/playout.types.d.ts.map +1 -0
- package/dist/plugins/plugins.client.d.ts +107 -0
- package/dist/plugins/plugins.client.d.ts.map +1 -0
- package/dist/plugins/types/index.d.ts +2 -0
- package/dist/plugins/types/index.d.ts.map +1 -0
- package/dist/plugins/types/plugins.types.d.ts +330 -0
- package/dist/plugins/types/plugins.types.d.ts.map +1 -0
- package/dist/productions/productions.client.d.ts +22 -0
- package/dist/productions/productions.client.d.ts.map +1 -0
- package/dist/productions/types/index.d.ts +2 -0
- package/dist/productions/types/index.d.ts.map +1 -0
- package/dist/productions/types/productions.types.d.ts +90 -0
- package/dist/productions/types/productions.types.d.ts.map +1 -0
- package/dist/render/render.client.d.ts +210 -0
- package/dist/render/render.client.d.ts.map +1 -0
- package/dist/render/types/index.d.ts +2 -0
- package/dist/render/types/index.d.ts.map +1 -0
- package/dist/render/types/render.types.d.ts +518 -0
- package/dist/render/types/render.types.d.ts.map +1 -0
- package/dist/schedule/schedule.client.d.ts +37 -0
- package/dist/schedule/schedule.client.d.ts.map +1 -0
- package/dist/schedule/types/index.d.ts +2 -0
- package/dist/schedule/types/index.d.ts.map +1 -0
- package/dist/schedule/types/schedule.types.d.ts +119 -0
- package/dist/schedule/types/schedule.types.d.ts.map +1 -0
- package/dist/sdk-options.d.ts +45 -0
- package/dist/sdk-options.d.ts.map +1 -0
- package/dist/settings/settings.client.d.ts +17 -0
- package/dist/settings/settings.client.d.ts.map +1 -0
- package/dist/settings/types/index.d.ts +2 -0
- package/dist/settings/types/index.d.ts.map +1 -0
- package/dist/settings/types/settings.types.d.ts +35 -0
- package/dist/settings/types/settings.types.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +2 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/pagination.d.ts +34 -0
- package/dist/shared/types/pagination.d.ts.map +1 -0
- package/dist/station/station.client.d.ts +49 -0
- package/dist/station/station.client.d.ts.map +1 -0
- package/dist/station/types/index.d.ts +4 -0
- package/dist/station/types/index.d.ts.map +1 -0
- package/dist/station/types/logs.types.d.ts +73 -0
- package/dist/station/types/logs.types.d.ts.map +1 -0
- package/dist/station/types/station.types.d.ts +120 -0
- package/dist/station/types/station.types.d.ts.map +1 -0
- package/dist/station/types/traces.types.d.ts +91 -0
- package/dist/station/types/traces.types.d.ts.map +1 -0
- package/dist/storage/storage.client.d.ts +12 -0
- package/dist/storage/storage.client.d.ts.map +1 -0
- package/dist/storage/types/index.d.ts +2 -0
- package/dist/storage/types/index.d.ts.map +1 -0
- package/dist/storage/types/storage.types.d.ts +59 -0
- package/dist/storage/types/storage.types.d.ts.map +1 -0
- package/dist/stream/stream.client.d.ts +32 -0
- package/dist/stream/stream.client.d.ts.map +1 -0
- package/dist/stream/types/index.d.ts +2 -0
- package/dist/stream/types/index.d.ts.map +1 -0
- package/dist/stream/types/stream.types.d.ts +47 -0
- package/dist/stream/types/stream.types.d.ts.map +1 -0
- package/dist/topics/topics.client.d.ts +32 -0
- package/dist/topics/topics.client.d.ts.map +1 -0
- package/dist/topics/types/index.d.ts +2 -0
- package/dist/topics/types/index.d.ts.map +1 -0
- package/dist/topics/types/topics.types.d.ts +65 -0
- package/dist/topics/types/topics.types.d.ts.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,846 @@
|
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
/**
|
|
3
|
+
* Denotes the authorization flow to use
|
|
4
|
+
* generated from [AuthenticationGrantType](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L7)
|
|
5
|
+
*/
|
|
6
|
+
export type AuthenticationGrantType = 'client_credentials' | 'password' | 'refresh_token' | 'link' | 'code' | 'fido' | 'authenticator' | 'oidc';
|
|
7
|
+
/**
|
|
8
|
+
* Denotes the authorization flow to use
|
|
9
|
+
* generated from [PasswordlessAuthenticationGrantType](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L18)
|
|
10
|
+
*/
|
|
11
|
+
export type PasswordlessAuthenticationGrantType = 'link' | 'code' | 'fido' | 'oidc';
|
|
12
|
+
/**
|
|
13
|
+
* The type of the factor
|
|
14
|
+
* generated from [AuthenticationFactorMethod](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L20)
|
|
15
|
+
*/
|
|
16
|
+
export type AuthenticationFactorMethod = 'phone' | 'password' | 'email' | 'authenticator' | 'fido' | 'oidc';
|
|
17
|
+
/**
|
|
18
|
+
* The kind of the factor
|
|
19
|
+
* generated from [AuthenticationFactorKind](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L22)
|
|
20
|
+
*/
|
|
21
|
+
export type AuthenticationFactorKind = 'knowledge' | 'possession' | 'biometric';
|
|
22
|
+
/**
|
|
23
|
+
* The OIDC identity provider
|
|
24
|
+
* generated from [OidcProvider](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L24)
|
|
25
|
+
*/
|
|
26
|
+
export type OidcProvider = 'google';
|
|
27
|
+
/**
|
|
28
|
+
* Represents an authentication token
|
|
29
|
+
* generated from [AuthenticationToken](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L84)
|
|
30
|
+
*/
|
|
31
|
+
export interface AuthenticationToken {
|
|
32
|
+
/** The access token string as issued by the authorization server */
|
|
33
|
+
accessToken: string;
|
|
34
|
+
/** A refresh token which applications can use to obtain another access token */
|
|
35
|
+
refreshToken?: string;
|
|
36
|
+
/** Unix timestamp (seconds) when the access token expires */
|
|
37
|
+
expiresIn: number;
|
|
38
|
+
/** The type of token this is, typically just the string *Bearer* */
|
|
39
|
+
tokenType: string;
|
|
40
|
+
/** Space-separated list of scopes granted to this token */
|
|
41
|
+
scope: string;
|
|
42
|
+
}
|
|
43
|
+
export interface AuthenticationTokenOutput {
|
|
44
|
+
/** The access token string as issued by the authorization server */
|
|
45
|
+
access_token: string;
|
|
46
|
+
/** A refresh token which applications can use to obtain another access token */
|
|
47
|
+
refresh_token?: string;
|
|
48
|
+
/** Unix timestamp (seconds) when the access token expires */
|
|
49
|
+
expires_in: number;
|
|
50
|
+
/** The type of token this is, typically just the string *Bearer* */
|
|
51
|
+
token_type: string;
|
|
52
|
+
/** Space-separated list of scopes granted to this token */
|
|
53
|
+
scope: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Issued-token arm of /auth/token response
|
|
57
|
+
* generated from [AuthenticationTokenIssued](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L92)
|
|
58
|
+
*/
|
|
59
|
+
export interface AuthenticationTokenIssued {
|
|
60
|
+
/** Discriminator */
|
|
61
|
+
result: 'token';
|
|
62
|
+
/** The access token string as issued by the authorization server */
|
|
63
|
+
accessToken: string;
|
|
64
|
+
/** A refresh token which applications can use to obtain another access token */
|
|
65
|
+
refreshToken?: string;
|
|
66
|
+
/** Unix timestamp (seconds) when the access token expires */
|
|
67
|
+
expiresIn: number;
|
|
68
|
+
/** The type of token this is, typically just the string *Bearer* */
|
|
69
|
+
tokenType: string;
|
|
70
|
+
/** Space-separated list of scopes granted to this token */
|
|
71
|
+
scope: string;
|
|
72
|
+
}
|
|
73
|
+
export interface AuthenticationTokenIssuedOutput {
|
|
74
|
+
/** Discriminator */
|
|
75
|
+
result: 'token';
|
|
76
|
+
/** The access token string as issued by the authorization server */
|
|
77
|
+
access_token: string;
|
|
78
|
+
/** A refresh token which applications can use to obtain another access token */
|
|
79
|
+
refresh_token?: string;
|
|
80
|
+
/** Unix timestamp (seconds) when the access token expires */
|
|
81
|
+
expires_in: number;
|
|
82
|
+
/** The type of token this is, typically just the string *Bearer* */
|
|
83
|
+
token_type: string;
|
|
84
|
+
/** Space-separated list of scopes granted to this token */
|
|
85
|
+
scope: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Returned by /auth/step-up/start when no enrolled factor satisfies the requirement. The SPA should drive the user through enrollment and retry the gated action afterwards.
|
|
89
|
+
* generated from [EnrollmentRequiredResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L115)
|
|
90
|
+
*/
|
|
91
|
+
export interface EnrollmentRequiredResponse {
|
|
92
|
+
/** Discriminator */
|
|
93
|
+
result: 'enrollment_required';
|
|
94
|
+
}
|
|
95
|
+
export interface EnrollmentRequiredResponseOutput {
|
|
96
|
+
/** Discriminator */
|
|
97
|
+
result: 'enrollment_required';
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Represents a common shape of a `PublicKeyCredential` after the client serializes the `id` and `rawId` fields to base64 strings for transport
|
|
101
|
+
* generated from [PublicKeyCredential](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L123)
|
|
102
|
+
*/
|
|
103
|
+
export interface PublicKeyCredential {
|
|
104
|
+
/** The base64url encoding of `rawId` */
|
|
105
|
+
id: string;
|
|
106
|
+
/** This enumeration defines the valid credential types. It is an extension point; values can be added to it in the future, as more credential types are defined. The values of this enumeration are used for versioning the Authentication Assertion and attestation structures according to the type of the authenticator. Currently one credential type is defined, namely `public-key`. */
|
|
107
|
+
type: 'public-key';
|
|
108
|
+
/** The credential identifier */
|
|
109
|
+
rawId: string;
|
|
110
|
+
/** The authenticator attachment */
|
|
111
|
+
authenticatorAttachment?: 'cross-platform' | 'platform';
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Subset of the WebAuthn client extension results the service round-trips
|
|
115
|
+
* generated from [SimpleClientExtensionResults](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L130)
|
|
116
|
+
*/
|
|
117
|
+
export interface SimpleClientExtensionResults {
|
|
118
|
+
/** Whether the client is an application */
|
|
119
|
+
appid?: boolean;
|
|
120
|
+
/** Whether the client is excluded from appid verification */
|
|
121
|
+
appidExclude?: boolean;
|
|
122
|
+
credProps?: {
|
|
123
|
+
rk: boolean;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* generated from [FidoAuthenticatorAssertionResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L138)
|
|
128
|
+
*/
|
|
129
|
+
export interface FidoAuthenticatorAssertionResponse {
|
|
130
|
+
/** The client data JSON */
|
|
131
|
+
clientDataJSON: string;
|
|
132
|
+
/** The authenticator data */
|
|
133
|
+
authenticatorData: string;
|
|
134
|
+
/** The signature */
|
|
135
|
+
signature: string;
|
|
136
|
+
/** The user handle */
|
|
137
|
+
userHandle?: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* generated from [AuthenticationRegistration](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L150)
|
|
141
|
+
*/
|
|
142
|
+
export interface AuthenticationRegistration {
|
|
143
|
+
/** The registration identifier */
|
|
144
|
+
registrationId: string;
|
|
145
|
+
/** The registration expiration timestamp */
|
|
146
|
+
expiresAt: DateTime;
|
|
147
|
+
}
|
|
148
|
+
export interface AuthenticationRegistrationInput {
|
|
149
|
+
/** User's email address */
|
|
150
|
+
email: string;
|
|
151
|
+
/** optionally set a password for the user */
|
|
152
|
+
password?: string;
|
|
153
|
+
}
|
|
154
|
+
/** Rehydrates every wire-encoded scalar in a AuthenticationRegistration into its runtime type. Mutates and returns `raw`. */
|
|
155
|
+
export declare function reviveAuthenticationRegistration(raw: AuthenticationRegistration): AuthenticationRegistration;
|
|
156
|
+
/**
|
|
157
|
+
* generated from [AuthenticationRegistrationVerification](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L157)
|
|
158
|
+
*/
|
|
159
|
+
export interface AuthenticationRegistrationVerification {
|
|
160
|
+
/** The registration identifier */
|
|
161
|
+
registrationId: string;
|
|
162
|
+
/** The verification code */
|
|
163
|
+
code: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* A credential the relying party expects the user to be able to present
|
|
167
|
+
* generated from [PublicKeyCredentialDescriptor](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L191)
|
|
168
|
+
*/
|
|
169
|
+
export interface PublicKeyCredentialDescriptor {
|
|
170
|
+
/** The credential type — currently always `public-key` */
|
|
171
|
+
type: 'public-key';
|
|
172
|
+
/** The base64url-encoded credential identifier */
|
|
173
|
+
id: string;
|
|
174
|
+
/** Transports the authenticator advertises */
|
|
175
|
+
transports?: ('usb' | 'nfc' | 'ble' | 'internal' | 'hybrid')[];
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* The transport used by the authenticator
|
|
179
|
+
* generated from [FidoAuthenticatorTransport](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L235)
|
|
180
|
+
*/
|
|
181
|
+
export type FidoAuthenticatorTransport = 'hybrid' | 'ble' | 'internal' | 'nfc' | 'usb';
|
|
182
|
+
/**
|
|
183
|
+
* Response from `/auth/login/oidc/start` instructing the client to navigate to `authorize_url`
|
|
184
|
+
* generated from [OidcLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L260)
|
|
185
|
+
*/
|
|
186
|
+
export interface OidcLoginStartResponse {
|
|
187
|
+
/** Fully-formed authorize URL the user-agent should be redirected to */
|
|
188
|
+
authorize_url: string;
|
|
189
|
+
/** Opaque state token bound to this authorization round-trip */
|
|
190
|
+
state: string;
|
|
191
|
+
/** When the cached state record expires */
|
|
192
|
+
expires_at: DateTime;
|
|
193
|
+
}
|
|
194
|
+
/** Rehydrates every wire-encoded scalar in a OidcLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
195
|
+
export declare function reviveOidcLoginStartResponse(raw: OidcLoginStartResponse): OidcLoginStartResponse;
|
|
196
|
+
/**
|
|
197
|
+
* Request to complete an OIDC sign-in flow
|
|
198
|
+
* generated from [OidcLoginCallback](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L266)
|
|
199
|
+
*/
|
|
200
|
+
export interface OidcLoginCallback {
|
|
201
|
+
/** The issuer of the token */
|
|
202
|
+
iss?: string;
|
|
203
|
+
/** The scope of the token */
|
|
204
|
+
scope?: string;
|
|
205
|
+
/** The user ID */
|
|
206
|
+
authuser?: string;
|
|
207
|
+
/** The host domain */
|
|
208
|
+
hd?: string;
|
|
209
|
+
/** The prompt of the token */
|
|
210
|
+
prompt?: string;
|
|
211
|
+
/** The authorization code returned by the IdP (absent when the IdP rejected the request) */
|
|
212
|
+
code?: string;
|
|
213
|
+
/** The opaque state token bound to the original authorize request */
|
|
214
|
+
state?: string;
|
|
215
|
+
/** OAuth 2.0 error code per RFC 6749 §4.1.2.1 (e.g. access_denied) */
|
|
216
|
+
error?: string;
|
|
217
|
+
/** Human-readable explanation of `error` */
|
|
218
|
+
error_description?: string;
|
|
219
|
+
/** URL to a page describing `error` */
|
|
220
|
+
error_uri?: string;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Issue a phone SMS challenge during a pending MFA round
|
|
224
|
+
* generated from [FactorChallengePhoneStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L279)
|
|
225
|
+
*/
|
|
226
|
+
export interface FactorChallengePhoneStart {
|
|
227
|
+
/** Discriminator */
|
|
228
|
+
method: 'phone';
|
|
229
|
+
/** Delivery channel — only `sms` is supported in this phase */
|
|
230
|
+
transport: 'sms';
|
|
231
|
+
/** The MFA challenge to which this factor challenge is bound */
|
|
232
|
+
mfa_challenge_id: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Issue a WebAuthn assertion challenge during a pending MFA round
|
|
236
|
+
* generated from [FactorChallengeFidoStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L285)
|
|
237
|
+
*/
|
|
238
|
+
export interface FactorChallengeFidoStart {
|
|
239
|
+
/** Discriminator */
|
|
240
|
+
method: 'fido';
|
|
241
|
+
/** The MFA challenge to which this factor challenge is bound */
|
|
242
|
+
mfa_challenge_id: string;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Issue an email one-time-code challenge during a pending MFA round. Always a code: a magic link cannot complete an MFA round, since the `code` grant that redeems one takes `code(min=6, max=10)` and a link token is 43 characters
|
|
246
|
+
* generated from [FactorChallengeEmailStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L290)
|
|
247
|
+
*/
|
|
248
|
+
export interface FactorChallengeEmailStart {
|
|
249
|
+
/** Discriminator */
|
|
250
|
+
method: 'email';
|
|
251
|
+
/** The MFA challenge to which this factor challenge is bound */
|
|
252
|
+
mfa_challenge_id: string;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Response for a phone SMS challenge
|
|
256
|
+
* generated from [FactorChallengePhoneStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L297)
|
|
257
|
+
*/
|
|
258
|
+
export interface FactorChallengePhoneStartResponse {
|
|
259
|
+
/** Discriminator */
|
|
260
|
+
method: 'phone';
|
|
261
|
+
/** Echo of the chosen delivery channel */
|
|
262
|
+
transport: 'sms';
|
|
263
|
+
/** The phone-factor challenge id — echo back on the `code` grant as `challenge_id` */
|
|
264
|
+
phoneChallengeId: string;
|
|
265
|
+
/** When the phone challenge expires */
|
|
266
|
+
expiresAt: DateTime;
|
|
267
|
+
}
|
|
268
|
+
export interface FactorChallengePhoneStartResponseOutput {
|
|
269
|
+
/** Discriminator */
|
|
270
|
+
method: 'phone';
|
|
271
|
+
/** Echo of the chosen delivery channel */
|
|
272
|
+
transport: 'sms';
|
|
273
|
+
/** The phone-factor challenge id — echo back on the `code` grant as `challenge_id` */
|
|
274
|
+
phone_challenge_id: string;
|
|
275
|
+
/** When the phone challenge expires */
|
|
276
|
+
expires_at: DateTime;
|
|
277
|
+
}
|
|
278
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengePhoneStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
279
|
+
export declare function reviveFactorChallengePhoneStartResponse(raw: FactorChallengePhoneStartResponse): FactorChallengePhoneStartResponse;
|
|
280
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengePhoneStartResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
281
|
+
export declare function reviveFactorChallengePhoneStartResponseOutput(raw: FactorChallengePhoneStartResponseOutput): FactorChallengePhoneStartResponseOutput;
|
|
282
|
+
/**
|
|
283
|
+
* Response for an email one-time-code challenge
|
|
284
|
+
* generated from [FactorChallengeEmailStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L311)
|
|
285
|
+
*/
|
|
286
|
+
export interface FactorChallengeEmailStartResponse {
|
|
287
|
+
/** Discriminator */
|
|
288
|
+
method: 'email';
|
|
289
|
+
/** The email-factor challenge id — echo back on the `code` grant as `challenge_id` */
|
|
290
|
+
emailChallengeId: string;
|
|
291
|
+
/** When the email challenge expires */
|
|
292
|
+
expiresAt: DateTime;
|
|
293
|
+
}
|
|
294
|
+
export interface FactorChallengeEmailStartResponseOutput {
|
|
295
|
+
/** Discriminator */
|
|
296
|
+
method: 'email';
|
|
297
|
+
/** The email-factor challenge id — echo back on the `code` grant as `challenge_id` */
|
|
298
|
+
email_challenge_id: string;
|
|
299
|
+
/** When the email challenge expires */
|
|
300
|
+
expires_at: DateTime;
|
|
301
|
+
}
|
|
302
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengeEmailStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
303
|
+
export declare function reviveFactorChallengeEmailStartResponse(raw: FactorChallengeEmailStartResponse): FactorChallengeEmailStartResponse;
|
|
304
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengeEmailStartResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
305
|
+
export declare function reviveFactorChallengeEmailStartResponseOutput(raw: FactorChallengeEmailStartResponseOutput): FactorChallengeEmailStartResponseOutput;
|
|
306
|
+
/**
|
|
307
|
+
* A factor satisfied by the session
|
|
308
|
+
* generated from [SessionFactor](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L325)
|
|
309
|
+
*/
|
|
310
|
+
export interface SessionFactor {
|
|
311
|
+
/** The verification method */
|
|
312
|
+
method: 'phone' | 'password' | 'authenticator' | 'email' | 'fido' | 'oidc';
|
|
313
|
+
/** Stable identifier for the specific factor record */
|
|
314
|
+
methodId: string;
|
|
315
|
+
/** MFA category for the factor */
|
|
316
|
+
kind: 'knowledge' | 'possession' | 'biometric';
|
|
317
|
+
/** When this factor entry was first added to the session */
|
|
318
|
+
issuedAt: DateTime;
|
|
319
|
+
/** When the factor was most recently re-verified */
|
|
320
|
+
authenticatedAt: DateTime;
|
|
321
|
+
}
|
|
322
|
+
export interface SessionFactorInput {
|
|
323
|
+
/** The verification method */
|
|
324
|
+
method: 'phone' | 'password' | 'authenticator' | 'email' | 'fido' | 'oidc';
|
|
325
|
+
/** Stable identifier for the specific factor record */
|
|
326
|
+
methodId: string;
|
|
327
|
+
/** MFA category for the factor */
|
|
328
|
+
kind: 'knowledge' | 'possession' | 'biometric';
|
|
329
|
+
}
|
|
330
|
+
/** Rehydrates every wire-encoded scalar in a SessionFactor into its runtime type. Mutates and returns `raw`. */
|
|
331
|
+
export declare function reviveSessionFactor(raw: SessionFactor): SessionFactor;
|
|
332
|
+
/**
|
|
333
|
+
* Optional metadata supplied to a revoke action
|
|
334
|
+
* generated from [SessionRevoke](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L345)
|
|
335
|
+
*/
|
|
336
|
+
export interface SessionRevoke {
|
|
337
|
+
/** Free-form reason recorded with the revoke */
|
|
338
|
+
reason?: string | null;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* A platform-wide role held on `platform:main`. `admin` grants every operation; `listener` grants the reads
|
|
342
|
+
* generated from [PlatformRole](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L350)
|
|
343
|
+
*/
|
|
344
|
+
export type PlatformRole = 'admin' | 'listener';
|
|
345
|
+
/**
|
|
346
|
+
* A successful authentication record
|
|
347
|
+
* generated from [Login](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L357)
|
|
348
|
+
*/
|
|
349
|
+
export interface Login {
|
|
350
|
+
/** The login event identifier */
|
|
351
|
+
id: bigint;
|
|
352
|
+
/** The actor that authenticated */
|
|
353
|
+
actorId: string;
|
|
354
|
+
/** The factor that satisfied the primary authentication */
|
|
355
|
+
factorType: 'phone' | 'password' | 'authenticator' | 'email' | 'fido' | 'oidc';
|
|
356
|
+
/** The specific factor record id, when available */
|
|
357
|
+
factorId?: string | null;
|
|
358
|
+
/** The session minted at this login, when available */
|
|
359
|
+
sessionToken?: string | null;
|
|
360
|
+
/** Whether MFA was required and satisfied at login */
|
|
361
|
+
mfaSatisfied: boolean;
|
|
362
|
+
/** IP address recorded at login */
|
|
363
|
+
ip?: string | null;
|
|
364
|
+
/** User agent recorded at login */
|
|
365
|
+
userAgent?: string | null;
|
|
366
|
+
/** When the login occurred */
|
|
367
|
+
occurredAt: DateTime;
|
|
368
|
+
}
|
|
369
|
+
export interface LoginInput {
|
|
370
|
+
}
|
|
371
|
+
/** Rehydrates every wire-encoded scalar in a Login into its runtime type. Mutates and returns `raw`. */
|
|
372
|
+
export declare function reviveLogin(raw: Login): Login;
|
|
373
|
+
/**
|
|
374
|
+
* The current user's display preferences, auto-detected by the SPA from the browser (Intl timezone + navigator.language). Omitted fields are left unchanged (absent = never set).
|
|
375
|
+
* generated from [ActorPreferences](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L369)
|
|
376
|
+
*/
|
|
377
|
+
export interface ActorPreferences {
|
|
378
|
+
/** RFC 5646 locale, e.g. "en-US" */
|
|
379
|
+
locale?: string;
|
|
380
|
+
/** Olson timezone, e.g. "America/New_York" */
|
|
381
|
+
timezone?: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* generated from [BaseAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L26)
|
|
385
|
+
*/
|
|
386
|
+
export interface BaseAuthenticationRequest {
|
|
387
|
+
/** The grant type for the request */
|
|
388
|
+
grant_type: AuthenticationGrantType;
|
|
389
|
+
/** The scope of the request */
|
|
390
|
+
scope?: string;
|
|
391
|
+
/** The application's client identifier, if available */
|
|
392
|
+
client_id?: string;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* generated from [BaseAuthenticationLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L162)
|
|
396
|
+
*/
|
|
397
|
+
export interface BaseAuthenticationLoginStart {
|
|
398
|
+
/** The grant type for the request */
|
|
399
|
+
grant_type: PasswordlessAuthenticationGrantType;
|
|
400
|
+
/** The application's client identifier, if available */
|
|
401
|
+
client_id?: string;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* generated from [BaseAuthenticationLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L197)
|
|
405
|
+
*/
|
|
406
|
+
export interface BaseAuthenticationLoginStartResponse {
|
|
407
|
+
/** The grant type for the response */
|
|
408
|
+
grant_type: PasswordlessAuthenticationGrantType;
|
|
409
|
+
/** The challenge identifier */
|
|
410
|
+
challengeId: string;
|
|
411
|
+
/** The challenge expiration timestamp */
|
|
412
|
+
expiresAt: DateTime;
|
|
413
|
+
}
|
|
414
|
+
/** Rehydrates every wire-encoded scalar in a BaseAuthenticationLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
415
|
+
export declare function reviveBaseAuthenticationLoginStartResponse(raw: BaseAuthenticationLoginStartResponse): BaseAuthenticationLoginStartResponse;
|
|
416
|
+
/**
|
|
417
|
+
* A factor the SPA may use to satisfy the MFA challenge
|
|
418
|
+
* generated from [MfaChallengeFactor](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L101)
|
|
419
|
+
*/
|
|
420
|
+
export interface MfaChallengeFactor {
|
|
421
|
+
/** The factor method */
|
|
422
|
+
method: AuthenticationFactorMethod;
|
|
423
|
+
/** The id of the enrolled factor (opaque to the SPA, must be echoed back in the proof for methods that don't bind another way) */
|
|
424
|
+
methodId: string;
|
|
425
|
+
/** The factor kind (knowledge, possession, biometric) — the SPA filters against step-up `acceptableKinds`/`excludeKinds` hints */
|
|
426
|
+
kind: AuthenticationFactorKind;
|
|
427
|
+
/** Optional human-readable label (e.g. provider name for OIDC, friendly name for FIDO) */
|
|
428
|
+
label?: string;
|
|
429
|
+
}
|
|
430
|
+
export interface MfaChallengeFactorOutput {
|
|
431
|
+
/** The factor method */
|
|
432
|
+
method: AuthenticationFactorMethod;
|
|
433
|
+
/** The id of the enrolled factor (opaque to the SPA, must be echoed back in the proof for methods that don't bind another way) */
|
|
434
|
+
method_id: string;
|
|
435
|
+
/** The factor kind (knowledge, possession, biometric) — the SPA filters against step-up `acceptableKinds`/`excludeKinds` hints */
|
|
436
|
+
kind: AuthenticationFactorKind;
|
|
437
|
+
/** Optional human-readable label (e.g. provider name for OIDC, friendly name for FIDO) */
|
|
438
|
+
label?: string;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* generated from [AuthenticationFactor](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L248)
|
|
442
|
+
*/
|
|
443
|
+
export interface AuthenticationFactor {
|
|
444
|
+
/** The method of the factor */
|
|
445
|
+
method: AuthenticationFactorMethod;
|
|
446
|
+
/** The kind of the factor */
|
|
447
|
+
kind: AuthenticationFactorKind;
|
|
448
|
+
/** The method identifier */
|
|
449
|
+
methodId: string;
|
|
450
|
+
/** The label for the factor */
|
|
451
|
+
label?: string;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Mint a fresh MFA challenge for the current session so the SPA can satisfy a `step_up_required` denial. Filters mirror `StepUpRequirement` from `@maroonedsoftware/policies`.
|
|
455
|
+
* generated from [StepUpStartRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L319)
|
|
456
|
+
*/
|
|
457
|
+
export interface StepUpStartRequest {
|
|
458
|
+
/** If set, only these factor methods are listed as eligible */
|
|
459
|
+
acceptableMethods?: AuthenticationFactorMethod[];
|
|
460
|
+
/** If set, only these factor kinds are listed as eligible */
|
|
461
|
+
acceptableKinds?: AuthenticationFactorKind[];
|
|
462
|
+
/** If set, factors with these methods are never listed */
|
|
463
|
+
excludeMethods?: AuthenticationFactorMethod[];
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Request to begin an OIDC sign-in flow
|
|
467
|
+
* generated from [OidcLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L255)
|
|
468
|
+
*/
|
|
469
|
+
export interface OidcLoginStart {
|
|
470
|
+
/** The IdP to authorize against */
|
|
471
|
+
provider: OidcProvider;
|
|
472
|
+
/** Optional URL the SPA wants the callback to land on after token issuance */
|
|
473
|
+
redirect_after?: string;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* generated from [PublicKeyCredentialWithAssertion](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L145)
|
|
477
|
+
*/
|
|
478
|
+
export interface PublicKeyCredentialWithAssertion extends PublicKeyCredential {
|
|
479
|
+
/** The client extension results */
|
|
480
|
+
clientExtensionResults: SimpleClientExtensionResults;
|
|
481
|
+
/** The authenticator assertion response */
|
|
482
|
+
response: FidoAuthenticatorAssertionResponse;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* generated from [FidoPublicKeyCredentialRequestOptions](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L211)
|
|
486
|
+
*/
|
|
487
|
+
export interface FidoPublicKeyCredentialRequestOptions {
|
|
488
|
+
challenge: string;
|
|
489
|
+
/** WebAuthn timeout hint in milliseconds */
|
|
490
|
+
timeout?: number;
|
|
491
|
+
rpId?: string;
|
|
492
|
+
/** The attestation */
|
|
493
|
+
attestation?: 'direct' | 'indirect' | 'none';
|
|
494
|
+
/** Whether the authenticator must verify the user */
|
|
495
|
+
userVerification?: 'required' | 'preferred' | 'discouraged';
|
|
496
|
+
/** The raw challenge */
|
|
497
|
+
rawChallenge?: Blob;
|
|
498
|
+
extensions?: Record<string, unknown>;
|
|
499
|
+
allowCredentials?: PublicKeyCredentialDescriptor[];
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Serialized form of `AuthenticatorAttestationResponse` — produced by the browser at registration; all binary fields are base64-encoded for transport
|
|
503
|
+
* generated from [FidoAuthenticatorAttestationResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L237)
|
|
504
|
+
*/
|
|
505
|
+
export interface FidoAuthenticatorAttestationResponse {
|
|
506
|
+
/** The client data JSON */
|
|
507
|
+
clientDataJSON: string;
|
|
508
|
+
/** The attestation object */
|
|
509
|
+
attestationObject: string;
|
|
510
|
+
/** The transports used by the authenticator */
|
|
511
|
+
transports?: FidoAuthenticatorTransport[];
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* generated from [FactorChallengeStartRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L295)
|
|
515
|
+
*/
|
|
516
|
+
export type FactorChallengeStartRequest = FactorChallengePhoneStart | FactorChallengeFidoStart | FactorChallengeEmailStart;
|
|
517
|
+
/**
|
|
518
|
+
* An active authentication session
|
|
519
|
+
* generated from [Session](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L333)
|
|
520
|
+
*/
|
|
521
|
+
export interface Session {
|
|
522
|
+
/** Opaque session token used as the cache key and embedded in JWTs */
|
|
523
|
+
sessionToken: string;
|
|
524
|
+
/** The actor that owns this session */
|
|
525
|
+
actorId: string;
|
|
526
|
+
/** When the session was originally issued */
|
|
527
|
+
issuedAt: DateTime;
|
|
528
|
+
/** When the session expires */
|
|
529
|
+
expiresAt: DateTime;
|
|
530
|
+
/** When the session was last accessed */
|
|
531
|
+
lastAccessedAt: DateTime;
|
|
532
|
+
/** Factors that have been satisfied in this session */
|
|
533
|
+
factors: SessionFactor[];
|
|
534
|
+
/** IP address recorded when the session was created */
|
|
535
|
+
ip?: string | null;
|
|
536
|
+
/** User agent recorded when the session was created */
|
|
537
|
+
userAgent?: string | null;
|
|
538
|
+
/** True when this session matches the requesting session */
|
|
539
|
+
isCurrent: boolean;
|
|
540
|
+
}
|
|
541
|
+
export interface SessionInput {
|
|
542
|
+
}
|
|
543
|
+
/** Rehydrates every wire-encoded scalar in a Session into its runtime type. Mutates and returns `raw`. */
|
|
544
|
+
export declare function reviveSession(raw: Session): Session;
|
|
545
|
+
/**
|
|
546
|
+
* Who the caller is, as the station sees them
|
|
547
|
+
* generated from [AuthSession](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L352)
|
|
548
|
+
*/
|
|
549
|
+
export interface AuthSession {
|
|
550
|
+
/** The actor the session belongs to */
|
|
551
|
+
actorId: string;
|
|
552
|
+
/** Every platform role the caller holds, sorted. Empty for an account nobody has granted one, which today is any account that did not come in through onboarding */
|
|
553
|
+
roles: PlatformRole[];
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Represents an application authentication request
|
|
557
|
+
* generated from [ClientCredentialsAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L32)
|
|
558
|
+
*/
|
|
559
|
+
export interface ClientCredentialsAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type' | 'client_id'> {
|
|
560
|
+
/** The grant type for the request */
|
|
561
|
+
grant_type: 'client_credentials';
|
|
562
|
+
/** The client identifier */
|
|
563
|
+
client_id: string;
|
|
564
|
+
/** The client secret */
|
|
565
|
+
client_secret: string;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Represents an authentication password request
|
|
569
|
+
* generated from [PasswordAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L38)
|
|
570
|
+
*/
|
|
571
|
+
export interface PasswordAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
572
|
+
/** The grant type for the request */
|
|
573
|
+
grant_type: 'password';
|
|
574
|
+
/** User's identifier, usually an email address */
|
|
575
|
+
username: string;
|
|
576
|
+
/** User's password */
|
|
577
|
+
password: string;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Represents an authentication refresh request
|
|
581
|
+
* generated from [RefreshTokenAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L44)
|
|
582
|
+
*/
|
|
583
|
+
export interface RefreshTokenAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
584
|
+
/** The grant type for the request */
|
|
585
|
+
grant_type: 'refresh_token';
|
|
586
|
+
/** The refresh token issued by the authorization server. Optional: browser clients omit it and present the httpOnly refresh cookie instead */
|
|
587
|
+
refresh_token?: string;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Represents an authentication magic link request
|
|
591
|
+
* generated from [LinkAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L49)
|
|
592
|
+
*/
|
|
593
|
+
export interface LinkAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
594
|
+
/** The grant type for the request */
|
|
595
|
+
grant_type: 'link';
|
|
596
|
+
/** The email challenge id returned by `POST /auth/login/start` — binds the link to the issued challenge so cross-device clicks work */
|
|
597
|
+
challenge_id: string;
|
|
598
|
+
/** The magic link token */
|
|
599
|
+
link: string;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Represents an authentication one-time-code request
|
|
603
|
+
* generated from [CodeAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L55)
|
|
604
|
+
*/
|
|
605
|
+
export interface CodeAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
606
|
+
/** The grant type for the request */
|
|
607
|
+
grant_type: 'code';
|
|
608
|
+
/** The one-time code */
|
|
609
|
+
code: string;
|
|
610
|
+
/** PKCE verifier — required for a primary code login; absent when mfa_challenge_id is set */
|
|
611
|
+
code_verifier?: string;
|
|
612
|
+
/** When set, completes a pending MFA challenge; replaces code_verifier as proof-of-origin */
|
|
613
|
+
mfa_challenge_id?: string;
|
|
614
|
+
/** The phone/email challenge id (returned by POST /auth/factors/start for phone-MFA). Required when mfa_challenge_id is set; ignored otherwise (resolved via PKCE) */
|
|
615
|
+
challenge_id?: string;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Submit a TOTP code as a second factor against a pending MFA challenge
|
|
619
|
+
* generated from [AuthenticatorAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L70)
|
|
620
|
+
*/
|
|
621
|
+
export interface AuthenticatorAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
622
|
+
/** The grant type for the request */
|
|
623
|
+
grant_type: 'authenticator';
|
|
624
|
+
/** The TOTP code */
|
|
625
|
+
code: string;
|
|
626
|
+
/** The pending MFA challenge — required, TOTP has no other actor binding at initial login */
|
|
627
|
+
mfa_challenge_id: string;
|
|
628
|
+
/** The id of the enrolled authenticator factor to verify against (must be present in the MFA challenge's eligible list) */
|
|
629
|
+
method_id: string;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Redeem a completed OIDC authorization that the callback stashed under a one-time id
|
|
633
|
+
* generated from [OidcAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L77)
|
|
634
|
+
*/
|
|
635
|
+
export interface OidcAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
636
|
+
/** The grant type for the request */
|
|
637
|
+
grant_type: 'oidc';
|
|
638
|
+
/** The one-time stash id from the OIDC callback redirect (the value after `?token=oidc:` on `/auth/callback`). Single-use — the API consumes it via `OidcFactorService.redeemAuthenticatedExchange`. */
|
|
639
|
+
challenge_id: string;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* generated from [BaseAuthenticationLoginStartWithEmail](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L167)
|
|
643
|
+
*/
|
|
644
|
+
export interface BaseAuthenticationLoginStartWithEmail extends BaseAuthenticationLoginStart {
|
|
645
|
+
/** User's email address */
|
|
646
|
+
email: string;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Request to begin an OIDC sign-in flow
|
|
650
|
+
* generated from [OidcAuthenticationLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L184)
|
|
651
|
+
*/
|
|
652
|
+
export interface OidcAuthenticationLoginStart extends Omit<BaseAuthenticationLoginStart, 'grant_type'> {
|
|
653
|
+
/** The grant type for the request */
|
|
654
|
+
grant_type: 'oidc';
|
|
655
|
+
/** The IdP to authorize against */
|
|
656
|
+
provider: OidcProvider;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* generated from [CodeAuthenticationLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L203)
|
|
660
|
+
*/
|
|
661
|
+
export interface CodeAuthenticationLoginStartResponse extends Omit<BaseAuthenticationLoginStartResponse, 'grant_type'> {
|
|
662
|
+
/** The grant type for the response */
|
|
663
|
+
grant_type: 'code';
|
|
664
|
+
}
|
|
665
|
+
/** Rehydrates every wire-encoded scalar in a CodeAuthenticationLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
666
|
+
export declare function reviveCodeAuthenticationLoginStartResponse(raw: CodeAuthenticationLoginStartResponse): CodeAuthenticationLoginStartResponse;
|
|
667
|
+
/**
|
|
668
|
+
* generated from [LinkAuthenticationLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L207)
|
|
669
|
+
*/
|
|
670
|
+
export interface LinkAuthenticationLoginStartResponse extends Omit<BaseAuthenticationLoginStartResponse, 'grant_type'> {
|
|
671
|
+
/** The grant type for the response */
|
|
672
|
+
grant_type: 'link';
|
|
673
|
+
}
|
|
674
|
+
/** Rehydrates every wire-encoded scalar in a LinkAuthenticationLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
675
|
+
export declare function reviveLinkAuthenticationLoginStartResponse(raw: LinkAuthenticationLoginStartResponse): LinkAuthenticationLoginStartResponse;
|
|
676
|
+
/**
|
|
677
|
+
* Response from `/auth/login/oidc/start` instructing the client to navigate to `authorize_url`
|
|
678
|
+
* generated from [OidcAuthenticationLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L227)
|
|
679
|
+
*/
|
|
680
|
+
export interface OidcAuthenticationLoginStartResponse extends Omit<BaseAuthenticationLoginStartResponse, 'grant_type'> {
|
|
681
|
+
/** The grant type for the response */
|
|
682
|
+
grant_type: 'oidc';
|
|
683
|
+
/** Fully-formed authorize URL the user-agent should be redirected to */
|
|
684
|
+
authorize_url: string;
|
|
685
|
+
/** Opaque state token bound to this authorization round-trip */
|
|
686
|
+
state: string;
|
|
687
|
+
}
|
|
688
|
+
/** Rehydrates every wire-encoded scalar in a OidcAuthenticationLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
689
|
+
export declare function reviveOidcAuthenticationLoginStartResponse(raw: OidcAuthenticationLoginStartResponse): OidcAuthenticationLoginStartResponse;
|
|
690
|
+
/**
|
|
691
|
+
* MFA-required arm of /auth/token response
|
|
692
|
+
* generated from [MfaRequiredResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L108)
|
|
693
|
+
*/
|
|
694
|
+
export interface MfaRequiredResponse {
|
|
695
|
+
/** Discriminator */
|
|
696
|
+
result: 'mfa_required';
|
|
697
|
+
/** The MFA challenge identifier — pass back as `mfa_challenge_id` on the proof grant */
|
|
698
|
+
challengeId: string;
|
|
699
|
+
/** When the MFA challenge expires */
|
|
700
|
+
expiresAt: DateTime;
|
|
701
|
+
/** Eligible factors the SPA may use to complete the challenge */
|
|
702
|
+
factors: MfaChallengeFactor[];
|
|
703
|
+
}
|
|
704
|
+
export interface MfaRequiredResponseOutput {
|
|
705
|
+
/** Discriminator */
|
|
706
|
+
result: 'mfa_required';
|
|
707
|
+
/** The MFA challenge identifier — pass back as `mfa_challenge_id` on the proof grant */
|
|
708
|
+
challenge_id: string;
|
|
709
|
+
/** When the MFA challenge expires */
|
|
710
|
+
expires_at: DateTime;
|
|
711
|
+
/** Eligible factors the SPA may use to complete the challenge */
|
|
712
|
+
factors: MfaChallengeFactorOutput[];
|
|
713
|
+
}
|
|
714
|
+
/** Rehydrates every wire-encoded scalar in a MfaRequiredResponse into its runtime type. Mutates and returns `raw`. */
|
|
715
|
+
export declare function reviveMfaRequiredResponse(raw: MfaRequiredResponse): MfaRequiredResponse;
|
|
716
|
+
/** Rehydrates every wire-encoded scalar in a MfaRequiredResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
717
|
+
export declare function reviveMfaRequiredResponseOutput(raw: MfaRequiredResponseOutput): MfaRequiredResponseOutput;
|
|
718
|
+
/**
|
|
719
|
+
* Represents an authentication passkey request
|
|
720
|
+
* generated from [FidoAuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L63)
|
|
721
|
+
*/
|
|
722
|
+
export interface FidoAuthenticationRequest extends Omit<BaseAuthenticationRequest, 'grant_type'> {
|
|
723
|
+
/** The grant type for the request */
|
|
724
|
+
grant_type: 'fido';
|
|
725
|
+
/** A passkey credential object */
|
|
726
|
+
credential: PublicKeyCredentialWithAssertion;
|
|
727
|
+
/** The FIDO assertion challenge id returned by `POST /auth/login/start` (primary) or `POST /auth/factors/start` (MFA second factor). Must be the per-challenge id, not the actor id. */
|
|
728
|
+
challenge_id: string;
|
|
729
|
+
/** When set, completes a pending MFA challenge instead of issuing a single-factor session */
|
|
730
|
+
mfa_challenge_id?: string;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* WebAuthn assertion options for `navigator.credentials.get`
|
|
734
|
+
* generated from [FidoAuthenticationLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L222)
|
|
735
|
+
*/
|
|
736
|
+
export interface FidoAuthenticationLoginStartResponse extends Omit<BaseAuthenticationLoginStartResponse, 'grant_type'> {
|
|
737
|
+
/** The grant type for the response */
|
|
738
|
+
grant_type: 'fido';
|
|
739
|
+
/** The WebAuthn assertion options */
|
|
740
|
+
assertion: FidoPublicKeyCredentialRequestOptions;
|
|
741
|
+
}
|
|
742
|
+
/** Rehydrates every wire-encoded scalar in a FidoAuthenticationLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
743
|
+
export declare function reviveFidoAuthenticationLoginStartResponse(raw: FidoAuthenticationLoginStartResponse): FidoAuthenticationLoginStartResponse;
|
|
744
|
+
/**
|
|
745
|
+
* Response for a FIDO assertion challenge
|
|
746
|
+
* generated from [FactorChallengeFidoStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L304)
|
|
747
|
+
*/
|
|
748
|
+
export interface FactorChallengeFidoStartResponse {
|
|
749
|
+
/** Discriminator */
|
|
750
|
+
method: 'fido';
|
|
751
|
+
/** The FIDO-factor challenge id — echo back on the `fido` grant as `challenge_id` */
|
|
752
|
+
fidoChallengeId: string;
|
|
753
|
+
/** WebAuthn assertion options for navigator.credentials.get */
|
|
754
|
+
assertion: FidoPublicKeyCredentialRequestOptions;
|
|
755
|
+
/** When the FIDO challenge expires */
|
|
756
|
+
expiresAt: DateTime;
|
|
757
|
+
}
|
|
758
|
+
export interface FactorChallengeFidoStartResponseOutput {
|
|
759
|
+
/** Discriminator */
|
|
760
|
+
method: 'fido';
|
|
761
|
+
/** The FIDO-factor challenge id — echo back on the `fido` grant as `challenge_id` */
|
|
762
|
+
fido_challenge_id: string;
|
|
763
|
+
/** WebAuthn assertion options for navigator.credentials.get */
|
|
764
|
+
assertion: FidoPublicKeyCredentialRequestOptions;
|
|
765
|
+
/** When the FIDO challenge expires */
|
|
766
|
+
expires_at: DateTime;
|
|
767
|
+
}
|
|
768
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengeFidoStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
769
|
+
export declare function reviveFactorChallengeFidoStartResponse(raw: FactorChallengeFidoStartResponse): FactorChallengeFidoStartResponse;
|
|
770
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengeFidoStartResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
771
|
+
export declare function reviveFactorChallengeFidoStartResponseOutput(raw: FactorChallengeFidoStartResponseOutput): FactorChallengeFidoStartResponseOutput;
|
|
772
|
+
/**
|
|
773
|
+
* The credential the client posts back to complete registration
|
|
774
|
+
* generated from [PublicKeyCredentialWithAttestation](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L243)
|
|
775
|
+
*/
|
|
776
|
+
export interface PublicKeyCredentialWithAttestation extends PublicKeyCredential {
|
|
777
|
+
/** The client extension results */
|
|
778
|
+
clientExtensionResults: SimpleClientExtensionResults;
|
|
779
|
+
/** The authenticator attestation response */
|
|
780
|
+
response: FidoAuthenticatorAttestationResponse;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* generated from [LinkAuthenticationLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L171)
|
|
784
|
+
*/
|
|
785
|
+
export interface LinkAuthenticationLoginStart extends Omit<BaseAuthenticationLoginStartWithEmail, 'grant_type'> {
|
|
786
|
+
/** The grant type for the request */
|
|
787
|
+
grant_type: 'link';
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* generated from [CodeAuthenticationLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L175)
|
|
791
|
+
*/
|
|
792
|
+
export interface CodeAuthenticationLoginStart extends Omit<BaseAuthenticationLoginStartWithEmail, 'grant_type'> {
|
|
793
|
+
/** The grant type for the request */
|
|
794
|
+
grant_type: 'code';
|
|
795
|
+
/** A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device */
|
|
796
|
+
code_challenge: string;
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* generated from [FidoAuthenticationLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L180)
|
|
800
|
+
*/
|
|
801
|
+
export interface FidoAuthenticationLoginStart extends Omit<BaseAuthenticationLoginStartWithEmail, 'grant_type'> {
|
|
802
|
+
/** The grant type for the request */
|
|
803
|
+
grant_type: 'fido';
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* generated from [StepUpStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L119)
|
|
807
|
+
*/
|
|
808
|
+
export type StepUpStartResponse = MfaRequiredResponse | EnrollmentRequiredResponse;
|
|
809
|
+
export type StepUpStartResponseOutput = MfaRequiredResponseOutput | EnrollmentRequiredResponseOutput;
|
|
810
|
+
/** Rehydrates every wire-encoded scalar in a StepUpStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
811
|
+
export declare function reviveStepUpStartResponse(raw: StepUpStartResponse): StepUpStartResponse;
|
|
812
|
+
/** Rehydrates every wire-encoded scalar in a StepUpStartResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
813
|
+
export declare function reviveStepUpStartResponseOutput(raw: StepUpStartResponseOutput): StepUpStartResponseOutput;
|
|
814
|
+
/**
|
|
815
|
+
* generated from [AuthenticationTokenResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L121)
|
|
816
|
+
*/
|
|
817
|
+
export type AuthenticationTokenResponse = AuthenticationTokenIssued | MfaRequiredResponse;
|
|
818
|
+
export type AuthenticationTokenResponseOutput = AuthenticationTokenIssuedOutput | MfaRequiredResponseOutput;
|
|
819
|
+
/** Rehydrates every wire-encoded scalar in a AuthenticationTokenResponse into its runtime type. Mutates and returns `raw`. */
|
|
820
|
+
export declare function reviveAuthenticationTokenResponse(raw: AuthenticationTokenResponse): AuthenticationTokenResponse;
|
|
821
|
+
/** Rehydrates every wire-encoded scalar in a AuthenticationTokenResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
822
|
+
export declare function reviveAuthenticationTokenResponseOutput(raw: AuthenticationTokenResponseOutput): AuthenticationTokenResponseOutput;
|
|
823
|
+
/**
|
|
824
|
+
* generated from [AuthenticationRequest](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L82)
|
|
825
|
+
*/
|
|
826
|
+
export type AuthenticationRequest = PasswordAuthenticationRequest | ClientCredentialsAuthenticationRequest | RefreshTokenAuthenticationRequest | LinkAuthenticationRequest | CodeAuthenticationRequest | FidoAuthenticationRequest | AuthenticatorAuthenticationRequest | OidcAuthenticationRequest;
|
|
827
|
+
/**
|
|
828
|
+
* generated from [AuthenticationLoginStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L233)
|
|
829
|
+
*/
|
|
830
|
+
export type AuthenticationLoginStartResponse = CodeAuthenticationLoginStartResponse | LinkAuthenticationLoginStartResponse | FidoAuthenticationLoginStartResponse | OidcAuthenticationLoginStartResponse;
|
|
831
|
+
/** Rehydrates every wire-encoded scalar in a AuthenticationLoginStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
832
|
+
export declare function reviveAuthenticationLoginStartResponse(raw: AuthenticationLoginStartResponse): AuthenticationLoginStartResponse;
|
|
833
|
+
/**
|
|
834
|
+
* generated from [FactorChallengeStartResponse](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L317)
|
|
835
|
+
*/
|
|
836
|
+
export type FactorChallengeStartResponse = FactorChallengePhoneStartResponse | FactorChallengeFidoStartResponse | FactorChallengeEmailStartResponse;
|
|
837
|
+
export type FactorChallengeStartResponseOutput = FactorChallengePhoneStartResponseOutput | FactorChallengeFidoStartResponseOutput | FactorChallengeEmailStartResponseOutput;
|
|
838
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengeStartResponse into its runtime type. Mutates and returns `raw`. */
|
|
839
|
+
export declare function reviveFactorChallengeStartResponse(raw: FactorChallengeStartResponse): FactorChallengeStartResponse;
|
|
840
|
+
/** Rehydrates every wire-encoded scalar in a FactorChallengeStartResponseOutput into its runtime type. Mutates and returns `raw`. */
|
|
841
|
+
export declare function reviveFactorChallengeStartResponseOutput(raw: FactorChallengeStartResponseOutput): FactorChallengeStartResponseOutput;
|
|
842
|
+
/**
|
|
843
|
+
* generated from [AuthenticationLoginStart](../../../../../apps/api/data/contracts/authentication/authentication.types.ck#L189)
|
|
844
|
+
*/
|
|
845
|
+
export type AuthenticationLoginStart = LinkAuthenticationLoginStart | CodeAuthenticationLoginStart | FidoAuthenticationLoginStart | OidcAuthenticationLoginStart;
|
|
846
|
+
//# sourceMappingURL=authentication.types.d.ts.map
|