@workos-inc/node 8.12.1 → 9.0.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/README.md +1 -1
- package/lib/{factory-DClLn4DC.mjs → factory-BcKWtJoA.mjs} +1691 -589
- package/lib/factory-BcKWtJoA.mjs.map +1 -0
- package/lib/{factory-DgWOj5Mq.cjs → factory-CgfeO0z2.cjs} +1706 -610
- package/lib/factory-CgfeO0z2.cjs.map +1 -0
- package/lib/index.cjs +5 -6
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -2
- package/lib/index.d.mts +2 -2
- package/lib/index.mjs +2 -2
- package/lib/index.mjs.map +1 -1
- package/lib/index.worker.cjs +5 -6
- package/lib/index.worker.cjs.map +1 -1
- package/lib/index.worker.d.cts +2 -2
- package/lib/index.worker.d.mts +2 -2
- package/lib/index.worker.mjs +2 -2
- package/lib/index.worker.mjs.map +1 -1
- package/lib/{workos-BsGYox30.d.cts → workos-C6Dd1GJI.d.cts} +1938 -547
- package/lib/{workos-DeJXESD6.d.mts → workos-DUcDmctT.d.mts} +1938 -547
- package/package.json +7 -7
- package/lib/factory-DClLn4DC.mjs.map +0 -1
- package/lib/factory-DgWOj5Mq.cjs.map +0 -1
|
@@ -127,15 +127,25 @@ type DirectoryType = 'azure scim v2.0' | 'bamboohr' | 'breathe hr' | 'cezanne hr
|
|
|
127
127
|
type DirectoryState = 'active' | 'deleting' | 'inactive' | 'invalid_credentials' | 'validating';
|
|
128
128
|
type DirectoryStateResponse = 'deleting' | 'invalid_credentials' | 'linked' | 'unlinked' | 'validating';
|
|
129
129
|
interface Directory {
|
|
130
|
+
/** Distinguishes the Directory object. */
|
|
130
131
|
object: 'directory';
|
|
132
|
+
/** Unique identifier for the Directory. */
|
|
131
133
|
id: string;
|
|
134
|
+
/** The URL associated with an Enterprise Client. */
|
|
132
135
|
domain: string;
|
|
136
|
+
/** External Key for the Directory. */
|
|
133
137
|
externalKey: string;
|
|
138
|
+
/** The name of the directory. */
|
|
134
139
|
name: string;
|
|
140
|
+
/** The unique identifier for the Organization in which the directory resides. */
|
|
135
141
|
organizationId?: string;
|
|
142
|
+
/** Describes whether the Directory has been successfully connected to an external provider. */
|
|
136
143
|
state: DirectoryState;
|
|
144
|
+
/** The type of external Directory Provider integrated with. */
|
|
137
145
|
type: DirectoryType;
|
|
146
|
+
/** An ISO 8601 timestamp. */
|
|
138
147
|
createdAt: string;
|
|
148
|
+
/** An ISO 8601 timestamp. */
|
|
139
149
|
updatedAt: string;
|
|
140
150
|
}
|
|
141
151
|
interface DirectoryResponse {
|
|
@@ -212,7 +222,9 @@ interface PaginationOptions {
|
|
|
212
222
|
//#endregion
|
|
213
223
|
//#region src/directory-sync/interfaces/list-directories-options.interface.d.ts
|
|
214
224
|
interface ListDirectoriesOptions extends PaginationOptions {
|
|
225
|
+
/** Filter Directories by their associated organization. */
|
|
215
226
|
organizationId?: string;
|
|
227
|
+
/** Searchable text to match against Directory names. */
|
|
216
228
|
search?: string;
|
|
217
229
|
}
|
|
218
230
|
interface SerializedListDirectoriesOptions extends PaginationOptions {
|
|
@@ -316,14 +328,16 @@ interface OrganizationRole {
|
|
|
316
328
|
//#endregion
|
|
317
329
|
//#region src/authorization/interfaces/create-organization-role-options.interface.d.ts
|
|
318
330
|
interface CreateOrganizationRoleOptions {
|
|
319
|
-
slug
|
|
331
|
+
slug?: string;
|
|
320
332
|
name: string;
|
|
321
333
|
description?: string;
|
|
334
|
+
resourceTypeSlug?: string;
|
|
322
335
|
}
|
|
323
336
|
interface SerializedCreateOrganizationRoleOptions {
|
|
324
|
-
slug
|
|
337
|
+
slug?: string;
|
|
325
338
|
name: string;
|
|
326
339
|
description?: string;
|
|
340
|
+
resource_type_slug?: string;
|
|
327
341
|
}
|
|
328
342
|
//#endregion
|
|
329
343
|
//#region src/authorization/interfaces/update-organization-role-options.interface.d.ts
|
|
@@ -374,22 +388,6 @@ interface PermissionResponse {
|
|
|
374
388
|
created_at: string;
|
|
375
389
|
updated_at: string;
|
|
376
390
|
}
|
|
377
|
-
interface PermissionList {
|
|
378
|
-
object: 'list';
|
|
379
|
-
data: Permission[];
|
|
380
|
-
listMetadata: {
|
|
381
|
-
before: string | null;
|
|
382
|
-
after: string | null;
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
interface PermissionListResponse {
|
|
386
|
-
object: 'list';
|
|
387
|
-
data: PermissionResponse[];
|
|
388
|
-
list_metadata: {
|
|
389
|
-
before: string | null;
|
|
390
|
-
after: string | null;
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
391
|
//#endregion
|
|
394
392
|
//#region src/authorization/interfaces/create-permission-options.interface.d.ts
|
|
395
393
|
interface CreatePermissionOptions {
|
|
@@ -420,15 +418,25 @@ type ListPermissionsOptions = PaginationOptions;
|
|
|
420
418
|
//#endregion
|
|
421
419
|
//#region src/authorization/interfaces/authorization-resource.interface.d.ts
|
|
422
420
|
interface AuthorizationResource {
|
|
421
|
+
/** Distinguishes the Resource object. */
|
|
423
422
|
object: 'authorization_resource';
|
|
423
|
+
/** The unique ID of the Resource. */
|
|
424
424
|
id: string;
|
|
425
|
+
/** An identifier you provide to reference the resource in your system. */
|
|
425
426
|
externalId: string;
|
|
427
|
+
/** A human-readable name for the Resource. */
|
|
426
428
|
name: string;
|
|
429
|
+
/** An optional description of the Resource. */
|
|
427
430
|
description: string | null;
|
|
431
|
+
/** The slug of the resource type this resource belongs to. */
|
|
428
432
|
resourceTypeSlug: string;
|
|
433
|
+
/** The ID of the organization that owns the resource. */
|
|
429
434
|
organizationId: string;
|
|
435
|
+
/** The ID of the parent resource, if this resource is nested. */
|
|
430
436
|
parentResourceId: string | null;
|
|
437
|
+
/** An ISO 8601 timestamp. */
|
|
431
438
|
createdAt: string;
|
|
439
|
+
/** An ISO 8601 timestamp. */
|
|
432
440
|
updatedAt: string;
|
|
433
441
|
}
|
|
434
442
|
interface AuthorizationResourceResponse {
|
|
@@ -477,22 +485,6 @@ interface SerializedUpdateAuthorizationResourceOptions {
|
|
|
477
485
|
name?: string;
|
|
478
486
|
description?: string | null;
|
|
479
487
|
}
|
|
480
|
-
interface AuthorizationResourceList {
|
|
481
|
-
object: 'list';
|
|
482
|
-
data: AuthorizationResource[];
|
|
483
|
-
listMetadata: {
|
|
484
|
-
before: string | null;
|
|
485
|
-
after: string | null;
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
interface AuthorizationResourceListResponse {
|
|
489
|
-
object: 'list';
|
|
490
|
-
data: AuthorizationResourceResponse[];
|
|
491
|
-
list_metadata: {
|
|
492
|
-
before: string | null;
|
|
493
|
-
after: string | null;
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
488
|
//#endregion
|
|
497
489
|
//#region src/authorization/interfaces/list-authorization-resources-options.interface.d.ts
|
|
498
490
|
interface ListAuthorizationResourcesOptions extends PaginationOptions {
|
|
@@ -592,7 +584,9 @@ interface SerializedListResourcesForMembershipOptions extends PaginationOptions
|
|
|
592
584
|
//#region src/authorization/interfaces/list-memberships-for-resource-options.interface.d.ts
|
|
593
585
|
interface ListMembershipsForResourceOptions extends PaginationOptions {
|
|
594
586
|
resourceId: string;
|
|
587
|
+
/** The permission slug to filter by. Only users with this permission on the resource are returned. */
|
|
595
588
|
permissionSlug: string;
|
|
589
|
+
/** Filter by assignment type. Use `direct` for direct assignments only, or `indirect` to include inherited assignments. */
|
|
596
590
|
assignment?: 'direct' | 'indirect';
|
|
597
591
|
}
|
|
598
592
|
//#endregion
|
|
@@ -620,11 +614,17 @@ interface RoleAssignmentResourceResponse {
|
|
|
620
614
|
resource_type_slug: string;
|
|
621
615
|
}
|
|
622
616
|
interface RoleAssignment {
|
|
617
|
+
/** Distinguishes the role assignment object. */
|
|
623
618
|
object: 'role_assignment';
|
|
619
|
+
/** Unique identifier of the role assignment. */
|
|
624
620
|
id: string;
|
|
621
|
+
/** The role included in the assignment. */
|
|
625
622
|
role: RoleAssignmentRole;
|
|
623
|
+
/** The resource to which the role is assigned. */
|
|
626
624
|
resource: RoleAssignmentResource;
|
|
625
|
+
/** An ISO 8601 timestamp. */
|
|
627
626
|
createdAt: string;
|
|
627
|
+
/** An ISO 8601 timestamp. */
|
|
628
628
|
updatedAt: string;
|
|
629
629
|
}
|
|
630
630
|
interface RoleAssignmentResponse {
|
|
@@ -635,22 +635,6 @@ interface RoleAssignmentResponse {
|
|
|
635
635
|
created_at: string;
|
|
636
636
|
updated_at: string;
|
|
637
637
|
}
|
|
638
|
-
interface RoleAssignmentList {
|
|
639
|
-
object: 'list';
|
|
640
|
-
data: RoleAssignment[];
|
|
641
|
-
listMetadata: {
|
|
642
|
-
before: string | null;
|
|
643
|
-
after: string | null;
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
interface RoleAssignmentListResponse {
|
|
647
|
-
object: 'list';
|
|
648
|
-
data: RoleAssignmentResponse[];
|
|
649
|
-
list_metadata: {
|
|
650
|
-
before: string | null;
|
|
651
|
-
after: string | null;
|
|
652
|
-
};
|
|
653
|
-
}
|
|
654
638
|
//#endregion
|
|
655
639
|
//#region src/authorization/interfaces/list-role-assignments-options.interface.d.ts
|
|
656
640
|
interface ListRoleAssignmentsOptions extends PaginationOptions {
|
|
@@ -693,6 +677,20 @@ interface RemoveRoleAssignmentOptions {
|
|
|
693
677
|
roleAssignmentId: string;
|
|
694
678
|
}
|
|
695
679
|
//#endregion
|
|
680
|
+
//#region src/authorization/interfaces/list-effective-permissions-options.interface.d.ts
|
|
681
|
+
interface ListEffectivePermissionsOptions extends PaginationOptions {
|
|
682
|
+
organizationMembershipId: string;
|
|
683
|
+
resourceId: string;
|
|
684
|
+
}
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region src/authorization/interfaces/list-effective-permissions-by-external-id-options.interface.d.ts
|
|
687
|
+
interface ListEffectivePermissionsByExternalIdOptions extends PaginationOptions {
|
|
688
|
+
organizationMembershipId: string;
|
|
689
|
+
organizationId: string;
|
|
690
|
+
resourceTypeSlug: string;
|
|
691
|
+
externalId: string;
|
|
692
|
+
}
|
|
693
|
+
//#endregion
|
|
696
694
|
//#region src/roles/interfaces/role.interface.d.ts
|
|
697
695
|
interface RoleResponse {
|
|
698
696
|
slug: string;
|
|
@@ -859,10 +857,12 @@ declare enum ConnectionType {
|
|
|
859
857
|
Auth0SAML = "Auth0SAML",
|
|
860
858
|
AzureSAML = "AzureSAML",
|
|
861
859
|
CasSAML = "CasSAML",
|
|
860
|
+
CleverOIDC = "CleverOIDC",
|
|
862
861
|
ClassLinkSAML = "ClassLinkSAML",
|
|
863
862
|
CloudflareSAML = "CloudflareSAML",
|
|
864
863
|
CyberArkSAML = "CyberArkSAML",
|
|
865
864
|
DuoSAML = "DuoSAML",
|
|
865
|
+
EntraIdOIDC = "EntraIdOIDC",
|
|
866
866
|
GenericOIDC = "GenericOIDC",
|
|
867
867
|
GenericSAML = "GenericSAML",
|
|
868
868
|
GitHubOAuth = "GitHubOAuth",
|
|
@@ -876,6 +876,7 @@ declare enum ConnectionType {
|
|
|
876
876
|
MicrosoftOAuth = "MicrosoftOAuth",
|
|
877
877
|
MiniOrangeSAML = "MiniOrangeSAML",
|
|
878
878
|
NetIqSAML = "NetIqSAML",
|
|
879
|
+
OktaOIDC = "OktaOIDC",
|
|
879
880
|
OktaSAML = "OktaSAML",
|
|
880
881
|
OneLoginSAML = "OneLoginSAML",
|
|
881
882
|
OracleSAML = "OracleSAML",
|
|
@@ -897,14 +898,22 @@ interface ConnectionDomain {
|
|
|
897
898
|
domain: string;
|
|
898
899
|
}
|
|
899
900
|
interface Connection {
|
|
901
|
+
/** Distinguishes the Connection object. */
|
|
900
902
|
object: 'connection';
|
|
903
|
+
/** Unique identifier for the Connection. */
|
|
901
904
|
id: string;
|
|
905
|
+
/** Unique identifier for the Organization in which the Connection resides. */
|
|
902
906
|
organizationId?: string;
|
|
907
|
+
/** A human-readable name for the Connection. This will most commonly be the organization's name. */
|
|
903
908
|
name: string;
|
|
909
|
+
/** Indicates whether a Connection is able to authenticate users. */
|
|
904
910
|
state: 'draft' | 'active' | 'inactive' | 'validating';
|
|
911
|
+
/** List of Organization Domains. */
|
|
905
912
|
domains: ConnectionDomain[];
|
|
906
913
|
type: ConnectionType;
|
|
914
|
+
/** An ISO 8601 timestamp. */
|
|
907
915
|
createdAt: string;
|
|
916
|
+
/** An ISO 8601 timestamp. */
|
|
908
917
|
updatedAt: string;
|
|
909
918
|
}
|
|
910
919
|
interface ConnectionResponse {
|
|
@@ -938,8 +947,11 @@ interface GetProfileAndTokenOptions {
|
|
|
938
947
|
//#endregion
|
|
939
948
|
//#region src/sso/interfaces/list-connections-options.interface.d.ts
|
|
940
949
|
interface ListConnectionsOptions extends PaginationOptions {
|
|
950
|
+
/** Filter Connections by their type. */
|
|
941
951
|
connectionType?: ConnectionType;
|
|
952
|
+
/** Filter Connections by their associated domain. */
|
|
942
953
|
domain?: string;
|
|
954
|
+
/** Filter Connections by their associated organization. */
|
|
943
955
|
organizationId?: string;
|
|
944
956
|
}
|
|
945
957
|
interface SerializedListConnectionsOptions extends PaginationOptions {
|
|
@@ -967,18 +979,31 @@ interface OauthTokensResponse {
|
|
|
967
979
|
//#endregion
|
|
968
980
|
//#region src/sso/interfaces/profile.interface.d.ts
|
|
969
981
|
interface Profile<CustomAttributesType extends UnknownRecord> {
|
|
982
|
+
/** Unique identifier of the profile. */
|
|
970
983
|
id: string;
|
|
984
|
+
/** The user's unique identifier from the identity provider. */
|
|
971
985
|
idpId: string;
|
|
986
|
+
/** The ID of the organization the user belongs to. */
|
|
972
987
|
organizationId?: string;
|
|
988
|
+
/** The ID of the SSO connection used for authentication. */
|
|
973
989
|
connectionId: string;
|
|
990
|
+
/** The type of SSO connection. */
|
|
974
991
|
connectionType: ConnectionType;
|
|
992
|
+
/** The user's email address. */
|
|
975
993
|
email: string;
|
|
994
|
+
/** The user's first name. */
|
|
976
995
|
firstName?: string;
|
|
996
|
+
/** The user's last name. */
|
|
977
997
|
lastName?: string;
|
|
998
|
+
/** The role assigned to the user within the organization, if applicable. */
|
|
978
999
|
role?: RoleResponse;
|
|
1000
|
+
/** The roles assigned to the user within the organization, if applicable. */
|
|
979
1001
|
roles?: RoleResponse[];
|
|
1002
|
+
/** The groups the user belongs to, as returned by the identity provider. */
|
|
980
1003
|
groups?: string[];
|
|
1004
|
+
/** Custom attribute mappings defined for the connection, returned as key-value pairs. */
|
|
981
1005
|
customAttributes?: CustomAttributesType;
|
|
1006
|
+
/** The complete set of raw attributes returned by the identity provider. */
|
|
982
1007
|
rawAttributes?: {
|
|
983
1008
|
[key: string]: any;
|
|
984
1009
|
};
|
|
@@ -1180,19 +1205,33 @@ interface ImpersonatorResponse {
|
|
|
1180
1205
|
}
|
|
1181
1206
|
//#endregion
|
|
1182
1207
|
//#region src/user-management/interfaces/user.interface.d.ts
|
|
1208
|
+
/** The user object. */
|
|
1183
1209
|
interface User {
|
|
1210
|
+
/** Distinguishes the user object. */
|
|
1184
1211
|
object: 'user';
|
|
1212
|
+
/** The unique ID of the user. */
|
|
1185
1213
|
id: string;
|
|
1214
|
+
/** The email address of the user. */
|
|
1186
1215
|
email: string;
|
|
1216
|
+
/** Whether the user's email has been verified. */
|
|
1187
1217
|
emailVerified: boolean;
|
|
1218
|
+
/** A URL reference to an image representing the user. */
|
|
1188
1219
|
profilePictureUrl: string | null;
|
|
1220
|
+
/** The first name of the user. */
|
|
1189
1221
|
firstName: string | null;
|
|
1222
|
+
/** The last name of the user. */
|
|
1190
1223
|
lastName: string | null;
|
|
1224
|
+
/** The timestamp when the user last signed in. */
|
|
1191
1225
|
lastSignInAt: string | null;
|
|
1226
|
+
/** The user's preferred locale. */
|
|
1192
1227
|
locale: string | null;
|
|
1228
|
+
/** An ISO 8601 timestamp. */
|
|
1193
1229
|
createdAt: string;
|
|
1230
|
+
/** An ISO 8601 timestamp. */
|
|
1194
1231
|
updatedAt: string;
|
|
1232
|
+
/** The external ID of the user. */
|
|
1195
1233
|
externalId: string | null;
|
|
1234
|
+
/** Object containing metadata key/value pairs associated with the user. */
|
|
1196
1235
|
metadata: Record<string, string>;
|
|
1197
1236
|
}
|
|
1198
1237
|
interface UserResponse {
|
|
@@ -1453,13 +1492,21 @@ interface SerializedCreateUserOptions {
|
|
|
1453
1492
|
//#endregion
|
|
1454
1493
|
//#region src/user-management/interfaces/email-verification.interface.d.ts
|
|
1455
1494
|
interface EmailVerification {
|
|
1495
|
+
/** Distinguishes the email verification object. */
|
|
1456
1496
|
object: 'email_verification';
|
|
1497
|
+
/** The unique ID of the email verification code. */
|
|
1457
1498
|
id: string;
|
|
1499
|
+
/** The unique ID of the user. */
|
|
1458
1500
|
userId: string;
|
|
1501
|
+
/** The email address of the user. */
|
|
1459
1502
|
email: string;
|
|
1503
|
+
/** The timestamp when the email verification code expires. */
|
|
1460
1504
|
expiresAt: string;
|
|
1505
|
+
/** The code used to verify the email. */
|
|
1461
1506
|
code: string;
|
|
1507
|
+
/** An ISO 8601 timestamp. */
|
|
1462
1508
|
createdAt: string;
|
|
1509
|
+
/** An ISO 8601 timestamp. */
|
|
1463
1510
|
updatedAt: string;
|
|
1464
1511
|
}
|
|
1465
1512
|
interface EmailVerificationEvent {
|
|
@@ -1506,7 +1553,7 @@ interface SerializedEnrollUserInMfaFactorOptions {
|
|
|
1506
1553
|
totp_secret?: string;
|
|
1507
1554
|
}
|
|
1508
1555
|
//#endregion
|
|
1509
|
-
//#region src/
|
|
1556
|
+
//#region src/multi-factor-auth/interfaces/totp.interface.d.ts
|
|
1510
1557
|
interface Totp {
|
|
1511
1558
|
issuer: string;
|
|
1512
1559
|
user: string;
|
|
@@ -1570,27 +1617,36 @@ interface Identity {
|
|
|
1570
1617
|
type: 'OAuth';
|
|
1571
1618
|
provider: 'AppleOAuth' | 'GoogleOAuth' | 'GitHubOAuth' | 'MicrosoftOAuth' | 'SalesforceOAuth';
|
|
1572
1619
|
}
|
|
1573
|
-
interface IdentityResponse {
|
|
1574
|
-
idp_id: string;
|
|
1575
|
-
type: 'OAuth';
|
|
1576
|
-
provider: 'AppleOAuth' | 'GoogleOAuth' | 'GitHubOAuth' | 'MicrosoftOAuth' | 'SalesforceOAuth';
|
|
1577
|
-
}
|
|
1578
1620
|
//#endregion
|
|
1579
1621
|
//#region src/user-management/interfaces/invitation.interface.d.ts
|
|
1580
1622
|
interface Invitation {
|
|
1623
|
+
/** Distinguishes the invitation object. */
|
|
1581
1624
|
object: 'invitation';
|
|
1625
|
+
/** The unique ID of the invitation. */
|
|
1582
1626
|
id: string;
|
|
1627
|
+
/** The email address of the recipient. */
|
|
1583
1628
|
email: string;
|
|
1629
|
+
/** The state of the invitation. */
|
|
1584
1630
|
state: 'pending' | 'accepted' | 'expired' | 'revoked';
|
|
1631
|
+
/** The timestamp when the invitation was accepted, or null if not yet accepted. */
|
|
1585
1632
|
acceptedAt: string | null;
|
|
1633
|
+
/** The timestamp when the invitation was revoked, or null if not revoked. */
|
|
1586
1634
|
revokedAt: string | null;
|
|
1635
|
+
/** The timestamp when the invitation expires. */
|
|
1587
1636
|
expiresAt: string;
|
|
1637
|
+
/** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */
|
|
1588
1638
|
organizationId: string | null;
|
|
1639
|
+
/** The ID of the user who invited the recipient, if provided. */
|
|
1589
1640
|
inviterUserId: string | null;
|
|
1641
|
+
/** The ID of the user who accepted the invitation, once accepted. */
|
|
1590
1642
|
acceptedUserId: string | null;
|
|
1643
|
+
/** The token used to accept the invitation. */
|
|
1591
1644
|
token: string;
|
|
1645
|
+
/** The URL where the recipient can accept the invitation. */
|
|
1592
1646
|
acceptInvitationUrl: string;
|
|
1647
|
+
/** An ISO 8601 timestamp. */
|
|
1593
1648
|
createdAt: string;
|
|
1649
|
+
/** An ISO 8601 timestamp. */
|
|
1594
1650
|
updatedAt: string;
|
|
1595
1651
|
}
|
|
1596
1652
|
interface InvitationEvent {
|
|
@@ -1643,9 +1699,16 @@ interface ListAuthFactorsOptions extends PaginationOptions {
|
|
|
1643
1699
|
userId: string;
|
|
1644
1700
|
}
|
|
1645
1701
|
//#endregion
|
|
1702
|
+
//#region src/user-management/interfaces/list-groups-for-organization-membership-options.interface.d.ts
|
|
1703
|
+
interface ListGroupsForOrganizationMembershipOptions extends PaginationOptions {
|
|
1704
|
+
organizationMembershipId: string;
|
|
1705
|
+
}
|
|
1706
|
+
//#endregion
|
|
1646
1707
|
//#region src/user-management/interfaces/list-invitations-options.interface.d.ts
|
|
1647
1708
|
interface ListInvitationsOptions extends PaginationOptions {
|
|
1709
|
+
/** The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join. */
|
|
1648
1710
|
organizationId?: string;
|
|
1711
|
+
/** The email address of the recipient. */
|
|
1649
1712
|
email?: string;
|
|
1650
1713
|
}
|
|
1651
1714
|
interface SerializedListInvitationsOptions extends PaginationOptions {
|
|
@@ -1667,7 +1730,9 @@ interface BaseOrganizationMembership {
|
|
|
1667
1730
|
customAttributes: Record<string, unknown>;
|
|
1668
1731
|
}
|
|
1669
1732
|
interface OrganizationMembership extends BaseOrganizationMembership {
|
|
1733
|
+
/** The name of the organization which the user belongs to. */
|
|
1670
1734
|
organizationName: string;
|
|
1735
|
+
/** The primary role assigned to the user within the organization. */
|
|
1671
1736
|
role: RoleResponse;
|
|
1672
1737
|
roles?: RoleResponse[];
|
|
1673
1738
|
}
|
|
@@ -1689,22 +1754,6 @@ interface OrganizationMembershipResponse extends BaseOrganizationMembershipRespo
|
|
|
1689
1754
|
roles?: RoleResponse[];
|
|
1690
1755
|
}
|
|
1691
1756
|
type AuthorizationOrganizationMembershipResponse = BaseOrganizationMembershipResponse;
|
|
1692
|
-
interface AuthorizationOrganizationMembershipList {
|
|
1693
|
-
object: 'list';
|
|
1694
|
-
data: AuthorizationOrganizationMembership[];
|
|
1695
|
-
listMetadata: {
|
|
1696
|
-
before: string | null;
|
|
1697
|
-
after: string | null;
|
|
1698
|
-
};
|
|
1699
|
-
}
|
|
1700
|
-
interface AuthorizationOrganizationMembershipListResponse {
|
|
1701
|
-
object: 'list';
|
|
1702
|
-
data: AuthorizationOrganizationMembershipResponse[];
|
|
1703
|
-
list_metadata: {
|
|
1704
|
-
before: string | null;
|
|
1705
|
-
after: string | null;
|
|
1706
|
-
};
|
|
1707
|
-
}
|
|
1708
1757
|
//#endregion
|
|
1709
1758
|
//#region src/user-management/interfaces/list-organization-memberships-options.interface.d.ts
|
|
1710
1759
|
type ListOrganizationMembershipsOptions = PaginationOptions & {
|
|
@@ -1733,7 +1782,9 @@ interface ListUserFeatureFlagsOptions extends PaginationOptions {
|
|
|
1733
1782
|
//#endregion
|
|
1734
1783
|
//#region src/user-management/interfaces/list-users-options.interface.d.ts
|
|
1735
1784
|
interface ListUsersOptions extends PaginationOptions {
|
|
1785
|
+
/** Filter users by their email address. */
|
|
1736
1786
|
email?: string;
|
|
1787
|
+
/** Filter users by the organization they are a member of. */
|
|
1737
1788
|
organizationId?: string;
|
|
1738
1789
|
}
|
|
1739
1790
|
interface SerializedListUsersOptions extends PaginationOptions {
|
|
@@ -1752,13 +1803,21 @@ interface LogoutURLOptions {
|
|
|
1752
1803
|
//#endregion
|
|
1753
1804
|
//#region src/user-management/interfaces/magic-auth.interface.d.ts
|
|
1754
1805
|
interface MagicAuth {
|
|
1806
|
+
/** Distinguishes the Magic Auth object. */
|
|
1755
1807
|
object: 'magic_auth';
|
|
1808
|
+
/** The unique ID of the Magic Auth code. */
|
|
1756
1809
|
id: string;
|
|
1810
|
+
/** The unique ID of the user. */
|
|
1757
1811
|
userId: string;
|
|
1812
|
+
/** The email address of the user. */
|
|
1758
1813
|
email: string;
|
|
1814
|
+
/** The timestamp when the Magic Auth code expires. */
|
|
1759
1815
|
expiresAt: string;
|
|
1816
|
+
/** The code used to verify the Magic Auth code. */
|
|
1760
1817
|
code: string;
|
|
1818
|
+
/** An ISO 8601 timestamp. */
|
|
1761
1819
|
createdAt: string;
|
|
1820
|
+
/** An ISO 8601 timestamp. */
|
|
1762
1821
|
updatedAt: string;
|
|
1763
1822
|
}
|
|
1764
1823
|
interface MagicAuthEvent {
|
|
@@ -1792,13 +1851,21 @@ interface MagicAuthEventResponse {
|
|
|
1792
1851
|
//#endregion
|
|
1793
1852
|
//#region src/user-management/interfaces/password-reset.interface.d.ts
|
|
1794
1853
|
interface PasswordReset {
|
|
1854
|
+
/** Distinguishes the password reset object. */
|
|
1795
1855
|
object: 'password_reset';
|
|
1856
|
+
/** The unique ID of the password reset object. */
|
|
1796
1857
|
id: string;
|
|
1858
|
+
/** The unique ID of the user. */
|
|
1797
1859
|
userId: string;
|
|
1860
|
+
/** The email address of the user. */
|
|
1798
1861
|
email: string;
|
|
1862
|
+
/** The token used to reset the password. */
|
|
1799
1863
|
passwordResetToken: string;
|
|
1864
|
+
/** The URL where the user can reset their password. */
|
|
1800
1865
|
passwordResetUrl: string;
|
|
1866
|
+
/** The timestamp when the password reset token expires. */
|
|
1801
1867
|
expiresAt: string;
|
|
1868
|
+
/** The timestamp when the password reset token was created. */
|
|
1802
1869
|
createdAt: string;
|
|
1803
1870
|
}
|
|
1804
1871
|
interface PasswordResetEvent {
|
|
@@ -2007,15 +2074,25 @@ declare enum OrganizationDomainVerificationStrategy {
|
|
|
2007
2074
|
Manual = "manual"
|
|
2008
2075
|
}
|
|
2009
2076
|
interface OrganizationDomain {
|
|
2077
|
+
/** Distinguishes the organization domain object. */
|
|
2010
2078
|
object: 'organization_domain';
|
|
2079
|
+
/** Unique identifier of the organization domain. */
|
|
2011
2080
|
id: string;
|
|
2081
|
+
/** Domain for the organization domain. */
|
|
2012
2082
|
domain: string;
|
|
2083
|
+
/** ID of the parent Organization. */
|
|
2013
2084
|
organizationId: string;
|
|
2085
|
+
/** Verification state of the domain. */
|
|
2014
2086
|
state: OrganizationDomainState;
|
|
2087
|
+
/** Validation token to be used in DNS TXT record. */
|
|
2015
2088
|
verificationToken?: string;
|
|
2089
|
+
/** Strategy used to verify the domain. */
|
|
2016
2090
|
verificationStrategy: OrganizationDomainVerificationStrategy;
|
|
2091
|
+
/** The prefix used in DNS verification. */
|
|
2017
2092
|
verificationPrefix?: string;
|
|
2093
|
+
/** An ISO 8601 timestamp. */
|
|
2018
2094
|
createdAt: string;
|
|
2095
|
+
/** An ISO 8601 timestamp. */
|
|
2019
2096
|
updatedAt: string;
|
|
2020
2097
|
}
|
|
2021
2098
|
interface OrganizationDomainResponse {
|
|
@@ -2042,18 +2119,28 @@ interface OrganizationDomainVerificationFailedResponse {
|
|
|
2042
2119
|
}
|
|
2043
2120
|
//#endregion
|
|
2044
2121
|
//#region src/api-keys/interfaces/api-key.interface.d.ts
|
|
2122
|
+
/** The API Key object if the value is valid, or `null` if invalid. */
|
|
2045
2123
|
interface ApiKey {
|
|
2124
|
+
/** Distinguishes the API Key object. */
|
|
2046
2125
|
object: 'api_key';
|
|
2126
|
+
/** Unique identifier of the API Key. */
|
|
2047
2127
|
id: string;
|
|
2128
|
+
/** The entity that owns the API Key. */
|
|
2048
2129
|
owner: {
|
|
2049
2130
|
type: 'organization';
|
|
2050
2131
|
id: string;
|
|
2051
2132
|
};
|
|
2133
|
+
/** A descriptive name for the API Key. */
|
|
2052
2134
|
name: string;
|
|
2135
|
+
/** An obfuscated representation of the API Key value. */
|
|
2053
2136
|
obfuscatedValue: string;
|
|
2137
|
+
/** Timestamp of when the API Key was last used. */
|
|
2054
2138
|
lastUsedAt: string | null;
|
|
2139
|
+
/** The permission slugs assigned to the API Key. */
|
|
2055
2140
|
permissions: string[];
|
|
2141
|
+
/** An ISO 8601 timestamp. */
|
|
2056
2142
|
createdAt: string;
|
|
2143
|
+
/** An ISO 8601 timestamp. */
|
|
2057
2144
|
updatedAt: string;
|
|
2058
2145
|
}
|
|
2059
2146
|
interface SerializedApiKey {
|
|
@@ -2145,15 +2232,25 @@ interface EvaluationContext {
|
|
|
2145
2232
|
//#endregion
|
|
2146
2233
|
//#region src/feature-flags/interfaces/feature-flag.interface.d.ts
|
|
2147
2234
|
interface FeatureFlag {
|
|
2235
|
+
/** Distinguishes the Feature Flag object. */
|
|
2148
2236
|
object: 'feature_flag';
|
|
2237
|
+
/** Unique identifier of the Feature Flag. */
|
|
2149
2238
|
id: string;
|
|
2239
|
+
/** A descriptive name for the Feature Flag. This field does not need to be unique. */
|
|
2150
2240
|
name: string;
|
|
2241
|
+
/** A unique key to reference the Feature Flag. */
|
|
2151
2242
|
slug: string;
|
|
2243
|
+
/** A description for the Feature Flag. */
|
|
2152
2244
|
description: string;
|
|
2245
|
+
/** Labels assigned to the Feature Flag for categorizing and filtering. */
|
|
2153
2246
|
tags: string[];
|
|
2247
|
+
/** Specifies whether the Feature Flag is active for the current environment. */
|
|
2154
2248
|
enabled: boolean;
|
|
2249
|
+
/** The value returned for users and organizations who don't match any configured targeting rules. */
|
|
2155
2250
|
defaultValue: boolean;
|
|
2251
|
+
/** An ISO 8601 timestamp. */
|
|
2156
2252
|
createdAt: string;
|
|
2253
|
+
/** An ISO 8601 timestamp. */
|
|
2157
2254
|
updatedAt: string;
|
|
2158
2255
|
}
|
|
2159
2256
|
interface FeatureFlagResponse {
|
|
@@ -2218,6 +2315,89 @@ interface RuntimeClientStats {
|
|
|
2218
2315
|
flagCount: number;
|
|
2219
2316
|
}
|
|
2220
2317
|
//#endregion
|
|
2318
|
+
//#region src/groups/interfaces/add-group-organization-membership-options.interface.d.ts
|
|
2319
|
+
interface AddGroupOrganizationMembershipOptions {
|
|
2320
|
+
organizationId: string;
|
|
2321
|
+
groupId: string;
|
|
2322
|
+
organizationMembershipId: string;
|
|
2323
|
+
}
|
|
2324
|
+
interface SerializedAddGroupOrganizationMembershipOptions {
|
|
2325
|
+
organization_membership_id: string;
|
|
2326
|
+
}
|
|
2327
|
+
//#endregion
|
|
2328
|
+
//#region src/groups/interfaces/create-group-options.interface.d.ts
|
|
2329
|
+
interface CreateGroupOptions {
|
|
2330
|
+
organizationId: string;
|
|
2331
|
+
name: string;
|
|
2332
|
+
description?: string | null;
|
|
2333
|
+
}
|
|
2334
|
+
interface SerializedCreateGroupOptions {
|
|
2335
|
+
name: string;
|
|
2336
|
+
description?: string | null;
|
|
2337
|
+
}
|
|
2338
|
+
//#endregion
|
|
2339
|
+
//#region src/groups/interfaces/delete-group-options.interface.d.ts
|
|
2340
|
+
interface DeleteGroupOptions {
|
|
2341
|
+
organizationId: string;
|
|
2342
|
+
groupId: string;
|
|
2343
|
+
}
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region src/groups/interfaces/get-group-options.interface.d.ts
|
|
2346
|
+
interface GetGroupOptions {
|
|
2347
|
+
organizationId: string;
|
|
2348
|
+
groupId: string;
|
|
2349
|
+
}
|
|
2350
|
+
//#endregion
|
|
2351
|
+
//#region src/groups/interfaces/group.interface.d.ts
|
|
2352
|
+
interface Group {
|
|
2353
|
+
object: 'group';
|
|
2354
|
+
id: string;
|
|
2355
|
+
organizationId: string;
|
|
2356
|
+
name: string;
|
|
2357
|
+
description: string | null;
|
|
2358
|
+
createdAt: string;
|
|
2359
|
+
updatedAt: string;
|
|
2360
|
+
}
|
|
2361
|
+
interface GroupResponse {
|
|
2362
|
+
object: 'group';
|
|
2363
|
+
id: string;
|
|
2364
|
+
organization_id: string;
|
|
2365
|
+
name: string;
|
|
2366
|
+
description: string | null;
|
|
2367
|
+
created_at: string;
|
|
2368
|
+
updated_at: string;
|
|
2369
|
+
}
|
|
2370
|
+
//#endregion
|
|
2371
|
+
//#region src/groups/interfaces/list-group-organization-memberships-options.interface.d.ts
|
|
2372
|
+
interface ListGroupOrganizationMembershipsOptions extends PaginationOptions {
|
|
2373
|
+
organizationId: string;
|
|
2374
|
+
groupId: string;
|
|
2375
|
+
}
|
|
2376
|
+
//#endregion
|
|
2377
|
+
//#region src/groups/interfaces/list-groups-options.interface.d.ts
|
|
2378
|
+
interface ListGroupsOptions extends PaginationOptions {
|
|
2379
|
+
organizationId: string;
|
|
2380
|
+
}
|
|
2381
|
+
//#endregion
|
|
2382
|
+
//#region src/groups/interfaces/remove-group-organization-membership-options.interface.d.ts
|
|
2383
|
+
interface RemoveGroupOrganizationMembershipOptions {
|
|
2384
|
+
organizationId: string;
|
|
2385
|
+
groupId: string;
|
|
2386
|
+
organizationMembershipId: string;
|
|
2387
|
+
}
|
|
2388
|
+
//#endregion
|
|
2389
|
+
//#region src/groups/interfaces/update-group-options.interface.d.ts
|
|
2390
|
+
interface UpdateGroupOptions {
|
|
2391
|
+
organizationId: string;
|
|
2392
|
+
groupId: string;
|
|
2393
|
+
name?: string;
|
|
2394
|
+
description?: string | null;
|
|
2395
|
+
}
|
|
2396
|
+
interface SerializedUpdateGroupOptions {
|
|
2397
|
+
name?: string;
|
|
2398
|
+
description?: string | null;
|
|
2399
|
+
}
|
|
2400
|
+
//#endregion
|
|
2221
2401
|
//#region src/vault/interfaces/key.interface.d.ts
|
|
2222
2402
|
interface KeyContext {
|
|
2223
2403
|
[key: string]: any;
|
|
@@ -2861,6 +3041,54 @@ interface FlagRuleUpdatedEventResponse extends EventResponseBase {
|
|
|
2861
3041
|
event: 'flag.rule_updated';
|
|
2862
3042
|
data: FeatureFlagResponse;
|
|
2863
3043
|
}
|
|
3044
|
+
interface GroupCreatedEvent extends EventBase {
|
|
3045
|
+
event: 'group.created';
|
|
3046
|
+
data: Group;
|
|
3047
|
+
}
|
|
3048
|
+
interface GroupCreatedEventResponse extends EventResponseBase {
|
|
3049
|
+
event: 'group.created';
|
|
3050
|
+
data: GroupResponse;
|
|
3051
|
+
}
|
|
3052
|
+
interface GroupUpdatedEvent extends EventBase {
|
|
3053
|
+
event: 'group.updated';
|
|
3054
|
+
data: Group;
|
|
3055
|
+
}
|
|
3056
|
+
interface GroupUpdatedEventResponse extends EventResponseBase {
|
|
3057
|
+
event: 'group.updated';
|
|
3058
|
+
data: GroupResponse;
|
|
3059
|
+
}
|
|
3060
|
+
interface GroupDeletedEvent extends EventBase {
|
|
3061
|
+
event: 'group.deleted';
|
|
3062
|
+
data: Group;
|
|
3063
|
+
}
|
|
3064
|
+
interface GroupDeletedEventResponse extends EventResponseBase {
|
|
3065
|
+
event: 'group.deleted';
|
|
3066
|
+
data: GroupResponse;
|
|
3067
|
+
}
|
|
3068
|
+
interface GroupMemberEventData {
|
|
3069
|
+
groupId: string;
|
|
3070
|
+
organizationMembershipId: string;
|
|
3071
|
+
}
|
|
3072
|
+
interface GroupMemberEventResponseData {
|
|
3073
|
+
group_id: string;
|
|
3074
|
+
organization_membership_id: string;
|
|
3075
|
+
}
|
|
3076
|
+
interface GroupMemberAddedEvent extends EventBase {
|
|
3077
|
+
event: 'group.member_added';
|
|
3078
|
+
data: GroupMemberEventData;
|
|
3079
|
+
}
|
|
3080
|
+
interface GroupMemberAddedEventResponse extends EventResponseBase {
|
|
3081
|
+
event: 'group.member_added';
|
|
3082
|
+
data: GroupMemberEventResponseData;
|
|
3083
|
+
}
|
|
3084
|
+
interface GroupMemberRemovedEvent extends EventBase {
|
|
3085
|
+
event: 'group.member_removed';
|
|
3086
|
+
data: GroupMemberEventData;
|
|
3087
|
+
}
|
|
3088
|
+
interface GroupMemberRemovedEventResponse extends EventResponseBase {
|
|
3089
|
+
event: 'group.member_removed';
|
|
3090
|
+
data: GroupMemberEventResponseData;
|
|
3091
|
+
}
|
|
2864
3092
|
interface VaultDataCreatedEvent extends EventBase {
|
|
2865
3093
|
event: 'vault.data.created';
|
|
2866
3094
|
data: VaultDataCreatedEventData;
|
|
@@ -2941,10 +3169,26 @@ interface VaultByokKeyVerificationCompletedEventResponse extends EventResponseBa
|
|
|
2941
3169
|
event: 'vault.byok_key.verification_completed';
|
|
2942
3170
|
data: VaultByokKeyVerificationCompletedEventResponseData;
|
|
2943
3171
|
}
|
|
2944
|
-
|
|
2945
|
-
|
|
3172
|
+
interface UnknownEvent extends EventBase {
|
|
3173
|
+
event: string;
|
|
3174
|
+
data: Record<string, unknown>;
|
|
3175
|
+
}
|
|
3176
|
+
type Event = AuthenticationEmailVerificationSucceededEvent | AuthenticationMfaSucceededEvent | AuthenticationOAuthFailedEvent | AuthenticationOAuthSucceededEvent | AuthenticationSSOFailedEvent | AuthenticationSSOSucceededEvent | AuthenticationPasskeyFailedEvent | AuthenticationPasskeySucceededEvent | AuthenticationPasswordFailedEvent | AuthenticationPasswordSucceededEvent | AuthenticationMagicAuthFailedEvent | AuthenticationMagicAuthSucceededEvent | AuthenticationRadarRiskDetectedEvent | ConnectionActivatedEvent | ConnectionDeactivatedEvent | ConnectionDeletedEvent | DsyncActivatedEvent | DsyncDeletedEvent | DsyncGroupCreatedEvent | DsyncGroupUpdatedEvent | DsyncGroupDeletedEvent | DsyncGroupUserAddedEvent | DsyncGroupUserRemovedEvent | DsyncUserCreatedEvent | DsyncUserUpdatedEvent | DsyncUserDeletedEvent | EmailVerificationCreatedEvent | InvitationAcceptedEvent | InvitationCreatedEvent | InvitationRevokedEvent | InvitationResentEvent | MagicAuthCreatedEvent | PasswordResetCreatedEvent | PasswordResetSucceededEvent | UserCreatedEvent | UserUpdatedEvent | UserDeletedEvent | OrganizationMembershipCreated | OrganizationMembershipDeleted | OrganizationMembershipUpdated | RoleCreatedEvent | RoleDeletedEvent | RoleUpdatedEvent | OrganizationRoleCreatedEvent | OrganizationRoleUpdatedEvent | OrganizationRoleDeletedEvent | PermissionCreatedEvent | PermissionUpdatedEvent | PermissionDeletedEvent | SessionCreatedEvent | SessionRevokedEvent | OrganizationCreatedEvent | OrganizationUpdatedEvent | OrganizationDeletedEvent | OrganizationDomainVerifiedEvent | OrganizationDomainVerificationFailedEvent | OrganizationDomainCreatedEvent | OrganizationDomainUpdatedEvent | OrganizationDomainDeletedEvent | ApiKeyCreatedEvent | ApiKeyRevokedEvent | FlagCreatedEvent | FlagUpdatedEvent | FlagDeletedEvent | FlagRuleUpdatedEvent | GroupCreatedEvent | GroupUpdatedEvent | GroupDeletedEvent | GroupMemberAddedEvent | GroupMemberRemovedEvent | VaultDataCreatedEvent | VaultDataUpdatedEvent | VaultDataReadEvent | VaultDataDeletedEvent | VaultNamesListedEvent | VaultMetadataReadEvent | VaultKekCreatedEvent | VaultDekReadEvent | VaultDekDecryptedEvent | VaultByokKeyVerificationCompletedEvent;
|
|
3177
|
+
type EventResponse = AuthenticationEmailVerificationSucceededEventResponse | AuthenticationMagicAuthFailedEventResponse | AuthenticationMagicAuthSucceededEventResponse | AuthenticationMfaSucceededEventResponse | AuthenticationOAuthFailedEventResponse | AuthenticationOAuthSucceededEventResponse | AuthenticationPasskeyFailedEventResponse | AuthenticationPasskeySucceededEventResponse | AuthenticationPasswordFailedEventResponse | AuthenticationPasswordSucceededEventResponse | AuthenticationSSOFailedEventResponse | AuthenticationSSOSucceededEventResponse | AuthenticationRadarRiskDetectedEventResponse | ConnectionActivatedEventResponse | ConnectionDeactivatedEventResponse | ConnectionDeletedEventResponse | DsyncActivatedEventResponse | DsyncDeletedEventResponse | DsyncGroupCreatedEventResponse | DsyncGroupUpdatedEventResponse | DsyncGroupDeletedEventResponse | DsyncGroupUserAddedEventResponse | DsyncGroupUserRemovedEventResponse | DsyncUserCreatedEventResponse | DsyncUserUpdatedEventResponse | DsyncUserDeletedEventResponse | EmailVerificationCreatedEventResponse | InvitationAcceptedEventResponse | InvitationCreatedEventResponse | InvitationRevokedEventResponse | InvitationResentEventResponse | MagicAuthCreatedEventResponse | PasswordResetCreatedEventResponse | PasswordResetSucceededEventResponse | UserCreatedEventResponse | UserUpdatedEventResponse | UserDeletedEventResponse | OrganizationMembershipCreatedResponse | OrganizationMembershipDeletedResponse | OrganizationMembershipUpdatedResponse | RoleCreatedEventResponse | RoleDeletedEventResponse | RoleUpdatedEventResponse | OrganizationRoleCreatedEventResponse | OrganizationRoleUpdatedEventResponse | OrganizationRoleDeletedEventResponse | PermissionCreatedEventResponse | PermissionUpdatedEventResponse | PermissionDeletedEventResponse | SessionCreatedEventResponse | SessionRevokedEventResponse | OrganizationCreatedResponse | OrganizationUpdatedResponse | OrganizationDeletedResponse | OrganizationDomainVerifiedEventResponse | OrganizationDomainVerificationFailedEventResponse | OrganizationDomainCreatedEventResponse | OrganizationDomainUpdatedEventResponse | OrganizationDomainDeletedEventResponse | ApiKeyCreatedEventResponse | ApiKeyRevokedEventResponse | FlagCreatedEventResponse | FlagUpdatedEventResponse | FlagDeletedEventResponse | FlagRuleUpdatedEventResponse | GroupCreatedEventResponse | GroupUpdatedEventResponse | GroupDeletedEventResponse | GroupMemberAddedEventResponse | GroupMemberRemovedEventResponse | VaultDataCreatedEventResponse | VaultDataUpdatedEventResponse | VaultDataReadEventResponse | VaultDataDeletedEventResponse | VaultNamesListedEventResponse | VaultMetadataReadEventResponse | VaultKekCreatedEventResponse | VaultDekReadEventResponse | VaultDekDecryptedEventResponse | VaultByokKeyVerificationCompletedEventResponse;
|
|
2946
3178
|
type EventName = Event['event'];
|
|
2947
3179
|
//#endregion
|
|
3180
|
+
//#region src/common/interfaces/generate-link-intent.interface.d.ts
|
|
3181
|
+
declare const GenerateLinkIntent: {
|
|
3182
|
+
readonly SSO: "sso";
|
|
3183
|
+
readonly DSync: "dsync";
|
|
3184
|
+
readonly AuditLogs: "audit_logs";
|
|
3185
|
+
readonly LogStreams: "log_streams";
|
|
3186
|
+
readonly DomainVerification: "domain_verification";
|
|
3187
|
+
readonly CertificateRenewal: "certificate_renewal";
|
|
3188
|
+
readonly BringYourOwnKey: "bring_your_own_key";
|
|
3189
|
+
};
|
|
3190
|
+
type GenerateLinkIntent = (typeof GenerateLinkIntent)[keyof typeof GenerateLinkIntent];
|
|
3191
|
+
//#endregion
|
|
2948
3192
|
//#region src/common/interfaces/get-options.interface.d.ts
|
|
2949
3193
|
interface GetOptions {
|
|
2950
3194
|
query?: Record<string, any>;
|
|
@@ -3035,6 +3279,7 @@ interface WorkOSResponseError {
|
|
|
3035
3279
|
error?: string;
|
|
3036
3280
|
errors?: UnprocessableEntityError[];
|
|
3037
3281
|
message: string;
|
|
3282
|
+
[key: string]: unknown;
|
|
3038
3283
|
}
|
|
3039
3284
|
//#endregion
|
|
3040
3285
|
//#region src/organizations/interfaces/domain-data.interface.d.ts
|
|
@@ -3069,20 +3314,34 @@ interface ListOrganizationFeatureFlagsOptions extends PaginationOptions {
|
|
|
3069
3314
|
//#endregion
|
|
3070
3315
|
//#region src/organizations/interfaces/list-organizations-options.interface.d.ts
|
|
3071
3316
|
interface ListOrganizationsOptions extends PaginationOptions {
|
|
3317
|
+
/** The domains of an Organization. Any Organization with a matching domain will be returned. */
|
|
3072
3318
|
domains?: string[];
|
|
3073
3319
|
}
|
|
3074
3320
|
//#endregion
|
|
3075
3321
|
//#region src/organizations/interfaces/organization.interface.d.ts
|
|
3076
3322
|
interface Organization {
|
|
3323
|
+
/** Distinguishes the Organization object. */
|
|
3077
3324
|
object: 'organization';
|
|
3325
|
+
/** Unique identifier of the Organization. */
|
|
3078
3326
|
id: string;
|
|
3327
|
+
/** A descriptive name for the Organization. This field does not need to be unique. */
|
|
3079
3328
|
name: string;
|
|
3329
|
+
/**
|
|
3330
|
+
* Whether the Organization allows profiles outside of its managed domains.
|
|
3331
|
+
* @deprecated
|
|
3332
|
+
*/
|
|
3080
3333
|
allowProfilesOutsideOrganization: boolean;
|
|
3334
|
+
/** List of Organization Domains. */
|
|
3081
3335
|
domains: OrganizationDomain[];
|
|
3336
|
+
/** The Stripe customer ID of the Organization. */
|
|
3082
3337
|
stripeCustomerId?: string;
|
|
3338
|
+
/** An ISO 8601 timestamp. */
|
|
3083
3339
|
createdAt: string;
|
|
3340
|
+
/** An ISO 8601 timestamp. */
|
|
3084
3341
|
updatedAt: string;
|
|
3342
|
+
/** The external ID of the Organization. */
|
|
3085
3343
|
externalId: string | null;
|
|
3344
|
+
/** Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization. */
|
|
3086
3345
|
metadata: Record<string, string>;
|
|
3087
3346
|
}
|
|
3088
3347
|
interface OrganizationResponse {
|
|
@@ -3296,14 +3555,6 @@ declare class PKCE {
|
|
|
3296
3555
|
private base64UrlEncode;
|
|
3297
3556
|
}
|
|
3298
3557
|
//#endregion
|
|
3299
|
-
//#region src/api-keys/api-keys.d.ts
|
|
3300
|
-
declare class ApiKeys {
|
|
3301
|
-
private readonly workos;
|
|
3302
|
-
constructor(workos: WorkOS);
|
|
3303
|
-
validateApiKey(payload: ValidateApiKeyOptions): Promise<ValidateApiKeyResponse>;
|
|
3304
|
-
deleteApiKey(id: string): Promise<void>;
|
|
3305
|
-
}
|
|
3306
|
-
//#endregion
|
|
3307
3558
|
//#region src/common/utils/pagination.d.ts
|
|
3308
3559
|
declare class AutoPaginatable<ResourceType, ParametersType extends PaginationOptions = PaginationOptions> {
|
|
3309
3560
|
protected list: List<ResourceType>;
|
|
@@ -3324,16 +3575,153 @@ declare class AutoPaginatable<ResourceType, ParametersType extends PaginationOpt
|
|
|
3324
3575
|
autoPagination(): Promise<ResourceType[]>;
|
|
3325
3576
|
}
|
|
3326
3577
|
//#endregion
|
|
3578
|
+
//#region src/api-keys/api-keys.d.ts
|
|
3579
|
+
declare class ApiKeys {
|
|
3580
|
+
private readonly workos;
|
|
3581
|
+
constructor(workos: WorkOS);
|
|
3582
|
+
/**
|
|
3583
|
+
* Validate API key
|
|
3584
|
+
*
|
|
3585
|
+
* Validate an API key value and return the API key object if valid.
|
|
3586
|
+
* @param payload - Object containing value.
|
|
3587
|
+
* @returns {Promise<ApiKeyValidationResponse>}
|
|
3588
|
+
* @throws {UnauthorizedException} 401
|
|
3589
|
+
* @throws {UnprocessableEntityException} 422
|
|
3590
|
+
*/
|
|
3591
|
+
createValidation(payload: ValidateApiKeyOptions): Promise<ValidateApiKeyResponse>;
|
|
3592
|
+
/**
|
|
3593
|
+
* Delete an API key
|
|
3594
|
+
*
|
|
3595
|
+
* Permanently deletes an API key. This action cannot be undone. Once deleted, any requests using this API key will fail authentication.
|
|
3596
|
+
* @param id - The unique ID of the API key.
|
|
3597
|
+
*
|
|
3598
|
+
* @example
|
|
3599
|
+
* "api_key_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3600
|
+
*
|
|
3601
|
+
* @returns {Promise<void>}
|
|
3602
|
+
* @throws {NotFoundException} 404
|
|
3603
|
+
*/
|
|
3604
|
+
deleteApiKey(id: string): Promise<void>;
|
|
3605
|
+
/**
|
|
3606
|
+
* List API keys for an organization
|
|
3607
|
+
*
|
|
3608
|
+
* Get a list of all API keys for an organization.
|
|
3609
|
+
* @param organizationId - Unique identifier of the Organization.
|
|
3610
|
+
*
|
|
3611
|
+
* @example
|
|
3612
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3613
|
+
*
|
|
3614
|
+
* @param options - Pagination and filter options.
|
|
3615
|
+
* @returns {Promise<AutoPaginatable<ApiKey>>}
|
|
3616
|
+
* @throws {NotFoundException} 404
|
|
3617
|
+
*/
|
|
3618
|
+
listOrganizationApiKeys(options: ListOrganizationApiKeysOptions): Promise<AutoPaginatable<ApiKey>>;
|
|
3619
|
+
/**
|
|
3620
|
+
* Create an API key for an organization
|
|
3621
|
+
*
|
|
3622
|
+
* Create a new API key for an organization.
|
|
3623
|
+
* @param organizationId - Unique identifier of the Organization.
|
|
3624
|
+
*
|
|
3625
|
+
* @example
|
|
3626
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3627
|
+
*
|
|
3628
|
+
* @param options - Object containing name.
|
|
3629
|
+
* @returns {Promise<ApiKeyWithValue>}
|
|
3630
|
+
* @throws {NotFoundException} 404
|
|
3631
|
+
* @throws {UnprocessableEntityException} 422
|
|
3632
|
+
*/
|
|
3633
|
+
createOrganizationApiKey(options: CreateOrganizationApiKeyOptions, requestOptions?: CreateOrganizationApiKeyRequestOptions): Promise<CreatedApiKey>;
|
|
3634
|
+
}
|
|
3635
|
+
//#endregion
|
|
3327
3636
|
//#region src/directory-sync/directory-sync.d.ts
|
|
3328
3637
|
declare class DirectorySync {
|
|
3329
3638
|
private readonly workos;
|
|
3330
3639
|
constructor(workos: WorkOS);
|
|
3640
|
+
/**
|
|
3641
|
+
* List Directories
|
|
3642
|
+
*
|
|
3643
|
+
* Get a list of all of your existing directories matching the criteria specified.
|
|
3644
|
+
* @param options - Pagination and filter options.
|
|
3645
|
+
* @returns {Promise<AutoPaginatable<Directory, SerializedListDirectoriesOptions>>}
|
|
3646
|
+
* @throws 403 response from the API.
|
|
3647
|
+
* @throws {UnprocessableEntityException} 422
|
|
3648
|
+
*/
|
|
3331
3649
|
listDirectories(options?: ListDirectoriesOptions): Promise<AutoPaginatable<Directory, SerializedListDirectoriesOptions>>;
|
|
3650
|
+
/**
|
|
3651
|
+
* Get a Directory
|
|
3652
|
+
*
|
|
3653
|
+
* Get the details of an existing directory.
|
|
3654
|
+
* @param id - Unique identifier for the Directory.
|
|
3655
|
+
*
|
|
3656
|
+
* @example
|
|
3657
|
+
* "directory_01ECAZ4NV9QMV47GW873HDCX74"
|
|
3658
|
+
*
|
|
3659
|
+
* @returns {Promise<Directory>}
|
|
3660
|
+
* @throws 403 response from the API.
|
|
3661
|
+
* @throws {NotFoundException} 404
|
|
3662
|
+
*/
|
|
3332
3663
|
getDirectory(id: string): Promise<Directory>;
|
|
3664
|
+
/**
|
|
3665
|
+
* Delete a Directory
|
|
3666
|
+
*
|
|
3667
|
+
* Permanently deletes an existing directory. It cannot be undone.
|
|
3668
|
+
* @param id - Unique identifier for the Directory.
|
|
3669
|
+
*
|
|
3670
|
+
* @example
|
|
3671
|
+
* "directory_01ECAZ4NV9QMV47GW873HDCX74"
|
|
3672
|
+
*
|
|
3673
|
+
* @returns {Promise<void>}
|
|
3674
|
+
* @throws 403 response from the API.
|
|
3675
|
+
*/
|
|
3333
3676
|
deleteDirectory(id: string): Promise<void>;
|
|
3677
|
+
/**
|
|
3678
|
+
* List Directory Groups
|
|
3679
|
+
*
|
|
3680
|
+
* Get a list of all of existing directory groups matching the criteria specified.
|
|
3681
|
+
* @param options - Pagination and filter options.
|
|
3682
|
+
* @returns {Promise<AutoPaginatable<DirectoryGroup, ListDirectoryGroupsOptions>>}
|
|
3683
|
+
* @throws 403 response from the API.
|
|
3684
|
+
* @throws {NotFoundException} 404
|
|
3685
|
+
* @throws {UnprocessableEntityException} 422
|
|
3686
|
+
*/
|
|
3334
3687
|
listGroups(options: ListDirectoryGroupsOptions): Promise<AutoPaginatable<DirectoryGroup, ListDirectoryGroupsOptions>>;
|
|
3688
|
+
/**
|
|
3689
|
+
* List Directory Users
|
|
3690
|
+
*
|
|
3691
|
+
* Get a list of all of existing Directory Users matching the criteria specified.
|
|
3692
|
+
* @param options - Pagination and filter options.
|
|
3693
|
+
* @returns {Promise<AutoPaginatable<DirectoryUserWithGroups<TCustomAttributes>, ListDirectoryUsersOptions>>}
|
|
3694
|
+
* @throws 403 response from the API.
|
|
3695
|
+
* @throws {NotFoundException} 404
|
|
3696
|
+
* @throws {UnprocessableEntityException} 422
|
|
3697
|
+
* @throws {RateLimitExceededException} 429
|
|
3698
|
+
*/
|
|
3335
3699
|
listUsers<TCustomAttributes extends object = DefaultCustomAttributes>(options: ListDirectoryUsersOptions): Promise<AutoPaginatable<DirectoryUserWithGroups<TCustomAttributes>, ListDirectoryUsersOptions>>;
|
|
3700
|
+
/**
|
|
3701
|
+
* Get a Directory User
|
|
3702
|
+
*
|
|
3703
|
+
* Get the details of an existing Directory User.
|
|
3704
|
+
* @param user - Unique identifier for the Directory User.
|
|
3705
|
+
*
|
|
3706
|
+
* @example
|
|
3707
|
+
* "directory_user_01E1JG7J09H96KYP8HM9B0G5SJ"
|
|
3708
|
+
* @returns {Promise<DirectoryUserWithGroups<TCustomAttributes>>}
|
|
3709
|
+
* @throws 403 response from the API.
|
|
3710
|
+
* @throws {NotFoundException} 404
|
|
3711
|
+
*/
|
|
3336
3712
|
getUser<TCustomAttributes extends object = DefaultCustomAttributes>(user: string): Promise<DirectoryUserWithGroups<TCustomAttributes>>;
|
|
3713
|
+
/**
|
|
3714
|
+
* Get a Directory Group
|
|
3715
|
+
*
|
|
3716
|
+
* Get the details of an existing Directory Group.
|
|
3717
|
+
* @param group - Unique identifier for the Directory Group.
|
|
3718
|
+
*
|
|
3719
|
+
* @example
|
|
3720
|
+
* "directory_group_01E1JJS84MFPPQ3G655FHTKX6Z"
|
|
3721
|
+
* @returns {Promise<DirectoryGroup>}
|
|
3722
|
+
* @throws 403 response from the API.
|
|
3723
|
+
* @throws {NotFoundException} 404
|
|
3724
|
+
*/
|
|
3337
3725
|
getGroup(group: string): Promise<DirectoryGroup>;
|
|
3338
3726
|
}
|
|
3339
3727
|
//#endregion
|
|
@@ -3361,38 +3749,148 @@ interface SerializedListEventOptions {
|
|
|
3361
3749
|
declare class Events {
|
|
3362
3750
|
private readonly workos;
|
|
3363
3751
|
constructor(workos: WorkOS);
|
|
3752
|
+
/**
|
|
3753
|
+
* List events
|
|
3754
|
+
*
|
|
3755
|
+
* List events for the current environment.
|
|
3756
|
+
* @param options - Pagination and filter options.
|
|
3757
|
+
* @returns {Promise<List<Event>>}
|
|
3758
|
+
* @throws {BadRequestException} 400
|
|
3759
|
+
* @throws {UnprocessableEntityException} 422
|
|
3760
|
+
*/
|
|
3364
3761
|
listEvents(options: ListEventOptions): Promise<List<Event>>;
|
|
3365
3762
|
}
|
|
3366
3763
|
//#endregion
|
|
3367
|
-
//#region src/organizations/interfaces/list-organization-roles-options.interface.d.ts
|
|
3368
|
-
interface ListOrganizationRolesOptions {
|
|
3369
|
-
organizationId: string;
|
|
3370
|
-
}
|
|
3371
|
-
//#endregion
|
|
3372
3764
|
//#region src/organizations/organizations.d.ts
|
|
3373
3765
|
declare class Organizations {
|
|
3374
3766
|
private readonly workos;
|
|
3375
3767
|
constructor(workos: WorkOS);
|
|
3768
|
+
/**
|
|
3769
|
+
* List Organizations
|
|
3770
|
+
*
|
|
3771
|
+
* Get a list of all of your existing organizations matching the criteria specified.
|
|
3772
|
+
* @param options - Pagination and filter options.
|
|
3773
|
+
* @returns {Promise<AutoPaginatable<Organization, ListOrganizationsOptions>>}
|
|
3774
|
+
* @throws {UnprocessableEntityException} 422
|
|
3775
|
+
*/
|
|
3376
3776
|
listOrganizations(options?: ListOrganizationsOptions): Promise<AutoPaginatable<Organization, ListOrganizationsOptions>>;
|
|
3777
|
+
/**
|
|
3778
|
+
* Create an Organization
|
|
3779
|
+
*
|
|
3780
|
+
* Creates a new organization in the current environment.
|
|
3781
|
+
* @param payload - Object containing name.
|
|
3782
|
+
* @returns {Promise<Organization>}
|
|
3783
|
+
* @throws {BadRequestException} 400
|
|
3784
|
+
* @throws {ConflictException} 409
|
|
3785
|
+
* @throws {UnprocessableEntityException} 422
|
|
3786
|
+
*/
|
|
3377
3787
|
createOrganization(payload: CreateOrganizationOptions, requestOptions?: CreateOrganizationRequestOptions): Promise<Organization>;
|
|
3788
|
+
/**
|
|
3789
|
+
* Delete an Organization
|
|
3790
|
+
*
|
|
3791
|
+
* Permanently deletes an organization in the current environment. It cannot be undone.
|
|
3792
|
+
* @param id - Unique identifier of the Organization.
|
|
3793
|
+
*
|
|
3794
|
+
* @example
|
|
3795
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3796
|
+
*
|
|
3797
|
+
* @returns {Promise<void>}
|
|
3798
|
+
* @throws 403 response from the API.
|
|
3799
|
+
*/
|
|
3378
3800
|
deleteOrganization(id: string): Promise<void>;
|
|
3801
|
+
/**
|
|
3802
|
+
* Get an Organization
|
|
3803
|
+
*
|
|
3804
|
+
* Get the details of an existing organization.
|
|
3805
|
+
* @param id - Unique identifier of the Organization.
|
|
3806
|
+
*
|
|
3807
|
+
* @example
|
|
3808
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
3809
|
+
*
|
|
3810
|
+
* @returns {Promise<Organization>}
|
|
3811
|
+
* @throws {NotFoundException} 404
|
|
3812
|
+
*/
|
|
3379
3813
|
getOrganization(id: string): Promise<Organization>;
|
|
3814
|
+
/**
|
|
3815
|
+
* Get an Organization by External ID
|
|
3816
|
+
*
|
|
3817
|
+
* Get the details of an existing organization by an [external identifier](https://workos.com/docs/authkit/metadata/external-identifiers).
|
|
3818
|
+
* @param externalId - The external ID of the Organization.
|
|
3819
|
+
*
|
|
3820
|
+
* @example
|
|
3821
|
+
* "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191"
|
|
3822
|
+
*
|
|
3823
|
+
* @returns {Promise<Organization>}
|
|
3824
|
+
* @throws {NotFoundException} 404
|
|
3825
|
+
*/
|
|
3380
3826
|
getOrganizationByExternalId(externalId: string): Promise<Organization>;
|
|
3827
|
+
/**
|
|
3828
|
+
* Update an Organization
|
|
3829
|
+
*
|
|
3830
|
+
* Updates an organization in the current environment.
|
|
3831
|
+
* @param payload - The request body.
|
|
3832
|
+
* @returns {Promise<Organization>}
|
|
3833
|
+
* @throws {BadRequestException} 400
|
|
3834
|
+
* @throws 403 response from the API.
|
|
3835
|
+
* @throws {NotFoundException} 404
|
|
3836
|
+
* @throws {ConflictException} 409
|
|
3837
|
+
* @throws {UnprocessableEntityException} 422
|
|
3838
|
+
*/
|
|
3381
3839
|
updateOrganization(options: UpdateOrganizationOptions): Promise<Organization>;
|
|
3382
|
-
listOrganizationRoles(options: ListOrganizationRolesOptions): Promise<RoleList>;
|
|
3383
|
-
listOrganizationFeatureFlags(options: ListOrganizationFeatureFlagsOptions): Promise<AutoPaginatable<FeatureFlag>>;
|
|
3384
|
-
listOrganizationApiKeys(options: ListOrganizationApiKeysOptions): Promise<AutoPaginatable<ApiKey>>;
|
|
3385
|
-
createOrganizationApiKey(options: CreateOrganizationApiKeyOptions, requestOptions?: CreateOrganizationApiKeyRequestOptions): Promise<CreatedApiKey>;
|
|
3386
3840
|
}
|
|
3387
3841
|
//#endregion
|
|
3388
3842
|
//#region src/organization-domains/organization-domains.d.ts
|
|
3389
3843
|
declare class OrganizationDomains {
|
|
3390
3844
|
private readonly workos;
|
|
3391
3845
|
constructor(workos: WorkOS);
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3846
|
+
/**
|
|
3847
|
+
* Get an Organization Domain
|
|
3848
|
+
*
|
|
3849
|
+
* Get the details of an existing organization domain.
|
|
3850
|
+
* @param id - Unique identifier of the organization domain.
|
|
3851
|
+
*
|
|
3852
|
+
* @example
|
|
3853
|
+
* "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A"
|
|
3854
|
+
*
|
|
3855
|
+
* @returns {Promise<OrganizationDomain>}
|
|
3856
|
+
* @throws {NotFoundException} 404
|
|
3857
|
+
*/
|
|
3858
|
+
getOrganizationDomain(id: string): Promise<OrganizationDomain>;
|
|
3859
|
+
/**
|
|
3860
|
+
* Verify an Organization Domain
|
|
3861
|
+
*
|
|
3862
|
+
* Initiates verification process for an Organization Domain.
|
|
3863
|
+
* @param id - Unique identifier of the organization domain.
|
|
3864
|
+
*
|
|
3865
|
+
* @example
|
|
3866
|
+
* "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A"
|
|
3867
|
+
*
|
|
3868
|
+
* @returns {Promise<OrganizationDomain>}
|
|
3869
|
+
* @throws {BadRequestException} 400
|
|
3870
|
+
*/
|
|
3871
|
+
verifyOrganizationDomain(id: string): Promise<OrganizationDomain>;
|
|
3872
|
+
/**
|
|
3873
|
+
* Create an Organization Domain
|
|
3874
|
+
*
|
|
3875
|
+
* Creates a new Organization Domain.
|
|
3876
|
+
* @param payload - Object containing domain, organizationId.
|
|
3877
|
+
* @returns {Promise<OrganizationDomain>}
|
|
3878
|
+
* @throws {ConflictException} 409
|
|
3879
|
+
*/
|
|
3880
|
+
createOrganizationDomain(payload: CreateOrganizationDomainOptions): Promise<OrganizationDomain>;
|
|
3881
|
+
/**
|
|
3882
|
+
* Delete an Organization Domain
|
|
3883
|
+
*
|
|
3884
|
+
* Permanently deletes an organization domain. It cannot be undone.
|
|
3885
|
+
* @param id - Unique identifier of the organization domain.
|
|
3886
|
+
*
|
|
3887
|
+
* @example
|
|
3888
|
+
* "org_domain_01EHZNVPK2QXHMVWCEDQEKY69A"
|
|
3889
|
+
*
|
|
3890
|
+
* @returns {Promise<void>}
|
|
3891
|
+
* @throws {NotFoundException} 404
|
|
3892
|
+
*/
|
|
3893
|
+
deleteOrganizationDomain(id: string): Promise<void>;
|
|
3396
3894
|
}
|
|
3397
3895
|
//#endregion
|
|
3398
3896
|
//#region src/passwordless/interfaces/passwordless-session.interface.d.ts
|
|
@@ -3483,31 +3981,40 @@ declare class Pipes {
|
|
|
3483
3981
|
}): Promise<GetAccessTokenResponse>;
|
|
3484
3982
|
}
|
|
3485
3983
|
//#endregion
|
|
3486
|
-
//#region src/portal/
|
|
3487
|
-
declare
|
|
3488
|
-
AuditLogs = "audit_logs",
|
|
3489
|
-
DomainVerification = "domain_verification",
|
|
3490
|
-
DSync = "dsync",
|
|
3491
|
-
LogStreams = "log_streams",
|
|
3492
|
-
SSO = "sso",
|
|
3493
|
-
CertificateRenewal = "certificate_renewal",
|
|
3494
|
-
BringYourOwnKey = "bring_your_own_key"
|
|
3495
|
-
}
|
|
3496
|
-
//#endregion
|
|
3497
|
-
//#region src/portal/portal.d.ts
|
|
3498
|
-
declare class Portal {
|
|
3984
|
+
//#region src/admin-portal/admin-portal.d.ts
|
|
3985
|
+
declare class AdminPortal {
|
|
3499
3986
|
private readonly workos;
|
|
3500
3987
|
constructor(workos: WorkOS);
|
|
3988
|
+
/**
|
|
3989
|
+
* Generate a Portal Link
|
|
3990
|
+
*
|
|
3991
|
+
* Generate a Portal Link scoped to an Organization.
|
|
3992
|
+
* @param payload - Object containing organization.
|
|
3993
|
+
* @returns {Promise<{ link: string; }>}
|
|
3994
|
+
* @throws {BadRequestException} 400
|
|
3995
|
+
* @throws 403 response from the API.
|
|
3996
|
+
* @throws {NotFoundException} 404
|
|
3997
|
+
* @throws {UnprocessableEntityException} 422
|
|
3998
|
+
*/
|
|
3501
3999
|
generateLink({
|
|
3502
4000
|
intent,
|
|
3503
4001
|
organization,
|
|
3504
4002
|
returnUrl,
|
|
3505
|
-
successUrl
|
|
4003
|
+
successUrl,
|
|
4004
|
+
intentOptions,
|
|
4005
|
+
adminEmails
|
|
3506
4006
|
}: {
|
|
3507
|
-
intent
|
|
4007
|
+
intent?: GenerateLinkIntent;
|
|
3508
4008
|
organization: string;
|
|
3509
4009
|
returnUrl?: string;
|
|
3510
4010
|
successUrl?: string;
|
|
4011
|
+
intentOptions?: {
|
|
4012
|
+
sso: {
|
|
4013
|
+
bookmarkSlug?: string;
|
|
4014
|
+
providerType?: string;
|
|
4015
|
+
};
|
|
4016
|
+
};
|
|
4017
|
+
adminEmails?: string[];
|
|
3511
4018
|
}): Promise<{
|
|
3512
4019
|
link: string;
|
|
3513
4020
|
}>;
|
|
@@ -3517,8 +4024,30 @@ declare class Portal {
|
|
|
3517
4024
|
declare class SSO {
|
|
3518
4025
|
private readonly workos;
|
|
3519
4026
|
constructor(workos: WorkOS);
|
|
3520
|
-
|
|
3521
|
-
|
|
4027
|
+
/**
|
|
4028
|
+
* List Connections
|
|
4029
|
+
*
|
|
4030
|
+
* Get a list of all of your existing connections matching the criteria specified.
|
|
4031
|
+
* @param options - Pagination and filter options.
|
|
4032
|
+
* @returns {Promise<AutoPaginatable<Connection, SerializedListConnectionsOptions>>}
|
|
4033
|
+
* @throws 403 response from the API.
|
|
4034
|
+
* @throws {UnprocessableEntityException} 422
|
|
4035
|
+
*/
|
|
4036
|
+
listConnections(options?: ListConnectionsOptions): Promise<AutoPaginatable<Connection, SerializedListConnectionsOptions>>;
|
|
4037
|
+
/**
|
|
4038
|
+
* Delete a Connection
|
|
4039
|
+
*
|
|
4040
|
+
* Permanently deletes an existing connection. It cannot be undone.
|
|
4041
|
+
* @param id - Unique identifier for the Connection.
|
|
4042
|
+
*
|
|
4043
|
+
* @example
|
|
4044
|
+
* "conn_01E4ZCR3C56J083X43JQXF3JK5"
|
|
4045
|
+
*
|
|
4046
|
+
* @returns {Promise<void>}
|
|
4047
|
+
* @throws 403 response from the API.
|
|
4048
|
+
* @throws {NotFoundException} 404
|
|
4049
|
+
*/
|
|
4050
|
+
deleteConnection(id: string): Promise<void>;
|
|
3522
4051
|
getAuthorizationUrl(options: SSOAuthorizationURLOptions): string;
|
|
3523
4052
|
/**
|
|
3524
4053
|
* Generates an authorization URL with PKCE parameters automatically generated.
|
|
@@ -3545,6 +4074,19 @@ declare class SSO {
|
|
|
3545
4074
|
* ```
|
|
3546
4075
|
*/
|
|
3547
4076
|
getAuthorizationUrlWithPKCE(options: Omit<SSOAuthorizationURLOptions, 'codeChallenge' | 'codeChallengeMethod' | 'state'>): Promise<SSOPKCEAuthorizationURLResult>;
|
|
4077
|
+
/**
|
|
4078
|
+
* Get a Connection
|
|
4079
|
+
*
|
|
4080
|
+
* Get the details of an existing connection.
|
|
4081
|
+
* @param id - Unique identifier for the Connection.
|
|
4082
|
+
*
|
|
4083
|
+
* @example
|
|
4084
|
+
* "conn_01E4ZCR3C56J083X43JQXF3JK5"
|
|
4085
|
+
*
|
|
4086
|
+
* @returns {Promise<Connection>}
|
|
4087
|
+
* @throws 403 response from the API.
|
|
4088
|
+
* @throws {NotFoundException} 404
|
|
4089
|
+
*/
|
|
3548
4090
|
getConnection(id: string): Promise<Connection>;
|
|
3549
4091
|
/**
|
|
3550
4092
|
* Exchange an authorization code for a profile and access token.
|
|
@@ -3564,12 +4106,20 @@ declare class SSO {
|
|
|
3564
4106
|
clientId,
|
|
3565
4107
|
codeVerifier
|
|
3566
4108
|
}: GetProfileAndTokenOptions): Promise<ProfileAndToken<CustomAttributesType>>;
|
|
4109
|
+
/**
|
|
4110
|
+
* Get a User Profile
|
|
4111
|
+
*
|
|
4112
|
+
* Exchange an access token for a user's [Profile](https://workos.com/docs/reference/sso/profile). Because this profile is returned in the [Get a Profile and Token endpoint](https://workos.com/docs/reference/sso/profile/get-profile-and-token) your application usually does not need to call this endpoint. It is available for any authentication flows that require an additional endpoint to retrieve a user's profile.
|
|
4113
|
+
* @returns {Promise<Profile<CustomAttributesType>>}
|
|
4114
|
+
* @throws {UnauthorizedException} 401
|
|
4115
|
+
* @throws {NotFoundException} 404
|
|
4116
|
+
*/
|
|
3567
4117
|
getProfile<CustomAttributesType extends UnknownRecord = UnknownRecord>({
|
|
3568
4118
|
accessToken
|
|
3569
4119
|
}: GetProfileOptions): Promise<Profile<CustomAttributesType>>;
|
|
3570
4120
|
}
|
|
3571
4121
|
//#endregion
|
|
3572
|
-
//#region src/
|
|
4122
|
+
//#region src/multi-factor-auth/interfaces/challenge-factor-options.d.ts
|
|
3573
4123
|
type ChallengeFactorOptions = {
|
|
3574
4124
|
authenticationFactorId: string;
|
|
3575
4125
|
} | {
|
|
@@ -3577,7 +4127,7 @@ type ChallengeFactorOptions = {
|
|
|
3577
4127
|
smsTemplate: string;
|
|
3578
4128
|
};
|
|
3579
4129
|
//#endregion
|
|
3580
|
-
//#region src/
|
|
4130
|
+
//#region src/multi-factor-auth/interfaces/challenge.interface.d.ts
|
|
3581
4131
|
interface Challenge {
|
|
3582
4132
|
object: 'authentication_challenge';
|
|
3583
4133
|
id: string;
|
|
@@ -3588,7 +4138,7 @@ interface Challenge {
|
|
|
3588
4138
|
authenticationFactorId: string;
|
|
3589
4139
|
}
|
|
3590
4140
|
//#endregion
|
|
3591
|
-
//#region src/
|
|
4141
|
+
//#region src/multi-factor-auth/interfaces/enroll-factor-options.d.ts
|
|
3592
4142
|
type EnrollFactorOptions = {
|
|
3593
4143
|
type: 'sms';
|
|
3594
4144
|
phoneNumber: string;
|
|
@@ -3600,12 +4150,12 @@ type EnrollFactorOptions = {
|
|
|
3600
4150
|
type: 'generic_otp';
|
|
3601
4151
|
};
|
|
3602
4152
|
//#endregion
|
|
3603
|
-
//#region src/
|
|
4153
|
+
//#region src/multi-factor-auth/interfaces/sms.interface.d.ts
|
|
3604
4154
|
interface Sms {
|
|
3605
4155
|
phoneNumber: string;
|
|
3606
4156
|
}
|
|
3607
4157
|
//#endregion
|
|
3608
|
-
//#region src/
|
|
4158
|
+
//#region src/multi-factor-auth/interfaces/factor.interface.d.ts
|
|
3609
4159
|
type FactorType = 'sms' | 'totp' | 'generic_otp';
|
|
3610
4160
|
interface Factor {
|
|
3611
4161
|
object: 'authentication_factor';
|
|
@@ -3626,27 +4176,99 @@ interface FactorWithSecrets {
|
|
|
3626
4176
|
totp?: TotpWithSecrets;
|
|
3627
4177
|
}
|
|
3628
4178
|
//#endregion
|
|
3629
|
-
//#region src/
|
|
4179
|
+
//#region src/multi-factor-auth/interfaces/verify-challenge-options.d.ts
|
|
3630
4180
|
interface VerifyChallengeOptions {
|
|
3631
4181
|
authenticationChallengeId: string;
|
|
3632
4182
|
code: string;
|
|
3633
4183
|
}
|
|
3634
4184
|
//#endregion
|
|
3635
|
-
//#region src/
|
|
4185
|
+
//#region src/multi-factor-auth/interfaces/verify-challenge-response.d.ts
|
|
3636
4186
|
interface VerifyResponse {
|
|
3637
4187
|
challenge: Challenge;
|
|
3638
4188
|
valid: boolean;
|
|
3639
4189
|
}
|
|
3640
4190
|
//#endregion
|
|
3641
|
-
//#region src/
|
|
3642
|
-
declare class
|
|
4191
|
+
//#region src/multi-factor-auth/multi-factor-auth.d.ts
|
|
4192
|
+
declare class MultiFactorAuth {
|
|
3643
4193
|
private readonly workos;
|
|
3644
4194
|
constructor(workos: WorkOS);
|
|
4195
|
+
/**
|
|
4196
|
+
* Delete Factor
|
|
4197
|
+
*
|
|
4198
|
+
* Permanently deletes an Authentication Factor. It cannot be undone.
|
|
4199
|
+
* @param id - The unique ID of the Factor.
|
|
4200
|
+
*
|
|
4201
|
+
* @example
|
|
4202
|
+
* "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ"
|
|
4203
|
+
*
|
|
4204
|
+
* @returns {Promise<void>}
|
|
4205
|
+
* @throws {NotFoundException} 404
|
|
4206
|
+
*/
|
|
3645
4207
|
deleteFactor(id: string): Promise<void>;
|
|
4208
|
+
/**
|
|
4209
|
+
* Get Factor
|
|
4210
|
+
*
|
|
4211
|
+
* Gets an Authentication Factor.
|
|
4212
|
+
* @param id - The unique ID of the Factor.
|
|
4213
|
+
*
|
|
4214
|
+
* @example
|
|
4215
|
+
* "auth_factor_01FVYZ5QM8N98T9ME5BCB2BBMJ"
|
|
4216
|
+
*
|
|
4217
|
+
* @returns {Promise<Factor>}
|
|
4218
|
+
* @throws {NotFoundException} 404
|
|
4219
|
+
*/
|
|
3646
4220
|
getFactor(id: string): Promise<Factor>;
|
|
4221
|
+
/**
|
|
4222
|
+
* Enroll Factor
|
|
4223
|
+
*
|
|
4224
|
+
* Enrolls an Authentication Factor to be used as an additional factor of authentication. The returned ID should be used to create an authentication Challenge.
|
|
4225
|
+
* @param options - Object containing type.
|
|
4226
|
+
* @returns {Promise<FactorWithSecrets>}
|
|
4227
|
+
* @throws {UnprocessableEntityException} 422
|
|
4228
|
+
*/
|
|
3647
4229
|
enrollFactor(options: EnrollFactorOptions): Promise<FactorWithSecrets>;
|
|
4230
|
+
/**
|
|
4231
|
+
* Challenge Factor
|
|
4232
|
+
*
|
|
4233
|
+
* Creates a Challenge for an Authentication Factor.
|
|
4234
|
+
* @param options - The request body.
|
|
4235
|
+
* @returns {Promise<Challenge>}
|
|
4236
|
+
* @throws {NotFoundException} 404
|
|
4237
|
+
* @throws {UnprocessableEntityException} 422
|
|
4238
|
+
*/
|
|
3648
4239
|
challengeFactor(options: ChallengeFactorOptions): Promise<Challenge>;
|
|
4240
|
+
/**
|
|
4241
|
+
* Verify Challenge
|
|
4242
|
+
*
|
|
4243
|
+
* Verifies an Authentication Challenge.
|
|
4244
|
+
* @param options - Object containing code.
|
|
4245
|
+
* @returns {Promise<VerifyResponse>}
|
|
4246
|
+
* @throws {BadRequestException} 400
|
|
4247
|
+
* @throws {NotFoundException} 404
|
|
4248
|
+
* @throws {UnprocessableEntityException} 422
|
|
4249
|
+
*/
|
|
3649
4250
|
verifyChallenge(options: VerifyChallengeOptions): Promise<VerifyResponse>;
|
|
4251
|
+
/**
|
|
4252
|
+
* Enroll an authentication factor
|
|
4253
|
+
*
|
|
4254
|
+
* Enrolls a user in a new [authentication factor](https://workos.com/docs/reference/authkit/mfa/authentication-factor).
|
|
4255
|
+
* @param payload - Object containing type.
|
|
4256
|
+
* @returns {Promise<{authenticationFactor: UMFactorWithSecrets; authenticationChallenge: Challenge}>}
|
|
4257
|
+
* @throws {UnprocessableEntityException} 422
|
|
4258
|
+
*/
|
|
4259
|
+
createUserAuthFactor(payload: EnrollAuthFactorOptions): Promise<{
|
|
4260
|
+
authenticationFactor: FactorWithSecrets$1;
|
|
4261
|
+
authenticationChallenge: Challenge;
|
|
4262
|
+
}>;
|
|
4263
|
+
/**
|
|
4264
|
+
* List authentication factors
|
|
4265
|
+
*
|
|
4266
|
+
* Lists the [authentication factors](https://workos.com/docs/reference/authkit/mfa/authentication-factor) for a user.
|
|
4267
|
+
* @param options - Pagination and filter options.
|
|
4268
|
+
* @returns {Promise<AutoPaginatable<UMFactor, PaginationOptions>>}
|
|
4269
|
+
* @throws {UnprocessableEntityException} 422
|
|
4270
|
+
*/
|
|
4271
|
+
listUserAuthFactors(options: ListAuthFactorsOptions): Promise<AutoPaginatable<Factor$1, PaginationOptions>>;
|
|
3650
4272
|
}
|
|
3651
4273
|
//#endregion
|
|
3652
4274
|
//#region src/audit-logs/interfaces/audit-log-export-options.interface.d.ts
|
|
@@ -3687,6 +4309,49 @@ interface AuditLogExportResponse {
|
|
|
3687
4309
|
updated_at: string;
|
|
3688
4310
|
}
|
|
3689
4311
|
//#endregion
|
|
4312
|
+
//#region src/audit-logs/interfaces/audit-log-schema.interface.d.ts
|
|
4313
|
+
type AuditLogSchemaMetadata = Record<string, {
|
|
4314
|
+
type: 'string' | 'boolean' | 'number';
|
|
4315
|
+
}> | undefined;
|
|
4316
|
+
interface AuditLogActorSchema {
|
|
4317
|
+
metadata: Record<string, string | boolean | number>;
|
|
4318
|
+
}
|
|
4319
|
+
interface AuditLogTargetSchema {
|
|
4320
|
+
type: string;
|
|
4321
|
+
metadata?: Record<string, string | boolean | number>;
|
|
4322
|
+
}
|
|
4323
|
+
interface AuditLogSchema {
|
|
4324
|
+
object: 'audit_log_schema';
|
|
4325
|
+
version: number;
|
|
4326
|
+
targets: AuditLogTargetSchema[];
|
|
4327
|
+
actor: AuditLogActorSchema | undefined;
|
|
4328
|
+
metadata: Record<string, string | boolean | number> | undefined;
|
|
4329
|
+
createdAt: string;
|
|
4330
|
+
}
|
|
4331
|
+
interface SerializedAuditLogTargetSchema$1 {
|
|
4332
|
+
type: string;
|
|
4333
|
+
metadata?: {
|
|
4334
|
+
type: 'object';
|
|
4335
|
+
properties: AuditLogSchemaMetadata;
|
|
4336
|
+
};
|
|
4337
|
+
}
|
|
4338
|
+
interface AuditLogSchemaResponse {
|
|
4339
|
+
object: 'audit_log_schema';
|
|
4340
|
+
version: number;
|
|
4341
|
+
targets: SerializedAuditLogTargetSchema$1[];
|
|
4342
|
+
actor?: {
|
|
4343
|
+
metadata: {
|
|
4344
|
+
type: 'object';
|
|
4345
|
+
properties: AuditLogSchemaMetadata;
|
|
4346
|
+
};
|
|
4347
|
+
};
|
|
4348
|
+
metadata?: {
|
|
4349
|
+
type: 'object';
|
|
4350
|
+
properties: AuditLogSchemaMetadata;
|
|
4351
|
+
};
|
|
4352
|
+
created_at: string;
|
|
4353
|
+
}
|
|
4354
|
+
//#endregion
|
|
3690
4355
|
//#region src/audit-logs/interfaces/create-audit-log-event-options.interface.d.ts
|
|
3691
4356
|
interface AuditLogActor {
|
|
3692
4357
|
id: string;
|
|
@@ -3727,24 +4392,6 @@ interface SerializedCreateAuditLogEventOptions {
|
|
|
3727
4392
|
type CreateAuditLogEventRequestOptions = Pick<PostOptions, 'idempotencyKey'>;
|
|
3728
4393
|
//#endregion
|
|
3729
4394
|
//#region src/audit-logs/interfaces/create-audit-log-schema-options.interface.d.ts
|
|
3730
|
-
type AuditLogSchemaMetadata = Record<string, {
|
|
3731
|
-
type: 'string' | 'boolean' | 'number';
|
|
3732
|
-
}> | undefined;
|
|
3733
|
-
interface AuditLogSchema {
|
|
3734
|
-
object: 'audit_log_schema';
|
|
3735
|
-
version: number;
|
|
3736
|
-
targets: AuditLogTargetSchema[];
|
|
3737
|
-
actor: AuditLogActorSchema;
|
|
3738
|
-
metadata: Record<string, string | boolean | number> | undefined;
|
|
3739
|
-
createdAt: string;
|
|
3740
|
-
}
|
|
3741
|
-
interface AuditLogActorSchema {
|
|
3742
|
-
metadata: Record<string, string | boolean | number>;
|
|
3743
|
-
}
|
|
3744
|
-
interface AuditLogTargetSchema {
|
|
3745
|
-
type: string;
|
|
3746
|
-
metadata?: Record<string, string | boolean | number> | undefined;
|
|
3747
|
-
}
|
|
3748
4395
|
interface CreateAuditLogSchemaOptions {
|
|
3749
4396
|
action: string;
|
|
3750
4397
|
targets: AuditLogTargetSchema[];
|
|
@@ -3771,32 +4418,64 @@ interface SerializedCreateAuditLogSchemaOptions {
|
|
|
3771
4418
|
properties: AuditLogSchemaMetadata;
|
|
3772
4419
|
};
|
|
3773
4420
|
}
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
version: number;
|
|
3777
|
-
targets: SerializedAuditLogTargetSchema[];
|
|
3778
|
-
actor: {
|
|
3779
|
-
metadata: {
|
|
3780
|
-
type: 'object';
|
|
3781
|
-
properties: AuditLogSchemaMetadata;
|
|
3782
|
-
};
|
|
3783
|
-
};
|
|
3784
|
-
metadata?: {
|
|
3785
|
-
type: 'object';
|
|
3786
|
-
properties: AuditLogSchemaMetadata;
|
|
3787
|
-
};
|
|
3788
|
-
created_at: string;
|
|
3789
|
-
}
|
|
4421
|
+
/** @deprecated Use AuditLogSchemaResponse instead */
|
|
4422
|
+
type CreateAuditLogSchemaResponse = AuditLogSchemaResponse;
|
|
3790
4423
|
type CreateAuditLogSchemaRequestOptions = Pick<PostOptions, 'idempotencyKey'>;
|
|
3791
4424
|
//#endregion
|
|
3792
4425
|
//#region src/audit-logs/audit-logs.d.ts
|
|
3793
4426
|
declare class AuditLogs {
|
|
3794
4427
|
private readonly workos;
|
|
3795
4428
|
constructor(workos: WorkOS);
|
|
4429
|
+
/**
|
|
4430
|
+
* Create Event
|
|
4431
|
+
*
|
|
4432
|
+
* Create an Audit Log Event.
|
|
4433
|
+
*
|
|
4434
|
+
* This API supports idempotency which guarantees that performing the same operation multiple times will have the same result as if the operation were performed only once. This is handy in situations where you may need to retry a request due to a failure or prevent accidental duplicate requests from creating more than one resource.
|
|
4435
|
+
*
|
|
4436
|
+
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value. Each subsequent request matching this unique string will return the same response. We suggest using [v4 UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for idempotency keys to avoid collisions.
|
|
4437
|
+
*
|
|
4438
|
+
* Idempotency keys expire after 24 hours. The API will generate a new response if you submit a request with an expired key.
|
|
4439
|
+
* @param payload - Object containing organizationId, event.
|
|
4440
|
+
* @returns {Promise<void>}
|
|
4441
|
+
* @throws {BadRequestException} 400
|
|
4442
|
+
* @throws {NotFoundException} 404
|
|
4443
|
+
* @throws {UnprocessableEntityException} 422
|
|
4444
|
+
* @throws {RateLimitExceededException} 429
|
|
4445
|
+
*/
|
|
3796
4446
|
createEvent(organization: string, event: CreateAuditLogEventOptions, options?: CreateAuditLogEventRequestOptions): Promise<void>;
|
|
4447
|
+
/**
|
|
4448
|
+
* Create Export
|
|
4449
|
+
*
|
|
4450
|
+
* Create an Audit Log Export. Exports are scoped to a single organization within a specified date range.
|
|
4451
|
+
* @param payload - Object containing organizationId, rangeStart, rangeEnd.
|
|
4452
|
+
* @returns {Promise<AuditLogExport>}
|
|
4453
|
+
* @throws {BadRequestException} 400
|
|
4454
|
+
*/
|
|
3797
4455
|
createExport(options: AuditLogExportOptions): Promise<AuditLogExport>;
|
|
4456
|
+
/**
|
|
4457
|
+
* Get Export
|
|
4458
|
+
*
|
|
4459
|
+
* Get an Audit Log Export. The URL will expire after 10 minutes. If the export is needed again at a later time, refetching the export will regenerate the URL.
|
|
4460
|
+
* @param auditLogExportId - The unique ID of the Audit Log Export.
|
|
4461
|
+
*
|
|
4462
|
+
* @example
|
|
4463
|
+
* "audit_log_export_01GBZK5MP7TD1YCFQHFR22180V"
|
|
4464
|
+
*
|
|
4465
|
+
* @returns {Promise<AuditLogExport>}
|
|
4466
|
+
* @throws {NotFoundException} 404
|
|
4467
|
+
*/
|
|
3798
4468
|
getExport(auditLogExportId: string): Promise<AuditLogExport>;
|
|
4469
|
+
/**
|
|
4470
|
+
* Create Schema
|
|
4471
|
+
*
|
|
4472
|
+
* Creates a new Audit Log schema used to validate the payload of incoming Audit Log Events. If the `action` does not exist, it will also be created.
|
|
4473
|
+
* @param payload - Object containing targets.
|
|
4474
|
+
* @returns {Promise<AuditLogSchema>}
|
|
4475
|
+
* @throws {UnprocessableEntityException} 422
|
|
4476
|
+
*/
|
|
3799
4477
|
createSchema(schema: CreateAuditLogSchemaOptions, options?: CreateAuditLogSchemaRequestOptions): Promise<AuditLogSchema>;
|
|
4478
|
+
listSchemas(action: string, options?: PaginationOptions): Promise<AutoPaginatable<AuditLogSchema, PaginationOptions>>;
|
|
3800
4479
|
}
|
|
3801
4480
|
//#endregion
|
|
3802
4481
|
//#region node_modules/jose/dist/types/types.d.ts
|
|
@@ -4252,11 +4931,51 @@ declare class UserManagement {
|
|
|
4252
4931
|
sessionData: string;
|
|
4253
4932
|
cookiePassword: string;
|
|
4254
4933
|
}): CookieSession;
|
|
4934
|
+
/**
|
|
4935
|
+
* Get a user
|
|
4936
|
+
*
|
|
4937
|
+
* Get the details of an existing user.
|
|
4938
|
+
* @param userId - The unique ID of the user.
|
|
4939
|
+
* @returns {Promise<User>}
|
|
4940
|
+
* @throws {NotFoundException} 404
|
|
4941
|
+
*/
|
|
4255
4942
|
getUser(userId: string): Promise<User>;
|
|
4943
|
+
/**
|
|
4944
|
+
* Get a user by external ID
|
|
4945
|
+
*
|
|
4946
|
+
* Get the details of an existing user by an [external identifier](https://workos.com/docs/authkit/metadata/external-identifiers).
|
|
4947
|
+
* @param externalId - The external ID of the user.
|
|
4948
|
+
*
|
|
4949
|
+
* @example
|
|
4950
|
+
* "f1ffa2b2-c20b-4d39-be5c-212726e11222"
|
|
4951
|
+
*
|
|
4952
|
+
* @returns {Promise<User>}
|
|
4953
|
+
* @throws {NotFoundException} 404
|
|
4954
|
+
*/
|
|
4256
4955
|
getUserByExternalId(externalId: string): Promise<User>;
|
|
4956
|
+
/**
|
|
4957
|
+
* List users
|
|
4958
|
+
*
|
|
4959
|
+
* Get a list of all of your existing users matching the criteria specified.
|
|
4960
|
+
* @param options - Pagination and filter options.
|
|
4961
|
+
* @returns {Promise<AutoPaginatable<User, SerializedListUsersOptions>>}
|
|
4962
|
+
* @throws {UnprocessableEntityException} 422
|
|
4963
|
+
*/
|
|
4257
4964
|
listUsers(options?: ListUsersOptions): Promise<AutoPaginatable<User, SerializedListUsersOptions>>;
|
|
4965
|
+
/**
|
|
4966
|
+
* Create a user
|
|
4967
|
+
*
|
|
4968
|
+
* Create a new user in the current environment.
|
|
4969
|
+
* @param payload - Object containing email.
|
|
4970
|
+
* @returns {Promise<User>}
|
|
4971
|
+
* @throws {BadRequestException} 400
|
|
4972
|
+
* @throws {NotFoundException} 404
|
|
4973
|
+
* @throws {UnprocessableEntityException} 422
|
|
4974
|
+
*/
|
|
4258
4975
|
createUser(payload: CreateUserOptions): Promise<User>;
|
|
4976
|
+
/** Authenticate with magic auth. */
|
|
4259
4977
|
authenticateWithMagicAuth(payload: AuthenticateWithMagicAuthOptions): Promise<AuthenticationResponse>;
|
|
4978
|
+
/** Authenticate with password. */
|
|
4260
4979
|
authenticateWithPassword(payload: AuthenticateWithPasswordOptions): Promise<AuthenticationResponse>;
|
|
4261
4980
|
/**
|
|
4262
4981
|
* Exchange an authorization code for tokens.
|
|
@@ -4288,8 +5007,11 @@ declare class UserManagement {
|
|
|
4288
5007
|
* omits client_secret from the request.
|
|
4289
5008
|
*/
|
|
4290
5009
|
authenticateWithRefreshToken(payload: AuthenticateWithRefreshTokenOptions): Promise<AuthenticationResponse>;
|
|
5010
|
+
/** Authenticate with totp. */
|
|
4291
5011
|
authenticateWithTotp(payload: AuthenticateWithTotpOptions): Promise<AuthenticationResponse>;
|
|
5012
|
+
/** Authenticate with email verification. */
|
|
4292
5013
|
authenticateWithEmailVerification(payload: AuthenticateWithEmailVerificationOptions): Promise<AuthenticationResponse>;
|
|
5014
|
+
/** Authenticate with organization selection. */
|
|
4293
5015
|
authenticateWithOrganizationSelection(payload: AuthenticateWithOrganizationSelectionOptions): Promise<AuthenticationResponse>;
|
|
4294
5016
|
authenticateWithSessionCookie({
|
|
4295
5017
|
sessionData,
|
|
@@ -4302,49 +5024,270 @@ declare class UserManagement {
|
|
|
4302
5024
|
sessionData,
|
|
4303
5025
|
cookiePassword
|
|
4304
5026
|
}: SessionHandlerOptions): Promise<SessionCookieData | undefined>;
|
|
5027
|
+
/**
|
|
5028
|
+
* Get an email verification code
|
|
5029
|
+
*
|
|
5030
|
+
* Get the details of an existing email verification code that can be used to send an email to a user for verification.
|
|
5031
|
+
* @returns {Promise<EmailVerification>}
|
|
5032
|
+
* @throws {NotFoundException} 404
|
|
5033
|
+
*/
|
|
4305
5034
|
getEmailVerification(emailVerificationId: string): Promise<EmailVerification>;
|
|
5035
|
+
/**
|
|
5036
|
+
* Send verification email
|
|
5037
|
+
*
|
|
5038
|
+
* Sends an email that contains a one-time code used to verify a user’s email address.
|
|
5039
|
+
* @returns {Promise<{ user: User; }>}
|
|
5040
|
+
* @throws {BadRequestException} 400
|
|
5041
|
+
* @throws {NotFoundException} 404
|
|
5042
|
+
* @throws {RateLimitExceededException} 429
|
|
5043
|
+
*/
|
|
4306
5044
|
sendVerificationEmail({
|
|
4307
5045
|
userId
|
|
4308
5046
|
}: SendVerificationEmailOptions): Promise<{
|
|
4309
5047
|
user: User;
|
|
4310
5048
|
}>;
|
|
5049
|
+
/**
|
|
5050
|
+
* Get Magic Auth code details
|
|
5051
|
+
*
|
|
5052
|
+
* Get the details of an existing [Magic Auth](https://workos.com/docs/reference/authkit/magic-auth) code that can be used to send an email to a user for authentication.
|
|
5053
|
+
* @returns {Promise<MagicAuth>}
|
|
5054
|
+
* @throws {NotFoundException} 404
|
|
5055
|
+
*/
|
|
4311
5056
|
getMagicAuth(magicAuthId: string): Promise<MagicAuth>;
|
|
5057
|
+
/**
|
|
5058
|
+
* Create a Magic Auth code
|
|
5059
|
+
*
|
|
5060
|
+
* Creates a one-time authentication code that can be sent to the user's email address. The code expires in 10 minutes. To verify the code, [authenticate the user with Magic Auth](https://workos.com/docs/reference/authkit/authentication/magic-auth).
|
|
5061
|
+
* @param options - Object containing email.
|
|
5062
|
+
* @returns {Promise<MagicAuth>}
|
|
5063
|
+
* @throws {BadRequestException} 400
|
|
5064
|
+
* @throws {UnprocessableEntityException} 422
|
|
5065
|
+
* @throws {RateLimitExceededException} 429
|
|
5066
|
+
*/
|
|
4312
5067
|
createMagicAuth(options: CreateMagicAuthOptions): Promise<MagicAuth>;
|
|
5068
|
+
/**
|
|
5069
|
+
* Verify email
|
|
5070
|
+
*
|
|
5071
|
+
* Verifies an email address using the one-time code received by the user.
|
|
5072
|
+
* @param options - Object containing code.
|
|
5073
|
+
* @returns {Promise<{ user: User; }>}
|
|
5074
|
+
* @throws {BadRequestException} 400
|
|
5075
|
+
* @throws {NotFoundException} 404
|
|
5076
|
+
* @throws {UnprocessableEntityException} 422
|
|
5077
|
+
*/
|
|
4313
5078
|
verifyEmail({
|
|
4314
5079
|
code,
|
|
4315
5080
|
userId
|
|
4316
5081
|
}: VerifyEmailOptions): Promise<{
|
|
4317
5082
|
user: User;
|
|
4318
5083
|
}>;
|
|
5084
|
+
/**
|
|
5085
|
+
* Get a password reset token
|
|
5086
|
+
*
|
|
5087
|
+
* Get the details of an existing password reset token that can be used to reset a user's password.
|
|
5088
|
+
* @returns {Promise<PasswordReset>}
|
|
5089
|
+
* @throws {NotFoundException} 404
|
|
5090
|
+
*/
|
|
4319
5091
|
getPasswordReset(passwordResetId: string): Promise<PasswordReset>;
|
|
4320
5092
|
createPasswordReset(options: CreatePasswordResetOptions): Promise<PasswordReset>;
|
|
5093
|
+
/**
|
|
5094
|
+
* Reset the password
|
|
5095
|
+
*
|
|
5096
|
+
* Sets a new password using the `token` query parameter from the link that
|
|
5097
|
+
* the user received. Successfully resetting the password will verify a
|
|
5098
|
+
* user's email, if it hasn't been verified yet.
|
|
5099
|
+
* @param payload - Object containing the reset token and new password.
|
|
5100
|
+
* @returns {Promise<{ user: User; }>}
|
|
5101
|
+
* @throws 403 response from the API.
|
|
5102
|
+
* @throws {NotFoundException} 404
|
|
5103
|
+
* @throws {UnprocessableEntityException} 422
|
|
5104
|
+
* @throws {RateLimitExceededException} 429
|
|
5105
|
+
*/
|
|
4321
5106
|
resetPassword(payload: ResetPasswordOptions): Promise<{
|
|
4322
5107
|
user: User;
|
|
4323
5108
|
}>;
|
|
5109
|
+
/**
|
|
5110
|
+
* Update a user
|
|
5111
|
+
*
|
|
5112
|
+
* Updates properties of a user. The omitted properties will be left unchanged.
|
|
5113
|
+
* @param payload - The request body.
|
|
5114
|
+
* @returns {Promise<User>}
|
|
5115
|
+
* @throws {BadRequestException} 400
|
|
5116
|
+
* @throws {UnprocessableEntityException} 422
|
|
5117
|
+
*/
|
|
4324
5118
|
updateUser(payload: UpdateUserOptions): Promise<User>;
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
5119
|
+
/**
|
|
5120
|
+
* List sessions
|
|
5121
|
+
*
|
|
5122
|
+
* Get a list of all active sessions for a specific user.
|
|
5123
|
+
* @param options - Pagination and filter options.
|
|
5124
|
+
* @returns {Promise<AutoPaginatable<Session, SerializedListSessionsOptions>>}
|
|
5125
|
+
* @throws {NotFoundException} 404
|
|
5126
|
+
* @throws {UnprocessableEntityException} 422
|
|
5127
|
+
*/
|
|
4331
5128
|
listSessions(userId: string, options?: ListSessionsOptions): Promise<AutoPaginatable<Session, SerializedListSessionsOptions>>;
|
|
5129
|
+
/**
|
|
5130
|
+
* Delete a user
|
|
5131
|
+
*
|
|
5132
|
+
* Permanently deletes a user in the current environment. It cannot be undone.
|
|
5133
|
+
* @returns {Promise<void>}
|
|
5134
|
+
* @throws {NotFoundException} 404
|
|
5135
|
+
*/
|
|
4332
5136
|
deleteUser(userId: string): Promise<void>;
|
|
5137
|
+
/**
|
|
5138
|
+
* Get user identities
|
|
5139
|
+
*
|
|
5140
|
+
* Get a list of identities associated with the user. A user can have multiple associated identities after going through [identity linking](https://workos.com/docs/authkit/identity-linking). Currently only OAuth identities are supported. More provider types may be added in the future.
|
|
5141
|
+
* @returns {Promise<Identity[]>}
|
|
5142
|
+
* @throws {NotFoundException} 404
|
|
5143
|
+
*/
|
|
4333
5144
|
getUserIdentities(userId: string): Promise<Identity[]>;
|
|
5145
|
+
/**
|
|
5146
|
+
* Get an organization membership
|
|
5147
|
+
*
|
|
5148
|
+
* Get the details of an existing organization membership.
|
|
5149
|
+
* @returns {Promise<OrganizationMembership>}
|
|
5150
|
+
* @throws {NotFoundException} 404
|
|
5151
|
+
*/
|
|
4334
5152
|
getOrganizationMembership(organizationMembershipId: string): Promise<OrganizationMembership>;
|
|
5153
|
+
/**
|
|
5154
|
+
* List organization memberships
|
|
5155
|
+
*
|
|
5156
|
+
* Get a list of all organization memberships matching the criteria specified. At least one of `user_id` or `organization_id` must be provided. By default only active memberships are returned. Use the `statuses` parameter to filter by other statuses.
|
|
5157
|
+
* @param options - Pagination and filter options.
|
|
5158
|
+
* @returns {Promise<AutoPaginatable<OrganizationMembership, SerializedListOrganizationMembershipsOptions>>}
|
|
5159
|
+
* @throws {BadRequestException} 400
|
|
5160
|
+
* @throws {NotFoundException} 404
|
|
5161
|
+
* @throws {UnprocessableEntityException} 422
|
|
5162
|
+
*/
|
|
4335
5163
|
listOrganizationMemberships(options: ListOrganizationMembershipsOptions): Promise<AutoPaginatable<OrganizationMembership, SerializedListOrganizationMembershipsOptions>>;
|
|
5164
|
+
/**
|
|
5165
|
+
* Create an organization membership
|
|
5166
|
+
*
|
|
5167
|
+
* Creates a new `active` organization membership for the given organization and user.
|
|
5168
|
+
*
|
|
5169
|
+
* Calling this API with an organization and user that match an `inactive` organization membership will activate the membership with the specified role(s).
|
|
5170
|
+
* @param options - Object containing userId, organizationId.
|
|
5171
|
+
* @returns {Promise<OrganizationMembership>}
|
|
5172
|
+
* @throws {BadRequestException} 400
|
|
5173
|
+
* @throws {NotFoundException} 404
|
|
5174
|
+
* @throws {UnprocessableEntityException} 422
|
|
5175
|
+
*/
|
|
4336
5176
|
createOrganizationMembership(options: CreateOrganizationMembershipOptions): Promise<OrganizationMembership>;
|
|
5177
|
+
/**
|
|
5178
|
+
* Update an organization membership
|
|
5179
|
+
*
|
|
5180
|
+
* Update the details of an existing organization membership.
|
|
5181
|
+
* @param options - The request body.
|
|
5182
|
+
* @returns {Promise<OrganizationMembership>}
|
|
5183
|
+
* @throws {NotFoundException} 404
|
|
5184
|
+
* @throws {UnprocessableEntityException} 422
|
|
5185
|
+
*/
|
|
4337
5186
|
updateOrganizationMembership(organizationMembershipId: string, options: UpdateOrganizationMembershipOptions): Promise<OrganizationMembership>;
|
|
5187
|
+
/**
|
|
5188
|
+
* Delete an organization membership
|
|
5189
|
+
*
|
|
5190
|
+
* Permanently deletes an existing organization membership. It cannot be undone.
|
|
5191
|
+
* @returns {Promise<void>}
|
|
5192
|
+
* @throws {NotFoundException} 404
|
|
5193
|
+
*/
|
|
4338
5194
|
deleteOrganizationMembership(organizationMembershipId: string): Promise<void>;
|
|
5195
|
+
/**
|
|
5196
|
+
* Deactivate an organization membership
|
|
5197
|
+
*
|
|
5198
|
+
* Deactivates an `active` organization membership. Emits an [organization_membership.updated](https://workos.com/docs/events/organization-membership) event upon successful deactivation.
|
|
5199
|
+
*
|
|
5200
|
+
* - Deactivating an `inactive` membership is a no-op and does not emit an event.
|
|
5201
|
+
* - Deactivating a `pending` membership returns an error. This membership should be [deleted](https://workos.com/docs/reference/authkit/organization-membership/delete) instead.
|
|
5202
|
+
*
|
|
5203
|
+
* See the [membership management documentation](https://workos.com/docs/authkit/users-organizations/organizations/membership-management) for additional details.
|
|
5204
|
+
* @returns {Promise<OrganizationMembership>}
|
|
5205
|
+
* @throws {BadRequestException} 400
|
|
5206
|
+
* @throws {NotFoundException} 404
|
|
5207
|
+
* @throws {UnprocessableEntityException} 422
|
|
5208
|
+
*/
|
|
4339
5209
|
deactivateOrganizationMembership(organizationMembershipId: string): Promise<OrganizationMembership>;
|
|
5210
|
+
/**
|
|
5211
|
+
* Reactivate an organization membership
|
|
5212
|
+
*
|
|
5213
|
+
* Reactivates an `inactive` organization membership, retaining the pre-existing role(s). Emits an [organization_membership.updated](https://workos.com/docs/events/organization-membership) event upon successful reactivation.
|
|
5214
|
+
*
|
|
5215
|
+
* - Reactivating an `active` membership is a no-op and does not emit an event.
|
|
5216
|
+
* - Reactivating a `pending` membership returns an error. The user needs to [accept the invitation](https://workos.com/docs/authkit/invitations) instead.
|
|
5217
|
+
*
|
|
5218
|
+
* See the [membership management documentation](https://workos.com/docs/authkit/users-organizations/organizations/membership-management) for additional details.
|
|
5219
|
+
* @returns {Promise<OrganizationMembership>}
|
|
5220
|
+
* @throws {BadRequestException} 400
|
|
5221
|
+
* @throws {NotFoundException} 404
|
|
5222
|
+
* @throws {UnprocessableEntityException} 422
|
|
5223
|
+
*/
|
|
4340
5224
|
reactivateOrganizationMembership(organizationMembershipId: string): Promise<OrganizationMembership>;
|
|
5225
|
+
listGroupsForOrganizationMembership(options: ListGroupsForOrganizationMembershipOptions): Promise<AutoPaginatable<Group>>;
|
|
4341
5226
|
getInvitation(invitationId: string): Promise<Invitation>;
|
|
5227
|
+
/**
|
|
5228
|
+
* Find an invitation by token
|
|
5229
|
+
*
|
|
5230
|
+
* Retrieve an existing invitation using the token.
|
|
5231
|
+
* @returns {Promise<Invitation>}
|
|
5232
|
+
* @throws {NotFoundException} 404
|
|
5233
|
+
*/
|
|
4342
5234
|
findInvitationByToken(invitationToken: string): Promise<Invitation>;
|
|
5235
|
+
/**
|
|
5236
|
+
* List invitations
|
|
5237
|
+
*
|
|
5238
|
+
* Get a list of all of invitations matching the criteria specified.
|
|
5239
|
+
* @param options - Pagination and filter options.
|
|
5240
|
+
* @returns {Promise<AutoPaginatable<Invitation, SerializedListInvitationsOptions>>}
|
|
5241
|
+
* @throws {UnprocessableEntityException} 422
|
|
5242
|
+
*/
|
|
4343
5243
|
listInvitations(options: ListInvitationsOptions): Promise<AutoPaginatable<Invitation, SerializedListInvitationsOptions>>;
|
|
5244
|
+
/**
|
|
5245
|
+
* Send an invitation
|
|
5246
|
+
*
|
|
5247
|
+
* Sends an invitation email to the recipient.
|
|
5248
|
+
* @param payload - Object containing email.
|
|
5249
|
+
* @returns {Promise<Invitation>}
|
|
5250
|
+
* @throws {BadRequestException} 400
|
|
5251
|
+
* @throws {NotFoundException} 404
|
|
5252
|
+
* @throws {UnprocessableEntityException} 422
|
|
5253
|
+
*/
|
|
4344
5254
|
sendInvitation(payload: SendInvitationOptions): Promise<Invitation>;
|
|
5255
|
+
/**
|
|
5256
|
+
* Accept an invitation
|
|
5257
|
+
*
|
|
5258
|
+
* Accepts an invitation and, if linked to an organization, activates the user's membership in that organization.
|
|
5259
|
+
* @returns {Promise<Invitation>}
|
|
5260
|
+
* @throws {BadRequestException} 400
|
|
5261
|
+
* @throws {NotFoundException} 404
|
|
5262
|
+
*/
|
|
4345
5263
|
acceptInvitation(invitationId: string): Promise<Invitation>;
|
|
5264
|
+
/**
|
|
5265
|
+
* Revoke an invitation
|
|
5266
|
+
*
|
|
5267
|
+
* Revokes an existing invitation.
|
|
5268
|
+
* @returns {Promise<Invitation>}
|
|
5269
|
+
* @throws {BadRequestException} 400
|
|
5270
|
+
*/
|
|
4346
5271
|
revokeInvitation(invitationId: string): Promise<Invitation>;
|
|
5272
|
+
/**
|
|
5273
|
+
* Resend an invitation
|
|
5274
|
+
*
|
|
5275
|
+
* Resends an invitation email to the recipient. The invitation must be in a pending state.
|
|
5276
|
+
* @param options - The request body.
|
|
5277
|
+
* @returns {Promise<Invitation>}
|
|
5278
|
+
* @throws {BadRequestException} 400
|
|
5279
|
+
* @throws {NotFoundException} 404
|
|
5280
|
+
* @throws {UnprocessableEntityException} 422
|
|
5281
|
+
*/
|
|
4347
5282
|
resendInvitation(invitationId: string, options?: ResendInvitationOptions): Promise<Invitation>;
|
|
5283
|
+
/**
|
|
5284
|
+
* Revoke Session
|
|
5285
|
+
*
|
|
5286
|
+
* Revoke a [user session](https://workos.com/docs/reference/authkit/session).
|
|
5287
|
+
* @param payload - Object containing sessionId.
|
|
5288
|
+
* @returns {Promise<void>}
|
|
5289
|
+
* @throws {BadRequestException} 400
|
|
5290
|
+
*/
|
|
4348
5291
|
revokeSession(payload: RevokeSessionOptions): Promise<void>;
|
|
4349
5292
|
/**
|
|
4350
5293
|
* Generate an OAuth 2.0 authorization URL.
|
|
@@ -4384,375 +5327,27 @@ declare class UserManagement {
|
|
|
4384
5327
|
* ```
|
|
4385
5328
|
*/
|
|
4386
5329
|
getAuthorizationUrlWithPKCE(options: Omit<UserManagementAuthorizationURLOptions, 'codeChallenge' | 'codeChallengeMethod' | 'state'>): Promise<PKCEAuthorizationURLResult>;
|
|
5330
|
+
/**
|
|
5331
|
+
* Logout
|
|
5332
|
+
*
|
|
5333
|
+
* Logout a user from the current [session](https://workos.com/docs/reference/authkit/session).
|
|
5334
|
+
* @param options.sessionId - The ID of the session to revoke. This can be extracted from the `sid` claim of the access token.
|
|
5335
|
+
*
|
|
5336
|
+
* @example
|
|
5337
|
+
* "session_01H93ZY4F80QPBEZ1R5B2SHQG8"
|
|
5338
|
+
*
|
|
5339
|
+
* @param options.returnTo - The URL to redirect the user to after session revocation.
|
|
5340
|
+
*
|
|
5341
|
+
* @example
|
|
5342
|
+
* "https://example.com"
|
|
5343
|
+
*
|
|
5344
|
+
* @returns {string}
|
|
5345
|
+
* @throws {UnprocessableEntityException} 422
|
|
5346
|
+
*/
|
|
4387
5347
|
getLogoutUrl(options: LogoutURLOptions): string;
|
|
4388
5348
|
getJwksUrl(clientId: string): string;
|
|
4389
5349
|
}
|
|
4390
5350
|
//#endregion
|
|
4391
|
-
//#region src/fga/interfaces/check-op.enum.d.ts
|
|
4392
|
-
declare enum CheckOp {
|
|
4393
|
-
AllOf = "all_of",
|
|
4394
|
-
AnyOf = "any_of"
|
|
4395
|
-
}
|
|
4396
|
-
//#endregion
|
|
4397
|
-
//#region src/fga/interfaces/resource-op.enum.d.ts
|
|
4398
|
-
declare enum ResourceOp {
|
|
4399
|
-
Create = "create",
|
|
4400
|
-
Delete = "delete"
|
|
4401
|
-
}
|
|
4402
|
-
//#endregion
|
|
4403
|
-
//#region src/fga/interfaces/resource.interface.d.ts
|
|
4404
|
-
interface ResourceInterface {
|
|
4405
|
-
getResourceType(): string;
|
|
4406
|
-
getResourceId(): string;
|
|
4407
|
-
}
|
|
4408
|
-
interface ResourceOptions {
|
|
4409
|
-
resourceType: string;
|
|
4410
|
-
resourceId?: string;
|
|
4411
|
-
}
|
|
4412
|
-
interface SerializedResourceOptions {
|
|
4413
|
-
resource_type: string;
|
|
4414
|
-
resource_id?: string;
|
|
4415
|
-
}
|
|
4416
|
-
interface CreateResourceOptions {
|
|
4417
|
-
resource: ResourceInterface | ResourceOptions;
|
|
4418
|
-
meta?: {
|
|
4419
|
-
[key: string]: any;
|
|
4420
|
-
};
|
|
4421
|
-
}
|
|
4422
|
-
interface SerializedCreateResourceOptions {
|
|
4423
|
-
resource_type: string;
|
|
4424
|
-
resource_id?: string;
|
|
4425
|
-
meta?: {
|
|
4426
|
-
[key: string]: any;
|
|
4427
|
-
};
|
|
4428
|
-
}
|
|
4429
|
-
type GetResourceOptions = ResourceInterface | ResourceOptions;
|
|
4430
|
-
interface ListResourcesOptions extends PaginationOptions {
|
|
4431
|
-
resourceType?: string;
|
|
4432
|
-
search?: string;
|
|
4433
|
-
}
|
|
4434
|
-
interface SerializedListResourcesOptions extends PaginationOptions {
|
|
4435
|
-
resource_type?: string;
|
|
4436
|
-
search?: string;
|
|
4437
|
-
}
|
|
4438
|
-
interface UpdateResourceOptions {
|
|
4439
|
-
resource: ResourceInterface | ResourceOptions;
|
|
4440
|
-
meta: {
|
|
4441
|
-
[key: string]: any;
|
|
4442
|
-
};
|
|
4443
|
-
}
|
|
4444
|
-
type DeleteResourceOptions = ResourceInterface | ResourceOptions;
|
|
4445
|
-
interface SerializedDeleteResourceOptions {
|
|
4446
|
-
resource_type: string;
|
|
4447
|
-
resource_id: string;
|
|
4448
|
-
}
|
|
4449
|
-
interface Resource {
|
|
4450
|
-
resourceType: string;
|
|
4451
|
-
resourceId: string;
|
|
4452
|
-
meta?: {
|
|
4453
|
-
[key: string]: any;
|
|
4454
|
-
};
|
|
4455
|
-
}
|
|
4456
|
-
interface ResourceResponse {
|
|
4457
|
-
resource_type: string;
|
|
4458
|
-
resource_id: string;
|
|
4459
|
-
meta?: {
|
|
4460
|
-
[key: string]: any;
|
|
4461
|
-
};
|
|
4462
|
-
}
|
|
4463
|
-
interface BatchWriteResourcesOptions {
|
|
4464
|
-
op: ResourceOp;
|
|
4465
|
-
resources: CreateResourceOptions[] | DeleteResourceOptions[];
|
|
4466
|
-
}
|
|
4467
|
-
interface SerializedBatchWriteResourcesOptions {
|
|
4468
|
-
op: string;
|
|
4469
|
-
resources: SerializedCreateResourceOptions[] | SerializedDeleteResourceOptions[];
|
|
4470
|
-
}
|
|
4471
|
-
interface BatchWriteResourcesResponse {
|
|
4472
|
-
data: ResourceResponse[];
|
|
4473
|
-
}
|
|
4474
|
-
//#endregion
|
|
4475
|
-
//#region src/fga/interfaces/warrant-op.enum.d.ts
|
|
4476
|
-
declare enum WarrantOp {
|
|
4477
|
-
Create = "create",
|
|
4478
|
-
Delete = "delete"
|
|
4479
|
-
}
|
|
4480
|
-
//#endregion
|
|
4481
|
-
//#region src/fga/interfaces/warrant.interface.d.ts
|
|
4482
|
-
interface ListWarrantsOptions {
|
|
4483
|
-
resourceType?: string;
|
|
4484
|
-
resourceId?: string;
|
|
4485
|
-
relation?: string;
|
|
4486
|
-
subjectType?: string;
|
|
4487
|
-
subjectId?: string;
|
|
4488
|
-
subjectRelation?: string;
|
|
4489
|
-
limit?: number;
|
|
4490
|
-
after?: string | null;
|
|
4491
|
-
}
|
|
4492
|
-
interface SerializedListWarrantsOptions {
|
|
4493
|
-
resource_type?: string;
|
|
4494
|
-
resource_id?: string;
|
|
4495
|
-
relation?: string;
|
|
4496
|
-
subject_type?: string;
|
|
4497
|
-
subject_id?: string;
|
|
4498
|
-
subject_relation?: string;
|
|
4499
|
-
limit?: number;
|
|
4500
|
-
after?: string | null;
|
|
4501
|
-
}
|
|
4502
|
-
interface PolicyContext {
|
|
4503
|
-
[key: string]: any;
|
|
4504
|
-
}
|
|
4505
|
-
interface Subject {
|
|
4506
|
-
resourceType: string;
|
|
4507
|
-
resourceId: string;
|
|
4508
|
-
relation?: string;
|
|
4509
|
-
}
|
|
4510
|
-
interface SerializedSubject {
|
|
4511
|
-
resource_type: string;
|
|
4512
|
-
resource_id: string;
|
|
4513
|
-
relation?: string;
|
|
4514
|
-
}
|
|
4515
|
-
interface Warrant {
|
|
4516
|
-
resourceType: string;
|
|
4517
|
-
resourceId: string;
|
|
4518
|
-
relation: string;
|
|
4519
|
-
subject: Subject;
|
|
4520
|
-
policy?: string;
|
|
4521
|
-
}
|
|
4522
|
-
interface WriteWarrantOptions {
|
|
4523
|
-
op?: WarrantOp;
|
|
4524
|
-
resource: ResourceInterface | ResourceOptions;
|
|
4525
|
-
relation: string;
|
|
4526
|
-
subject: ResourceInterface | Subject;
|
|
4527
|
-
policy?: string;
|
|
4528
|
-
}
|
|
4529
|
-
interface SerializedWriteWarrantOptions {
|
|
4530
|
-
op?: WarrantOp;
|
|
4531
|
-
resource_type: string;
|
|
4532
|
-
resource_id: string;
|
|
4533
|
-
relation: string;
|
|
4534
|
-
subject: SerializedSubject;
|
|
4535
|
-
policy?: string;
|
|
4536
|
-
}
|
|
4537
|
-
type ListWarrantsRequestOptions = Pick<GetOptions, 'warrantToken'>;
|
|
4538
|
-
interface WarrantResponse {
|
|
4539
|
-
resource_type: string;
|
|
4540
|
-
resource_id: string;
|
|
4541
|
-
relation: string;
|
|
4542
|
-
subject: SerializedSubject;
|
|
4543
|
-
policy?: string;
|
|
4544
|
-
}
|
|
4545
|
-
//#endregion
|
|
4546
|
-
//#region src/fga/interfaces/warning.interface.d.ts
|
|
4547
|
-
interface BaseWarning {
|
|
4548
|
-
code: string;
|
|
4549
|
-
message: string;
|
|
4550
|
-
}
|
|
4551
|
-
interface MissingContextKeysWarning extends BaseWarning {
|
|
4552
|
-
code: 'missing_context_keys';
|
|
4553
|
-
keys: string[];
|
|
4554
|
-
}
|
|
4555
|
-
type Warning = BaseWarning | MissingContextKeysWarning;
|
|
4556
|
-
//#endregion
|
|
4557
|
-
//#region src/fga/interfaces/check.interface.d.ts
|
|
4558
|
-
interface CheckWarrantOptions {
|
|
4559
|
-
resource: ResourceInterface | ResourceOptions;
|
|
4560
|
-
relation: string;
|
|
4561
|
-
subject: ResourceInterface | Subject;
|
|
4562
|
-
context?: PolicyContext;
|
|
4563
|
-
}
|
|
4564
|
-
interface SerializedCheckWarrantOptions {
|
|
4565
|
-
resource_type: string;
|
|
4566
|
-
resource_id: string;
|
|
4567
|
-
relation: string;
|
|
4568
|
-
subject: SerializedSubject;
|
|
4569
|
-
context: PolicyContext;
|
|
4570
|
-
}
|
|
4571
|
-
interface CheckOptions {
|
|
4572
|
-
op?: CheckOp;
|
|
4573
|
-
checks: CheckWarrantOptions[];
|
|
4574
|
-
debug?: boolean;
|
|
4575
|
-
}
|
|
4576
|
-
interface CheckBatchOptions {
|
|
4577
|
-
checks: CheckWarrantOptions[];
|
|
4578
|
-
debug?: boolean;
|
|
4579
|
-
}
|
|
4580
|
-
interface SerializedCheckOptions {
|
|
4581
|
-
op?: CheckOp;
|
|
4582
|
-
checks: SerializedCheckWarrantOptions[];
|
|
4583
|
-
debug?: boolean;
|
|
4584
|
-
}
|
|
4585
|
-
interface SerializedCheckBatchOptions {
|
|
4586
|
-
op: 'batch';
|
|
4587
|
-
checks: SerializedCheckWarrantOptions[];
|
|
4588
|
-
debug?: boolean;
|
|
4589
|
-
}
|
|
4590
|
-
interface CheckResultResponse {
|
|
4591
|
-
result: string;
|
|
4592
|
-
is_implicit: boolean;
|
|
4593
|
-
warrant_token: string;
|
|
4594
|
-
debug_info?: DebugInfoResponse;
|
|
4595
|
-
warnings?: Warning[];
|
|
4596
|
-
}
|
|
4597
|
-
interface DebugInfo {
|
|
4598
|
-
processingTime: number;
|
|
4599
|
-
decisionTree: DecisionTreeNode;
|
|
4600
|
-
}
|
|
4601
|
-
interface DecisionTreeNode {
|
|
4602
|
-
check: CheckWarrantOptions;
|
|
4603
|
-
policy?: string;
|
|
4604
|
-
decision: string;
|
|
4605
|
-
processingTime: number;
|
|
4606
|
-
children: DecisionTreeNode[];
|
|
4607
|
-
}
|
|
4608
|
-
interface DebugInfoResponse {
|
|
4609
|
-
processing_time: number;
|
|
4610
|
-
decision_tree: DecisionTreeNodeResponse;
|
|
4611
|
-
}
|
|
4612
|
-
interface DecisionTreeNodeResponse {
|
|
4613
|
-
check: SerializedCheckWarrantOptions;
|
|
4614
|
-
policy?: string;
|
|
4615
|
-
decision: string;
|
|
4616
|
-
processing_time: number;
|
|
4617
|
-
children: DecisionTreeNodeResponse[];
|
|
4618
|
-
}
|
|
4619
|
-
interface CheckResultInterface {
|
|
4620
|
-
result: string;
|
|
4621
|
-
isImplicit: boolean;
|
|
4622
|
-
warrantToken: string;
|
|
4623
|
-
debugInfo?: DebugInfo;
|
|
4624
|
-
warnings?: Warning[];
|
|
4625
|
-
}
|
|
4626
|
-
declare class CheckResult implements CheckResultInterface {
|
|
4627
|
-
result: string;
|
|
4628
|
-
isImplicit: boolean;
|
|
4629
|
-
warrantToken: string;
|
|
4630
|
-
debugInfo?: DebugInfo;
|
|
4631
|
-
warnings?: Warning[];
|
|
4632
|
-
constructor(json: CheckResultResponse);
|
|
4633
|
-
isAuthorized(): boolean;
|
|
4634
|
-
}
|
|
4635
|
-
type CheckRequestOptions = Pick<PostOptions, 'warrantToken'>;
|
|
4636
|
-
//#endregion
|
|
4637
|
-
//#region src/fga/interfaces/query.interface.d.ts
|
|
4638
|
-
interface QueryOptions extends PaginationOptions {
|
|
4639
|
-
q: string;
|
|
4640
|
-
context?: PolicyContext;
|
|
4641
|
-
}
|
|
4642
|
-
interface SerializedQueryOptions extends PaginationOptions {
|
|
4643
|
-
q: string;
|
|
4644
|
-
context?: string;
|
|
4645
|
-
}
|
|
4646
|
-
interface QueryResult {
|
|
4647
|
-
resourceType: string;
|
|
4648
|
-
resourceId: string;
|
|
4649
|
-
relation: string;
|
|
4650
|
-
warrant: Warrant;
|
|
4651
|
-
isImplicit: boolean;
|
|
4652
|
-
meta?: {
|
|
4653
|
-
[key: string]: any;
|
|
4654
|
-
};
|
|
4655
|
-
}
|
|
4656
|
-
interface QueryResultResponse {
|
|
4657
|
-
resource_type: string;
|
|
4658
|
-
resource_id: string;
|
|
4659
|
-
relation: string;
|
|
4660
|
-
warrant: WarrantResponse;
|
|
4661
|
-
is_implicit: boolean;
|
|
4662
|
-
meta?: Record<string, any>;
|
|
4663
|
-
}
|
|
4664
|
-
type QueryRequestOptions = Pick<GetOptions, 'warrantToken'>;
|
|
4665
|
-
//#endregion
|
|
4666
|
-
//#region src/fga/interfaces/warrant-token.interface.d.ts
|
|
4667
|
-
interface WarrantToken {
|
|
4668
|
-
warrantToken: string;
|
|
4669
|
-
}
|
|
4670
|
-
interface WarrantTokenResponse {
|
|
4671
|
-
warrant_token: string;
|
|
4672
|
-
}
|
|
4673
|
-
//#endregion
|
|
4674
|
-
//#region src/fga/interfaces/list.interface.d.ts
|
|
4675
|
-
interface FGAList<T> extends List<T> {
|
|
4676
|
-
warnings?: Warning[];
|
|
4677
|
-
}
|
|
4678
|
-
//#endregion
|
|
4679
|
-
//#region src/fga/utils/fga-paginatable.d.ts
|
|
4680
|
-
declare class FgaPaginatable<T, P extends PaginationOptions = PaginationOptions> extends AutoPaginatable<T, P> {
|
|
4681
|
-
protected list: FGAList<T>;
|
|
4682
|
-
constructor(list: FGAList<T>, apiCall: (params: PaginationOptions) => Promise<FGAList<T>>, options?: P);
|
|
4683
|
-
get warnings(): Warning[] | undefined;
|
|
4684
|
-
}
|
|
4685
|
-
//#endregion
|
|
4686
|
-
//#region src/fga/fga.d.ts
|
|
4687
|
-
/**
|
|
4688
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4689
|
-
* @see src/authorization/authorization.ts
|
|
4690
|
-
*/
|
|
4691
|
-
declare class FGA {
|
|
4692
|
-
private readonly workos;
|
|
4693
|
-
constructor(workos: WorkOS);
|
|
4694
|
-
/**
|
|
4695
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4696
|
-
* @see src/authorization/authorization.ts
|
|
4697
|
-
*/
|
|
4698
|
-
check(checkOptions: CheckOptions, options?: CheckRequestOptions): Promise<CheckResult>;
|
|
4699
|
-
/**
|
|
4700
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4701
|
-
* @see src/authorization/authorization.ts
|
|
4702
|
-
*/
|
|
4703
|
-
checkBatch(checkOptions: CheckBatchOptions, options?: CheckRequestOptions): Promise<CheckResult[]>;
|
|
4704
|
-
/**
|
|
4705
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4706
|
-
* @see src/authorization/authorization.ts
|
|
4707
|
-
*/
|
|
4708
|
-
createResource(resource: CreateResourceOptions): Promise<Resource>;
|
|
4709
|
-
/**
|
|
4710
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4711
|
-
* @see src/authorization/authorization.ts
|
|
4712
|
-
*/
|
|
4713
|
-
getResource(resource: ResourceInterface | ResourceOptions): Promise<Resource>;
|
|
4714
|
-
/**
|
|
4715
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4716
|
-
* @see src/authorization/authorization.ts
|
|
4717
|
-
*/
|
|
4718
|
-
listResources(options?: ListResourcesOptions): Promise<AutoPaginatable<Resource, SerializedListResourcesOptions>>;
|
|
4719
|
-
/**
|
|
4720
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4721
|
-
* @see src/authorization/authorization.ts
|
|
4722
|
-
*/
|
|
4723
|
-
updateResource(options: UpdateResourceOptions): Promise<Resource>;
|
|
4724
|
-
/**
|
|
4725
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4726
|
-
* @see src/authorization/authorization.ts
|
|
4727
|
-
*/
|
|
4728
|
-
deleteResource(resource: DeleteResourceOptions): Promise<void>;
|
|
4729
|
-
/**
|
|
4730
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4731
|
-
* @see src/authorization/authorization.ts
|
|
4732
|
-
*/
|
|
4733
|
-
batchWriteResources(options: BatchWriteResourcesOptions): Promise<Resource[]>;
|
|
4734
|
-
/**
|
|
4735
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4736
|
-
* @see src/authorization/authorization.ts
|
|
4737
|
-
*/
|
|
4738
|
-
writeWarrant(options: WriteWarrantOptions): Promise<WarrantToken>;
|
|
4739
|
-
/**
|
|
4740
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4741
|
-
* @see src/authorization/authorization.ts
|
|
4742
|
-
*/
|
|
4743
|
-
batchWriteWarrants(options: WriteWarrantOptions[]): Promise<WarrantToken>;
|
|
4744
|
-
/**
|
|
4745
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4746
|
-
* @see src/authorization/authorization.ts
|
|
4747
|
-
*/
|
|
4748
|
-
listWarrants(options?: ListWarrantsOptions, requestOptions?: ListWarrantsRequestOptions): Promise<AutoPaginatable<Warrant, SerializedListWarrantsOptions>>;
|
|
4749
|
-
/**
|
|
4750
|
-
* @deprecated The FGA module is deprecated. Use the Authorization module instead.
|
|
4751
|
-
* @see src/authorization/authorization.ts
|
|
4752
|
-
*/
|
|
4753
|
-
query(options: QueryOptions, requestOptions?: QueryRequestOptions): Promise<FgaPaginatable<QueryResult, SerializedQueryOptions>>;
|
|
4754
|
-
}
|
|
4755
|
-
//#endregion
|
|
4756
5351
|
//#region src/feature-flags/runtime-client.d.ts
|
|
4757
5352
|
declare class FeatureFlagsRuntimeClient extends EventEmitter {
|
|
4758
5353
|
private readonly workos;
|
|
@@ -4792,15 +5387,112 @@ declare class FeatureFlagsRuntimeClient extends EventEmitter {
|
|
|
4792
5387
|
declare class FeatureFlags {
|
|
4793
5388
|
private readonly workos;
|
|
4794
5389
|
constructor(workos: WorkOS);
|
|
5390
|
+
/**
|
|
5391
|
+
* List feature flags
|
|
5392
|
+
*
|
|
5393
|
+
* Get a list of all of your existing feature flags matching the criteria specified.
|
|
5394
|
+
* @param options - Pagination and filter options.
|
|
5395
|
+
* @returns {Promise<AutoPaginatable<FeatureFlag>>}
|
|
5396
|
+
* @throws {BadRequestException} 400
|
|
5397
|
+
* @throws {NotFoundException} 404
|
|
5398
|
+
* @throws {UnprocessableEntityException} 422
|
|
5399
|
+
*/
|
|
4795
5400
|
listFeatureFlags(options?: ListFeatureFlagsOptions): Promise<AutoPaginatable<FeatureFlag>>;
|
|
5401
|
+
/**
|
|
5402
|
+
* Get a feature flag
|
|
5403
|
+
*
|
|
5404
|
+
* Get the details of an existing feature flag by its slug.
|
|
5405
|
+
* @param slug - A unique key to reference the Feature Flag.
|
|
5406
|
+
*
|
|
5407
|
+
* @example
|
|
5408
|
+
* "advanced-analytics"
|
|
5409
|
+
*
|
|
5410
|
+
* @returns {Promise<FeatureFlag>}
|
|
5411
|
+
* @throws {NotFoundException} 404
|
|
5412
|
+
*/
|
|
4796
5413
|
getFeatureFlag(slug: string): Promise<FeatureFlag>;
|
|
5414
|
+
/**
|
|
5415
|
+
* Enable a feature flag
|
|
5416
|
+
*
|
|
5417
|
+
* Enables a feature flag in the current environment.
|
|
5418
|
+
* @param slug - A unique key to reference the Feature Flag.
|
|
5419
|
+
*
|
|
5420
|
+
* @example
|
|
5421
|
+
* "advanced-analytics"
|
|
5422
|
+
*
|
|
5423
|
+
* @returns {Promise<FeatureFlag>}
|
|
5424
|
+
* @throws {NotFoundException} 404
|
|
5425
|
+
*/
|
|
4797
5426
|
enableFeatureFlag(slug: string): Promise<FeatureFlag>;
|
|
5427
|
+
/**
|
|
5428
|
+
* Disable a feature flag
|
|
5429
|
+
*
|
|
5430
|
+
* Disables a feature flag in the current environment.
|
|
5431
|
+
* @param slug - A unique key to reference the Feature Flag.
|
|
5432
|
+
*
|
|
5433
|
+
* @example
|
|
5434
|
+
* "advanced-analytics"
|
|
5435
|
+
*
|
|
5436
|
+
* @returns {Promise<FeatureFlag>}
|
|
5437
|
+
* @throws {NotFoundException} 404
|
|
5438
|
+
*/
|
|
4798
5439
|
disableFeatureFlag(slug: string): Promise<FeatureFlag>;
|
|
5440
|
+
/**
|
|
5441
|
+
* Add a feature flag target
|
|
5442
|
+
*
|
|
5443
|
+
* Enables a feature flag for a specific target in the current environment. Currently, supported targets include users and organizations.
|
|
5444
|
+
* @params options - Object containing slug and targetId.
|
|
5445
|
+
* @returns {Promise<void>}
|
|
5446
|
+
* @throws {BadRequestException} 400
|
|
5447
|
+
* @throws 403 response from the API.
|
|
5448
|
+
* @throws {NotFoundException} 404
|
|
5449
|
+
*/
|
|
4799
5450
|
addFlagTarget(options: AddFlagTargetOptions): Promise<void>;
|
|
5451
|
+
/**
|
|
5452
|
+
* Remove a feature flag target
|
|
5453
|
+
*
|
|
5454
|
+
* Removes a target from the feature flag's target list in the current environment. Currently, supported targets include users and organizations.
|
|
5455
|
+
* @params options - Object containing slug and targetId.
|
|
5456
|
+
* @returns {Promise<void>}
|
|
5457
|
+
* @throws {BadRequestException} 400
|
|
5458
|
+
* @throws 403 response from the API.
|
|
5459
|
+
* @throws {NotFoundException} 404
|
|
5460
|
+
*/
|
|
4800
5461
|
removeFlagTarget(options: RemoveFlagTargetOptions): Promise<void>;
|
|
5462
|
+
/**
|
|
5463
|
+
* List enabled feature flags for an organization
|
|
5464
|
+
*
|
|
5465
|
+
* Get a list of all enabled feature flags for an organization.
|
|
5466
|
+
* @param options - Pagination and filter options.
|
|
5467
|
+
* @returns {Promise<AutoPaginatable<FeatureFlag>>}
|
|
5468
|
+
* @throws {NotFoundException} 404
|
|
5469
|
+
*/
|
|
5470
|
+
listOrganizationFeatureFlags(options: ListOrganizationFeatureFlagsOptions): Promise<AutoPaginatable<FeatureFlag>>;
|
|
5471
|
+
/**
|
|
5472
|
+
* List enabled feature flags for a user
|
|
5473
|
+
*
|
|
5474
|
+
* @param options - Pagination and filter options.
|
|
5475
|
+
* @returns {Promise<AutoPaginatable<Flag>>}
|
|
5476
|
+
* @throws {NotFoundException} 404
|
|
5477
|
+
*/
|
|
5478
|
+
listUserFeatureFlags(options: ListUserFeatureFlagsOptions): Promise<AutoPaginatable<FeatureFlag>>;
|
|
4801
5479
|
createRuntimeClient(options?: RuntimeClientOptions): FeatureFlagsRuntimeClient;
|
|
4802
5480
|
}
|
|
4803
5481
|
//#endregion
|
|
5482
|
+
//#region src/groups/groups.d.ts
|
|
5483
|
+
declare class Groups {
|
|
5484
|
+
private readonly workos;
|
|
5485
|
+
constructor(workos: WorkOS);
|
|
5486
|
+
createGroup(options: CreateGroupOptions): Promise<Group>;
|
|
5487
|
+
listGroups(options: ListGroupsOptions): Promise<AutoPaginatable<Group>>;
|
|
5488
|
+
getGroup(options: GetGroupOptions): Promise<Group>;
|
|
5489
|
+
updateGroup(options: UpdateGroupOptions): Promise<Group>;
|
|
5490
|
+
deleteGroup(options: DeleteGroupOptions): Promise<void>;
|
|
5491
|
+
addOrganizationMembership(options: AddGroupOrganizationMembershipOptions): Promise<Group>;
|
|
5492
|
+
listOrganizationMemberships(options: ListGroupOrganizationMembershipsOptions): Promise<AutoPaginatable<AuthorizationOrganizationMembership>>;
|
|
5493
|
+
removeOrganizationMembership(options: RemoveGroupOrganizationMembershipOptions): Promise<void>;
|
|
5494
|
+
}
|
|
5495
|
+
//#endregion
|
|
4804
5496
|
//#region src/widgets/interfaces/get-token.d.ts
|
|
4805
5497
|
type WidgetScope = 'widgets:users-table:manage' | 'widgets:sso:manage' | 'widgets:domain-verification:manage' | 'widgets:dsync:manage' | 'widgets:api-keys:manage' | 'widgets:audit-log-streaming:manage';
|
|
4806
5498
|
interface GetTokenOptions {
|
|
@@ -4808,53 +5500,643 @@ interface GetTokenOptions {
|
|
|
4808
5500
|
userId?: string;
|
|
4809
5501
|
scopes?: WidgetScope[];
|
|
4810
5502
|
}
|
|
5503
|
+
interface GetTokenResponse {
|
|
5504
|
+
token: string;
|
|
5505
|
+
}
|
|
4811
5506
|
//#endregion
|
|
4812
5507
|
//#region src/widgets/widgets.d.ts
|
|
4813
5508
|
declare class Widgets {
|
|
4814
5509
|
private readonly workos;
|
|
4815
5510
|
constructor(workos: WorkOS);
|
|
4816
|
-
|
|
5511
|
+
/**
|
|
5512
|
+
* Generate a widget token
|
|
5513
|
+
*
|
|
5514
|
+
* Generate a widget token scoped to an organization and user with the specified scopes.
|
|
5515
|
+
* @param payload - Object containing organizationId.
|
|
5516
|
+
* @returns {Promise<GetTokenResponse>}
|
|
5517
|
+
* @throws {BadRequestException} 400
|
|
5518
|
+
* @throws {NotFoundException} 404
|
|
5519
|
+
* @throws {UnprocessableEntityException} 422
|
|
5520
|
+
*/
|
|
5521
|
+
createToken(payload: GetTokenOptions): Promise<GetTokenResponse>;
|
|
4817
5522
|
}
|
|
4818
5523
|
//#endregion
|
|
4819
5524
|
//#region src/authorization/authorization.d.ts
|
|
4820
5525
|
declare class Authorization {
|
|
4821
5526
|
private readonly workos;
|
|
4822
5527
|
constructor(workos: WorkOS);
|
|
5528
|
+
/**
|
|
5529
|
+
* Create an environment role
|
|
5530
|
+
*
|
|
5531
|
+
* Create a new environment role.
|
|
5532
|
+
* @param options - Object containing slug, name.
|
|
5533
|
+
* @returns {Promise<EnvironmentRole>}
|
|
5534
|
+
* @throws {BadRequestException} 400
|
|
5535
|
+
* @throws 403 response from the API.
|
|
5536
|
+
* @throws {NotFoundException} 404
|
|
5537
|
+
* @throws {ConflictException} 409
|
|
5538
|
+
* @throws {UnprocessableEntityException} 422
|
|
5539
|
+
*/
|
|
4823
5540
|
createEnvironmentRole(options: CreateEnvironmentRoleOptions): Promise<EnvironmentRole>;
|
|
5541
|
+
/**
|
|
5542
|
+
* List environment roles
|
|
5543
|
+
*
|
|
5544
|
+
* List all environment roles in priority order.
|
|
5545
|
+
* @returns {Promise<EnvironmentRoleList>}
|
|
5546
|
+
* @throws 403 response from the API.
|
|
5547
|
+
*/
|
|
4824
5548
|
listEnvironmentRoles(): Promise<EnvironmentRoleList>;
|
|
5549
|
+
/**
|
|
5550
|
+
* Get an environment role
|
|
5551
|
+
*
|
|
5552
|
+
* Get an environment role by its slug.
|
|
5553
|
+
* @param slug - The slug of the environment role.
|
|
5554
|
+
*
|
|
5555
|
+
* @example
|
|
5556
|
+
* "admin"
|
|
5557
|
+
*
|
|
5558
|
+
* @returns {Promise<EnvironmentRole>}
|
|
5559
|
+
* @throws 403 response from the API.
|
|
5560
|
+
* @throws {NotFoundException} 404
|
|
5561
|
+
*/
|
|
4825
5562
|
getEnvironmentRole(slug: string): Promise<EnvironmentRole>;
|
|
5563
|
+
/**
|
|
5564
|
+
* Update an environment role
|
|
5565
|
+
*
|
|
5566
|
+
* Update an existing environment role.
|
|
5567
|
+
* @param slug - The slug of the environment role.
|
|
5568
|
+
*
|
|
5569
|
+
* @example
|
|
5570
|
+
* "admin"
|
|
5571
|
+
*
|
|
5572
|
+
* @param options - The request body.
|
|
5573
|
+
* @returns {Promise<EnvironmentRole>}
|
|
5574
|
+
* @throws {BadRequestException} 400
|
|
5575
|
+
* @throws 403 response from the API.
|
|
5576
|
+
* @throws {NotFoundException} 404
|
|
5577
|
+
* @throws {UnprocessableEntityException} 422
|
|
5578
|
+
*/
|
|
4826
5579
|
updateEnvironmentRole(slug: string, options: UpdateEnvironmentRoleOptions): Promise<EnvironmentRole>;
|
|
5580
|
+
/**
|
|
5581
|
+
* Set permissions for an environment role
|
|
5582
|
+
*
|
|
5583
|
+
* Replace all permissions on an environment role with the provided list.
|
|
5584
|
+
* @param slug - The slug of the environment role.
|
|
5585
|
+
*
|
|
5586
|
+
* @example
|
|
5587
|
+
* "admin"
|
|
5588
|
+
*
|
|
5589
|
+
* @param options - Object containing permissions.
|
|
5590
|
+
* @returns {Promise<EnvironmentRole>}
|
|
5591
|
+
* @throws {BadRequestException} 400
|
|
5592
|
+
* @throws 403 response from the API.
|
|
5593
|
+
* @throws {NotFoundException} 404
|
|
5594
|
+
* @throws {UnprocessableEntityException} 422
|
|
5595
|
+
*/
|
|
4827
5596
|
setEnvironmentRolePermissions(slug: string, options: SetEnvironmentRolePermissionsOptions): Promise<EnvironmentRole>;
|
|
5597
|
+
/**
|
|
5598
|
+
* Add a permission to an environment role
|
|
5599
|
+
*
|
|
5600
|
+
* Add a single permission to an environment role. If the permission is already assigned to the role, this operation has no effect.
|
|
5601
|
+
* @param slug - The slug of the environment role.
|
|
5602
|
+
*
|
|
5603
|
+
* @example
|
|
5604
|
+
* "admin"
|
|
5605
|
+
*
|
|
5606
|
+
* @param options - Object containing slug.
|
|
5607
|
+
* @returns {Promise<EnvironmentRole>}
|
|
5608
|
+
* @throws {BadRequestException} 400
|
|
5609
|
+
* @throws 403 response from the API.
|
|
5610
|
+
* @throws {NotFoundException} 404
|
|
5611
|
+
* @throws {UnprocessableEntityException} 422
|
|
5612
|
+
*/
|
|
4828
5613
|
addEnvironmentRolePermission(slug: string, options: AddEnvironmentRolePermissionOptions): Promise<EnvironmentRole>;
|
|
5614
|
+
/**
|
|
5615
|
+
* Create a custom role
|
|
5616
|
+
*
|
|
5617
|
+
* Create a new custom role for this organization.
|
|
5618
|
+
* @param organizationId - The ID of the organization.
|
|
5619
|
+
*
|
|
5620
|
+
* @example
|
|
5621
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5622
|
+
*
|
|
5623
|
+
* @param options - Object containing name.
|
|
5624
|
+
* @returns {Promise<OrganizationRole>}
|
|
5625
|
+
* @throws {BadRequestException} 400
|
|
5626
|
+
* @throws 403 response from the API.
|
|
5627
|
+
* @throws {NotFoundException} 404
|
|
5628
|
+
* @throws {ConflictException} 409
|
|
5629
|
+
* @throws {UnprocessableEntityException} 422
|
|
5630
|
+
*/
|
|
4829
5631
|
createOrganizationRole(organizationId: string, options: CreateOrganizationRoleOptions): Promise<OrganizationRole>;
|
|
5632
|
+
/**
|
|
5633
|
+
* List custom roles
|
|
5634
|
+
*
|
|
5635
|
+
* Get a list of all roles that apply to an organization. This includes both environment roles and custom roles, returned in priority order.
|
|
5636
|
+
* @param organizationId - The ID of the organization.
|
|
5637
|
+
*
|
|
5638
|
+
* @example
|
|
5639
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5640
|
+
*
|
|
5641
|
+
* @returns {Promise<RoleList>}
|
|
5642
|
+
* @throws 403 response from the API.
|
|
5643
|
+
* @throws {NotFoundException} 404
|
|
5644
|
+
*/
|
|
4830
5645
|
listOrganizationRoles(organizationId: string): Promise<RoleList>;
|
|
5646
|
+
/**
|
|
5647
|
+
* Get a custom role
|
|
5648
|
+
*
|
|
5649
|
+
* Retrieve a role that applies to an organization by its slug. This can return either an environment role or a custom role.
|
|
5650
|
+
* @param organizationId - The ID of the organization.
|
|
5651
|
+
*
|
|
5652
|
+
* @example
|
|
5653
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5654
|
+
*
|
|
5655
|
+
* @param slug - The slug of the role.
|
|
5656
|
+
*
|
|
5657
|
+
* @example
|
|
5658
|
+
* "org-billing-admin"
|
|
5659
|
+
*
|
|
5660
|
+
* @returns {Promise<Role>}
|
|
5661
|
+
* @throws 403 response from the API.
|
|
5662
|
+
* @throws {NotFoundException} 404
|
|
5663
|
+
*/
|
|
4831
5664
|
getOrganizationRole(organizationId: string, slug: string): Promise<Role>;
|
|
5665
|
+
/**
|
|
5666
|
+
* Update a custom role
|
|
5667
|
+
*
|
|
5668
|
+
* Update an existing custom role. Only the fields provided in the request body will be updated.
|
|
5669
|
+
* @param organizationId - The ID of the organization.
|
|
5670
|
+
*
|
|
5671
|
+
* @example
|
|
5672
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5673
|
+
*
|
|
5674
|
+
* @param slug - The slug of the role.
|
|
5675
|
+
*
|
|
5676
|
+
* @example
|
|
5677
|
+
* "org-billing-admin"
|
|
5678
|
+
*
|
|
5679
|
+
* @param options - The request body.
|
|
5680
|
+
* @returns {Promise<OrganizationRole>}
|
|
5681
|
+
* @throws {BadRequestException} 400
|
|
5682
|
+
* @throws 403 response from the API.
|
|
5683
|
+
* @throws {NotFoundException} 404
|
|
5684
|
+
* @throws {UnprocessableEntityException} 422
|
|
5685
|
+
*/
|
|
4832
5686
|
updateOrganizationRole(organizationId: string, slug: string, options: UpdateOrganizationRoleOptions): Promise<OrganizationRole>;
|
|
5687
|
+
/**
|
|
5688
|
+
* Delete a custom role
|
|
5689
|
+
*
|
|
5690
|
+
* Delete an existing custom role.
|
|
5691
|
+
* @param organizationId - The ID of the organization.
|
|
5692
|
+
*
|
|
5693
|
+
* @example
|
|
5694
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5695
|
+
*
|
|
5696
|
+
* @param slug - The slug of the role.
|
|
5697
|
+
*
|
|
5698
|
+
* @example
|
|
5699
|
+
* "org-admin"
|
|
5700
|
+
*
|
|
5701
|
+
* @returns {Promise<void>}
|
|
5702
|
+
* @throws {BadRequestException} 400
|
|
5703
|
+
* @throws 403 response from the API.
|
|
5704
|
+
* @throws {NotFoundException} 404
|
|
5705
|
+
* @throws {ConflictException} 409
|
|
5706
|
+
*/
|
|
4833
5707
|
deleteOrganizationRole(organizationId: string, slug: string): Promise<void>;
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
5708
|
+
/**
|
|
5709
|
+
* Set permissions for a custom role
|
|
5710
|
+
*
|
|
5711
|
+
* Replace all permissions on a custom role with the provided list.
|
|
5712
|
+
* @param organizationId - The ID of the organization.
|
|
5713
|
+
*
|
|
5714
|
+
* @example
|
|
5715
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5716
|
+
*
|
|
5717
|
+
* @param slug - The slug of the role.
|
|
5718
|
+
*
|
|
5719
|
+
* @example
|
|
5720
|
+
* "org-admin"
|
|
5721
|
+
*
|
|
5722
|
+
* @param options - Object containing permissions.
|
|
5723
|
+
* @returns {Promise<Role>}
|
|
5724
|
+
* @throws 403 response from the API.
|
|
5725
|
+
* @throws {NotFoundException} 404
|
|
5726
|
+
* @throws {UnprocessableEntityException} 422
|
|
5727
|
+
*/
|
|
5728
|
+
updateRolePermissions(organizationId: string, slug: string, options: SetOrganizationRolePermissionsOptions): Promise<OrganizationRole>;
|
|
5729
|
+
/**
|
|
5730
|
+
* Add a permission to a custom role
|
|
5731
|
+
*
|
|
5732
|
+
* Add a single permission to a custom role. If the permission is already assigned to the role, this operation has no effect.
|
|
5733
|
+
* @param organizationId - The ID of the organization.
|
|
5734
|
+
*
|
|
5735
|
+
* @example
|
|
5736
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5737
|
+
*
|
|
5738
|
+
* @param slug - The slug of the role.
|
|
5739
|
+
*
|
|
5740
|
+
* @example
|
|
5741
|
+
* "org-admin"
|
|
5742
|
+
*
|
|
5743
|
+
* @param options - Object containing slug.
|
|
5744
|
+
* @returns {Promise<Role>}
|
|
5745
|
+
* @throws {BadRequestException} 400
|
|
5746
|
+
* @throws 403 response from the API.
|
|
5747
|
+
* @throws {NotFoundException} 404
|
|
5748
|
+
* @throws {UnprocessableEntityException} 422
|
|
5749
|
+
*/
|
|
5750
|
+
createRolePermission(organizationId: string, slug: string, options: AddOrganizationRolePermissionOptions): Promise<OrganizationRole>;
|
|
5751
|
+
/**
|
|
5752
|
+
* Remove a permission from a custom role
|
|
5753
|
+
*
|
|
5754
|
+
* Remove a single permission from a custom role by its slug.
|
|
5755
|
+
* @param organizationId - The ID of the organization.
|
|
5756
|
+
*
|
|
5757
|
+
* @example
|
|
5758
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5759
|
+
*
|
|
5760
|
+
* @param slug - The slug of the role.
|
|
5761
|
+
*
|
|
5762
|
+
* @example
|
|
5763
|
+
* "org-admin"
|
|
5764
|
+
*
|
|
5765
|
+
* @param permissionSlug - The slug of the permission to remove.
|
|
5766
|
+
*
|
|
5767
|
+
* @example
|
|
5768
|
+
* "documents:read"
|
|
5769
|
+
*
|
|
5770
|
+
* @returns {Promise<void>}
|
|
5771
|
+
* @throws 403 response from the API.
|
|
5772
|
+
* @throws {NotFoundException} 404
|
|
5773
|
+
*/
|
|
5774
|
+
deleteRolePermission(organizationId: string, slug: string, options: RemoveOrganizationRolePermissionOptions): Promise<void>;
|
|
5775
|
+
/**
|
|
5776
|
+
* Create a permission
|
|
5777
|
+
*
|
|
5778
|
+
* Create a new permission in your WorkOS environment. The permission can then be assigned to environment roles and custom roles.
|
|
5779
|
+
* @param options - Object containing slug, name.
|
|
5780
|
+
* @returns {Promise<Permission>}
|
|
5781
|
+
* @throws {BadRequestException} 400
|
|
5782
|
+
* @throws {NotFoundException} 404
|
|
5783
|
+
* @throws {ConflictException} 409
|
|
5784
|
+
* @throws {UnprocessableEntityException} 422
|
|
5785
|
+
*/
|
|
4837
5786
|
createPermission(options: CreatePermissionOptions): Promise<Permission>;
|
|
4838
|
-
|
|
5787
|
+
/**
|
|
5788
|
+
* List permissions
|
|
5789
|
+
*
|
|
5790
|
+
* Get a list of all permissions in your WorkOS environment.
|
|
5791
|
+
* @param options - Pagination and filter options.
|
|
5792
|
+
* @returns {Promise<AutoPaginatable<Permission, PaginationOptions>>}
|
|
5793
|
+
* @throws {NotFoundException} 404
|
|
5794
|
+
*/
|
|
5795
|
+
listPermissions(options?: ListPermissionsOptions): Promise<AutoPaginatable<Permission>>;
|
|
5796
|
+
/**
|
|
5797
|
+
* Get a permission
|
|
5798
|
+
*
|
|
5799
|
+
* Retrieve a permission by its unique slug.
|
|
5800
|
+
* @param slug - A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks.
|
|
5801
|
+
*
|
|
5802
|
+
* @example
|
|
5803
|
+
* "documents:read"
|
|
5804
|
+
*
|
|
5805
|
+
* @returns {Promise<Permission>}
|
|
5806
|
+
* @throws {NotFoundException} 404
|
|
5807
|
+
*/
|
|
4839
5808
|
getPermission(slug: string): Promise<Permission>;
|
|
5809
|
+
/**
|
|
5810
|
+
* Update a permission
|
|
5811
|
+
*
|
|
5812
|
+
* Update an existing permission. Only the fields provided in the request body will be updated.
|
|
5813
|
+
* @param slug - A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks.
|
|
5814
|
+
*
|
|
5815
|
+
* @example
|
|
5816
|
+
* "documents:read"
|
|
5817
|
+
*
|
|
5818
|
+
* @param options - The request body.
|
|
5819
|
+
* @returns {Promise<Permission>}
|
|
5820
|
+
* @throws 403 response from the API.
|
|
5821
|
+
* @throws {NotFoundException} 404
|
|
5822
|
+
* @throws {UnprocessableEntityException} 422
|
|
5823
|
+
*/
|
|
4840
5824
|
updatePermission(slug: string, options: UpdatePermissionOptions): Promise<Permission>;
|
|
5825
|
+
/**
|
|
5826
|
+
* Delete a permission
|
|
5827
|
+
*
|
|
5828
|
+
* Delete an existing permission. System permissions cannot be deleted.
|
|
5829
|
+
* @param slug - A unique key to reference the permission. Must be lowercase and contain only letters, numbers, hyphens, underscores, colons, periods, and asterisks.
|
|
5830
|
+
*
|
|
5831
|
+
* @example
|
|
5832
|
+
* "documents:read"
|
|
5833
|
+
*
|
|
5834
|
+
* @returns {Promise<void>}
|
|
5835
|
+
* @throws 403 response from the API.
|
|
5836
|
+
* @throws {NotFoundException} 404
|
|
5837
|
+
*/
|
|
4841
5838
|
deletePermission(slug: string): Promise<void>;
|
|
5839
|
+
/**
|
|
5840
|
+
* Get a resource
|
|
5841
|
+
*
|
|
5842
|
+
* Retrieve the details of an authorization resource by its ID.
|
|
5843
|
+
* @param resourceId - The ID of the authorization resource.
|
|
5844
|
+
*
|
|
5845
|
+
* @example
|
|
5846
|
+
* "authz_resource_01HXYZ123456789ABCDEFGHIJ"
|
|
5847
|
+
*
|
|
5848
|
+
* @returns {Promise<AuthorizationResource>}
|
|
5849
|
+
* @throws 403 response from the API.
|
|
5850
|
+
* @throws {NotFoundException} 404
|
|
5851
|
+
* @throws {UnprocessableEntityException} 422
|
|
5852
|
+
*/
|
|
4842
5853
|
getResource(resourceId: string): Promise<AuthorizationResource>;
|
|
5854
|
+
/**
|
|
5855
|
+
* Create an authorization resource
|
|
5856
|
+
*
|
|
5857
|
+
* Create a new authorization resource.
|
|
5858
|
+
* @param options - Object containing externalId, name, resourceTypeSlug, organizationId.
|
|
5859
|
+
* @returns {Promise<AuthorizationResource>}
|
|
5860
|
+
* @throws {BadRequestException} 400
|
|
5861
|
+
* @throws 403 response from the API.
|
|
5862
|
+
* @throws {NotFoundException} 404
|
|
5863
|
+
* @throws {ConflictException} 409
|
|
5864
|
+
* @throws {UnprocessableEntityException} 422
|
|
5865
|
+
*/
|
|
4843
5866
|
createResource(options: CreateAuthorizationResourceOptions): Promise<AuthorizationResource>;
|
|
5867
|
+
/**
|
|
5868
|
+
* Update a resource
|
|
5869
|
+
*
|
|
5870
|
+
* Update an existing authorization resource.
|
|
5871
|
+
* @param options - The request body.
|
|
5872
|
+
* @returns {Promise<AuthorizationResource>}
|
|
5873
|
+
* @throws {BadRequestException} 400
|
|
5874
|
+
* @throws 403 response from the API.
|
|
5875
|
+
* @throws {NotFoundException} 404
|
|
5876
|
+
* @throws {ConflictException} 409
|
|
5877
|
+
* @throws {UnprocessableEntityException} 422
|
|
5878
|
+
*/
|
|
4844
5879
|
updateResource(options: UpdateAuthorizationResourceOptions): Promise<AuthorizationResource>;
|
|
5880
|
+
/**
|
|
5881
|
+
* Delete an authorization resource
|
|
5882
|
+
*
|
|
5883
|
+
* Delete an authorization resource and all its descendants.
|
|
5884
|
+
* @param options.cascadeDelete - If true, deletes all descendant resources and role assignments. If not set and the resource has children or assignments, the request will fail.
|
|
5885
|
+
* @default false
|
|
5886
|
+
* @param options - Additional query options.
|
|
5887
|
+
* @returns {Promise<void>}
|
|
5888
|
+
* @throws {BadRequestException} 400
|
|
5889
|
+
* @throws 403 response from the API.
|
|
5890
|
+
* @throws {NotFoundException} 404
|
|
5891
|
+
* @throws {ConflictException} 409
|
|
5892
|
+
*/
|
|
4845
5893
|
deleteResource(options: DeleteAuthorizationResourceOptions): Promise<void>;
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
5894
|
+
/**
|
|
5895
|
+
* List resources
|
|
5896
|
+
*
|
|
5897
|
+
* Get a paginated list of authorization resources.
|
|
5898
|
+
* @param options - Pagination and filter options.
|
|
5899
|
+
* @returns {Promise<AutoPaginatable<AuthorizationResource, PaginationOptions>>}
|
|
5900
|
+
* @throws 403 response from the API.
|
|
5901
|
+
* @throws {UnprocessableEntityException} 422
|
|
5902
|
+
*/
|
|
5903
|
+
listResources(options?: ListAuthorizationResourcesOptions): Promise<AutoPaginatable<AuthorizationResource>>;
|
|
5904
|
+
/**
|
|
5905
|
+
* Get a resource by external ID
|
|
5906
|
+
*
|
|
5907
|
+
* Retrieve the details of an authorization resource by its external ID, organization, and resource type. This is useful when you only have the external ID from your system and need to fetch the full resource details.
|
|
5908
|
+
* @param organizationId - The ID of the organization that owns the resource.
|
|
5909
|
+
*
|
|
5910
|
+
* @example
|
|
5911
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5912
|
+
*
|
|
5913
|
+
* @param resourceTypeSlug - The slug of the resource type.
|
|
5914
|
+
*
|
|
5915
|
+
* @example
|
|
5916
|
+
* "project"
|
|
5917
|
+
*
|
|
5918
|
+
* @param externalId - An identifier you provide to reference the resource in your system.
|
|
5919
|
+
*
|
|
5920
|
+
* @example
|
|
5921
|
+
* "proj-456"
|
|
5922
|
+
*
|
|
5923
|
+
* @returns {Promise<AuthorizationResource>}
|
|
5924
|
+
* @throws 403 response from the API.
|
|
5925
|
+
* @throws {NotFoundException} 404
|
|
5926
|
+
*/
|
|
5927
|
+
getOrganizationResource(options: GetAuthorizationResourceByExternalIdOptions): Promise<AuthorizationResource>;
|
|
5928
|
+
/**
|
|
5929
|
+
* Update a resource by external ID
|
|
5930
|
+
*
|
|
5931
|
+
* Update an existing authorization resource using its external ID.
|
|
5932
|
+
* @param organizationId - The ID of the organization that owns the resource.
|
|
5933
|
+
*
|
|
5934
|
+
* @example
|
|
5935
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5936
|
+
*
|
|
5937
|
+
* @param resourceTypeSlug - The slug of the resource type.
|
|
5938
|
+
*
|
|
5939
|
+
* @example
|
|
5940
|
+
* "project"
|
|
5941
|
+
*
|
|
5942
|
+
* @param externalId - An identifier you provide to reference the resource in your system.
|
|
5943
|
+
*
|
|
5944
|
+
* @example
|
|
5945
|
+
* "proj-456"
|
|
5946
|
+
*
|
|
5947
|
+
* @param options - The request body.
|
|
5948
|
+
* @returns {Promise<AuthorizationResource>}
|
|
5949
|
+
* @throws {BadRequestException} 400
|
|
5950
|
+
* @throws 403 response from the API.
|
|
5951
|
+
* @throws {NotFoundException} 404
|
|
5952
|
+
* @throws {ConflictException} 409
|
|
5953
|
+
* @throws {UnprocessableEntityException} 422
|
|
5954
|
+
*/
|
|
5955
|
+
updateOrganizationResource(options: UpdateAuthorizationResourceByExternalIdOptions): Promise<AuthorizationResource>;
|
|
5956
|
+
/**
|
|
5957
|
+
* Delete an authorization resource by external ID
|
|
5958
|
+
*
|
|
5959
|
+
* Delete an authorization resource by organization, resource type, and external ID. This also deletes all descendant resources.
|
|
5960
|
+
* @param organizationId - The ID of the organization that owns the resource.
|
|
5961
|
+
*
|
|
5962
|
+
* @example
|
|
5963
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
5964
|
+
*
|
|
5965
|
+
* @param resourceTypeSlug - The slug of the resource type.
|
|
5966
|
+
*
|
|
5967
|
+
* @example
|
|
5968
|
+
* "project"
|
|
5969
|
+
*
|
|
5970
|
+
* @param externalId - An identifier you provide to reference the resource in your system.
|
|
5971
|
+
*
|
|
5972
|
+
* @example
|
|
5973
|
+
* "proj-456"
|
|
5974
|
+
*
|
|
5975
|
+
* @param options - Additional query options.
|
|
5976
|
+
* @returns {Promise<void>}
|
|
5977
|
+
* @throws {BadRequestException} 400
|
|
5978
|
+
* @throws 403 response from the API.
|
|
5979
|
+
* @throws {NotFoundException} 404
|
|
5980
|
+
* @throws {ConflictException} 409
|
|
5981
|
+
*/
|
|
5982
|
+
deleteOrganizationResource(options: DeleteAuthorizationResourceByExternalIdOptions): Promise<void>;
|
|
5983
|
+
/**
|
|
5984
|
+
* Check authorization
|
|
5985
|
+
*
|
|
5986
|
+
* Check if an organization membership has a specific permission on a resource. Supports identification by resource_id OR by resource_external_id + resource_type_slug.
|
|
5987
|
+
* @param options - Object containing permissionSlug.
|
|
5988
|
+
* @returns {Promise<AuthorizationCheckResult>}
|
|
5989
|
+
* @throws 403 response from the API.
|
|
5990
|
+
* @throws {NotFoundException} 404
|
|
5991
|
+
* @throws {UnprocessableEntityException} 422
|
|
5992
|
+
*/
|
|
4850
5993
|
check(options: AuthorizationCheckOptions): Promise<AuthorizationCheckResult>;
|
|
4851
|
-
|
|
5994
|
+
/**
|
|
5995
|
+
* List role assignments
|
|
5996
|
+
*
|
|
5997
|
+
* List all role assignments for an organization membership. This returns all roles that have been assigned to the user on resources, including organization-level and sub-resource roles.
|
|
5998
|
+
* @param organizationMembershipId - The ID of the organization membership.
|
|
5999
|
+
*
|
|
6000
|
+
* @example
|
|
6001
|
+
* "om_01HXYZ123456789ABCDEFGHIJ"
|
|
6002
|
+
*
|
|
6003
|
+
* @param options - Pagination and filter options.
|
|
6004
|
+
* @returns {Promise<AutoPaginatable<RoleAssignment>>}
|
|
6005
|
+
* @throws 403 response from the API.
|
|
6006
|
+
* @throws {NotFoundException} 404
|
|
6007
|
+
*/
|
|
6008
|
+
listOrganizationMembershipRoleAssignments(options: ListRoleAssignmentsOptions): Promise<AutoPaginatable<RoleAssignment>>;
|
|
6009
|
+
/**
|
|
6010
|
+
* Assign a role
|
|
6011
|
+
*
|
|
6012
|
+
* Assign a role to an organization membership on a specific resource.
|
|
6013
|
+
* @param options - Object containing roleSlug.
|
|
6014
|
+
* @returns {Promise<RoleAssignment>}
|
|
6015
|
+
* @throws 403 response from the API.
|
|
6016
|
+
* @throws {NotFoundException} 404
|
|
6017
|
+
* @throws {UnprocessableEntityException} 422
|
|
6018
|
+
*/
|
|
4852
6019
|
assignRole(options: AssignRoleOptions): Promise<RoleAssignment>;
|
|
6020
|
+
/**
|
|
6021
|
+
* Remove a role assignment
|
|
6022
|
+
*
|
|
6023
|
+
* Remove a role assignment by role slug and resource.
|
|
6024
|
+
* @param options - Object containing roleSlug.
|
|
6025
|
+
* @returns {Promise<void>}
|
|
6026
|
+
* @throws 403 response from the API.
|
|
6027
|
+
* @throws {NotFoundException} 404
|
|
6028
|
+
* @throws {UnprocessableEntityException} 422
|
|
6029
|
+
*/
|
|
4853
6030
|
removeRole(options: RemoveRoleOptions): Promise<void>;
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
6031
|
+
/**
|
|
6032
|
+
* Remove a role assignment by ID
|
|
6033
|
+
*
|
|
6034
|
+
* Remove a role assignment using its ID.
|
|
6035
|
+
* @param organizationMembershipId - The ID of the organization membership.
|
|
6036
|
+
*
|
|
6037
|
+
* @example
|
|
6038
|
+
* "om_01HXYZ123456789ABCDEFGHIJ"
|
|
6039
|
+
*
|
|
6040
|
+
* @param roleAssignmentId - The ID of the role assignment to remove.
|
|
6041
|
+
*
|
|
6042
|
+
* @example
|
|
6043
|
+
* "role_assignment_01HXYZ123456789ABCDEFGH"
|
|
6044
|
+
*
|
|
6045
|
+
* @returns {Promise<void>}
|
|
6046
|
+
* @throws 403 response from the API.
|
|
6047
|
+
* @throws {NotFoundException} 404
|
|
6048
|
+
*/
|
|
6049
|
+
deleteOrganizationMembershipRoleAssignment(options: RemoveRoleAssignmentOptions): Promise<void>;
|
|
6050
|
+
/**
|
|
6051
|
+
* List resources for organization membership
|
|
6052
|
+
*
|
|
6053
|
+
* Returns all child resources of a parent resource where the organization membership has a specific permission. This is useful for resource discovery—answering "What projects can this user access in this workspace?"
|
|
6054
|
+
*
|
|
6055
|
+
* You must provide either `parent_resource_id` or both `parent_resource_external_id` and `parent_resource_type_slug` to identify the parent resource.
|
|
6056
|
+
* @param organizationMembershipId - The ID of the organization membership.
|
|
6057
|
+
*
|
|
6058
|
+
* @example
|
|
6059
|
+
* "om_01HXYZ123456789ABCDEFGHIJ"
|
|
6060
|
+
*
|
|
6061
|
+
* @param options - Pagination and filter options.
|
|
6062
|
+
* @returns {Promise<AutoPaginatable<AuthorizationResource>>}
|
|
6063
|
+
* @throws {BadRequestException} 400
|
|
6064
|
+
* @throws 403 response from the API.
|
|
6065
|
+
* @throws {NotFoundException} 404
|
|
6066
|
+
* @throws {UnprocessableEntityException} 422
|
|
6067
|
+
*/
|
|
6068
|
+
listOrganizationMembershipResources(options: ListResourcesForMembershipOptions): Promise<AutoPaginatable<AuthorizationResource>>;
|
|
6069
|
+
/**
|
|
6070
|
+
* List organization memberships for resource
|
|
6071
|
+
*
|
|
6072
|
+
* Returns all organization memberships that have a specific permission on a resource instance. This is useful for answering "Who can access this resource?".
|
|
6073
|
+
* @param options - Pagination and filter options.
|
|
6074
|
+
* @returns {Promise<AutoPaginatable<BaseOrganizationMembership, PaginationOptions>>}
|
|
6075
|
+
* @throws {BadRequestException} 400
|
|
6076
|
+
* @throws 403 response from the API.
|
|
6077
|
+
* @throws {NotFoundException} 404
|
|
6078
|
+
* @throws {UnprocessableEntityException} 422
|
|
6079
|
+
*/
|
|
6080
|
+
listMembershipsForResource(options: ListMembershipsForResourceOptions): Promise<AutoPaginatable<AuthorizationOrganizationMembership>>;
|
|
6081
|
+
/**
|
|
6082
|
+
* List memberships for a resource by external ID
|
|
6083
|
+
*
|
|
6084
|
+
* Returns all organization memberships that have a specific permission on a resource, using the resource's external ID. This is useful for answering "Who can access this resource?" when you only have the external ID.
|
|
6085
|
+
* @param organizationId - The ID of the organization that owns the resource.
|
|
6086
|
+
*
|
|
6087
|
+
* @example
|
|
6088
|
+
* "org_01EHZNVPK3SFK441A1RGBFSHRT"
|
|
6089
|
+
*
|
|
6090
|
+
* @param resourceTypeSlug - The slug of the resource type this resource belongs to.
|
|
6091
|
+
*
|
|
6092
|
+
* @example
|
|
6093
|
+
* "project"
|
|
6094
|
+
*
|
|
6095
|
+
* @param externalId - An identifier you provide to reference the resource in your system.
|
|
6096
|
+
*
|
|
6097
|
+
* @example
|
|
6098
|
+
* "proj-456"
|
|
6099
|
+
*
|
|
6100
|
+
* @param options - Pagination and filter options.
|
|
6101
|
+
* @returns {Promise<AutoPaginatable<UserOrganizationMembershipBaseListData>>}
|
|
6102
|
+
* @throws {BadRequestException} 400
|
|
6103
|
+
* @throws 403 response from the API.
|
|
6104
|
+
* @throws {NotFoundException} 404
|
|
6105
|
+
* @throws {UnprocessableEntityException} 422
|
|
6106
|
+
*/
|
|
6107
|
+
listResourceOrganizationMemberships(options: ListMembershipsForResourceByExternalIdOptions): Promise<AutoPaginatable<AuthorizationOrganizationMembership>>;
|
|
6108
|
+
/**
|
|
6109
|
+
* List effective permissions for an organization membership on a resource
|
|
6110
|
+
*
|
|
6111
|
+
* Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
|
|
6112
|
+
* @param organizationMembershipId - The ID of the organization membership.
|
|
6113
|
+
*
|
|
6114
|
+
* @example
|
|
6115
|
+
* "om_01HXYZ123456789ABCDEFGHIJ"
|
|
6116
|
+
*
|
|
6117
|
+
* @param resourceId - The ID of the authorization resource.
|
|
6118
|
+
*
|
|
6119
|
+
* @example
|
|
6120
|
+
* "authz_resource_01HXYZ123456789ABCDEFGHIJ"
|
|
6121
|
+
*
|
|
6122
|
+
* @param options - Pagination and filter options.
|
|
6123
|
+
* @returns {Promise<AutoPaginatable<AuthorizationPermission>>}
|
|
6124
|
+
* @throws 403 response from the API.
|
|
6125
|
+
* @throws {NotFoundException} 404
|
|
6126
|
+
* @throws {UnprocessableEntityException} 422
|
|
6127
|
+
*/
|
|
6128
|
+
listResourcePermissions(options: ListEffectivePermissionsOptions): Promise<AutoPaginatable<Permission>>;
|
|
6129
|
+
/**
|
|
6130
|
+
* List effective permissions for an organization membership on a resource by external ID
|
|
6131
|
+
*
|
|
6132
|
+
* Returns all permissions the organization membership effectively has on a resource identified by its external ID, including permissions inherited through roles assigned to ancestor resources.
|
|
6133
|
+
* @param options - Pagination and filter options.
|
|
6134
|
+
* @returns {Promise<AutoPaginatable<Permission, PaginationOptions>>}
|
|
6135
|
+
* @throws 403 response from the API.
|
|
6136
|
+
* @throws {NotFoundException} 404
|
|
6137
|
+
* @throws {UnprocessableEntityException} 422
|
|
6138
|
+
*/
|
|
6139
|
+
listEffectivePermissionsByExternalId(options: ListEffectivePermissionsByExternalIdOptions): Promise<AutoPaginatable<Permission>>;
|
|
4858
6140
|
}
|
|
4859
6141
|
//#endregion
|
|
4860
6142
|
//#region src/common/exceptions/api-key-required.exception.d.ts
|
|
@@ -4873,13 +6155,38 @@ interface RequestException {
|
|
|
4873
6155
|
}
|
|
4874
6156
|
//#endregion
|
|
4875
6157
|
//#region src/common/exceptions/generic-server.exception.d.ts
|
|
6158
|
+
interface WorkOSErrorData {
|
|
6159
|
+
code?: string;
|
|
6160
|
+
message?: string;
|
|
6161
|
+
[key: string]: unknown;
|
|
6162
|
+
}
|
|
4876
6163
|
declare class GenericServerException extends Error implements RequestException {
|
|
4877
6164
|
readonly status: number;
|
|
4878
|
-
readonly rawData:
|
|
6165
|
+
readonly rawData: WorkOSErrorData;
|
|
4879
6166
|
readonly requestID: string;
|
|
4880
6167
|
readonly name: string;
|
|
4881
6168
|
readonly message: string;
|
|
4882
|
-
|
|
6169
|
+
readonly code: string | undefined;
|
|
6170
|
+
constructor(status: number, message: string | undefined, rawData: WorkOSErrorData, requestID: string);
|
|
6171
|
+
}
|
|
6172
|
+
//#endregion
|
|
6173
|
+
//#region src/common/exceptions/authentication.exception.d.ts
|
|
6174
|
+
type AuthenticationErrorCode = 'email_verification_required' | 'organization_selection_required' | 'mfa_enrollment' | 'mfa_challenge' | 'mfa_verification' | 'sso_required';
|
|
6175
|
+
interface AuthenticationErrorData extends WorkOSErrorData {
|
|
6176
|
+
code: AuthenticationErrorCode;
|
|
6177
|
+
pending_authentication_token?: string;
|
|
6178
|
+
user?: Record<string, unknown>;
|
|
6179
|
+
organizations?: Array<{
|
|
6180
|
+
id: string;
|
|
6181
|
+
name: string;
|
|
6182
|
+
}>;
|
|
6183
|
+
}
|
|
6184
|
+
declare function isAuthenticationErrorData(data: WorkOSErrorData): data is AuthenticationErrorData;
|
|
6185
|
+
declare class AuthenticationException extends GenericServerException {
|
|
6186
|
+
readonly rawData: AuthenticationErrorData;
|
|
6187
|
+
readonly name = "AuthenticationException";
|
|
6188
|
+
readonly pendingAuthenticationToken: string | undefined;
|
|
6189
|
+
constructor(status: number, rawData: AuthenticationErrorData, requestID: string);
|
|
4883
6190
|
}
|
|
4884
6191
|
//#endregion
|
|
4885
6192
|
//#region src/common/exceptions/bad-request.exception.d.ts
|
|
@@ -4903,6 +6210,25 @@ declare class BadRequestException extends Error implements RequestException {
|
|
|
4903
6210
|
});
|
|
4904
6211
|
}
|
|
4905
6212
|
//#endregion
|
|
6213
|
+
//#region src/common/exceptions/conflict.exception.d.ts
|
|
6214
|
+
declare class ConflictException extends Error implements RequestException {
|
|
6215
|
+
readonly status = 409;
|
|
6216
|
+
readonly name = "ConflictException";
|
|
6217
|
+
readonly requestID: string;
|
|
6218
|
+
readonly code?: string;
|
|
6219
|
+
constructor({
|
|
6220
|
+
error,
|
|
6221
|
+
message,
|
|
6222
|
+
requestID,
|
|
6223
|
+
code
|
|
6224
|
+
}: {
|
|
6225
|
+
error?: string;
|
|
6226
|
+
message?: string;
|
|
6227
|
+
requestID: string;
|
|
6228
|
+
code?: string;
|
|
6229
|
+
});
|
|
6230
|
+
}
|
|
6231
|
+
//#endregion
|
|
4906
6232
|
//#region src/common/exceptions/no-api-key-provided.exception.d.ts
|
|
4907
6233
|
declare class NoApiKeyProvidedException extends Error {
|
|
4908
6234
|
readonly status = 500;
|
|
@@ -4991,6 +6317,70 @@ declare class UnprocessableEntityException extends Error implements RequestExcep
|
|
|
4991
6317
|
});
|
|
4992
6318
|
}
|
|
4993
6319
|
//#endregion
|
|
6320
|
+
//#region src/admin-portal/interfaces/sso-intent-options.interface.d.ts
|
|
6321
|
+
interface SSOIntentOptions {
|
|
6322
|
+
/** The bookmark slug to use for SSO. */
|
|
6323
|
+
bookmarkSlug?: string;
|
|
6324
|
+
/** The SSO provider type to configure. */
|
|
6325
|
+
providerType?: 'GoogleSAML';
|
|
6326
|
+
}
|
|
6327
|
+
interface SSOIntentOptionsResponse {
|
|
6328
|
+
bookmark_slug?: string;
|
|
6329
|
+
provider_type?: 'GoogleSAML';
|
|
6330
|
+
}
|
|
6331
|
+
//#endregion
|
|
6332
|
+
//#region src/admin-portal/interfaces/intent-options.interface.d.ts
|
|
6333
|
+
interface IntentOptions {
|
|
6334
|
+
/** SSO-specific options for the Admin Portal. */
|
|
6335
|
+
sso: SSOIntentOptions;
|
|
6336
|
+
}
|
|
6337
|
+
interface IntentOptionsResponse {
|
|
6338
|
+
sso: SSOIntentOptionsResponse;
|
|
6339
|
+
}
|
|
6340
|
+
//#endregion
|
|
6341
|
+
//#region src/admin-portal/interfaces/generate-link.interface.d.ts
|
|
6342
|
+
interface GenerateLink {
|
|
6343
|
+
/** The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used. */
|
|
6344
|
+
returnUrl?: string;
|
|
6345
|
+
/** The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used. */
|
|
6346
|
+
successUrl?: string;
|
|
6347
|
+
/** An [Organization](https://workos.com/docs/reference/organization) identifier. */
|
|
6348
|
+
organization: string;
|
|
6349
|
+
/**
|
|
6350
|
+
*
|
|
6351
|
+
* The intent of the Admin Portal.
|
|
6352
|
+
* - `sso` - Launch Admin Portal for creating SSO connections
|
|
6353
|
+
* - `dsync` - Launch Admin Portal for creating Directory Sync connections
|
|
6354
|
+
* - `audit_logs` - Launch Admin Portal for viewing Audit Logs
|
|
6355
|
+
* - `log_streams` - Launch Admin Portal for creating Log Streams
|
|
6356
|
+
* - `domain_verification` - Launch Admin Portal for Domain Verification
|
|
6357
|
+
* - `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates
|
|
6358
|
+
* - `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
|
|
6359
|
+
*/
|
|
6360
|
+
intent?: GenerateLinkIntent;
|
|
6361
|
+
/** Options to configure the Admin Portal based on the intent. */
|
|
6362
|
+
intentOptions?: IntentOptions;
|
|
6363
|
+
/** The email addresses of the IT admins to grant access to the Admin Portal for the given organization. Accepts up to 20 emails. */
|
|
6364
|
+
adminEmails?: string[];
|
|
6365
|
+
}
|
|
6366
|
+
interface GenerateLinkResponse {
|
|
6367
|
+
return_url?: string;
|
|
6368
|
+
success_url?: string;
|
|
6369
|
+
organization: string;
|
|
6370
|
+
intent?: GenerateLinkIntent;
|
|
6371
|
+
intent_options?: IntentOptionsResponse;
|
|
6372
|
+
admin_emails?: string[];
|
|
6373
|
+
}
|
|
6374
|
+
//#endregion
|
|
6375
|
+
//#region src/admin-portal/interfaces/portal-link-response.interface.d.ts
|
|
6376
|
+
interface PortalLinkResponse {
|
|
6377
|
+
/** An ephemeral link to initiate the Admin Portal. */
|
|
6378
|
+
link: string;
|
|
6379
|
+
}
|
|
6380
|
+
interface PortalLinkResponseWire {
|
|
6381
|
+
link: string;
|
|
6382
|
+
}
|
|
6383
|
+
//#endregion
|
|
4994
6384
|
//#region src/factory.d.ts
|
|
4995
6385
|
/**
|
|
4996
6386
|
* Method names available without API key - single source of truth.
|
|
@@ -5198,6 +6588,7 @@ declare class Vault {
|
|
|
5198
6588
|
}
|
|
5199
6589
|
//#endregion
|
|
5200
6590
|
//#region src/workos.d.ts
|
|
6591
|
+
/** WorkOS REST API */
|
|
5201
6592
|
declare class WorkOS {
|
|
5202
6593
|
readonly baseURL: string;
|
|
5203
6594
|
readonly client: HttpClient;
|
|
@@ -5213,13 +6604,13 @@ declare class WorkOS {
|
|
|
5213
6604
|
readonly directorySync: DirectorySync;
|
|
5214
6605
|
readonly events: Events;
|
|
5215
6606
|
readonly featureFlags: FeatureFlags;
|
|
5216
|
-
readonly
|
|
5217
|
-
readonly
|
|
6607
|
+
readonly groups: Groups;
|
|
6608
|
+
readonly multiFactorAuth: MultiFactorAuth;
|
|
5218
6609
|
readonly organizations: Organizations;
|
|
5219
6610
|
readonly organizationDomains: OrganizationDomains;
|
|
5220
6611
|
readonly passwordless: Passwordless;
|
|
5221
6612
|
readonly pipes: Pipes;
|
|
5222
|
-
readonly
|
|
6613
|
+
readonly adminPortal: AdminPortal;
|
|
5223
6614
|
readonly sso: SSO;
|
|
5224
6615
|
readonly userManagement: UserManagement;
|
|
5225
6616
|
readonly vault: Vault;
|
|
@@ -5275,5 +6666,5 @@ declare class WorkOS {
|
|
|
5275
6666
|
private handleHttpError;
|
|
5276
6667
|
}
|
|
5277
6668
|
//#endregion
|
|
5278
|
-
export { DecisionTreeNode as $, VaultNamesListedEventResponseData as $a, ProfileAndToken as $c, RoleUpdatedEventResponse as $i, SerializedListResourcesForMembershipOptions as $l, AuthenticationOAuthSucceededEventResponse as $n, SerializedResetPasswordOptions as $o, FlagUpdatedEventResponse as $r, CreateOrganizationMembershipOptions as $s, CreatePasswordlessSessionOptions as $t, DirectoryGroup as $u, OauthException as A, VaultActor as Aa, SerializedAuthenticateWithRefreshTokenOptions as Ac, OrganizationRoleCreatedEvent as Ai, BaseRemoveRoleOptions as Al, WorkOSOptions as An, OrganizationDomainState as Ao, DsyncGroupUserAddedEvent as Ar, ListInvitationsOptions as As, UpdateResourceOptions as At, RemoveOrganizationRolePermissionOptions as Au, QueryRequestOptions as B, VaultDataReadEventData as Ba, AuthenticateUserWithEmailVerificationCredentials as Bc, PasswordResetSucceededEvent as Bi, ListRoleAssignmentsOptions as Bl, ApiKeyRevokedEvent as Bn, SerializedUpdateOrganizationMembershipOptions as Bo, EmailVerificationCreatedEvent as Br, FactorResponse as Bs, CreateAuditLogSchemaResponse as Bt, SerializedUpdateEnvironmentRoleOptions as Bu, PublicUserManagement as C, VaultDekReadEventResponse as Ca, UserResponse as Cc, OrganizationDomainVerifiedEventResponse as Ci, OrganizationRoleResponse as Cl, ListOrganizationFeatureFlagsOptions as Cn, SerializedCreateOrganizationApiKeyOptions as Co, DsyncDeletedEventResponse as Cr, AuthorizationOrganizationMembershipListResponse as Cs, ResourceOptions as Ct, UpdatePermissionOptions as Cu, UnauthorizedException as D, VaultMetadataReadEventResponse as Da, SerializedAuthenticateWithRefreshTokenPublicClientOptions as Dc, OrganizationMembershipDeletedResponse as Di, RoleList as Dl, DomainData as Dn, OrganizationDomainVerificationFailedResponse as Do, DsyncGroupDeletedEventResponse as Dr, OrganizationMembership as Ds, SerializedDeleteResourceOptions as Dt, PermissionList as Du, UnprocessableEntityException as E, VaultMetadataReadEvent as Ea, AuthenticateWithRefreshTokenPublicClientOptions as Ec, OrganizationMembershipDeleted as Ei, RoleEventResponse as El, SerializedCreateOrganizationOptions as En, OrganizationDomainVerificationFailed as Eo, DsyncGroupDeletedEvent as Er, BaseOrganizationMembershipResponse as Es, SerializedCreateResourceOptions as Et, Permission as Eu, ApiKeyRequiredException as F, VaultByokKeyVerificationCompletedEventResponseData as Fa, AuthenticateWithOrganizationSelectionOptions as Fc, OrganizationRoleUpdatedEventResponse as Fi, AssignRoleOptions as Fl, List as Fn, VerifyEmailOptions as Fo, DsyncUserCreatedEventResponse as Fr, InvitationEventResponse as Fs, AuditLogSchema as Ft, CreateOrganizationRoleOptions as Fu, CheckOptions as G, VaultDekDecryptedEventResponseData as Ga, AuthenticateUserWithCodeCredentials as Gc, PermissionDeletedEventResponse as Gi, RoleAssignmentResourceResponse as Gl, AuthenticationMagicAuthFailedEventResponse as Gn, SessionStatus as Go, EventResponse as Gr, EmailVerification as Gs, CreateAuditLogEventRequestOptions as Gt, EnvironmentRoleList as Gu, QueryResultResponse as H, VaultDataUpdatedEventData as Ha, SerializedAuthenticateWithEmailVerificationOptions as Hc, PermissionCreatedEvent as Hi, RoleAssignmentList as Hl, AuthenticationEmailVerificationSucceededEvent as Hn, AuthMethod as Ho, Event as Hr, FactorWithSecretsResponse as Hs, AuditLogActor as Ht, CreateEnvironmentRoleOptions as Hu, FeatureFlagsRuntimeClient as I, VaultDataCreatedEventData as Ia, SerializedAuthenticateWithOrganizationSelectionOptions as Ic, OrganizationUpdatedEvent as Ii, AssignRoleOptionsWithResourceExternalId as Il, ListResponse as In, SerializedUpdateUserPasswordOptions as Io, DsyncUserDeletedEvent as Ir, InvitationResponse as Is, AuditLogSchemaMetadata as It, SerializedCreateOrganizationRoleOptions as Iu, CheckResultInterface as J, VaultKekCreatedEventData as Ja, AuthenticateWithOptionsBase as Jc, RoleCreatedEvent as Ji, ListMembershipsForResourceByExternalIdOptions as Jl, AuthenticationMfaSucceededEvent as Jn, SerializedSendInvitationOptions as Jo, FlagDeletedEvent as Jr, EmailVerificationResponse as Js, AuditLogExportResponse as Jt, ListDirectoryUsersOptions as Ju, CheckRequestOptions as K, VaultDekReadEventData as Ka, AuthenticateWithCodeOptions as Kc, PermissionUpdatedEvent as Ki, RoleAssignmentResponse as Kl, AuthenticationMagicAuthSucceededEvent as Kn, SendVerificationEmailOptions as Ko, FlagCreatedEvent as Kr, EmailVerificationEvent as Ks, SerializedCreateAuditLogEventOptions as Kt, EnvironmentRoleListResponse as Ku, WarrantToken as L, VaultDataCreatedEventResponseData as La, AuthenticateUserWithMagicAuthCredentials as Lc, OrganizationUpdatedResponse as Li, AssignRoleOptionsWithResourceId as Ll, GetOptions as Ln, UpdateUserPasswordOptions as Lo, DsyncUserDeletedEventResponse as Lr, Identity as Ls, AuditLogTargetSchema as Lt, OrganizationRole as Lu, NoApiKeyProvidedException as M, VaultActorSource as Ma, AuthenticateWithPasswordOptions as Mc, OrganizationRoleDeletedEvent as Mi, RemoveRoleOptionsWithResourceExternalId as Ml, PutOptions as Mn, CreateOrganizationDomainOptions as Mo, DsyncGroupUserRemovedEvent as Mr, ListAuthFactorsOptions as Ms, CheckOp as Mt, SetOrganizationRolePermissionsOptions as Mu, BadRequestException as N, VaultByokKeyProvider as Na, SerializedAuthenticateWithPasswordOptions as Nc, OrganizationRoleDeletedEventResponse as Ni, RemoveRoleOptionsWithResourceId as Nl, PostOptions as Nn, SerializedCreateOrganizationDomainOptions as No, DsyncGroupUserRemovedEventResponse as Nr, Invitation as Ns, CookieSession as Nt, SerializedUpdateOrganizationRoleOptions as Nu, SignatureVerificationException as O, VaultNamesListedEvent as Oa, AuthenticateUserWithRefreshTokenCredentials as Oc, OrganizationMembershipUpdated as Oi, RoleResponse as Ol, DomainDataState as On, OrganizationDomain as Oo, DsyncGroupUpdatedEvent as Or, OrganizationMembershipResponse as Os, SerializedListResourcesOptions as Ot, PermissionListResponse as Ou, GenericServerException as P, VaultByokKeyVerificationCompletedEventData as Pa, AuthenticateUserWithOrganizationSelectionCredentials as Pc, OrganizationRoleUpdatedEvent as Pi, SerializedRemoveRoleOptions as Pl, PatchOptions as Pn, SerializedVerifyEmailOptions as Po, DsyncUserCreatedEvent as Pr, InvitationEvent as Ps, AuditLogActorSchema as Pt, UpdateOrganizationRoleOptions as Pu, DebugInfoResponse as Q, VaultNamesListedEventData as Qa, WithResolvedClientId as Qc, RoleUpdatedEvent as Qi, ListResourcesForMembershipOptionsWithParentId as Ql, AuthenticationOAuthSucceededEvent as Qn, ResetPasswordOptions as Qo, FlagUpdatedEvent as Qr, SerializedCreatePasswordResetOptions as Qs, SendSessionResponse as Qt, PaginationOptions as Qu, WarrantTokenResponse as R, VaultDataDeletedEventData as Ra, AuthenticateWithMagicAuthOptions as Rc, PasswordResetCreatedEvent as Ri, BaseAssignRoleOptions as Rl, ApiKeyCreatedEvent as Rn, SerializedUpdateUserOptions as Ro, DsyncUserUpdatedEvent as Rr, IdentityResponse as Rs, CreateAuditLogSchemaOptions as Rt, AddEnvironmentRolePermissionOptions as Ru, PublicSSO as S, VaultDekReadEvent as Sa, User as Sc, OrganizationDomainVerifiedEvent as Si, OrganizationRoleEventResponse as Sl, ListOrganizationsOptions as Sn, CreateOrganizationApiKeyRequestOptions as So, DsyncDeletedEvent as Sr, AuthorizationOrganizationMembershipList as Ss, ResourceInterface as St, SerializedUpdatePermissionOptions as Su, createWorkOS as T, VaultKekCreatedEventResponse as Ta, ImpersonatorResponse as Tc, OrganizationMembershipCreatedResponse as Ti, RoleEvent as Tl, CreateOrganizationRequestOptions as Tn, SerializedApiKey as To, DsyncGroupCreatedEventResponse as Tr, BaseOrganizationMembership as Ts, SerializedBatchWriteResourcesOptions as Tt, SerializedCreatePermissionOptions as Tu, SerializedQueryOptions as U, VaultDataUpdatedEventResponseData as Ua, AuthenticateWithCodeAndVerifierOptions as Uc, PermissionCreatedEventResponse as Ui, RoleAssignmentListResponse as Ul, AuthenticationEmailVerificationSucceededEventResponse as Un, Session as Uo, EventBase as Ur, EnrollAuthFactorOptions as Us, AuditLogTarget as Ut, SerializedCreateEnvironmentRoleOptions as Uu, QueryResult as V, VaultDataReadEventResponseData as Va, AuthenticateWithEmailVerificationOptions as Vc, PasswordResetSucceededEventResponse as Vi, RoleAssignment as Vl, ApiKeyRevokedEventResponse as Vn, UpdateOrganizationMembershipOptions as Vo, EmailVerificationCreatedEventResponse as Vr, FactorWithSecrets$1 as Vs, SerializedCreateAuditLogSchemaOptions as Vt, UpdateEnvironmentRoleOptions as Vu, CheckBatchOptions as W, VaultDekDecryptedEventData as Wa, SerializedAuthenticateWithCodeAndVerifierOptions as Wc, PermissionDeletedEvent as Wi, RoleAssignmentResource as Wl, AuthenticationMagicAuthFailedEvent as Wn, SessionResponse as Wo, EventName as Wr, SerializedEnrollUserInMfaFactorOptions as Ws, CreateAuditLogEventOptions as Wt, EnvironmentRole as Wu, CheckWarrantOptions as X, VaultMetadataReadEventData as Xa, SerializedAuthenticatePublicClientBase as Xc, RoleDeletedEvent as Xi, ListResourcesForMembershipOptions as Xl, AuthenticationOAuthFailedEvent as Xn, SerializedRevokeSessionOptions as Xo, FlagRuleUpdatedEvent as Xr, SerializedCreateUserOptions as Xs, SerializedAuditLogExportOptions as Xt, ListDirectoriesOptions as Xu, CheckResultResponse as Y, VaultKekCreatedEventResponseData as Ya, AuthenticateWithSessionOptions as Yc, RoleCreatedEventResponse as Yi, ListMembershipsForResourceOptions as Yl, AuthenticationMfaSucceededEventResponse as Yn, RevokeSessionOptions as Yo, FlagDeletedEventResponse as Yr, CreateUserOptions as Ys, AuditLogExportOptions as Yt, ListDirectoryGroupsOptions as Yu, DebugInfo as Z, VaultMetadataReadEventResponseData as Za, SerializedAuthenticateWithOptionsBase as Zc, RoleDeletedEventResponse as Zi, ListResourcesForMembershipOptionsWithParentExternalId as Zl, AuthenticationOAuthFailedEventResponse as Zn, serializeRevokeSessionOptions as Zo, FlagRuleUpdatedEventResponse as Zr, CreatePasswordResetOptions as Zs, GeneratePortalLinkIntent as Zt, SerializedListDirectoriesOptions as Zu, CreateDataKeyOptions as _, VaultDataReadEventResponse as _a, AuthenticateWithSessionCookieOptions as _c, OrganizationDomainDeletedEventResponse as _i, DirectoryUserResponse as _l, UserRegistrationActionPayload as _n, ValidateApiKeyResponse as _o, ConnectionDeactivatedEventResponse as _r, ListSessionsOptions as _s, CreateResourceOptions as _t, CreateOptionsWithParentResourceId as _u, ReadObjectOptions as a, UserCreatedEventResponse as aa, AuthenticationRadarRiskDetectedEventData as ac, DirectoryType as ad, InvitationResentEventResponse as ai, ListConnectionsOptions as al, AutoPaginatable as an, RuntimeClientOptions as ao, AuthenticationPasswordFailedEventResponse as ar, PasswordResetEvent as as, ListWarrantsRequestOptions as at, DeleteAuthorizationResourceOptions as au, ConfidentialClientOptions as b, VaultDekDecryptedEvent as ba, AuthenticationResponse as bc, OrganizationDomainVerificationFailedEvent as bi, ListOrganizationRolesResponse as bl, Organization as bn, SerializedCreatedApiKey as bo, DsyncActivatedEvent as br, SerializedListOrganizationMembershipsOptions as bs, ListResourcesOptions as bt, UpdateAuthorizationResourceOptions as bu, ObjectMetadata as c, UserUpdatedEvent as ca, AuthenticationEventResponse as cc, HttpClient as cd, MagicAuthCreatedEvent as ci, GetProfileOptions as cl, Webhooks as cn, FlagPollEntry as co, AuthenticationRadarRiskDetectedEvent as cr, MagicAuth as cs, SerializedSubject as ct, GetAuthorizationResourceByExternalIdOptions as cu, VaultObject as d, VaultByokKeyVerificationCompletedEventResponse as da, AuthenticateUserWithTotpCredentials as dc, RequestHeaders as dd, OrganizationCreatedResponse as di, ConnectionResponse as dl, ResponsePayload as dn, FeatureFlag as do, AuthenticationSSOFailedEventResponse as dr, MagicAuthResponse as ds, Warrant as dt, AuthorizationResource as du, SessionCreatedEvent as ea, SerializedCreateOrganizationMembershipOptions as ec, DirectoryGroupResponse as ed, InvitationAcceptedEvent as ei, ProfileAndTokenResponse as el, SerializedCreatePasswordlessSessionOptions as en, DataKey as eo, AuthenticationPasskeyFailedEvent as er, ResendInvitationOptions as es, DecisionTreeNodeResponse as et, AuthorizationCheckOptions as eu, DeleteObjectOptions as f, VaultDataCreatedEvent as fa, AuthenticateWithTotpOptions as fc, RequestOptions as fd, OrganizationDeletedEvent as fi, ConnectionType as fl, UserRegistrationActionResponseData as fn, FeatureFlagResponse as fo, AuthenticationSSOSucceededEvent as fr, LogoutURLOptions as fs, WarrantResponse as ft, AuthorizationResourceList as fu, DecryptDataKeyResponse as g, VaultDataReadEvent as ga, AuthenticateWithSessionCookieFailureReason as gc, OrganizationDomainDeletedEvent as gi, DirectoryUser as gl, UserDataPayload as gn, ValidateApiKeyOptions as go, ConnectionDeactivatedEvent as gr, ListUserFeatureFlagsOptions as gs, BatchWriteResourcesResponse as gt, CreateOptionsWithParentExternalId as gu, DecryptDataKeyOptions as h, VaultDataDeletedEventResponse as ha, AuthenticateWithSessionCookieFailedResponse as hc, CryptoProvider as hd, OrganizationDomainCreatedEventResponse as hi, DefaultCustomAttributes as hl, UserData as hn, SerializedValidateApiKeyResponse as ho, ConnectionActivatedEventResponse as hr, SerializedListUsersOptions as hs, BatchWriteResourcesOptions as ht, CreateAuthorizationResourceOptions as hu, ReadObjectMetadataResponse as i, UserCreatedEvent as ia, UserManagementAuthorizationURLOptions as ic, DirectoryStateResponse as id, InvitationResentEvent as ii, OauthTokensResponse as il, SerializedListEventOptions as in, RuntimeClientLogger as io, AuthenticationPasswordFailedEvent as ir, PasswordReset as is, ListWarrantsOptions as it, SerializedAuthorizationCheckOptions as iu, NotFoundException as j, VaultActorResponse as ja, AuthenticateUserWithPasswordCredentials as jc, OrganizationRoleCreatedEventResponse as ji, RemoveRoleOptions as jl, UnprocessableEntityError as jn, OrganizationDomainVerificationStrategy as jo, DsyncGroupUserAddedEventResponse as jr, SerializedListInvitationsOptions as js, ResourceOp as jt, AddOrganizationRolePermissionOptions as ju, RateLimitExceededException as k, VaultNamesListedEventResponse as ka, AuthenticateWithRefreshTokenOptions as kc, OrganizationMembershipUpdatedResponse as ki, RemoveRoleAssignmentOptions as kl, WorkOSResponseError as kn, OrganizationDomainResponse as ko, DsyncGroupUpdatedEventResponse as kr, OrganizationMembershipStatus as ks, SerializedResourceOptions as kt, PermissionResponse as ku, ObjectUpdateBy as l, UserUpdatedEventResponse as la, AuthenticationEventSso as lc, HttpClientInterface as ld, MagicAuthCreatedEventResponse as li, Connection as ll, Actions as ln, FlagPollResponse as lo, AuthenticationRadarRiskDetectedEventResponse as lr, MagicAuthEvent as ls, SerializedWriteWarrantOptions as lt, ListAuthorizationResourcesOptions as lu, CreateObjectOptions as m, VaultDataDeletedEvent as ma, AccessToken$1 as mc, ResponseHeaders as md, OrganizationDomainCreatedEvent as mi, SSOPKCEAuthorizationURLResult as ml, ActionPayload as mn, AddFlagTargetOptions as mo, ConnectionActivatedEvent as mr, ListUsersOptions as ms, WarrantOp as mt, AuthorizationResourceResponse as mu, UpdateObjectEntity as n, SessionRevokedEvent as na, SerializedCreateMagicAuthOptions as nc, DirectoryResponse as nd, InvitationCreatedEvent as ni, ProfileResponse as nl, PasswordlessSessionResponse as nn, KeyContext as no, AuthenticationPasskeySucceededEvent as nr, RefreshSessionFailureReason as ns, SerializedCheckOptions as nt, AuthorizationCheckOptionsWithResourceId as nu, ReadObjectResponse as o, UserDeletedEvent as oa, AuthenticationRadarRiskDetectedEventResponseData as oc, EventDirectory as od, InvitationRevokedEvent as oi, SerializedListConnectionsOptions as ol, PKCE as on, RemoveFlagTargetOptions as oo, AuthenticationPasswordSucceededEvent as or, PasswordResetEventResponse as os, PolicyContext as ot, DeleteAuthorizationResourceByExternalIdOptions as ou, CreateObjectEntity as p, VaultDataCreatedEventResponse as pa, SerializedAuthenticateWithTotpOptions as pc, ResponseHeaderValue as pd, OrganizationDeletedResponse as pi, SSOAuthorizationURLOptions as pl, ActionContext as pn, EvaluationContext as po, AuthenticationSSOSucceededEventResponse as pr, Locale as ps, WriteWarrantOptions as pt, AuthorizationResourceListResponse as pu, CheckResult as q, VaultDekReadEventResponseData as qa, SerializedAuthenticateWithCodeOptions as qc, PermissionUpdatedEventResponse as qi, RoleAssignmentRole as ql, AuthenticationMagicAuthSucceededEventResponse as qn, SendInvitationOptions as qo, FlagCreatedEventResponse as qr, EmailVerificationEventResponse as qs, AuditLogExport as qt, EnvironmentRoleResponse as qu, UpdateObjectOptions as r, SessionRevokedEventResponse as ra, PKCEAuthorizationURLResult as rc, DirectoryState as rd, InvitationCreatedEventResponse as ri, OauthTokens as rl, ListEventOptions as rn, RuntimeClientStats as ro, AuthenticationPasskeySucceededEventResponse as rr, RefreshSessionResponse as rs, SerializedCheckWarrantOptions as rt, AuthorizationCheckResult as ru, ObjectDigest as s, UserDeletedEventResponse as sa, AuthenticationEvent as sc, EventDirectoryResponse as sd, InvitationRevokedEventResponse as si, GetProfileAndTokenOptions as sl, PKCEPair as sn, ListFeatureFlagsOptions as so, AuthenticationPasswordSucceededEventResponse as sr, PasswordResetResponse as ss, SerializedListWarrantsOptions as st, UpdateAuthorizationResourceByExternalIdOptions as su, WorkOS as t, SessionCreatedEventResponse as ta, CreateMagicAuthOptions as tc, Directory as td, InvitationAcceptedEventResponse as ti, Profile as tl, PasswordlessSession as tn, DataKeyPair as to, AuthenticationPasskeyFailedEventResponse as tr, SerializedResendInvitationOptions as ts, SerializedCheckBatchOptions as tt, AuthorizationCheckOptionsWithResourceExternalId as tu, ObjectVersion as u, VaultByokKeyVerificationCompletedEvent as ua, AuthenticationEventSsoResponse as uc, HttpClientResponseInterface as ud, OrganizationCreatedEvent as ui, ConnectionDomain as ul, AuthenticationActionResponseData as un, FlagTarget as uo, AuthenticationSSOFailedEvent as ur, MagicAuthEventResponse as us, Subject as ut, SerializedListAuthorizationResourcesOptions as uu, CreateDataKeyResponse as v, VaultDataUpdatedEvent as va, AuthenticateWithSessionCookieSuccessResponse as vc, OrganizationDomainUpdatedEvent as vi, DirectoryUserWithGroups as vl, SerializedUpdateOrganizationOptions as vn, ListOrganizationApiKeysOptions as vo, ConnectionDeletedEvent as vr, SerializedListSessionsOptions as vs, DeleteResourceOptions as vt, SerializedCreateAuthorizationResourceOptions as vu, PublicWorkOS as w, VaultKekCreatedEvent as wa, Impersonator as wc, OrganizationMembershipCreated as wi, Role as wl, CreateOrganizationOptions as wn, ApiKey as wo, DsyncGroupCreatedEvent as wr, AuthorizationOrganizationMembershipResponse as ws, ResourceResponse as wt, CreatePermissionOptions as wu, PublicClientOptions as x, VaultDekDecryptedEventResponse as xa, AuthenticationResponseResponse as xc, OrganizationDomainVerificationFailedEventResponse as xi, OrganizationRoleEvent as xl, OrganizationResponse as xn, CreateOrganizationApiKeyOptions as xo, DsyncActivatedEventResponse as xr, AuthorizationOrganizationMembership as xs, Resource as xt, ListPermissionsOptions as xu, WorkOSWorker as y, VaultDataUpdatedEventResponse as ya, SessionCookieData as yc, OrganizationDomainUpdatedEventResponse as yi, DirectoryUserWithGroupsResponse as yl, UpdateOrganizationOptions as yn, CreatedApiKey as yo, ConnectionDeletedEventResponse as yr, ListOrganizationMembershipsOptions as ys, GetResourceOptions as yt, SerializedUpdateAuthorizationResourceOptions as yu, QueryOptions as z, VaultDataDeletedEventResponseData as za, SerializedAuthenticateWithMagicAuthOptions as zc, PasswordResetCreatedEventResponse as zi, SerializedAssignRoleOptions as zl, ApiKeyCreatedEventResponse as zn, UpdateUserOptions as zo, DsyncUserUpdatedEventResponse as zr, Factor$1 as zs, CreateAuditLogSchemaRequestOptions as zt, SetEnvironmentRolePermissionsOptions as zu };
|
|
5279
|
-
//# sourceMappingURL=workos-
|
|
6669
|
+
export { CreateAuditLogSchemaRequestOptions as $, FlagPollEntry as $a, ConnectionDomain as $c, VaultDekDecryptedEventResponse as $i, SerializedListAuthorizationResourcesOptions as $l, DsyncUserCreatedEvent as $n, MagicAuth as $o, OrganizationDomainVerifiedEvent as $r, AuthenticationEventSsoResponse as $s, List as $t, ResponseHeaders as $u, IntentOptions as A, VaultNamesListedEventData as Aa, AuthenticateWithEmailVerificationOptions as Ac, RoleUpdatedEventResponse as Ai, SerializedAssignRoleOptions as Al, AuthenticationSSOFailedEventResponse as An, UpdateUserOptions as Ao, GroupUpdatedEventResponse as Ar, FactorWithSecrets$1 as As, UserRegistrationActionResponseData as At, EnvironmentRoleList as Au, NoApiKeyProvidedException as B, Group as Ba, SerializedAuthenticateWithOptionsBase as Bc, UserUpdatedEvent as Bi, ListResourcesForMembershipOptionsWithParentExternalId as Bl, DsyncActivatedEventResponse as Bn, RevokeSessionOptions as Bo, MagicAuthCreatedEventResponse as Br, CreatePasswordResetOptions as Bs, ListOrganizationsOptions as Bt, Directory as Bu, PublicUserManagement as C, VaultDekDecryptedEventResponseData as Ca, AuthenticateUserWithOrganizationSelectionCredentials as Cc, PermissionUpdatedEvent as Ci, RemoveRoleOptionsWithResourceExternalId as Cl, AuthenticationPasswordFailedEvent as Cn, CreateOrganizationDomainOptions as Co, GroupMemberAddedEvent as Cr, Invitation as Cs, AutoPaginatable as Ct, AddEnvironmentRolePermissionOptions as Cu, PortalLinkResponseWire as D, VaultKekCreatedEventResponseData as Da, AuthenticateWithMagicAuthOptions as Dc, RoleDeletedEvent as Di, AssignRoleOptionsWithResourceExternalId as Dl, AuthenticationRadarRiskDetectedEvent as Dn, SerializedUpdateUserPasswordOptions as Do, GroupMemberRemovedEvent as Dr, Identity as Ds, Actions as Dt, CreateEnvironmentRoleOptions as Du, PortalLinkResponse as E, VaultKekCreatedEventData as Ea, AuthenticateUserWithMagicAuthCredentials as Ec, RoleCreatedEventResponse as Ei, AssignRoleOptions as El, AuthenticationPasswordSucceededEventResponse as En, VerifyEmailOptions as Eo, GroupMemberEventResponseData as Er, InvitationResponse as Es, Webhooks as Et, UpdateEnvironmentRoleOptions as Eu, UnauthorizedException as F, SerializedUpdateGroupOptions as Fa, AuthenticateWithCodeOptions as Fc, UnknownEvent as Fi, RoleAssignmentResponse as Fl, ConnectionDeactivatedEvent as Fn, SessionResponse as Fo, InvitationResentEvent as Fr, EmailVerificationEvent as Fs, UserRegistrationActionPayload as Ft, ListDirectoriesOptions as Fu, AuthenticationException as G, SerializedCreateGroupOptions as Ga, ProfileResponse as Gc, VaultDataCreatedEventResponse as Gi, AuthorizationCheckOptionsWithResourceId as Gl, DsyncGroupDeletedEvent as Gn, ResendInvitationOptions as Go, OrganizationDomainCreatedEvent as Gr, SerializedCreateMagicAuthOptions as Gs, DomainData as Gt, EventDirectory as Gu, BadRequestException as H, GetGroupOptions as Ha, ProfileAndToken as Hc, VaultByokKeyVerificationCompletedEvent as Hi, SerializedListResourcesForMembershipOptions as Hl, DsyncDeletedEventResponse as Hn, serializeRevokeSessionOptions as Ho, OrganizationCreatedResponse as Hr, CreateOrganizationMembershipOptions as Hs, CreateOrganizationOptions as Ht, DirectoryState as Hu, SignatureVerificationException as I, UpdateGroupOptions as Ia, SerializedAuthenticateWithCodeOptions as Ic, UserCreatedEvent as Ii, RoleAssignmentRole as Il, ConnectionDeactivatedEventResponse as In, SessionStatus as Io, InvitationResentEventResponse as Ir, EmailVerificationEventResponse as Is, SerializedUpdateOrganizationOptions as It, SerializedListDirectoriesOptions as Iu, WorkOSErrorData as J, RuntimeClientStats as Ja, ListConnectionsOptions as Jc, VaultDataReadEvent as Ji, DeleteAuthorizationResourceOptions as Jl, DsyncGroupUpdatedEventResponse as Jn, RefreshSessionResponse as Jo, OrganizationDomainDeletedEventResponse as Jr, AuthenticationRadarRiskDetectedEventData as Js, WorkOSOptions as Jt, HttpClientInterface as Ju, isAuthenticationErrorData as K, AddGroupOrganizationMembershipOptions as Ka, OauthTokens as Kc, VaultDataDeletedEvent as Ki, AuthorizationCheckResult as Kl, DsyncGroupDeletedEventResponse as Kn, SerializedResendInvitationOptions as Ko, OrganizationDomainCreatedEventResponse as Kr, PKCEAuthorizationURLResult as Ks, DomainDataState as Kt, EventDirectoryResponse as Ku, RateLimitExceededException as L, RemoveGroupOrganizationMembershipOptions as La, AuthenticateWithOptionsBase as Lc, UserCreatedEventResponse as Li, ListMembershipsForResourceByExternalIdOptions as Ll, ConnectionDeletedEvent as Ln, SendVerificationEmailOptions as Lo, InvitationRevokedEvent as Lr, EmailVerificationResponse as Ls, UpdateOrganizationOptions as Lt, PaginationOptions as Lu, SSOIntentOptions as M, DataKey as Ma, AuthenticateWithCodeAndVerifierOptions as Mc, SessionCreatedEventResponse as Mi, RoleAssignment as Ml, AuthenticationSSOSucceededEventResponse as Mn, UpdateOrganizationMembershipOptions as Mo, InvitationAcceptedEventResponse as Mr, EnrollAuthFactorOptions as Ms, ActionPayload as Mt, EnvironmentRoleResponse as Mu, SSOIntentOptionsResponse as N, DataKeyPair as Na, SerializedAuthenticateWithCodeAndVerifierOptions as Nc, SessionRevokedEvent as Ni, RoleAssignmentResource as Nl, ConnectionActivatedEvent as Nn, AuthMethod as No, InvitationCreatedEvent as Nr, SerializedEnrollUserInMfaFactorOptions as Ns, UserData as Nt, ListDirectoryUsersOptions as Nu, GenerateLink as O, VaultMetadataReadEventData as Oa, SerializedAuthenticateWithMagicAuthOptions as Oc, RoleDeletedEventResponse as Oi, AssignRoleOptionsWithResourceId as Ol, AuthenticationRadarRiskDetectedEventResponse as On, UpdateUserPasswordOptions as Oo, GroupMemberRemovedEventResponse as Or, Factor$1 as Os, AuthenticationActionResponseData as Ot, SerializedCreateEnvironmentRoleOptions as Ou, UnprocessableEntityException as P, KeyContext as Pa, AuthenticateUserWithCodeCredentials as Pc, SessionRevokedEventResponse as Pi, RoleAssignmentResourceResponse as Pl, ConnectionActivatedEventResponse as Pn, Session as Po, InvitationCreatedEventResponse as Pr, EmailVerification as Ps, UserDataPayload as Pt, ListDirectoryGroupsOptions as Pu, CreateAuditLogSchemaOptions as Q, ListFeatureFlagsOptions as Qa, Connection as Qc, VaultDekDecryptedEvent as Qi, ListAuthorizationResourcesOptions as Ql, DsyncGroupUserRemovedEventResponse as Qn, PasswordResetResponse as Qo, OrganizationDomainVerificationFailedEventResponse as Qr, AuthenticationEventSso as Qs, PatchOptions as Qt, ResponseHeaderValue as Qu, OauthException as R, ListGroupsOptions as Ra, AuthenticateWithSessionOptions as Rc, UserDeletedEvent as Ri, ListMembershipsForResourceOptions as Rl, ConnectionDeletedEventResponse as Rn, SendInvitationOptions as Ro, InvitationRevokedEventResponse as Rr, CreateUserOptions as Rs, Organization as Rt, DirectoryGroup as Ru, PublicSSO as S, VaultDekDecryptedEventData as Sa, SerializedAuthenticateWithPasswordOptions as Sc, PermissionDeletedEventResponse as Si, RemoveRoleOptions as Sl, AuthenticationPasskeySucceededEventResponse as Sn, OrganizationDomainVerificationStrategy as So, GroupDeletedEventResponse as Sr, ListAuthFactorsOptions as Ss, SerializedListEventOptions as St, OrganizationRole as Su, createWorkOS as T, VaultDekReadEventResponseData as Ta, SerializedAuthenticateWithOrganizationSelectionOptions as Tc, RoleCreatedEvent as Ti, SerializedRemoveRoleOptions as Tl, AuthenticationPasswordSucceededEvent as Tn, SerializedVerifyEmailOptions as To, GroupMemberEventData as Tr, InvitationEventResponse as Ts, PKCEPair as Tt, SerializedUpdateEnvironmentRoleOptions as Tu, AuthenticationErrorCode as U, DeleteGroupOptions as Ua, ProfileAndTokenResponse as Uc, VaultByokKeyVerificationCompletedEventResponse as Ui, AuthorizationCheckOptions as Ul, DsyncGroupCreatedEvent as Un, ResetPasswordOptions as Uo, OrganizationDeletedEvent as Ur, SerializedCreateOrganizationMembershipOptions as Us, CreateOrganizationRequestOptions as Ut, DirectoryStateResponse as Uu, ConflictException as V, GroupResponse as Va, WithResolvedClientId as Vc, UserUpdatedEventResponse as Vi, ListResourcesForMembershipOptionsWithParentId as Vl, DsyncDeletedEvent as Vn, SerializedRevokeSessionOptions as Vo, OrganizationCreatedEvent as Vr, SerializedCreatePasswordResetOptions as Vs, ListOrganizationFeatureFlagsOptions as Vt, DirectoryResponse as Vu, AuthenticationErrorData as W, CreateGroupOptions as Wa, Profile as Wc, VaultDataCreatedEvent as Wi, AuthorizationCheckOptionsWithResourceExternalId as Wl, DsyncGroupCreatedEventResponse as Wn, SerializedResetPasswordOptions as Wo, OrganizationDeletedResponse as Wr, CreateMagicAuthOptions as Ws, SerializedCreateOrganizationOptions as Wt, DirectoryType as Wu, FeatureFlagsRuntimeClient as X, RuntimeClientOptions as Xa, GetProfileAndTokenOptions as Xc, VaultDataUpdatedEvent as Xi, UpdateAuthorizationResourceByExternalIdOptions as Xl, DsyncGroupUserAddedEventResponse as Xn, PasswordResetEvent as Xo, OrganizationDomainUpdatedEventResponse as Xr, AuthenticationEvent as Xs, PutOptions as Xt, RequestHeaders as Xu, ApiKeyRequiredException as Y, RuntimeClientLogger as Ya, SerializedListConnectionsOptions as Yc, VaultDataReadEventResponse as Yi, DeleteAuthorizationResourceByExternalIdOptions as Yl, DsyncGroupUserAddedEvent as Yn, PasswordReset as Yo, OrganizationDomainUpdatedEvent as Yr, AuthenticationRadarRiskDetectedEventResponseData as Ys, UnprocessableEntityError as Yt, HttpClientResponseInterface as Yu, CookieSession as Z, RemoveFlagTargetOptions as Za, GetProfileOptions as Zc, VaultDataUpdatedEventResponse as Zi, GetAuthorizationResourceByExternalIdOptions as Zl, DsyncGroupUserRemovedEvent as Zn, PasswordResetEventResponse as Zo, OrganizationDomainVerificationFailedEvent as Zr, AuthenticationEventResponse as Zs, PostOptions as Zt, RequestOptions as Zu, CreateDataKeyOptions as _, VaultDataDeletedEventResponseData as _a, AuthenticateUserWithRefreshTokenCredentials as _c, PasswordResetSucceededEvent as _i, RoleResponse as _l, AuthenticationOAuthSucceededEvent as _n, OrganizationDomainVerificationFailed as _o, FlagUpdatedEvent as _r, OrganizationMembershipResponse as _s, CreatePasswordlessSessionOptions as _t, SetOrganizationRolePermissionsOptions as _u, ReadObjectOptions as a, VaultMetadataReadEventResponse as aa, AuthenticateWithSessionCookieFailureReason as ac, OrganizationMembershipUpdated as ai, DirectoryUser as al, ApiKeyRevokedEvent as an, AddFlagTargetOptions as ao, EmailVerificationCreatedEvent as ar, ListUsersOptions as as, CreateAuditLogEventRequestOptions as at, SerializedCreateAuthorizationResourceOptions as au, ConfidentialClientOptions as b, VaultDataUpdatedEventData as ba, AuthenticateUserWithPasswordCredentials as bc, PermissionCreatedEventResponse as bi, RemoveRoleAssignmentOptions as bl, AuthenticationPasskeyFailedEventResponse as bn, OrganizationDomainResponse as bo, GroupCreatedEventResponse as br, SerializedListInvitationsOptions as bs, PasswordlessSessionResponse as bt, CreateOrganizationRoleOptions as bu, ObjectMetadata as c, VaultActor as ca, SessionCookieData as cc, OrganizationRoleCreatedEventResponse as ci, DirectoryUserWithGroupsResponse as cl, AuthenticationEmailVerificationSucceededEventResponse as cn, ValidateApiKeyResponse as co, EventBase as cr, ListSessionsOptions as cs, AuditLogSchema as ct, ListPermissionsOptions as cu, VaultObject as d, VaultByokKeyProvider as da, User as dc, OrganizationRoleUpdatedEvent as di, OrganizationRoleEventResponse as dl, AuthenticationMagicAuthSucceededEvent as dn, SerializedCreatedApiKey as do, FlagCreatedEvent as dr, SerializedListOrganizationMembershipsOptions as ds, AuditLogTargetSchema as dt, CreatePermissionOptions as du, VaultDekReadEvent as ea, AuthenticateUserWithTotpCredentials as ec, CryptoProvider as ed, OrganizationDomainVerifiedEventResponse as ei, ConnectionResponse as el, ListResponse as en, FlagPollResponse as eo, DsyncUserCreatedEventResponse as er, MagicAuthEvent as es, CreateAuditLogSchemaResponse as et, AuthorizationResource as eu, DeleteObjectOptions as f, VaultByokKeyVerificationCompletedEventData as fa, UserResponse as fc, OrganizationRoleUpdatedEventResponse as fi, OrganizationRoleResponse as fl, AuthenticationMagicAuthSucceededEventResponse as fn, CreateOrganizationApiKeyOptions as fo, FlagCreatedEventResponse as fr, AuthorizationOrganizationMembership as fs, AuditLogExport as ft, SerializedCreatePermissionOptions as fu, DecryptDataKeyResponse as g, VaultDataDeletedEventData as ga, SerializedAuthenticateWithRefreshTokenPublicClientOptions as gc, PasswordResetCreatedEventResponse as gi, RoleList as gl, AuthenticationOAuthFailedEventResponse as gn, SerializedApiKey as go, FlagRuleUpdatedEventResponse as gr, OrganizationMembership as gs, SendSessionResponse as gt, AddOrganizationRolePermissionOptions as gu, DecryptDataKeyOptions as h, VaultDataCreatedEventResponseData as ha, AuthenticateWithRefreshTokenPublicClientOptions as hc, PasswordResetCreatedEvent as hi, RoleEventResponse as hl, AuthenticationOAuthFailedEvent as hn, ApiKey as ho, FlagRuleUpdatedEvent as hr, BaseOrganizationMembershipResponse as hs, SerializedAuditLogExportOptions as ht, RemoveOrganizationRolePermissionOptions as hu, ReadObjectMetadataResponse as i, VaultMetadataReadEvent as ia, AuthenticateWithSessionCookieFailedResponse as ic, OrganizationMembershipDeletedResponse as ii, DefaultCustomAttributes as il, ApiKeyCreatedEventResponse as in, EvaluationContext as io, DsyncUserUpdatedEventResponse as ir, Locale as is, CreateAuditLogEventOptions as it, CreateOptionsWithParentResourceId as iu, IntentOptionsResponse as j, VaultNamesListedEventResponseData as ja, SerializedAuthenticateWithEmailVerificationOptions as jc, SessionCreatedEvent as ji, ListRoleAssignmentsOptions as jl, AuthenticationSSOSucceededEvent as jn, SerializedUpdateOrganizationMembershipOptions as jo, InvitationAcceptedEvent as jr, FactorWithSecretsResponse as js, ActionContext as jt, EnvironmentRoleListResponse as ju, GenerateLinkResponse as k, VaultMetadataReadEventResponseData as ka, AuthenticateUserWithEmailVerificationCredentials as kc, RoleUpdatedEvent as ki, BaseAssignRoleOptions as kl, AuthenticationSSOFailedEvent as kn, SerializedUpdateUserOptions as ko, GroupUpdatedEvent as kr, FactorResponse as ks, ResponsePayload as kt, EnvironmentRole as ku, ObjectUpdateBy as l, VaultActorResponse as la, AuthenticationResponse as lc, OrganizationRoleDeletedEvent as li, ListOrganizationRolesResponse as ll, AuthenticationMagicAuthFailedEvent as ln, ListOrganizationApiKeysOptions as lo, EventName as lr, SerializedListSessionsOptions as ls, AuditLogSchemaMetadata as lt, SerializedUpdatePermissionOptions as lu, CreateObjectOptions as m, VaultDataCreatedEventData as ma, ImpersonatorResponse as mc, OrganizationUpdatedResponse as mi, RoleEvent as ml, AuthenticationMfaSucceededEventResponse as mn, SerializedCreateOrganizationApiKeyOptions as mo, FlagDeletedEventResponse as mr, BaseOrganizationMembership as ms, AuditLogExportOptions as mt, PermissionResponse as mu, UpdateObjectEntity as n, VaultKekCreatedEvent as na, SerializedAuthenticateWithTotpOptions as nc, OrganizationMembershipCreatedResponse as ni, SSOAuthorizationURLOptions as nl, GenerateLinkIntent as nn, FeatureFlag as no, DsyncUserDeletedEventResponse as nr, MagicAuthResponse as ns, AuditLogActor as nt, CreateAuthorizationResourceOptions as nu, ReadObjectResponse as o, VaultNamesListedEvent as oa, AuthenticateWithSessionCookieOptions as oc, OrganizationMembershipUpdatedResponse as oi, DirectoryUserResponse as ol, ApiKeyRevokedEventResponse as on, SerializedValidateApiKeyResponse as oo, EmailVerificationCreatedEventResponse as or, SerializedListUsersOptions as os, SerializedCreateAuditLogEventOptions as ot, SerializedUpdateAuthorizationResourceOptions as ou, CreateObjectEntity as p, VaultByokKeyVerificationCompletedEventResponseData as pa, Impersonator as pc, OrganizationUpdatedEvent as pi, Role as pl, AuthenticationMfaSucceededEvent as pn, CreateOrganizationApiKeyRequestOptions as po, FlagDeletedEvent as pr, AuthorizationOrganizationMembershipResponse as ps, AuditLogExportResponse as pt, Permission as pu, GenericServerException as q, SerializedAddGroupOrganizationMembershipOptions as qa, OauthTokensResponse as qc, VaultDataDeletedEventResponse as qi, SerializedAuthorizationCheckOptions as ql, DsyncGroupUpdatedEvent as qn, RefreshSessionFailureReason as qo, OrganizationDomainDeletedEvent as qr, UserManagementAuthorizationURLOptions as qs, WorkOSResponseError as qt, HttpClient as qu, UpdateObjectOptions as r, VaultKekCreatedEventResponse as ra, AccessToken$1 as rc, OrganizationMembershipDeleted as ri, SSOPKCEAuthorizationURLResult as rl, ApiKeyCreatedEvent as rn, FeatureFlagResponse as ro, DsyncUserUpdatedEvent as rr, LogoutURLOptions as rs, AuditLogTarget as rt, CreateOptionsWithParentExternalId as ru, ObjectDigest as s, VaultNamesListedEventResponse as sa, AuthenticateWithSessionCookieSuccessResponse as sc, OrganizationRoleCreatedEvent as si, DirectoryUserWithGroups as sl, AuthenticationEmailVerificationSucceededEvent as sn, ValidateApiKeyOptions as so, Event as sr, ListUserFeatureFlagsOptions as ss, AuditLogActorSchema as st, UpdateAuthorizationResourceOptions as su, WorkOS as t, VaultDekReadEventResponse as ta, AuthenticateWithTotpOptions as tc, OrganizationMembershipCreated as ti, ConnectionType as tl, GetOptions as tn, FlagTarget as to, DsyncUserDeletedEvent as tr, MagicAuthEventResponse as ts, SerializedCreateAuditLogSchemaOptions as tt, AuthorizationResourceResponse as tu, ObjectVersion as u, VaultActorSource as ua, AuthenticationResponseResponse as uc, OrganizationRoleDeletedEventResponse as ui, OrganizationRoleEvent as ul, AuthenticationMagicAuthFailedEventResponse as un, CreatedApiKey as uo, EventResponse as ur, ListOrganizationMembershipsOptions as us, AuditLogSchemaResponse as ut, UpdatePermissionOptions as uu, CreateDataKeyResponse as v, VaultDataReadEventData as va, AuthenticateWithRefreshTokenOptions as vc, PasswordResetSucceededEventResponse as vi, ListEffectivePermissionsByExternalIdOptions as vl, AuthenticationOAuthSucceededEventResponse as vn, OrganizationDomainVerificationFailedResponse as vo, FlagUpdatedEventResponse as vr, OrganizationMembershipStatus as vs, SerializedCreatePasswordlessSessionOptions as vt, SerializedUpdateOrganizationRoleOptions as vu, PublicWorkOS as w, VaultDekReadEventData as wa, AuthenticateWithOrganizationSelectionOptions as wc, PermissionUpdatedEventResponse as wi, RemoveRoleOptionsWithResourceId as wl, AuthenticationPasswordFailedEventResponse as wn, SerializedCreateOrganizationDomainOptions as wo, GroupMemberAddedEventResponse as wr, InvitationEvent as ws, PKCE as wt, SetEnvironmentRolePermissionsOptions as wu, PublicClientOptions as x, VaultDataUpdatedEventResponseData as xa, AuthenticateWithPasswordOptions as xc, PermissionDeletedEvent as xi, BaseRemoveRoleOptions as xl, AuthenticationPasskeySucceededEvent as xn, OrganizationDomainState as xo, GroupDeletedEvent as xr, ListGroupsForOrganizationMembershipOptions as xs, ListEventOptions as xt, SerializedCreateOrganizationRoleOptions as xu, WorkOSWorker as y, VaultDataReadEventResponseData as ya, SerializedAuthenticateWithRefreshTokenOptions as yc, PermissionCreatedEvent as yi, ListEffectivePermissionsOptions as yl, AuthenticationPasskeyFailedEvent as yn, OrganizationDomain as yo, GroupCreatedEvent as yr, ListInvitationsOptions as ys, PasswordlessSession as yt, UpdateOrganizationRoleOptions as yu, NotFoundException as z, ListGroupOrganizationMembershipsOptions as za, SerializedAuthenticatePublicClientBase as zc, UserDeletedEventResponse as zi, ListResourcesForMembershipOptions as zl, DsyncActivatedEvent as zn, SerializedSendInvitationOptions as zo, MagicAuthCreatedEvent as zr, SerializedCreateUserOptions as zs, OrganizationResponse as zt, DirectoryGroupResponse as zu };
|
|
6670
|
+
//# sourceMappingURL=workos-DUcDmctT.d.mts.map
|