@workos-inc/widgets 1.16.0 → 1.16.1-next.1786474369548

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.
@@ -49,136 +49,289 @@ type Scalars = {
49
49
  input: string;
50
50
  output: string;
51
51
  };
52
+ /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
53
+ JSON: {
54
+ input: any;
55
+ output: any;
56
+ };
57
+ };
58
+ /** All other sessions were revoked successfully. */
59
+ type AllSessionsRevoked = {
60
+ __typename?: "AllSessionsRevoked";
61
+ success: Scalars["Boolean"]["output"];
62
+ };
63
+ type AssignPermissionToRoleInput = {
64
+ /** The slug of the permission to assign. */
65
+ permissionSlug: Scalars["String"]["input"];
66
+ /** The ID of the role to assign the permission to. */
67
+ roleId: Scalars["ID"]["input"];
68
+ };
69
+ type AuditEvent = {
70
+ __typename?: "AuditEvent";
71
+ action: Scalars["String"]["output"];
72
+ actor: AuditEventActor;
73
+ createdAt: Scalars["DateTime"]["output"];
74
+ data: Scalars["JSON"]["output"];
75
+ id: Scalars["ID"]["output"];
76
+ occurredAt: Scalars["DateTime"]["output"];
77
+ targets: Array<Scalars["String"]["output"]>;
78
+ updatedAt: Scalars["DateTime"]["output"];
79
+ };
80
+ type AuditEventActor = {
81
+ __typename?: "AuditEventActor";
82
+ id: Scalars["String"]["output"];
83
+ name?: Maybe<Scalars["String"]["output"]>;
84
+ type: Scalars["String"]["output"];
85
+ };
86
+ type AuditEventFilterInput = {
87
+ actions?: InputMaybe<Array<Scalars["String"]["input"]>>;
88
+ actorIds?: InputMaybe<Array<Scalars["String"]["input"]>>;
89
+ actorNames?: InputMaybe<Array<Scalars["String"]["input"]>>;
90
+ rangeEnd: Scalars["DateTime"]["input"];
91
+ rangeStart: Scalars["DateTime"]["input"];
92
+ search?: InputMaybe<Scalars["String"]["input"]>;
93
+ targetIds?: InputMaybe<Array<Scalars["String"]["input"]>>;
94
+ targetTypes?: InputMaybe<Array<Scalars["String"]["input"]>>;
52
95
  };
96
+ type AuditEventList = {
97
+ __typename?: "AuditEventList";
98
+ data: Array<AuditEvent>;
99
+ listMetadata: ListMetadata;
100
+ };
101
+ type AuditLogExport = {
102
+ __typename?: "AuditLogExport";
103
+ id: Scalars["ID"]["output"];
104
+ state: AuditLogExportState;
105
+ };
106
+ type AuditLogExportState = "Error" | "Expired" | "Pending" | "Ready";
107
+ /** The authentication methods the environment allows, and the password policy it enforces. Distinct from what the authenticated user has set up, which lives on `me`. */
108
+ type AuthenticationSettings = {
109
+ __typename?: "AuthenticationSettings";
110
+ /** Whether multi-factor authentication is available in this environment. When `false`, TOTP enrollment should not be offered. */
111
+ mfaEnabled: Scalars["Boolean"]["output"];
112
+ /** Whether multi-factor authentication is mandatory for every user in this environment. */
113
+ mfaRequired: Scalars["Boolean"]["output"];
114
+ /** Whether users may authenticate with a passkey. */
115
+ passkeyAuthEnabled: Scalars["Boolean"]["output"];
116
+ /** Whether users may authenticate with a password. When `false`, `createPassword` and `updatePassword` should not be offered. */
117
+ passwordAuthEnabled: Scalars["Boolean"]["output"];
118
+ passwordPolicy: PasswordPolicy;
119
+ };
120
+ type ClientApi_CreateSsoConnectionInput = {
121
+ /** A human-readable name for the connection. Defaults to the organization's name. */
122
+ name?: InputMaybe<Scalars["String"]["input"]>;
123
+ /** The identity provider type of the connection to create. */
124
+ type: ConnectionType;
125
+ };
126
+ type ClientApi_UpdateSsoConnectionInput = {
127
+ id: Scalars["ID"]["input"];
128
+ /** A new human-readable name for the connection. */
129
+ name?: InputMaybe<Scalars["String"]["input"]>;
130
+ };
131
+ /** Input for confirming an email change with the verification code. */
132
+ type ConfirmEmailChangeInput = {
133
+ /** The verification code sent to the new email address. */
134
+ code: Scalars["String"]["input"];
135
+ /** The elevated access token from a successful `verifyCurrentEmail` call. */
136
+ elevatedAccessToken: Scalars["String"]["input"];
137
+ };
138
+ type ConfirmEmailChangeResult = EmailChangeCodeExpired | EmailChangeCodeIncorrect | EmailChangeCodePreviouslyUsed | EmailChangeConfirmed | EmailChangeTooManyAttempts | EmailManagedByProvider | EmailNotAvailable | IdentityVerificationExpired | IdentityVerificationInvalid | InvalidEmail | NoPendingEmailChange;
53
139
  /** An OAuth profile linked to the authenticated user. */
54
- type ClientApi_ConnectedAccount = {
55
- __typename?: "ClientApi_ConnectedAccount";
140
+ type ConnectedAccount = {
141
+ __typename?: "ConnectedAccount";
56
142
  email?: Maybe<Scalars["String"]["output"]>;
57
143
  firstName?: Maybe<Scalars["String"]["output"]>;
58
144
  id: Scalars["ID"]["output"];
59
145
  lastLoginAt?: Maybe<Scalars["DateTime"]["output"]>;
60
146
  lastName?: Maybe<Scalars["String"]["output"]>;
61
147
  profilePictureUrl?: Maybe<Scalars["String"]["output"]>;
62
- provider: ClientApi_OAuthProvider;
148
+ provider: OAuthProvider;
63
149
  };
64
- /** OAuth provider for a connected account. */
65
- type ClientApi_OAuthProvider = "AppleOAuth" | "BitbucketOAuth" | "DiscordOAuth" | "GitLabOAuth" | "GithubOAuth" | "GoogleOAuth" | "IntuitOAuth" | "LinkedInOAuth" | "MicrosoftOAuth" | "SalesforceOAuth" | "SlackOAuth" | "VercelMarketplaceOAuth" | "VercelOAuth" | "XeroOAuth";
66
- /** An organization in the current environment. */
67
- type ClientApi_Organization = {
68
- __typename?: "ClientApi_Organization";
69
- /** Whether the organization allows profiles outside the organization domains. */
70
- allowProfilesOutsideOrganization: Scalars["Boolean"]["output"];
150
+ /** An SSO connection belonging to the organization. Mirrors the SSO Connection exposed by the REST connections API. */
151
+ type Connection = {
152
+ __typename?: "Connection";
71
153
  createdAt: Scalars["DateTime"]["output"];
72
154
  id: Scalars["ID"]["output"];
155
+ /** A human-readable name for the connection. */
73
156
  name: Scalars["String"]["output"];
157
+ /** The organization the connection belongs to. */
158
+ organizationId?: Maybe<Scalars["ID"]["output"]>;
159
+ /** Whether the connection has completed its IdP setup and can authenticate users (equivalent to an `Active` state). */
160
+ setupComplete: Scalars["Boolean"]["output"];
161
+ /** The connection's IdP setup status. `Active` indicates setup is complete; other states indicate where the connection is in its setup flow. */
162
+ state: ConnectionState;
163
+ /** The identity provider type of the connection. */
164
+ type: ConnectionType;
74
165
  updatedAt: Scalars["DateTime"]["output"];
75
166
  };
76
- /** A registered passkey (WebAuthn credential) for the authenticated user. */
77
- type ClientApi_Passkey = {
78
- __typename?: "ClientApi_Passkey";
79
- createdAt: Scalars["DateTime"]["output"];
80
- id: Scalars["ID"]["output"];
81
- /** When this passkey was last used to authenticate. */
82
- lastVerifiedAt?: Maybe<Scalars["DateTime"]["output"]>;
83
- updatedAt: Scalars["DateTime"]["output"];
167
+ /** Enum represents the state of the connection. */
168
+ type ConnectionState = "Active" | "Deleting" | "Inactive" | "Validating";
169
+ /** Enum represents the type of connection. */
170
+ type ConnectionType = "ADFSSAML" | "AdpOidc" | "AppleOAuth" | "Auth0Migration" | "Auth0SAML" | "AzureSAML" | "BitbucketOAuth" | "CasSAML" | "ClassLinkSAML" | "CleverOIDC" | "CloudflareSAML" | "CyberArkSAML" | "DiscordOAuth" | "DuoSAML" | "EntraIdOIDC" | "GenericOIDC" | "GenericSAML" | "GitLabOAuth" | "GithubOAuth" | "GoogleOAuth" | "GoogleOIDC" | "GoogleSAML" | "GrokOAuth" | "IntuitOAuth" | "JumpCloudSAML" | "KeycloakSAML" | "LastPassSAML" | "LinkedInOAuth" | "LoginGovOidc" | "MagicLink" | "MicrosoftOAuth" | "MiniOrangeSAML" | "NetIqSAML" | "OktaOIDC" | "OktaSAML" | "OneLoginSAML" | "OracleSAML" | "PingFederateSAML" | "PingOneSAML" | "RipplingSAML" | "SalesforceOAuth" | "SalesforceSAML" | "ShibbolethGenericSAML" | "ShibbolethSAML" | "SimpleSamlPhpSAML" | "SlackOAuth" | "TestIdp" | "VMwareSAML" | "VercelMarketplaceOAuth" | "VercelOAuth" | "XOAuth" | "XeroOAuth";
171
+ type CreateAuditLogExportInput = {
172
+ actions?: InputMaybe<Array<Scalars["String"]["input"]>>;
173
+ actorIds?: InputMaybe<Array<Scalars["String"]["input"]>>;
174
+ actorNames?: InputMaybe<Array<Scalars["String"]["input"]>>;
175
+ rangeEnd: Scalars["DateTime"]["input"];
176
+ rangeStart: Scalars["DateTime"]["input"];
177
+ targetIds?: InputMaybe<Array<Scalars["String"]["input"]>>;
178
+ targetTypes?: InputMaybe<Array<Scalars["String"]["input"]>>;
179
+ };
180
+ type CreateAuditLogExportResult = AuditLogExport | InvalidAuditLogExportDateRange | NoAuditEventsFound;
181
+ /** Input for setting a password on an account that does not yet have one (e.g. signed up via OAuth). */
182
+ type CreatePasswordInput = {
183
+ /** An elevated access token obtained by verifying the current email address. Required to prove recent re-authentication. */
184
+ elevatedAccessToken: Scalars["String"]["input"];
185
+ /** The password to set. Must satisfy the environment password policy. */
186
+ password: Scalars["String"]["input"];
84
187
  };
85
- /** A role available within the organization. */
86
- type ClientApi_Role = {
87
- __typename?: "ClientApi_Role";
188
+ type CreatePasswordResult = ElevatedAccessTokenExpired | ElevatedAccessTokenInvalid | PasswordCreated | PasswordPolicyViolation | UserAlreadyHasPassword;
189
+ type CreateRoleInput = {
190
+ /** Optional human-readable description of the role. */
191
+ description?: InputMaybe<Scalars["String"]["input"]>;
192
+ /** Human-readable name for the role. */
193
+ name: Scalars["String"]["input"];
194
+ /** Slugs of the permissions granted to the role. */
195
+ permissions?: InputMaybe<Array<Scalars["String"]["input"]>>;
196
+ /** Unique slug identifying the role. Generated from the name when omitted. */
197
+ slug?: InputMaybe<Scalars["String"]["input"]>;
198
+ };
199
+ /** The current email was verified successfully. */
200
+ type CurrentEmailVerified = {
201
+ __typename?: "CurrentEmailVerified";
202
+ /** The elevated access token to pass to `sendEmailChange` and `confirmEmailChange`. */
203
+ elevatedAccessToken: Scalars["String"]["output"];
204
+ /** When the elevated access token expires (ISO 8601). */
205
+ expiresAt: Scalars["String"]["output"];
206
+ };
207
+ /** Daily verification email quota exceeded. */
208
+ type DailyEmailQuotaExceeded = {
209
+ __typename?: "DailyEmailQuotaExceeded";
210
+ message: Scalars["String"]["output"];
211
+ };
212
+ /** A third-party data provider configured for the current environment. */
213
+ type DataProvider = {
214
+ __typename?: "DataProvider";
215
+ /** How accounts authenticate with this data provider. */
216
+ authMethods: Array<Scalars["String"]["output"]>;
88
217
  createdAt: Scalars["DateTime"]["output"];
89
218
  description?: Maybe<Scalars["String"]["output"]>;
219
+ /** Whether the data provider is enabled in the environment. */
220
+ enabled: Scalars["Boolean"]["output"];
90
221
  id: Scalars["ID"]["output"];
91
- /** Whether this is the default role assigned to new members. */
92
- isDefault: Scalars["Boolean"]["output"];
222
+ /** The provider type this data provider was created from. */
223
+ integrationType: Scalars["String"]["output"];
224
+ /** The display name of the data provider. */
93
225
  name: Scalars["String"]["output"];
226
+ /** The OAuth scopes configured for the data provider. `null` when the provider's default scopes are used. */
227
+ scopes?: Maybe<Array<Scalars["String"]["output"]>>;
228
+ /** The slug of the data provider. */
94
229
  slug: Scalars["String"]["output"];
230
+ /** The configuration state of the data provider: `valid`, `invalid`, or `requested`. */
231
+ state: Scalars["String"]["output"];
95
232
  updatedAt: Scalars["DateTime"]["output"];
96
233
  };
97
- /** Roles available in the organization along with role assignment configuration. */
98
- type ClientApi_RolesResult = {
99
- __typename?: "ClientApi_RolesResult";
100
- /** Whether members can be assigned multiple roles simultaneously. */
101
- multipleRolesEnabled: Scalars["Boolean"]["output"];
102
- roles: Array<ClientApi_Role>;
103
- };
104
- /** An active user session. */
105
- type ClientApi_Session = {
106
- __typename?: "ClientApi_Session";
234
+ /** A connection between a data provider and the authenticated user's account. */
235
+ type DataProviderConnection = {
236
+ __typename?: "DataProviderConnection";
237
+ /** How the connection authenticates: `oauth`, `api_key`, or `client_credentials`. */
238
+ authMethod: Scalars["String"]["output"];
107
239
  createdAt: Scalars["DateTime"]["output"];
108
- currentLocation?: Maybe<ClientApi_SessionLocation>;
240
+ /** The data provider this connection was created for. */
241
+ dataProviderId: Scalars["ID"]["output"];
242
+ /** The slug of the connected data provider. */
243
+ dataProviderSlug: Scalars["String"]["output"];
109
244
  id: Scalars["ID"]["output"];
110
- ipAddress?: Maybe<Scalars["String"]["output"]>;
111
- /** Whether this session is the one making the request. */
112
- isCurrent: Scalars["Boolean"]["output"];
113
- lastActivityAt?: Maybe<Scalars["DateTime"]["output"]>;
114
- organizationId?: Maybe<Scalars["String"]["output"]>;
115
- state: ClientApi_SessionState;
245
+ organizationId?: Maybe<Scalars["ID"]["output"]>;
246
+ /** The OAuth scopes granted for this connection. */
247
+ scopes: Array<Scalars["String"]["output"]>;
248
+ /** The status of the connection: `connected` or `needs_reauthorization`. */
249
+ state: Scalars["String"]["output"];
116
250
  updatedAt: Scalars["DateTime"]["output"];
117
- userAgent?: Maybe<Scalars["String"]["output"]>;
251
+ userId?: Maybe<Scalars["ID"]["output"]>;
118
252
  };
119
- /** Approximate geographic location derived from the session IP. */
120
- type ClientApi_SessionLocation = {
121
- __typename?: "ClientApi_SessionLocation";
122
- cityName: Scalars["String"]["output"];
123
- countryISOCode: Scalars["String"]["output"];
253
+ type DataProviderConnectionList = {
254
+ __typename?: "DataProviderConnectionList";
255
+ data: Array<DataProviderConnection>;
256
+ listMetadata: ListMetadata;
124
257
  };
125
- /** The lifecycle state of a session. */
126
- type ClientApi_SessionState = {
127
- __typename?: "ClientApi_SessionState";
128
- expiresAt?: Maybe<Scalars["DateTime"]["output"]>;
129
- /** Session state: Issued, Revoked, etc. */
130
- tag: Scalars["String"]["output"];
258
+ type DataProviderList = {
259
+ __typename?: "DataProviderList";
260
+ data: Array<DataProvider>;
261
+ listMetadata: ListMetadata;
131
262
  };
132
- /** A user in the current environment. */
133
- type ClientApi_User = {
134
- __typename?: "ClientApi_User";
135
- connectedAccounts: Array<ClientApi_ConnectedAccount>;
263
+ type DeleteRoleInput = {
264
+ /** The ID of the role to delete. */
265
+ id: Scalars["ID"]["input"];
266
+ };
267
+ /** A Directory Sync connection within the current environment. */
268
+ type Directory = {
269
+ __typename?: "Directory";
136
270
  createdAt: Scalars["DateTime"]["output"];
137
- email: Scalars["String"]["output"];
138
- emailVerified: Scalars["Boolean"]["output"];
139
- firstName?: Maybe<Scalars["String"]["output"]>;
271
+ externalKey: Scalars["String"]["output"];
140
272
  id: Scalars["ID"]["output"];
141
- lastName?: Maybe<Scalars["String"]["output"]>;
142
- /** Whether multi-factor authentication (TOTP) is set up for this user. Only populated on `me`. */
143
- mfaEnabled: Scalars["Boolean"]["output"];
144
- /** When MFA was last used to authenticate. Only populated on `me`. */
145
- mfaLastUsedAt?: Maybe<Scalars["DateTime"]["output"]>;
146
- profilePictureUrl?: Maybe<Scalars["String"]["output"]>;
273
+ name: Scalars["String"]["output"];
274
+ organizationId: Scalars["ID"]["output"];
275
+ /** The linking state of the directory. */
276
+ state: Scalars["String"]["output"];
277
+ /** The provider type of the directory. */
278
+ type: Scalars["String"]["output"];
147
279
  updatedAt: Scalars["DateTime"]["output"];
148
280
  };
149
- /** An organization the authenticated user belongs to, with a flag indicating whether it is the token's current organization. */
150
- type ClientApi_UserOrganization = {
151
- __typename?: "ClientApi_UserOrganization";
281
+ /** A group provisioned through a Directory Sync connection. */
282
+ type DirectoryGroup = {
283
+ __typename?: "DirectoryGroup";
284
+ createdAt: Scalars["DateTime"]["output"];
285
+ directoryId: Scalars["ID"]["output"];
152
286
  id: Scalars["ID"]["output"];
153
- /** Whether this is the organization the token is currently scoped to. */
154
- isCurrent: Scalars["Boolean"]["output"];
287
+ /** The identifier of the group in the identity provider. */
288
+ idpId: Scalars["String"]["output"];
155
289
  name: Scalars["String"]["output"];
290
+ organizationId: Scalars["ID"]["output"];
291
+ updatedAt: Scalars["DateTime"]["output"];
156
292
  };
157
- /** Input for confirming an email change with the verification code. */
158
- type ConfirmEmailChangeInput = {
159
- /** The verification code sent to the new email address. */
160
- code: Scalars["String"]["input"];
161
- /** The elevated access token from a successful `verifyCurrentEmail` call. */
162
- elevatedAccessToken: Scalars["String"]["input"];
293
+ type DirectoryGroupList = {
294
+ __typename?: "DirectoryGroupList";
295
+ data: Array<DirectoryGroup>;
296
+ listMetadata: ListMetadata;
163
297
  };
164
- type ConfirmEmailChangeResult = EmailChangeCodeExpired | EmailChangeCodeIncorrect | EmailChangeCodePreviouslyUsed | EmailChangeConfirmed | EmailChangeTooManyAttempts | EmailManagedByProvider | EmailNotAvailable | IdentityVerificationExpired | IdentityVerificationInvalid | InvalidEmail | NoPendingEmailChange;
165
- /** Input for setting a password on an account that does not yet have one (e.g. signed up via OAuth). */
166
- type CreatePasswordInput = {
167
- /** The password to set. Must satisfy the environment password policy. */
168
- password: Scalars["String"]["input"];
298
+ type DirectoryList = {
299
+ __typename?: "DirectoryList";
300
+ data: Array<Directory>;
301
+ listMetadata: ListMetadata;
169
302
  };
170
- type CreatePasswordResult = PasswordCreated | PasswordPolicyViolation | UserAlreadyHasPassword;
171
- /** The current email was verified successfully. */
172
- type CurrentEmailVerified = {
173
- __typename?: "CurrentEmailVerified";
174
- /** The elevated access token to pass to `sendEmailChange` and `confirmEmailChange`. */
175
- elevatedAccessToken: Scalars["String"]["output"];
176
- /** When the elevated access token expires (ISO 8601). */
177
- expiresAt: Scalars["String"]["output"];
303
+ /** A user provisioned through a Directory Sync connection. */
304
+ type DirectoryUser = {
305
+ __typename?: "DirectoryUser";
306
+ createdAt: Scalars["DateTime"]["output"];
307
+ directoryId: Scalars["ID"]["output"];
308
+ email?: Maybe<Scalars["String"]["output"]>;
309
+ firstName?: Maybe<Scalars["String"]["output"]>;
310
+ id: Scalars["ID"]["output"];
311
+ /** The identifier of the user in the identity provider. */
312
+ idpId: Scalars["String"]["output"];
313
+ lastName?: Maybe<Scalars["String"]["output"]>;
314
+ organizationId: Scalars["ID"]["output"];
315
+ /** The provisioning state of the directory user. */
316
+ state: Scalars["String"]["output"];
317
+ updatedAt: Scalars["DateTime"]["output"];
318
+ username?: Maybe<Scalars["String"]["output"]>;
178
319
  };
179
- /** Daily verification email quota exceeded. */
180
- type DailyEmailQuotaExceeded = {
181
- __typename?: "DailyEmailQuotaExceeded";
320
+ type DirectoryUserList = {
321
+ __typename?: "DirectoryUserList";
322
+ data: Array<DirectoryUser>;
323
+ listMetadata: ListMetadata;
324
+ };
325
+ /** The DNS name server provider detected for a domain. */
326
+ type DomainVerificationNameServer = "AwsRoute53" | "CloudFlare" | "GoDaddy" | "GoogleDomains" | "Other";
327
+ /** The elevated access token has expired. The user must re-verify their identity. */
328
+ type ElevatedAccessTokenExpired = {
329
+ __typename?: "ElevatedAccessTokenExpired";
330
+ message: Scalars["String"]["output"];
331
+ };
332
+ /** The elevated access token is invalid. */
333
+ type ElevatedAccessTokenInvalid = {
334
+ __typename?: "ElevatedAccessTokenInvalid";
182
335
  message: Scalars["String"]["output"];
183
336
  };
184
337
  /** The verification code has expired. */
@@ -203,7 +356,7 @@ type EmailChangeConfirmed = {
203
356
  elevatedAccessToken: Scalars["String"]["output"];
204
357
  /** When the elevated access token expires (ISO 8601). */
205
358
  expiresAt: Scalars["String"]["output"];
206
- user: ClientApi_User;
359
+ user: User;
207
360
  };
208
361
  /** Email change is not available for this account. */
209
362
  type EmailChangeNotAvailable = {
@@ -231,7 +384,12 @@ type EmailNotAvailable = {
231
384
  __typename?: "EmailNotAvailable";
232
385
  message: Scalars["String"]["output"];
233
386
  };
234
- type EnrollTotpResult = TotpAlreadyEnrolled | TotpFactor;
387
+ /** Input for enrolling a new TOTP factor. */
388
+ type EnrollTotpInput = {
389
+ /** An elevated access token obtained by verifying the current email address. Required to prove recent re-authentication. */
390
+ elevatedAccessToken: Scalars["String"]["input"];
391
+ };
392
+ type EnrollTotpResult = ElevatedAccessTokenExpired | ElevatedAccessTokenInvalid | TotpAlreadyEnrolled | TotpFactor;
235
393
  /** The identity verification has expired. Please verify your current email again. */
236
394
  type IdentityVerificationExpired = {
237
395
  __typename?: "IdentityVerificationExpired";
@@ -247,6 +405,10 @@ type IncorrectPassword = {
247
405
  __typename?: "IncorrectPassword";
248
406
  _placeholder: Scalars["Boolean"]["output"];
249
407
  };
408
+ type InvalidAuditLogExportDateRange = {
409
+ __typename?: "InvalidAuditLogExportDateRange";
410
+ message: Scalars["String"]["output"];
411
+ };
250
412
  /** The provided email address is invalid. */
251
413
  type InvalidEmail = {
252
414
  __typename?: "InvalidEmail";
@@ -301,7 +463,7 @@ type InviteUserInput = {
301
463
  /** Slug of the role to grant on acceptance. Defaults to the organization default role when omitted. */
302
464
  roleSlug?: InputMaybe<Scalars["String"]["input"]>;
303
465
  };
304
- type InviteUserResult = InvalidInvitationExpiry | InvalidInviteeEmail | InvalidInviteeRole | InviteeAlreadyInvited | InviteeAlreadyMember | UserInvited;
466
+ type InviteUserResult = InvalidInvitationExpiry | InvalidInviteeEmail | InvalidInviteeRole | InviteeAlreadyInvited | InviteeAlreadyMember | InviteeEmailNotDeliverable | OrganizationBlockedFromSendingInvites | UserInvited;
305
467
  /** The user has already accepted their invitation and is an active member. */
306
468
  type InviteeAlreadyAccepted = {
307
469
  __typename?: "InviteeAlreadyAccepted";
@@ -317,6 +479,11 @@ type InviteeAlreadyMember = {
317
479
  __typename?: "InviteeAlreadyMember";
318
480
  email: Scalars["String"]["output"];
319
481
  };
482
+ /** The invitee's email domain has no mail servers, so the invitation email cannot be delivered. */
483
+ type InviteeEmailNotDeliverable = {
484
+ __typename?: "InviteeEmailNotDeliverable";
485
+ email: Scalars["String"]["output"];
486
+ };
320
487
  type ListMetadata = {
321
488
  __typename?: "ListMetadata";
322
489
  after?: Maybe<Scalars["String"]["output"]>;
@@ -352,10 +519,25 @@ type MfaFactorRemoved = {
352
519
  };
353
520
  type Mutation = {
354
521
  __typename?: "Mutation";
522
+ /** Grant a permission to a role belonging to the organization the token was issued for. */
523
+ assignPermissionToRole: Role;
355
524
  /** Confirms an email change using the verification code sent to the new email address. Requires an elevated access token from `verifyCurrentEmail`. */
356
525
  confirmEmailChange: ConfirmEmailChangeResult;
526
+ createAuditLogExport: CreateAuditLogExportResult;
527
+ /** Add a domain to the token's organization and begin DNS verification. */
528
+ createOrganizationDomain: OrganizationDomain;
357
529
  /** Set a password for the authenticated user who does not yet have one (e.g. signed up via OAuth). Validates against the environment password policy. */
358
530
  createPassword: CreatePasswordResult;
531
+ /** Create a role for the organization the token was issued for. */
532
+ createRole: Role;
533
+ /** Create an SSO connection for the token’s organization. */
534
+ createSsoConnection: Connection;
535
+ /** Delete a domain belonging to the token's organization and return it. */
536
+ deleteOrganizationDomain: OrganizationDomain;
537
+ /** Delete a role belonging to the organization the token was issued for. */
538
+ deleteRole: RoleDeleted;
539
+ /** Delete an SSO connection belonging to the token’s organization. */
540
+ deleteSsoConnection: Scalars["ID"]["output"];
359
541
  /** Create a TOTP factor and return the secret and QR URI for the user to scan. This is step 1 of TOTP enrollment. */
360
542
  enrollTotp: EnrollTotpResult;
361
543
  /** Invite a user to the organization the token was issued for, assigning a role and sending the invitation email. */
@@ -366,8 +548,14 @@ type Mutation = {
366
548
  removeMfaFactor: RemoveMfaFactorResult;
367
549
  /** Resend a pending, expired, or revoked invitation for the organization the token was issued for. If the original invitation has expired or been revoked, a new invitation is created with the same role. */
368
550
  resendInvitation: ResendInvitationResult;
551
+ /** Restart verification for a domain belonging to the token's organization. */
552
+ reverifyOrganizationDomain: OrganizationDomain;
553
+ /** Revokes all active sessions for the authenticated user except the current one. */
554
+ revokeAllSessions: RevokeAllSessionsResult;
369
555
  /** Revoke a pending invitation for the organization the token was issued for. */
370
556
  revokeInvitation: RevokeInvitationResult;
557
+ /** Revokes a specific session by ID. */
558
+ revokeSession: RevokeSessionResult;
371
559
  /** Sends a verification code to the new email address. Requires an elevated access token from `verifyCurrentEmail`. The user must confirm with the code via `confirmEmailChange`. */
372
560
  sendEmailChange: SendEmailChangeResult;
373
561
  /** Sends a verification code to the user's current email address to prove ownership before changing email. */
@@ -378,29 +566,69 @@ type Mutation = {
378
566
  updatePassword: UpdatePasswordResult;
379
567
  /** Updates the authenticated user's profile (first name, last name, locale). */
380
568
  updateProfile: UpdateProfileResult;
569
+ /** Update a role belonging to the organization the token was issued for. */
570
+ updateRole: Role;
571
+ /** Update an SSO connection belonging to the token’s organization. */
572
+ updateSsoConnection: Connection;
381
573
  /** Verifies the code sent to the current email address. Returns an elevated access token required for `sendEmailChange` and `confirmEmailChange`. */
382
574
  verifyCurrentEmail: VerifyCurrentEmailResult;
383
575
  /** Confirm TOTP enrollment by verifying a code from the authenticator app. Marks the factor as verified. */
384
576
  verifyTotp: VerifyTotpResult;
385
577
  };
578
+ type MutationAssignPermissionToRoleArgs = {
579
+ input: AssignPermissionToRoleInput;
580
+ };
386
581
  type MutationConfirmEmailChangeArgs = {
387
582
  input: ConfirmEmailChangeInput;
388
583
  };
584
+ type MutationCreateAuditLogExportArgs = {
585
+ input: CreateAuditLogExportInput;
586
+ };
587
+ type MutationCreateOrganizationDomainArgs = {
588
+ domain: Scalars["String"]["input"];
589
+ };
389
590
  type MutationCreatePasswordArgs = {
390
591
  input: CreatePasswordInput;
391
592
  };
593
+ type MutationCreateRoleArgs = {
594
+ input: CreateRoleInput;
595
+ };
596
+ type MutationCreateSsoConnectionArgs = {
597
+ input: ClientApi_CreateSsoConnectionInput;
598
+ };
599
+ type MutationDeleteOrganizationDomainArgs = {
600
+ id: Scalars["ID"]["input"];
601
+ };
602
+ type MutationDeleteRoleArgs = {
603
+ input: DeleteRoleInput;
604
+ };
605
+ type MutationDeleteSsoConnectionArgs = {
606
+ id: Scalars["ID"]["input"];
607
+ };
608
+ type MutationEnrollTotpArgs = {
609
+ input: EnrollTotpInput;
610
+ };
392
611
  type MutationInviteUserArgs = {
393
612
  input: InviteUserInput;
394
613
  };
395
614
  type MutationRemoveMemberArgs = {
396
615
  input: RemoveMemberInput;
397
616
  };
617
+ type MutationRemoveMfaFactorArgs = {
618
+ input: RemoveMfaFactorInput;
619
+ };
398
620
  type MutationResendInvitationArgs = {
399
621
  input: ResendInvitationInput;
400
622
  };
623
+ type MutationReverifyOrganizationDomainArgs = {
624
+ id: Scalars["ID"]["input"];
625
+ };
401
626
  type MutationRevokeInvitationArgs = {
402
627
  input: RevokeInvitationInput;
403
628
  };
629
+ type MutationRevokeSessionArgs = {
630
+ input: RevokeSessionInput;
631
+ };
404
632
  type MutationSendEmailChangeArgs = {
405
633
  input: SendEmailChangeInput;
406
634
  };
@@ -413,12 +641,22 @@ type MutationUpdatePasswordArgs = {
413
641
  type MutationUpdateProfileArgs = {
414
642
  input: UpdateProfileInput;
415
643
  };
644
+ type MutationUpdateRoleArgs = {
645
+ input: UpdateRoleInput;
646
+ };
647
+ type MutationUpdateSsoConnectionArgs = {
648
+ input: ClientApi_UpdateSsoConnectionInput;
649
+ };
416
650
  type MutationVerifyCurrentEmailArgs = {
417
651
  input: VerifyCurrentEmailInput;
418
652
  };
419
653
  type MutationVerifyTotpArgs = {
420
654
  input: VerifyTotpInput;
421
655
  };
656
+ type NoAuditEventsFound = {
657
+ __typename?: "NoAuditEventsFound";
658
+ message: Scalars["String"]["output"];
659
+ };
422
660
  /** The user has no TOTP factors to remove. */
423
661
  type NoMfaFactorsEnrolled = {
424
662
  __typename?: "NoMfaFactorsEnrolled";
@@ -429,6 +667,44 @@ type NoPendingEmailChange = {
429
667
  __typename?: "NoPendingEmailChange";
430
668
  message: Scalars["String"]["output"];
431
669
  };
670
+ /** OAuth provider for a connected account. */
671
+ type OAuthProvider = "AppleOAuth" | "BitbucketOAuth" | "DiscordOAuth" | "GitLabOAuth" | "GithubOAuth" | "GoogleOAuth" | "GrokOAuth" | "IntuitOAuth" | "LinkedInOAuth" | "MicrosoftOAuth" | "SalesforceOAuth" | "SlackOAuth" | "VercelMarketplaceOAuth" | "VercelOAuth" | "XOAuth" | "XeroOAuth";
672
+ /** An organization in the current environment. */
673
+ type Organization = {
674
+ __typename?: "Organization";
675
+ /** Whether the organization allows profiles outside the organization domains. */
676
+ allowProfilesOutsideOrganization: Scalars["Boolean"]["output"];
677
+ createdAt: Scalars["DateTime"]["output"];
678
+ id: Scalars["ID"]["output"];
679
+ name: Scalars["String"]["output"];
680
+ updatedAt: Scalars["DateTime"]["output"];
681
+ };
682
+ /** This organization is not allowed to send invites. */
683
+ type OrganizationBlockedFromSendingInvites = {
684
+ __typename?: "OrganizationBlockedFromSendingInvites";
685
+ /** Placeholder field to allow an empty @ObjectType. */
686
+ _placeholder?: Maybe<Scalars["Boolean"]["output"]>;
687
+ };
688
+ /** A domain belonging to the organization the token was issued for. */
689
+ type OrganizationDomain = {
690
+ __typename?: "OrganizationDomain";
691
+ createdAt: Scalars["DateTime"]["output"];
692
+ /** The fully qualified domain name. */
693
+ domain: Scalars["String"]["output"];
694
+ id: Scalars["ID"]["output"];
695
+ /** The DNS name server provider detected for the domain. */
696
+ nameServer: DomainVerificationNameServer;
697
+ organizationId: Scalars["ID"]["output"];
698
+ state: OrganizationDomainState;
699
+ /** The subdomain portion of the domain, if any. */
700
+ subdomain?: Maybe<Scalars["String"]["output"]>;
701
+ /** The DNS record prefix the customer must add to verify the domain. */
702
+ verificationPrefix?: Maybe<Scalars["String"]["output"]>;
703
+ /** The DNS record value the customer must add to verify the domain. */
704
+ verificationToken?: Maybe<Scalars["String"]["output"]>;
705
+ };
706
+ /** The verification state of an organization domain. */
707
+ type OrganizationDomainState = "Failed" | "LegacyVerified" | "Pending" | "Verified";
432
708
  /** An invitation to join the organization the token was issued for. */
433
709
  type OrganizationInvitation = {
434
710
  __typename?: "OrganizationInvitation";
@@ -475,49 +751,201 @@ type OrganizationMemberRole = {
475
751
  type OrganizationMemberStatus = "Active" | "InviteExpired" | "InviteRevoked" | "Invited" | "NoInvite";
476
752
  /** Enum represents the pagination order. */
477
753
  type PaginationOrder = "Asc" | "Desc" | "Normal";
754
+ /** A registered passkey (WebAuthn credential) for the authenticated user. */
755
+ type Passkey = {
756
+ __typename?: "Passkey";
757
+ createdAt: Scalars["DateTime"]["output"];
758
+ id: Scalars["ID"]["output"];
759
+ /** When this passkey was last used to authenticate. */
760
+ lastVerifiedAt?: Maybe<Scalars["DateTime"]["output"]>;
761
+ updatedAt: Scalars["DateTime"]["output"];
762
+ };
763
+ /** The types of characters in a password. */
764
+ type PasswordCharacterType = "Lowercase" | "Number" | "Symbol" | "Uppercase";
478
765
  /** The password was created successfully. */
479
766
  type PasswordCreated = {
480
767
  __typename?: "PasswordCreated";
481
768
  success: Scalars["Boolean"]["output"];
482
769
  };
770
+ /** The password requirements configured for the environment. Use these to describe the requirements before a password is submitted; `createPassword` and `updatePassword` enforce them. */
771
+ type PasswordPolicy = {
772
+ __typename?: "PasswordPolicy";
773
+ /** The minimum number of characters. */
774
+ minimumLength: Scalars["Int"]["output"];
775
+ /** The minimum zxcvbn strength score (0–4) a password must reach. */
776
+ minimumStrength: Scalars["Int"]["output"];
777
+ /** Whether passwords found in known data breaches are rejected. */
778
+ rejectsBreachedPasswords: Scalars["Boolean"]["output"];
779
+ /** Whether a lowercase letter is required. */
780
+ requiresLowercase: Scalars["Boolean"]["output"];
781
+ /** Whether a number is required. */
782
+ requiresNumber: Scalars["Boolean"]["output"];
783
+ /** Whether a special character is required. */
784
+ requiresSymbol: Scalars["Boolean"]["output"];
785
+ /** Whether an uppercase letter is required. */
786
+ requiresUppercase: Scalars["Boolean"]["output"];
787
+ };
483
788
  /** The provided password does not meet the environment password policy requirements. */
484
789
  type PasswordPolicyViolation = {
485
790
  __typename?: "PasswordPolicyViolation";
486
- /** A machine-readable error code. */
791
+ /** A machine-readable error code. Matches the `code` of the first entry in `violations`. */
487
792
  code: Scalars["String"]["output"];
488
- /** A human-readable description of the policy violation. */
793
+ /** A human-readable description of the policy violation. Describes the first entry in `violations`. */
489
794
  message: Scalars["String"]["output"];
795
+ /** Every way in which the password failed the policy, so all of them can be surfaced at once. */
796
+ violations: Array<PasswordViolation>;
490
797
  };
491
798
  /** The password was updated successfully. */
492
799
  type PasswordUpdated = {
493
800
  __typename?: "PasswordUpdated";
494
801
  success: Scalars["Boolean"]["output"];
495
802
  };
803
+ /** A single way in which a password failed the environment password policy. Fields other than `code` and `message` are only populated for the codes that carry them. */
804
+ type PasswordViolation = {
805
+ __typename?: "PasswordViolation";
806
+ /** For a missing `Symbol` character type, the symbols that satisfy the requirement. */
807
+ allowedSymbols?: Maybe<Scalars["String"]["output"]>;
808
+ /** For `password_pwned`, how many times the password appears in known data breaches. */
809
+ breachOccurrences?: Maybe<Scalars["Int"]["output"]>;
810
+ /** For `password_missing_character_type`, the class of character that is missing. */
811
+ characterType?: Maybe<PasswordCharacterType>;
812
+ /** A machine-readable error code, e.g. `password_too_short`, `password_missing_character_type`, `password_pwned`, `password_reused`, `password_too_weak`, `password_contains_email`, `password_too_long`. */
813
+ code: Scalars["String"]["output"];
814
+ /** For `password_too_long`, the allowed maximum length. */
815
+ maximumLength?: Maybe<Scalars["Int"]["output"]>;
816
+ /** A human-readable description of this violation. */
817
+ message: Scalars["String"]["output"];
818
+ /** For `password_too_short`, the required minimum length. */
819
+ minimumLength?: Maybe<Scalars["Int"]["output"]>;
820
+ /** For `password_too_weak`, suggestions for choosing a stronger password. Empty for other codes. */
821
+ strengthSuggestions: Array<Scalars["String"]["output"]>;
822
+ /** For `password_too_weak`, a summary of why it is weak. */
823
+ strengthWarning?: Maybe<Scalars["String"]["output"]>;
824
+ };
825
+ /** A permission that can be granted to a role within the environment. */
826
+ type Permission = {
827
+ __typename?: "Permission";
828
+ createdAt: Scalars["DateTime"]["output"];
829
+ description?: Maybe<Scalars["String"]["output"]>;
830
+ id: Scalars["ID"]["output"];
831
+ name: Scalars["String"]["output"];
832
+ slug: Scalars["String"]["output"];
833
+ /** Whether this is a WorkOS-managed system permission that cannot be modified. */
834
+ system: Scalars["Boolean"]["output"];
835
+ updatedAt: Scalars["DateTime"]["output"];
836
+ };
496
837
  /** The profile was updated successfully. */
497
838
  type ProfileUpdated = {
498
839
  __typename?: "ProfileUpdated";
499
- user: ClientApi_User;
840
+ user: User;
500
841
  };
501
842
  type Query = {
502
843
  __typename?: "Query";
844
+ auditEvent: AuditEvent;
845
+ auditEvents: AuditEventList;
846
+ /** The authentication methods the environment allows and the password policy it enforces. Requires a session token. */
847
+ authenticationSettings: AuthenticationSettings;
503
848
  /** Placeholder query for the Client GraphQL API scaffold. Returns a static value and is replaced by real resolvers. */
504
849
  clientApiStatus: Scalars["String"]["output"];
850
+ /** Return a data provider by ID within the token's environment. */
851
+ dataProvider: DataProvider;
852
+ /** Return one of the authenticated user's data provider connections by ID. */
853
+ dataProviderConnection: DataProviderConnection;
854
+ /** List the authenticated user's data provider connections, including their status. */
855
+ dataProviderConnections: DataProviderConnectionList;
856
+ /** List the data providers configured in the token's environment. */
857
+ dataProviders: DataProviderList;
858
+ /** Return a Directory Sync connection by ID within the token's organization. */
859
+ directoryConnection: Directory;
860
+ /** List the Directory Sync connections for the token's organization. */
861
+ directoryConnections: DirectoryList;
862
+ /** List the groups of a Directory Sync connection. */
863
+ directoryGroups: DirectoryGroupList;
864
+ /** List the users of a Directory Sync connection. */
865
+ directoryUsers: DirectoryUserList;
866
+ /** The permissions a user effectively has in the organization the token was issued for, including permissions inherited through the user's roles. Callers may read their own effective permissions; reading another member's requires the elevated user:read grant. */
867
+ effectivePermissions: Array<Permission>;
505
868
  /** Returns the currently authenticated user (the subject of the token). */
506
- me: ClientApi_User;
869
+ me: User;
507
870
  /** Returns an organization by ID within the token's environment. */
508
- organization: ClientApi_Organization;
871
+ organization: Organization;
872
+ /** List the domains belonging to the organization the token was issued for. */
873
+ organizationDomains: Array<OrganizationDomain>;
509
874
  /** List members of the organization the token was issued for, with their roles. */
510
875
  organizationMemberships: OrganizationMemberList;
511
876
  /** List organizations the authenticated user belongs to. */
512
- organizations: Array<ClientApi_UserOrganization>;
877
+ organizations: Array<UserOrganization>;
513
878
  /** List registered passkeys for the authenticated user. Requires a session token. */
514
- passkeys: Array<ClientApi_Passkey>;
879
+ passkeys: Array<Passkey>;
880
+ /** List the permissions defined in the environment the token was issued for. */
881
+ permissions: Array<Permission>;
882
+ /** Fetch a single role available to the organization the token was issued for. */
883
+ role?: Maybe<Role>;
515
884
  /** List roles available to the organization the token was issued for, with role assignment configuration. */
516
- roles: ClientApi_RolesResult;
885
+ roles: RolesResult;
517
886
  /** List active sessions for the authenticated user. Requires a session token. */
518
- sessions: Array<ClientApi_Session>;
887
+ sessions: Array<Session>;
888
+ /** Returns an SSO connection by ID, including its IdP setup status, provided it belongs to the token's organization. */
889
+ ssoConnection: Connection;
890
+ /** List the SSO connections belonging to the organization the token was issued for. */
891
+ ssoConnections: Array<Connection>;
519
892
  /** Returns a user by ID, provided they are a member of the token's organization. */
520
- user: ClientApi_User;
893
+ user: User;
894
+ };
895
+ type QueryAuditEventArgs = {
896
+ id: Scalars["ID"]["input"];
897
+ };
898
+ type QueryAuditEventsArgs = {
899
+ after?: InputMaybe<Scalars["String"]["input"]>;
900
+ before?: InputMaybe<Scalars["String"]["input"]>;
901
+ filter: AuditEventFilterInput;
902
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
903
+ order?: InputMaybe<PaginationOrder>;
904
+ };
905
+ type QueryDataProviderArgs = {
906
+ id: Scalars["ID"]["input"];
907
+ };
908
+ type QueryDataProviderConnectionArgs = {
909
+ id: Scalars["ID"]["input"];
910
+ };
911
+ type QueryDataProviderConnectionsArgs = {
912
+ after?: InputMaybe<Scalars["String"]["input"]>;
913
+ before?: InputMaybe<Scalars["String"]["input"]>;
914
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
915
+ order?: InputMaybe<PaginationOrder>;
916
+ };
917
+ type QueryDataProvidersArgs = {
918
+ after?: InputMaybe<Scalars["String"]["input"]>;
919
+ before?: InputMaybe<Scalars["String"]["input"]>;
920
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
921
+ order?: InputMaybe<PaginationOrder>;
922
+ };
923
+ type QueryDirectoryConnectionArgs = {
924
+ id: Scalars["ID"]["input"];
925
+ };
926
+ type QueryDirectoryConnectionsArgs = {
927
+ after?: InputMaybe<Scalars["String"]["input"]>;
928
+ before?: InputMaybe<Scalars["String"]["input"]>;
929
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
930
+ order?: InputMaybe<PaginationOrder>;
931
+ search?: InputMaybe<Scalars["String"]["input"]>;
932
+ };
933
+ type QueryDirectoryGroupsArgs = {
934
+ after?: InputMaybe<Scalars["String"]["input"]>;
935
+ before?: InputMaybe<Scalars["String"]["input"]>;
936
+ directoryId: Scalars["ID"]["input"];
937
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
938
+ order?: InputMaybe<PaginationOrder>;
939
+ };
940
+ type QueryDirectoryUsersArgs = {
941
+ after?: InputMaybe<Scalars["String"]["input"]>;
942
+ before?: InputMaybe<Scalars["String"]["input"]>;
943
+ directoryId: Scalars["ID"]["input"];
944
+ limit?: InputMaybe<Scalars["Int"]["input"]>;
945
+ order?: InputMaybe<PaginationOrder>;
946
+ };
947
+ type QueryEffectivePermissionsArgs = {
948
+ userId: Scalars["ID"]["input"];
521
949
  };
522
950
  type QueryOrganizationArgs = {
523
951
  id: Scalars["ID"]["input"];
@@ -530,6 +958,12 @@ type QueryOrganizationMembershipsArgs = {
530
958
  roleSlug?: InputMaybe<Scalars["String"]["input"]>;
531
959
  search?: InputMaybe<Scalars["String"]["input"]>;
532
960
  };
961
+ type QueryRoleArgs = {
962
+ id: Scalars["ID"]["input"];
963
+ };
964
+ type QuerySsoConnectionArgs = {
965
+ id: Scalars["ID"]["input"];
966
+ };
533
967
  type QueryUserArgs = {
534
968
  id: Scalars["ID"]["input"];
535
969
  };
@@ -538,7 +972,12 @@ type RemoveMemberInput = {
538
972
  userId: Scalars["ID"]["input"];
539
973
  };
540
974
  type RemoveMemberResult = MemberIsManagedByDirectory | MemberNotFound | MemberRemoved;
541
- type RemoveMfaFactorResult = MfaFactorRemoved | NoMfaFactorsEnrolled;
975
+ /** Input for removing all TOTP factors. */
976
+ type RemoveMfaFactorInput = {
977
+ /** An elevated access token obtained by verifying the current email address. Required to prove recent re-authentication. */
978
+ elevatedAccessToken: Scalars["String"]["input"];
979
+ };
980
+ type RemoveMfaFactorResult = ElevatedAccessTokenExpired | ElevatedAccessTokenInvalid | MfaFactorRemoved | NoMfaFactorsEnrolled;
542
981
  type ResendInvitationInput = {
543
982
  /** The ID of the user whose invitation should be resent. */
544
983
  userId: Scalars["ID"]["input"];
@@ -548,18 +987,50 @@ type ResendInvitationNotFound = {
548
987
  __typename?: "ResendInvitationNotFound";
549
988
  userId: Scalars["ID"]["output"];
550
989
  };
551
- type ResendInvitationResult = InvitationResent | InviteeAlreadyAccepted | ResendInvitationNotFound;
990
+ type ResendInvitationResult = InvitationResent | InviteeAlreadyAccepted | InviteeEmailNotDeliverable | ResendInvitationNotFound;
991
+ type RevokeAllSessionsResult = AllSessionsRevoked;
552
992
  type RevokeInvitationInput = {
553
993
  /** The ID of the user whose pending invitation should be revoked. */
554
994
  userId: Scalars["ID"]["input"];
555
995
  };
556
996
  type RevokeInvitationResult = InvitationNotFound | InvitationNotPending | InvitationRevoked;
997
+ /** Input for revoking a specific session. */
998
+ type RevokeSessionInput = {
999
+ /** The ID of the session to revoke. */
1000
+ sessionId: Scalars["ID"]["input"];
1001
+ };
1002
+ type RevokeSessionResult = SessionNotFound | SessionRevoked;
1003
+ /** A role available within the organization. */
1004
+ type Role = {
1005
+ __typename?: "Role";
1006
+ createdAt: Scalars["DateTime"]["output"];
1007
+ description?: Maybe<Scalars["String"]["output"]>;
1008
+ id: Scalars["ID"]["output"];
1009
+ /** Whether this is the default role assigned to new members. */
1010
+ isDefault: Scalars["Boolean"]["output"];
1011
+ name: Scalars["String"]["output"];
1012
+ slug: Scalars["String"]["output"];
1013
+ updatedAt: Scalars["DateTime"]["output"];
1014
+ };
1015
+ /** Confirms that a role has been scheduled for deletion. */
1016
+ type RoleDeleted = {
1017
+ __typename?: "RoleDeleted";
1018
+ /** The ID of the deleted role. */
1019
+ id: Scalars["ID"]["output"];
1020
+ };
557
1021
  /** No active roles with the given slugs exist in the environment. */
558
1022
  type RoleNotFound = {
559
1023
  __typename?: "RoleNotFound";
560
1024
  /** The role slugs that did not resolve to active roles. */
561
1025
  roleSlugs: Array<Scalars["String"]["output"]>;
562
1026
  };
1027
+ /** Roles available in the organization along with role assignment configuration. */
1028
+ type RolesResult = {
1029
+ __typename?: "RolesResult";
1030
+ /** Whether members can be assigned multiple roles simultaneously. */
1031
+ multipleRolesEnabled: Scalars["Boolean"]["output"];
1032
+ roles: Array<Role>;
1033
+ };
563
1034
  /** Input for requesting an email change verification code. */
564
1035
  type SendEmailChangeInput = {
565
1036
  /** The elevated access token from a successful `verifyCurrentEmail` call. */
@@ -569,6 +1040,45 @@ type SendEmailChangeInput = {
569
1040
  };
570
1041
  type SendEmailChangeResult = DailyEmailQuotaExceeded | EmailChangeNotAvailable | EmailChangeSent | EmailManagedByProvider | EmailNotAvailable | IdentityVerificationExpired | IdentityVerificationInvalid | InvalidEmail;
571
1042
  type SendVerificationCodeResult = DailyEmailQuotaExceeded | VerificationCodeSent;
1043
+ /** An active user session. */
1044
+ type Session = {
1045
+ __typename?: "Session";
1046
+ createdAt: Scalars["DateTime"]["output"];
1047
+ currentLocation?: Maybe<SessionLocation>;
1048
+ id: Scalars["ID"]["output"];
1049
+ ipAddress?: Maybe<Scalars["String"]["output"]>;
1050
+ /** Whether this session is the one making the request. */
1051
+ isCurrent: Scalars["Boolean"]["output"];
1052
+ lastActivityAt?: Maybe<Scalars["DateTime"]["output"]>;
1053
+ organizationId?: Maybe<Scalars["String"]["output"]>;
1054
+ state: SessionState;
1055
+ updatedAt: Scalars["DateTime"]["output"];
1056
+ userAgent?: Maybe<Scalars["String"]["output"]>;
1057
+ };
1058
+ /** Approximate geographic location derived from the session IP. */
1059
+ type SessionLocation = {
1060
+ __typename?: "SessionLocation";
1061
+ cityName: Scalars["String"]["output"];
1062
+ countryISOCode: Scalars["String"]["output"];
1063
+ };
1064
+ /** No session was found with the given ID. */
1065
+ type SessionNotFound = {
1066
+ __typename?: "SessionNotFound";
1067
+ /** The session ID that did not resolve to a session. */
1068
+ sessionId: Scalars["ID"]["output"];
1069
+ };
1070
+ /** The session was revoked successfully. */
1071
+ type SessionRevoked = {
1072
+ __typename?: "SessionRevoked";
1073
+ session: Session;
1074
+ };
1075
+ /** The lifecycle state of a session. */
1076
+ type SessionState = {
1077
+ __typename?: "SessionState";
1078
+ expiresAt?: Maybe<Scalars["DateTime"]["output"]>;
1079
+ /** Session state: Issued, Revoked, etc. */
1080
+ tag: Scalars["String"]["output"];
1081
+ };
572
1082
  /** The user already has a verified TOTP factor enrolled. */
573
1083
  type TotpAlreadyEnrolled = {
574
1084
  __typename?: "TotpAlreadyEnrolled";
@@ -623,6 +1133,37 @@ type UpdateProfileInput = {
623
1133
  locale?: InputMaybe<Scalars["String"]["input"]>;
624
1134
  };
625
1135
  type UpdateProfileResult = InvalidLocale | ProfileUpdated;
1136
+ type UpdateRoleInput = {
1137
+ /** Human-readable description of the role. This is a full replace of the role, so an omitted or null description clears it — resupply the current value to preserve it. */
1138
+ description?: InputMaybe<Scalars["String"]["input"]>;
1139
+ /** The ID of the role to update. */
1140
+ id: Scalars["ID"]["input"];
1141
+ /** Human-readable name for the role. */
1142
+ name: Scalars["String"]["input"];
1143
+ /** Slugs of the permissions granted to the role. Replaces the existing set when provided. */
1144
+ permissions?: InputMaybe<Array<Scalars["String"]["input"]>>;
1145
+ };
1146
+ /** A user in the current environment. */
1147
+ type User = {
1148
+ __typename?: "User";
1149
+ connectedAccounts: Array<ConnectedAccount>;
1150
+ createdAt: Scalars["DateTime"]["output"];
1151
+ email: Scalars["String"]["output"];
1152
+ emailVerified: Scalars["Boolean"]["output"];
1153
+ firstName?: Maybe<Scalars["String"]["output"]>;
1154
+ id: Scalars["ID"]["output"];
1155
+ lastName?: Maybe<Scalars["String"]["output"]>;
1156
+ /** Whether multi-factor authentication (TOTP) is set up for this user. Always `false` when the environment has MFA turned off — use `authenticationSettings.mfaEnabled` to tell the two apart. Only populated on `me`. */
1157
+ mfaEnabled: Scalars["Boolean"]["output"];
1158
+ /** When MFA was last used to authenticate. Only populated on `me`. */
1159
+ mfaLastUsedAt?: Maybe<Scalars["DateTime"]["output"]>;
1160
+ /** When a password was last used to authenticate. Only populated on `me`. */
1161
+ passwordLastUsedAt?: Maybe<Scalars["DateTime"]["output"]>;
1162
+ /** Whether this user has a password set. Reflects the user regardless of whether the environment allows password authentication; use `authenticationSettings.passwordAuthEnabled` for that. Only populated on `me`. */
1163
+ passwordSet: Scalars["Boolean"]["output"];
1164
+ profilePictureUrl?: Maybe<Scalars["String"]["output"]>;
1165
+ updatedAt: Scalars["DateTime"]["output"];
1166
+ };
626
1167
  /** The user already has a password set. */
627
1168
  type UserAlreadyHasPassword = {
628
1169
  __typename?: "UserAlreadyHasPassword";
@@ -633,6 +1174,14 @@ type UserInvited = {
633
1174
  __typename?: "UserInvited";
634
1175
  invitation: OrganizationInvitation;
635
1176
  };
1177
+ /** An organization the authenticated user belongs to, with a flag indicating whether it is the token's current organization. */
1178
+ type UserOrganization = {
1179
+ __typename?: "UserOrganization";
1180
+ id: Scalars["ID"]["output"];
1181
+ /** Whether this is the organization the token is currently scoped to. */
1182
+ isCurrent: Scalars["Boolean"]["output"];
1183
+ name: Scalars["String"]["output"];
1184
+ };
636
1185
  /** The verification code has expired. */
637
1186
  type VerificationCodeExpired = {
638
1187
  __typename?: "VerificationCodeExpired";
@@ -675,8 +1224,10 @@ type VerifyTotpInput = {
675
1224
  authenticationChallengeId: Scalars["String"]["input"];
676
1225
  /** The TOTP code from the authenticator app. */
677
1226
  code: Scalars["String"]["input"];
1227
+ /** An elevated access token obtained by verifying the current email address. Required to prove recent re-authentication. */
1228
+ elevatedAccessToken: Scalars["String"]["input"];
678
1229
  };
679
- type VerifyTotpResult = TotpVerificationFailed | TotpVerified;
1230
+ type VerifyTotpResult = ElevatedAccessTokenExpired | ElevatedAccessTokenInvalid | TotpVerificationFailed | TotpVerified;
680
1231
  type ClientApiStatusQueryVariables = Exact<{
681
1232
  [key: string]: never;
682
1233
  }>;
@@ -691,4 +1242,4 @@ declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper)
691
1242
  };
692
1243
  type Sdk = ReturnType<typeof getSdk>;
693
1244
 
694
- export { ClientApiStatusDocument, type ClientApiStatusQuery, type ClientApiStatusQueryVariables, type ClientApi_ConnectedAccount, type ClientApi_OAuthProvider, type ClientApi_Organization, type ClientApi_Passkey, type ClientApi_Role, type ClientApi_RolesResult, type ClientApi_Session, type ClientApi_SessionLocation, type ClientApi_SessionState, type ClientApi_User, type ClientApi_UserOrganization, type ConfirmEmailChangeInput, type ConfirmEmailChangeResult, type CreatePasswordInput, type CreatePasswordResult, type CurrentEmailVerified, type DailyEmailQuotaExceeded, type EmailChangeCodeExpired, type EmailChangeCodeIncorrect, type EmailChangeCodePreviouslyUsed, type EmailChangeConfirmed, type EmailChangeNotAvailable, type EmailChangeSent, type EmailChangeTooManyAttempts, type EmailManagedByProvider, type EmailNotAvailable, type EnrollTotpResult, type Exact, type IdentityVerificationExpired, type IdentityVerificationInvalid, type IncorrectPassword, type Incremental, type InputMaybe, type InvalidEmail, type InvalidInvitationExpiry, type InvalidInviteeEmail, type InvalidInviteeRole, type InvalidLocale, type InvitationNotFound, type InvitationNotPending, type InvitationResent, type InvitationRevoked, type InviteUserInput, type InviteUserResult, type InviteeAlreadyAccepted, type InviteeAlreadyInvited, type InviteeAlreadyMember, type ListMetadata, type MakeEmpty, type MakeMaybe, type MakeOptional, type Maybe, type MemberIsManagedByDirectory, type MemberNotFound, type MemberRemoved, type MemberRoleUpdated, type MfaFactorRemoved, type Mutation, type MutationConfirmEmailChangeArgs, type MutationCreatePasswordArgs, type MutationInviteUserArgs, type MutationRemoveMemberArgs, type MutationResendInvitationArgs, type MutationRevokeInvitationArgs, type MutationSendEmailChangeArgs, type MutationUpdateMemberRoleArgs, type MutationUpdatePasswordArgs, type MutationUpdateProfileArgs, type MutationVerifyCurrentEmailArgs, type MutationVerifyTotpArgs, type NoMfaFactorsEnrolled, type NoPendingEmailChange, type OrganizationInvitation, type OrganizationInvitationStatus, type OrganizationMember, type OrganizationMemberList, type OrganizationMemberRole, type OrganizationMemberStatus, type PaginationOrder, type PasswordCreated, type PasswordPolicyViolation, type PasswordUpdated, type ProfileUpdated, type Query, type QueryOrganizationArgs, type QueryOrganizationMembershipsArgs, type QueryUserArgs, type RemoveMemberInput, type RemoveMemberResult, type RemoveMfaFactorResult, type ResendInvitationInput, type ResendInvitationNotFound, type ResendInvitationResult, type RevokeInvitationInput, type RevokeInvitationResult, type RoleNotFound, type Scalars, type Sdk, type SdkFunctionWrapper, type SendEmailChangeInput, type SendEmailChangeResult, type SendVerificationCodeResult, type TotpAlreadyEnrolled, type TotpFactor, type TotpVerificationFailed, type TotpVerified, type UpdateMemberRoleInput, type UpdateMemberRoleResult, type UpdatePasswordInput, type UpdatePasswordResult, type UpdateProfileInput, type UpdateProfileResult, type UserAlreadyHasPassword, type UserInvited, type VerificationCodeExpired, type VerificationCodeIncorrect, type VerificationCodePreviouslyUsed, type VerificationCodeSent, type VerificationTooManyAttempts, type VerifyCurrentEmailInput, type VerifyCurrentEmailResult, type VerifyTotpInput, type VerifyTotpResult, getSdk };
1245
+ export { type AllSessionsRevoked, type AssignPermissionToRoleInput, type AuditEvent, type AuditEventActor, type AuditEventFilterInput, type AuditEventList, type AuditLogExport, type AuditLogExportState, type AuthenticationSettings, ClientApiStatusDocument, type ClientApiStatusQuery, type ClientApiStatusQueryVariables, type ClientApi_CreateSsoConnectionInput, type ClientApi_UpdateSsoConnectionInput, type ConfirmEmailChangeInput, type ConfirmEmailChangeResult, type ConnectedAccount, type Connection, type ConnectionState, type ConnectionType, type CreateAuditLogExportInput, type CreateAuditLogExportResult, type CreatePasswordInput, type CreatePasswordResult, type CreateRoleInput, type CurrentEmailVerified, type DailyEmailQuotaExceeded, type DataProvider, type DataProviderConnection, type DataProviderConnectionList, type DataProviderList, type DeleteRoleInput, type Directory, type DirectoryGroup, type DirectoryGroupList, type DirectoryList, type DirectoryUser, type DirectoryUserList, type DomainVerificationNameServer, type ElevatedAccessTokenExpired, type ElevatedAccessTokenInvalid, type EmailChangeCodeExpired, type EmailChangeCodeIncorrect, type EmailChangeCodePreviouslyUsed, type EmailChangeConfirmed, type EmailChangeNotAvailable, type EmailChangeSent, type EmailChangeTooManyAttempts, type EmailManagedByProvider, type EmailNotAvailable, type EnrollTotpInput, type EnrollTotpResult, type Exact, type IdentityVerificationExpired, type IdentityVerificationInvalid, type IncorrectPassword, type Incremental, type InputMaybe, type InvalidAuditLogExportDateRange, type InvalidEmail, type InvalidInvitationExpiry, type InvalidInviteeEmail, type InvalidInviteeRole, type InvalidLocale, type InvitationNotFound, type InvitationNotPending, type InvitationResent, type InvitationRevoked, type InviteUserInput, type InviteUserResult, type InviteeAlreadyAccepted, type InviteeAlreadyInvited, type InviteeAlreadyMember, type InviteeEmailNotDeliverable, type ListMetadata, type MakeEmpty, type MakeMaybe, type MakeOptional, type Maybe, type MemberIsManagedByDirectory, type MemberNotFound, type MemberRemoved, type MemberRoleUpdated, type MfaFactorRemoved, type Mutation, type MutationAssignPermissionToRoleArgs, type MutationConfirmEmailChangeArgs, type MutationCreateAuditLogExportArgs, type MutationCreateOrganizationDomainArgs, type MutationCreatePasswordArgs, type MutationCreateRoleArgs, type MutationCreateSsoConnectionArgs, type MutationDeleteOrganizationDomainArgs, type MutationDeleteRoleArgs, type MutationDeleteSsoConnectionArgs, type MutationEnrollTotpArgs, type MutationInviteUserArgs, type MutationRemoveMemberArgs, type MutationRemoveMfaFactorArgs, type MutationResendInvitationArgs, type MutationReverifyOrganizationDomainArgs, type MutationRevokeInvitationArgs, type MutationRevokeSessionArgs, type MutationSendEmailChangeArgs, type MutationUpdateMemberRoleArgs, type MutationUpdatePasswordArgs, type MutationUpdateProfileArgs, type MutationUpdateRoleArgs, type MutationUpdateSsoConnectionArgs, type MutationVerifyCurrentEmailArgs, type MutationVerifyTotpArgs, type NoAuditEventsFound, type NoMfaFactorsEnrolled, type NoPendingEmailChange, type OAuthProvider, type Organization, type OrganizationBlockedFromSendingInvites, type OrganizationDomain, type OrganizationDomainState, type OrganizationInvitation, type OrganizationInvitationStatus, type OrganizationMember, type OrganizationMemberList, type OrganizationMemberRole, type OrganizationMemberStatus, type PaginationOrder, type Passkey, type PasswordCharacterType, type PasswordCreated, type PasswordPolicy, type PasswordPolicyViolation, type PasswordUpdated, type PasswordViolation, type Permission, type ProfileUpdated, type Query, type QueryAuditEventArgs, type QueryAuditEventsArgs, type QueryDataProviderArgs, type QueryDataProviderConnectionArgs, type QueryDataProviderConnectionsArgs, type QueryDataProvidersArgs, type QueryDirectoryConnectionArgs, type QueryDirectoryConnectionsArgs, type QueryDirectoryGroupsArgs, type QueryDirectoryUsersArgs, type QueryEffectivePermissionsArgs, type QueryOrganizationArgs, type QueryOrganizationMembershipsArgs, type QueryRoleArgs, type QuerySsoConnectionArgs, type QueryUserArgs, type RemoveMemberInput, type RemoveMemberResult, type RemoveMfaFactorInput, type RemoveMfaFactorResult, type ResendInvitationInput, type ResendInvitationNotFound, type ResendInvitationResult, type RevokeAllSessionsResult, type RevokeInvitationInput, type RevokeInvitationResult, type RevokeSessionInput, type RevokeSessionResult, type Role, type RoleDeleted, type RoleNotFound, type RolesResult, type Scalars, type Sdk, type SdkFunctionWrapper, type SendEmailChangeInput, type SendEmailChangeResult, type SendVerificationCodeResult, type Session, type SessionLocation, type SessionNotFound, type SessionRevoked, type SessionState, type TotpAlreadyEnrolled, type TotpFactor, type TotpVerificationFailed, type TotpVerified, type UpdateMemberRoleInput, type UpdateMemberRoleResult, type UpdatePasswordInput, type UpdatePasswordResult, type UpdateProfileInput, type UpdateProfileResult, type UpdateRoleInput, type User, type UserAlreadyHasPassword, type UserInvited, type UserOrganization, type VerificationCodeExpired, type VerificationCodeIncorrect, type VerificationCodePreviouslyUsed, type VerificationCodeSent, type VerificationTooManyAttempts, type VerifyCurrentEmailInput, type VerifyCurrentEmailResult, type VerifyTotpInput, type VerifyTotpResult, getSdk };