WorkOS SDK code diff report

Show:

code: 22 · tests: 1 · manifest: 1

dotnet/.oagen-manifest.json
dotnet/.oagen-manifest.json CHANGED
@@ -236,6 +236,8 @@
236
  "src/WorkOS.net/Entities/InvitationCreated.cs",
237
  "src/WorkOS.net/Entities/InvitationResent.cs",
238
  "src/WorkOS.net/Entities/InvitationRevoked.cs",
 
 
239
  "src/WorkOS.net/Entities/JWTTemplateResponse.cs",
240
  "src/WorkOS.net/Entities/JwksResponse.cs",
241
  "src/WorkOS.net/Entities/JwksResponseKeys.cs",
@@ -385,7 +387,6 @@
385
  "src/WorkOS.net/Enums/ConnectionState.cs",
386
  "src/WorkOS.net/Enums/ConnectionType.cs",
387
  "src/WorkOS.net/Enums/ConnectionsConnectionType.cs",
388
- "src/WorkOS.net/Enums/CreateDataIntegrationAuthMethods.cs",
389
  "src/WorkOS.net/Enums/CreateUserInviteOptionsLocale.cs",
390
  "src/WorkOS.net/Enums/CreateUserPasswordHashType.cs",
391
  "src/WorkOS.net/Enums/CreateUserPasswordSaltPosition.cs",
@@ -405,6 +406,7 @@
405
  "src/WorkOS.net/Enums/FlagRuleUpdatedContextAccessType.cs",
406
  "src/WorkOS.net/Enums/GenerateLinkIntent.cs",
407
  "src/WorkOS.net/Enums/InvitationAcceptedDataState.cs",
 
408
  "src/WorkOS.net/Enums/OrganizationCreatedDataDomainState.cs",
409
  "src/WorkOS.net/Enums/OrganizationCreatedDataDomainVerificationStrategy.cs",
410
  "src/WorkOS.net/Enums/OrganizationDomainDataState.cs",
@@ -461,6 +463,8 @@
461
  "src/WorkOS.net/Services/OrganizationMembership/_interfaces/OrganizationMembershipOptions.cs",
462
  "src/WorkOS.net/Services/Organizations/OrganizationsService.cs",
463
  "src/WorkOS.net/Services/Organizations/_interfaces/OrganizationsOptions.cs",
 
 
464
  "src/WorkOS.net/Services/Pipes/PipesService.cs",
465
  "src/WorkOS.net/Services/Pipes/_interfaces/PipesOptions.cs",
466
  "src/WorkOS.net/Services/PipesProvider/PipesProviderService.cs",
@@ -492,6 +496,7 @@
492
  "test/WorkOSTests/Tests/MultiFactorAuthServiceTest.cs",
493
  "test/WorkOSTests/Tests/OrganizationDomainsServiceTest.cs",
494
  "test/WorkOSTests/Tests/OrganizationMembershipServiceTest.cs",
 
495
  "test/WorkOSTests/Tests/OrganizationsServiceTest.cs",
496
  "test/WorkOSTests/Tests/PipesProviderServiceTest.cs",
497
  "test/WorkOSTests/Tests/PipesServiceTest.cs",
@@ -799,6 +804,7 @@
799
  "test/WorkOSTests/testdata/create_group_nulls.json",
800
  "test/WorkOSTests/testdata/create_group_role_assignment.json",
801
  "test/WorkOSTests/testdata/create_group_role_assignment_nulls.json",
 
802
  "test/WorkOSTests/testdata/create_m2m_application.json",
803
  "test/WorkOSTests/testdata/create_m2m_application_nulls.json",
804
  "test/WorkOSTests/testdata/create_magic_code_and_return.json",
@@ -1050,6 +1056,9 @@
1050
  "test/WorkOSTests/testdata/invitation_revoked_data.json",
1051
  "test/WorkOSTests/testdata/invitation_revoked_data_nulls.json",
1052
  "test/WorkOSTests/testdata/invitation_revoked_nulls.json",
 
 
 
1053
  "test/WorkOSTests/testdata/jwks_response.json",
1054
  "test/WorkOSTests/testdata/jwks_response_keys.json",
1055
  "test/WorkOSTests/testdata/jwt_template_response.json",
@@ -1742,6 +1751,10 @@
1742
  "sdkMethod": "AuthorizeDataIntegrationAsync",
1743
  "service": "pipes"
1744
  },
 
 
 
 
1745
  "POST /data-integrations/{slug}/credentials": {
1746
  "sdkMethod": "CreateDataIntegrationCredentialAsync",
1747
  "service": "pipes"
@@ -1914,6 +1927,26 @@
1914
  "sdkMethod": "ListAuthorizedApplicationsAsync",
1915
  "service": "organizations"
1916
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1917
  "POST /portal/generate_link": {
1918
  "sdkMethod": "GenerateLinkAsync",
1919
  "service": "admin_portal"
@@ -2293,10 +2326,6 @@
2293
  "GET /audit_logs/exports/{auditLogExportId}": {
2294
  "sdkMethod": "GetExportAsync",
2295
  "service": "audit_logs"
2296
- },
2297
- "PUT /data-integrations/{slug}/client-credentials": {
2298
- "sdkMethod": "UpdateDataIntegrationClientCredentialsAsync",
2299
- "service": "pipes"
2300
  }
2301
  }
2302
  }
 
236
  "src/WorkOS.net/Entities/InvitationCreated.cs",
237
  "src/WorkOS.net/Entities/InvitationResent.cs",
238
  "src/WorkOS.net/Entities/InvitationRevoked.cs",
239
+ "src/WorkOS.net/Entities/ItContact.cs",
240
+ "src/WorkOS.net/Entities/ItContactList.cs",
241
  "src/WorkOS.net/Entities/JWTTemplateResponse.cs",
242
  "src/WorkOS.net/Entities/JwksResponse.cs",
243
  "src/WorkOS.net/Entities/JwksResponseKeys.cs",
 
387
  "src/WorkOS.net/Enums/ConnectionState.cs",
388
  "src/WorkOS.net/Enums/ConnectionType.cs",
389
  "src/WorkOS.net/Enums/ConnectionsConnectionType.cs",
 
390
  "src/WorkOS.net/Enums/CreateUserInviteOptionsLocale.cs",
391
  "src/WorkOS.net/Enums/CreateUserPasswordHashType.cs",
392
  "src/WorkOS.net/Enums/CreateUserPasswordSaltPosition.cs",
 
406
  "src/WorkOS.net/Enums/FlagRuleUpdatedContextAccessType.cs",
407
  "src/WorkOS.net/Enums/GenerateLinkIntent.cs",
408
  "src/WorkOS.net/Enums/InvitationAcceptedDataState.cs",
409
+ "src/WorkOS.net/Enums/InviteItContactIntents.cs",
410
  "src/WorkOS.net/Enums/OrganizationCreatedDataDomainState.cs",
411
  "src/WorkOS.net/Enums/OrganizationCreatedDataDomainVerificationStrategy.cs",
412
  "src/WorkOS.net/Enums/OrganizationDomainDataState.cs",
 
463
  "src/WorkOS.net/Services/OrganizationMembership/_interfaces/OrganizationMembershipOptions.cs",
464
  "src/WorkOS.net/Services/Organizations/OrganizationsService.cs",
465
  "src/WorkOS.net/Services/Organizations/_interfaces/OrganizationsOptions.cs",
466
+ "src/WorkOS.net/Services/OrganizationsItContacts/OrganizationsItContactsService.cs",
467
+ "src/WorkOS.net/Services/OrganizationsItContacts/_interfaces/OrganizationsItContactsOptions.cs",
468
  "src/WorkOS.net/Services/Pipes/PipesService.cs",
469
  "src/WorkOS.net/Services/Pipes/_interfaces/PipesOptions.cs",
470
  "src/WorkOS.net/Services/PipesProvider/PipesProviderService.cs",
 
496
  "test/WorkOSTests/Tests/MultiFactorAuthServiceTest.cs",
497
  "test/WorkOSTests/Tests/OrganizationDomainsServiceTest.cs",
498
  "test/WorkOSTests/Tests/OrganizationMembershipServiceTest.cs",
499
+ "test/WorkOSTests/Tests/OrganizationsItContactsServiceTest.cs",
500
  "test/WorkOSTests/Tests/OrganizationsServiceTest.cs",
501
  "test/WorkOSTests/Tests/PipesProviderServiceTest.cs",
502
  "test/WorkOSTests/Tests/PipesServiceTest.cs",
 
804
  "test/WorkOSTests/testdata/create_group_nulls.json",
805
  "test/WorkOSTests/testdata/create_group_role_assignment.json",
806
  "test/WorkOSTests/testdata/create_group_role_assignment_nulls.json",
807
+ "test/WorkOSTests/testdata/create_it_contact.json",
808
  "test/WorkOSTests/testdata/create_m2m_application.json",
809
  "test/WorkOSTests/testdata/create_m2m_application_nulls.json",
810
  "test/WorkOSTests/testdata/create_magic_code_and_return.json",
 
1056
  "test/WorkOSTests/testdata/invitation_revoked_data.json",
1057
  "test/WorkOSTests/testdata/invitation_revoked_data_nulls.json",
1058
  "test/WorkOSTests/testdata/invitation_revoked_nulls.json",
1059
+ "test/WorkOSTests/testdata/invite_it_contact.json",
1060
+ "test/WorkOSTests/testdata/it_contact.json",
1061
+ "test/WorkOSTests/testdata/it_contact_list.json",
1062
  "test/WorkOSTests/testdata/jwks_response.json",
1063
  "test/WorkOSTests/testdata/jwks_response_keys.json",
1064
  "test/WorkOSTests/testdata/jwt_template_response.json",
 
1751
  "sdkMethod": "AuthorizeDataIntegrationAsync",
1752
  "service": "pipes"
1753
  },
1754
+ "PUT /data-integrations/{slug}/client-credentials": {
1755
+ "sdkMethod": "UpdateDataIntegrationClientCredentialsAsync",
1756
+ "service": "pipes"
1757
+ },
1758
  "POST /data-integrations/{slug}/credentials": {
1759
  "sdkMethod": "CreateDataIntegrationCredentialAsync",
1760
  "service": "pipes"
 
1927
  "sdkMethod": "ListAuthorizedApplicationsAsync",
1928
  "service": "organizations"
1929
  },
1930
+ "GET /organizations/{organization_id}/it_contacts": {
1931
+ "sdkMethod": "ListAsync",
1932
+ "service": "organizations_it_contacts"
1933
+ },
1934
+ "POST /organizations/{organization_id}/it_contacts": {
1935
+ "sdkMethod": "CreateAsync",
1936
+ "service": "organizations_it_contacts"
1937
+ },
1938
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1939
+ "sdkMethod": "DeleteAsync",
1940
+ "service": "organizations_it_contacts"
1941
+ },
1942
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1943
+ "sdkMethod": "CreateItContactInviteAsync",
1944
+ "service": "organizations_it_contacts"
1945
+ },
1946
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1947
+ "sdkMethod": "RevokeItContactAsync",
1948
+ "service": "organizations_it_contacts"
1949
+ },
1950
  "POST /portal/generate_link": {
1951
  "sdkMethod": "GenerateLinkAsync",
1952
  "service": "admin_portal"
 
2326
  "GET /audit_logs/exports/{auditLogExportId}": {
2327
  "sdkMethod": "GetExportAsync",
2328
  "service": "audit_logs"
 
 
 
 
2329
  }
2330
  }
2331
  }
dotnet/src/WorkOS.net/Client/WorkOSClient.Generated.cs
dotnet/src/WorkOS.net/Client/WorkOSClient.Generated.cs CHANGED
@@ -82,6 +82,11 @@ namespace WorkOS
82
  /// <summary>Gets the <see cref="GroupsService"/> for groups API operations.</summary>
83
  public virtual GroupsService Groups => this.groups ??= new GroupsService(this);
84
 
 
 
 
 
 
85
  private AdminPortalService adminPortal;
86
 
87
  /// <summary>Gets the <see cref="AdminPortalService"/> for admin portal API operations.</summary>
 
82
  /// <summary>Gets the <see cref="GroupsService"/> for groups API operations.</summary>
83
  public virtual GroupsService Groups => this.groups ??= new GroupsService(this);
84
 
85
+ private OrganizationsItContactsService organizationsItContacts;
86
+
87
+ /// <summary>Gets the <see cref="OrganizationsItContactsService"/> for organizations it contacts API operations.</summary>
88
+ public virtual OrganizationsItContactsService OrganizationsItContacts => this.organizationsItContacts ??= new OrganizationsItContactsService(this);
89
+
90
  private AdminPortalService adminPortal;
91
 
92
  /// <summary>Gets the <see cref="AdminPortalService"/> for admin portal API operations.</summary>
dotnet/src/WorkOS.net/Entities/ItContact.cs
dotnet/src/WorkOS.net/Entities/ItContact.cs ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+ using System;
6
+
7
+ /// <summary>Represents an it contact.</summary>
8
+ public class ItContact
9
+ {
10
+
11
+ /// <summary>The IT Contact object.</summary>
12
+ public string Object { get; internal set; } = "it_contact";
13
+
14
+ /// <summary>The unique ID of the IT Contact.</summary>
15
+ public string Id { get; set; } = default!;
16
+
17
+ /// <summary>The email address of the IT Contact.</summary>
18
+ public string Email { get; set; } = default!;
19
+
20
+ /// <summary>An ISO 8601 timestamp.</summary>
21
+ public DateTimeOffset CreatedAt { get; set; }
22
+
23
+ /// <summary>An ISO 8601 timestamp.</summary>
24
+ public DateTimeOffset UpdatedAt { get; set; }
25
+ }
26
+ }
dotnet/src/WorkOS.net/Entities/ItContactList.cs
dotnet/src/WorkOS.net/Entities/ItContactList.cs ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+ using System.Collections.Generic;
6
+
7
+ /// <summary>Represents an it contact list.</summary>
8
+ public class ItContactList
9
+ {
10
+
11
+ /// <summary>Indicates this is a list response.</summary>
12
+ public string Object { get; internal set; } = "list";
13
+
14
+ /// <summary>The list of records for the current page.</summary>
15
+ public List<ItContact> Data { get; set; } = default!;
16
+
17
+ /// <summary>Pagination cursors for navigating between pages of results.</summary>
18
+ public ItContactListListMetadata ListMetadata { get; set; } = default!;
19
+ }
20
+ }
dotnet/src/WorkOS.net/Entities/WaitlistUser.cs
dotnet/src/WorkOS.net/Entities/WaitlistUser.cs CHANGED
@@ -3,6 +3,7 @@
3
  namespace WorkOS
4
  {
5
  using System;
 
6
  using Newtonsoft.Json;
7
  using STJS = System.Text.Json.Serialization;
8
 
@@ -10,24 +11,24 @@ namespace WorkOS
10
  public class WaitlistUser
11
  {
12
 
13
- /// <summary>Distinguishes the Waitlist User object.</summary>
14
- public string Object { get; internal set; } = "waitlist_user";
15
-
16
- /// <summary>The unique ID of the Waitlist User.</summary>
17
  public string Id { get; set; } = default!;
18
 
19
- /// <summary>The email address of the Waitlist User.</summary>
20
  public string Email { get; set; } = default!;
21
 
22
- /// <summary>The state of the Waitlist User.</summary>
23
  [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
24
  [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingDefault)]
25
  public WaitlistUserState State { get; set; }
26
 
27
- /// <summary>The timestamp when the Waitlist User was approved, or null if not yet approved.</summary>
28
  public DateTimeOffset? ApprovedAt { get; set; }
29
 
 
 
 
30
- /// <summary>The unique ID of the Waitlist that the Waitlist User joined.</summary>
31
  public string? WaitlistId { get; set; }
32
 
33
  /// <summary>An ISO 8601 timestamp.</summary>
@@ -35,5 +36,8 @@ namespace WorkOS
35
 
36
  /// <summary>An ISO 8601 timestamp.</summary>
37
  public DateTimeOffset UpdatedAt { get; set; }
 
 
 
38
  }
39
  }
 
3
  namespace WorkOS
4
  {
5
  using System;
6
+ using System.Collections.Generic;
7
  using Newtonsoft.Json;
8
  using STJS = System.Text.Json.Serialization;
9
 
 
11
  public class WaitlistUser
12
  {
13
 
 
 
 
14
+ /// <summary>The unique ID of the waitlist entry.</summary>
15
  public string Id { get; set; } = default!;
16
 
17
+ /// <summary>The email address of the user on the waitlist.</summary>
18
  public string Email { get; set; } = default!;
19
 
20
+ /// <summary>The state of the waitlist entry.</summary>
21
  [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
22
  [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingDefault)]
23
  public WaitlistUserState State { get; set; }
24
 
25
+ /// <summary>The timestamp when the entry was approved, or null if not yet approved.</summary>
26
  public DateTimeOffset? ApprovedAt { get; set; }
27
 
28
+ /// <summary>Additional fields submitted when the user joined the waitlist. Values are user-provided — treat them as untrusted input when rendering or exporting.</summary>
29
+ public Dictionary<string, string>? AdditionalFields { get; set; }
30
+
31
+ /// <summary>The unique ID of the waitlist the entry belongs to.</summary>
32
  public string? WaitlistId { get; set; }
33
 
34
  /// <summary>An ISO 8601 timestamp.</summary>
 
36
 
37
  /// <summary>An ISO 8601 timestamp.</summary>
38
  public DateTimeOffset UpdatedAt { get; set; }
39
+
40
+ /// <summary>Distinguishes the Waitlist User object.</summary>
41
+ public string Object { get; internal set; } = "waitlist_user";
42
  }
43
  }
dotnet/src/WorkOS.net/Enums/CreateDataIntegrationAuthMethods.cs
dotnet/src/WorkOS.net/Enums/CreateDataIntegrationAuthMethods.cs DELETED
@@ -1,22 +0,0 @@
1
- // This file is auto-generated by oagen. Do not edit.
2
-
3
- namespace WorkOS
4
- {
5
- using System.Runtime.Serialization;
6
- using Newtonsoft.Json;
7
- using STJS = System.Text.Json.Serialization;
8
-
9
- /// <summary>Represents create data integration auth methods values.</summary>
10
- [JsonConverter(typeof(WorkOSNewtonsoftStringEnumConverter))]
11
- [STJS.JsonConverter(typeof(WorkOSStringEnumConverterFactory))]
12
- public enum CreateDataIntegrationAuthMethods
13
- {
14
- [EnumMember(Value = "unknown")]
15
- Unknown,
16
-
17
- [EnumMember(Value = "oauth")]
18
- OAuth,
19
- [EnumMember(Value = "api_key")]
20
- ApiKey,
21
- }
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dotnet/src/WorkOS.net/Enums/InviteItContactIntents.cs
dotnet/src/WorkOS.net/Enums/InviteItContactIntents.cs ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+ using System.Runtime.Serialization;
6
+ using Newtonsoft.Json;
7
+ using STJS = System.Text.Json.Serialization;
8
+
9
+ /// <summary>Represents invite it contact intents values.</summary>
10
+ [JsonConverter(typeof(WorkOSNewtonsoftStringEnumConverter))]
11
+ [STJS.JsonConverter(typeof(WorkOSStringEnumConverterFactory))]
12
+ public enum InviteItContactIntents
13
+ {
14
+ [EnumMember(Value = "unknown")]
15
+ Unknown,
16
+
17
+ [EnumMember(Value = "sso")]
18
+ SSO,
19
+ [EnumMember(Value = "directory_sync")]
20
+ DirectorySync,
21
+ [EnumMember(Value = "log_streams")]
22
+ LogStreams,
23
+ [EnumMember(Value = "domain_verification")]
24
+ DomainVerification,
25
+ [EnumMember(Value = "bring_your_own_key")]
26
+ BringYourOwnKey,
27
+ }
28
+ }
dotnet/src/WorkOS.net/Services/Authorization/AuthorizationService.cs
dotnet/src/WorkOS.net/Services/Authorization/AuthorizationService.cs CHANGED
@@ -263,7 +263,7 @@ namespace WorkOS
263
 
264
  /// <summary>List effective permissions for an organization membership on a resource</summary>
265
  /// <remarks>
266
- /// Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
267
  /// </remarks>
268
  /// <param name="organizationMembershipId">The ID of the organization membership.</param>
269
  /// <param name="resourceId">The ID of the authorization resource.</param>
@@ -296,7 +296,7 @@ namespace WorkOS
296
 
297
  /// <summary>List effective permissions for an organization membership on a resource by external ID</summary>
298
  /// <remarks>
299
- /// 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.
300
  /// </remarks>
301
  /// <param name="organizationMembershipId">The ID of the organization membership.</param>
302
  /// <param name="resourceTypeSlug">The slug of the resource type.</param>
 
263
 
264
  /// <summary>List effective permissions for an organization membership on a resource</summary>
265
  /// <remarks>
266
+ /// Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
267
  /// </remarks>
268
  /// <param name="organizationMembershipId">The ID of the organization membership.</param>
269
  /// <param name="resourceId">The ID of the authorization resource.</param>
 
296
 
297
  /// <summary>List effective permissions for an organization membership on a resource by external ID</summary>
298
  /// <remarks>
299
+ /// 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
300
  /// </remarks>
301
  /// <param name="organizationMembershipId">The ID of the organization membership.</param>
302
  /// <param name="resourceTypeSlug">The slug of the resource type.</param>
dotnet/src/WorkOS.net/Services/Organizations/_interfaces/OrganizationsOptions.cs
dotnet/src/WorkOS.net/Services/Organizations/_interfaces/OrganizationsOptions.cs CHANGED
@@ -28,6 +28,7 @@ namespace WorkOS
28
  public bool? AllowProfilesOutsideOrganization { get; set; }
29
 
30
  /// <summary>The domains associated with the organization. Deprecated in favor of `domain_data`.</summary>
 
31
  public List<string>? Domains { get; set; }
32
 
33
  /// <summary>The domains associated with the organization, including verification state.</summary>
 
28
  public bool? AllowProfilesOutsideOrganization { get; set; }
29
 
30
  /// <summary>The domains associated with the organization. Deprecated in favor of `domain_data`.</summary>
31
+ [System.Obsolete("This field is deprecated.")]
32
  public List<string>? Domains { get; set; }
33
 
34
  /// <summary>The domains associated with the organization, including verification state.</summary>
dotnet/src/WorkOS.net/Services/OrganizationsItContacts/OrganizationsItContactsService.cs
dotnet/src/WorkOS.net/Services/OrganizationsItContacts/OrganizationsItContactsService.cs ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using System.Net.Http;
8
+ using System.Threading;
9
+ using System.Threading.Tasks;
10
+
11
+ /// <summary>Service that exposes the organizations it contacts API operations on <see cref="WorkOSClient"/>.</summary>
12
+ public class OrganizationsItContactsService : Service
13
+ {
14
+ /// <summary>
15
+ /// Initializes a new instance of the <see cref="OrganizationsItContactsService"/> class for mocking. The service uses the singleton
16
+ /// client configured via <see cref="WorkOSConfiguration.WorkOSClient"/>.
17
+ /// </summary>
18
+ public OrganizationsItContactsService() { }
19
+
20
+ /// <summary>
21
+ /// Initializes a new instance of the <see cref="OrganizationsItContactsService"/> class bound to the
22
+ /// supplied <paramref name="client"/>.
23
+ /// </summary>
24
+ /// <param name="client">The HTTP client used to make API requests.</param>
25
+ public OrganizationsItContactsService(WorkOSClient client) : base(client) { }
26
+
27
+ /// <summary>List IT contacts</summary>
28
+ /// <remarks>
29
+ /// Get the IT contacts for an organization.
30
+ /// </remarks>
31
+ /// <param name="organizationId">The ID of the organization.</param>
32
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
33
+ /// <param name="cancellationToken">Cancellation token.</param>
34
+ /// <returns>The <see cref="ItContactList"/> result.</returns>
35
+ public virtual async Task<ItContactList> ListAsync(string organizationId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
36
+ {
37
+ return await this.GetAsync<ItContactList>($"/organizations/{Uri.EscapeDataString(organizationId)}/it_contacts", null, requestOptions, cancellationToken);
38
+ }
39
+
40
+ /// <summary>Compatibility wrapper for <see cref="ListAsync"/>.</summary>
41
+ public virtual Task<ItContactList> List(string organizationId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
42
+ {
43
+ return this.ListAsync(organizationId, requestOptions, cancellationToken);
44
+ }
45
+
46
+ /// <summary>Create an IT contact</summary>
47
+ /// <remarks>
48
+ /// Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
49
+ /// </remarks>
50
+ /// <param name="organizationId">The ID of the organization.</param>
51
+ /// <param name="options">Request options.</param>
52
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
53
+ /// <param name="cancellationToken">Cancellation token.</param>
54
+ /// <returns>The <see cref="ItContact"/> result.</returns>
55
+ public virtual async Task<ItContact> CreateAsync(string organizationId, OrganizationsItContactsCreateOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
56
+ {
57
+ return await this.PostAsync<ItContact>($"/organizations/{Uri.EscapeDataString(organizationId)}/it_contacts", options, requestOptions, cancellationToken);
58
+ }
59
+
60
+ /// <summary>Compatibility wrapper for <see cref="CreateAsync"/>.</summary>
61
+ public virtual Task<ItContact> Create(string organizationId, OrganizationsItContactsCreateOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
62
+ {
63
+ return this.CreateAsync(organizationId, options, requestOptions, cancellationToken);
64
+ }
65
+
66
+ /// <summary>Delete an IT contact</summary>
67
+ /// <remarks>
68
+ /// Remove an IT contact from an organization and revoke the contact's active setup links.
69
+ /// </remarks>
70
+ /// <param name="organizationId">The ID of the organization.</param>
71
+ /// <param name="contactId">The ID of the IT contact.</param>
72
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
73
+ /// <param name="cancellationToken">Cancellation token.</param>
74
+ public virtual async Task DeleteAsync(string organizationId, string contactId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
75
+ {
76
+ await this.DeleteAsync($"/organizations/{Uri.EscapeDataString(organizationId)}/it_contacts/{Uri.EscapeDataString(contactId)}", null, requestOptions, cancellationToken);
77
+ }
78
+
79
+ /// <summary>Compatibility wrapper for <see cref="DeleteAsync"/>.</summary>
80
+ public virtual Task Delete(string organizationId, string contactId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
81
+ {
82
+ return this.DeleteAsync(organizationId, contactId, requestOptions, cancellationToken);
83
+ }
84
+
85
+ /// <summary>Invite an IT contact</summary>
86
+ /// <remarks>
87
+ /// Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
88
+ /// </remarks>
89
+ /// <param name="organizationId">The ID of the organization.</param>
90
+ /// <param name="contactId">The ID of the IT contact.</param>
91
+ /// <param name="options">Request options.</param>
92
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
93
+ /// <param name="cancellationToken">Cancellation token.</param>
94
+ public virtual async Task CreateItContactInviteAsync(string organizationId, string contactId, OrganizationsItContactsCreateItContactInviteOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
95
+ {
96
+ await this.PostAsync<object>($"/organizations/{Uri.EscapeDataString(organizationId)}/it_contacts/{Uri.EscapeDataString(contactId)}/invite", options, requestOptions, cancellationToken);
97
+ }
98
+
99
+ /// <summary>Compatibility wrapper for <see cref="CreateItContactInviteAsync"/>.</summary>
100
+ public virtual Task CreateItContactInvite(string organizationId, string contactId, OrganizationsItContactsCreateItContactInviteOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
101
+ {
102
+ return this.CreateItContactInviteAsync(organizationId, contactId, options, requestOptions, cancellationToken);
103
+ }
104
+
105
+ /// <summary>Revoke an IT contact's invitation</summary>
106
+ /// <remarks>
107
+ /// Revoke the organization's active Admin Portal invitation.
108
+ /// </remarks>
109
+ /// <param name="organizationId">The ID of the organization.</param>
110
+ /// <param name="contactId">The ID of the IT contact.</param>
111
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
112
+ /// <param name="cancellationToken">Cancellation token.</param>
113
+ public virtual async Task RevokeItContactAsync(string organizationId, string contactId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
114
+ {
115
+ await this.PostAsync<object>($"/organizations/{Uri.EscapeDataString(organizationId)}/it_contacts/{Uri.EscapeDataString(contactId)}/revoke", null, requestOptions, cancellationToken);
116
+ }
117
+
118
+ /// <summary>Compatibility wrapper for <see cref="RevokeItContactAsync"/>.</summary>
119
+ public virtual Task RevokeItContact(string organizationId, string contactId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
120
+ {
121
+ return this.RevokeItContactAsync(organizationId, contactId, requestOptions, cancellationToken);
122
+ }
123
+ }
124
+ }
dotnet/src/WorkOS.net/Services/OrganizationsItContacts/_interfaces/OrganizationsItContactsOptions.cs
dotnet/src/WorkOS.net/Services/OrganizationsItContacts/_interfaces/OrganizationsItContactsOptions.cs ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using Newtonsoft.Json;
8
+ using STJS = System.Text.Json.Serialization;
9
+
10
+ /// <summary>Request options for <see cref="OrganizationsItContactsService.CreateAsync"/>: Create an IT contact</summary>
11
+ public class OrganizationsItContactsCreateOptions : BaseOptions
12
+ {
13
+ /// <summary>The email address of the IT contact.</summary>
14
+ public string Email { get; set; } = default!;
15
+
16
+ }
17
+
18
+ /// <summary>Request options for <see cref="OrganizationsItContactsService.CreateItContactInviteAsync"/>: Invite an IT contact</summary>
19
+ public class OrganizationsItContactsCreateItContactInviteOptions : BaseOptions
20
+ {
21
+ /// <summary>The Admin Portal features that the IT contact can configure.</summary>
22
+ public List<InviteItContactIntents> Intents { get; set; } = default!;
23
+
24
+ }
25
+ }
dotnet/test/WorkOSTests/Tests/OrganizationsItContactsServiceTest.cs
dotnet/test/WorkOSTests/Tests/OrganizationsItContactsServiceTest.cs ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOSTests
4
+ {
5
+ using System.Collections.Generic;
6
+ using System.Net;
7
+ using System.Net.Http;
8
+ using System.Threading.Tasks;
9
+ using WorkOS;
10
+ using Xunit;
11
+
12
+ public class OrganizationsItContactsServiceTest
13
+ {
14
+ private readonly HttpMock httpMock;
15
+ private readonly OrganizationsItContactsService service;
16
+
17
+ public OrganizationsItContactsServiceTest()
18
+ {
19
+ this.httpMock = new HttpMock();
20
+ var client = new WorkOSClient(new WorkOSOptions
21
+ {
22
+ ApiKey = "sk_test",
23
+ ClientId = "client_test",
24
+ HttpClient = this.httpMock.HttpClient,
25
+ });
26
+ this.service = new OrganizationsItContactsService(client);
27
+ }
28
+
29
+ [Fact]
30
+ public async Task TestListAsync()
31
+ {
32
+ var fixture = System.IO.File.ReadAllText("testdata/it_contact_list.json");
33
+ this.httpMock.MockResponse(HttpMethod.Get, "/organizations/test_organization_id/it_contacts", HttpStatusCode.OK, fixture);
34
+ var result = await this.service.ListAsync("test_organization_id");
35
+ Assert.NotNull(result);
36
+ this.httpMock.AssertRequestWasMade(HttpMethod.Get, "/organizations/test_organization_id/it_contacts");
37
+ }
38
+
39
+ [Fact]
40
+ public async Task TestCreateAsync()
41
+ {
42
+ var fixture = System.IO.File.ReadAllText("testdata/it_contact.json");
43
+ this.httpMock.MockResponse(HttpMethod.Post, "/organizations/test_organization_id/it_contacts", HttpStatusCode.OK, fixture);
44
+ var options = new OrganizationsItContactsCreateOptions();
45
+ options.Email = "test_email";
46
+ var result = await this.service.CreateAsync("test_organization_id", options);
47
+ Assert.NotNull(result);
48
+ Assert.Equal("it_contact_01HXYZ123456789ABCDEFGHIJ", result.Id);
49
+ Assert.Equal("it-contact@example.com", result.Email);
50
+ this.httpMock.AssertRequestWasMade(HttpMethod.Post, "/organizations/test_organization_id/it_contacts");
51
+ await this.httpMock.AssertRequestBodyContainsAsync("email", "test_email");
52
+ }
53
+
54
+ [Fact]
55
+ public async Task TestDeleteAsync()
56
+ {
57
+ this.httpMock.MockResponse(HttpMethod.Delete, "/organizations/test_organization_id/it_contacts/test_contact_id", HttpStatusCode.NoContent, "");
58
+ await this.service.DeleteAsync("test_organization_id", "test_contact_id");
59
+ this.httpMock.AssertRequestWasMade(HttpMethod.Delete, "/organizations/test_organization_id/it_contacts/test_contact_id");
60
+ }
61
+
62
+ [Fact]
63
+ public async Task TestCreateItContactInviteAsync()
64
+ {
65
+ this.httpMock.MockResponse(HttpMethod.Post, "/organizations/test_organization_id/it_contacts/test_contact_id/invite", HttpStatusCode.OK, "");
66
+ await this.service.CreateItContactInviteAsync("test_organization_id", "test_contact_id", new OrganizationsItContactsCreateItContactInviteOptions());
67
+ this.httpMock.AssertRequestWasMade(HttpMethod.Post, "/organizations/test_organization_id/it_contacts/test_contact_id/invite");
68
+ }
69
+
70
+ [Fact]
71
+ public async Task TestRevokeItContactAsync()
72
+ {
73
+ this.httpMock.MockResponse(HttpMethod.Post, "/organizations/test_organization_id/it_contacts/test_contact_id/revoke", HttpStatusCode.OK, "");
74
+ await this.service.RevokeItContactAsync("test_organization_id", "test_contact_id");
75
+ this.httpMock.AssertRequestWasMade(HttpMethod.Post, "/organizations/test_organization_id/it_contacts/test_contact_id/revoke");
76
+ }
77
+
78
+ [Fact]
79
+ public async Task TestError401()
80
+ {
81
+ this.httpMock.MockResponseForAnyRequest(HttpStatusCode.Unauthorized, "{\"code\":\"unauthorized\",\"message\":\"Unauthorized\"}");
82
+ await Assert.ThrowsAsync<AuthenticationException>(() => this.service.ListAsync("test_organization_id"));
83
+ }
84
+
85
+ [Fact]
86
+ public async Task TestError404()
87
+ {
88
+ this.httpMock.MockResponseForAnyRequest(HttpStatusCode.NotFound, "{\"code\":\"not_found\",\"message\":\"Not Found\"}");
89
+ await Assert.ThrowsAsync<NotFoundException>(() => this.service.ListAsync("test_organization_id"));
90
+ }
91
+
92
+ [Fact]
93
+ public async Task TestError422()
94
+ {
95
+ this.httpMock.MockResponseForAnyRequest((HttpStatusCode)422, "{\"code\":\"unprocessable_entity\",\"message\":\"Unprocessable\"}");
96
+ await Assert.ThrowsAsync<UnprocessableEntityException>(() => this.service.ListAsync("test_organization_id"));
97
+ }
98
+
99
+ [Fact]
100
+ public async Task TestError429()
101
+ {
102
+ this.httpMock.MockResponseForAnyRequest((HttpStatusCode)429, "{\"code\":\"too_many_requests\",\"message\":\"Too Many Requests\"}");
103
+ await Assert.ThrowsAsync<RateLimitExceededException>(() => this.service.ListAsync("test_organization_id"));
104
+ }
105
+
106
+ [Fact]
107
+ public async Task TestError500()
108
+ {
109
+ this.httpMock.MockResponseForAnyRequest(HttpStatusCode.InternalServerError, "{\"code\":\"server_error\",\"message\":\"Server Error\"}");
110
+ await Assert.ThrowsAsync<ServerException>(() => this.service.ListAsync("test_organization_id"));
111
+ }
112
+ }
113
+ }
dotnet/test/WorkOSTests/testdata/create_it_contact.json
dotnet/test/WorkOSTests/testdata/create_it_contact.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "email": "it-contact@example.com"
3
+ }
dotnet/test/WorkOSTests/testdata/invite_it_contact.json
dotnet/test/WorkOSTests/testdata/invite_it_contact.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "intents": [
3
+ "sso",
4
+ "directory_sync"
5
+ ]
6
+ }
dotnet/test/WorkOSTests/testdata/it_contact.json
dotnet/test/WorkOSTests/testdata/it_contact.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "it_contact",
3
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
4
+ "email": "it-contact@example.com",
5
+ "created_at": "2026-01-15T12:00:00.000Z",
6
+ "updated_at": "2026-01-15T12:00:00.000Z"
7
+ }
dotnet/test/WorkOSTests/testdata/it_contact_list.json
dotnet/test/WorkOSTests/testdata/it_contact_list.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "list",
3
+ "data": [
4
+ {
5
+ "object": "it_contact",
6
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
7
+ "email": "it-contact@example.com",
8
+ "created_at": "2026-01-15T12:00:00.000Z",
9
+ "updated_at": "2026-01-15T12:00:00.000Z"
10
+ }
11
+ ],
12
+ "list_metadata": {
13
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
14
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
15
+ }
16
+ }
dotnet/test/WorkOSTests/testdata/waitlist_user.json
dotnet/test/WorkOSTests/testdata/waitlist_user.json CHANGED
@@ -1,10 +1,13 @@
1
  {
2
- "object": "waitlist_user",
3
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
4
  "email": "marcelina.davis@example.com",
5
  "state": "pending",
6
  "approved_at": null,
 
 
 
7
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
8
  "created_at": "2026-01-15T12:00:00.000Z",
9
- "updated_at": "2026-01-15T12:00:00.000Z"
 
10
  }
 
1
  {
 
2
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
3
  "email": "marcelina.davis@example.com",
4
  "state": "pending",
5
  "approved_at": null,
6
+ "additional_fields": {
7
+ "company": "Example Corp"
8
+ },
9
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  }
dotnet/test/WorkOSTests/testdata/waitlist_user_approved.json
dotnet/test/WorkOSTests/testdata/waitlist_user_approved.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
dotnet/test/WorkOSTests/testdata/waitlist_user_approved_nulls.json
dotnet/test/WorkOSTests/testdata/waitlist_user_approved_nulls.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": null
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": null
dotnet/test/WorkOSTests/testdata/waitlist_user_created.json
dotnet/test/WorkOSTests/testdata/waitlist_user_created.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
dotnet/test/WorkOSTests/testdata/waitlist_user_created_nulls.json
dotnet/test/WorkOSTests/testdata/waitlist_user_created_nulls.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": null
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": null
dotnet/test/WorkOSTests/testdata/waitlist_user_denied.json
dotnet/test/WorkOSTests/testdata/waitlist_user_denied.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
dotnet/test/WorkOSTests/testdata/waitlist_user_denied_nulls.json
dotnet/test/WorkOSTests/testdata/waitlist_user_denied_nulls.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": null
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": null
dotnet/test/WorkOSTests/testdata/waitlist_user_nulls.json
dotnet/test/WorkOSTests/testdata/waitlist_user_nulls.json CHANGED
@@ -1,10 +1,11 @@
1
  {
2
- "object": "waitlist_user",
3
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
4
  "email": "marcelina.davis@example.com",
5
  "state": "pending",
6
  "approved_at": null,
 
7
  "waitlist_id": null,
8
  "created_at": "2026-01-15T12:00:00.000Z",
9
- "updated_at": "2026-01-15T12:00:00.000Z"
 
10
  }
 
1
  {
 
2
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
3
  "email": "marcelina.davis@example.com",
4
  "state": "pending",
5
  "approved_at": null,
6
+ "additional_fields": null,
7
  "waitlist_id": null,
8
  "created_at": "2026-01-15T12:00:00.000Z",
9
+ "updated_at": "2026-01-15T12:00:00.000Z",
10
+ "object": "waitlist_user"
11
  }

All files in this language are hidden by the current filters.

code: 16 · tests: 1 · manifest: 1

go/.oagen-manifest.json
go/.oagen-manifest.json CHANGED
@@ -34,6 +34,8 @@
34
  "organization_membership.go",
35
  "organization_membership_test.go",
36
  "organizations.go",
 
 
37
  "organizations_test.go",
38
  "pipes.go",
39
  "pipes_provider.go",
@@ -111,7 +113,6 @@
111
  "testdata/audit_logs_retention.json",
112
  "testdata/auth_method_mismatch_error.json",
113
  "testdata/authenticate_response.json",
114
- "testdata/authenticate_response_impersonator.json",
115
  "testdata/authenticate_response_oauth_token.json",
116
  "testdata/authentication_challenge.json",
117
  "testdata/authentication_challenge_verify_response.json",
@@ -172,7 +173,6 @@
172
  "testdata/client_api_token.json",
173
  "testdata/client_api_token_response.json",
174
  "testdata/configure_data_integration_body.json",
175
- "testdata/confirm_email_change.json",
176
  "testdata/connect_application.json",
177
  "testdata/connect_application_m2m.json",
178
  "testdata/connect_application_oauth.json",
@@ -208,6 +208,7 @@
208
  "testdata/create_group.json",
209
  "testdata/create_group_membership.json",
210
  "testdata/create_group_role_assignment.json",
 
211
  "testdata/create_m2m_application.json",
212
  "testdata/create_magic_code_and_return.json",
213
  "testdata/create_oauth_application.json",
@@ -333,6 +334,10 @@
333
  "testdata/invitation_resent.json",
334
  "testdata/invitation_resent_data.json",
335
  "testdata/invitation_revoked.json",
 
 
 
 
336
  "testdata/jwks_response.json",
337
  "testdata/jwks_response_keys.json",
338
  "testdata/jwt_template_response.json",
@@ -500,7 +505,6 @@
500
  "testdata/user_role_assignment_resource.json",
501
  "testdata/user_role_assignment_source.json",
502
  "testdata/user_sessions_impersonator.json",
503
- "testdata/user_sessions_list_item.json",
504
  "testdata/user_updated.json",
505
  "testdata/validate_api_key.json",
506
  "testdata/vault_byok_key_deleted.json",
@@ -841,6 +845,10 @@
841
  "sdkMethod": "AuthorizeDataIntegration",
842
  "service": "pipes"
843
  },
 
 
 
 
844
  "POST /data-integrations/{slug}/credentials": {
845
  "sdkMethod": "CreateDataIntegrationCredential",
846
  "service": "pipes"
@@ -1013,6 +1021,26 @@
1013
  "sdkMethod": "ListAuthorizedApplications",
1014
  "service": "organizations"
1015
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1016
  "POST /portal/generate_link": {
1017
  "sdkMethod": "GenerateLink",
1018
  "service": "admin_portal"
@@ -1392,10 +1420,6 @@
1392
  "GET /audit_logs/exports/{auditLogExportId}": {
1393
  "sdkMethod": "GetExport",
1394
  "service": "audit_logs"
1395
- },
1396
- "PUT /data-integrations/{slug}/client-credentials": {
1397
- "sdkMethod": "UpdateDataIntegrationClientCredentials",
1398
- "service": "pipes"
1399
  }
1400
  }
1401
  }
 
34
  "organization_membership.go",
35
  "organization_membership_test.go",
36
  "organizations.go",
37
+ "organizations_it_contacts.go",
38
+ "organizations_it_contacts_test.go",
39
  "organizations_test.go",
40
  "pipes.go",
41
  "pipes_provider.go",
 
113
  "testdata/audit_logs_retention.json",
114
  "testdata/auth_method_mismatch_error.json",
115
  "testdata/authenticate_response.json",
 
116
  "testdata/authenticate_response_oauth_token.json",
117
  "testdata/authentication_challenge.json",
118
  "testdata/authentication_challenge_verify_response.json",
 
173
  "testdata/client_api_token.json",
174
  "testdata/client_api_token_response.json",
175
  "testdata/configure_data_integration_body.json",
 
176
  "testdata/connect_application.json",
177
  "testdata/connect_application_m2m.json",
178
  "testdata/connect_application_oauth.json",
 
208
  "testdata/create_group.json",
209
  "testdata/create_group_membership.json",
210
  "testdata/create_group_role_assignment.json",
211
+ "testdata/create_it_contact.json",
212
  "testdata/create_m2m_application.json",
213
  "testdata/create_magic_code_and_return.json",
214
  "testdata/create_oauth_application.json",
 
334
  "testdata/invitation_resent.json",
335
  "testdata/invitation_resent_data.json",
336
  "testdata/invitation_revoked.json",
337
+ "testdata/invite_it_contact.json",
338
+ "testdata/it_contact.json",
339
+ "testdata/it_contact_list.json",
340
+ "testdata/it_contact_list_list_metadata.json",
341
  "testdata/jwks_response.json",
342
  "testdata/jwks_response_keys.json",
343
  "testdata/jwt_template_response.json",
 
505
  "testdata/user_role_assignment_resource.json",
506
  "testdata/user_role_assignment_source.json",
507
  "testdata/user_sessions_impersonator.json",
 
508
  "testdata/user_updated.json",
509
  "testdata/validate_api_key.json",
510
  "testdata/vault_byok_key_deleted.json",
 
845
  "sdkMethod": "AuthorizeDataIntegration",
846
  "service": "pipes"
847
  },
848
+ "PUT /data-integrations/{slug}/client-credentials": {
849
+ "sdkMethod": "UpdateDataIntegrationClientCredentials",
850
+ "service": "pipes"
851
+ },
852
  "POST /data-integrations/{slug}/credentials": {
853
  "sdkMethod": "CreateDataIntegrationCredential",
854
  "service": "pipes"
 
1021
  "sdkMethod": "ListAuthorizedApplications",
1022
  "service": "organizations"
1023
  },
1024
+ "GET /organizations/{organization_id}/it_contacts": {
1025
+ "sdkMethod": "List",
1026
+ "service": "organizations_it_contacts"
1027
+ },
1028
+ "POST /organizations/{organization_id}/it_contacts": {
1029
+ "sdkMethod": "Create",
1030
+ "service": "organizations_it_contacts"
1031
+ },
1032
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1033
+ "sdkMethod": "Delete",
1034
+ "service": "organizations_it_contacts"
1035
+ },
1036
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1037
+ "sdkMethod": "CreateItContactInvite",
1038
+ "service": "organizations_it_contacts"
1039
+ },
1040
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1041
+ "sdkMethod": "RevokeItContact",
1042
+ "service": "organizations_it_contacts"
1043
+ },
1044
  "POST /portal/generate_link": {
1045
  "sdkMethod": "GenerateLink",
1046
  "service": "admin_portal"
 
1420
  "GET /audit_logs/exports/{auditLogExportId}": {
1421
  "sdkMethod": "GetExport",
1422
  "service": "audit_logs"
 
 
 
 
1423
  }
1424
  }
1425
  }
go/authorization.go
go/authorization.go CHANGED
@@ -272,7 +272,7 @@ type AuthorizationListEffectivePermissionsParams struct {
272
  }
273
 
274
  // ListEffectivePermissions for an organization membership on a resource
275
- // Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
276
  func (s *AuthorizationService) ListEffectivePermissions(ctx context.Context, organizationMembershipID string, resourceID string, params *AuthorizationListEffectivePermissionsParams, opts ...RequestOption) *Iterator[AuthorizationPermission] {
277
  return newIterator[AuthorizationPermission](ctx, s.client, "GET", fmt.Sprintf("/authorization/organization_memberships/%s/resources/%s/permissions", url.PathEscape(organizationMembershipID), url.PathEscape(resourceID)), params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
278
  }
@@ -283,7 +283,7 @@ type AuthorizationListEffectivePermissionsByExternalIDParams struct {
283
  }
284
 
285
  // ListEffectivePermissionsByExternalID list effective permissions for an organization membership on a resource by external ID
286
- // 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.
287
  func (s *AuthorizationService) ListEffectivePermissionsByExternalID(ctx context.Context, organizationMembershipID string, resourceTypeSlug string, externalID string, params *AuthorizationListEffectivePermissionsByExternalIDParams, opts ...RequestOption) *Iterator[AuthorizationPermission] {
288
  return newIterator[AuthorizationPermission](ctx, s.client, "GET", fmt.Sprintf("/authorization/organization_memberships/%s/resources/%s/%s/permissions", url.PathEscape(organizationMembershipID), url.PathEscape(resourceTypeSlug), url.PathEscape(externalID)), params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
289
  }
 
272
  }
273
 
274
  // ListEffectivePermissions for an organization membership on a resource
275
+ // Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
276
  func (s *AuthorizationService) ListEffectivePermissions(ctx context.Context, organizationMembershipID string, resourceID string, params *AuthorizationListEffectivePermissionsParams, opts ...RequestOption) *Iterator[AuthorizationPermission] {
277
  return newIterator[AuthorizationPermission](ctx, s.client, "GET", fmt.Sprintf("/authorization/organization_memberships/%s/resources/%s/permissions", url.PathEscape(organizationMembershipID), url.PathEscape(resourceID)), params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
278
  }
 
283
  }
284
 
285
  // ListEffectivePermissionsByExternalID list effective permissions for an organization membership on a resource by external ID
286
+ // 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
287
  func (s *AuthorizationService) ListEffectivePermissionsByExternalID(ctx context.Context, organizationMembershipID string, resourceTypeSlug string, externalID string, params *AuthorizationListEffectivePermissionsByExternalIDParams, opts ...RequestOption) *Iterator[AuthorizationPermission] {
288
  return newIterator[AuthorizationPermission](ctx, s.client, "GET", fmt.Sprintf("/authorization/organization_memberships/%s/resources/%s/%s/permissions", url.PathEscape(organizationMembershipID), url.PathEscape(resourceTypeSlug), url.PathEscape(externalID)), params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
289
  }
go/enums.go
go/enums.go CHANGED
@@ -20,6 +20,17 @@ const (
20
  VaultByokKeyProviderAzureKeyVault VaultByokKeyProvider = "AZURE_KEY_VAULT"
21
  )
22
 
 
 
 
 
 
 
 
 
 
 
 
23
  // OrganizationDomainDataState represents organization domain data state values.
24
  type OrganizationDomainDataState string
25
 
 
20
  VaultByokKeyProviderAzureKeyVault VaultByokKeyProvider = "AZURE_KEY_VAULT"
21
  )
22
 
23
+ // InviteItContactIntents represents invite it contact intents values.
24
+ type InviteItContactIntents string
25
+
26
+ const (
27
+ InviteItContactIntentsSSO InviteItContactIntents = "sso"
28
+ InviteItContactIntentsDirectorySync InviteItContactIntents = "directory_sync"
29
+ InviteItContactIntentsLogStreams InviteItContactIntents = "log_streams"
30
+ InviteItContactIntentsDomainVerification InviteItContactIntents = "domain_verification"
31
+ InviteItContactIntentsBringYourOwnKey InviteItContactIntents = "bring_your_own_key"
32
+ )
33
+
34
  // OrganizationDomainDataState represents organization domain data state values.
35
  type OrganizationDomainDataState string
36
 
go/models.go
go/models.go CHANGED
@@ -1044,22 +1044,24 @@ type PipeConnectedAccount struct {
1044
 
1045
  // WaitlistUser represents a waitlist user.
1046
  type WaitlistUser struct {
1047
- // Object distinguishes the Waitlist User object.
1048
- Object string `json:"object"`
1049
- // ID is the unique ID of the Waitlist User.
1050
  ID string `json:"id"`
1051
- // Email is the email address of the Waitlist User.
1052
  Email string `json:"email"`
1053
- // State is the state of the Waitlist User.
1054
  State WaitlistUserState `json:"state"`
1055
- // ApprovedAt is the timestamp when the Waitlist User was approved, or null if not yet approved.
1056
  ApprovedAt *string `json:"approved_at"`
 
 
1057
- // WaitlistID is the unique ID of the Waitlist that the Waitlist User joined.
1058
  WaitlistID *string `json:"waitlist_id,omitempty"`
1059
  // CreatedAt is an ISO 8601 timestamp.
1060
  CreatedAt string `json:"created_at"`
1061
  // UpdatedAt is an ISO 8601 timestamp.
1062
  UpdatedAt string `json:"updated_at"`
 
 
1063
  }
1064
 
1065
  // EventSchema an event emitted by WorkOS.
@@ -4725,6 +4727,30 @@ type OrganizationAPIKeyWithValue struct {
4725
  Value string `json:"value"`
4726
  }
4727
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4728
  // Organization represents an organization.
4729
  type Organization struct {
4730
  // Object distinguishes the Organization object.
@@ -5545,6 +5571,14 @@ type AuditLogConfigurationLogStream struct {
5545
  CreatedAt string `json:"created_at"`
5546
  }
5547
 
 
 
 
 
 
 
 
 
5548
  // OrganizationAPIKeyWithValueOwner is an alias for OrganizationAPIKeyOwner.
5549
  type OrganizationAPIKeyWithValueOwner = OrganizationAPIKeyOwner
5550
 
 
1044
 
1045
  // WaitlistUser represents a waitlist user.
1046
  type WaitlistUser struct {
 
 
1047
+ // ID is the unique ID of the waitlist entry.
1048
  ID string `json:"id"`
1049
+ // Email is the email address of the user on the waitlist.
1050
  Email string `json:"email"`
1051
+ // State is the state of the waitlist entry.
1052
  State WaitlistUserState `json:"state"`
1053
+ // ApprovedAt is the timestamp when the entry was approved, or null if not yet approved.
1054
  ApprovedAt *string `json:"approved_at"`
1055
+ // AdditionalFields is additional fields submitted when the user joined the waitlist. Values are user-provided — treat them as untrusted input when rendering or exporting.
1056
+ AdditionalFields map[string]string `json:"additional_fields,omitempty"`
1057
+ // WaitlistID is the unique ID of the waitlist the entry belongs to.
1058
  WaitlistID *string `json:"waitlist_id,omitempty"`
1059
  // CreatedAt is an ISO 8601 timestamp.
1060
  CreatedAt string `json:"created_at"`
1061
  // UpdatedAt is an ISO 8601 timestamp.
1062
  UpdatedAt string `json:"updated_at"`
1063
+ // Object distinguishes the Waitlist User object.
1064
+ Object string `json:"object"`
1065
  }
1066
 
1067
  // EventSchema an event emitted by WorkOS.
 
4727
  Value string `json:"value"`
4728
  }
4729
 
4730
+ // ItContact represents an it contact.
4731
+ type ItContact struct {
4732
+ // Object is the IT Contact object.
4733
+ Object string `json:"object"`
4734
+ // ID is the unique ID of the IT Contact.
4735
+ ID string `json:"id"`
4736
+ // Email is the email address of the IT Contact.
4737
+ Email string `json:"email"`
4738
+ // CreatedAt is an ISO 8601 timestamp.
4739
+ CreatedAt string `json:"created_at"`
4740
+ // UpdatedAt is an ISO 8601 timestamp.
4741
+ UpdatedAt string `json:"updated_at"`
4742
+ }
4743
+
4744
+ // ItContactList represents an it contact list.
4745
+ type ItContactList struct {
4746
+ // Object indicates this is a list response.
4747
+ Object string `json:"object"`
4748
+ // Data is the list of records for the current page.
4749
+ Data []*ItContact `json:"data"`
4750
+ // ListMetadata is pagination cursors for navigating between pages of results.
4751
+ ListMetadata *ItContactListListMetadata `json:"list_metadata"`
4752
+ }
4753
+
4754
  // Organization represents an organization.
4755
  type Organization struct {
4756
  // Object distinguishes the Organization object.
 
5571
  CreatedAt string `json:"created_at"`
5572
  }
5573
 
5574
+ // ItContactListListMetadata pagination cursors for navigating between pages of results.
5575
+ type ItContactListListMetadata struct {
5576
+ // Before is an object ID that defines your place in the list. When the ID is not present, you are at the start of the list.
5577
+ Before *string `json:"before"`
5578
+ // After is an object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
5579
+ After *string `json:"after"`
5580
+ }
5581
+
5582
  // OrganizationAPIKeyWithValueOwner is an alias for OrganizationAPIKeyOwner.
5583
  type OrganizationAPIKeyWithValueOwner = OrganizationAPIKeyOwner
5584
 
go/organizations.go
go/organizations.go CHANGED
@@ -36,6 +36,8 @@ type OrganizationsCreateParams struct {
36
  // AllowProfilesOutsideOrganization is whether the organization allows profiles from outside the organization to sign in.
37
  AllowProfilesOutsideOrganization *bool `json:"allow_profiles_outside_organization,omitempty" url:"-"`
38
  // Domains is the domains associated with the organization. Deprecated in favor of `domain_data`.
 
 
39
  Domains []string `json:"domains,omitempty" url:"-"`
40
  // DomainData is the domains associated with the organization, including verification state.
41
  DomainData []*OrganizationDomainData `json:"domain_data,omitempty" url:"-"`
 
36
  // AllowProfilesOutsideOrganization is whether the organization allows profiles from outside the organization to sign in.
37
  AllowProfilesOutsideOrganization *bool `json:"allow_profiles_outside_organization,omitempty" url:"-"`
38
  // Domains is the domains associated with the organization. Deprecated in favor of `domain_data`.
39
+ //
40
+ // Deprecated: this field is deprecated.
41
  Domains []string `json:"domains,omitempty" url:"-"`
42
  // DomainData is the domains associated with the organization, including verification state.
43
  DomainData []*OrganizationDomainData `json:"domain_data,omitempty" url:"-"`
go/organizations_it_contacts.go
go/organizations_it_contacts.go ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Code generated by oagen. DO NOT EDIT.
2
+
3
+ package workos
4
+
5
+ import (
6
+ "context"
7
+ "fmt"
8
+ "net/url"
9
+ )
10
+
11
+ // OrganizationsItContactService handles OrganizationsItContacts operations.
12
+ type OrganizationsItContactService struct {
13
+ client *Client
14
+ }
15
+
16
+ // List it contacts
17
+ // Get the IT contacts for an organization.
18
+ func (s *OrganizationsItContactService) List(ctx context.Context, organizationID string, opts ...RequestOption) (*ItContactList, error) {
19
+ var result ItContactList
20
+ _, err := s.client.request(ctx, "GET", fmt.Sprintf("/organizations/%s/it_contacts", url.PathEscape(organizationID)), nil, nil, &result, opts)
21
+ if err != nil {
22
+ return nil, err
23
+ }
24
+ return &result, nil
25
+ }
26
+
27
+ // OrganizationsItContactsCreateParams contains the parameters for Create.
28
+ type OrganizationsItContactsCreateParams struct {
29
+ // Email is the email address of the IT contact.
30
+ Email string `json:"email" url:"-"`
31
+ }
32
+
33
+ // Create an IT contact
34
+ // Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
35
+ func (s *OrganizationsItContactService) Create(ctx context.Context, organizationID string, params *OrganizationsItContactsCreateParams, opts ...RequestOption) (*ItContact, error) {
36
+ var result ItContact
37
+ _, err := s.client.request(ctx, "POST", fmt.Sprintf("/organizations/%s/it_contacts", url.PathEscape(organizationID)), nil, params, &result, opts)
38
+ if err != nil {
39
+ return nil, err
40
+ }
41
+ return &result, nil
42
+ }
43
+
44
+ // Delete an IT contact
45
+ // Remove an IT contact from an organization and revoke the contact's active setup links.
46
+ func (s *OrganizationsItContactService) Delete(ctx context.Context, organizationID string, contactID string, opts ...RequestOption) error {
47
+ _, err := s.client.request(ctx, "DELETE", fmt.Sprintf("/organizations/%s/it_contacts/%s", url.PathEscape(organizationID), url.PathEscape(contactID)), nil, nil, nil, opts)
48
+ return err
49
+ }
50
+
51
+ // OrganizationsItContactsCreateItContactInviteParams contains the parameters for CreateItContactInvite.
52
+ type OrganizationsItContactsCreateItContactInviteParams struct {
53
+ // Intents is the Admin Portal features that the IT contact can configure.
54
+ Intents []InviteItContactIntents `json:"intents" url:"-"`
55
+ }
56
+
57
+ // CreateItContactInvite invite an IT contact
58
+ // Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
59
+ func (s *OrganizationsItContactService) CreateItContactInvite(ctx context.Context, organizationID string, contactID string, params *OrganizationsItContactsCreateItContactInviteParams, opts ...RequestOption) error {
60
+ _, err := s.client.request(ctx, "POST", fmt.Sprintf("/organizations/%s/it_contacts/%s/invite", url.PathEscape(organizationID), url.PathEscape(contactID)), nil, params, nil, opts)
61
+ return err
62
+ }
63
+
64
+ // RevokeItContact revoke an IT contact's invitation
65
+ // Revoke the organization's active Admin Portal invitation.
66
+ func (s *OrganizationsItContactService) RevokeItContact(ctx context.Context, organizationID string, contactID string, opts ...RequestOption) error {
67
+ _, err := s.client.request(ctx, "POST", fmt.Sprintf("/organizations/%s/it_contacts/%s/revoke", url.PathEscape(organizationID), url.PathEscape(contactID)), nil, nil, nil, opts)
68
+ return err
69
+ }
go/organizations_it_contacts_test.go
go/organizations_it_contacts_test.go ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Code generated by oagen. DO NOT EDIT.
2
+
3
+ package workos_test
4
+
5
+ import (
6
+ "context"
7
+ "encoding/json"
8
+ "io"
9
+ "net/http"
10
+ "net/http/httptest"
11
+ "os"
12
+ "testing"
13
+
14
+ "github.com/stretchr/testify/require"
15
+ "github.com/workos/workos-go/v10"
16
+ )
17
+
18
+ func TestOrganizationsItContacts_List(t *testing.T) {
19
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
20
+ require.Equal(t, "GET", r.Method)
21
+ require.Equal(t, "/organizations/test_organization_id/it_contacts", r.URL.Path)
22
+ w.Header().Set("Content-Type", "application/json")
23
+ w.WriteHeader(http.StatusOK)
24
+ fixture, err := os.ReadFile("testdata/it_contact_list.json")
25
+ if err != nil {
26
+ t.Fatalf("failed to read fixture: %v", err)
27
+ }
28
+ w.Write(fixture)
29
+ }))
30
+ defer server.Close()
31
+
32
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
33
+ result, err := client.OrganizationsItContacts().List(context.Background(), "test_organization_id")
34
+ require.NoError(t, err)
35
+ require.NotNil(t, result)
36
+ }
37
+
38
+ func TestOrganizationsItContacts_Create(t *testing.T) {
39
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
40
+ require.Equal(t, "POST", r.Method)
41
+ require.Equal(t, "/organizations/test_organization_id/it_contacts", r.URL.Path)
42
+ body, _ := io.ReadAll(r.Body)
43
+ var bodyMap map[string]interface{}
44
+ require.NoError(t, json.Unmarshal(body, &bodyMap))
45
+ w.Header().Set("Content-Type", "application/json")
46
+ w.WriteHeader(http.StatusOK)
47
+ fixture, err := os.ReadFile("testdata/it_contact.json")
48
+ if err != nil {
49
+ t.Fatalf("failed to read fixture: %v", err)
50
+ }
51
+ w.Write(fixture)
52
+ }))
53
+ defer server.Close()
54
+
55
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
56
+ result, err := client.OrganizationsItContacts().Create(context.Background(), "test_organization_id", &workos.OrganizationsItContactsCreateParams{})
57
+ require.NoError(t, err)
58
+ require.NotNil(t, result)
59
+ require.Equal(t, "it_contact_01HXYZ123456789ABCDEFGHIJ", result.ID)
60
+ require.Equal(t, "it-contact@example.com", result.Email)
61
+ require.Equal(t, "2026-01-15T12:00:00.000Z", result.CreatedAt)
62
+ }
63
+
64
+ func TestOrganizationsItContacts_Delete(t *testing.T) {
65
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
66
+ require.Equal(t, "DELETE", r.Method)
67
+ require.Equal(t, "/organizations/test_organization_id/it_contacts/test_contact_id", r.URL.Path)
68
+ w.WriteHeader(http.StatusNoContent)
69
+ }))
70
+ defer server.Close()
71
+
72
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
73
+ err := client.OrganizationsItContacts().Delete(context.Background(), "test_organization_id", "test_contact_id")
74
+ require.NoError(t, err)
75
+ }
76
+
77
+ func TestOrganizationsItContacts_CreateItContactInvite(t *testing.T) {
78
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
79
+ require.Equal(t, "POST", r.Method)
80
+ require.Equal(t, "/organizations/test_organization_id/it_contacts/test_contact_id/invite", r.URL.Path)
81
+ w.WriteHeader(http.StatusOK)
82
+ }))
83
+ defer server.Close()
84
+
85
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
86
+ err := client.OrganizationsItContacts().CreateItContactInvite(context.Background(), "test_organization_id", "test_contact_id", &workos.OrganizationsItContactsCreateItContactInviteParams{})
87
+ require.NoError(t, err)
88
+ }
89
+
90
+ func TestOrganizationsItContacts_RevokeItContact(t *testing.T) {
91
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
92
+ require.Equal(t, "POST", r.Method)
93
+ require.Equal(t, "/organizations/test_organization_id/it_contacts/test_contact_id/revoke", r.URL.Path)
94
+ w.WriteHeader(http.StatusOK)
95
+ }))
96
+ defer server.Close()
97
+
98
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
99
+ err := client.OrganizationsItContacts().RevokeItContact(context.Background(), "test_organization_id", "test_contact_id")
100
+ require.NoError(t, err)
101
+ }
102
+
103
+ func TestOrganizationsItContacts_Error401(t *testing.T) {
104
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
105
+ w.Header().Set("Content-Type", "application/json")
106
+ w.WriteHeader(http.StatusUnauthorized)
107
+ w.Write([]byte(`{"code":"unauthorized","message":"Unauthorized"}`))
108
+ }))
109
+ defer server.Close()
110
+
111
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
112
+ _, err := client.OrganizationsItContacts().List(context.Background(), "test_organization_id")
113
+ require.IsType(t, &workos.AuthenticationError{}, err)
114
+ }
115
+
116
+ func TestOrganizationsItContacts_Error404(t *testing.T) {
117
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
118
+ w.Header().Set("Content-Type", "application/json")
119
+ w.WriteHeader(http.StatusNotFound)
120
+ w.Write([]byte(`{"code":"not_found","message":"Not Found"}`))
121
+ }))
122
+ defer server.Close()
123
+
124
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
125
+ _, err := client.OrganizationsItContacts().List(context.Background(), "test_organization_id")
126
+ require.IsType(t, &workos.NotFoundError{}, err)
127
+ }
128
+
129
+ func TestOrganizationsItContacts_Error422(t *testing.T) {
130
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
131
+ w.Header().Set("Content-Type", "application/json")
132
+ w.WriteHeader(422)
133
+ w.Write([]byte(`{"code":"unprocessable_entity","message":"Unprocessable"}`))
134
+ }))
135
+ defer server.Close()
136
+
137
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
138
+ _, err := client.OrganizationsItContacts().List(context.Background(), "test_organization_id")
139
+ require.IsType(t, &workos.UnprocessableEntityError{}, err)
140
+ }
go/pkg/events/events.go
go/pkg/events/events.go CHANGED
@@ -11,6 +11,7 @@ const (
11
  AgentRegistrationClaimCompleted = "agent.registration.claim.completed"
12
  AgentRegistrationCredentialIssued = "agent.registration.credential.issued"
13
  AgentRegistrationDeleted = "agent.registration.deleted"
 
14
  AgentRegistrationExpired = "agent.registration.expired"
15
  AgentRegistrationOrganizationSwitched = "agent.registration.organization.switched"
16
  AgentRegistrationRevoked = "agent.registration.revoked"
 
11
  AgentRegistrationClaimCompleted = "agent.registration.claim.completed"
12
  AgentRegistrationCredentialIssued = "agent.registration.credential.issued"
13
  AgentRegistrationDeleted = "agent.registration.deleted"
14
+ AgentRegistrationRefreshed = "agent.registration.refreshed"
15
  AgentRegistrationExpired = "agent.registration.expired"
16
  AgentRegistrationOrganizationSwitched = "agent.registration.organization.switched"
17
  AgentRegistrationRevoked = "agent.registration.revoked"
go/testdata/create_it_contact.json
go/testdata/create_it_contact.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "email": "it-contact@example.com"
3
+ }
go/testdata/invite_it_contact.json
go/testdata/invite_it_contact.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "intents": [
3
+ "sso",
4
+ "directory_sync"
5
+ ]
6
+ }
go/testdata/it_contact.json
go/testdata/it_contact.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "it_contact",
3
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
4
+ "email": "it-contact@example.com",
5
+ "created_at": "2026-01-15T12:00:00.000Z",
6
+ "updated_at": "2026-01-15T12:00:00.000Z"
7
+ }
go/testdata/it_contact_list.json
go/testdata/it_contact_list.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "list",
3
+ "data": [
4
+ {
5
+ "object": "it_contact",
6
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
7
+ "email": "it-contact@example.com",
8
+ "created_at": "2026-01-15T12:00:00.000Z",
9
+ "updated_at": "2026-01-15T12:00:00.000Z"
10
+ }
11
+ ],
12
+ "list_metadata": {
13
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
14
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
15
+ }
16
+ }
go/testdata/it_contact_list_list_metadata.json
go/testdata/it_contact_list_list_metadata.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
3
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
4
+ }
go/testdata/waitlist_user.json
go/testdata/waitlist_user.json CHANGED
@@ -1,10 +1,13 @@
1
  {
2
- "object": "waitlist_user",
3
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
4
  "email": "marcelina.davis@example.com",
5
  "state": "pending",
6
  "approved_at": null,
 
 
 
7
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
8
  "created_at": "2026-01-15T12:00:00.000Z",
9
- "updated_at": "2026-01-15T12:00:00.000Z"
 
10
  }
 
1
  {
 
2
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
3
  "email": "marcelina.davis@example.com",
4
  "state": "pending",
5
  "approved_at": null,
6
+ "additional_fields": {
7
+ "company": "Example Corp"
8
+ },
9
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  }
go/testdata/waitlist_user_approved.json
go/testdata/waitlist_user_approved.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
go/testdata/waitlist_user_created.json
go/testdata/waitlist_user_created.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
go/testdata/waitlist_user_denied.json
go/testdata/waitlist_user_denied.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
go/workos.go
go/workos.go CHANGED
@@ -14,30 +14,31 @@ type Client struct {
14
  logger Logger
15
  appInfo appInfo
16
 
17
- agents *AgentService
18
- multiFactorAuth *MultiFactorAuthService
19
- connect *ConnectService
20
- authorization *AuthorizationService
21
- clientAPI *ClientAPIService
22
- sso *SSOService
23
- pipes *PipeService
24
- directorySync *DirectorySyncService
25
- events *EventService
26
- featureFlags *FeatureFlagService
27
- organizationDomains *OrganizationDomainService
28
- organizations *OrganizationService
29
- apiKeys *APIKeyService
30
- pipesProvider *PipesProviderService
31
- groups *GroupService
 
32
- adminPortal *AdminPortalService
33
- radar *RadarService
34
- userManagement *UserManagementService
35
- organizationMembership *OrganizationMembershipService
36
- vault *VaultService
37
- webhooks *WebhookService
38
- widgets *WidgetService
39
- auditLogs *AuditLogService
40
- passwordless *PasswordlessService
41
  }
42
 
43
  // NewClient creates a new WorkOS API client.
@@ -66,6 +67,7 @@ func NewClient(apiKey string, opts ...ClientOption) *Client {
66
  c.apiKeys = &APIKeyService{client: c}
67
  c.pipesProvider = &PipesProviderService{client: c}
68
  c.groups = &GroupService{client: c}
 
69
  c.adminPortal = &AdminPortalService{client: c}
70
  c.radar = &RadarService{client: c}
71
  c.userManagement = &UserManagementService{client: c}
@@ -153,6 +155,11 @@ func (c *Client) Groups() *GroupService {
153
  return c.groups
154
  }
155
 
 
 
 
 
 
156
  // AdminPortal returns the AdminPortal service.
157
  func (c *Client) AdminPortal() *AdminPortalService {
158
  return c.adminPortal
 
14
  logger Logger
15
  appInfo appInfo
16
 
17
+ agents *AgentService
18
+ multiFactorAuth *MultiFactorAuthService
19
+ connect *ConnectService
20
+ authorization *AuthorizationService
21
+ clientAPI *ClientAPIService
22
+ sso *SSOService
23
+ pipes *PipeService
24
+ directorySync *DirectorySyncService
25
+ events *EventService
26
+ featureFlags *FeatureFlagService
27
+ organizationDomains *OrganizationDomainService
28
+ organizations *OrganizationService
29
+ apiKeys *APIKeyService
30
+ pipesProvider *PipesProviderService
31
+ groups *GroupService
32
+ organizationsItContacts *OrganizationsItContactService
33
+ adminPortal *AdminPortalService
34
+ radar *RadarService
35
+ userManagement *UserManagementService
36
+ organizationMembership *OrganizationMembershipService
37
+ vault *VaultService
38
+ webhooks *WebhookService
39
+ widgets *WidgetService
40
+ auditLogs *AuditLogService
41
+ passwordless *PasswordlessService
42
  }
43
 
44
  // NewClient creates a new WorkOS API client.
 
67
  c.apiKeys = &APIKeyService{client: c}
68
  c.pipesProvider = &PipesProviderService{client: c}
69
  c.groups = &GroupService{client: c}
70
+ c.organizationsItContacts = &OrganizationsItContactService{client: c}
71
  c.adminPortal = &AdminPortalService{client: c}
72
  c.radar = &RadarService{client: c}
73
  c.userManagement = &UserManagementService{client: c}
 
155
  return c.groups
156
  }
157
 
158
+ // OrganizationsItContacts returns the OrganizationsItContacts service.
159
+ func (c *Client) OrganizationsItContacts() *OrganizationsItContactService {
160
+ return c.organizationsItContacts
161
+ }
162
+
163
  // AdminPortal returns the AdminPortal service.
164
  func (c *Client) AdminPortal() *AdminPortalService {
165
  return c.adminPortal

All files in this language are hidden by the current filters.

code: 0 · tests: 0 · manifest: 0

No changes for this language.

All files in this language are hidden by the current filters.

code: 13 · tests: 3 · manifest: 1

kotlin/.oagen-manifest.json
kotlin/.oagen-manifest.json CHANGED
@@ -195,6 +195,7 @@
195
  "src/main/kotlin/com/workos/models/CreateGroup.kt",
196
  "src/main/kotlin/com/workos/models/CreateGroupMembership.kt",
197
  "src/main/kotlin/com/workos/models/CreateGroupRoleAssignment.kt",
 
198
  "src/main/kotlin/com/workos/models/CreateM2MApplication.kt",
199
  "src/main/kotlin/com/workos/models/CreateMagicCodeAndReturn.kt",
200
  "src/main/kotlin/com/workos/models/CreateOAuthApplication.kt",
@@ -341,6 +342,10 @@
341
  "src/main/kotlin/com/workos/models/InvitationResentData.kt",
342
  "src/main/kotlin/com/workos/models/InvitationRevoked.kt",
343
  "src/main/kotlin/com/workos/models/InvitationRevokedData.kt",
 
 
 
 
344
  "src/main/kotlin/com/workos/models/JWTTemplateResponse.kt",
345
  "src/main/kotlin/com/workos/models/JwksResponse.kt",
346
  "src/main/kotlin/com/workos/models/JwksResponseKeys.kt",
@@ -550,6 +555,7 @@
550
  "src/main/kotlin/com/workos/organizationdomains/OrganizationDomains.kt",
551
  "src/main/kotlin/com/workos/organizationmembership/OrganizationMembershipService.kt",
552
  "src/main/kotlin/com/workos/organizations/Organizations.kt",
 
553
  "src/main/kotlin/com/workos/pipes/Pipes.kt",
554
  "src/main/kotlin/com/workos/pipesprovider/PipesProvider.kt",
555
  "src/main/kotlin/com/workos/radar/Radar.kt",
@@ -629,6 +635,7 @@
629
  "src/main/kotlin/com/workos/types/InvitationResentDataState.kt",
630
  "src/main/kotlin/com/workos/types/InvitationRevokedDataState.kt",
631
  "src/main/kotlin/com/workos/types/InvitationState.kt",
 
632
  "src/main/kotlin/com/workos/types/OrganizationCreatedDataDomainState.kt",
633
  "src/main/kotlin/com/workos/types/OrganizationCreatedDataDomainVerificationStrategy.kt",
634
  "src/main/kotlin/com/workos/types/OrganizationDeletedDataDomainState.kt",
@@ -721,6 +728,7 @@
721
  "src/test/kotlin/com/workos/organizationdomains/OrganizationDomainsTest.kt",
722
  "src/test/kotlin/com/workos/organizationmembership/OrganizationMembershipServiceTest.kt",
723
  "src/test/kotlin/com/workos/organizations/OrganizationsTest.kt",
 
724
  "src/test/kotlin/com/workos/pipes/PipesTest.kt",
725
  "src/test/kotlin/com/workos/pipesprovider/PipesProviderTest.kt",
726
  "src/test/kotlin/com/workos/radar/RadarTest.kt",
@@ -1029,6 +1037,10 @@
1029
  "sdkMethod": "authorizeDataIntegration",
1030
  "service": "pipes"
1031
  },
 
 
 
 
1032
  "POST /data-integrations/{slug}/credentials": {
1033
  "sdkMethod": "createDataIntegrationCredential",
1034
  "service": "pipes"
@@ -1201,6 +1213,26 @@
1201
  "sdkMethod": "listAuthorizedApplications",
1202
  "service": "organizations"
1203
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1204
  "POST /portal/generate_link": {
1205
  "sdkMethod": "generateLink",
1206
  "service": "adminPortal"
@@ -1602,10 +1634,6 @@
1602
  "GET /audit_logs/exports/{auditLogExportId}": {
1603
  "sdkMethod": "getExport",
1604
  "service": "auditLogs"
1605
- },
1606
- "PUT /data-integrations/{slug}/client-credentials": {
1607
- "sdkMethod": "updateDataIntegrationClientCredentials",
1608
- "service": "pipes"
1609
  }
1610
  }
1611
  }
 
195
  "src/main/kotlin/com/workos/models/CreateGroup.kt",
196
  "src/main/kotlin/com/workos/models/CreateGroupMembership.kt",
197
  "src/main/kotlin/com/workos/models/CreateGroupRoleAssignment.kt",
198
+ "src/main/kotlin/com/workos/models/CreateItContact.kt",
199
  "src/main/kotlin/com/workos/models/CreateM2MApplication.kt",
200
  "src/main/kotlin/com/workos/models/CreateMagicCodeAndReturn.kt",
201
  "src/main/kotlin/com/workos/models/CreateOAuthApplication.kt",
 
342
  "src/main/kotlin/com/workos/models/InvitationResentData.kt",
343
  "src/main/kotlin/com/workos/models/InvitationRevoked.kt",
344
  "src/main/kotlin/com/workos/models/InvitationRevokedData.kt",
345
+ "src/main/kotlin/com/workos/models/InviteItContact.kt",
346
+ "src/main/kotlin/com/workos/models/ItContact.kt",
347
+ "src/main/kotlin/com/workos/models/ItContactList.kt",
348
+ "src/main/kotlin/com/workos/models/ItContactListListMetadata.kt",
349
  "src/main/kotlin/com/workos/models/JWTTemplateResponse.kt",
350
  "src/main/kotlin/com/workos/models/JwksResponse.kt",
351
  "src/main/kotlin/com/workos/models/JwksResponseKeys.kt",
 
555
  "src/main/kotlin/com/workos/organizationdomains/OrganizationDomains.kt",
556
  "src/main/kotlin/com/workos/organizationmembership/OrganizationMembershipService.kt",
557
  "src/main/kotlin/com/workos/organizations/Organizations.kt",
558
+ "src/main/kotlin/com/workos/organizationsitcontacts/OrganizationsItContacts.kt",
559
  "src/main/kotlin/com/workos/pipes/Pipes.kt",
560
  "src/main/kotlin/com/workos/pipesprovider/PipesProvider.kt",
561
  "src/main/kotlin/com/workos/radar/Radar.kt",
 
635
  "src/main/kotlin/com/workos/types/InvitationResentDataState.kt",
636
  "src/main/kotlin/com/workos/types/InvitationRevokedDataState.kt",
637
  "src/main/kotlin/com/workos/types/InvitationState.kt",
638
+ "src/main/kotlin/com/workos/types/InviteItContactIntents.kt",
639
  "src/main/kotlin/com/workos/types/OrganizationCreatedDataDomainState.kt",
640
  "src/main/kotlin/com/workos/types/OrganizationCreatedDataDomainVerificationStrategy.kt",
641
  "src/main/kotlin/com/workos/types/OrganizationDeletedDataDomainState.kt",
 
728
  "src/test/kotlin/com/workos/organizationdomains/OrganizationDomainsTest.kt",
729
  "src/test/kotlin/com/workos/organizationmembership/OrganizationMembershipServiceTest.kt",
730
  "src/test/kotlin/com/workos/organizations/OrganizationsTest.kt",
731
+ "src/test/kotlin/com/workos/organizationsitcontacts/OrganizationsItContactsTest.kt",
732
  "src/test/kotlin/com/workos/pipes/PipesTest.kt",
733
  "src/test/kotlin/com/workos/pipesprovider/PipesProviderTest.kt",
734
  "src/test/kotlin/com/workos/radar/RadarTest.kt",
 
1037
  "sdkMethod": "authorizeDataIntegration",
1038
  "service": "pipes"
1039
  },
1040
+ "PUT /data-integrations/{slug}/client-credentials": {
1041
+ "sdkMethod": "updateDataIntegrationClientCredentials",
1042
+ "service": "pipes"
1043
+ },
1044
  "POST /data-integrations/{slug}/credentials": {
1045
  "sdkMethod": "createDataIntegrationCredential",
1046
  "service": "pipes"
 
1213
  "sdkMethod": "listAuthorizedApplications",
1214
  "service": "organizations"
1215
  },
1216
+ "GET /organizations/{organization_id}/it_contacts": {
1217
+ "sdkMethod": "list",
1218
+ "service": "organizationsItContacts"
1219
+ },
1220
+ "POST /organizations/{organization_id}/it_contacts": {
1221
+ "sdkMethod": "create",
1222
+ "service": "organizationsItContacts"
1223
+ },
1224
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1225
+ "sdkMethod": "delete",
1226
+ "service": "organizationsItContacts"
1227
+ },
1228
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1229
+ "sdkMethod": "createItContactInvite",
1230
+ "service": "organizationsItContacts"
1231
+ },
1232
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1233
+ "sdkMethod": "revokeItContact",
1234
+ "service": "organizationsItContacts"
1235
+ },
1236
  "POST /portal/generate_link": {
1237
  "sdkMethod": "generateLink",
1238
  "service": "adminPortal"
 
1634
  "GET /audit_logs/exports/{auditLogExportId}": {
1635
  "sdkMethod": "getExport",
1636
  "service": "auditLogs"
 
 
 
 
1637
  }
1638
  }
1639
  }
kotlin/src/main/kotlin/com/workos/WorkOS.kt
kotlin/src/main/kotlin/com/workos/WorkOS.kt CHANGED
@@ -20,6 +20,7 @@ import com.workos.multifactorauth.MultiFactorAuth
20
  import com.workos.organizationdomains.OrganizationDomains
21
  import com.workos.organizationmembership.OrganizationMembershipService
22
  import com.workos.organizations.Organizations
 
23
  import com.workos.pipes.Pipes
24
  import com.workos.pipesprovider.PipesProvider
25
  import com.workos.radar.Radar
@@ -281,4 +282,13 @@ open class WorkOS
281
  ) {
282
  Agents(this)
283
  }
 
 
 
 
 
 
 
 
 
284
  }
 
20
  import com.workos.organizationdomains.OrganizationDomains
21
  import com.workos.organizationmembership.OrganizationMembershipService
22
  import com.workos.organizations.Organizations
23
+ import com.workos.organizationsitcontacts.OrganizationsItContacts
24
  import com.workos.pipes.Pipes
25
  import com.workos.pipesprovider.PipesProvider
26
  import com.workos.radar.Radar
 
282
  ) {
283
  Agents(this)
284
  }
285
+
286
+ /** Lazily-constructed [OrganizationsItContacts] accessor for this [WorkOS] client. */
287
+ val organizationsItContacts: OrganizationsItContacts
288
+ get() =
289
+ service(
290
+ OrganizationsItContacts::class
291
+ ) {
292
+ OrganizationsItContacts(this)
293
+ }
294
  }
kotlin/src/main/kotlin/com/workos/authorization/Authorization.kt
kotlin/src/main/kotlin/com/workos/authorization/Authorization.kt CHANGED
@@ -768,7 +768,7 @@ class Authorization(
768
  /**
769
  * List effective permissions for an organization membership on a resource
770
  *
771
- * Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
772
  *
773
  * @param organizationMembershipId The ID of the organization membership.
774
  * @param resourceId The ID of the authorization resource.
@@ -831,7 +831,7 @@ class Authorization(
831
  /**
832
  * List effective permissions for an organization membership on a resource by external ID
833
  *
834
- * 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.
835
  *
836
  * @param organizationMembershipId The ID of the organization membership.
837
  * @param resourceTypeSlug The slug of the resource type.
 
768
  /**
769
  * List effective permissions for an organization membership on a resource
770
  *
771
+ * Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
772
  *
773
  * @param organizationMembershipId The ID of the organization membership.
774
  * @param resourceId The ID of the authorization resource.
 
831
  /**
832
  * List effective permissions for an organization membership on a resource by external ID
833
  *
834
+ * 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
835
  *
836
  * @param organizationMembershipId The ID of the organization membership.
837
  * @param resourceTypeSlug The slug of the resource type.
kotlin/src/main/kotlin/com/workos/models/CreateItContact.kt
kotlin/src/main/kotlin/com/workos/models/CreateItContact.kt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.models
4
+
5
+ import com.fasterxml.jackson.annotation.JsonProperty
6
+
7
+ /** CreateItContact model. */
8
+ data class CreateItContact(
9
+ /** The email address of the IT contact. */
10
+ @JsonProperty("email")
11
+ val email: String
12
+ )
kotlin/src/main/kotlin/com/workos/models/CreatePasswordResetToken.kt
kotlin/src/main/kotlin/com/workos/models/CreatePasswordResetToken.kt CHANGED
@@ -2,11 +2,5 @@
2
 
3
  package com.workos.models
4
 
5
- import com.fasterxml.jackson.annotation.JsonProperty
6
-
7
- /** CreatePasswordResetToken model. */
8
- data class CreatePasswordResetToken(
9
- /** The email address of the user requesting a password reset. */
10
- @JsonProperty("email")
11
- val email: String
12
- )
 
2
 
3
  package com.workos.models
4
 
5
+ /** Alias for [CreateItContact]. */
 
6
+ typealias CreatePasswordResetToken = CreateItContact
 
 
 
 
 
kotlin/src/main/kotlin/com/workos/models/InviteItContact.kt
kotlin/src/main/kotlin/com/workos/models/InviteItContact.kt ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.models
4
+
5
+ import com.fasterxml.jackson.annotation.JsonProperty
6
+ import com.workos.types.InviteItContactIntents
7
+
8
+ /** InviteItContact model. */
9
+ data class InviteItContact(
10
+ /** The Admin Portal features that the IT contact can configure. */
11
+ @JsonProperty("intents")
12
+ val intents: List<InviteItContactIntents>
13
+ )
kotlin/src/main/kotlin/com/workos/models/ItContact.kt
kotlin/src/main/kotlin/com/workos/models/ItContact.kt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.models
4
+
5
+ import com.fasterxml.jackson.annotation.JsonProperty
6
+ import java.time.OffsetDateTime
7
+
8
+ /** ItContact model. */
9
+ data class ItContact(
10
+ /** The unique ID of the IT Contact. */
11
+ @JsonProperty("id")
12
+ val id: String,
13
+
14
+ /** The email address of the IT Contact. */
15
+ @JsonProperty("email")
16
+ val email: String,
17
+
18
+ /** An ISO 8601 timestamp. */
19
+ @JsonProperty("created_at")
20
+ val createdAt: OffsetDateTime,
21
+
22
+ /** An ISO 8601 timestamp. */
23
+ @JsonProperty("updated_at")
24
+ val updatedAt: OffsetDateTime,
25
+
26
+ /** The IT Contact object. */
27
+ @JsonProperty("object")
28
+ val objectType: String = "it_contact"
29
+ )
kotlin/src/main/kotlin/com/workos/models/ItContactList.kt
kotlin/src/main/kotlin/com/workos/models/ItContactList.kt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.models
4
+
5
+ import com.fasterxml.jackson.annotation.JsonProperty
6
+
7
+ /** ItContactList model. */
8
+ data class ItContactList(
9
+ /** The list of records for the current page. */
10
+ @JsonProperty("data")
11
+ val data: List<ItContact>,
12
+
13
+ /** Pagination cursors for navigating between pages of results. */
14
+ @JsonProperty("list_metadata")
15
+ val listMetadata: ItContactListListMetadata,
16
+
17
+ /** Indicates this is a list response. */
18
+ @JsonProperty("object")
19
+ val objectType: String = "list"
20
+ )
kotlin/src/main/kotlin/com/workos/models/ItContactListListMetadata.kt
kotlin/src/main/kotlin/com/workos/models/ItContactListListMetadata.kt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.models
4
+
5
+ import com.fasterxml.jackson.annotation.JsonProperty
6
+
7
+ /** Pagination cursors for navigating between pages of results. */
8
+ data class ItContactListListMetadata(
9
+ /** An object ID that defines your place in the list. When the ID is not present, you are at the start of the list. */
10
+ @JsonProperty("before")
11
+ val before: String?,
12
+
13
+ /** An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. */
14
+ @JsonProperty("after")
15
+ val after: String?
16
+ )
kotlin/src/main/kotlin/com/workos/models/OrganizationInput.kt
kotlin/src/main/kotlin/com/workos/models/OrganizationInput.kt CHANGED
@@ -16,6 +16,7 @@ data class OrganizationInput(
16
 
17
  /** The domains associated with the organization. Deprecated in favor of `domain_data`. */
18
  @JsonProperty("domains")
 
19
  val domains: List<String>? = null,
20
 
21
  /** The domains associated with the organization, including verification state. */
 
16
 
17
  /** The domains associated with the organization. Deprecated in favor of `domain_data`. */
18
  @JsonProperty("domains")
19
+ @Deprecated("The domains associated with the organization. Deprecated in favor of `domain_data`.")
20
  val domains: List<String>? = null,
21
 
22
  /** The domains associated with the organization, including verification state. */
kotlin/src/main/kotlin/com/workos/models/WaitlistUser.kt
kotlin/src/main/kotlin/com/workos/models/WaitlistUser.kt CHANGED
@@ -8,19 +8,19 @@ import java.time.OffsetDateTime
8
 
9
  /** WaitlistUser model. */
10
  data class WaitlistUser(
11
- /** The unique ID of the Waitlist User. */
12
  @JsonProperty("id")
13
  val id: String,
14
 
15
- /** The email address of the Waitlist User. */
16
  @JsonProperty("email")
17
  val email: String,
18
 
19
- /** The state of the Waitlist User. */
20
  @JsonProperty("state")
21
  val state: WaitlistUserState,
22
 
23
- /** The timestamp when the Waitlist User was approved, or null if not yet approved. */
24
  @JsonProperty("approved_at")
25
  val approvedAt: OffsetDateTime?,
26
 
@@ -32,11 +32,15 @@ data class WaitlistUser(
32
  @JsonProperty("updated_at")
33
  val updatedAt: OffsetDateTime,
34
 
35
- /** Distinguishes the Waitlist User object. */
36
- @JsonProperty("object")
37
- val objectType: String = "waitlist_user",
38
 
39
- /** The unique ID of the Waitlist that the Waitlist User joined. */
40
  @JsonProperty("waitlist_id")
41
- val waitlistId: String? = null
 
 
 
 
42
  )
 
8
 
9
  /** WaitlistUser model. */
10
  data class WaitlistUser(
11
+ /** The unique ID of the waitlist entry. */
12
  @JsonProperty("id")
13
  val id: String,
14
 
15
+ /** The email address of the user on the waitlist. */
16
  @JsonProperty("email")
17
  val email: String,
18
 
19
+ /** The state of the waitlist entry. */
20
  @JsonProperty("state")
21
  val state: WaitlistUserState,
22
 
23
+ /** The timestamp when the entry was approved, or null if not yet approved. */
24
  @JsonProperty("approved_at")
25
  val approvedAt: OffsetDateTime?,
26
 
 
32
  @JsonProperty("updated_at")
33
  val updatedAt: OffsetDateTime,
34
 
35
+ /** Additional fields submitted when the user joined the waitlist. Values are user-provided — treat them as untrusted input when rendering or exporting. */
36
+ @JsonProperty("additional_fields")
37
+ val additionalFields: Map<String, String>? = null,
38
 
39
+ /** The unique ID of the waitlist the entry belongs to. */
40
  @JsonProperty("waitlist_id")
41
+ val waitlistId: String? = null,
42
+
43
+ /** Distinguishes the Waitlist User object. */
44
+ @JsonProperty("object")
45
+ val objectType: String = "waitlist_user"
46
  )
kotlin/src/main/kotlin/com/workos/organizations/Organizations.kt
kotlin/src/main/kotlin/com/workos/organizations/Organizations.kt CHANGED
@@ -97,7 +97,7 @@ class Organizations(
97
  *
98
  * @param name The name of the organization.
99
  * @param allowProfilesOutsideOrganization Whether the organization allows profiles from outside the organization to sign in.
100
- * @param domains The domains associated with the organization. Deprecated in favor of `domain_data`.
101
  * @param domainData The domains associated with the organization, including verification state.
102
  * @param metadata Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
103
  * @param externalId An external identifier for the Organization.
 
97
  *
98
  * @param name The name of the organization.
99
  * @param allowProfilesOutsideOrganization Whether the organization allows profiles from outside the organization to sign in.
100
+ * @param domains **Deprecated.** The domains associated with the organization. Deprecated in favor of `domain_data`.
101
  * @param domainData The domains associated with the organization, including verification state.
102
  * @param metadata Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
103
  * @param externalId An external identifier for the Organization.
kotlin/src/main/kotlin/com/workos/organizationsitcontacts/OrganizationsItContacts.kt
kotlin/src/main/kotlin/com/workos/organizationsitcontacts/OrganizationsItContacts.kt ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.organizationsitcontacts
4
+
5
+ import com.workos.WorkOS
6
+ import com.workos.common.http.RequestConfig
7
+ import com.workos.common.http.RequestOptions
8
+ import com.workos.common.http.bodyOf
9
+ import com.workos.common.http.encodePathSegment
10
+ import com.workos.models.ItContact
11
+ import com.workos.models.ItContactList
12
+ import com.workos.types.InviteItContactIntents
13
+ import kotlinx.coroutines.Dispatchers
14
+ import kotlinx.coroutines.withContext
15
+
16
+ /**
17
+ * API accessor for OrganizationsItContacts.
18
+ *
19
+ * Every operation on this class is available in two flavors: a blocking variant (`<methodName>`) and a coroutine-aware variant (`<methodName>Suspend`). The `Suspend` variants delegate to the blocking ones under `withContext(Dispatchers.IO)`, so they are safe to call from any coroutine dispatcher (including `Dispatchers.Main`).
20
+ */
21
+ class OrganizationsItContacts(
22
+ internal val workos: WorkOS
23
+ ) {
24
+ /**
25
+ * List IT contacts
26
+ *
27
+ * Get the IT contacts for an organization.
28
+ *
29
+ * @param organizationId The ID of the organization.
30
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
31
+ *
32
+ * @return the ItContactList
33
+ */
34
+ @JvmOverloads
35
+ fun list(
36
+ organizationId: String,
37
+ requestOptions: RequestOptions? = null
38
+ ): ItContactList {
39
+ val config =
40
+ RequestConfig(
41
+ method = "GET",
42
+ path = "/organizations/${encodePathSegment(organizationId)}/it_contacts",
43
+ requestOptions = requestOptions
44
+ )
45
+ return workos.baseClient.request(config, ItContactList::class.java)
46
+ }
47
+
48
+ /**
49
+ * Coroutine-aware variant of [list]. Use this from
50
+ * a `suspend` function or coroutine scope.
51
+ *
52
+ * Delegates to the blocking [list] under
53
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
54
+ * coroutine dispatcher (including `Dispatchers.Main`).
55
+ */
56
+ @JvmName("listSuspend")
57
+ suspend fun listSuspend(
58
+ organizationId: String,
59
+ requestOptions: RequestOptions? = null
60
+ ): ItContactList =
61
+ withContext(Dispatchers.IO) {
62
+ list(organizationId, requestOptions)
63
+ }
64
+
65
+ /**
66
+ * Create an IT contact
67
+ *
68
+ * Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
69
+ *
70
+ * @param organizationId The ID of the organization.
71
+ * @param email The email address of the IT contact.
72
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
73
+ *
74
+ * @return the ItContact
75
+ */
76
+ @JvmOverloads
77
+ fun create(
78
+ organizationId: String,
79
+ email: String,
80
+ requestOptions: RequestOptions? = null
81
+ ): ItContact {
82
+ val body =
83
+ bodyOf(
84
+ "email" to email
85
+ )
86
+ val config =
87
+ RequestConfig(
88
+ method = "POST",
89
+ path = "/organizations/${encodePathSegment(organizationId)}/it_contacts",
90
+ body = body,
91
+ requestOptions = requestOptions
92
+ )
93
+ return workos.baseClient.request(config, ItContact::class.java)
94
+ }
95
+
96
+ /**
97
+ * Coroutine-aware variant of [create]. Use this from
98
+ * a `suspend` function or coroutine scope.
99
+ *
100
+ * Delegates to the blocking [create] under
101
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
102
+ * coroutine dispatcher (including `Dispatchers.Main`).
103
+ */
104
+ @JvmName("createSuspend")
105
+ suspend fun createSuspend(
106
+ organizationId: String,
107
+ email: String,
108
+ requestOptions: RequestOptions? = null
109
+ ): ItContact =
110
+ withContext(Dispatchers.IO) {
111
+ create(organizationId, email, requestOptions)
112
+ }
113
+
114
+ /**
115
+ * Delete an IT contact
116
+ *
117
+ * Remove an IT contact from an organization and revoke the contact's active setup links.
118
+ *
119
+ * @param organizationId The ID of the organization.
120
+ * @param contactId The ID of the IT contact.
121
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
122
+ */
123
+ @JvmOverloads
124
+ fun delete(
125
+ organizationId: String,
126
+ contactId: String,
127
+ requestOptions: RequestOptions? = null
128
+ ) {
129
+ val config =
130
+ RequestConfig(
131
+ method = "DELETE",
132
+ path = "/organizations/${encodePathSegment(organizationId)}/it_contacts/${encodePathSegment(contactId)}",
133
+ requestOptions = requestOptions
134
+ )
135
+ workos.baseClient.requestVoid(config)
136
+ }
137
+
138
+ /**
139
+ * Coroutine-aware variant of [delete]. Use this from
140
+ * a `suspend` function or coroutine scope.
141
+ *
142
+ * Delegates to the blocking [delete] under
143
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
144
+ * coroutine dispatcher (including `Dispatchers.Main`).
145
+ */
146
+ @JvmName("deleteSuspend")
147
+ suspend fun deleteSuspend(
148
+ organizationId: String,
149
+ contactId: String,
150
+ requestOptions: RequestOptions? = null
151
+ ) = withContext(Dispatchers.IO) {
152
+ delete(organizationId, contactId, requestOptions)
153
+ }
154
+
155
+ /**
156
+ * Invite an IT contact
157
+ *
158
+ * Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
159
+ *
160
+ * @param organizationId The ID of the organization.
161
+ * @param contactId The ID of the IT contact.
162
+ * @param intents The Admin Portal features that the IT contact can configure.
163
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
164
+ */
165
+ @JvmOverloads
166
+ fun createItContactInvite(
167
+ organizationId: String,
168
+ contactId: String,
169
+ intents: List<InviteItContactIntents>,
170
+ requestOptions: RequestOptions? = null
171
+ ) {
172
+ val body =
173
+ bodyOf(
174
+ "intents" to intents
175
+ )
176
+ val config =
177
+ RequestConfig(
178
+ method = "POST",
179
+ path = "/organizations/${encodePathSegment(organizationId)}/it_contacts/${encodePathSegment(contactId)}/invite",
180
+ body = body,
181
+ requestOptions = requestOptions
182
+ )
183
+ workos.baseClient.requestVoid(config)
184
+ }
185
+
186
+ /**
187
+ * Coroutine-aware variant of [createItContactInvite]. Use this from
188
+ * a `suspend` function or coroutine scope.
189
+ *
190
+ * Delegates to the blocking [createItContactInvite] under
191
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
192
+ * coroutine dispatcher (including `Dispatchers.Main`).
193
+ */
194
+ @JvmName("createItContactInviteSuspend")
195
+ suspend fun createItContactInviteSuspend(
196
+ organizationId: String,
197
+ contactId: String,
198
+ intents: List<InviteItContactIntents>,
199
+ requestOptions: RequestOptions? = null
200
+ ) = withContext(Dispatchers.IO) {
201
+ createItContactInvite(organizationId, contactId, intents, requestOptions)
202
+ }
203
+
204
+ /**
205
+ * Revoke an IT contact's invitation
206
+ *
207
+ * Revoke the organization's active Admin Portal invitation.
208
+ *
209
+ * @param organizationId The ID of the organization.
210
+ * @param contactId The ID of the IT contact.
211
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
212
+ */
213
+ @JvmOverloads
214
+ fun revokeItContact(
215
+ organizationId: String,
216
+ contactId: String,
217
+ requestOptions: RequestOptions? = null
218
+ ) {
219
+ val body = linkedMapOf<String, Any?>()
220
+ val config =
221
+ RequestConfig(
222
+ method = "POST",
223
+ path = "/organizations/${encodePathSegment(organizationId)}/it_contacts/${encodePathSegment(contactId)}/revoke",
224
+ body = body,
225
+ requestOptions = requestOptions
226
+ )
227
+ workos.baseClient.requestVoid(config)
228
+ }
229
+
230
+ /**
231
+ * Coroutine-aware variant of [revokeItContact]. Use this from
232
+ * a `suspend` function or coroutine scope.
233
+ *
234
+ * Delegates to the blocking [revokeItContact] under
235
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
236
+ * coroutine dispatcher (including `Dispatchers.Main`).
237
+ */
238
+ @JvmName("revokeItContactSuspend")
239
+ suspend fun revokeItContactSuspend(
240
+ organizationId: String,
241
+ contactId: String,
242
+ requestOptions: RequestOptions? = null
243
+ ) = withContext(Dispatchers.IO) {
244
+ revokeItContact(organizationId, contactId, requestOptions)
245
+ }
246
+ }
kotlin/src/main/kotlin/com/workos/types/InviteItContactIntents.kt
kotlin/src/main/kotlin/com/workos/types/InviteItContactIntents.kt ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
6
+ import com.fasterxml.jackson.annotation.JsonValue
7
+
8
+ /** Enumeration of valid InviteItContactIntents values returned or accepted by the API. */
9
+ enum class InviteItContactIntents(
10
+ /** The wire value sent to and received from the API. */
11
+ @JsonValue val value: String
12
+ ) {
13
+ @JsonEnumDefaultValue
14
+ Unknown("unknown"),
15
+ SSO("sso"),
16
+ DirectorySync("directory_sync"),
17
+ LogStreams("log_streams"),
18
+ DomainVerification("domain_verification"),
19
+ BringYourOwnKey("bring_your_own_key")
20
+ }
kotlin/src/test/kotlin/com/workos/models/GeneratedForwardCompatTest.kt
kotlin/src/test/kotlin/com/workos/models/GeneratedForwardCompatTest.kt CHANGED
@@ -8,16 +8,16 @@ import com.workos.types.ConnectedAccountInputState
8
  import com.workos.types.CreateDataIntegrationAuthMethods
9
  import com.workos.types.CreateUserInviteOptionsLocale
10
  import com.workos.types.CreateUserPasswordHashType
11
- import com.workos.types.CreateWebhookEndpointEvents
12
  import com.workos.types.CustomProviderDefinitionAuthenticateVia
13
  import com.workos.types.DataIntegrationCredentialsInputType
14
  import com.workos.types.GenerateLinkIntent
 
15
  import com.workos.types.OrganizationDomainDataState
16
  import com.workos.types.PaginationOrder
17
  import com.workos.types.ResendUserInviteOptionsLocale
18
  import com.workos.types.UpdateCustomProviderDefinitionAuthenticateVia
19
  import com.workos.types.UpdateUserPasswordHashType
20
- import com.workos.types.UpdateWebhookEndpointStatus
21
  import com.workos.types.VaultByokKeyProvider
22
  import org.junit.jupiter.api.Assertions.assertEquals
23
  import org.junit.jupiter.api.Assertions.assertNotNull
@@ -40,6 +40,13 @@ class GeneratedForwardCompatTest {
40
  assertEquals(VaultByokKeyProvider.Unknown, parsed)
41
  }
42
 
 
 
 
 
 
 
 
43
  @Test
44
  fun `unknown OrganizationDomainDataState wire values deserialize to Unknown`() {
45
  // Simulates a future server release that introduces a new enum variant.
@@ -111,24 +118,17 @@ class GeneratedForwardCompatTest {
111
  }
112
 
113
  @Test
114
- fun `unknown UpdateUserPasswordHashType wire values deserialize to Unknown`() {
115
- // Simulates a future server release that introduces a new enum variant.
116
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", UpdateUserPasswordHashType::class.java)
117
- assertEquals(UpdateUserPasswordHashType.Unknown, parsed)
118
- }
119
-
120
- @Test
121
- fun `unknown CreateWebhookEndpointEvents wire values deserialize to Unknown`() {
122
  // Simulates a future server release that introduces a new enum variant.
123
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateWebhookEndpointEvents::class.java)
124
- assertEquals(CreateWebhookEndpointEvents.Unknown, parsed)
125
  }
126
 
127
  @Test
128
- fun `unknown UpdateWebhookEndpointStatus wire values deserialize to Unknown`() {
129
  // Simulates a future server release that introduces a new enum variant.
130
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", UpdateWebhookEndpointStatus::class.java)
131
- assertEquals(UpdateWebhookEndpointStatus.Unknown, parsed)
132
  }
133
 
134
  @Test
 
8
  import com.workos.types.CreateDataIntegrationAuthMethods
9
  import com.workos.types.CreateUserInviteOptionsLocale
10
  import com.workos.types.CreateUserPasswordHashType
11
+ import com.workos.types.CreateUserPasswordSaltPosition
12
  import com.workos.types.CustomProviderDefinitionAuthenticateVia
13
  import com.workos.types.DataIntegrationCredentialsInputType
14
  import com.workos.types.GenerateLinkIntent
15
+ import com.workos.types.InviteItContactIntents
16
  import com.workos.types.OrganizationDomainDataState
17
  import com.workos.types.PaginationOrder
18
  import com.workos.types.ResendUserInviteOptionsLocale
19
  import com.workos.types.UpdateCustomProviderDefinitionAuthenticateVia
20
  import com.workos.types.UpdateUserPasswordHashType
 
21
  import com.workos.types.VaultByokKeyProvider
22
  import org.junit.jupiter.api.Assertions.assertEquals
23
  import org.junit.jupiter.api.Assertions.assertNotNull
 
40
  assertEquals(VaultByokKeyProvider.Unknown, parsed)
41
  }
42
 
43
+ @Test
44
+ fun `unknown InviteItContactIntents wire values deserialize to Unknown`() {
45
+ // Simulates a future server release that introduces a new enum variant.
46
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", InviteItContactIntents::class.java)
47
+ assertEquals(InviteItContactIntents.Unknown, parsed)
48
+ }
49
+
50
  @Test
51
  fun `unknown OrganizationDomainDataState wire values deserialize to Unknown`() {
52
  // Simulates a future server release that introduces a new enum variant.
 
118
  }
119
 
120
  @Test
121
+ fun `unknown CreateUserPasswordSaltPosition wire values deserialize to Unknown`() {
 
 
 
 
 
 
 
122
  // Simulates a future server release that introduces a new enum variant.
123
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateUserPasswordSaltPosition::class.java)
124
+ assertEquals(CreateUserPasswordSaltPosition.Unknown, parsed)
125
  }
126
 
127
  @Test
128
+ fun `unknown UpdateUserPasswordHashType wire values deserialize to Unknown`() {
129
  // Simulates a future server release that introduces a new enum variant.
130
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", UpdateUserPasswordHashType::class.java)
131
+ assertEquals(UpdateUserPasswordHashType.Unknown, parsed)
132
  }
133
 
134
  @Test
kotlin/src/test/kotlin/com/workos/models/GeneratedModelRoundTripTest.kt
kotlin/src/test/kotlin/com/workos/models/GeneratedModelRoundTripTest.kt CHANGED
@@ -99,6 +99,16 @@ class GeneratedModelRoundTripTest {
99
  assertEquals(tree1, tree2)
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
102
  @Test
103
  fun `CreateRedirectUri round-trips through Jackson`() {
104
  val json = "{\"uri\": \"sample\"}"
@@ -1061,6 +1071,18 @@ class GeneratedModelRoundTripTest {
1061
  assertEquals(tree1, tree2)
1062
  }
1063
 
 
 
 
 
 
 
 
 
 
 
 
 
1064
  @Test
1065
  fun `DataIntegrationAuthorizeUrlResponse round-trips through Jackson`() {
1066
  val json = "{\"url\": \"sample\"}"
 
99
  assertEquals(tree1, tree2)
100
  }
101
 
102
+ @Test
103
+ fun `CreateItContact round-trips through Jackson`() {
104
+ val json = "{\"email\": \"sample\"}"
105
+ val parsed = mapper.readValue(json, CreateItContact::class.java)
106
+ val reserialized = mapper.writeValueAsString(parsed)
107
+ val tree1 = mapper.readTree(json)
108
+ val tree2 = mapper.readTree(reserialized)
109
+ assertEquals(tree1, tree2)
110
+ }
111
+
112
  @Test
113
  fun `CreateRedirectUri round-trips through Jackson`() {
114
  val json = "{\"uri\": \"sample\"}"
 
1071
  assertEquals(tree1, tree2)
1072
  }
1073
 
1074
+ @Test
1075
+ fun `ItContact round-trips through Jackson`() {
1076
+ val json =
1077
+ "{\"object\": \"it_contact\", \"id\": \"sample\", \"email\": \"sample\", \"created_at\": \"2024-01-01T00:00:00Z\", " +
1078
+ "\"updated_at\": \"2024-01-01T00:00:00Z\"}"
1079
+ val parsed = mapper.readValue(json, ItContact::class.java)
1080
+ val reserialized = mapper.writeValueAsString(parsed)
1081
+ val tree1 = mapper.readTree(json)
1082
+ val tree2 = mapper.readTree(reserialized)
1083
+ assertEquals(tree1, tree2)
1084
+ }
1085
+
1086
  @Test
1087
  fun `DataIntegrationAuthorizeUrlResponse round-trips through Jackson`() {
1088
  val json = "{\"url\": \"sample\"}"
kotlin/src/test/kotlin/com/workos/organizationsitcontacts/OrganizationsItContactsTest.kt
kotlin/src/test/kotlin/com/workos/organizationsitcontacts/OrganizationsItContactsTest.kt ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.organizationsitcontacts
4
+
5
+ import com.github.tomakehurst.wiremock.client.WireMock.matchingJsonPath
6
+ import com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor
7
+ import com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching
8
+ import com.workos.common.exceptions.GenericServerException
9
+ import com.workos.common.exceptions.NotFoundException
10
+ import com.workos.common.exceptions.RateLimitException
11
+ import com.workos.common.exceptions.UnauthorizedException
12
+ import com.workos.test.TestBase
13
+ import com.workos.types.InviteItContactIntents
14
+ import org.junit.jupiter.api.Assertions.assertEquals
15
+ import org.junit.jupiter.api.Assertions.assertNotNull
16
+ import org.junit.jupiter.api.Assertions.assertThrows
17
+ import org.junit.jupiter.api.Test
18
+
19
+ class OrganizationsItContactsTest : TestBase() {
20
+ private fun api() = OrganizationsItContacts(createWorkOSClient())
21
+
22
+ @Test
23
+ fun `list returns a typed response`() {
24
+ stubResponse(
25
+ "GET",
26
+ "/organizations/sample-arg/it_contacts",
27
+ 200,
28
+ "{\"object\": \"list\", \"data\": [], \"list_metadata\": {\"before\": null, \"after\": null}}"
29
+ )
30
+ val result = api().list("sample-arg")
31
+ assertNotNull(result)
32
+ assertEquals("list", result.objectType)
33
+ }
34
+
35
+ @Test
36
+ fun `create returns a typed response`() {
37
+ stubResponse(
38
+ "POST",
39
+ "/organizations/sample-arg/it_contacts",
40
+ 200,
41
+ "{\"object\": \"it_contact\", \"id\": \"sample\", \"email\": \"sample\", \"created_at\": \"2024-01-01T00:00:00Z\", " +
42
+ "\"updated_at\": \"2024-01-01T00:00:00Z\"}"
43
+ )
44
+ val result = api().create("sample-arg", "sample-arg")
45
+ assertNotNull(result)
46
+ assertEquals("it_contact", result.objectType)
47
+ assertEquals("sample", result.id)
48
+ assertEquals("sample", result.email)
49
+ wireMockRule.verify(
50
+ postRequestedFor(urlPathMatching("/organizations/sample-arg/it_contacts"))
51
+ .withRequestBody(matchingJsonPath("\$.email"))
52
+ )
53
+ }
54
+
55
+ @Test
56
+ fun `delete completes without throwing`() {
57
+ stubResponse("DELETE", "/organizations/sample-arg/it_contacts/sample-arg", 204)
58
+ api().delete("sample-arg", "sample-arg")
59
+ }
60
+
61
+ @Test
62
+ fun `createItContactInvite completes without throwing`() {
63
+ stubResponse("POST", "/organizations/sample-arg/it_contacts/sample-arg/invite", 200)
64
+ api().createItContactInvite("sample-arg", "sample-arg", emptyList<InviteItContactIntents>())
65
+ }
66
+
67
+ @Test
68
+ fun `revokeItContact completes without throwing`() {
69
+ stubResponse("POST", "/organizations/sample-arg/it_contacts/sample-arg/revoke", 200)
70
+ api().revokeItContact("sample-arg", "sample-arg")
71
+ }
72
+
73
+ @Test
74
+ fun `list translates 401 to UnauthorizedException`() {
75
+ stubResponse("GET", "/organizations/sample-arg/it_contacts", 401)
76
+ assertThrows(UnauthorizedException::class.java) {
77
+ api().list("sample-arg")
78
+ }
79
+ }
80
+
81
+ @Test
82
+ fun `list translates 404 to NotFoundException`() {
83
+ stubResponse("GET", "/organizations/sample-arg/it_contacts", 404)
84
+ assertThrows(NotFoundException::class.java) {
85
+ api().list("sample-arg")
86
+ }
87
+ }
88
+
89
+ @Test
90
+ fun `list translates 429 to RateLimitException`() {
91
+ stubResponse("GET", "/organizations/sample-arg/it_contacts", 429)
92
+ assertThrows(RateLimitException::class.java) {
93
+ api().list("sample-arg")
94
+ }
95
+ }
96
+
97
+ @Test
98
+ fun `list translates 500 to GenericServerException`() {
99
+ stubResponse("GET", "/organizations/sample-arg/it_contacts", 500)
100
+ assertThrows(GenericServerException::class.java) {
101
+ api().list("sample-arg")
102
+ }
103
+ }
104
+ }

All files in this language are hidden by the current filters.

code: 13 · tests: 9 · manifest: 1

php/.oagen-manifest.json
php/.oagen-manifest.json CHANGED
@@ -200,12 +200,12 @@
200
  "lib/Resource/CreateAuthorizationResource.php",
201
  "lib/Resource/CreateCORSOrigin.php",
202
  "lib/Resource/CreateDataIntegration.php",
203
- "lib/Resource/CreateDataIntegrationAuthMethods.php",
204
  "lib/Resource/CreateDataKeyRequest.php",
205
  "lib/Resource/CreateDataKeyResponse.php",
206
  "lib/Resource/CreateGroup.php",
207
  "lib/Resource/CreateGroupMembership.php",
208
  "lib/Resource/CreateGroupRoleAssignment.php",
 
209
  "lib/Resource/CreateM2MApplication.php",
210
  "lib/Resource/CreateMagicCodeAndReturn.php",
211
  "lib/Resource/CreateOAuthApplication.php",
@@ -371,6 +371,11 @@
371
  "lib/Resource/InvitationResentData.php",
372
  "lib/Resource/InvitationRevoked.php",
373
  "lib/Resource/InvitationRevokedData.php",
 
 
 
 
 
374
  "lib/Resource/JWTTemplateResponse.php",
375
  "lib/Resource/JsonSerializableTrait.php",
376
  "lib/Resource/JwksResponse.php",
@@ -618,6 +623,7 @@
618
  "lib/Service/OrganizationDomains.php",
619
  "lib/Service/OrganizationMembershipService.php",
620
  "lib/Service/Organizations.php",
 
621
  "lib/Service/ParentByExternalId.php",
622
  "lib/Service/ParentById.php",
623
  "lib/Service/ParentResourceByExternalId.php",
@@ -818,6 +824,7 @@
818
  "tests/Fixtures/create_group.json",
819
  "tests/Fixtures/create_group_membership.json",
820
  "tests/Fixtures/create_group_role_assignment.json",
 
821
  "tests/Fixtures/create_m2m_application.json",
822
  "tests/Fixtures/create_magic_code_and_return.json",
823
  "tests/Fixtures/create_oauth_application.json",
@@ -963,6 +970,9 @@
963
  "tests/Fixtures/invitation_resent_data.json",
964
  "tests/Fixtures/invitation_revoked.json",
965
  "tests/Fixtures/invitation_revoked_data.json",
 
 
 
966
  "tests/Fixtures/jwks_response.json",
967
  "tests/Fixtures/jwks_response_keys.json",
968
  "tests/Fixtures/jwt_template_response.json",
@@ -1210,6 +1220,7 @@
1210
  "tests/Service/MultiFactorAuthTest.php",
1211
  "tests/Service/OrganizationDomainsTest.php",
1212
  "tests/Service/OrganizationMembershipTest.php",
 
1213
  "tests/Service/OrganizationsTest.php",
1214
  "tests/Service/PipesProviderTest.php",
1215
  "tests/Service/PipesTest.php",
@@ -1513,6 +1524,10 @@
1513
  "sdkMethod": "authorizeDataIntegration",
1514
  "service": "pipes"
1515
  },
 
 
 
 
1516
  "POST /data-integrations/{slug}/credentials": {
1517
  "sdkMethod": "createDataIntegrationCredential",
1518
  "service": "pipes"
@@ -1685,6 +1700,26 @@
1685
  "sdkMethod": "listAuthorizedApplications",
1686
  "service": "organizations"
1687
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1688
  "POST /portal/generate_link": {
1689
  "sdkMethod": "generateLink",
1690
  "service": "adminPortal"
@@ -2064,10 +2099,6 @@
2064
  "GET /audit_logs/exports/{auditLogExportId}": {
2065
  "sdkMethod": "getExport",
2066
  "service": "auditLogs"
2067
- },
2068
- "PUT /data-integrations/{slug}/client-credentials": {
2069
- "sdkMethod": "updateDataIntegrationClientCredentials",
2070
- "service": "pipes"
2071
  }
2072
  }
2073
  }
 
200
  "lib/Resource/CreateAuthorizationResource.php",
201
  "lib/Resource/CreateCORSOrigin.php",
202
  "lib/Resource/CreateDataIntegration.php",
 
203
  "lib/Resource/CreateDataKeyRequest.php",
204
  "lib/Resource/CreateDataKeyResponse.php",
205
  "lib/Resource/CreateGroup.php",
206
  "lib/Resource/CreateGroupMembership.php",
207
  "lib/Resource/CreateGroupRoleAssignment.php",
208
+ "lib/Resource/CreateItContact.php",
209
  "lib/Resource/CreateM2MApplication.php",
210
  "lib/Resource/CreateMagicCodeAndReturn.php",
211
  "lib/Resource/CreateOAuthApplication.php",
 
371
  "lib/Resource/InvitationResentData.php",
372
  "lib/Resource/InvitationRevoked.php",
373
  "lib/Resource/InvitationRevokedData.php",
374
+ "lib/Resource/InviteItContact.php",
375
+ "lib/Resource/InviteItContactIntents.php",
376
+ "lib/Resource/ItContact.php",
377
+ "lib/Resource/ItContactList.php",
378
+ "lib/Resource/ItContactListListMetadata.php",
379
  "lib/Resource/JWTTemplateResponse.php",
380
  "lib/Resource/JsonSerializableTrait.php",
381
  "lib/Resource/JwksResponse.php",
 
623
  "lib/Service/OrganizationDomains.php",
624
  "lib/Service/OrganizationMembershipService.php",
625
  "lib/Service/Organizations.php",
626
+ "lib/Service/OrganizationsItContacts.php",
627
  "lib/Service/ParentByExternalId.php",
628
  "lib/Service/ParentById.php",
629
  "lib/Service/ParentResourceByExternalId.php",
 
824
  "tests/Fixtures/create_group.json",
825
  "tests/Fixtures/create_group_membership.json",
826
  "tests/Fixtures/create_group_role_assignment.json",
827
+ "tests/Fixtures/create_it_contact.json",
828
  "tests/Fixtures/create_m2m_application.json",
829
  "tests/Fixtures/create_magic_code_and_return.json",
830
  "tests/Fixtures/create_oauth_application.json",
 
970
  "tests/Fixtures/invitation_resent_data.json",
971
  "tests/Fixtures/invitation_revoked.json",
972
  "tests/Fixtures/invitation_revoked_data.json",
973
+ "tests/Fixtures/invite_it_contact.json",
974
+ "tests/Fixtures/it_contact.json",
975
+ "tests/Fixtures/it_contact_list_list_metadata.json",
976
  "tests/Fixtures/jwks_response.json",
977
  "tests/Fixtures/jwks_response_keys.json",
978
  "tests/Fixtures/jwt_template_response.json",
 
1220
  "tests/Service/MultiFactorAuthTest.php",
1221
  "tests/Service/OrganizationDomainsTest.php",
1222
  "tests/Service/OrganizationMembershipTest.php",
1223
+ "tests/Service/OrganizationsItContactsTest.php",
1224
  "tests/Service/OrganizationsTest.php",
1225
  "tests/Service/PipesProviderTest.php",
1226
  "tests/Service/PipesTest.php",
 
1524
  "sdkMethod": "authorizeDataIntegration",
1525
  "service": "pipes"
1526
  },
1527
+ "PUT /data-integrations/{slug}/client-credentials": {
1528
+ "sdkMethod": "updateDataIntegrationClientCredentials",
1529
+ "service": "pipes"
1530
+ },
1531
  "POST /data-integrations/{slug}/credentials": {
1532
  "sdkMethod": "createDataIntegrationCredential",
1533
  "service": "pipes"
 
1700
  "sdkMethod": "listAuthorizedApplications",
1701
  "service": "organizations"
1702
  },
1703
+ "GET /organizations/{organization_id}/it_contacts": {
1704
+ "sdkMethod": "listOrganizationItContacts",
1705
+ "service": "organizationsItContacts"
1706
+ },
1707
+ "POST /organizations/{organization_id}/it_contacts": {
1708
+ "sdkMethod": "createOrganizationItContact",
1709
+ "service": "organizationsItContacts"
1710
+ },
1711
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1712
+ "sdkMethod": "deleteOrganizationItContact",
1713
+ "service": "organizationsItContacts"
1714
+ },
1715
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1716
+ "sdkMethod": "createItContactInvite",
1717
+ "service": "organizationsItContacts"
1718
+ },
1719
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1720
+ "sdkMethod": "revokeItContact",
1721
+ "service": "organizationsItContacts"
1722
+ },
1723
  "POST /portal/generate_link": {
1724
  "sdkMethod": "generateLink",
1725
  "service": "adminPortal"
 
2099
  "GET /audit_logs/exports/{auditLogExportId}": {
2100
  "sdkMethod": "getExport",
2101
  "service": "auditLogs"
 
 
 
 
2102
  }
2103
  }
2104
  }
php/lib/Resource/CreateDataIntegrationAuthMethods.php
php/lib/Resource/CreateDataIntegrationAuthMethods.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- // This file is auto-generated by oagen. Do not edit.
6
-
7
- namespace WorkOS\Resource;
8
-
9
- enum CreateDataIntegrationAuthMethods: string
10
- {
11
- case OAuth = 'oauth';
12
- case ApiKey = 'api_key';
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
php/lib/Resource/CreateItContact.php
php/lib/Resource/CreateItContact.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Resource;
8
+
9
+ readonly class CreateItContact implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /** The email address of the IT contact. */
15
+ public string $email,
16
+ ) {
17
+ }
18
+
19
+ public static function fromArray(array $data): self
20
+ {
21
+ return new self(
22
+ email: $data['email'],
23
+ );
24
+ }
25
+
26
+ public function toArray(): array
27
+ {
28
+ return [
29
+ 'email' => $this->email,
30
+ ];
31
+ }
32
+ }
php/lib/Resource/InviteItContact.php
php/lib/Resource/InviteItContact.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Resource;
8
+
9
+ readonly class InviteItContact implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /**
15
+ * The Admin Portal features that the IT contact can configure.
16
+ * @var array<\WorkOS\Resource\InviteItContactIntents>
17
+ */
18
+ public array $intents,
19
+ ) {
20
+ }
21
+
22
+ public static function fromArray(array $data): self
23
+ {
24
+ return new self(
25
+ intents: array_map(fn ($item) => InviteItContactIntents::from($item), $data['intents']),
26
+ );
27
+ }
28
+
29
+ public function toArray(): array
30
+ {
31
+ return [
32
+ 'intents' => array_map(fn ($item) => $item->value, $this->intents),
33
+ ];
34
+ }
35
+ }
php/lib/Resource/InviteItContactIntents.php
php/lib/Resource/InviteItContactIntents.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Resource;
8
+
9
+ enum InviteItContactIntents: string
10
+ {
11
+ case SSO = 'sso';
12
+ case DirectorySync = 'directory_sync';
13
+ case LogStreams = 'log_streams';
14
+ case DomainVerification = 'domain_verification';
15
+ case BringYourOwnKey = 'bring_your_own_key';
16
+ }
php/lib/Resource/ItContact.php
php/lib/Resource/ItContact.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Resource;
8
+
9
+ readonly class ItContact implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /** The IT Contact object. */
15
+ public string $object,
16
+ /** The unique ID of the IT Contact. */
17
+ public string $id,
18
+ /** The email address of the IT Contact. */
19
+ public string $email,
20
+ /** An ISO 8601 timestamp. */
21
+ public \DateTimeImmutable $createdAt,
22
+ /** An ISO 8601 timestamp. */
23
+ public \DateTimeImmutable $updatedAt,
24
+ ) {
25
+ }
26
+
27
+ public static function fromArray(array $data): self
28
+ {
29
+ return new self(
30
+ object: $data['object'] ?? 'it_contact',
31
+ id: $data['id'],
32
+ email: $data['email'],
33
+ createdAt: new \DateTimeImmutable($data['created_at']),
34
+ updatedAt: new \DateTimeImmutable($data['updated_at']),
35
+ );
36
+ }
37
+
38
+ public function toArray(): array
39
+ {
40
+ return [
41
+ 'object' => $this->object,
42
+ 'id' => $this->id,
43
+ 'email' => $this->email,
44
+ 'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED),
45
+ 'updated_at' => $this->updatedAt->format(\DateTimeInterface::RFC3339_EXTENDED),
46
+ ];
47
+ }
48
+ }
php/lib/Resource/ItContactList.php
php/lib/Resource/ItContactList.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Resource;
8
+
9
+ readonly class ItContactList implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /** Indicates this is a list response. */
15
+ public string $object,
16
+ /**
17
+ * The list of records for the current page.
18
+ * @var array<\WorkOS\Resource\ItContact>
19
+ */
20
+ public array $data,
21
+ /** Pagination cursors for navigating between pages of results. */
22
+ public ItContactListListMetadata $listMetadata,
23
+ ) {
24
+ }
25
+
26
+ public static function fromArray(array $data): self
27
+ {
28
+ return new self(
29
+ object: $data['object'] ?? 'list',
30
+ data: array_map(fn ($item) => ItContact::fromArray($item), $data['data']),
31
+ listMetadata: ItContactListListMetadata::fromArray($data['list_metadata']),
32
+ );
33
+ }
34
+
35
+ public function toArray(): array
36
+ {
37
+ return [
38
+ 'object' => $this->object,
39
+ 'data' => array_map(fn ($item) => $item->toArray(), $this->data),
40
+ 'list_metadata' => $this->listMetadata->toArray(),
41
+ ];
42
+ }
43
+ }
php/lib/Resource/ItContactListListMetadata.php
php/lib/Resource/ItContactListListMetadata.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Resource;
8
+
9
+ /** Pagination cursors for navigating between pages of results. */
10
+ readonly class ItContactListListMetadata implements \JsonSerializable
11
+ {
12
+ use JsonSerializableTrait;
13
+
14
+ public function __construct(
15
+ /** An object ID that defines your place in the list. When the ID is not present, you are at the start of the list. */
16
+ public ?string $before,
17
+ /** An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. */
18
+ public ?string $after,
19
+ ) {
20
+ }
21
+
22
+ public static function fromArray(array $data): self
23
+ {
24
+ return new self(
25
+ before: $data['before'] ?? null,
26
+ after: $data['after'] ?? null,
27
+ );
28
+ }
29
+
30
+ public function toArray(): array
31
+ {
32
+ return [
33
+ 'before' => $this->before,
34
+ 'after' => $this->after,
35
+ ];
36
+ }
37
+ }
php/lib/Resource/OrganizationInput.php
php/lib/Resource/OrganizationInput.php CHANGED
@@ -18,6 +18,7 @@ readonly class OrganizationInput implements \JsonSerializable
18
  /**
19
  * The domains associated with the organization. Deprecated in favor of `domain_data`.
20
  * @var array<string>|null
 
21
  */
22
  public ?array $domains = null,
23
  /**
 
18
  /**
19
  * The domains associated with the organization. Deprecated in favor of `domain_data`.
20
  * @var array<string>|null
21
+ * @deprecated
22
  */
23
  public ?array $domains = null,
24
  /**
php/lib/Resource/WaitlistUser.php
php/lib/Resource/WaitlistUser.php CHANGED
@@ -11,21 +11,26 @@ readonly class WaitlistUser implements \JsonSerializable
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
- /** Distinguishes the Waitlist User object. */
15
- public string $object,
16
- /** The unique ID of the Waitlist User. */
17
  public string $id,
18
- /** The email address of the Waitlist User. */
19
  public string $email,
20
- /** The state of the Waitlist User. */
21
  public WaitlistUserState $state,
22
- /** The timestamp when the Waitlist User was approved, or null if not yet approved. */
23
  public ?\DateTimeImmutable $approvedAt,
24
  /** An ISO 8601 timestamp. */
25
  public \DateTimeImmutable $createdAt,
26
  /** An ISO 8601 timestamp. */
27
  public \DateTimeImmutable $updatedAt,
 
 
 
 
 
 
 
28
- /** The unique ID of the Waitlist that the Waitlist User joined. */
29
  public ?string $waitlistId = null,
30
  ) {
31
  }
@@ -33,13 +38,14 @@ readonly class WaitlistUser implements \JsonSerializable
33
  public static function fromArray(array $data): self
34
  {
35
  return new self(
36
- object: $data['object'] ?? 'waitlist_user',
37
  id: $data['id'],
38
  email: $data['email'],
39
  state: WaitlistUserState::from($data['state']),
40
  approvedAt: isset($data['approved_at']) ? new \DateTimeImmutable($data['approved_at']) : null,
41
  createdAt: new \DateTimeImmutable($data['created_at']),
42
  updatedAt: new \DateTimeImmutable($data['updated_at']),
 
 
43
  waitlistId: $data['waitlist_id'] ?? null,
44
  );
45
  }
@@ -47,13 +53,14 @@ readonly class WaitlistUser implements \JsonSerializable
47
  public function toArray(): array
48
  {
49
  return [
50
- 'object' => $this->object,
51
  'id' => $this->id,
52
  'email' => $this->email,
53
  'state' => $this->state->value,
54
  'approved_at' => $this->approvedAt?->format(\DateTimeInterface::RFC3339_EXTENDED),
55
  'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED),
56
  'updated_at' => $this->updatedAt->format(\DateTimeInterface::RFC3339_EXTENDED),
 
 
57
  'waitlist_id' => $this->waitlistId,
58
  ];
59
  }
 
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
 
 
14
+ /** The unique ID of the waitlist entry. */
15
  public string $id,
16
+ /** The email address of the user on the waitlist. */
17
  public string $email,
18
+ /** The state of the waitlist entry. */
19
  public WaitlistUserState $state,
20
+ /** The timestamp when the entry was approved, or null if not yet approved. */
21
  public ?\DateTimeImmutable $approvedAt,
22
  /** An ISO 8601 timestamp. */
23
  public \DateTimeImmutable $createdAt,
24
  /** An ISO 8601 timestamp. */
25
  public \DateTimeImmutable $updatedAt,
26
+ /** Distinguishes the Waitlist User object. */
27
+ public string $object,
28
+ /**
29
+ * Additional fields submitted when the user joined the waitlist. Values are user-provided — treat them as untrusted input when rendering or exporting.
30
+ * @var array<string, string>|null
31
+ */
32
+ public ?array $additionalFields = null,
33
+ /** The unique ID of the waitlist the entry belongs to. */
34
  public ?string $waitlistId = null,
35
  ) {
36
  }
 
38
  public static function fromArray(array $data): self
39
  {
40
  return new self(
 
41
  id: $data['id'],
42
  email: $data['email'],
43
  state: WaitlistUserState::from($data['state']),
44
  approvedAt: isset($data['approved_at']) ? new \DateTimeImmutable($data['approved_at']) : null,
45
  createdAt: new \DateTimeImmutable($data['created_at']),
46
  updatedAt: new \DateTimeImmutable($data['updated_at']),
47
+ object: $data['object'] ?? 'waitlist_user',
48
+ additionalFields: $data['additional_fields'] ?? null,
49
  waitlistId: $data['waitlist_id'] ?? null,
50
  );
51
  }
 
53
  public function toArray(): array
54
  {
55
  return [
 
56
  'id' => $this->id,
57
  'email' => $this->email,
58
  'state' => $this->state->value,
59
  'approved_at' => $this->approvedAt?->format(\DateTimeInterface::RFC3339_EXTENDED),
60
  'created_at' => $this->createdAt->format(\DateTimeInterface::RFC3339_EXTENDED),
61
  'updated_at' => $this->updatedAt->format(\DateTimeInterface::RFC3339_EXTENDED),
62
+ 'object' => $this->object,
63
+ 'additional_fields' => $this->additionalFields,
64
  'waitlist_id' => $this->waitlistId,
65
  ];
66
  }
php/lib/Service/Authorization.php
php/lib/Service/Authorization.php CHANGED
@@ -282,7 +282,7 @@ class Authorization
282
  /**
283
  * List effective permissions for an organization membership on a resource
284
  *
285
- * Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
286
  * @param string $organizationMembershipId The ID of the organization membership.
287
  * @param string $resourceId The ID of the authorization resource.
288
  * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
@@ -319,7 +319,7 @@ class Authorization
319
  /**
320
  * List effective permissions for an organization membership on a resource by external ID
321
  *
322
- * 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.
323
  * @param string $organizationMembershipId The ID of the organization membership.
324
  * @param string $resourceTypeSlug The slug of the resource type.
325
  * @param string $externalId An identifier you provide to reference the resource in your system.
 
282
  /**
283
  * List effective permissions for an organization membership on a resource
284
  *
285
+ * Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
286
  * @param string $organizationMembershipId The ID of the organization membership.
287
  * @param string $resourceId The ID of the authorization resource.
288
  * @param string|null $before An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
 
319
  /**
320
  * List effective permissions for an organization membership on a resource by external ID
321
  *
322
+ * 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
323
  * @param string $organizationMembershipId The ID of the organization membership.
324
  * @param string $resourceTypeSlug The slug of the resource type.
325
  * @param string $externalId An identifier you provide to reference the resource in your system.
php/lib/Service/Organizations.php
php/lib/Service/Organizations.php CHANGED
@@ -62,7 +62,7 @@ class Organizations
62
  * Creates a new organization in the current environment.
63
  * @param string $name The name of the organization.
64
  * @param bool|null $allowProfilesOutsideOrganization Whether the organization allows profiles from outside the organization to sign in.
65
- * @param array<string>|null $domains The domains associated with the organization. Deprecated in favor of `domain_data`.
66
  * @param array<\WorkOS\Resource\OrganizationDomainData>|null $domainData The domains associated with the organization, including verification state.
67
  * @param array<string, string>|null $metadata Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
68
  * @param string|null $externalId An external identifier for the Organization.
 
62
  * Creates a new organization in the current environment.
63
  * @param string $name The name of the organization.
64
  * @param bool|null $allowProfilesOutsideOrganization Whether the organization allows profiles from outside the organization to sign in.
65
+ * @param array<string>|null $domains (deprecated) The domains associated with the organization. Deprecated in favor of `domain_data`.
66
  * @param array<\WorkOS\Resource\OrganizationDomainData>|null $domainData The domains associated with the organization, including verification state.
67
  * @param array<string, string>|null $metadata Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
68
  * @param string|null $externalId An external identifier for the Organization.
php/lib/Service/OrganizationsItContacts.php
php/lib/Service/OrganizationsItContacts.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace WorkOS\Service;
8
+
9
+ use WorkOS\Resource\ItContact;
10
+ use WorkOS\Resource\ItContactList;
11
+
12
+ class OrganizationsItContacts
13
+ {
14
+ public function __construct(
15
+ private readonly \WorkOS\HttpClient $client,
16
+ ) {
17
+ }
18
+
19
+ /**
20
+ * List IT contacts
21
+ *
22
+ * Get the IT contacts for an organization.
23
+ * @param string $organizationId The ID of the organization.
24
+ * @return \WorkOS\Resource\ItContactList
25
+ * @throws \WorkOS\Exception\WorkOSException
26
+ */
27
+ public function listOrganizationItContacts(
28
+ string $organizationId,
29
+ ?\WorkOS\RequestOptions $options = null,
30
+ ): \WorkOS\Resource\ItContactList {
31
+ $response = $this->client->request(
32
+ method: 'GET',
33
+ path: 'organizations/' . rawurlencode($organizationId) . '/it_contacts',
34
+ options: $options,
35
+ );
36
+ return ItContactList::fromArray($response);
37
+ }
38
+
39
+ /**
40
+ * Create an IT contact
41
+ *
42
+ * Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
43
+ * @param string $organizationId The ID of the organization.
44
+ * @param string $email The email address of the IT contact.
45
+ * @return \WorkOS\Resource\ItContact
46
+ * @throws \WorkOS\Exception\WorkOSException
47
+ */
48
+ public function createOrganizationItContact(
49
+ string $organizationId,
50
+ string $email,
51
+ ?\WorkOS\RequestOptions $options = null,
52
+ ): \WorkOS\Resource\ItContact {
53
+ $body = [
54
+ 'email' => $email,
55
+ ];
56
+ $response = $this->client->request(
57
+ method: 'POST',
58
+ path: 'organizations/' . rawurlencode($organizationId) . '/it_contacts',
59
+ body: $body,
60
+ options: $options,
61
+ );
62
+ return ItContact::fromArray($response);
63
+ }
64
+
65
+ /**
66
+ * Delete an IT contact
67
+ *
68
+ * Remove an IT contact from an organization and revoke the contact's active setup links.
69
+ * @param string $organizationId The ID of the organization.
70
+ * @param string $contactId The ID of the IT contact.
71
+ * @return void
72
+ * @throws \WorkOS\Exception\WorkOSException
73
+ */
74
+ public function deleteOrganizationItContact(
75
+ string $organizationId,
76
+ string $contactId,
77
+ ?\WorkOS\RequestOptions $options = null,
78
+ ): void {
79
+ $this->client->request(
80
+ method: 'DELETE',
81
+ path: 'organizations/' . rawurlencode($organizationId) . '/it_contacts/' . rawurlencode($contactId),
82
+ options: $options,
83
+ );
84
+ }
85
+
86
+ /**
87
+ * Invite an IT contact
88
+ *
89
+ * Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
90
+ * @param string $organizationId The ID of the organization.
91
+ * @param string $contactId The ID of the IT contact.
92
+ * @param array<\WorkOS\Resource\InviteItContactIntents> $intents The Admin Portal features that the IT contact can configure.
93
+ * @return mixed
94
+ * @throws \WorkOS\Exception\WorkOSException
95
+ */
96
+ public function createItContactInvite(
97
+ string $organizationId,
98
+ string $contactId,
99
+ array $intents,
100
+ ?\WorkOS\RequestOptions $options = null,
101
+ ): mixed {
102
+ $body = [
103
+ 'intents' => $intents,
104
+ ];
105
+ $response = $this->client->request(
106
+ method: 'POST',
107
+ path: 'organizations/' . rawurlencode($organizationId) . '/it_contacts/' . rawurlencode($contactId) . '/invite',
108
+ body: $body,
109
+ options: $options,
110
+ );
111
+ return $response;
112
+ }
113
+
114
+ /**
115
+ * Revoke an IT contact's invitation
116
+ *
117
+ * Revoke the organization's active Admin Portal invitation.
118
+ * @param string $organizationId The ID of the organization.
119
+ * @param string $contactId The ID of the IT contact.
120
+ * @return mixed
121
+ * @throws \WorkOS\Exception\WorkOSException
122
+ */
123
+ public function revokeItContact(
124
+ string $organizationId,
125
+ string $contactId,
126
+ ?\WorkOS\RequestOptions $options = null,
127
+ ): mixed {
128
+ $response = $this->client->request(
129
+ method: 'POST',
130
+ path: 'organizations/' . rawurlencode($organizationId) . '/it_contacts/' . rawurlencode($contactId) . '/revoke',
131
+ options: $options,
132
+ );
133
+ return $response;
134
+ }
135
+ }
php/lib/WorkOS.php
php/lib/WorkOS.php CHANGED
@@ -21,6 +21,7 @@ use WorkOS\Service\MultiFactorAuth;
21
  use WorkOS\Service\OrganizationDomains;
22
  use WorkOS\Service\OrganizationMembershipService;
23
  use WorkOS\Service\Organizations;
 
24
  use WorkOS\Service\Pipes;
25
  use WorkOS\Service\PipesProvider;
26
  use WorkOS\Service\Radar;
@@ -70,6 +71,7 @@ class WorkOS
70
  private ?Service\ApiKeys $apiKeys = null;
71
  private ?Service\PipesProvider $pipesProvider = null;
72
  private ?Service\Groups $groups = null;
 
73
  private ?Service\AdminPortal $adminPortal = null;
74
  private ?Service\Radar $radar = null;
75
  private ?Service\UserManagement $userManagement = null;
@@ -168,6 +170,11 @@ class WorkOS
168
  return $this->groups ??= new Service\Groups($this->httpClient);
169
  }
170
 
 
 
 
 
 
171
  public function adminPortal(): AdminPortal
172
  {
173
  return $this->adminPortal ??= new Service\AdminPortal($this->httpClient);
 
21
  use WorkOS\Service\OrganizationDomains;
22
  use WorkOS\Service\OrganizationMembershipService;
23
  use WorkOS\Service\Organizations;
24
+ use WorkOS\Service\OrganizationsItContacts;
25
  use WorkOS\Service\Pipes;
26
  use WorkOS\Service\PipesProvider;
27
  use WorkOS\Service\Radar;
 
71
  private ?Service\ApiKeys $apiKeys = null;
72
  private ?Service\PipesProvider $pipesProvider = null;
73
  private ?Service\Groups $groups = null;
74
+ private ?Service\OrganizationsItContacts $organizationsItContacts = null;
75
  private ?Service\AdminPortal $adminPortal = null;
76
  private ?Service\Radar $radar = null;
77
  private ?Service\UserManagement $userManagement = null;
 
170
  return $this->groups ??= new Service\Groups($this->httpClient);
171
  }
172
 
173
+ public function organizationsItContacts(): OrganizationsItContacts
174
+ {
175
+ return $this->organizationsItContacts ??= new Service\OrganizationsItContacts($this->httpClient);
176
+ }
177
+
178
  public function adminPortal(): AdminPortal
179
  {
180
  return $this->adminPortal ??= new Service\AdminPortal($this->httpClient);
php/tests/Fixtures/create_it_contact.json
php/tests/Fixtures/create_it_contact.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "email": "it-contact@example.com"
3
+ }
php/tests/Fixtures/invite_it_contact.json
php/tests/Fixtures/invite_it_contact.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "intents": [
3
+ "sso",
4
+ "directory_sync"
5
+ ]
6
+ }
php/tests/Fixtures/it_contact.json
php/tests/Fixtures/it_contact.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "it_contact",
3
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
4
+ "email": "it-contact@example.com",
5
+ "created_at": "2026-01-15T12:00:00.000Z",
6
+ "updated_at": "2026-01-15T12:00:00.000Z"
7
+ }
php/tests/Fixtures/it_contact_list_list_metadata.json
php/tests/Fixtures/it_contact_list_list_metadata.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
3
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
4
+ }
php/tests/Fixtures/waitlist_user.json
php/tests/Fixtures/waitlist_user.json CHANGED
@@ -1,10 +1,13 @@
1
  {
2
- "object": "waitlist_user",
3
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
4
  "email": "marcelina.davis@example.com",
5
  "state": "pending",
6
  "approved_at": null,
 
 
 
7
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
8
  "created_at": "2026-01-15T12:00:00.000Z",
9
- "updated_at": "2026-01-15T12:00:00.000Z"
 
10
  }
 
1
  {
 
2
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
3
  "email": "marcelina.davis@example.com",
4
  "state": "pending",
5
  "approved_at": null,
6
+ "additional_fields": {
7
+ "company": "Example Corp"
8
+ },
9
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  }
php/tests/Fixtures/waitlist_user_approved.json
php/tests/Fixtures/waitlist_user_approved.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
php/tests/Fixtures/waitlist_user_created.json
php/tests/Fixtures/waitlist_user_created.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
php/tests/Fixtures/waitlist_user_denied.json
php/tests/Fixtures/waitlist_user_denied.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
php/tests/Service/OrganizationsItContactsTest.php
php/tests/Service/OrganizationsItContactsTest.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ // This file is auto-generated by oagen. Do not edit.
6
+
7
+ namespace Tests\Service;
8
+
9
+ use PHPUnit\Framework\TestCase;
10
+ use WorkOS\TestHelper;
11
+
12
+ class OrganizationsItContactsTest extends TestCase
13
+ {
14
+ use TestHelper;
15
+
16
+ public function testListOrganizationItContacts(): void
17
+ {
18
+ $fixture = $this->loadFixture('it_contact_list');
19
+ $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
20
+ $result = $client->organizationsItContacts()->listOrganizationItContacts('test_organization_id');
21
+ $this->assertInstanceOf(\WorkOS\Resource\ItContactList::class, $result);
22
+ $this->assertIsArray($result->toArray());
23
+ $request = $this->getLastRequest();
24
+ $this->assertSame('GET', $request->getMethod());
25
+ $this->assertStringEndsWith('organizations/test_organization_id/it_contacts', $request->getUri()->getPath());
26
+ }
27
+
28
+ public function testCreateOrganizationItContact(): void
29
+ {
30
+ $fixture = $this->loadFixture('it_contact');
31
+ $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
32
+ $result = $client->organizationsItContacts()->createOrganizationItContact('test_organization_id', email: 'test_value');
33
+ $this->assertInstanceOf(\WorkOS\Resource\ItContact::class, $result);
34
+ $this->assertSame($fixture['id'], $result->id);
35
+ $this->assertIsArray($result->toArray());
36
+ $request = $this->getLastRequest();
37
+ $this->assertSame('POST', $request->getMethod());
38
+ $this->assertStringEndsWith('organizations/test_organization_id/it_contacts', $request->getUri()->getPath());
39
+ $body = json_decode((string) $request->getBody(), true);
40
+ $this->assertSame('test_value', $body['email']);
41
+ }
42
+
43
+ public function testDeleteOrganizationItContact(): void
44
+ {
45
+ $client = $this->createMockClient([['status' => 204]]);
46
+ $client->organizationsItContacts()->deleteOrganizationItContact('test_organization_id', 'test_contact_id');
47
+ $request = $this->getLastRequest();
48
+ $this->assertSame('DELETE', $request->getMethod());
49
+ $this->assertStringEndsWith('organizations/test_organization_id/it_contacts/test_contact_id', $request->getUri()->getPath());
50
+ }
51
+
52
+ public function testCreateItContactInvite(): void
53
+ {
54
+ $client = $this->createMockClient([['status' => 200, 'body' => []]]);
55
+ $client->organizationsItContacts()->createItContactInvite('test_organization_id', 'test_contact_id', intents: []);
56
+ $request = $this->getLastRequest();
57
+ $this->assertSame('POST', $request->getMethod());
58
+ $this->assertStringEndsWith('organizations/test_organization_id/it_contacts/test_contact_id/invite', $request->getUri()->getPath());
59
+ }
60
+
61
+ public function testRevokeItContact(): void
62
+ {
63
+ $client = $this->createMockClient([['status' => 200, 'body' => []]]);
64
+ $client->organizationsItContacts()->revokeItContact('test_organization_id', 'test_contact_id');
65
+ $request = $this->getLastRequest();
66
+ $this->assertSame('POST', $request->getMethod());
67
+ $this->assertStringEndsWith('organizations/test_organization_id/it_contacts/test_contact_id/revoke', $request->getUri()->getPath());
68
+ }
69
+ }

All files in this language are hidden by the current filters.

code: 19 · tests: 12 · manifest: 1

python/.oagen-manifest.json
python/.oagen-manifest.json CHANGED
@@ -361,6 +361,7 @@
361
  "src/workos/common/models/invitation_revoked_data.py",
362
  "src/workos/common/models/invitation_revoked_data_state.py",
363
  "src/workos/common/models/invitation_state.py",
 
364
  "src/workos/common/models/list_metadata.py",
365
  "src/workos/common/models/magic_auth_created.py",
366
  "src/workos/common/models/magic_auth_created_data.py",
@@ -601,6 +602,14 @@
601
  "src/workos/organizations/models/organization_input.py",
602
  "src/workos/organizations/models/update_audit_logs_retention.py",
603
  "src/workos/organizations/models/update_organization.py",
 
 
 
 
 
 
 
 
604
  "src/workos/pipes/__init__.py",
605
  "src/workos/pipes/_resource.py",
606
  "src/workos/pipes/models/__init__.py",
@@ -676,6 +685,7 @@
676
  "src/workos/types/organization_domains/__init__.py",
677
  "src/workos/types/organization_membership/__init__.py",
678
  "src/workos/types/organizations/__init__.py",
 
679
  "src/workos/types/pipes/__init__.py",
680
  "src/workos/types/pipes_provider/__init__.py",
681
  "src/workos/types/radar/__init__.py",
@@ -953,6 +963,7 @@
953
  "tests/fixtures/create_group.json",
954
  "tests/fixtures/create_group_membership.json",
955
  "tests/fixtures/create_group_role_assignment.json",
 
956
  "tests/fixtures/create_m2m_application.json",
957
  "tests/fixtures/create_magic_code_and_return.json",
958
  "tests/fixtures/create_oauth_application.json",
@@ -1099,6 +1110,10 @@
1099
  "tests/fixtures/invitation_resent_data.json",
1100
  "tests/fixtures/invitation_revoked.json",
1101
  "tests/fixtures/invitation_revoked_data.json",
 
 
 
 
1102
  "tests/fixtures/jwks_response.json",
1103
  "tests/fixtures/jwks_response_keys.json",
1104
  "tests/fixtures/jwt_template_response.json",
@@ -1363,6 +1378,8 @@
1363
  "tests/test_organization_membership.py",
1364
  "tests/test_organization_membership_models_round_trip.py",
1365
  "tests/test_organizations.py",
 
 
1366
  "tests/test_organizations_models_round_trip.py",
1367
  "tests/test_pipes.py",
1368
  "tests/test_pipes_models_round_trip.py",
@@ -1674,6 +1691,10 @@
1674
  "sdkMethod": "authorize_data_integration",
1675
  "service": "pipes"
1676
  },
 
 
 
 
1677
  "POST /data-integrations/{slug}/credentials": {
1678
  "sdkMethod": "create_data_integration_credential",
1679
  "service": "pipes"
@@ -1846,6 +1867,26 @@
1846
  "sdkMethod": "list_authorized_applications",
1847
  "service": "organizations"
1848
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1849
  "POST /portal/generate_link": {
1850
  "sdkMethod": "generate_link",
1851
  "service": "admin_portal"
@@ -2225,10 +2266,6 @@
2225
  "GET /audit_logs/exports/{auditLogExportId}": {
2226
  "sdkMethod": "get_export",
2227
  "service": "audit_logs"
2228
- },
2229
- "PUT /data-integrations/{slug}/client-credentials": {
2230
- "sdkMethod": "update_data_integration_client_credentials",
2231
- "service": "pipes"
2232
  }
2233
  }
2234
  }
 
361
  "src/workos/common/models/invitation_revoked_data.py",
362
  "src/workos/common/models/invitation_revoked_data_state.py",
363
  "src/workos/common/models/invitation_state.py",
364
+ "src/workos/common/models/invite_it_contact_intents.py",
365
  "src/workos/common/models/list_metadata.py",
366
  "src/workos/common/models/magic_auth_created.py",
367
  "src/workos/common/models/magic_auth_created_data.py",
 
602
  "src/workos/organizations/models/organization_input.py",
603
  "src/workos/organizations/models/update_audit_logs_retention.py",
604
  "src/workos/organizations/models/update_organization.py",
605
+ "src/workos/organizations_it_contacts/__init__.py",
606
+ "src/workos/organizations_it_contacts/_resource.py",
607
+ "src/workos/organizations_it_contacts/models/__init__.py",
608
+ "src/workos/organizations_it_contacts/models/create_it_contact.py",
609
+ "src/workos/organizations_it_contacts/models/invite_it_contact.py",
610
+ "src/workos/organizations_it_contacts/models/it_contact.py",
611
+ "src/workos/organizations_it_contacts/models/it_contact_list.py",
612
+ "src/workos/organizations_it_contacts/models/it_contact_list_list_metadata.py",
613
  "src/workos/pipes/__init__.py",
614
  "src/workos/pipes/_resource.py",
615
  "src/workos/pipes/models/__init__.py",
 
685
  "src/workos/types/organization_domains/__init__.py",
686
  "src/workos/types/organization_membership/__init__.py",
687
  "src/workos/types/organizations/__init__.py",
688
+ "src/workos/types/organizations_it_contacts/__init__.py",
689
  "src/workos/types/pipes/__init__.py",
690
  "src/workos/types/pipes_provider/__init__.py",
691
  "src/workos/types/radar/__init__.py",
 
963
  "tests/fixtures/create_group.json",
964
  "tests/fixtures/create_group_membership.json",
965
  "tests/fixtures/create_group_role_assignment.json",
966
+ "tests/fixtures/create_it_contact.json",
967
  "tests/fixtures/create_m2m_application.json",
968
  "tests/fixtures/create_magic_code_and_return.json",
969
  "tests/fixtures/create_oauth_application.json",
 
1110
  "tests/fixtures/invitation_resent_data.json",
1111
  "tests/fixtures/invitation_revoked.json",
1112
  "tests/fixtures/invitation_revoked_data.json",
1113
+ "tests/fixtures/invite_it_contact.json",
1114
+ "tests/fixtures/it_contact.json",
1115
+ "tests/fixtures/it_contact_list.json",
1116
+ "tests/fixtures/it_contact_list_list_metadata.json",
1117
  "tests/fixtures/jwks_response.json",
1118
  "tests/fixtures/jwks_response_keys.json",
1119
  "tests/fixtures/jwt_template_response.json",
 
1378
  "tests/test_organization_membership.py",
1379
  "tests/test_organization_membership_models_round_trip.py",
1380
  "tests/test_organizations.py",
1381
+ "tests/test_organizations_it_contacts.py",
1382
+ "tests/test_organizations_it_contacts_models_round_trip.py",
1383
  "tests/test_organizations_models_round_trip.py",
1384
  "tests/test_pipes.py",
1385
  "tests/test_pipes_models_round_trip.py",
 
1691
  "sdkMethod": "authorize_data_integration",
1692
  "service": "pipes"
1693
  },
1694
+ "PUT /data-integrations/{slug}/client-credentials": {
1695
+ "sdkMethod": "update_data_integration_client_credentials",
1696
+ "service": "pipes"
1697
+ },
1698
  "POST /data-integrations/{slug}/credentials": {
1699
  "sdkMethod": "create_data_integration_credential",
1700
  "service": "pipes"
 
1867
  "sdkMethod": "list_authorized_applications",
1868
  "service": "organizations"
1869
  },
1870
+ "GET /organizations/{organization_id}/it_contacts": {
1871
+ "sdkMethod": "list_organization_it_contacts",
1872
+ "service": "organizations_it_contacts"
1873
+ },
1874
+ "POST /organizations/{organization_id}/it_contacts": {
1875
+ "sdkMethod": "create_organization_it_contact",
1876
+ "service": "organizations_it_contacts"
1877
+ },
1878
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1879
+ "sdkMethod": "delete_organization_it_contact",
1880
+ "service": "organizations_it_contacts"
1881
+ },
1882
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1883
+ "sdkMethod": "create_it_contact_invite",
1884
+ "service": "organizations_it_contacts"
1885
+ },
1886
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1887
+ "sdkMethod": "revoke_it_contact",
1888
+ "service": "organizations_it_contacts"
1889
+ },
1890
  "POST /portal/generate_link": {
1891
  "sdkMethod": "generate_link",
1892
  "service": "admin_portal"
 
2266
  "GET /audit_logs/exports/{auditLogExportId}": {
2267
  "sdkMethod": "get_export",
2268
  "service": "audit_logs"
 
 
 
 
2269
  }
2270
  }
2271
  }
python/src/workos/_client.py
python/src/workos/_client.py CHANGED
@@ -5,41 +5,47 @@ from __future__ import annotations
5
  import functools
6
 
7
  from ._base_client import (
8
- WorkOSClient as _SyncBase,
9
  AsyncWorkOSClient as _AsyncBase,
10
  )
 
 
 
 
 
11
  from .agents._resource import Agents, AsyncAgents
 
 
 
 
 
 
 
 
 
12
- from .multi_factor_auth._resource import MultiFactorAuth, AsyncMultiFactorAuth
13
- from .connect._resource import Connect, AsyncConnect
14
- from .authorization._resource import Authorization, AsyncAuthorization
15
- from .client_api._resource import ClientApi, AsyncClientApi
16
- from .sso._resource import SSO, AsyncSSO
17
- from .pipes._resource import Pipes, AsyncPipes
18
- from .directory_sync._resource import DirectorySync, AsyncDirectorySync
19
- from .events._resource import Events, AsyncEvents
20
- from .feature_flags._resource import FeatureFlags, AsyncFeatureFlags
21
  from .organization_domains._resource import (
22
- OrganizationDomains,
23
  AsyncOrganizationDomains,
 
24
  )
25
- from .organizations._resource import Organizations, AsyncOrganizations
26
- from .api_keys._resource import ApiKeys, AsyncApiKeys
27
- from .pipes_provider._resource import PipesProvider, AsyncPipesProvider
28
- from .groups._resource import Groups, AsyncGroups
29
- from .admin_portal._resource import AdminPortal, AsyncAdminPortal
30
- from .radar._resource import Radar, AsyncRadar
31
- from .user_management._resource import UserManagement, AsyncUserManagement
32
  from .organization_membership._resource import (
33
- OrganizationMembershipService,
34
  AsyncOrganizationMembershipService,
 
 
 
 
 
 
35
  )
36
- from .vault._resource import Vault, AsyncVault
37
- from .webhooks._resource import Webhooks, AsyncWebhooks
38
- from .widgets._resource import Widgets, AsyncWidgets
39
- from .audit_logs._resource import AuditLogs, AsyncAuditLogs
40
  from .passwordless import AsyncPasswordless, Passwordless
41
- from .actions import Actions, AsyncActions
 
42
  from .pkce import PKCE
 
 
 
 
 
 
43
 
44
 
45
  class WorkOSClient(_SyncBase):
@@ -120,6 +126,11 @@ class WorkOSClient(_SyncBase):
120
  """Groups API resources."""
121
  return Groups(self)
122
 
 
 
 
 
 
123
  @functools.cached_property
124
  def admin_portal(self) -> AdminPortal:
125
  """Admin Portal API resources."""
@@ -263,6 +274,11 @@ class AsyncWorkOSClient(_AsyncBase):
263
  """Groups API resources."""
264
  return AsyncGroups(self)
265
 
 
 
 
 
 
266
  @functools.cached_property
267
  def admin_portal(self) -> AsyncAdminPortal:
268
  """Admin Portal API resources."""
 
5
  import functools
6
 
7
  from ._base_client import (
 
8
  AsyncWorkOSClient as _AsyncBase,
9
  )
10
+ from ._base_client import (
11
+ WorkOSClient as _SyncBase,
12
+ )
13
+ from .actions import Actions, AsyncActions
14
+ from .admin_portal._resource import AdminPortal, AsyncAdminPortal
15
  from .agents._resource import Agents, AsyncAgents
16
+ from .api_keys._resource import ApiKeys, AsyncApiKeys
17
+ from .audit_logs._resource import AsyncAuditLogs, AuditLogs
18
+ from .authorization._resource import AsyncAuthorization, Authorization
19
+ from .client_api._resource import AsyncClientApi, ClientApi
20
+ from .connect._resource import AsyncConnect, Connect
21
+ from .directory_sync._resource import AsyncDirectorySync, DirectorySync
22
+ from .events._resource import AsyncEvents, Events
23
+ from .feature_flags._resource import AsyncFeatureFlags, FeatureFlags
24
+ from .groups._resource import AsyncGroups, Groups
25
+ from .multi_factor_auth._resource import AsyncMultiFactorAuth, MultiFactorAuth
 
 
 
 
 
 
 
 
26
  from .organization_domains._resource import (
 
27
  AsyncOrganizationDomains,
28
+ OrganizationDomains,
29
  )
 
 
 
 
 
 
 
30
  from .organization_membership._resource import (
 
31
  AsyncOrganizationMembershipService,
32
+ OrganizationMembershipService,
33
+ )
34
+ from .organizations._resource import AsyncOrganizations, Organizations
35
+ from .organizations_it_contacts._resource import (
36
+ AsyncOrganizationsItContacts,
37
+ OrganizationsItContacts,
38
  )
 
 
 
 
39
  from .passwordless import AsyncPasswordless, Passwordless
40
+ from .pipes._resource import AsyncPipes, Pipes
41
+ from .pipes_provider._resource import AsyncPipesProvider, PipesProvider
42
  from .pkce import PKCE
43
+ from .radar._resource import AsyncRadar, Radar
44
+ from .sso._resource import SSO, AsyncSSO
45
+ from .user_management._resource import AsyncUserManagement, UserManagement
46
+ from .vault._resource import AsyncVault, Vault
47
+ from .webhooks._resource import AsyncWebhooks, Webhooks
48
+ from .widgets._resource import AsyncWidgets, Widgets
49
 
50
 
51
  class WorkOSClient(_SyncBase):
 
126
  """Groups API resources."""
127
  return Groups(self)
128
 
129
+ @functools.cached_property
130
+ def organizations_it_contacts(self) -> OrganizationsItContacts:
131
+ """Organizations It Contacts API resources."""
132
+ return OrganizationsItContacts(self)
133
+
134
  @functools.cached_property
135
  def admin_portal(self) -> AdminPortal:
136
  """Admin Portal API resources."""
 
274
  """Groups API resources."""
275
  return AsyncGroups(self)
276
 
277
+ @functools.cached_property
278
+ def organizations_it_contacts(self) -> AsyncOrganizationsItContacts:
279
+ """Organizations It Contacts API resources."""
280
+ return AsyncOrganizationsItContacts(self)
281
+
282
  @functools.cached_property
283
  def admin_portal(self) -> AsyncAdminPortal:
284
  """Admin Portal API resources."""
python/src/workos/authorization/_resource.py
python/src/workos/authorization/_resource.py CHANGED
@@ -479,7 +479,7 @@ class Authorization:
479
  ) -> SyncPage[AuthorizationPermission]:
480
  """List effective permissions for an organization membership on a resource
481
 
482
- Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
483
 
484
  Args:
485
  organization_membership_id: The ID of the organization membership.
@@ -540,7 +540,7 @@ class Authorization:
540
  ) -> SyncPage[AuthorizationPermission]:
541
  """List effective permissions for an organization membership on a resource by external ID
542
 
543
- 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.
544
 
545
  Args:
546
  organization_membership_id: The ID of the organization membership.
@@ -2650,7 +2650,7 @@ class AsyncAuthorization:
2650
  ) -> AsyncPage[AuthorizationPermission]:
2651
  """List effective permissions for an organization membership on a resource
2652
 
2653
- Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
2654
 
2655
  Args:
2656
  organization_membership_id: The ID of the organization membership.
@@ -2711,7 +2711,7 @@ class AsyncAuthorization:
2711
  ) -> AsyncPage[AuthorizationPermission]:
2712
  """List effective permissions for an organization membership on a resource by external ID
2713
 
2714
- 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.
2715
 
2716
  Args:
2717
  organization_membership_id: The ID of the organization membership.
 
479
  ) -> SyncPage[AuthorizationPermission]:
480
  """List effective permissions for an organization membership on a resource
481
 
482
+ Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
483
 
484
  Args:
485
  organization_membership_id: The ID of the organization membership.
 
540
  ) -> SyncPage[AuthorizationPermission]:
541
  """List effective permissions for an organization membership on a resource by external ID
542
 
543
+ 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
544
 
545
  Args:
546
  organization_membership_id: The ID of the organization membership.
 
2650
  ) -> AsyncPage[AuthorizationPermission]:
2651
  """List effective permissions for an organization membership on a resource
2652
 
2653
+ Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
2654
 
2655
  Args:
2656
  organization_membership_id: The ID of the organization membership.
 
2711
  ) -> AsyncPage[AuthorizationPermission]:
2712
  """List effective permissions for an organization membership on a resource by external ID
2713
 
2714
+ 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
2715
 
2716
  Args:
2717
  organization_membership_id: The ID of the organization membership.
python/src/workos/common/__init__.py
python/src/workos/common/__init__.py CHANGED
@@ -1,6 +1,5 @@
1
  # This file is auto-generated by oagen. Do not edit.
2
 
3
- from .models import *
4
  from .models import (
5
  AccessTokenAgentRegistrationCredentialIssuedDataDetail as AccessTokenAgentRegistrationCredentialIssuedDataDetail,
6
  )
@@ -373,6 +372,7 @@ from .models import InvitationResentData as InvitationResentData
373
  from .models import InvitationRevoked as InvitationRevoked
374
  from .models import InvitationRevokedData as InvitationRevokedData
375
  from .models import InvitationState as InvitationState
 
376
  from .models import ListMetadata as ListMetadata
377
  from .models import MagicAuthCreated as MagicAuthCreated
378
  from .models import MagicAuthCreatedData as MagicAuthCreatedData
 
1
  # This file is auto-generated by oagen. Do not edit.
2
 
 
3
  from .models import (
4
  AccessTokenAgentRegistrationCredentialIssuedDataDetail as AccessTokenAgentRegistrationCredentialIssuedDataDetail,
5
  )
 
372
  from .models import InvitationRevoked as InvitationRevoked
373
  from .models import InvitationRevokedData as InvitationRevokedData
374
  from .models import InvitationState as InvitationState
375
+ from .models import InviteItContactIntents as InviteItContactIntents
376
  from .models import ListMetadata as ListMetadata
377
  from .models import MagicAuthCreated as MagicAuthCreated
378
  from .models import MagicAuthCreatedData as MagicAuthCreatedData
python/src/workos/common/models/__init__.py
python/src/workos/common/models/__init__.py CHANGED
@@ -44,9 +44,6 @@ from .agent_registration_created_data import (
44
  from .agent_registration_created_data_agent_identity import (
45
  AgentRegistrationCreatedDataAgentIdentity as AgentRegistrationCreatedDataAgentIdentity,
46
  )
47
- from .agent_registration_created_data_kind import *
48
- from .agent_registration_created_data_method import *
49
- from .agent_registration_created_data_status import *
50
  from .agent_registration_credential_issued import (
51
  AgentRegistrationCredentialIssued as AgentRegistrationCredentialIssued,
52
  )
@@ -243,7 +240,6 @@ from .authentication_radar_risk_detected import (
243
  from .authentication_radar_risk_detected_data import (
244
  AuthenticationRadarRiskDetectedData as AuthenticationRadarRiskDetectedData,
245
  )
246
- from .authentication_radar_risk_detected_data_action import *
247
  from .authentication_reauthentication_succeeded import (
248
  AuthenticationReauthenticationSucceeded as AuthenticationReauthenticationSucceeded,
249
  )
@@ -318,26 +314,18 @@ from .connection_activated import ConnectionActivated as ConnectionActivated
318
  from .connection_activated_data import (
319
  ConnectionActivatedData as ConnectionActivatedData,
320
  )
321
- from .connection_activated_data_connection_type import *
322
  from .connection_activated_data_domain import (
323
  ConnectionActivatedDataDomain as ConnectionActivatedDataDomain,
324
  )
325
- from .connection_activated_data_state import *
326
- from .connection_activated_data_status import *
327
  from .connection_deactivated import ConnectionDeactivated as ConnectionDeactivated
328
  from .connection_deactivated_data import (
329
  ConnectionDeactivatedData as ConnectionDeactivatedData,
330
  )
331
- from .connection_deactivated_data_connection_type import *
332
  from .connection_deactivated_data_domain import (
333
  ConnectionDeactivatedDataDomain as ConnectionDeactivatedDataDomain,
334
  )
335
- from .connection_deactivated_data_state import *
336
- from .connection_deactivated_data_status import *
337
  from .connection_deleted import ConnectionDeleted as ConnectionDeleted
338
  from .connection_deleted_data import ConnectionDeletedData as ConnectionDeletedData
339
- from .connection_deleted_data_connection_type import *
340
- from .connection_deleted_data_state import *
341
  from .connection_saml_certificate_renewal_required import (
342
  ConnectionSAMLCertificateRenewalRequired as ConnectionSAMLCertificateRenewalRequired,
343
  )
@@ -347,7 +335,6 @@ from .connection_saml_certificate_renewal_required_data import (
347
  from .connection_saml_certificate_renewal_required_data_certificate import (
348
  ConnectionSAMLCertificateRenewalRequiredDataCertificate as ConnectionSAMLCertificateRenewalRequiredDataCertificate,
349
  )
350
- from .connection_saml_certificate_renewal_required_data_certificate_certificate_type import *
351
  from .connection_saml_certificate_renewal_required_data_connection import (
352
  ConnectionSAMLCertificateRenewalRequiredDataConnection as ConnectionSAMLCertificateRenewalRequiredDataConnection,
353
  )
@@ -360,7 +347,6 @@ from .connection_saml_certificate_renewed_data import (
360
  from .connection_saml_certificate_renewed_data_certificate import (
361
  ConnectionSAMLCertificateRenewedDataCertificate as ConnectionSAMLCertificateRenewedDataCertificate,
362
  )
363
- from .connection_saml_certificate_renewed_data_certificate_certificate_type import *
364
  from .connection_saml_certificate_renewed_data_connection import (
365
  ConnectionSAMLCertificateRenewedDataConnection as ConnectionSAMLCertificateRenewedDataConnection,
366
  )
@@ -424,7 +410,6 @@ from .directory_state import DirectoryState as DirectoryState
424
  from .directory_type import DirectoryType as DirectoryType
425
  from .directory_user import DirectoryUser as DirectoryUser
426
  from .directory_user_email import DirectoryUserEmail as DirectoryUserEmail
427
- from .directory_user_state import *
428
  from .directory_user_with_groups_state import (
429
  DirectoryUserWithGroupsState as DirectoryUserWithGroupsState,
430
  )
@@ -433,12 +418,8 @@ from .dsync_activated_data import DsyncActivatedData as DsyncActivatedData
433
  from .dsync_activated_data_domain import (
434
  DsyncActivatedDataDomain as DsyncActivatedDataDomain,
435
  )
436
- from .dsync_activated_data_state import *
437
- from .dsync_activated_data_type import *
438
  from .dsync_deleted import DsyncDeleted as DsyncDeleted
439
  from .dsync_deleted_data import DsyncDeletedData as DsyncDeletedData
440
- from .dsync_deleted_data_state import *
441
- from .dsync_deleted_data_type import *
442
  from .dsync_group_created import DsyncGroupCreated as DsyncGroupCreated
443
  from .dsync_group_deleted import DsyncGroupDeleted as DsyncGroupDeleted
444
  from .dsync_group_updated import DsyncGroupUpdated as DsyncGroupUpdated
@@ -462,7 +443,6 @@ from .dsync_user_updated_data import DsyncUserUpdatedData as DsyncUserUpdatedDat
462
  from .dsync_user_updated_data_email import (
463
  DsyncUserUpdatedDataEmail as DsyncUserUpdatedDataEmail,
464
  )
465
- from .dsync_user_updated_data_state import *
466
  from .email_verification_created import (
467
  EmailVerificationCreated as EmailVerificationCreated,
468
  )
@@ -472,7 +452,6 @@ from .email_verification_created_data import (
472
  from .error_response import ErrorResponse as ErrorResponse
473
  from .event_context import EventContext as EventContext
474
  from .event_context_actor import EventContextActor as EventContextActor
475
- from .event_context_actor_source import *
476
  from .event_context_google_analytics_session import (
477
  EventContextGoogleAnalyticsSession as EventContextGoogleAnalyticsSession,
478
  )
@@ -484,7 +463,6 @@ from .flag_created_context import FlagCreatedContext as FlagCreatedContext
484
  from .flag_created_context_actor import (
485
  FlagCreatedContextActor as FlagCreatedContextActor,
486
  )
487
- from .flag_created_context_actor_source import *
488
  from .flag_created_data import FlagCreatedData as FlagCreatedData
489
  from .flag_created_data_owner import FlagCreatedDataOwner as FlagCreatedDataOwner
490
  from .flag_deleted import FlagDeleted as FlagDeleted
@@ -492,17 +470,14 @@ from .flag_deleted_context import FlagDeletedContext as FlagDeletedContext
492
  from .flag_deleted_context_actor import (
493
  FlagDeletedContextActor as FlagDeletedContextActor,
494
  )
495
- from .flag_deleted_context_actor_source import *
496
  from .flag_deleted_data import FlagDeletedData as FlagDeletedData
497
  from .flag_deleted_data_owner import FlagDeletedDataOwner as FlagDeletedDataOwner
498
  from .flag_owner import FlagOwner as FlagOwner
499
  from .flag_rule_updated import FlagRuleUpdated as FlagRuleUpdated
500
  from .flag_rule_updated_context import FlagRuleUpdatedContext as FlagRuleUpdatedContext
501
- from .flag_rule_updated_context_access_type import *
502
  from .flag_rule_updated_context_actor import (
503
  FlagRuleUpdatedContextActor as FlagRuleUpdatedContextActor,
504
  )
505
- from .flag_rule_updated_context_actor_source import *
506
  from .flag_rule_updated_context_configured_target import (
507
  FlagRuleUpdatedContextConfiguredTarget as FlagRuleUpdatedContextConfiguredTarget,
508
  )
@@ -518,7 +493,6 @@ from .flag_rule_updated_context_previous_attribute import (
518
  from .flag_rule_updated_context_previous_attribute_context import (
519
  FlagRuleUpdatedContextPreviousAttributeContext as FlagRuleUpdatedContextPreviousAttributeContext,
520
  )
521
- from .flag_rule_updated_context_previous_attribute_context_access_type import *
522
  from .flag_rule_updated_context_previous_attribute_context_configured_target import (
523
  FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget as FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget,
524
  )
@@ -540,7 +514,6 @@ from .flag_updated_context import FlagUpdatedContext as FlagUpdatedContext
540
  from .flag_updated_context_actor import (
541
  FlagUpdatedContextActor as FlagUpdatedContextActor,
542
  )
543
- from .flag_updated_context_actor_source import *
544
  from .flag_updated_context_previous_attribute import (
545
  FlagUpdatedContextPreviousAttribute as FlagUpdatedContextPreviousAttribute,
546
  )
@@ -560,17 +533,14 @@ from .group_member_removed_data import GroupMemberRemovedData as GroupMemberRemo
560
  from .group_updated import GroupUpdated as GroupUpdated
561
  from .invitation_accepted import InvitationAccepted as InvitationAccepted
562
  from .invitation_accepted_data import InvitationAcceptedData as InvitationAcceptedData
563
- from .invitation_accepted_data_state import *
564
  from .invitation_created import InvitationCreated as InvitationCreated
565
  from .invitation_created_data import InvitationCreatedData as InvitationCreatedData
566
- from .invitation_created_data_state import *
567
  from .invitation_resent import InvitationResent as InvitationResent
568
  from .invitation_resent_data import InvitationResentData as InvitationResentData
569
- from .invitation_resent_data_state import *
570
  from .invitation_revoked import InvitationRevoked as InvitationRevoked
571
  from .invitation_revoked_data import InvitationRevokedData as InvitationRevokedData
572
- from .invitation_revoked_data_state import *
573
  from .invitation_state import InvitationState as InvitationState
 
574
  from .list_metadata import ListMetadata as ListMetadata
575
  from .magic_auth_created import MagicAuthCreated as MagicAuthCreated
576
  from .magic_auth_created_data import MagicAuthCreatedData as MagicAuthCreatedData
@@ -581,8 +551,6 @@ from .organization_created_data import (
581
  from .organization_created_data_domain import (
582
  OrganizationCreatedDataDomain as OrganizationCreatedDataDomain,
583
  )
584
- from .organization_created_data_domain_state import *
585
- from .organization_created_data_domain_verification_strategy import *
586
  from .organization_deleted import OrganizationDeleted as OrganizationDeleted
587
  from .organization_deleted_data import (
588
  OrganizationDeletedData as OrganizationDeletedData,
@@ -590,8 +558,6 @@ from .organization_deleted_data import (
590
  from .organization_deleted_data_domain import (
591
  OrganizationDeletedDataDomain as OrganizationDeletedDataDomain,
592
  )
593
- from .organization_deleted_data_domain_state import *
594
- from .organization_deleted_data_domain_verification_strategy import *
595
  from .organization_domain import OrganizationDomain as OrganizationDomain
596
  from .organization_domain_created import (
597
  OrganizationDomainCreated as OrganizationDomainCreated,
@@ -599,8 +565,6 @@ from .organization_domain_created import (
599
  from .organization_domain_created_data import (
600
  OrganizationDomainCreatedData as OrganizationDomainCreatedData,
601
  )
602
- from .organization_domain_created_data_state import *
603
- from .organization_domain_created_data_verification_strategy import *
604
  from .organization_domain_data_state import (
605
  OrganizationDomainDataState as OrganizationDomainDataState,
606
  )
@@ -610,8 +574,6 @@ from .organization_domain_deleted import (
610
  from .organization_domain_deleted_data import (
611
  OrganizationDomainDeletedData as OrganizationDomainDeletedData,
612
  )
613
- from .organization_domain_deleted_data_state import *
614
- from .organization_domain_deleted_data_verification_strategy import *
615
  from .organization_domain_state import (
616
  OrganizationDomainState as OrganizationDomainState,
617
  )
@@ -621,8 +583,6 @@ from .organization_domain_updated import (
621
  from .organization_domain_updated_data import (
622
  OrganizationDomainUpdatedData as OrganizationDomainUpdatedData,
623
  )
624
- from .organization_domain_updated_data_state import *
625
- from .organization_domain_updated_data_verification_strategy import *
626
  from .organization_domain_verification_failed import (
627
  OrganizationDomainVerificationFailed as OrganizationDomainVerificationFailed,
628
  )
@@ -632,9 +592,6 @@ from .organization_domain_verification_failed_data import (
632
  from .organization_domain_verification_failed_data_organization_domain import (
633
  OrganizationDomainVerificationFailedDataOrganizationDomain as OrganizationDomainVerificationFailedDataOrganizationDomain,
634
  )
635
- from .organization_domain_verification_failed_data_organization_domain_state import *
636
- from .organization_domain_verification_failed_data_organization_domain_verification_strategy import *
637
- from .organization_domain_verification_failed_data_reason import *
638
  from .organization_domain_verification_strategy import (
639
  OrganizationDomainVerificationStrategy as OrganizationDomainVerificationStrategy,
640
  )
@@ -644,22 +601,18 @@ from .organization_domain_verified import (
644
  from .organization_domain_verified_data import (
645
  OrganizationDomainVerifiedData as OrganizationDomainVerifiedData,
646
  )
647
- from .organization_domain_verified_data_state import *
648
- from .organization_domain_verified_data_verification_strategy import *
649
  from .organization_membership_created import (
650
  OrganizationMembershipCreated as OrganizationMembershipCreated,
651
  )
652
  from .organization_membership_created_data import (
653
  OrganizationMembershipCreatedData as OrganizationMembershipCreatedData,
654
  )
655
- from .organization_membership_created_data_status import *
656
  from .organization_membership_deleted import (
657
  OrganizationMembershipDeleted as OrganizationMembershipDeleted,
658
  )
659
  from .organization_membership_deleted_data import (
660
  OrganizationMembershipDeletedData as OrganizationMembershipDeletedData,
661
  )
662
- from .organization_membership_deleted_data_status import *
663
  from .organization_membership_status import (
664
  OrganizationMembershipStatus as OrganizationMembershipStatus,
665
  )
@@ -669,7 +622,6 @@ from .organization_membership_updated import (
669
  from .organization_membership_updated_data import (
670
  OrganizationMembershipUpdatedData as OrganizationMembershipUpdatedData,
671
  )
672
- from .organization_membership_updated_data_status import *
673
  from .organization_role_created import (
674
  OrganizationRoleCreated as OrganizationRoleCreated,
675
  )
@@ -695,8 +647,6 @@ from .organization_updated_data import (
695
  from .organization_updated_data_domain import (
696
  OrganizationUpdatedDataDomain as OrganizationUpdatedDataDomain,
697
  )
698
- from .organization_updated_data_domain_state import *
699
- from .organization_updated_data_domain_verification_strategy import *
700
  from .pagination_order import PaginationOrder as PaginationOrder
701
  from .password_reset_created import PasswordResetCreated as PasswordResetCreated
702
  from .password_reset_created_data import (
@@ -713,7 +663,6 @@ from .permission_deleted_data import PermissionDeletedData as PermissionDeletedD
713
  from .permission_updated import PermissionUpdated as PermissionUpdated
714
  from .permission_updated_data import PermissionUpdatedData as PermissionUpdatedData
715
  from .pipe_connected_account import PipeConnectedAccount as PipeConnectedAccount
716
- from .pipe_connected_account_state import *
717
  from .pipes_connected_account_connected import (
718
  PipesConnectedAccountConnected as PipesConnectedAccountConnected,
719
  )
@@ -761,18 +710,14 @@ from .role_updated import RoleUpdated as RoleUpdated
761
  from .role_updated_data import RoleUpdatedData as RoleUpdatedData
762
  from .session_created import SessionCreated as SessionCreated
763
  from .session_created_data import SessionCreatedData as SessionCreatedData
764
- from .session_created_data_auth_method import *
765
  from .session_created_data_impersonator import (
766
  SessionCreatedDataImpersonator as SessionCreatedDataImpersonator,
767
  )
768
- from .session_created_data_status import *
769
  from .session_revoked import SessionRevoked as SessionRevoked
770
  from .session_revoked_data import SessionRevokedData as SessionRevokedData
771
- from .session_revoked_data_auth_method import *
772
  from .session_revoked_data_impersonator import (
773
  SessionRevokedDataImpersonator as SessionRevokedDataImpersonator,
774
  )
775
- from .session_revoked_data_status import *
776
  from .slim_role import SlimRole as SlimRole
777
  from .update_custom_provider_definition_authenticate_via import (
778
  UpdateCustomProviderDefinitionAuthenticateVia as UpdateCustomProviderDefinitionAuthenticateVia,
@@ -828,7 +773,6 @@ from .vault_byok_key_deleted import VaultByokKeyDeleted as VaultByokKeyDeleted
828
  from .vault_byok_key_deleted_data import (
829
  VaultByokKeyDeletedData as VaultByokKeyDeletedData,
830
  )
831
- from .vault_byok_key_provider import *
832
  from .vault_byok_key_verification_completed import (
833
  VaultByokKeyVerificationCompleted as VaultByokKeyVerificationCompleted,
834
  )
@@ -837,39 +781,28 @@ from .vault_byok_key_verification_completed_data import (
837
  )
838
  from .vault_data_created import VaultDataCreated as VaultDataCreated
839
  from .vault_data_created_data import VaultDataCreatedData as VaultDataCreatedData
840
- from .vault_data_created_data_actor_source import *
841
  from .vault_data_deleted import VaultDataDeleted as VaultDataDeleted
842
  from .vault_data_deleted_data import VaultDataDeletedData as VaultDataDeletedData
843
- from .vault_data_deleted_data_actor_source import *
844
  from .vault_data_read import VaultDataRead as VaultDataRead
845
  from .vault_data_read_data import VaultDataReadData as VaultDataReadData
846
- from .vault_data_read_data_actor_source import *
847
  from .vault_data_updated import VaultDataUpdated as VaultDataUpdated
848
  from .vault_data_updated_data import VaultDataUpdatedData as VaultDataUpdatedData
849
- from .vault_data_updated_data_actor_source import *
850
  from .vault_dek_decrypted import VaultDekDecrypted as VaultDekDecrypted
851
  from .vault_dek_decrypted_data import VaultDekDecryptedData as VaultDekDecryptedData
852
- from .vault_dek_decrypted_data_actor_source import *
853
  from .vault_dek_read import VaultDekRead as VaultDekRead
854
  from .vault_dek_read_data import VaultDekReadData as VaultDekReadData
855
- from .vault_dek_read_data_actor_source import *
856
  from .vault_kek_created import VaultKekCreated as VaultKekCreated
857
  from .vault_kek_created_data import VaultKekCreatedData as VaultKekCreatedData
858
- from .vault_kek_created_data_actor_source import *
859
  from .vault_kek_deleted import VaultKekDeleted as VaultKekDeleted
860
  from .vault_kek_deleted_data import VaultKekDeletedData as VaultKekDeletedData
861
- from .vault_kek_deleted_data_actor_source import *
862
  from .vault_metadata_read import VaultMetadataRead as VaultMetadataRead
863
  from .vault_metadata_read_data import VaultMetadataReadData as VaultMetadataReadData
864
- from .vault_metadata_read_data_actor_source import *
865
  from .vault_names_listed import VaultNamesListed as VaultNamesListed
866
  from .vault_names_listed_data import VaultNamesListedData as VaultNamesListedData
867
- from .vault_names_listed_data_actor_source import *
868
  from .waitlist_user import WaitlistUser as WaitlistUser
869
  from .waitlist_user_approved import WaitlistUserApproved as WaitlistUserApproved
870
  from .waitlist_user_created import WaitlistUserCreated as WaitlistUserCreated
871
  from .waitlist_user_denied import WaitlistUserDenied as WaitlistUserDenied
872
- from .waitlist_user_state import *
873
  from .webhook_endpoint_status import WebhookEndpointStatus as WebhookEndpointStatus
874
  from .widget_session_token_scopes import (
875
  WidgetSessionTokenScopes as WidgetSessionTokenScopes,
 
44
  from .agent_registration_created_data_agent_identity import (
45
  AgentRegistrationCreatedDataAgentIdentity as AgentRegistrationCreatedDataAgentIdentity,
46
  )
 
 
 
47
  from .agent_registration_credential_issued import (
48
  AgentRegistrationCredentialIssued as AgentRegistrationCredentialIssued,
49
  )
 
240
  from .authentication_radar_risk_detected_data import (
241
  AuthenticationRadarRiskDetectedData as AuthenticationRadarRiskDetectedData,
242
  )
 
243
  from .authentication_reauthentication_succeeded import (
244
  AuthenticationReauthenticationSucceeded as AuthenticationReauthenticationSucceeded,
245
  )
 
314
  from .connection_activated_data import (
315
  ConnectionActivatedData as ConnectionActivatedData,
316
  )
 
317
  from .connection_activated_data_domain import (
318
  ConnectionActivatedDataDomain as ConnectionActivatedDataDomain,
319
  )
 
 
320
  from .connection_deactivated import ConnectionDeactivated as ConnectionDeactivated
321
  from .connection_deactivated_data import (
322
  ConnectionDeactivatedData as ConnectionDeactivatedData,
323
  )
 
324
  from .connection_deactivated_data_domain import (
325
  ConnectionDeactivatedDataDomain as ConnectionDeactivatedDataDomain,
326
  )
 
 
327
  from .connection_deleted import ConnectionDeleted as ConnectionDeleted
328
  from .connection_deleted_data import ConnectionDeletedData as ConnectionDeletedData
 
 
329
  from .connection_saml_certificate_renewal_required import (
330
  ConnectionSAMLCertificateRenewalRequired as ConnectionSAMLCertificateRenewalRequired,
331
  )
 
335
  from .connection_saml_certificate_renewal_required_data_certificate import (
336
  ConnectionSAMLCertificateRenewalRequiredDataCertificate as ConnectionSAMLCertificateRenewalRequiredDataCertificate,
337
  )
 
338
  from .connection_saml_certificate_renewal_required_data_connection import (
339
  ConnectionSAMLCertificateRenewalRequiredDataConnection as ConnectionSAMLCertificateRenewalRequiredDataConnection,
340
  )
 
347
  from .connection_saml_certificate_renewed_data_certificate import (
348
  ConnectionSAMLCertificateRenewedDataCertificate as ConnectionSAMLCertificateRenewedDataCertificate,
349
  )
 
350
  from .connection_saml_certificate_renewed_data_connection import (
351
  ConnectionSAMLCertificateRenewedDataConnection as ConnectionSAMLCertificateRenewedDataConnection,
352
  )
 
410
  from .directory_type import DirectoryType as DirectoryType
411
  from .directory_user import DirectoryUser as DirectoryUser
412
  from .directory_user_email import DirectoryUserEmail as DirectoryUserEmail
 
413
  from .directory_user_with_groups_state import (
414
  DirectoryUserWithGroupsState as DirectoryUserWithGroupsState,
415
  )
 
418
  from .dsync_activated_data_domain import (
419
  DsyncActivatedDataDomain as DsyncActivatedDataDomain,
420
  )
 
 
421
  from .dsync_deleted import DsyncDeleted as DsyncDeleted
422
  from .dsync_deleted_data import DsyncDeletedData as DsyncDeletedData
 
 
423
  from .dsync_group_created import DsyncGroupCreated as DsyncGroupCreated
424
  from .dsync_group_deleted import DsyncGroupDeleted as DsyncGroupDeleted
425
  from .dsync_group_updated import DsyncGroupUpdated as DsyncGroupUpdated
 
443
  from .dsync_user_updated_data_email import (
444
  DsyncUserUpdatedDataEmail as DsyncUserUpdatedDataEmail,
445
  )
 
446
  from .email_verification_created import (
447
  EmailVerificationCreated as EmailVerificationCreated,
448
  )
 
452
  from .error_response import ErrorResponse as ErrorResponse
453
  from .event_context import EventContext as EventContext
454
  from .event_context_actor import EventContextActor as EventContextActor
 
455
  from .event_context_google_analytics_session import (
456
  EventContextGoogleAnalyticsSession as EventContextGoogleAnalyticsSession,
457
  )
 
463
  from .flag_created_context_actor import (
464
  FlagCreatedContextActor as FlagCreatedContextActor,
465
  )
 
466
  from .flag_created_data import FlagCreatedData as FlagCreatedData
467
  from .flag_created_data_owner import FlagCreatedDataOwner as FlagCreatedDataOwner
468
  from .flag_deleted import FlagDeleted as FlagDeleted
 
470
  from .flag_deleted_context_actor import (
471
  FlagDeletedContextActor as FlagDeletedContextActor,
472
  )
 
473
  from .flag_deleted_data import FlagDeletedData as FlagDeletedData
474
  from .flag_deleted_data_owner import FlagDeletedDataOwner as FlagDeletedDataOwner
475
  from .flag_owner import FlagOwner as FlagOwner
476
  from .flag_rule_updated import FlagRuleUpdated as FlagRuleUpdated
477
  from .flag_rule_updated_context import FlagRuleUpdatedContext as FlagRuleUpdatedContext
 
478
  from .flag_rule_updated_context_actor import (
479
  FlagRuleUpdatedContextActor as FlagRuleUpdatedContextActor,
480
  )
 
481
  from .flag_rule_updated_context_configured_target import (
482
  FlagRuleUpdatedContextConfiguredTarget as FlagRuleUpdatedContextConfiguredTarget,
483
  )
 
493
  from .flag_rule_updated_context_previous_attribute_context import (
494
  FlagRuleUpdatedContextPreviousAttributeContext as FlagRuleUpdatedContextPreviousAttributeContext,
495
  )
 
496
  from .flag_rule_updated_context_previous_attribute_context_configured_target import (
497
  FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget as FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget,
498
  )
 
514
  from .flag_updated_context_actor import (
515
  FlagUpdatedContextActor as FlagUpdatedContextActor,
516
  )
 
517
  from .flag_updated_context_previous_attribute import (
518
  FlagUpdatedContextPreviousAttribute as FlagUpdatedContextPreviousAttribute,
519
  )
 
533
  from .group_updated import GroupUpdated as GroupUpdated
534
  from .invitation_accepted import InvitationAccepted as InvitationAccepted
535
  from .invitation_accepted_data import InvitationAcceptedData as InvitationAcceptedData
 
536
  from .invitation_created import InvitationCreated as InvitationCreated
537
  from .invitation_created_data import InvitationCreatedData as InvitationCreatedData
 
538
  from .invitation_resent import InvitationResent as InvitationResent
539
  from .invitation_resent_data import InvitationResentData as InvitationResentData
 
540
  from .invitation_revoked import InvitationRevoked as InvitationRevoked
541
  from .invitation_revoked_data import InvitationRevokedData as InvitationRevokedData
 
542
  from .invitation_state import InvitationState as InvitationState
543
+ from .invite_it_contact_intents import InviteItContactIntents as InviteItContactIntents
544
  from .list_metadata import ListMetadata as ListMetadata
545
  from .magic_auth_created import MagicAuthCreated as MagicAuthCreated
546
  from .magic_auth_created_data import MagicAuthCreatedData as MagicAuthCreatedData
 
551
  from .organization_created_data_domain import (
552
  OrganizationCreatedDataDomain as OrganizationCreatedDataDomain,
553
  )
 
 
554
  from .organization_deleted import OrganizationDeleted as OrganizationDeleted
555
  from .organization_deleted_data import (
556
  OrganizationDeletedData as OrganizationDeletedData,
 
558
  from .organization_deleted_data_domain import (
559
  OrganizationDeletedDataDomain as OrganizationDeletedDataDomain,
560
  )
 
 
561
  from .organization_domain import OrganizationDomain as OrganizationDomain
562
  from .organization_domain_created import (
563
  OrganizationDomainCreated as OrganizationDomainCreated,
 
565
  from .organization_domain_created_data import (
566
  OrganizationDomainCreatedData as OrganizationDomainCreatedData,
567
  )
 
 
568
  from .organization_domain_data_state import (
569
  OrganizationDomainDataState as OrganizationDomainDataState,
570
  )
 
574
  from .organization_domain_deleted_data import (
575
  OrganizationDomainDeletedData as OrganizationDomainDeletedData,
576
  )
 
 
577
  from .organization_domain_state import (
578
  OrganizationDomainState as OrganizationDomainState,
579
  )
 
583
  from .organization_domain_updated_data import (
584
  OrganizationDomainUpdatedData as OrganizationDomainUpdatedData,
585
  )
 
 
586
  from .organization_domain_verification_failed import (
587
  OrganizationDomainVerificationFailed as OrganizationDomainVerificationFailed,
588
  )
 
592
  from .organization_domain_verification_failed_data_organization_domain import (
593
  OrganizationDomainVerificationFailedDataOrganizationDomain as OrganizationDomainVerificationFailedDataOrganizationDomain,
594
  )
 
 
 
595
  from .organization_domain_verification_strategy import (
596
  OrganizationDomainVerificationStrategy as OrganizationDomainVerificationStrategy,
597
  )
 
601
  from .organization_domain_verified_data import (
602
  OrganizationDomainVerifiedData as OrganizationDomainVerifiedData,
603
  )
 
 
604
  from .organization_membership_created import (
605
  OrganizationMembershipCreated as OrganizationMembershipCreated,
606
  )
607
  from .organization_membership_created_data import (
608
  OrganizationMembershipCreatedData as OrganizationMembershipCreatedData,
609
  )
 
610
  from .organization_membership_deleted import (
611
  OrganizationMembershipDeleted as OrganizationMembershipDeleted,
612
  )
613
  from .organization_membership_deleted_data import (
614
  OrganizationMembershipDeletedData as OrganizationMembershipDeletedData,
615
  )
 
616
  from .organization_membership_status import (
617
  OrganizationMembershipStatus as OrganizationMembershipStatus,
618
  )
 
622
  from .organization_membership_updated_data import (
623
  OrganizationMembershipUpdatedData as OrganizationMembershipUpdatedData,
624
  )
 
625
  from .organization_role_created import (
626
  OrganizationRoleCreated as OrganizationRoleCreated,
627
  )
 
647
  from .organization_updated_data_domain import (
648
  OrganizationUpdatedDataDomain as OrganizationUpdatedDataDomain,
649
  )
 
 
650
  from .pagination_order import PaginationOrder as PaginationOrder
651
  from .password_reset_created import PasswordResetCreated as PasswordResetCreated
652
  from .password_reset_created_data import (
 
663
  from .permission_updated import PermissionUpdated as PermissionUpdated
664
  from .permission_updated_data import PermissionUpdatedData as PermissionUpdatedData
665
  from .pipe_connected_account import PipeConnectedAccount as PipeConnectedAccount
 
666
  from .pipes_connected_account_connected import (
667
  PipesConnectedAccountConnected as PipesConnectedAccountConnected,
668
  )
 
710
  from .role_updated_data import RoleUpdatedData as RoleUpdatedData
711
  from .session_created import SessionCreated as SessionCreated
712
  from .session_created_data import SessionCreatedData as SessionCreatedData
 
713
  from .session_created_data_impersonator import (
714
  SessionCreatedDataImpersonator as SessionCreatedDataImpersonator,
715
  )
 
716
  from .session_revoked import SessionRevoked as SessionRevoked
717
  from .session_revoked_data import SessionRevokedData as SessionRevokedData
 
718
  from .session_revoked_data_impersonator import (
719
  SessionRevokedDataImpersonator as SessionRevokedDataImpersonator,
720
  )
 
721
  from .slim_role import SlimRole as SlimRole
722
  from .update_custom_provider_definition_authenticate_via import (
723
  UpdateCustomProviderDefinitionAuthenticateVia as UpdateCustomProviderDefinitionAuthenticateVia,
 
773
  from .vault_byok_key_deleted_data import (
774
  VaultByokKeyDeletedData as VaultByokKeyDeletedData,
775
  )
 
776
  from .vault_byok_key_verification_completed import (
777
  VaultByokKeyVerificationCompleted as VaultByokKeyVerificationCompleted,
778
  )
 
781
  )
782
  from .vault_data_created import VaultDataCreated as VaultDataCreated
783
  from .vault_data_created_data import VaultDataCreatedData as VaultDataCreatedData
 
784
  from .vault_data_deleted import VaultDataDeleted as VaultDataDeleted
785
  from .vault_data_deleted_data import VaultDataDeletedData as VaultDataDeletedData
 
786
  from .vault_data_read import VaultDataRead as VaultDataRead
787
  from .vault_data_read_data import VaultDataReadData as VaultDataReadData
 
788
  from .vault_data_updated import VaultDataUpdated as VaultDataUpdated
789
  from .vault_data_updated_data import VaultDataUpdatedData as VaultDataUpdatedData
 
790
  from .vault_dek_decrypted import VaultDekDecrypted as VaultDekDecrypted
791
  from .vault_dek_decrypted_data import VaultDekDecryptedData as VaultDekDecryptedData
 
792
  from .vault_dek_read import VaultDekRead as VaultDekRead
793
  from .vault_dek_read_data import VaultDekReadData as VaultDekReadData
 
794
  from .vault_kek_created import VaultKekCreated as VaultKekCreated
795
  from .vault_kek_created_data import VaultKekCreatedData as VaultKekCreatedData
 
796
  from .vault_kek_deleted import VaultKekDeleted as VaultKekDeleted
797
  from .vault_kek_deleted_data import VaultKekDeletedData as VaultKekDeletedData
 
798
  from .vault_metadata_read import VaultMetadataRead as VaultMetadataRead
799
  from .vault_metadata_read_data import VaultMetadataReadData as VaultMetadataReadData
 
800
  from .vault_names_listed import VaultNamesListed as VaultNamesListed
801
  from .vault_names_listed_data import VaultNamesListedData as VaultNamesListedData
 
802
  from .waitlist_user import WaitlistUser as WaitlistUser
803
  from .waitlist_user_approved import WaitlistUserApproved as WaitlistUserApproved
804
  from .waitlist_user_created import WaitlistUserCreated as WaitlistUserCreated
805
  from .waitlist_user_denied import WaitlistUserDenied as WaitlistUserDenied
 
806
  from .webhook_endpoint_status import WebhookEndpointStatus as WebhookEndpointStatus
807
  from .widget_session_token_scopes import (
808
  WidgetSessionTokenScopes as WidgetSessionTokenScopes,
python/src/workos/common/models/invite_it_contact_intents.py
python/src/workos/common/models/invite_it_contact_intents.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ """Enumeration of invite it contact intents values."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Literal, TypeAlias
9
+
10
+
11
+ class InviteItContactIntents(str, Enum):
12
+ """Known values for InviteItContactIntents."""
13
+
14
+ SSO = "sso"
15
+ DIRECTORY_SYNC = "directory_sync"
16
+ LOG_STREAMS = "log_streams"
17
+ DOMAIN_VERIFICATION = "domain_verification"
18
+ BRING_YOUR_OWN_KEY = "bring_your_own_key"
19
+
20
+ @classmethod
21
+ def _missing_(cls, value: object) -> InviteItContactIntents | None:
22
+ if not isinstance(value, str):
23
+ return None
24
+ unknown = str.__new__(cls, value)
25
+ unknown._name_ = value.upper()
26
+ unknown._value_ = value
27
+ return unknown
28
+
29
+
30
+ InviteItContactIntentsLiteral: TypeAlias = Literal[
31
+ "sso", "directory_sync", "log_streams", "domain_verification", "bring_your_own_key"
32
+ ]
python/src/workos/common/models/waitlist_user.py
python/src/workos/common/models/waitlist_user.py CHANGED
@@ -16,29 +16,30 @@ from .waitlist_user_state import WaitlistUserState
16
  class WaitlistUser:
17
  """Waitlist User model."""
18
 
19
- object: Literal["waitlist_user"]
20
- """Distinguishes the Waitlist User object."""
21
  id: str
22
- """The unique ID of the Waitlist User."""
23
  email: str
24
- """The email address of the Waitlist User."""
25
  state: WaitlistUserState
26
- """The state of the Waitlist User."""
27
  approved_at: datetime | None
28
- """The timestamp when the Waitlist User was approved, or null if not yet approved."""
29
  created_at: datetime
30
  """An ISO 8601 timestamp."""
31
  updated_at: datetime
32
  """An ISO 8601 timestamp."""
 
 
 
 
33
  waitlist_id: str | None = None
34
- """The unique ID of the Waitlist that the Waitlist User joined."""
35
 
36
  @classmethod
37
  def from_dict(cls, data: dict[str, Any]) -> WaitlistUser:
38
  """Deserialize from a dictionary."""
39
  try:
40
  return cls(
41
- object=data.get("object", "waitlist_user"),
42
  id=data["id"],
43
  email=data["email"],
44
  state=WaitlistUserState(data["state"]),
@@ -47,6 +48,8 @@ class WaitlistUser:
47
  else None,
48
  created_at=_parse_datetime(data["created_at"]),
49
  updated_at=_parse_datetime(data["updated_at"]),
 
 
50
  waitlist_id=data.get("waitlist_id"),
51
  )
52
  except (KeyError, ValueError) as e:
@@ -55,7 +58,6 @@ class WaitlistUser:
55
  def to_dict(self) -> dict[str, Any]:
56
  """Serialize to a dictionary."""
57
  result: dict[str, Any] = {}
58
- result["object"] = self.object
59
  result["id"] = self.id
60
  result["email"] = self.email
61
  result["state"] = (
@@ -67,6 +69,9 @@ class WaitlistUser:
67
  result["approved_at"] = None
68
  result["created_at"] = _format_datetime(self.created_at)
69
  result["updated_at"] = _format_datetime(self.updated_at)
 
 
 
70
  if self.waitlist_id is not None:
71
  result["waitlist_id"] = self.waitlist_id
72
  else:
 
16
  class WaitlistUser:
17
  """Waitlist User model."""
18
 
 
 
19
  id: str
20
+ """The unique ID of the waitlist entry."""
21
  email: str
22
+ """The email address of the user on the waitlist."""
23
  state: WaitlistUserState
24
+ """The state of the waitlist entry."""
25
  approved_at: datetime | None
26
+ """The timestamp when the entry was approved, or null if not yet approved."""
27
  created_at: datetime
28
  """An ISO 8601 timestamp."""
29
  updated_at: datetime
30
  """An ISO 8601 timestamp."""
31
+ object: Literal["waitlist_user"]
32
+ """Distinguishes the Waitlist User object."""
33
+ additional_fields: dict[str, str] | None = None
34
+ """Additional fields submitted when the user joined the waitlist. Values are user-provided — treat them as untrusted input when rendering or exporting."""
35
  waitlist_id: str | None = None
36
+ """The unique ID of the waitlist the entry belongs to."""
37
 
38
  @classmethod
39
  def from_dict(cls, data: dict[str, Any]) -> WaitlistUser:
40
  """Deserialize from a dictionary."""
41
  try:
42
  return cls(
 
43
  id=data["id"],
44
  email=data["email"],
45
  state=WaitlistUserState(data["state"]),
 
48
  else None,
49
  created_at=_parse_datetime(data["created_at"]),
50
  updated_at=_parse_datetime(data["updated_at"]),
51
+ object=data.get("object", "waitlist_user"),
52
+ additional_fields=data.get("additional_fields"),
53
  waitlist_id=data.get("waitlist_id"),
54
  )
55
  except (KeyError, ValueError) as e:
 
58
  def to_dict(self) -> dict[str, Any]:
59
  """Serialize to a dictionary."""
60
  result: dict[str, Any] = {}
 
61
  result["id"] = self.id
62
  result["email"] = self.email
63
  result["state"] = (
 
69
  result["approved_at"] = None
70
  result["created_at"] = _format_datetime(self.created_at)
71
  result["updated_at"] = _format_datetime(self.updated_at)
72
+ result["object"] = self.object
73
+ if self.additional_fields is not None:
74
+ result["additional_fields"] = self.additional_fields
75
  if self.waitlist_id is not None:
76
  result["waitlist_id"] = self.waitlist_id
77
  else:
python/src/workos/organizations/_resource.py
python/src/workos/organizations/_resource.py CHANGED
@@ -98,7 +98,7 @@ class Organizations:
98
  Args:
99
  name: The name of the organization.
100
  allow_profiles_outside_organization: Whether the organization allows profiles from outside the organization to sign in.
101
- domains: The domains associated with the organization. Deprecated in favor of `domain_data`.
102
  domain_data: The domains associated with the organization, including verification state.
103
  metadata: Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
104
  external_id: An external identifier for the Organization.
@@ -451,7 +451,7 @@ class AsyncOrganizations:
451
  Args:
452
  name: The name of the organization.
453
  allow_profiles_outside_organization: Whether the organization allows profiles from outside the organization to sign in.
454
- domains: The domains associated with the organization. Deprecated in favor of `domain_data`.
455
  domain_data: The domains associated with the organization, including verification state.
456
  metadata: Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
457
  external_id: An external identifier for the Organization.
 
98
  Args:
99
  name: The name of the organization.
100
  allow_profiles_outside_organization: Whether the organization allows profiles from outside the organization to sign in.
101
+ domains: (deprecated) The domains associated with the organization. Deprecated in favor of `domain_data`.
102
  domain_data: The domains associated with the organization, including verification state.
103
  metadata: Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
104
  external_id: An external identifier for the Organization.
 
451
  Args:
452
  name: The name of the organization.
453
  allow_profiles_outside_organization: Whether the organization allows profiles from outside the organization to sign in.
454
+ domains: (deprecated) The domains associated with the organization. Deprecated in favor of `domain_data`.
455
  domain_data: The domains associated with the organization, including verification state.
456
  metadata: Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
457
  external_id: An external identifier for the Organization.
python/src/workos/organizations/models/organization_input.py
python/src/workos/organizations/models/organization_input.py CHANGED
@@ -19,7 +19,9 @@ class OrganizationInput:
19
  allow_profiles_outside_organization: bool | None = None
20
  """Whether the organization allows profiles from outside the organization to sign in."""
21
  domains: list[str] | None = None
22
- """The domains associated with the organization. Deprecated in favor of `domain_data`."""
 
 
23
  domain_data: list[OrganizationDomainData] | None = None
24
  """The domains associated with the organization, including verification state."""
25
  metadata: dict[str, str] | None = None
 
19
  allow_profiles_outside_organization: bool | None = None
20
  """Whether the organization allows profiles from outside the organization to sign in."""
21
  domains: list[str] | None = None
22
+ """The domains associated with the organization. Deprecated in favor of `domain_data`.
23
+
24
+ .. deprecated:: This field is deprecated."""
25
  domain_data: list[OrganizationDomainData] | None = None
26
  """The domains associated with the organization, including verification state."""
27
  metadata: dict[str, str] | None = None
python/src/workos/organizations_it_contacts/__init__.py
python/src/workos/organizations_it_contacts/__init__.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from ._resource import AsyncOrganizationsItContacts as AsyncOrganizationsItContacts
4
+ from ._resource import OrganizationsItContacts as OrganizationsItContacts
5
+ from .models import *
python/src/workos/organizations_it_contacts/_resource.py
python/src/workos/organizations_it_contacts/_resource.py ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any
6
+
7
+ if TYPE_CHECKING:
8
+ from .._client import AsyncWorkOSClient, WorkOSClient
9
+
10
+ from workos.common.models.invite_it_contact_intents import InviteItContactIntents
11
+
12
+ from .._types import RequestOptions
13
+ from .models import ItContact, ItContactList
14
+
15
+
16
+ class OrganizationsItContacts:
17
+ """Organizations It Contacts API resources."""
18
+
19
+ def __init__(self, client: WorkOSClient) -> None:
20
+ self._client = client
21
+
22
+ def list_organization_it_contacts(
23
+ self,
24
+ organization_id: str,
25
+ *,
26
+ request_options: RequestOptions | None = None,
27
+ ) -> ItContactList:
28
+ """List IT contacts
29
+
30
+ Get the IT contacts for an organization.
31
+
32
+ Args:
33
+ organization_id: The ID of the organization.
34
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
35
+
36
+ Returns:
37
+ ItContactList
38
+
39
+ Raises:
40
+ AuthorizationError: If the request is forbidden (403).
41
+ NotFoundError: If the resource is not found (404).
42
+ AuthenticationError: If the API key is invalid (401).
43
+ RateLimitExceededError: If rate limited (429).
44
+ ServerError: If the server returns a 5xx error.
45
+ """
46
+ return self._client.request(
47
+ method="get",
48
+ path=("organizations", str(organization_id), "it_contacts"),
49
+ model=ItContactList,
50
+ request_options=request_options,
51
+ )
52
+
53
+ def create_organization_it_contact(
54
+ self,
55
+ organization_id: str,
56
+ *,
57
+ email: str,
58
+ request_options: RequestOptions | None = None,
59
+ ) -> ItContact:
60
+ """Create an IT contact
61
+
62
+ Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
63
+
64
+ Args:
65
+ organization_id: The ID of the organization.
66
+ email: The email address of the IT contact.
67
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
68
+
69
+ Returns:
70
+ ItContact
71
+
72
+ Raises:
73
+ AuthorizationError: If the request is forbidden (403).
74
+ NotFoundError: If the resource is not found (404).
75
+ ConflictError: If a conflict occurs (409).
76
+ UnprocessableEntityError: If the request data is unprocessable (422).
77
+ AuthenticationError: If the API key is invalid (401).
78
+ RateLimitExceededError: If rate limited (429).
79
+ ServerError: If the server returns a 5xx error.
80
+ """
81
+ body: dict[str, Any] = {
82
+ "email": email,
83
+ }
84
+ return self._client.request(
85
+ method="post",
86
+ path=("organizations", str(organization_id), "it_contacts"),
87
+ body=body,
88
+ model=ItContact,
89
+ request_options=request_options,
90
+ )
91
+
92
+ def delete_organization_it_contact(
93
+ self,
94
+ organization_id: str,
95
+ contact_id: str,
96
+ *,
97
+ request_options: RequestOptions | None = None,
98
+ ) -> None:
99
+ """Delete an IT contact
100
+
101
+ Remove an IT contact from an organization and revoke the contact's active setup links.
102
+
103
+ Args:
104
+ organization_id: The ID of the organization.
105
+ contact_id: The ID of the IT contact.
106
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
107
+
108
+ Raises:
109
+ AuthorizationError: If the request is forbidden (403).
110
+ NotFoundError: If the resource is not found (404).
111
+ AuthenticationError: If the API key is invalid (401).
112
+ RateLimitExceededError: If rate limited (429).
113
+ ServerError: If the server returns a 5xx error.
114
+ """
115
+ self._client.request(
116
+ method="delete",
117
+ path=(
118
+ "organizations",
119
+ str(organization_id),
120
+ "it_contacts",
121
+ str(contact_id),
122
+ ),
123
+ request_options=request_options,
124
+ )
125
+
126
+ def create_it_contact_invite(
127
+ self,
128
+ organization_id: str,
129
+ contact_id: str,
130
+ *,
131
+ intents: list[InviteItContactIntents | str],
132
+ request_options: RequestOptions | None = None,
133
+ ) -> None:
134
+ """Invite an IT contact
135
+
136
+ Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
137
+
138
+ Args:
139
+ organization_id: The ID of the organization.
140
+ contact_id: The ID of the IT contact.
141
+ intents: The Admin Portal features that the IT contact can configure.
142
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
143
+
144
+ Raises:
145
+ AuthorizationError: If the request is forbidden (403).
146
+ NotFoundError: If the resource is not found (404).
147
+ ConflictError: If a conflict occurs (409).
148
+ UnprocessableEntityError: If the request data is unprocessable (422).
149
+ AuthenticationError: If the API key is invalid (401).
150
+ RateLimitExceededError: If rate limited (429).
151
+ ServerError: If the server returns a 5xx error.
152
+ """
153
+ body: dict[str, Any] = {
154
+ "intents": intents,
155
+ }
156
+ self._client.request(
157
+ method="post",
158
+ path=(
159
+ "organizations",
160
+ str(organization_id),
161
+ "it_contacts",
162
+ str(contact_id),
163
+ "invite",
164
+ ),
165
+ body=body,
166
+ request_options=request_options,
167
+ )
168
+
169
+ def revoke_it_contact(
170
+ self,
171
+ organization_id: str,
172
+ contact_id: str,
173
+ *,
174
+ request_options: RequestOptions | None = None,
175
+ ) -> None:
176
+ """Revoke an IT contact's invitation
177
+
178
+ Revoke the organization's active Admin Portal invitation.
179
+
180
+ Args:
181
+ organization_id: The ID of the organization.
182
+ contact_id: The ID of the IT contact.
183
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
184
+
185
+ Raises:
186
+ AuthorizationError: If the request is forbidden (403).
187
+ NotFoundError: If the resource is not found (404).
188
+ AuthenticationError: If the API key is invalid (401).
189
+ RateLimitExceededError: If rate limited (429).
190
+ ServerError: If the server returns a 5xx error.
191
+ """
192
+ self._client.request(
193
+ method="post",
194
+ path=(
195
+ "organizations",
196
+ str(organization_id),
197
+ "it_contacts",
198
+ str(contact_id),
199
+ "revoke",
200
+ ),
201
+ request_options=request_options,
202
+ )
203
+
204
+
205
+ class AsyncOrganizationsItContacts:
206
+ """Organizations It Contacts API resources (async)."""
207
+
208
+ def __init__(self, client: AsyncWorkOSClient) -> None:
209
+ self._client = client
210
+
211
+ async def list_organization_it_contacts(
212
+ self,
213
+ organization_id: str,
214
+ *,
215
+ request_options: RequestOptions | None = None,
216
+ ) -> ItContactList:
217
+ """List IT contacts
218
+
219
+ Get the IT contacts for an organization.
220
+
221
+ Args:
222
+ organization_id: The ID of the organization.
223
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
224
+
225
+ Returns:
226
+ ItContactList
227
+
228
+ Raises:
229
+ AuthorizationError: If the request is forbidden (403).
230
+ NotFoundError: If the resource is not found (404).
231
+ AuthenticationError: If the API key is invalid (401).
232
+ RateLimitExceededError: If rate limited (429).
233
+ ServerError: If the server returns a 5xx error.
234
+ """
235
+ return await self._client.request(
236
+ method="get",
237
+ path=("organizations", str(organization_id), "it_contacts"),
238
+ model=ItContactList,
239
+ request_options=request_options,
240
+ )
241
+
242
+ async def create_organization_it_contact(
243
+ self,
244
+ organization_id: str,
245
+ *,
246
+ email: str,
247
+ request_options: RequestOptions | None = None,
248
+ ) -> ItContact:
249
+ """Create an IT contact
250
+
251
+ Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
252
+
253
+ Args:
254
+ organization_id: The ID of the organization.
255
+ email: The email address of the IT contact.
256
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
257
+
258
+ Returns:
259
+ ItContact
260
+
261
+ Raises:
262
+ AuthorizationError: If the request is forbidden (403).
263
+ NotFoundError: If the resource is not found (404).
264
+ ConflictError: If a conflict occurs (409).
265
+ UnprocessableEntityError: If the request data is unprocessable (422).
266
+ AuthenticationError: If the API key is invalid (401).
267
+ RateLimitExceededError: If rate limited (429).
268
+ ServerError: If the server returns a 5xx error.
269
+ """
270
+ body: dict[str, Any] = {
271
+ "email": email,
272
+ }
273
+ return await self._client.request(
274
+ method="post",
275
+ path=("organizations", str(organization_id), "it_contacts"),
276
+ body=body,
277
+ model=ItContact,
278
+ request_options=request_options,
279
+ )
280
+
281
+ async def delete_organization_it_contact(
282
+ self,
283
+ organization_id: str,
284
+ contact_id: str,
285
+ *,
286
+ request_options: RequestOptions | None = None,
287
+ ) -> None:
288
+ """Delete an IT contact
289
+
290
+ Remove an IT contact from an organization and revoke the contact's active setup links.
291
+
292
+ Args:
293
+ organization_id: The ID of the organization.
294
+ contact_id: The ID of the IT contact.
295
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
296
+
297
+ Raises:
298
+ AuthorizationError: If the request is forbidden (403).
299
+ NotFoundError: If the resource is not found (404).
300
+ AuthenticationError: If the API key is invalid (401).
301
+ RateLimitExceededError: If rate limited (429).
302
+ ServerError: If the server returns a 5xx error.
303
+ """
304
+ await self._client.request(
305
+ method="delete",
306
+ path=(
307
+ "organizations",
308
+ str(organization_id),
309
+ "it_contacts",
310
+ str(contact_id),
311
+ ),
312
+ request_options=request_options,
313
+ )
314
+
315
+ async def create_it_contact_invite(
316
+ self,
317
+ organization_id: str,
318
+ contact_id: str,
319
+ *,
320
+ intents: list[InviteItContactIntents | str],
321
+ request_options: RequestOptions | None = None,
322
+ ) -> None:
323
+ """Invite an IT contact
324
+
325
+ Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
326
+
327
+ Args:
328
+ organization_id: The ID of the organization.
329
+ contact_id: The ID of the IT contact.
330
+ intents: The Admin Portal features that the IT contact can configure.
331
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
332
+
333
+ Raises:
334
+ AuthorizationError: If the request is forbidden (403).
335
+ NotFoundError: If the resource is not found (404).
336
+ ConflictError: If a conflict occurs (409).
337
+ UnprocessableEntityError: If the request data is unprocessable (422).
338
+ AuthenticationError: If the API key is invalid (401).
339
+ RateLimitExceededError: If rate limited (429).
340
+ ServerError: If the server returns a 5xx error.
341
+ """
342
+ body: dict[str, Any] = {
343
+ "intents": intents,
344
+ }
345
+ await self._client.request(
346
+ method="post",
347
+ path=(
348
+ "organizations",
349
+ str(organization_id),
350
+ "it_contacts",
351
+ str(contact_id),
352
+ "invite",
353
+ ),
354
+ body=body,
355
+ request_options=request_options,
356
+ )
357
+
358
+ async def revoke_it_contact(
359
+ self,
360
+ organization_id: str,
361
+ contact_id: str,
362
+ *,
363
+ request_options: RequestOptions | None = None,
364
+ ) -> None:
365
+ """Revoke an IT contact's invitation
366
+
367
+ Revoke the organization's active Admin Portal invitation.
368
+
369
+ Args:
370
+ organization_id: The ID of the organization.
371
+ contact_id: The ID of the IT contact.
372
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
373
+
374
+ Raises:
375
+ AuthorizationError: If the request is forbidden (403).
376
+ NotFoundError: If the resource is not found (404).
377
+ AuthenticationError: If the API key is invalid (401).
378
+ RateLimitExceededError: If rate limited (429).
379
+ ServerError: If the server returns a 5xx error.
380
+ """
381
+ await self._client.request(
382
+ method="post",
383
+ path=(
384
+ "organizations",
385
+ str(organization_id),
386
+ "it_contacts",
387
+ str(contact_id),
388
+ "revoke",
389
+ ),
390
+ request_options=request_options,
391
+ )
python/src/workos/organizations_it_contacts/models/__init__.py
python/src/workos/organizations_it_contacts/models/__init__.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from .create_it_contact import CreateItContact as CreateItContact
4
+ from .invite_it_contact import InviteItContact as InviteItContact
5
+ from .it_contact import ItContact as ItContact
6
+ from .it_contact_list import ItContactList as ItContactList
7
+ from .it_contact_list_list_metadata import (
8
+ ItContactListListMetadata as ItContactListListMetadata,
9
+ )
python/src/workos/organizations_it_contacts/models/create_it_contact.py
python/src/workos/organizations_it_contacts/models/create_it_contact.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+ from typing import Any
7
+
8
+ from workos._types import _raise_deserialize_error
9
+
10
+
11
+ @dataclass(slots=True)
12
+ class CreateItContact:
13
+ """Create It Contact model."""
14
+
15
+ email: str
16
+ """The email address of the IT contact."""
17
+
18
+ @classmethod
19
+ def from_dict(cls, data: dict[str, Any]) -> CreateItContact:
20
+ """Deserialize from a dictionary."""
21
+ try:
22
+ return cls(
23
+ email=data["email"],
24
+ )
25
+ except (KeyError, ValueError) as e:
26
+ _raise_deserialize_error("CreateItContact", e)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ """Serialize to a dictionary."""
30
+ result: dict[str, Any] = {}
31
+ result["email"] = self.email
32
+ return result
python/src/workos/organizations_it_contacts/models/invite_it_contact.py
python/src/workos/organizations_it_contacts/models/invite_it_contact.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+ from enum import Enum
7
+ from typing import Any, cast
8
+
9
+ from workos._types import _raise_deserialize_error
10
+ from workos.common.models.invite_it_contact_intents import InviteItContactIntents
11
+
12
+
13
+ @dataclass(slots=True)
14
+ class InviteItContact:
15
+ """Invite It Contact model."""
16
+
17
+ intents: list[InviteItContactIntents]
18
+ """The Admin Portal features that the IT contact can configure."""
19
+
20
+ @classmethod
21
+ def from_dict(cls, data: dict[str, Any]) -> InviteItContact:
22
+ """Deserialize from a dictionary."""
23
+ try:
24
+ return cls(
25
+ intents=[
26
+ InviteItContactIntents(item)
27
+ for item in cast(list[Any], data["intents"])
28
+ ],
29
+ )
30
+ except (KeyError, ValueError) as e:
31
+ _raise_deserialize_error("InviteItContact", e)
32
+
33
+ def to_dict(self) -> dict[str, Any]:
34
+ """Serialize to a dictionary."""
35
+ result: dict[str, Any] = {}
36
+ result["intents"] = [
37
+ item.value if isinstance(item, Enum) else item for item in self.intents
38
+ ]
39
+ return result
python/src/workos/organizations_it_contacts/models/it_contact.py
python/src/workos/organizations_it_contacts/models/it_contact.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+ from datetime import datetime
7
+ from typing import Any, Literal
8
+
9
+ from workos._types import _format_datetime, _parse_datetime, _raise_deserialize_error
10
+
11
+
12
+ @dataclass(slots=True)
13
+ class ItContact:
14
+ """It Contact model."""
15
+
16
+ object: Literal["it_contact"]
17
+ """The IT Contact object."""
18
+ id: str
19
+ """The unique ID of the IT Contact."""
20
+ email: str
21
+ """The email address of the IT Contact."""
22
+ created_at: datetime
23
+ """An ISO 8601 timestamp."""
24
+ updated_at: datetime
25
+ """An ISO 8601 timestamp."""
26
+
27
+ @classmethod
28
+ def from_dict(cls, data: dict[str, Any]) -> ItContact:
29
+ """Deserialize from a dictionary."""
30
+ try:
31
+ return cls(
32
+ object=data.get("object", "it_contact"),
33
+ id=data["id"],
34
+ email=data["email"],
35
+ created_at=_parse_datetime(data["created_at"]),
36
+ updated_at=_parse_datetime(data["updated_at"]),
37
+ )
38
+ except (KeyError, ValueError) as e:
39
+ _raise_deserialize_error("ItContact", e)
40
+
41
+ def to_dict(self) -> dict[str, Any]:
42
+ """Serialize to a dictionary."""
43
+ result: dict[str, Any] = {}
44
+ result["object"] = self.object
45
+ result["id"] = self.id
46
+ result["email"] = self.email
47
+ result["created_at"] = _format_datetime(self.created_at)
48
+ result["updated_at"] = _format_datetime(self.updated_at)
49
+ return result
python/src/workos/organizations_it_contacts/models/it_contact_list.py
python/src/workos/organizations_it_contacts/models/it_contact_list.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from __future__ import annotations
4
+
5
+ from dataclasses import dataclass
6
+ from typing import Any, Literal, cast
7
+
8
+ from workos._types import _raise_deserialize_error
9
+
10
+ from .it_contact import ItContact
11
+ from .it_contact_list_list_metadata import ItContactListListMetadata
12
+
13
+
14
+ @dataclass(slots=True)
15
+ class ItContactList:
16
+ """It Contact List model."""
17
+
18
+ object: Literal["list"]
19
+ """Indicates this is a list response."""
20
+ data: list[ItContact]
21
+ """The list of records for the current page."""
22
+ list_metadata: ItContactListListMetadata
23
+ """Pagination cursors for navigating between pages of results."""
24
+
25
+ @classmethod
26
+ def from_dict(cls, data: dict[str, Any]) -> ItContactList:
27
+ """Deserialize from a dictionary."""
28
+ try:
29
+ return cls(
30
+ object=data.get("object", "list"),
31
+ data=[
32
+ ItContact.from_dict(cast(dict[str, Any], item))
33
+ for item in cast(list[Any], data["data"])
34
+ ],
35
+ list_metadata=ItContactListListMetadata.from_dict(
36
+ cast(dict[str, Any], data["list_metadata"])
37
+ ),
38
+ )
39
+ except (KeyError, ValueError) as e:
40
+ _raise_deserialize_error("ItContactList", e)
41
+
42
+ def to_dict(self) -> dict[str, Any]:
43
+ """Serialize to a dictionary."""
44
+ result: dict[str, Any] = {}
45
+ result["object"] = self.object
46
+ result["data"] = [item.to_dict() for item in self.data]
47
+ result["list_metadata"] = self.list_metadata.to_dict()
48
+ return result
python/src/workos/organizations_it_contacts/models/it_contact_list_list_metadata.py
python/src/workos/organizations_it_contacts/models/it_contact_list_list_metadata.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TypeAlias
4
+
5
+ from workos.common.models.authorization_permission_list_list_metadata import (
6
+ AuthorizationPermissionListListMetadata,
7
+ )
8
+
9
+ ItContactListListMetadata: TypeAlias = AuthorizationPermissionListListMetadata
python/src/workos/types/organizations_it_contacts/__init__.py
python/src/workos/types/organizations_it_contacts/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from workos.organizations_it_contacts.models import *
python/src/workos/user_management/_resource.py
python/src/workos/user_management/_resource.py CHANGED
@@ -1324,7 +1324,6 @@ class UserManagement:
1324
 
1325
  Raises:
1326
  NotFoundError: If the resource is not found (404).
1327
- ConflictError: If a conflict occurs (409).
1328
  AuthenticationError: If the API key is invalid (401).
1329
  RateLimitExceededError: If rate limited (429).
1330
  ServerError: If the server returns a 5xx error.
@@ -3692,7 +3691,6 @@ class AsyncUserManagement:
3692
 
3693
  Raises:
3694
  NotFoundError: If the resource is not found (404).
3695
- ConflictError: If a conflict occurs (409).
3696
  AuthenticationError: If the API key is invalid (401).
3697
  RateLimitExceededError: If rate limited (429).
3698
  ServerError: If the server returns a 5xx error.
 
1324
 
1325
  Raises:
1326
  NotFoundError: If the resource is not found (404).
 
1327
  AuthenticationError: If the API key is invalid (401).
1328
  RateLimitExceededError: If rate limited (429).
1329
  ServerError: If the server returns a 5xx error.
 
3691
 
3692
  Raises:
3693
  NotFoundError: If the resource is not found (404).
 
3694
  AuthenticationError: If the API key is invalid (401).
3695
  RateLimitExceededError: If rate limited (429).
3696
  ServerError: If the server returns a 5xx error.
python/src/workos/user_management/models/create_password_reset_token.py
python/src/workos/user_management/models/create_password_reset_token.py CHANGED
@@ -1,32 +1,7 @@
1
  # This file is auto-generated by oagen. Do not edit.
2
 
3
- from __future__ import annotations
4
 
5
- from dataclasses import dataclass
6
- from typing import Any
7
 
8
- from workos._types import _raise_deserialize_error
9
-
10
-
11
- @dataclass(slots=True)
12
- class CreatePasswordResetToken:
13
- """Create Password Reset Token model."""
14
-
15
- email: str
16
- """The email address of the user requesting a password reset."""
17
-
18
- @classmethod
19
- def from_dict(cls, data: dict[str, Any]) -> CreatePasswordResetToken:
20
- """Deserialize from a dictionary."""
21
- try:
22
- return cls(
23
- email=data["email"],
24
- )
25
- except (KeyError, ValueError) as e:
26
- _raise_deserialize_error("CreatePasswordResetToken", e)
27
-
28
- def to_dict(self) -> dict[str, Any]:
29
- """Serialize to a dictionary."""
30
- result: dict[str, Any] = {}
31
- result["email"] = self.email
32
- return result
 
1
  # This file is auto-generated by oagen. Do not edit.
2
 
3
+ from typing import TypeAlias
4
 
5
+ from workos.organizations_it_contacts.models.create_it_contact import CreateItContact
 
6
 
 
 
 
 
 
7
+ CreatePasswordResetToken: TypeAlias = CreateItContact
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
python/tests/fixtures/create_it_contact.json
python/tests/fixtures/create_it_contact.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "email": "it-contact@example.com"
3
+ }
python/tests/fixtures/invite_it_contact.json
python/tests/fixtures/invite_it_contact.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "intents": [
3
+ "sso",
4
+ "directory_sync"
5
+ ]
6
+ }
python/tests/fixtures/it_contact.json
python/tests/fixtures/it_contact.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "it_contact",
3
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
4
+ "email": "it-contact@example.com",
5
+ "created_at": "2026-01-15T12:00:00.000Z",
6
+ "updated_at": "2026-01-15T12:00:00.000Z"
7
+ }
python/tests/fixtures/it_contact_list.json
python/tests/fixtures/it_contact_list.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "list",
3
+ "data": [
4
+ {
5
+ "object": "it_contact",
6
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
7
+ "email": "it-contact@example.com",
8
+ "created_at": "2026-01-15T12:00:00.000Z",
9
+ "updated_at": "2026-01-15T12:00:00.000Z"
10
+ }
11
+ ],
12
+ "list_metadata": {
13
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
14
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
15
+ }
16
+ }
python/tests/fixtures/it_contact_list_list_metadata.json
python/tests/fixtures/it_contact_list_list_metadata.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
3
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
4
+ }
python/tests/fixtures/waitlist_user.json
python/tests/fixtures/waitlist_user.json CHANGED
@@ -1,10 +1,13 @@
1
  {
2
- "object": "waitlist_user",
3
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
4
  "email": "marcelina.davis@example.com",
5
  "state": "pending",
6
  "approved_at": null,
 
 
 
7
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
8
  "created_at": "2026-01-15T12:00:00.000Z",
9
- "updated_at": "2026-01-15T12:00:00.000Z"
 
10
  }
 
1
  {
 
2
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
3
  "email": "marcelina.davis@example.com",
4
  "state": "pending",
5
  "approved_at": null,
6
+ "additional_fields": {
7
+ "company": "Example Corp"
8
+ },
9
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  }
python/tests/fixtures/waitlist_user_approved.json
python/tests/fixtures/waitlist_user_approved.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
python/tests/fixtures/waitlist_user_created.json
python/tests/fixtures/waitlist_user_created.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
python/tests/fixtures/waitlist_user_denied.json
python/tests/fixtures/waitlist_user_denied.json CHANGED
@@ -3,14 +3,17 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": null,
 
 
 
11
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
12
  "created_at": "2026-01-15T12:00:00.000Z",
13
- "updated_at": "2026-01-15T12:00:00.000Z"
 
14
  },
15
  "created_at": "2026-01-15T12:00:00.000Z",
16
  "context": {
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": null,
10
+ "additional_fields": {
11
+ "company": "Example Corp"
12
+ },
13
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
14
  "created_at": "2026-01-15T12:00:00.000Z",
15
+ "updated_at": "2026-01-15T12:00:00.000Z",
16
+ "object": "waitlist_user"
17
  },
18
  "created_at": "2026-01-15T12:00:00.000Z",
19
  "context": {
python/tests/test_common_models_round_trip.py
python/tests/test_common_models_round_trip.py CHANGED
@@ -719,34 +719,50 @@ class TestModelRoundTrip:
719
 
720
  def test_waitlist_user_minimal_payload(self):
721
  data = {
722
- "object": "waitlist_user",
723
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
724
  "email": "marcelina.davis@example.com",
725
  "state": "pending",
726
  "approved_at": None,
727
  "created_at": "2026-01-15T12:00:00.000Z",
728
  "updated_at": "2026-01-15T12:00:00.000Z",
 
729
  }
730
  instance = WaitlistUser.from_dict(data)
731
  serialized = instance.to_dict()
732
- assert serialized["object"] == data["object"]
733
  assert serialized["id"] == data["id"]
734
  assert serialized["email"] == data["email"]
735
  assert serialized["state"] == data["state"]
736
  assert serialized["approved_at"] == data["approved_at"]
737
  assert serialized["created_at"] == data["created_at"]
738
  assert serialized["updated_at"] == data["updated_at"]
 
739
 
740
- def test_waitlist_user_preserves_nullable_fields(self):
741
  data = {
 
 
 
 
 
 
 
742
  "object": "waitlist_user",
 
 
 
 
 
 
 
743
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
744
  "email": "marcelina.davis@example.com",
745
  "state": "pending",
746
  "approved_at": None,
 
747
  "waitlist_id": None,
748
  "created_at": "2026-01-15T12:00:00.000Z",
749
  "updated_at": "2026-01-15T12:00:00.000Z",
 
750
  }
751
  instance = WaitlistUser.from_dict(data)
752
  serialized = instance.to_dict()
@@ -755,14 +771,15 @@ class TestModelRoundTrip:
755
 
756
  def test_waitlist_user_round_trips_unknown_enum_values(self):
757
  data = {
758
- "object": "waitlist_user",
759
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
760
  "email": "marcelina.davis@example.com",
761
  "state": "unexpected_waitlist_user_state",
762
  "approved_at": None,
 
763
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
764
  "created_at": "2026-01-15T12:00:00.000Z",
765
  "updated_at": "2026-01-15T12:00:00.000Z",
 
766
  }
767
  instance = WaitlistUser.from_dict(data)
768
  assert instance.to_dict() == data
@@ -13574,14 +13591,15 @@ class TestModelRoundTrip:
13574
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13575
  "event": "waitlist_user.approved",
13576
  "data": {
13577
- "object": "waitlist_user",
13578
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13579
  "email": "marcelina.davis@example.com",
13580
  "state": "pending",
13581
  "approved_at": None,
 
13582
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13583
  "created_at": "2026-01-15T12:00:00.000Z",
13584
  "updated_at": "2026-01-15T12:00:00.000Z",
 
13585
  },
13586
  "created_at": "2026-01-15T12:00:00.000Z",
13587
  }
@@ -13599,14 +13617,15 @@ class TestModelRoundTrip:
13599
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13600
  "event": "waitlist_user.approved",
13601
  "data": {
13602
- "object": "waitlist_user",
13603
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13604
  "email": "marcelina.davis@example.com",
13605
  "state": "pending",
13606
  "approved_at": None,
 
13607
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13608
  "created_at": "2026-01-15T12:00:00.000Z",
13609
  "updated_at": "2026-01-15T12:00:00.000Z",
 
13610
  },
13611
  "created_at": "2026-01-15T12:00:00.000Z",
13612
  }
@@ -13628,14 +13647,15 @@ class TestModelRoundTrip:
13628
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13629
  "event": "waitlist_user.created",
13630
  "data": {
13631
- "object": "waitlist_user",
13632
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13633
  "email": "marcelina.davis@example.com",
13634
  "state": "pending",
13635
  "approved_at": None,
 
13636
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13637
  "created_at": "2026-01-15T12:00:00.000Z",
13638
  "updated_at": "2026-01-15T12:00:00.000Z",
 
13639
  },
13640
  "created_at": "2026-01-15T12:00:00.000Z",
13641
  }
@@ -13653,14 +13673,15 @@ class TestModelRoundTrip:
13653
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13654
  "event": "waitlist_user.created",
13655
  "data": {
13656
- "object": "waitlist_user",
13657
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13658
  "email": "marcelina.davis@example.com",
13659
  "state": "pending",
13660
  "approved_at": None,
 
13661
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13662
  "created_at": "2026-01-15T12:00:00.000Z",
13663
  "updated_at": "2026-01-15T12:00:00.000Z",
 
13664
  },
13665
  "created_at": "2026-01-15T12:00:00.000Z",
13666
  }
@@ -13682,14 +13703,15 @@ class TestModelRoundTrip:
13682
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13683
  "event": "waitlist_user.denied",
13684
  "data": {
13685
- "object": "waitlist_user",
13686
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13687
  "email": "marcelina.davis@example.com",
13688
  "state": "pending",
13689
  "approved_at": None,
 
13690
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13691
  "created_at": "2026-01-15T12:00:00.000Z",
13692
  "updated_at": "2026-01-15T12:00:00.000Z",
 
13693
  },
13694
  "created_at": "2026-01-15T12:00:00.000Z",
13695
  }
@@ -13707,14 +13729,15 @@ class TestModelRoundTrip:
13707
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13708
  "event": "waitlist_user.denied",
13709
  "data": {
13710
- "object": "waitlist_user",
13711
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13712
  "email": "marcelina.davis@example.com",
13713
  "state": "pending",
13714
  "approved_at": None,
 
13715
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13716
  "created_at": "2026-01-15T12:00:00.000Z",
13717
  "updated_at": "2026-01-15T12:00:00.000Z",
 
13718
  },
13719
  "created_at": "2026-01-15T12:00:00.000Z",
13720
  }
 
719
 
720
  def test_waitlist_user_minimal_payload(self):
721
  data = {
 
722
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
723
  "email": "marcelina.davis@example.com",
724
  "state": "pending",
725
  "approved_at": None,
726
  "created_at": "2026-01-15T12:00:00.000Z",
727
  "updated_at": "2026-01-15T12:00:00.000Z",
728
+ "object": "waitlist_user",
729
  }
730
  instance = WaitlistUser.from_dict(data)
731
  serialized = instance.to_dict()
 
732
  assert serialized["id"] == data["id"]
733
  assert serialized["email"] == data["email"]
734
  assert serialized["state"] == data["state"]
735
  assert serialized["approved_at"] == data["approved_at"]
736
  assert serialized["created_at"] == data["created_at"]
737
  assert serialized["updated_at"] == data["updated_at"]
738
+ assert serialized["object"] == data["object"]
739
 
740
+ def test_waitlist_user_omits_absent_optional_non_nullable_fields(self):
741
  data = {
742
+ "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
743
+ "email": "marcelina.davis@example.com",
744
+ "state": "pending",
745
+ "approved_at": None,
746
+ "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
747
+ "created_at": "2026-01-15T12:00:00.000Z",
748
+ "updated_at": "2026-01-15T12:00:00.000Z",
749
  "object": "waitlist_user",
750
+ }
751
+ instance = WaitlistUser.from_dict(data)
752
+ serialized = instance.to_dict()
753
+ assert "additional_fields" not in serialized
754
+
755
+ def test_waitlist_user_preserves_nullable_fields(self):
756
+ data = {
757
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
758
  "email": "marcelina.davis@example.com",
759
  "state": "pending",
760
  "approved_at": None,
761
+ "additional_fields": {"company": "Example Corp"},
762
  "waitlist_id": None,
763
  "created_at": "2026-01-15T12:00:00.000Z",
764
  "updated_at": "2026-01-15T12:00:00.000Z",
765
+ "object": "waitlist_user",
766
  }
767
  instance = WaitlistUser.from_dict(data)
768
  serialized = instance.to_dict()
 
771
 
772
  def test_waitlist_user_round_trips_unknown_enum_values(self):
773
  data = {
 
774
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
775
  "email": "marcelina.davis@example.com",
776
  "state": "unexpected_waitlist_user_state",
777
  "approved_at": None,
778
+ "additional_fields": {"company": "Example Corp"},
779
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
780
  "created_at": "2026-01-15T12:00:00.000Z",
781
  "updated_at": "2026-01-15T12:00:00.000Z",
782
+ "object": "waitlist_user",
783
  }
784
  instance = WaitlistUser.from_dict(data)
785
  assert instance.to_dict() == data
 
13591
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13592
  "event": "waitlist_user.approved",
13593
  "data": {
 
13594
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13595
  "email": "marcelina.davis@example.com",
13596
  "state": "pending",
13597
  "approved_at": None,
13598
+ "additional_fields": {"company": "Example Corp"},
13599
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13600
  "created_at": "2026-01-15T12:00:00.000Z",
13601
  "updated_at": "2026-01-15T12:00:00.000Z",
13602
+ "object": "waitlist_user",
13603
  },
13604
  "created_at": "2026-01-15T12:00:00.000Z",
13605
  }
 
13617
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13618
  "event": "waitlist_user.approved",
13619
  "data": {
 
13620
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13621
  "email": "marcelina.davis@example.com",
13622
  "state": "pending",
13623
  "approved_at": None,
13624
+ "additional_fields": {"company": "Example Corp"},
13625
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13626
  "created_at": "2026-01-15T12:00:00.000Z",
13627
  "updated_at": "2026-01-15T12:00:00.000Z",
13628
+ "object": "waitlist_user",
13629
  },
13630
  "created_at": "2026-01-15T12:00:00.000Z",
13631
  }
 
13647
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13648
  "event": "waitlist_user.created",
13649
  "data": {
 
13650
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13651
  "email": "marcelina.davis@example.com",
13652
  "state": "pending",
13653
  "approved_at": None,
13654
+ "additional_fields": {"company": "Example Corp"},
13655
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13656
  "created_at": "2026-01-15T12:00:00.000Z",
13657
  "updated_at": "2026-01-15T12:00:00.000Z",
13658
+ "object": "waitlist_user",
13659
  },
13660
  "created_at": "2026-01-15T12:00:00.000Z",
13661
  }
 
13673
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13674
  "event": "waitlist_user.created",
13675
  "data": {
 
13676
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13677
  "email": "marcelina.davis@example.com",
13678
  "state": "pending",
13679
  "approved_at": None,
13680
+ "additional_fields": {"company": "Example Corp"},
13681
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13682
  "created_at": "2026-01-15T12:00:00.000Z",
13683
  "updated_at": "2026-01-15T12:00:00.000Z",
13684
+ "object": "waitlist_user",
13685
  },
13686
  "created_at": "2026-01-15T12:00:00.000Z",
13687
  }
 
13703
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13704
  "event": "waitlist_user.denied",
13705
  "data": {
 
13706
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13707
  "email": "marcelina.davis@example.com",
13708
  "state": "pending",
13709
  "approved_at": None,
13710
+ "additional_fields": {"company": "Example Corp"},
13711
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13712
  "created_at": "2026-01-15T12:00:00.000Z",
13713
  "updated_at": "2026-01-15T12:00:00.000Z",
13714
+ "object": "waitlist_user",
13715
  },
13716
  "created_at": "2026-01-15T12:00:00.000Z",
13717
  }
 
13729
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
13730
  "event": "waitlist_user.denied",
13731
  "data": {
 
13732
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
13733
  "email": "marcelina.davis@example.com",
13734
  "state": "pending",
13735
  "approved_at": None,
13736
+ "additional_fields": {"company": "Example Corp"},
13737
  "waitlist_id": "waitlist_01E4ZCR3C56J083X43JQXF3JK5",
13738
  "created_at": "2026-01-15T12:00:00.000Z",
13739
  "updated_at": "2026-01-15T12:00:00.000Z",
13740
+ "object": "waitlist_user",
13741
  },
13742
  "created_at": "2026-01-15T12:00:00.000Z",
13743
  }
python/tests/test_organizations_it_contacts.py
python/tests/test_organizations_it_contacts.py ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ import json
4
+
5
+ import pytest
6
+
7
+ from tests.generated_helpers import load_fixture
8
+ from workos import AsyncWorkOSClient, WorkOSClient
9
+ from workos._errors import (
10
+ AuthenticationError,
11
+ BadRequestError,
12
+ NotFoundError,
13
+ RateLimitExceededError,
14
+ ServerError,
15
+ UnprocessableEntityError,
16
+ )
17
+ from workos.organizations_it_contacts.models import ItContact, ItContactList
18
+
19
+
20
+ class TestOrganizationsItContacts:
21
+ def test_list_organization_it_contacts(self, workos, httpx_mock):
22
+ httpx_mock.add_response(
23
+ json=load_fixture("it_contact_list.json"),
24
+ )
25
+ result = workos.organizations_it_contacts.list_organization_it_contacts(
26
+ "test_organization_id"
27
+ )
28
+ assert isinstance(result, ItContactList)
29
+ assert result.object == "list"
30
+ request = httpx_mock.get_request()
31
+ assert request.method == "GET"
32
+ assert request.url.path.endswith(
33
+ "/organizations/test_organization_id/it_contacts"
34
+ )
35
+
36
+ def test_create_organization_it_contact(self, workos, httpx_mock):
37
+ httpx_mock.add_response(
38
+ json=load_fixture("it_contact.json"),
39
+ )
40
+ result = workos.organizations_it_contacts.create_organization_it_contact(
41
+ "test_organization_id", email="test_email"
42
+ )
43
+ assert isinstance(result, ItContact)
44
+ assert result.object == "it_contact"
45
+ assert result.id == "it_contact_01HXYZ123456789ABCDEFGHIJ"
46
+ request = httpx_mock.get_request()
47
+ assert request.method == "POST"
48
+ assert request.url.path.endswith(
49
+ "/organizations/test_organization_id/it_contacts"
50
+ )
51
+ body = json.loads(request.content)
52
+ assert body["email"] == "test_email"
53
+
54
+ def test_delete_organization_it_contact(self, workos, httpx_mock):
55
+ httpx_mock.add_response(status_code=204)
56
+ result = workos.organizations_it_contacts.delete_organization_it_contact(
57
+ "test_organization_id", "test_contact_id"
58
+ )
59
+ assert result is None
60
+ request = httpx_mock.get_request()
61
+ assert request.method == "DELETE"
62
+ assert request.url.path.endswith(
63
+ "/organizations/test_organization_id/it_contacts/test_contact_id"
64
+ )
65
+
66
+ def test_create_it_contact_invite(self, workos, httpx_mock):
67
+ httpx_mock.add_response(json={})
68
+ workos.organizations_it_contacts.create_it_contact_invite(
69
+ "test_organization_id", "test_contact_id", intents=[]
70
+ )
71
+ request = httpx_mock.get_request()
72
+ assert request.method == "POST"
73
+ assert request.url.path.endswith(
74
+ "/organizations/test_organization_id/it_contacts/test_contact_id/invite"
75
+ )
76
+
77
+ def test_revoke_it_contact(self, workos, httpx_mock):
78
+ httpx_mock.add_response(json={})
79
+ workos.organizations_it_contacts.revoke_it_contact(
80
+ "test_organization_id", "test_contact_id"
81
+ )
82
+ request = httpx_mock.get_request()
83
+ assert request.method == "POST"
84
+ assert request.url.path.endswith(
85
+ "/organizations/test_organization_id/it_contacts/test_contact_id/revoke"
86
+ )
87
+
88
+ def test_list_organization_it_contacts_with_request_options(
89
+ self, workos, httpx_mock
90
+ ):
91
+ httpx_mock.add_response(json=load_fixture("it_contact_list.json"))
92
+ workos.organizations_it_contacts.list_organization_it_contacts(
93
+ "test_organization_id",
94
+ request_options={"extra_headers": {"X-Custom": "value"}},
95
+ )
96
+ request = httpx_mock.get_request()
97
+ assert request.headers["X-Custom"] == "value"
98
+
99
+ def test_list_organization_it_contacts_unauthorized(self, workos, httpx_mock):
100
+ httpx_mock.add_response(
101
+ status_code=401,
102
+ json={"message": "Unauthorized"},
103
+ )
104
+ with pytest.raises(AuthenticationError):
105
+ workos.organizations_it_contacts.list_organization_it_contacts(
106
+ "test_organization_id"
107
+ )
108
+
109
+ def test_list_organization_it_contacts_not_found(self, httpx_mock):
110
+ workos = WorkOSClient(
111
+ api_key="sk_test_123", client_id="client_test", max_retries=0
112
+ )
113
+ try:
114
+ httpx_mock.add_response(status_code=404, json={"message": "Not found"})
115
+ with pytest.raises(NotFoundError):
116
+ workos.organizations_it_contacts.list_organization_it_contacts(
117
+ "test_organization_id"
118
+ )
119
+ finally:
120
+ workos.close()
121
+
122
+ def test_list_organization_it_contacts_rate_limited(self, httpx_mock):
123
+ workos = WorkOSClient(
124
+ api_key="sk_test_123", client_id="client_test", max_retries=0
125
+ )
126
+ try:
127
+ httpx_mock.add_response(
128
+ status_code=429,
129
+ headers={"Retry-After": "0"},
130
+ json={"message": "Slow down"},
131
+ )
132
+ with pytest.raises(RateLimitExceededError):
133
+ workos.organizations_it_contacts.list_organization_it_contacts(
134
+ "test_organization_id"
135
+ )
136
+ finally:
137
+ workos.close()
138
+
139
+ def test_list_organization_it_contacts_server_error(self, httpx_mock):
140
+ workos = WorkOSClient(
141
+ api_key="sk_test_123", client_id="client_test", max_retries=0
142
+ )
143
+ try:
144
+ httpx_mock.add_response(status_code=500, json={"message": "Server error"})
145
+ with pytest.raises(ServerError):
146
+ workos.organizations_it_contacts.list_organization_it_contacts(
147
+ "test_organization_id"
148
+ )
149
+ finally:
150
+ workos.close()
151
+
152
+ def test_list_organization_it_contacts_bad_request(self, httpx_mock):
153
+ workos = WorkOSClient(
154
+ api_key="sk_test_123", client_id="client_test", max_retries=0
155
+ )
156
+ try:
157
+ httpx_mock.add_response(status_code=400, json={"message": "Bad request"})
158
+ with pytest.raises(BadRequestError):
159
+ workos.organizations_it_contacts.list_organization_it_contacts(
160
+ "test_organization_id"
161
+ )
162
+ finally:
163
+ workos.close()
164
+
165
+ def test_list_organization_it_contacts_unprocessable(self, httpx_mock):
166
+ workos = WorkOSClient(
167
+ api_key="sk_test_123", client_id="client_test", max_retries=0
168
+ )
169
+ try:
170
+ httpx_mock.add_response(status_code=422, json={"message": "Unprocessable"})
171
+ with pytest.raises(UnprocessableEntityError):
172
+ workos.organizations_it_contacts.list_organization_it_contacts(
173
+ "test_organization_id"
174
+ )
175
+ finally:
176
+ workos.close()
177
+
178
+
179
+ class TestAsyncOrganizationsItContacts:
180
+ @pytest.mark.asyncio
181
+ async def test_list_organization_it_contacts(self, async_workos, httpx_mock):
182
+ httpx_mock.add_response(json=load_fixture("it_contact_list.json"))
183
+ result = (
184
+ await async_workos.organizations_it_contacts.list_organization_it_contacts(
185
+ "test_organization_id"
186
+ )
187
+ )
188
+ assert isinstance(result, ItContactList)
189
+ assert result.object == "list"
190
+ request = httpx_mock.get_request()
191
+ assert request.method == "GET"
192
+ assert request.url.path.endswith(
193
+ "/organizations/test_organization_id/it_contacts"
194
+ )
195
+
196
+ @pytest.mark.asyncio
197
+ async def test_create_organization_it_contact(self, async_workos, httpx_mock):
198
+ httpx_mock.add_response(json=load_fixture("it_contact.json"))
199
+ result = (
200
+ await async_workos.organizations_it_contacts.create_organization_it_contact(
201
+ "test_organization_id", email="test_email"
202
+ )
203
+ )
204
+ assert isinstance(result, ItContact)
205
+ assert result.object == "it_contact"
206
+ assert result.id == "it_contact_01HXYZ123456789ABCDEFGHIJ"
207
+ request = httpx_mock.get_request()
208
+ assert request.method == "POST"
209
+ assert request.url.path.endswith(
210
+ "/organizations/test_organization_id/it_contacts"
211
+ )
212
+
213
+ @pytest.mark.asyncio
214
+ async def test_delete_organization_it_contact(self, async_workos, httpx_mock):
215
+ httpx_mock.add_response(status_code=204)
216
+ result = (
217
+ await async_workos.organizations_it_contacts.delete_organization_it_contact(
218
+ "test_organization_id", "test_contact_id"
219
+ )
220
+ )
221
+ assert result is None
222
+ request = httpx_mock.get_request()
223
+ assert request.method == "DELETE"
224
+ assert request.url.path.endswith(
225
+ "/organizations/test_organization_id/it_contacts/test_contact_id"
226
+ )
227
+
228
+ @pytest.mark.asyncio
229
+ async def test_create_it_contact_invite(self, async_workos, httpx_mock):
230
+ httpx_mock.add_response(json={})
231
+ await async_workos.organizations_it_contacts.create_it_contact_invite(
232
+ "test_organization_id", "test_contact_id", intents=[]
233
+ )
234
+ request = httpx_mock.get_request()
235
+ assert request.method == "POST"
236
+ assert request.url.path.endswith(
237
+ "/organizations/test_organization_id/it_contacts/test_contact_id/invite"
238
+ )
239
+
240
+ @pytest.mark.asyncio
241
+ async def test_revoke_it_contact(self, async_workos, httpx_mock):
242
+ httpx_mock.add_response(json={})
243
+ await async_workos.organizations_it_contacts.revoke_it_contact(
244
+ "test_organization_id", "test_contact_id"
245
+ )
246
+ request = httpx_mock.get_request()
247
+ assert request.method == "POST"
248
+ assert request.url.path.endswith(
249
+ "/organizations/test_organization_id/it_contacts/test_contact_id/revoke"
250
+ )
251
+
252
+ @pytest.mark.asyncio
253
+ async def test_list_organization_it_contacts_with_request_options(
254
+ self, async_workos, httpx_mock
255
+ ):
256
+ httpx_mock.add_response(json=load_fixture("it_contact_list.json"))
257
+ await async_workos.organizations_it_contacts.list_organization_it_contacts(
258
+ "test_organization_id",
259
+ request_options={"extra_headers": {"X-Custom": "value"}},
260
+ )
261
+ request = httpx_mock.get_request()
262
+ assert request.headers["X-Custom"] == "value"
263
+
264
+ @pytest.mark.asyncio
265
+ async def test_list_organization_it_contacts_unauthorized(
266
+ self, async_workos, httpx_mock
267
+ ):
268
+ httpx_mock.add_response(status_code=401, json={"message": "Unauthorized"})
269
+ with pytest.raises(AuthenticationError):
270
+ await async_workos.organizations_it_contacts.list_organization_it_contacts(
271
+ "test_organization_id"
272
+ )
273
+
274
+ @pytest.mark.asyncio
275
+ async def test_list_organization_it_contacts_not_found(self, httpx_mock):
276
+ workos = AsyncWorkOSClient(
277
+ api_key="sk_test_123", client_id="client_test", max_retries=0
278
+ )
279
+ try:
280
+ httpx_mock.add_response(status_code=404, json={"message": "Not found"})
281
+ with pytest.raises(NotFoundError):
282
+ await workos.organizations_it_contacts.list_organization_it_contacts(
283
+ "test_organization_id"
284
+ )
285
+ finally:
286
+ await workos.close()
287
+
288
+ @pytest.mark.asyncio
289
+ async def test_list_organization_it_contacts_rate_limited(self, httpx_mock):
290
+ workos = AsyncWorkOSClient(
291
+ api_key="sk_test_123", client_id="client_test", max_retries=0
292
+ )
293
+ try:
294
+ httpx_mock.add_response(
295
+ status_code=429,
296
+ headers={"Retry-After": "0"},
297
+ json={"message": "Slow down"},
298
+ )
299
+ with pytest.raises(RateLimitExceededError):
300
+ await workos.organizations_it_contacts.list_organization_it_contacts(
301
+ "test_organization_id"
302
+ )
303
+ finally:
304
+ await workos.close()
305
+
306
+ @pytest.mark.asyncio
307
+ async def test_list_organization_it_contacts_server_error(self, httpx_mock):
308
+ workos = AsyncWorkOSClient(
309
+ api_key="sk_test_123", client_id="client_test", max_retries=0
310
+ )
311
+ try:
312
+ httpx_mock.add_response(status_code=500, json={"message": "Server error"})
313
+ with pytest.raises(ServerError):
314
+ await workos.organizations_it_contacts.list_organization_it_contacts(
315
+ "test_organization_id"
316
+ )
317
+ finally:
318
+ await workos.close()
319
+
320
+ @pytest.mark.asyncio
321
+ async def test_list_organization_it_contacts_bad_request(self, httpx_mock):
322
+ workos = AsyncWorkOSClient(
323
+ api_key="sk_test_123", client_id="client_test", max_retries=0
324
+ )
325
+ try:
326
+ httpx_mock.add_response(status_code=400, json={"message": "Bad request"})
327
+ with pytest.raises(BadRequestError):
328
+ await workos.organizations_it_contacts.list_organization_it_contacts(
329
+ "test_organization_id"
330
+ )
331
+ finally:
332
+ await workos.close()
333
+
334
+ @pytest.mark.asyncio
335
+ async def test_list_organization_it_contacts_unprocessable(self, httpx_mock):
336
+ workos = AsyncWorkOSClient(
337
+ api_key="sk_test_123", client_id="client_test", max_retries=0
338
+ )
339
+ try:
340
+ httpx_mock.add_response(status_code=422, json={"message": "Unprocessable"})
341
+ with pytest.raises(UnprocessableEntityError):
342
+ await workos.organizations_it_contacts.list_organization_it_contacts(
343
+ "test_organization_id"
344
+ )
345
+ finally:
346
+ await workos.close()
python/tests/test_organizations_it_contacts_models_round_trip.py
python/tests/test_organizations_it_contacts_models_round_trip.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ """Model round-trip tests: from_dict(to_dict()) preserves data."""
4
+
5
+ from tests.generated_helpers import load_fixture
6
+ from workos.organizations_it_contacts.models import (
7
+ ItContact,
8
+ ItContactList,
9
+ ItContactListListMetadata,
10
+ )
11
+
12
+
13
+ class TestModelRoundTrip:
14
+ def test_it_contact_round_trip(self):
15
+ data = load_fixture("it_contact.json")
16
+ instance = ItContact.from_dict(data)
17
+ serialized = instance.to_dict()
18
+ assert serialized == data
19
+ restored = ItContact.from_dict(serialized)
20
+ assert restored.to_dict() == serialized
21
+
22
+ def test_it_contact_minimal_payload(self):
23
+ data = {
24
+ "object": "it_contact",
25
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
26
+ "email": "it-contact@example.com",
27
+ "created_at": "2026-01-15T12:00:00.000Z",
28
+ "updated_at": "2026-01-15T12:00:00.000Z",
29
+ }
30
+ instance = ItContact.from_dict(data)
31
+ serialized = instance.to_dict()
32
+ assert serialized["object"] == data["object"]
33
+ assert serialized["id"] == data["id"]
34
+ assert serialized["email"] == data["email"]
35
+ assert serialized["created_at"] == data["created_at"]
36
+ assert serialized["updated_at"] == data["updated_at"]
37
+
38
+ def test_it_contact_list_round_trip(self):
39
+ data = load_fixture("it_contact_list.json")
40
+ instance = ItContactList.from_dict(data)
41
+ serialized = instance.to_dict()
42
+ assert serialized == data
43
+ restored = ItContactList.from_dict(serialized)
44
+ assert restored.to_dict() == serialized
45
+
46
+ def test_it_contact_list_minimal_payload(self):
47
+ data = {
48
+ "object": "list",
49
+ "data": [
50
+ {
51
+ "object": "it_contact",
52
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
53
+ "email": "it-contact@example.com",
54
+ "created_at": "2026-01-15T12:00:00.000Z",
55
+ "updated_at": "2026-01-15T12:00:00.000Z",
56
+ }
57
+ ],
58
+ "list_metadata": {
59
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
60
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA",
61
+ },
62
+ }
63
+ instance = ItContactList.from_dict(data)
64
+ serialized = instance.to_dict()
65
+ assert serialized["object"] == data["object"]
66
+ assert serialized["data"] == data["data"]
67
+ assert serialized["list_metadata"] == data["list_metadata"]
68
+
69
+ def test_it_contact_list_list_metadata_round_trip(self):
70
+ data = load_fixture("it_contact_list_list_metadata.json")
71
+ instance = ItContactListListMetadata.from_dict(data)
72
+ serialized = instance.to_dict()
73
+ assert serialized == data
74
+ restored = ItContactListListMetadata.from_dict(serialized)
75
+ assert restored.to_dict() == serialized
76
+
77
+ def test_it_contact_list_list_metadata_minimal_payload(self):
78
+ data = {"before": None, "after": None}
79
+ instance = ItContactListListMetadata.from_dict(data)
80
+ serialized = instance.to_dict()
81
+ assert serialized["before"] == data["before"]
82
+ assert serialized["after"] == data["after"]
83
+
84
+ def test_it_contact_list_list_metadata_preserves_nullable_fields(self):
85
+ data = {"before": None, "after": None}
86
+ instance = ItContactListListMetadata.from_dict(data)
87
+ serialized = instance.to_dict()
88
+ assert serialized["before"] is None
89
+ assert serialized["after"] is None

All files in this language are hidden by the current filters.

code: 18 · tests: 3 · manifest: 1

ruby/.oagen-manifest.json
ruby/.oagen-manifest.json CHANGED
@@ -257,6 +257,11 @@
257
  "lib/workos/organizations/organization_updated_data_domain.rb",
258
  "lib/workos/organizations/update_audit_logs_retention.rb",
259
  "lib/workos/organizations/update_organization.rb",
 
 
 
 
 
260
  "lib/workos/pipes.rb",
261
  "lib/workos/pipes/api_key_installation.rb",
262
  "lib/workos/pipes/connected_account.rb",
@@ -445,6 +450,7 @@
445
  "lib/workos/types/invitation_resent_data_state.rb",
446
  "lib/workos/types/invitation_revoked_data_state.rb",
447
  "lib/workos/types/invitation_state.rb",
 
448
  "lib/workos/types/organization_created_data_domain_state.rb",
449
  "lib/workos/types/organization_created_data_domain_verification_strategy.rb",
450
  "lib/workos/types/organization_deleted_data_domain_state.rb",
@@ -892,6 +898,7 @@
892
  "rbi/workos/create_group.rbi",
893
  "rbi/workos/create_group_membership.rbi",
894
  "rbi/workos/create_group_role_assignment.rbi",
 
895
  "rbi/workos/create_m2m_application.rbi",
896
  "rbi/workos/create_magic_code_and_return.rbi",
897
  "rbi/workos/create_oauth_application.rbi",
@@ -1041,6 +1048,8 @@
1041
  "rbi/workos/invitation_resent_data.rbi",
1042
  "rbi/workos/invitation_revoked.rbi",
1043
  "rbi/workos/invitation_revoked_data.rbi",
 
 
1044
  "rbi/workos/jwks_response.rbi",
1045
  "rbi/workos/jwks_response_keys.rbi",
1046
  "rbi/workos/jwt_template_response.rbi",
@@ -1102,6 +1111,7 @@
1102
  "rbi/workos/organization_updated_data.rbi",
1103
  "rbi/workos/organization_updated_data_domain.rbi",
1104
  "rbi/workos/organizations.rbi",
 
1105
  "rbi/workos/password_reset.rbi",
1106
  "rbi/workos/password_reset_created.rbi",
1107
  "rbi/workos/password_reset_created_data.rbi",
@@ -1283,6 +1293,8 @@
1283
  "test/workos/test_organization_membership_model_round_trip.rb",
1284
  "test/workos/test_organization_membership_service.rb",
1285
  "test/workos/test_organizations.rb",
 
 
1286
  "test/workos/test_organizations_model_round_trip.rb",
1287
  "test/workos/test_pipes.rb",
1288
  "test/workos/test_pipes_model_round_trip.rb",
@@ -1603,6 +1615,10 @@
1603
  "sdkMethod": "authorize_data_integration",
1604
  "service": "pipes"
1605
  },
 
 
 
 
1606
  "POST /data-integrations/{slug}/credentials": {
1607
  "sdkMethod": "create_data_integration_credential",
1608
  "service": "pipes"
@@ -1775,6 +1791,26 @@
1775
  "sdkMethod": "list_authorized_applications",
1776
  "service": "organizations"
1777
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1778
  "POST /portal/generate_link": {
1779
  "sdkMethod": "generate_link",
1780
  "service": "admin_portal"
@@ -2194,10 +2230,6 @@
2194
  "GET /audit_logs/exports/{auditLogExportId}": {
2195
  "sdkMethod": "get_export",
2196
  "service": "audit_logs"
2197
- },
2198
- "PUT /data-integrations/{slug}/client-credentials": {
2199
- "sdkMethod": "update_data_integration_client_credentials",
2200
- "service": "pipes"
2201
  }
2202
  }
2203
  }
 
257
  "lib/workos/organizations/organization_updated_data_domain.rb",
258
  "lib/workos/organizations/update_audit_logs_retention.rb",
259
  "lib/workos/organizations/update_organization.rb",
260
+ "lib/workos/organizations_it_contacts.rb",
261
+ "lib/workos/organizations_it_contacts/create_it_contact.rb",
262
+ "lib/workos/organizations_it_contacts/invite_it_contact.rb",
263
+ "lib/workos/organizations_it_contacts/it_contact.rb",
264
+ "lib/workos/organizations_it_contacts/it_contact_list.rb",
265
  "lib/workos/pipes.rb",
266
  "lib/workos/pipes/api_key_installation.rb",
267
  "lib/workos/pipes/connected_account.rb",
 
450
  "lib/workos/types/invitation_resent_data_state.rb",
451
  "lib/workos/types/invitation_revoked_data_state.rb",
452
  "lib/workos/types/invitation_state.rb",
453
+ "lib/workos/types/invite_it_contact_intents.rb",
454
  "lib/workos/types/organization_created_data_domain_state.rb",
455
  "lib/workos/types/organization_created_data_domain_verification_strategy.rb",
456
  "lib/workos/types/organization_deleted_data_domain_state.rb",
 
898
  "rbi/workos/create_group.rbi",
899
  "rbi/workos/create_group_membership.rbi",
900
  "rbi/workos/create_group_role_assignment.rbi",
901
+ "rbi/workos/create_it_contact.rbi",
902
  "rbi/workos/create_m2m_application.rbi",
903
  "rbi/workos/create_magic_code_and_return.rbi",
904
  "rbi/workos/create_oauth_application.rbi",
 
1048
  "rbi/workos/invitation_resent_data.rbi",
1049
  "rbi/workos/invitation_revoked.rbi",
1050
  "rbi/workos/invitation_revoked_data.rbi",
1051
+ "rbi/workos/invite_it_contact.rbi",
1052
+ "rbi/workos/it_contact.rbi",
1053
  "rbi/workos/jwks_response.rbi",
1054
  "rbi/workos/jwks_response_keys.rbi",
1055
  "rbi/workos/jwt_template_response.rbi",
 
1111
  "rbi/workos/organization_updated_data.rbi",
1112
  "rbi/workos/organization_updated_data_domain.rbi",
1113
  "rbi/workos/organizations.rbi",
1114
+ "rbi/workos/organizations_it_contacts.rbi",
1115
  "rbi/workos/password_reset.rbi",
1116
  "rbi/workos/password_reset_created.rbi",
1117
  "rbi/workos/password_reset_created_data.rbi",
 
1293
  "test/workos/test_organization_membership_model_round_trip.rb",
1294
  "test/workos/test_organization_membership_service.rb",
1295
  "test/workos/test_organizations.rb",
1296
+ "test/workos/test_organizations_it_contacts.rb",
1297
+ "test/workos/test_organizations_it_contacts_model_round_trip.rb",
1298
  "test/workos/test_organizations_model_round_trip.rb",
1299
  "test/workos/test_pipes.rb",
1300
  "test/workos/test_pipes_model_round_trip.rb",
 
1615
  "sdkMethod": "authorize_data_integration",
1616
  "service": "pipes"
1617
  },
1618
+ "PUT /data-integrations/{slug}/client-credentials": {
1619
+ "sdkMethod": "update_data_integration_client_credentials",
1620
+ "service": "pipes"
1621
+ },
1622
  "POST /data-integrations/{slug}/credentials": {
1623
  "sdkMethod": "create_data_integration_credential",
1624
  "service": "pipes"
 
1791
  "sdkMethod": "list_authorized_applications",
1792
  "service": "organizations"
1793
  },
1794
+ "GET /organizations/{organization_id}/it_contacts": {
1795
+ "sdkMethod": "list_organization_it_contacts",
1796
+ "service": "organizations_it_contacts"
1797
+ },
1798
+ "POST /organizations/{organization_id}/it_contacts": {
1799
+ "sdkMethod": "create_organization_it_contact",
1800
+ "service": "organizations_it_contacts"
1801
+ },
1802
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1803
+ "sdkMethod": "delete_organization_it_contact",
1804
+ "service": "organizations_it_contacts"
1805
+ },
1806
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1807
+ "sdkMethod": "create_it_contact_invite",
1808
+ "service": "organizations_it_contacts"
1809
+ },
1810
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1811
+ "sdkMethod": "revoke_it_contact",
1812
+ "service": "organizations_it_contacts"
1813
+ },
1814
  "POST /portal/generate_link": {
1815
  "sdkMethod": "generate_link",
1816
  "service": "admin_portal"
 
2230
  "GET /audit_logs/exports/{auditLogExportId}": {
2231
  "sdkMethod": "get_export",
2232
  "service": "audit_logs"
 
 
 
 
2233
  }
2234
  }
2235
  }
ruby/lib/workos.rb
ruby/lib/workos.rb CHANGED
@@ -35,6 +35,7 @@ loader.collapse("#{__dir__}/workos/multi_factor_auth")
35
  loader.collapse("#{__dir__}/workos/organization_domains")
36
  loader.collapse("#{__dir__}/workos/organization_membership")
37
  loader.collapse("#{__dir__}/workos/organizations")
 
38
  loader.collapse("#{__dir__}/workos/pipes")
39
  loader.collapse("#{__dir__}/workos/pipes_provider")
40
  loader.collapse("#{__dir__}/workos/radar")
 
35
  loader.collapse("#{__dir__}/workos/organization_domains")
36
  loader.collapse("#{__dir__}/workos/organization_membership")
37
  loader.collapse("#{__dir__}/workos/organizations")
38
+ loader.collapse("#{__dir__}/workos/organizations_it_contacts")
39
  loader.collapse("#{__dir__}/workos/pipes")
40
  loader.collapse("#{__dir__}/workos/pipes_provider")
41
  loader.collapse("#{__dir__}/workos/radar")
ruby/lib/workos/client.rb
ruby/lib/workos/client.rb CHANGED
@@ -64,6 +64,10 @@ module WorkOS
64
  @groups ||= WorkOS::Groups.new(self)
65
  end
66
 
 
 
 
 
67
  def admin_portal
68
  @admin_portal ||= WorkOS::AdminPortal.new(self)
69
  end
 
64
  @groups ||= WorkOS::Groups.new(self)
65
  end
66
 
67
+ def organizations_it_contacts
68
+ @organizations_it_contacts ||= WorkOS::OrganizationsItContacts.new(self)
69
+ end
70
+
71
  def admin_portal
72
  @admin_portal ||= WorkOS::AdminPortal.new(self)
73
  end
ruby/lib/workos/organizations.rb
ruby/lib/workos/organizations.rb CHANGED
@@ -65,7 +65,7 @@ module WorkOS
65
  # Create an Organization
66
  # @param name [String] The name of the organization.
67
  # @param allow_profiles_outside_organization [Boolean, nil] Whether the organization allows profiles from outside the organization to sign in.
68
- # @param domains [Array<String>, nil] The domains associated with the organization. Deprecated in favor of `domain_data`.
69
  # @param domain_data [Array<WorkOS::OrganizationDomainData>, nil] The domains associated with the organization, including verification state.
70
  # @param metadata [Hash{String => String}, nil] Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
71
  # @param external_id [String, nil] An external identifier for the Organization.
 
65
  # Create an Organization
66
  # @param name [String] The name of the organization.
67
  # @param allow_profiles_outside_organization [Boolean, nil] Whether the organization allows profiles from outside the organization to sign in.
68
+ # @param domains [Array<String>, nil] (deprecated) The domains associated with the organization. Deprecated in favor of `domain_data`.
69
  # @param domain_data [Array<WorkOS::OrganizationDomainData>, nil] The domains associated with the organization, including verification state.
70
  # @param metadata [Hash{String => String}, nil] Object containing [metadata](https://workos.com/docs/authkit/metadata) key/value pairs associated with the Organization.
71
  # @param external_id [String, nil] An external identifier for the Organization.
ruby/lib/workos/organizations/organization_input.rb
ruby/lib/workos/organizations/organization_input.rb CHANGED
@@ -13,14 +13,23 @@ module WorkOS
13
  external_id: :external_id
14
  }.freeze
15
 
 
 
 
16
  attr_accessor \
17
  :name,
18
  :allow_profiles_outside_organization,
19
- :domains,
20
  :domain_data,
21
  :metadata,
22
  :external_id
23
 
 
 
 
 
 
 
 
24
  def initialize(json)
25
  hash = self.class.normalize(json)
26
  @name = hash[:name]
 
13
  external_id: :external_id
14
  }.freeze
15
 
16
+ # @!attribute domains
17
+ # @deprecated The domains associated with the organization. Deprecated in favor of `domain_data`.
18
+
19
  attr_accessor \
20
  :name,
21
  :allow_profiles_outside_organization,
 
22
  :domain_data,
23
  :metadata,
24
  :external_id
25
 
26
+ def domains
27
+ warn "[DEPRECATION] `domains` is deprecated and will be removed in a future version.", uplevel: 1
28
+ @domains
29
+ end
30
+
31
+ attr_writer :domains
32
+
33
  def initialize(json)
34
  hash = self.class.normalize(json)
35
  @name = hash[:name]
ruby/lib/workos/organizations_it_contacts.rb
ruby/lib/workos/organizations_it_contacts.rb ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ require "json"
6
+
7
+ module WorkOS
8
+ class OrganizationsItContacts
9
+ def initialize(client)
10
+ @client = client
11
+ end
12
+
13
+ # List IT contacts
14
+ # @param organization_id [String] The ID of the organization.
15
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
16
+ # @return [WorkOS::Types::ListStruct<WorkOS::ItContact>]
17
+ def list_organization_it_contacts(
18
+ organization_id:,
19
+ request_options: {}
20
+ )
21
+ response = @client.request(
22
+ method: :get,
23
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts",
24
+ auth: true,
25
+ request_options: request_options
26
+ )
27
+ WorkOS::Types::ListStruct.from_response(
28
+ response,
29
+ model: WorkOS::ItContact,
30
+ filters: {organization_id: organization_id}
31
+ )
32
+ end
33
+
34
+ # Create an IT contact
35
+ # @param organization_id [String] The ID of the organization.
36
+ # @param email [String] The email address of the IT contact.
37
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
38
+ # @return [WorkOS::ItContact]
39
+ def create_organization_it_contact(
40
+ organization_id:,
41
+ email:,
42
+ request_options: {}
43
+ )
44
+ body = {
45
+ "email" => email
46
+ }
47
+ response = @client.request(
48
+ method: :post,
49
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts",
50
+ auth: true,
51
+ body: body,
52
+ request_options: request_options
53
+ )
54
+ result = WorkOS::ItContact.new(response.body)
55
+ result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
56
+ result
57
+ end
58
+
59
+ # Delete an IT contact
60
+ # @param organization_id [String] The ID of the organization.
61
+ # @param contact_id [String] The ID of the IT contact.
62
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
63
+ # @return [void]
64
+ def delete_organization_it_contact(
65
+ organization_id:,
66
+ contact_id:,
67
+ request_options: {}
68
+ )
69
+ @client.request(
70
+ method: :delete,
71
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}",
72
+ auth: true,
73
+ request_options: request_options
74
+ )
75
+ nil
76
+ end
77
+
78
+ # Invite an IT contact
79
+ # @param organization_id [String] The ID of the organization.
80
+ # @param contact_id [String] The ID of the IT contact.
81
+ # @param intents [Array<WorkOS::Types::InviteItContactIntents>] The Admin Portal features that the IT contact can configure.
82
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
83
+ # @return [void]
84
+ def create_it_contact_invite(
85
+ organization_id:,
86
+ contact_id:,
87
+ intents:,
88
+ request_options: {}
89
+ )
90
+ body = {
91
+ "intents" => intents
92
+ }
93
+ @client.request(
94
+ method: :post,
95
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}/invite",
96
+ auth: true,
97
+ body: body,
98
+ request_options: request_options
99
+ )
100
+ nil
101
+ end
102
+
103
+ # Revoke an IT contact's invitation
104
+ # @param organization_id [String] The ID of the organization.
105
+ # @param contact_id [String] The ID of the IT contact.
106
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
107
+ # @return [void]
108
+ def revoke_it_contact(
109
+ organization_id:,
110
+ contact_id:,
111
+ request_options: {}
112
+ )
113
+ @client.request(
114
+ method: :post,
115
+ path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/it_contacts/#{WorkOS::Util.encode_path(contact_id)}/revoke",
116
+ auth: true,
117
+ request_options: request_options
118
+ )
119
+ nil
120
+ end
121
+ end
122
+ end
ruby/lib/workos/organizations_it_contacts/create_it_contact.rb
ruby/lib/workos/organizations_it_contacts/create_it_contact.rb ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class CreateItContact < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ email: :email
9
+ }.freeze
10
+
11
+ attr_accessor :email
12
+
13
+ def initialize(json)
14
+ hash = self.class.normalize(json)
15
+ @email = hash[:email]
16
+ end
17
+ end
18
+ end
ruby/lib/workos/organizations_it_contacts/invite_it_contact.rb
ruby/lib/workos/organizations_it_contacts/invite_it_contact.rb ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class InviteItContact < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ intents: :intents
9
+ }.freeze
10
+
11
+ attr_accessor :intents
12
+
13
+ def initialize(json)
14
+ hash = self.class.normalize(json)
15
+ @intents = hash[:intents] || []
16
+ end
17
+ end
18
+ end
ruby/lib/workos/organizations_it_contacts/it_contact.rb
ruby/lib/workos/organizations_it_contacts/it_contact.rb ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class ItContact < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ object: :object,
9
+ id: :id,
10
+ email: :email,
11
+ created_at: :created_at,
12
+ updated_at: :updated_at
13
+ }.freeze
14
+
15
+ attr_accessor \
16
+ :object,
17
+ :id,
18
+ :email,
19
+ :created_at,
20
+ :updated_at
21
+
22
+ def initialize(json)
23
+ hash = self.class.normalize(json)
24
+ @object = hash[:object]
25
+ @id = hash[:id]
26
+ @email = hash[:email]
27
+ @created_at = hash[:created_at]
28
+ @updated_at = hash[:updated_at]
29
+ end
30
+ end
31
+ end
ruby/lib/workos/organizations_it_contacts/it_contact_list.rb
ruby/lib/workos/organizations_it_contacts/it_contact_list.rb ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class ItContactList < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ object: :object,
9
+ data: :data,
10
+ list_metadata: :list_metadata
11
+ }.freeze
12
+
13
+ attr_accessor \
14
+ :object,
15
+ :data,
16
+ :list_metadata
17
+
18
+ def initialize(json)
19
+ hash = self.class.normalize(json)
20
+ @object = hash[:object]
21
+ @data = (hash[:data] || []).map { |item| item ? WorkOS::ItContact.new(item) : nil }
22
+ @list_metadata = hash[:list_metadata] ? WorkOS::ItContactListListMetadata.new(hash[:list_metadata]) : nil
23
+ end
24
+ end
25
+ end
ruby/lib/workos/shared/waitlist_user.rb
ruby/lib/workos/shared/waitlist_user.rb CHANGED
@@ -5,36 +5,39 @@
5
  module WorkOS
6
  class WaitlistUser < WorkOS::Types::BaseModel
7
  HASH_ATTRS = {
8
- object: :object,
9
  id: :id,
10
  email: :email,
11
  state: :state,
12
  approved_at: :approved_at,
 
13
  waitlist_id: :waitlist_id,
14
  created_at: :created_at,
15
- updated_at: :updated_at
 
16
  }.freeze
17
 
18
  attr_accessor \
19
- :object,
20
  :id,
21
  :email,
22
  :state,
23
  :approved_at,
 
24
  :waitlist_id,
25
  :created_at,
26
- :updated_at
 
27
 
28
  def initialize(json)
29
  hash = self.class.normalize(json)
30
- @object = hash[:object]
31
  @id = hash[:id]
32
  @email = hash[:email]
33
  @state = hash[:state]
34
  @approved_at = hash[:approved_at]
 
35
  @waitlist_id = hash[:waitlist_id]
36
  @created_at = hash[:created_at]
37
  @updated_at = hash[:updated_at]
 
38
  end
39
  end
40
  end
 
5
  module WorkOS
6
  class WaitlistUser < WorkOS::Types::BaseModel
7
  HASH_ATTRS = {
 
8
  id: :id,
9
  email: :email,
10
  state: :state,
11
  approved_at: :approved_at,
12
+ additional_fields: :additional_fields,
13
  waitlist_id: :waitlist_id,
14
  created_at: :created_at,
15
+ updated_at: :updated_at,
16
+ object: :object
17
  }.freeze
18
 
19
  attr_accessor \
 
20
  :id,
21
  :email,
22
  :state,
23
  :approved_at,
24
+ :additional_fields,
25
  :waitlist_id,
26
  :created_at,
27
+ :updated_at,
28
+ :object
29
 
30
  def initialize(json)
31
  hash = self.class.normalize(json)
 
32
  @id = hash[:id]
33
  @email = hash[:email]
34
  @state = hash[:state]
35
  @approved_at = hash[:approved_at]
36
+ @additional_fields = hash[:additional_fields] || {}
37
  @waitlist_id = hash[:waitlist_id]
38
  @created_at = hash[:created_at]
39
  @updated_at = hash[:updated_at]
40
+ @object = hash[:object]
41
  end
42
  end
43
  end
ruby/lib/workos/types/invite_it_contact_intents.rb
ruby/lib/workos/types/invite_it_contact_intents.rb ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ module Types
7
+ class InviteItContactIntents
8
+ SSO = "sso"
9
+ DIRECTORY_SYNC = "directory_sync"
10
+ LOG_STREAMS = "log_streams"
11
+ DOMAIN_VERIFICATION = "domain_verification"
12
+ BRING_YOUR_OWN_KEY = "bring_your_own_key"
13
+ ALL = [SSO, DIRECTORY_SYNC, LOG_STREAMS, DOMAIN_VERIFICATION, BRING_YOUR_OWN_KEY].freeze
14
+ end
15
+ end
16
+ end
ruby/lib/workos/user_management/create_password_reset_token.rb
ruby/lib/workos/user_management/create_password_reset_token.rb CHANGED
@@ -3,16 +3,5 @@
3
  # This file is auto-generated by oagen. Do not edit.
4
 
5
  module WorkOS
6
- class CreatePasswordResetToken < WorkOS::Types::BaseModel
7
- HASH_ATTRS = {
8
- email: :email
9
- }.freeze
10
-
11
- attr_accessor :email
12
-
13
- def initialize(json)
14
- hash = self.class.normalize(json)
15
- @email = hash[:email]
16
- end
17
- end
18
  end
 
3
  # This file is auto-generated by oagen. Do not edit.
4
 
5
  module WorkOS
6
+ CreatePasswordResetToken = CreateItContact
 
 
 
 
 
 
 
 
 
 
 
7
  end
ruby/rbi/workos/client.rbi
ruby/rbi/workos/client.rbi CHANGED
@@ -54,6 +54,9 @@ module WorkOS
54
  sig { returns(WorkOS::Groups) }
55
  def groups; end
56
 
 
 
 
57
  sig { returns(WorkOS::AdminPortal) }
58
  def admin_portal; end
59
 
 
54
  sig { returns(WorkOS::Groups) }
55
  def groups; end
56
 
57
+ sig { returns(WorkOS::OrganizationsItContacts) }
58
+ def organizations_it_contacts; end
59
+
60
  sig { returns(WorkOS::AdminPortal) }
61
  def admin_portal; end
62
 
ruby/rbi/workos/create_it_contact.rbi
ruby/rbi/workos/create_it_contact.rbi ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # typed: strong
6
+
7
+ module WorkOS
8
+ class CreateItContact
9
+ sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
+ def initialize(json); end
11
+
12
+ sig { returns(String) }
13
+ def email; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def email=(value); end
17
+
18
+ sig { returns(T::Hash[Symbol, T.untyped]) }
19
+ def to_h; end
20
+
21
+ sig { params(args: T.untyped).returns(String) }
22
+ def to_json(*args); end
23
+ end
24
+ end
ruby/rbi/workos/invite_it_contact.rbi
ruby/rbi/workos/invite_it_contact.rbi ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # typed: strong
6
+
7
+ module WorkOS
8
+ class InviteItContact
9
+ sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
+ def initialize(json); end
11
+
12
+ sig { returns(T::Array[String]) }
13
+ def intents; end
14
+
15
+ sig { params(value: T::Array[String]).returns(T::Array[String]) }
16
+ def intents=(value); end
17
+
18
+ sig { returns(T::Hash[Symbol, T.untyped]) }
19
+ def to_h; end
20
+
21
+ sig { params(args: T.untyped).returns(String) }
22
+ def to_json(*args); end
23
+ end
24
+ end
ruby/rbi/workos/it_contact.rbi
ruby/rbi/workos/it_contact.rbi ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # typed: strong
6
+
7
+ module WorkOS
8
+ class ItContact
9
+ sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
+ def initialize(json); end
11
+
12
+ sig { returns(String) }
13
+ def object; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def object=(value); end
17
+
18
+ sig { returns(String) }
19
+ def id; end
20
+
21
+ sig { params(value: String).returns(String) }
22
+ def id=(value); end
23
+
24
+ sig { returns(String) }
25
+ def email; end
26
+
27
+ sig { params(value: String).returns(String) }
28
+ def email=(value); end
29
+
30
+ sig { returns(String) }
31
+ def created_at; end
32
+
33
+ sig { params(value: String).returns(String) }
34
+ def created_at=(value); end
35
+
36
+ sig { returns(String) }
37
+ def updated_at; end
38
+
39
+ sig { params(value: String).returns(String) }
40
+ def updated_at=(value); end
41
+
42
+ sig { returns(T::Hash[Symbol, T.untyped]) }
43
+ def to_h; end
44
+
45
+ sig { params(args: T.untyped).returns(String) }
46
+ def to_json(*args); end
47
+ end
48
+ end
ruby/rbi/workos/organizations_it_contacts.rbi
ruby/rbi/workos/organizations_it_contacts.rbi ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ # typed: strong
6
+
7
+ module WorkOS
8
+ class OrganizationsItContacts
9
+ sig { params(client: WorkOS::BaseClient).void }
10
+ def initialize(client); end
11
+
12
+ sig do
13
+ params(
14
+ organization_id: String,
15
+ request_options: T::Hash[Symbol, T.untyped]
16
+ ).returns(WorkOS::Types::ListStruct)
17
+ end
18
+ def list_organization_it_contacts(organization_id:, request_options:); end
19
+
20
+ sig do
21
+ params(
22
+ organization_id: String,
23
+ email: String,
24
+ request_options: T::Hash[Symbol, T.untyped]
25
+ ).returns(WorkOS::ItContact)
26
+ end
27
+ def create_organization_it_contact(organization_id:, email:, request_options:); end
28
+
29
+ sig do
30
+ params(
31
+ organization_id: String,
32
+ contact_id: String,
33
+ request_options: T::Hash[Symbol, T.untyped]
34
+ ).returns(NilClass)
35
+ end
36
+ def delete_organization_it_contact(organization_id:, contact_id:, request_options:); end
37
+
38
+ sig do
39
+ params(
40
+ organization_id: String,
41
+ contact_id: String,
42
+ intents: T::Array[String],
43
+ request_options: T::Hash[Symbol, T.untyped]
44
+ ).returns(NilClass)
45
+ end
46
+ def create_it_contact_invite(organization_id:, contact_id:, intents:, request_options:); end
47
+
48
+ sig do
49
+ params(
50
+ organization_id: String,
51
+ contact_id: String,
52
+ request_options: T::Hash[Symbol, T.untyped]
53
+ ).returns(NilClass)
54
+ end
55
+ def revoke_it_contact(organization_id:, contact_id:, request_options:); end
56
+
57
+ end
58
+ end
ruby/rbi/workos/waitlist_user.rbi
ruby/rbi/workos/waitlist_user.rbi CHANGED
@@ -9,12 +9,6 @@ module WorkOS
9
  sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
  def initialize(json); end
11
 
12
- sig { returns(String) }
13
- def object; end
14
-
15
- sig { params(value: String).returns(String) }
16
- def object=(value); end
17
-
18
  sig { returns(String) }
19
  def id; end
20
 
@@ -39,6 +33,12 @@ module WorkOS
39
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
40
  def approved_at=(value); end
41
 
 
 
 
 
 
 
42
  sig { returns(T.nilable(String)) }
43
  def waitlist_id; end
44
 
@@ -57,6 +57,12 @@ module WorkOS
57
  sig { params(value: String).returns(String) }
58
  def updated_at=(value); end
59
 
 
 
 
 
 
 
60
  sig { returns(T::Hash[Symbol, T.untyped]) }
61
  def to_h; end
62
 
 
9
  sig { params(json: T.any(String, T::Hash[Symbol, T.untyped])).void }
10
  def initialize(json); end
11
 
 
 
 
 
 
 
12
  sig { returns(String) }
13
  def id; end
14
 
 
33
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
  def approved_at=(value); end
35
 
36
+ sig { returns(T.nilable(T::Hash[String, String])) }
37
+ def additional_fields; end
38
+
39
+ sig { params(value: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) }
40
+ def additional_fields=(value); end
41
+
42
  sig { returns(T.nilable(String)) }
43
  def waitlist_id; end
44
 
 
57
  sig { params(value: String).returns(String) }
58
  def updated_at=(value); end
59
 
60
+ sig { returns(String) }
61
+ def object; end
62
+
63
+ sig { params(value: String).returns(String) }
64
+ def object=(value); end
65
+
66
  sig { returns(T::Hash[Symbol, T.untyped]) }
67
  def to_h; end
68
 
ruby/test/workos/test_organizations_it_contacts.rb
ruby/test/workos/test_organizations_it_contacts.rb ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ require "test_helper"
6
+
7
+ class OrganizationsItContactsTest < Minitest::Test
8
+ include FixtureHelper
9
+
10
+ def setup
11
+ @client = WorkOS::Client.new(api_key: "sk_test_123")
12
+ end
13
+
14
+ def test_list_organization_it_contacts_returns_expected_result
15
+ stub_request(:get, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)})
16
+ .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
17
+ result = @client.organizations_it_contacts.list_organization_it_contacts(organization_id: "stub")
18
+ assert_kind_of WorkOS::Types::ListStruct, result
19
+ end
20
+
21
+ def test_create_organization_it_contact_returns_expected_result
22
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)})
23
+ .to_return(body: "{}", status: 200)
24
+ result = @client.organizations_it_contacts.create_organization_it_contact(organization_id: "stub", email: "stub")
25
+ refute_nil result
26
+ end
27
+
28
+ def test_delete_organization_it_contact_returns_expected_result
29
+ stub_request(:delete, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub(\?|\z)})
30
+ .to_return(body: "{}", status: 200)
31
+ result = @client.organizations_it_contacts.delete_organization_it_contact(organization_id: "stub", contact_id: "stub")
32
+ assert_nil result
33
+ end
34
+
35
+ def test_create_it_contact_invite_returns_expected_result
36
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/invite(\?|\z)})
37
+ .to_return(body: "{}", status: 200)
38
+ result = @client.organizations_it_contacts.create_it_contact_invite(organization_id: "stub", contact_id: "stub", intents: ["stub"])
39
+ assert_nil result
40
+ end
41
+
42
+ def test_revoke_it_contact_returns_expected_result
43
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/revoke(\?|\z)})
44
+ .to_return(body: "{}", status: 200)
45
+ result = @client.organizations_it_contacts.revoke_it_contact(organization_id: "stub", contact_id: "stub")
46
+ assert_nil result
47
+ end
48
+
49
+ # Parameterized authentication error tests (one per endpoint).
50
+ [
51
+ {name: :list_organization_it_contacts, verb: :get, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)}, args: {organization_id: "stub"}},
52
+ {name: :create_organization_it_contact, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts(\?|\z)}, args: {organization_id: "stub", email: "stub"}},
53
+ {name: :delete_organization_it_contact, verb: :delete, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub(\?|\z)}, args: {organization_id: "stub", contact_id: "stub"}},
54
+ {name: :create_it_contact_invite, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/invite(\?|\z)}, args: {organization_id: "stub", contact_id: "stub", intents: ["stub"]}},
55
+ {name: :revoke_it_contact, verb: :post, url: %r{\Ahttps://api\.workos\.com/organizations/stub/it_contacts/stub/revoke(\?|\z)}, args: {organization_id: "stub", contact_id: "stub"}}
56
+ ].each do |spec|
57
+ define_method("test_#{spec[:name]}_raises_authentication_error_on_401") do
58
+ stub_request(spec[:verb], spec[:url])
59
+ .to_return(body: '{"message": "Unauthorized"}', status: 401)
60
+ assert_raises(WorkOS::AuthenticationError) do
61
+ @client.organizations_it_contacts.send(spec[:name], **(spec[:args] || {}))
62
+ end
63
+ end
64
+ end
65
+ end
ruby/test/workos/test_organizations_it_contacts_model_round_trip.rb
ruby/test/workos/test_organizations_it_contacts_model_round_trip.rb ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ require "test_helper"
6
+
7
+ class OrganizationsItContactsModelRoundTripTest < Minitest::Test
8
+ def test_create_it_contact_round_trip
9
+ fixture = {
10
+ "email" => "stub"
11
+ }
12
+ model = WorkOS::CreateItContact.new(fixture.to_json)
13
+ json = model.to_h
14
+ assert_kind_of Hash, json
15
+ assert_equal fixture["email"], json[:email]
16
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
17
+ end
18
+
19
+ def test_invite_it_contact_round_trip
20
+ fixture = {
21
+ "intents" => []
22
+ }
23
+ model = WorkOS::InviteItContact.new(fixture.to_json)
24
+ json = model.to_h
25
+ assert_kind_of Hash, json
26
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
27
+ end
28
+
29
+ def test_it_contact_round_trip
30
+ fixture = {
31
+ "object" => "it_contact",
32
+ "id" => "stub",
33
+ "email" => "stub",
34
+ "created_at" => "stub",
35
+ "updated_at" => "stub"
36
+ }
37
+ model = WorkOS::ItContact.new(fixture.to_json)
38
+ json = model.to_h
39
+ assert_kind_of Hash, json
40
+ assert_equal fixture["id"], json[:id]
41
+ assert_equal fixture["email"], json[:email]
42
+ assert_equal fixture["created_at"], json[:created_at]
43
+ assert_equal fixture["updated_at"], json[:updated_at]
44
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
45
+ end
46
+ end
ruby/test/workos/test_shared_model_round_trip.rb
ruby/test/workos/test_shared_model_round_trip.rb CHANGED
@@ -176,14 +176,15 @@ class SharedModelRoundTripTest < Minitest::Test
176
 
177
  def test_waitlist_user_round_trip
178
  fixture = {
179
- "object" => "waitlist_user",
180
  "id" => "stub",
181
  "email" => "stub",
182
  "state" => "stub",
183
  "approved_at" => nil,
 
184
  "waitlist_id" => nil,
185
  "created_at" => "stub",
186
- "updated_at" => "stub"
 
187
  }
188
  model = WorkOS::WaitlistUser.new(fixture.to_json)
189
  json = model.to_h
 
176
 
177
  def test_waitlist_user_round_trip
178
  fixture = {
 
179
  "id" => "stub",
180
  "email" => "stub",
181
  "state" => "stub",
182
  "approved_at" => nil,
183
+ "additional_fields" => {},
184
  "waitlist_id" => nil,
185
  "created_at" => "stub",
186
+ "updated_at" => "stub",
187
+ "object" => "waitlist_user"
188
  }
189
  model = WorkOS::WaitlistUser.new(fixture.to_json)
190
  json = model.to_h

All files in this language are hidden by the current filters.

code: 24 · tests: 0 · manifest: 1

rust/.oagen-manifest.json
rust/.oagen-manifest.json CHANGED
@@ -77,6 +77,7 @@
77
  "src/enums/invitation_resent_data_state.rs",
78
  "src/enums/invitation_revoked_data_state.rs",
79
  "src/enums/invitation_state.rs",
 
80
  "src/enums/mod.rs",
81
  "src/enums/organization_created_data_domain_state.rs",
82
  "src/enums/organization_created_data_domain_verification_strategy.rs",
@@ -341,6 +342,7 @@
341
  "src/models/create_group.rs",
342
  "src/models/create_group_membership.rs",
343
  "src/models/create_group_role_assignment.rs",
 
344
  "src/models/create_m2m_application.rs",
345
  "src/models/create_magic_code_and_return.rs",
346
  "src/models/create_oauth_application.rs",
@@ -500,6 +502,10 @@
500
  "src/models/invitation_resent_data.rs",
501
  "src/models/invitation_revoked.rs",
502
  "src/models/invitation_revoked_data.rs",
 
 
 
 
503
  "src/models/jwks_response.rs",
504
  "src/models/jwks_response_keys.rs",
505
  "src/models/jwt_template_response.rs",
@@ -744,6 +750,7 @@
744
  "src/resources/organization_domains.rs",
745
  "src/resources/organization_membership.rs",
746
  "src/resources/organizations.rs",
 
747
  "src/resources/pipes.rs",
748
  "src/resources/pipes_provider.rs",
749
  "src/resources/radar.rs",
@@ -953,6 +960,7 @@
953
  "tests/fixtures/create_group.json",
954
  "tests/fixtures/create_group_membership.json",
955
  "tests/fixtures/create_group_role_assignment.json",
 
956
  "tests/fixtures/create_m2m_application.json",
957
  "tests/fixtures/create_magic_code_and_return.json",
958
  "tests/fixtures/create_oauth_application.json",
@@ -1112,6 +1120,10 @@
1112
  "tests/fixtures/invitation_resent_data.json",
1113
  "tests/fixtures/invitation_revoked.json",
1114
  "tests/fixtures/invitation_revoked_data.json",
 
 
 
 
1115
  "tests/fixtures/jwks_response.json",
1116
  "tests/fixtures/jwks_response_keys.json",
1117
  "tests/fixtures/jwt_template_response.json",
@@ -1343,6 +1355,7 @@
1343
  "tests/multi_factor_auth_test.rs",
1344
  "tests/organization_domains_test.rs",
1345
  "tests/organization_membership_test.rs",
 
1346
  "tests/organizations_test.rs",
1347
  "tests/pipes_provider_test.rs",
1348
  "tests/pipes_test.rs",
@@ -1674,6 +1687,10 @@
1674
  "sdkMethod": "authorize_data_integration",
1675
  "service": "pipes"
1676
  },
 
 
 
 
1677
  "POST /data-integrations/{slug}/credentials": {
1678
  "sdkMethod": "create_data_integration_credential",
1679
  "service": "pipes"
@@ -1906,6 +1923,26 @@
1906
  "sdkMethod": "delete_group_organization_membership",
1907
  "service": "groups"
1908
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1909
  "POST /portal/generate_link": {
1910
  "sdkMethod": "generate_link",
1911
  "service": "admin_portal"
@@ -2197,10 +2234,6 @@
2197
  "POST /widgets/token": {
2198
  "sdkMethod": "create_token",
2199
  "service": "widgets"
2200
- },
2201
- "PUT /data-integrations/{slug}/client-credentials": {
2202
- "sdkMethod": "update_data_integration_client_credentials",
2203
- "service": "pipes"
2204
  }
2205
  }
2206
  }
 
77
  "src/enums/invitation_resent_data_state.rs",
78
  "src/enums/invitation_revoked_data_state.rs",
79
  "src/enums/invitation_state.rs",
80
+ "src/enums/invite_it_contact_intents.rs",
81
  "src/enums/mod.rs",
82
  "src/enums/organization_created_data_domain_state.rs",
83
  "src/enums/organization_created_data_domain_verification_strategy.rs",
 
342
  "src/models/create_group.rs",
343
  "src/models/create_group_membership.rs",
344
  "src/models/create_group_role_assignment.rs",
345
+ "src/models/create_it_contact.rs",
346
  "src/models/create_m2m_application.rs",
347
  "src/models/create_magic_code_and_return.rs",
348
  "src/models/create_oauth_application.rs",
 
502
  "src/models/invitation_resent_data.rs",
503
  "src/models/invitation_revoked.rs",
504
  "src/models/invitation_revoked_data.rs",
505
+ "src/models/invite_it_contact.rs",
506
+ "src/models/it_contact.rs",
507
+ "src/models/it_contact_list.rs",
508
+ "src/models/it_contact_list_list_metadata.rs",
509
  "src/models/jwks_response.rs",
510
  "src/models/jwks_response_keys.rs",
511
  "src/models/jwt_template_response.rs",
 
750
  "src/resources/organization_domains.rs",
751
  "src/resources/organization_membership.rs",
752
  "src/resources/organizations.rs",
753
+ "src/resources/organizations_it_contacts.rs",
754
  "src/resources/pipes.rs",
755
  "src/resources/pipes_provider.rs",
756
  "src/resources/radar.rs",
 
960
  "tests/fixtures/create_group.json",
961
  "tests/fixtures/create_group_membership.json",
962
  "tests/fixtures/create_group_role_assignment.json",
963
+ "tests/fixtures/create_it_contact.json",
964
  "tests/fixtures/create_m2m_application.json",
965
  "tests/fixtures/create_magic_code_and_return.json",
966
  "tests/fixtures/create_oauth_application.json",
 
1120
  "tests/fixtures/invitation_resent_data.json",
1121
  "tests/fixtures/invitation_revoked.json",
1122
  "tests/fixtures/invitation_revoked_data.json",
1123
+ "tests/fixtures/invite_it_contact.json",
1124
+ "tests/fixtures/it_contact.json",
1125
+ "tests/fixtures/it_contact_list.json",
1126
+ "tests/fixtures/it_contact_list_list_metadata.json",
1127
  "tests/fixtures/jwks_response.json",
1128
  "tests/fixtures/jwks_response_keys.json",
1129
  "tests/fixtures/jwt_template_response.json",
 
1355
  "tests/multi_factor_auth_test.rs",
1356
  "tests/organization_domains_test.rs",
1357
  "tests/organization_membership_test.rs",
1358
+ "tests/organizations_it_contacts_test.rs",
1359
  "tests/organizations_test.rs",
1360
  "tests/pipes_provider_test.rs",
1361
  "tests/pipes_test.rs",
 
1687
  "sdkMethod": "authorize_data_integration",
1688
  "service": "pipes"
1689
  },
1690
+ "PUT /data-integrations/{slug}/client-credentials": {
1691
+ "sdkMethod": "update_data_integration_client_credentials",
1692
+ "service": "pipes"
1693
+ },
1694
  "POST /data-integrations/{slug}/credentials": {
1695
  "sdkMethod": "create_data_integration_credential",
1696
  "service": "pipes"
 
1923
  "sdkMethod": "delete_group_organization_membership",
1924
  "service": "groups"
1925
  },
1926
+ "GET /organizations/{organization_id}/it_contacts": {
1927
+ "sdkMethod": "list_organization_it_contacts",
1928
+ "service": "organizations_it_contacts"
1929
+ },
1930
+ "POST /organizations/{organization_id}/it_contacts": {
1931
+ "sdkMethod": "create_organization_it_contact",
1932
+ "service": "organizations_it_contacts"
1933
+ },
1934
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1935
+ "sdkMethod": "delete_organization_it_contact",
1936
+ "service": "organizations_it_contacts"
1937
+ },
1938
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1939
+ "sdkMethod": "create_it_contact_invite",
1940
+ "service": "organizations_it_contacts"
1941
+ },
1942
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1943
+ "sdkMethod": "revoke_it_contact",
1944
+ "service": "organizations_it_contacts"
1945
+ },
1946
  "POST /portal/generate_link": {
1947
  "sdkMethod": "generate_link",
1948
  "service": "admin_portal"
 
2234
  "POST /widgets/token": {
2235
  "sdkMethod": "create_token",
2236
  "service": "widgets"
 
 
 
 
2237
  }
2238
  }
2239
  }
rust/src/enums/invite_it_contact_intents.rs
rust/src/enums/invite_it_contact_intents.rs ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ use serde::{Deserialize, Serialize};
4
+ use std::fmt;
5
+ use std::str::FromStr;
6
+
7
+ #[derive(Debug, Clone, PartialEq, Eq, Hash)]
8
+ #[non_exhaustive]
9
+ pub enum InviteItContactIntents {
10
+ SSO,
11
+ DirectorySync,
12
+ LogStreams,
13
+ DomainVerification,
14
+ BringYourOwnKey,
15
+ /// Wire value not recognized by this SDK version. The original
16
+ /// string is preserved verbatim. WorkOS may add new enum values
17
+ /// server-side; matching on this variant lets callers handle
18
+ /// forward-compatible values without panicking.
19
+ Unknown(String),
20
+ }
21
+
22
+ impl InviteItContactIntents {
23
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
24
+ /// original wire value as received from the API.
25
+ #[allow(deprecated)]
26
+ pub fn as_str(&self) -> &str {
27
+ match self {
28
+ Self::SSO => "sso",
29
+ Self::DirectorySync => "directory_sync",
30
+ Self::LogStreams => "log_streams",
31
+ Self::DomainVerification => "domain_verification",
32
+ Self::BringYourOwnKey => "bring_your_own_key",
33
+ Self::Unknown(s) => s.as_str(),
34
+ }
35
+ }
36
+ }
37
+
38
+ impl fmt::Display for InviteItContactIntents {
39
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40
+ f.write_str(self.as_str())
41
+ }
42
+ }
43
+
44
+ impl AsRef<str> for InviteItContactIntents {
45
+ fn as_ref(&self) -> &str {
46
+ self.as_str()
47
+ }
48
+ }
49
+
50
+ impl FromStr for InviteItContactIntents {
51
+ type Err = std::convert::Infallible;
52
+ #[allow(deprecated)]
53
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
54
+ Ok(match s {
55
+ "sso" => Self::SSO,
56
+ "directory_sync" => Self::DirectorySync,
57
+ "log_streams" => Self::LogStreams,
58
+ "domain_verification" => Self::DomainVerification,
59
+ "bring_your_own_key" => Self::BringYourOwnKey,
60
+ other => Self::Unknown(other.to_string()),
61
+ })
62
+ }
63
+ }
64
+
65
+ impl From<String> for InviteItContactIntents {
66
+ fn from(s: String) -> Self {
67
+ // Reuse the original `String` allocation in the fallback branch.
68
+ match Self::from_str(&s) {
69
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
70
+ Ok(other) => other,
71
+ }
72
+ }
73
+ }
74
+
75
+ impl From<&str> for InviteItContactIntents {
76
+ fn from(s: &str) -> Self {
77
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
78
+ }
79
+ }
80
+
81
+ impl Serialize for InviteItContactIntents {
82
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
83
+ serializer.serialize_str(self.as_str())
84
+ }
85
+ }
86
+
87
+ impl<'de> Deserialize<'de> for InviteItContactIntents {
88
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
89
+ let s = String::deserialize(deserializer)?;
90
+ Ok(Self::from(s))
91
+ }
92
+ }
rust/src/enums/mod.rs
rust/src/enums/mod.rs CHANGED
@@ -75,6 +75,7 @@ pub mod invitation_created_data_state;
75
  pub mod invitation_resent_data_state;
76
  pub mod invitation_revoked_data_state;
77
  pub mod invitation_state;
 
78
  pub mod organization_created_data_domain_state;
79
  pub mod organization_created_data_domain_verification_strategy;
80
  pub mod organization_deleted_data_domain_state;
@@ -222,6 +223,7 @@ pub use invitation_created_data_state::*;
222
  pub use invitation_resent_data_state::*;
223
  pub use invitation_revoked_data_state::*;
224
  pub use invitation_state::*;
 
225
  pub use organization_created_data_domain_state::*;
226
  pub use organization_created_data_domain_verification_strategy::*;
227
  pub use organization_deleted_data_domain_state::*;
 
75
  pub mod invitation_resent_data_state;
76
  pub mod invitation_revoked_data_state;
77
  pub mod invitation_state;
78
+ pub mod invite_it_contact_intents;
79
  pub mod organization_created_data_domain_state;
80
  pub mod organization_created_data_domain_verification_strategy;
81
  pub mod organization_deleted_data_domain_state;
 
223
  pub use invitation_resent_data_state::*;
224
  pub use invitation_revoked_data_state::*;
225
  pub use invitation_state::*;
226
+ pub use invite_it_contact_intents::*;
227
  pub use organization_created_data_domain_state::*;
228
  pub use organization_created_data_domain_verification_strategy::*;
229
  pub use organization_deleted_data_domain_state::*;
rust/src/models/create_it_contact.rs
rust/src/models/create_it_contact.rs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ #[allow(unused_imports)]
4
+ use super::*;
5
+ #[allow(unused_imports)]
6
+ use crate::enums::*;
7
+ use serde::{Deserialize, Serialize};
8
+ #[derive(Debug, Clone, Serialize, Deserialize)]
9
+ pub struct CreateItContact {
10
+ /// The email address of the IT contact.
11
+ pub email: String,
12
+ }
rust/src/models/invite_it_contact.rs
rust/src/models/invite_it_contact.rs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ #[allow(unused_imports)]
4
+ use super::*;
5
+ #[allow(unused_imports)]
6
+ use crate::enums::*;
7
+ use serde::{Deserialize, Serialize};
8
+ #[derive(Debug, Clone, Serialize, Deserialize)]
9
+ pub struct InviteItContact {
10
+ /// The Admin Portal features that the IT contact can configure.
11
+ pub intents: Vec<InviteItContactIntents>,
12
+ }
rust/src/models/it_contact.rs
rust/src/models/it_contact.rs ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ #[allow(unused_imports)]
4
+ use super::*;
5
+ #[allow(unused_imports)]
6
+ use crate::enums::*;
7
+ use serde::{Deserialize, Serialize};
8
+ #[derive(Debug, Clone, Serialize, Deserialize)]
9
+ pub struct ItContact {
10
+ /// The IT Contact object.
11
+ pub object: String,
12
+ /// The unique ID of the IT Contact.
13
+ pub id: String,
14
+ /// The email address of the IT Contact.
15
+ pub email: String,
16
+ /// An ISO 8601 timestamp.
17
+ pub created_at: String,
18
+ /// An ISO 8601 timestamp.
19
+ pub updated_at: String,
20
+ }
rust/src/models/it_contact_list.rs
rust/src/models/it_contact_list.rs ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ #[allow(unused_imports)]
4
+ use super::*;
5
+ #[allow(unused_imports)]
6
+ use crate::enums::*;
7
+ use serde::{Deserialize, Serialize};
8
+ #[derive(Debug, Clone, Serialize, Deserialize)]
9
+ pub struct ItContactList {
10
+ /// Indicates this is a list response.
11
+ pub object: String,
12
+ /// The list of records for the current page.
13
+ pub data: Vec<ItContact>,
14
+ /// Pagination cursors for navigating between pages of results.
15
+ pub list_metadata: ItContactListListMetadata,
16
+ }
rust/src/models/it_contact_list_list_metadata.rs
rust/src/models/it_contact_list_list_metadata.rs ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ #[allow(unused_imports)]
4
+ use super::*;
5
+ #[allow(unused_imports)]
6
+ use crate::enums::*;
7
+ use serde::{Deserialize, Serialize};
8
+ /// Pagination cursors for navigating between pages of results.
9
+ #[derive(Debug, Clone, Serialize, Deserialize)]
10
+ pub struct ItContactListListMetadata {
11
+ /// An object ID that defines your place in the list. When the ID is not present, you are at the start of the list.
12
+ #[serde(skip_serializing_if = "Option::is_none", default)]
13
+ pub before: Option<String>,
14
+ /// An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
15
+ #[serde(skip_serializing_if = "Option::is_none", default)]
16
+ pub after: Option<String>,
17
+ }
rust/src/models/mod.rs
rust/src/models/mod.rs CHANGED
@@ -192,6 +192,7 @@ mod create_data_key_response;
192
  mod create_group;
193
  mod create_group_membership;
194
  mod create_group_role_assignment;
 
195
  mod create_m2m_application;
196
  mod create_magic_code_and_return;
197
  mod create_oauth_application;
@@ -351,6 +352,10 @@ mod invitation_resent;
351
  mod invitation_resent_data;
352
  mod invitation_revoked;
353
  mod invitation_revoked_data;
 
 
 
 
354
  mod jwks_response;
355
  mod jwks_response_keys;
356
  mod jwt_template_response;
@@ -771,6 +776,7 @@ pub use create_data_key_response::*;
771
  pub use create_group::*;
772
  pub use create_group_membership::*;
773
  pub use create_group_role_assignment::*;
 
774
  pub use create_m2m_application::*;
775
  pub use create_magic_code_and_return::*;
776
  pub use create_oauth_application::*;
@@ -930,6 +936,10 @@ pub use invitation_resent::*;
930
  pub use invitation_resent_data::*;
931
  pub use invitation_revoked::*;
932
  pub use invitation_revoked_data::*;
 
 
 
 
933
  pub use jwks_response::*;
934
  pub use jwks_response_keys::*;
935
  pub use jwt_template_response::*;
 
192
  mod create_group;
193
  mod create_group_membership;
194
  mod create_group_role_assignment;
195
+ mod create_it_contact;
196
  mod create_m2m_application;
197
  mod create_magic_code_and_return;
198
  mod create_oauth_application;
 
352
  mod invitation_resent_data;
353
  mod invitation_revoked;
354
  mod invitation_revoked_data;
355
+ mod invite_it_contact;
356
+ mod it_contact;
357
+ mod it_contact_list;
358
+ mod it_contact_list_list_metadata;
359
  mod jwks_response;
360
  mod jwks_response_keys;
361
  mod jwt_template_response;
 
776
  pub use create_group::*;
777
  pub use create_group_membership::*;
778
  pub use create_group_role_assignment::*;
779
+ pub use create_it_contact::*;
780
  pub use create_m2m_application::*;
781
  pub use create_magic_code_and_return::*;
782
  pub use create_oauth_application::*;
 
936
  pub use invitation_resent_data::*;
937
  pub use invitation_revoked::*;
938
  pub use invitation_revoked_data::*;
939
+ pub use invite_it_contact::*;
940
+ pub use it_contact::*;
941
+ pub use it_contact_list::*;
942
+ pub use it_contact_list_list_metadata::*;
943
  pub use jwks_response::*;
944
  pub use jwks_response_keys::*;
945
  pub use jwt_template_response::*;
rust/src/models/organization_input.rs
rust/src/models/organization_input.rs CHANGED
@@ -14,6 +14,7 @@ pub struct OrganizationInput {
14
  pub allow_profiles_outside_organization: Option<bool>,
15
  /// The domains associated with the organization. Deprecated in favor of `domain_data`.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
 
17
  pub domains: Option<Vec<String>>,
18
  /// The domains associated with the organization, including verification state.
19
  #[serde(skip_serializing_if = "Option::is_none", default)]
 
14
  pub allow_profiles_outside_organization: Option<bool>,
15
  /// The domains associated with the organization. Deprecated in favor of `domain_data`.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
+ #[deprecated]
18
  pub domains: Option<Vec<String>>,
19
  /// The domains associated with the organization, including verification state.
20
  #[serde(skip_serializing_if = "Option::is_none", default)]
rust/src/models/waitlist_user.rs
rust/src/models/waitlist_user.rs CHANGED
@@ -7,22 +7,25 @@ use crate::enums::*;
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct WaitlistUser {
10
- /// Distinguishes the Waitlist User object.
11
- pub object: String,
12
- /// The unique ID of the Waitlist User.
13
  pub id: String,
14
- /// The email address of the Waitlist User.
15
  pub email: String,
16
- /// The state of the Waitlist User.
17
  pub state: WaitlistUserState,
18
- /// The timestamp when the Waitlist User was approved, or null if not yet approved.
19
  #[serde(skip_serializing_if = "Option::is_none", default)]
20
  pub approved_at: Option<String>,
 
 
 
21
- /// The unique ID of the Waitlist that the Waitlist User joined.
22
  #[serde(skip_serializing_if = "Option::is_none", default)]
23
  pub waitlist_id: Option<String>,
24
  /// An ISO 8601 timestamp.
25
  pub created_at: String,
26
  /// An ISO 8601 timestamp.
27
  pub updated_at: String,
 
 
28
  }
 
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct WaitlistUser {
 
 
10
+ /// The unique ID of the waitlist entry.
11
  pub id: String,
12
+ /// The email address of the user on the waitlist.
13
  pub email: String,
14
+ /// The state of the waitlist entry.
15
  pub state: WaitlistUserState,
16
+ /// The timestamp when the entry was approved, or null if not yet approved.
17
  #[serde(skip_serializing_if = "Option::is_none", default)]
18
  pub approved_at: Option<String>,
19
+ /// Additional fields submitted when the user joined the waitlist. Values are user-provided — treat them as untrusted input when rendering or exporting.
20
+ #[serde(skip_serializing_if = "Option::is_none", default)]
21
+ pub additional_fields: Option<std::collections::HashMap<String, String>>,
22
+ /// The unique ID of the waitlist the entry belongs to.
23
  #[serde(skip_serializing_if = "Option::is_none", default)]
24
  pub waitlist_id: Option<String>,
25
  /// An ISO 8601 timestamp.
26
  pub created_at: String,
27
  /// An ISO 8601 timestamp.
28
  pub updated_at: String,
29
+ /// Distinguishes the Waitlist User object.
30
+ pub object: String,
31
  }
rust/src/resources/authorization.rs
rust/src/resources/authorization.rs CHANGED
@@ -1261,7 +1261,7 @@ impl<'a> AuthorizationApi<'a> {
1261
 
1262
  /// List effective permissions for an organization membership on a resource
1263
  ///
1264
- /// Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources.
1265
  pub async fn list_effective_permissions(
1266
  &self,
1267
  organization_membership_id: &str,
@@ -1330,7 +1330,7 @@ impl<'a> AuthorizationApi<'a> {
1330
 
1331
  /// List effective permissions for an organization membership on a resource by external ID
1332
  ///
1333
- /// 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.
1334
  pub async fn list_effective_permissions_by_external_id(
1335
  &self,
1336
  organization_membership_id: &str,
 
1261
 
1262
  /// List effective permissions for an organization membership on a resource
1263
  ///
1264
+ /// Returns all permissions the organization membership effectively has on a resource, including permissions inherited through roles assigned to ancestor resources. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
1265
  pub async fn list_effective_permissions(
1266
  &self,
1267
  organization_membership_id: &str,
 
1330
 
1331
  /// List effective permissions for an organization membership on a resource by external ID
1332
  ///
1333
+ /// 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. Results are not filtered by the resource type: a permission is returned whenever a check for it on this resource would be authorized, and each permission is labeled with the resource type it is declared on.
1334
  pub async fn list_effective_permissions_by_external_id(
1335
  &self,
1336
  organization_membership_id: &str,
rust/src/resources/mod.rs
rust/src/resources/mod.rs CHANGED
@@ -15,6 +15,7 @@ pub mod multi_factor_auth;
15
  pub mod organization_domains;
16
  pub mod organization_membership;
17
  pub mod organizations;
 
18
  pub mod pipes;
19
  pub mod pipes_provider;
20
  pub mod radar;
@@ -39,6 +40,7 @@ pub use multi_factor_auth::MultiFactorAuthApi;
39
  pub use organization_domains::OrganizationDomainsApi;
40
  pub use organization_membership::OrganizationMembershipApi;
41
  pub use organizations::OrganizationsApi;
 
42
  pub use pipes::PipesApi;
43
  pub use pipes_provider::PipesProviderApi;
44
  pub use radar::RadarApi;
 
15
  pub mod organization_domains;
16
  pub mod organization_membership;
17
  pub mod organizations;
18
+ pub mod organizations_it_contacts;
19
  pub mod pipes;
20
  pub mod pipes_provider;
21
  pub mod radar;
 
40
  pub use organization_domains::OrganizationDomainsApi;
41
  pub use organization_membership::OrganizationMembershipApi;
42
  pub use organizations::OrganizationsApi;
43
+ pub use organizations_it_contacts::OrganizationsItContactsApi;
44
  pub use pipes::PipesApi;
45
  pub use pipes_provider::PipesProviderApi;
46
  pub use radar::RadarApi;
rust/src/resources/organizations_it_contacts.rs
rust/src/resources/organizations_it_contacts.rs ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ use crate::client::Client;
4
+ #[allow(unused_imports)]
5
+ use crate::enums::*;
6
+ use crate::error::Error;
7
+ #[allow(unused_imports)]
8
+ use crate::models::*;
9
+ use serde::Serialize;
10
+
11
+ pub struct OrganizationsItContactsApi<'a> {
12
+ pub(crate) client: &'a Client,
13
+ }
14
+
15
+ #[derive(Debug, Clone, Serialize)]
16
+ pub struct CreateOrganizationItContactParams {
17
+ /// Request body sent with this call.
18
+ ///
19
+ /// Required.
20
+ #[serde(skip)]
21
+ pub body: CreateItContact,
22
+ }
23
+
24
+ impl CreateOrganizationItContactParams {
25
+ /// Construct a new `CreateOrganizationItContactParams` with the required fields set.
26
+ #[allow(deprecated)]
27
+ pub fn new(body: CreateItContact) -> Self {
28
+ Self { body }
29
+ }
30
+ }
31
+
32
+ #[derive(Debug, Clone, Serialize)]
33
+ pub struct CreateItContactInviteParams {
34
+ /// Request body sent with this call.
35
+ ///
36
+ /// Required.
37
+ #[serde(skip)]
38
+ pub body: InviteItContact,
39
+ }
40
+
41
+ impl CreateItContactInviteParams {
42
+ /// Construct a new `CreateItContactInviteParams` with the required fields set.
43
+ #[allow(deprecated)]
44
+ pub fn new(body: InviteItContact) -> Self {
45
+ Self { body }
46
+ }
47
+ }
48
+
49
+ impl<'a> OrganizationsItContactsApi<'a> {
50
+ /// List IT contacts
51
+ ///
52
+ /// Get the IT contacts for an organization.
53
+ pub async fn list_organization_it_contacts(
54
+ &self,
55
+ organization_id: &str,
56
+ ) -> Result<ItContactList, Error> {
57
+ self.list_organization_it_contacts_with_options(organization_id, None)
58
+ .await
59
+ }
60
+
61
+ /// Variant of [`Self::list_organization_it_contacts`] that accepts per-request [`crate::RequestOptions`].
62
+ pub async fn list_organization_it_contacts_with_options(
63
+ &self,
64
+ organization_id: &str,
65
+ options: Option<&crate::RequestOptions>,
66
+ ) -> Result<ItContactList, Error> {
67
+ let organization_id = crate::client::path_segment(organization_id);
68
+ let path = format!("/organizations/{organization_id}/it_contacts");
69
+ let method = http::Method::GET;
70
+ self.client
71
+ .request_with_query_opts(method, &path, &(), options)
72
+ .await
73
+ }
74
+
75
+ /// Create an IT contact
76
+ ///
77
+ /// Add an IT contact to an organization. No Admin Portal invitation is sent, though the contact is notified if the organization has a connection certificate nearing expiry.
78
+ pub async fn create_organization_it_contact(
79
+ &self,
80
+ organization_id: &str,
81
+ params: CreateOrganizationItContactParams,
82
+ ) -> Result<ItContact, Error> {
83
+ self.create_organization_it_contact_with_options(organization_id, params, None)
84
+ .await
85
+ }
86
+
87
+ /// Variant of [`Self::create_organization_it_contact`] that accepts per-request [`crate::RequestOptions`].
88
+ pub async fn create_organization_it_contact_with_options(
89
+ &self,
90
+ organization_id: &str,
91
+ params: CreateOrganizationItContactParams,
92
+ options: Option<&crate::RequestOptions>,
93
+ ) -> Result<ItContact, Error> {
94
+ let organization_id = crate::client::path_segment(organization_id);
95
+ let path = format!("/organizations/{organization_id}/it_contacts");
96
+ let method = http::Method::POST;
97
+ self.client
98
+ .request_with_body_opts(method, &path, &params, Some(&params.body), options)
99
+ .await
100
+ }
101
+
102
+ /// Delete an IT contact
103
+ ///
104
+ /// Remove an IT contact from an organization and revoke the contact's active setup links.
105
+ pub async fn delete_organization_it_contact(
106
+ &self,
107
+ organization_id: &str,
108
+ contact_id: &str,
109
+ ) -> Result<(), Error> {
110
+ self.delete_organization_it_contact_with_options(organization_id, contact_id, None)
111
+ .await
112
+ }
113
+
114
+ /// Variant of [`Self::delete_organization_it_contact`] that accepts per-request [`crate::RequestOptions`].
115
+ pub async fn delete_organization_it_contact_with_options(
116
+ &self,
117
+ organization_id: &str,
118
+ contact_id: &str,
119
+ options: Option<&crate::RequestOptions>,
120
+ ) -> Result<(), Error> {
121
+ let organization_id = crate::client::path_segment(organization_id);
122
+ let contact_id = crate::client::path_segment(contact_id);
123
+ let path = format!("/organizations/{organization_id}/it_contacts/{contact_id}");
124
+ let method = http::Method::DELETE;
125
+ self.client
126
+ .request_with_query_opts_empty(method, &path, &(), options)
127
+ .await
128
+ }
129
+
130
+ /// Invite an IT contact
131
+ ///
132
+ /// Create an Admin Portal setup link and email it to the IT contact. An organization can have at most one active invitation.
133
+ pub async fn create_it_contact_invite(
134
+ &self,
135
+ organization_id: &str,
136
+ contact_id: &str,
137
+ params: CreateItContactInviteParams,
138
+ ) -> Result<(), Error> {
139
+ self.create_it_contact_invite_with_options(organization_id, contact_id, params, None)
140
+ .await
141
+ }
142
+
143
+ /// Variant of [`Self::create_it_contact_invite`] that accepts per-request [`crate::RequestOptions`].
144
+ pub async fn create_it_contact_invite_with_options(
145
+ &self,
146
+ organization_id: &str,
147
+ contact_id: &str,
148
+ params: CreateItContactInviteParams,
149
+ options: Option<&crate::RequestOptions>,
150
+ ) -> Result<(), Error> {
151
+ let organization_id = crate::client::path_segment(organization_id);
152
+ let contact_id = crate::client::path_segment(contact_id);
153
+ let path = format!("/organizations/{organization_id}/it_contacts/{contact_id}/invite");
154
+ let method = http::Method::POST;
155
+ self.client
156
+ .request_with_body_opts_empty(method, &path, &params, Some(&params.body), options)
157
+ .await
158
+ }
159
+
160
+ /// Revoke an IT contact's invitation
161
+ ///
162
+ /// Revoke the organization's active Admin Portal invitation.
163
+ pub async fn revoke_it_contact(
164
+ &self,
165
+ organization_id: &str,
166
+ contact_id: &str,
167
+ ) -> Result<(), Error> {
168
+ self.revoke_it_contact_with_options(organization_id, contact_id, None)
169
+ .await
170
+ }
171
+
172
+ /// Variant of [`Self::revoke_it_contact`] that accepts per-request [`crate::RequestOptions`].
173
+ pub async fn revoke_it_contact_with_options(
174
+ &self,
175
+ organization_id: &str,
176
+ contact_id: &str,
177
+ options: Option<&crate::RequestOptions>,
178
+ ) -> Result<(), Error> {
179
+ let organization_id = crate::client::path_segment(organization_id);
180
+ let contact_id = crate::client::path_segment(contact_id);
181
+ let path = format!("/organizations/{organization_id}/it_contacts/{contact_id}/revoke");
182
+ let method = http::Method::POST;
183
+ self.client
184
+ .request_with_query_opts_empty(method, &path, &(), options)
185
+ .await
186
+ }
187
+ }
rust/src/resources_api.rs
rust/src/resources_api.rs CHANGED
@@ -16,6 +16,7 @@ use crate::resources::MultiFactorAuthApi;
16
  use crate::resources::OrganizationDomainsApi;
17
  use crate::resources::OrganizationMembershipApi;
18
  use crate::resources::OrganizationsApi;
 
19
  use crate::resources::PipesApi;
20
  use crate::resources::PipesProviderApi;
21
  use crate::resources::RadarApi;
@@ -101,6 +102,11 @@ impl Client {
101
  OrganizationsApi { client: self }
102
  }
103
 
 
 
 
 
 
104
  /// Access the `pipes` resource.
105
  pub fn pipes(&self) -> PipesApi<'_> {
106
  PipesApi { client: self }
 
16
  use crate::resources::OrganizationDomainsApi;
17
  use crate::resources::OrganizationMembershipApi;
18
  use crate::resources::OrganizationsApi;
19
+ use crate::resources::OrganizationsItContactsApi;
20
  use crate::resources::PipesApi;
21
  use crate::resources::PipesProviderApi;
22
  use crate::resources::RadarApi;
 
102
  OrganizationsApi { client: self }
103
  }
104
 
105
+ /// Access the `organizations_it_contacts` resource.
106
+ pub fn organizations_it_contacts(&self) -> OrganizationsItContactsApi<'_> {
107
+ OrganizationsItContactsApi { client: self }
108
+ }
109
+
110
  /// Access the `pipes` resource.
111
  pub fn pipes(&self) -> PipesApi<'_> {
112
  PipesApi { client: self }
rust/tests/fixtures/create_it_contact.json
rust/tests/fixtures/create_it_contact.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "email": "it-contact@example.com"
3
+ }
rust/tests/fixtures/invite_it_contact.json
rust/tests/fixtures/invite_it_contact.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "intents": [
3
+ "sso",
4
+ "directory_sync"
5
+ ]
6
+ }
rust/tests/fixtures/it_contact.json
rust/tests/fixtures/it_contact.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "it_contact",
3
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
4
+ "email": "it-contact@example.com",
5
+ "created_at": "2026-01-15T12:00:00.000Z",
6
+ "updated_at": "2026-01-15T12:00:00.000Z"
7
+ }
rust/tests/fixtures/it_contact_list.json
rust/tests/fixtures/it_contact_list.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "list",
3
+ "data": [
4
+ {
5
+ "object": "it_contact",
6
+ "id": "it_contact_01HXYZ123456789ABCDEFGHIJ",
7
+ "email": "it-contact@example.com",
8
+ "created_at": "2026-01-15T12:00:00.000Z",
9
+ "updated_at": "2026-01-15T12:00:00.000Z"
10
+ }
11
+ ],
12
+ "list_metadata": {
13
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
14
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
15
+ }
16
+ }
rust/tests/fixtures/it_contact_list_list_metadata.json
rust/tests/fixtures/it_contact_list_list_metadata.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "before": "it_contact_01HXYZ123456789ABCDEFGHIJ",
3
+ "after": "it_contact_01HXYZ987654321KJIHGFEDCBA"
4
+ }
rust/tests/fixtures/waitlist_user.json
rust/tests/fixtures/waitlist_user.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "object": "waitlist_user",
3
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
4
  "email": "marcelina.davis@example.com",
5
  "state": "pending",
6
  "approved_at": "2023-01-01T00:00:00.000Z",
7
  "created_at": "2026-01-15T12:00:00.000Z",
8
- "updated_at": "2026-01-15T12:00:00.000Z"
 
9
  }
 
1
  {
 
2
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
3
  "email": "marcelina.davis@example.com",
4
  "state": "pending",
5
  "approved_at": "2023-01-01T00:00:00.000Z",
6
  "created_at": "2026-01-15T12:00:00.000Z",
7
+ "updated_at": "2026-01-15T12:00:00.000Z",
8
+ "object": "waitlist_user"
9
  }
rust/tests/fixtures/waitlist_user_approved.json
rust/tests/fixtures/waitlist_user_approved.json CHANGED
@@ -3,13 +3,13 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": "2023-01-01T00:00:00.000Z",
11
  "created_at": "2026-01-15T12:00:00.000Z",
12
- "updated_at": "2026-01-15T12:00:00.000Z"
 
13
  },
14
  "created_at": "2026-01-15T12:00:00.000Z"
15
  }
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.approved",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": "2023-01-01T00:00:00.000Z",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  },
14
  "created_at": "2026-01-15T12:00:00.000Z"
15
  }
rust/tests/fixtures/waitlist_user_created.json
rust/tests/fixtures/waitlist_user_created.json CHANGED
@@ -3,13 +3,13 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": "2023-01-01T00:00:00.000Z",
11
  "created_at": "2026-01-15T12:00:00.000Z",
12
- "updated_at": "2026-01-15T12:00:00.000Z"
 
13
  },
14
  "created_at": "2026-01-15T12:00:00.000Z"
15
  }
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.created",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": "2023-01-01T00:00:00.000Z",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  },
14
  "created_at": "2026-01-15T12:00:00.000Z"
15
  }
rust/tests/fixtures/waitlist_user_denied.json
rust/tests/fixtures/waitlist_user_denied.json CHANGED
@@ -3,13 +3,13 @@
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
6
- "object": "waitlist_user",
7
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
8
  "email": "marcelina.davis@example.com",
9
  "state": "pending",
10
  "approved_at": "2023-01-01T00:00:00.000Z",
11
  "created_at": "2026-01-15T12:00:00.000Z",
12
- "updated_at": "2026-01-15T12:00:00.000Z"
 
13
  },
14
  "created_at": "2026-01-15T12:00:00.000Z"
15
  }
 
3
  "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "event": "waitlist_user.denied",
5
  "data": {
 
6
  "id": "wl_user_01E4ZCR3C56J083X43JQXF3JK5",
7
  "email": "marcelina.davis@example.com",
8
  "state": "pending",
9
  "approved_at": "2023-01-01T00:00:00.000Z",
10
  "created_at": "2026-01-15T12:00:00.000Z",
11
+ "updated_at": "2026-01-15T12:00:00.000Z",
12
+ "object": "waitlist_user"
13
  },
14
  "created_at": "2026-01-15T12:00:00.000Z"
15
  }
rust/tests/organizations_it_contacts_test.rs
rust/tests/organizations_it_contacts_test.rs ADDED
@@ -0,0 +1,878 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ mod common;
4
+
5
+ use wiremock::matchers::{method, path as path_matcher};
6
+ use wiremock::{Mock, MockServer, ResponseTemplate};
7
+ use workos::Error;
8
+
9
+ #[tokio::test]
10
+ async fn organizations_it_contacts_list_organization_it_contacts_round_trip() {
11
+ let server = MockServer::start().await;
12
+ Mock::given(method("GET"))
13
+ .and(path_matcher("/organizations/test_id/it_contacts"))
14
+ .respond_with(
15
+ ResponseTemplate::new(200)
16
+ .set_body_string(include_str!("fixtures/it_contact_list.json")),
17
+ )
18
+ .expect(1)
19
+ .mount(&server)
20
+ .await;
21
+ let client = common::test_client(&server).await;
22
+ let _ = client
23
+ .organizations_it_contacts()
24
+ .list_organization_it_contacts("test_id")
25
+ .await;
26
+ }
27
+
28
+ #[tokio::test]
29
+ async fn organizations_it_contacts_list_organization_it_contacts_unauthorized() {
30
+ let server = MockServer::start().await;
31
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
32
+ Mock::given(method("GET"))
33
+ .and(path_matcher("/organizations/test_id/it_contacts"))
34
+ .respond_with(template)
35
+ .expect(1)
36
+ .mount(&server)
37
+ .await;
38
+ let client = common::test_client(&server).await;
39
+ let err = client
40
+ .organizations_it_contacts()
41
+ .list_organization_it_contacts("test_id")
42
+ .await
43
+ .expect_err("expected error");
44
+ let api = match &err {
45
+ Error::Api(api) => api.as_ref(),
46
+ other => panic!("expected Error::Api, got {other:?}"),
47
+ };
48
+ assert_eq!(api.status, 401);
49
+ }
50
+
51
+ #[tokio::test]
52
+ async fn organizations_it_contacts_list_organization_it_contacts_not_found() {
53
+ let server = MockServer::start().await;
54
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
55
+ Mock::given(method("GET"))
56
+ .and(path_matcher("/organizations/test_id/it_contacts"))
57
+ .respond_with(template)
58
+ .expect(1)
59
+ .mount(&server)
60
+ .await;
61
+ let client = common::test_client(&server).await;
62
+ let err = client
63
+ .organizations_it_contacts()
64
+ .list_organization_it_contacts("test_id")
65
+ .await
66
+ .expect_err("expected error");
67
+ let api = match &err {
68
+ Error::Api(api) => api.as_ref(),
69
+ other => panic!("expected Error::Api, got {other:?}"),
70
+ };
71
+ assert_eq!(api.status, 404);
72
+ }
73
+
74
+ #[tokio::test]
75
+ async fn organizations_it_contacts_list_organization_it_contacts_rate_limited() {
76
+ let server = MockServer::start().await;
77
+ let template = ResponseTemplate::new(429)
78
+ .insert_header("retry-after", "1")
79
+ .set_body_string("{\"message\":\"Slow down\"}");
80
+ Mock::given(method("GET"))
81
+ .and(path_matcher("/organizations/test_id/it_contacts"))
82
+ .respond_with(template)
83
+ .expect(1)
84
+ .mount(&server)
85
+ .await;
86
+ let client = common::test_client(&server).await;
87
+ let err = client
88
+ .organizations_it_contacts()
89
+ .list_organization_it_contacts("test_id")
90
+ .await
91
+ .expect_err("expected error");
92
+ let api = match &err {
93
+ Error::Api(api) => api.as_ref(),
94
+ other => panic!("expected Error::Api, got {other:?}"),
95
+ };
96
+ assert_eq!(api.status, 429);
97
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
98
+ }
99
+
100
+ #[tokio::test]
101
+ async fn organizations_it_contacts_list_organization_it_contacts_server_error() {
102
+ let server = MockServer::start().await;
103
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
104
+ Mock::given(method("GET"))
105
+ .and(path_matcher("/organizations/test_id/it_contacts"))
106
+ .respond_with(template)
107
+ .expect(1)
108
+ .mount(&server)
109
+ .await;
110
+ let client = common::test_client(&server).await;
111
+ let err = client
112
+ .organizations_it_contacts()
113
+ .list_organization_it_contacts("test_id")
114
+ .await
115
+ .expect_err("expected error");
116
+ let api = match &err {
117
+ Error::Api(api) => api.as_ref(),
118
+ other => panic!("expected Error::Api, got {other:?}"),
119
+ };
120
+ assert_eq!(api.status, 500);
121
+ }
122
+
123
+ #[tokio::test]
124
+ async fn organizations_it_contacts_create_organization_it_contact_round_trip() {
125
+ let server = MockServer::start().await;
126
+ Mock::given(method("POST"))
127
+ .and(path_matcher("/organizations/test_id/it_contacts"))
128
+ .respond_with(
129
+ ResponseTemplate::new(200).set_body_string(include_str!("fixtures/it_contact.json")),
130
+ )
131
+ .expect(1)
132
+ .mount(&server)
133
+ .await;
134
+ let client = common::test_client(&server).await;
135
+ let _ = client
136
+ .organizations_it_contacts()
137
+ .create_organization_it_contact(
138
+ "test_id",
139
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
140
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
141
+ .expect("parse fixture for CreateItContact"),
142
+ ),
143
+ )
144
+ .await;
145
+ }
146
+
147
+ #[tokio::test]
148
+ async fn organizations_it_contacts_create_organization_it_contact_unauthorized() {
149
+ let server = MockServer::start().await;
150
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
151
+ Mock::given(method("POST"))
152
+ .and(path_matcher("/organizations/test_id/it_contacts"))
153
+ .respond_with(template)
154
+ .expect(1)
155
+ .mount(&server)
156
+ .await;
157
+ let client = common::test_client(&server).await;
158
+ let err = client
159
+ .organizations_it_contacts()
160
+ .create_organization_it_contact(
161
+ "test_id",
162
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
163
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
164
+ .expect("parse fixture for CreateItContact"),
165
+ ),
166
+ )
167
+ .await
168
+ .expect_err("expected error");
169
+ let api = match &err {
170
+ Error::Api(api) => api.as_ref(),
171
+ other => panic!("expected Error::Api, got {other:?}"),
172
+ };
173
+ assert_eq!(api.status, 401);
174
+ }
175
+
176
+ #[tokio::test]
177
+ async fn organizations_it_contacts_create_organization_it_contact_not_found() {
178
+ let server = MockServer::start().await;
179
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
180
+ Mock::given(method("POST"))
181
+ .and(path_matcher("/organizations/test_id/it_contacts"))
182
+ .respond_with(template)
183
+ .expect(1)
184
+ .mount(&server)
185
+ .await;
186
+ let client = common::test_client(&server).await;
187
+ let err = client
188
+ .organizations_it_contacts()
189
+ .create_organization_it_contact(
190
+ "test_id",
191
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
192
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
193
+ .expect("parse fixture for CreateItContact"),
194
+ ),
195
+ )
196
+ .await
197
+ .expect_err("expected error");
198
+ let api = match &err {
199
+ Error::Api(api) => api.as_ref(),
200
+ other => panic!("expected Error::Api, got {other:?}"),
201
+ };
202
+ assert_eq!(api.status, 404);
203
+ }
204
+
205
+ #[tokio::test]
206
+ async fn organizations_it_contacts_create_organization_it_contact_rate_limited() {
207
+ let server = MockServer::start().await;
208
+ let template = ResponseTemplate::new(429)
209
+ .insert_header("retry-after", "1")
210
+ .set_body_string("{\"message\":\"Slow down\"}");
211
+ Mock::given(method("POST"))
212
+ .and(path_matcher("/organizations/test_id/it_contacts"))
213
+ .respond_with(template)
214
+ .expect(1)
215
+ .mount(&server)
216
+ .await;
217
+ let client = common::test_client(&server).await;
218
+ let err = client
219
+ .organizations_it_contacts()
220
+ .create_organization_it_contact(
221
+ "test_id",
222
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
223
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
224
+ .expect("parse fixture for CreateItContact"),
225
+ ),
226
+ )
227
+ .await
228
+ .expect_err("expected error");
229
+ let api = match &err {
230
+ Error::Api(api) => api.as_ref(),
231
+ other => panic!("expected Error::Api, got {other:?}"),
232
+ };
233
+ assert_eq!(api.status, 429);
234
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
235
+ }
236
+
237
+ #[tokio::test]
238
+ async fn organizations_it_contacts_create_organization_it_contact_server_error() {
239
+ let server = MockServer::start().await;
240
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
241
+ Mock::given(method("POST"))
242
+ .and(path_matcher("/organizations/test_id/it_contacts"))
243
+ .respond_with(template)
244
+ .expect(1)
245
+ .mount(&server)
246
+ .await;
247
+ let client = common::test_client(&server).await;
248
+ let err = client
249
+ .organizations_it_contacts()
250
+ .create_organization_it_contact(
251
+ "test_id",
252
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
253
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
254
+ .expect("parse fixture for CreateItContact"),
255
+ ),
256
+ )
257
+ .await
258
+ .expect_err("expected error");
259
+ let api = match &err {
260
+ Error::Api(api) => api.as_ref(),
261
+ other => panic!("expected Error::Api, got {other:?}"),
262
+ };
263
+ assert_eq!(api.status, 500);
264
+ }
265
+
266
+ #[tokio::test]
267
+ async fn organizations_it_contacts_create_organization_it_contact_bad_request() {
268
+ let server = MockServer::start().await;
269
+ let template = ResponseTemplate::new(400)
270
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
271
+ Mock::given(method("POST"))
272
+ .and(path_matcher("/organizations/test_id/it_contacts"))
273
+ .respond_with(template)
274
+ .expect(1)
275
+ .mount(&server)
276
+ .await;
277
+ let client = common::test_client(&server).await;
278
+ let err = client
279
+ .organizations_it_contacts()
280
+ .create_organization_it_contact(
281
+ "test_id",
282
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
283
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
284
+ .expect("parse fixture for CreateItContact"),
285
+ ),
286
+ )
287
+ .await
288
+ .expect_err("expected error");
289
+ let api = match &err {
290
+ Error::Api(api) => api.as_ref(),
291
+ other => panic!("expected Error::Api, got {other:?}"),
292
+ };
293
+ assert_eq!(api.status, 400);
294
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
295
+ }
296
+
297
+ #[tokio::test]
298
+ async fn organizations_it_contacts_create_organization_it_contact_unprocessable() {
299
+ let server = MockServer::start().await;
300
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
301
+ Mock::given(method("POST"))
302
+ .and(path_matcher("/organizations/test_id/it_contacts"))
303
+ .respond_with(template)
304
+ .expect(1)
305
+ .mount(&server)
306
+ .await;
307
+ let client = common::test_client(&server).await;
308
+ let err = client
309
+ .organizations_it_contacts()
310
+ .create_organization_it_contact(
311
+ "test_id",
312
+ workos::organizations_it_contacts::CreateOrganizationItContactParams::new(
313
+ serde_json::from_str(include_str!("fixtures/create_it_contact.json"))
314
+ .expect("parse fixture for CreateItContact"),
315
+ ),
316
+ )
317
+ .await
318
+ .expect_err("expected error");
319
+ let api = match &err {
320
+ Error::Api(api) => api.as_ref(),
321
+ other => panic!("expected Error::Api, got {other:?}"),
322
+ };
323
+ assert_eq!(api.status, 422);
324
+ }
325
+
326
+ #[tokio::test]
327
+ async fn organizations_it_contacts_delete_organization_it_contact_round_trip() {
328
+ let server = MockServer::start().await;
329
+ Mock::given(method("DELETE"))
330
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
331
+ .respond_with(ResponseTemplate::new(200).set_body_string("{}"))
332
+ .expect(1)
333
+ .mount(&server)
334
+ .await;
335
+ let client = common::test_client(&server).await;
336
+ let _ = client
337
+ .organizations_it_contacts()
338
+ .delete_organization_it_contact("test_id", "test_id")
339
+ .await;
340
+ }
341
+
342
+ #[tokio::test]
343
+ async fn organizations_it_contacts_delete_organization_it_contact_unauthorized() {
344
+ let server = MockServer::start().await;
345
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
346
+ Mock::given(method("DELETE"))
347
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
348
+ .respond_with(template)
349
+ .expect(1)
350
+ .mount(&server)
351
+ .await;
352
+ let client = common::test_client(&server).await;
353
+ let err = client
354
+ .organizations_it_contacts()
355
+ .delete_organization_it_contact("test_id", "test_id")
356
+ .await
357
+ .expect_err("expected error");
358
+ let api = match &err {
359
+ Error::Api(api) => api.as_ref(),
360
+ other => panic!("expected Error::Api, got {other:?}"),
361
+ };
362
+ assert_eq!(api.status, 401);
363
+ }
364
+
365
+ #[tokio::test]
366
+ async fn organizations_it_contacts_delete_organization_it_contact_not_found() {
367
+ let server = MockServer::start().await;
368
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
369
+ Mock::given(method("DELETE"))
370
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
371
+ .respond_with(template)
372
+ .expect(1)
373
+ .mount(&server)
374
+ .await;
375
+ let client = common::test_client(&server).await;
376
+ let err = client
377
+ .organizations_it_contacts()
378
+ .delete_organization_it_contact("test_id", "test_id")
379
+ .await
380
+ .expect_err("expected error");
381
+ let api = match &err {
382
+ Error::Api(api) => api.as_ref(),
383
+ other => panic!("expected Error::Api, got {other:?}"),
384
+ };
385
+ assert_eq!(api.status, 404);
386
+ }
387
+
388
+ #[tokio::test]
389
+ async fn organizations_it_contacts_delete_organization_it_contact_rate_limited() {
390
+ let server = MockServer::start().await;
391
+ let template = ResponseTemplate::new(429)
392
+ .insert_header("retry-after", "1")
393
+ .set_body_string("{\"message\":\"Slow down\"}");
394
+ Mock::given(method("DELETE"))
395
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
396
+ .respond_with(template)
397
+ .expect(1)
398
+ .mount(&server)
399
+ .await;
400
+ let client = common::test_client(&server).await;
401
+ let err = client
402
+ .organizations_it_contacts()
403
+ .delete_organization_it_contact("test_id", "test_id")
404
+ .await
405
+ .expect_err("expected error");
406
+ let api = match &err {
407
+ Error::Api(api) => api.as_ref(),
408
+ other => panic!("expected Error::Api, got {other:?}"),
409
+ };
410
+ assert_eq!(api.status, 429);
411
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
412
+ }
413
+
414
+ #[tokio::test]
415
+ async fn organizations_it_contacts_delete_organization_it_contact_server_error() {
416
+ let server = MockServer::start().await;
417
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
418
+ Mock::given(method("DELETE"))
419
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
420
+ .respond_with(template)
421
+ .expect(1)
422
+ .mount(&server)
423
+ .await;
424
+ let client = common::test_client(&server).await;
425
+ let err = client
426
+ .organizations_it_contacts()
427
+ .delete_organization_it_contact("test_id", "test_id")
428
+ .await
429
+ .expect_err("expected error");
430
+ let api = match &err {
431
+ Error::Api(api) => api.as_ref(),
432
+ other => panic!("expected Error::Api, got {other:?}"),
433
+ };
434
+ assert_eq!(api.status, 500);
435
+ }
436
+
437
+ #[tokio::test]
438
+ async fn organizations_it_contacts_delete_organization_it_contact_bad_request() {
439
+ let server = MockServer::start().await;
440
+ let template = ResponseTemplate::new(400)
441
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
442
+ Mock::given(method("DELETE"))
443
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
444
+ .respond_with(template)
445
+ .expect(1)
446
+ .mount(&server)
447
+ .await;
448
+ let client = common::test_client(&server).await;
449
+ let err = client
450
+ .organizations_it_contacts()
451
+ .delete_organization_it_contact("test_id", "test_id")
452
+ .await
453
+ .expect_err("expected error");
454
+ let api = match &err {
455
+ Error::Api(api) => api.as_ref(),
456
+ other => panic!("expected Error::Api, got {other:?}"),
457
+ };
458
+ assert_eq!(api.status, 400);
459
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
460
+ }
461
+
462
+ #[tokio::test]
463
+ async fn organizations_it_contacts_delete_organization_it_contact_unprocessable() {
464
+ let server = MockServer::start().await;
465
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
466
+ Mock::given(method("DELETE"))
467
+ .and(path_matcher("/organizations/test_id/it_contacts/test_id"))
468
+ .respond_with(template)
469
+ .expect(1)
470
+ .mount(&server)
471
+ .await;
472
+ let client = common::test_client(&server).await;
473
+ let err = client
474
+ .organizations_it_contacts()
475
+ .delete_organization_it_contact("test_id", "test_id")
476
+ .await
477
+ .expect_err("expected error");
478
+ let api = match &err {
479
+ Error::Api(api) => api.as_ref(),
480
+ other => panic!("expected Error::Api, got {other:?}"),
481
+ };
482
+ assert_eq!(api.status, 422);
483
+ }
484
+
485
+ #[tokio::test]
486
+ async fn organizations_it_contacts_create_it_contact_invite_round_trip() {
487
+ let server = MockServer::start().await;
488
+ Mock::given(method("POST"))
489
+ .and(path_matcher(
490
+ "/organizations/test_id/it_contacts/test_id/invite",
491
+ ))
492
+ .respond_with(ResponseTemplate::new(200).set_body_string("{}"))
493
+ .expect(1)
494
+ .mount(&server)
495
+ .await;
496
+ let client = common::test_client(&server).await;
497
+ let _ = client
498
+ .organizations_it_contacts()
499
+ .create_it_contact_invite(
500
+ "test_id",
501
+ "test_id",
502
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
503
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
504
+ .expect("parse fixture for InviteItContact"),
505
+ ),
506
+ )
507
+ .await;
508
+ }
509
+
510
+ #[tokio::test]
511
+ async fn organizations_it_contacts_create_it_contact_invite_unauthorized() {
512
+ let server = MockServer::start().await;
513
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
514
+ Mock::given(method("POST"))
515
+ .and(path_matcher(
516
+ "/organizations/test_id/it_contacts/test_id/invite",
517
+ ))
518
+ .respond_with(template)
519
+ .expect(1)
520
+ .mount(&server)
521
+ .await;
522
+ let client = common::test_client(&server).await;
523
+ let err = client
524
+ .organizations_it_contacts()
525
+ .create_it_contact_invite(
526
+ "test_id",
527
+ "test_id",
528
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
529
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
530
+ .expect("parse fixture for InviteItContact"),
531
+ ),
532
+ )
533
+ .await
534
+ .expect_err("expected error");
535
+ let api = match &err {
536
+ Error::Api(api) => api.as_ref(),
537
+ other => panic!("expected Error::Api, got {other:?}"),
538
+ };
539
+ assert_eq!(api.status, 401);
540
+ }
541
+
542
+ #[tokio::test]
543
+ async fn organizations_it_contacts_create_it_contact_invite_not_found() {
544
+ let server = MockServer::start().await;
545
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
546
+ Mock::given(method("POST"))
547
+ .and(path_matcher(
548
+ "/organizations/test_id/it_contacts/test_id/invite",
549
+ ))
550
+ .respond_with(template)
551
+ .expect(1)
552
+ .mount(&server)
553
+ .await;
554
+ let client = common::test_client(&server).await;
555
+ let err = client
556
+ .organizations_it_contacts()
557
+ .create_it_contact_invite(
558
+ "test_id",
559
+ "test_id",
560
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
561
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
562
+ .expect("parse fixture for InviteItContact"),
563
+ ),
564
+ )
565
+ .await
566
+ .expect_err("expected error");
567
+ let api = match &err {
568
+ Error::Api(api) => api.as_ref(),
569
+ other => panic!("expected Error::Api, got {other:?}"),
570
+ };
571
+ assert_eq!(api.status, 404);
572
+ }
573
+
574
+ #[tokio::test]
575
+ async fn organizations_it_contacts_create_it_contact_invite_rate_limited() {
576
+ let server = MockServer::start().await;
577
+ let template = ResponseTemplate::new(429)
578
+ .insert_header("retry-after", "1")
579
+ .set_body_string("{\"message\":\"Slow down\"}");
580
+ Mock::given(method("POST"))
581
+ .and(path_matcher(
582
+ "/organizations/test_id/it_contacts/test_id/invite",
583
+ ))
584
+ .respond_with(template)
585
+ .expect(1)
586
+ .mount(&server)
587
+ .await;
588
+ let client = common::test_client(&server).await;
589
+ let err = client
590
+ .organizations_it_contacts()
591
+ .create_it_contact_invite(
592
+ "test_id",
593
+ "test_id",
594
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
595
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
596
+ .expect("parse fixture for InviteItContact"),
597
+ ),
598
+ )
599
+ .await
600
+ .expect_err("expected error");
601
+ let api = match &err {
602
+ Error::Api(api) => api.as_ref(),
603
+ other => panic!("expected Error::Api, got {other:?}"),
604
+ };
605
+ assert_eq!(api.status, 429);
606
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
607
+ }
608
+
609
+ #[tokio::test]
610
+ async fn organizations_it_contacts_create_it_contact_invite_server_error() {
611
+ let server = MockServer::start().await;
612
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
613
+ Mock::given(method("POST"))
614
+ .and(path_matcher(
615
+ "/organizations/test_id/it_contacts/test_id/invite",
616
+ ))
617
+ .respond_with(template)
618
+ .expect(1)
619
+ .mount(&server)
620
+ .await;
621
+ let client = common::test_client(&server).await;
622
+ let err = client
623
+ .organizations_it_contacts()
624
+ .create_it_contact_invite(
625
+ "test_id",
626
+ "test_id",
627
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
628
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
629
+ .expect("parse fixture for InviteItContact"),
630
+ ),
631
+ )
632
+ .await
633
+ .expect_err("expected error");
634
+ let api = match &err {
635
+ Error::Api(api) => api.as_ref(),
636
+ other => panic!("expected Error::Api, got {other:?}"),
637
+ };
638
+ assert_eq!(api.status, 500);
639
+ }
640
+
641
+ #[tokio::test]
642
+ async fn organizations_it_contacts_create_it_contact_invite_bad_request() {
643
+ let server = MockServer::start().await;
644
+ let template = ResponseTemplate::new(400)
645
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
646
+ Mock::given(method("POST"))
647
+ .and(path_matcher(
648
+ "/organizations/test_id/it_contacts/test_id/invite",
649
+ ))
650
+ .respond_with(template)
651
+ .expect(1)
652
+ .mount(&server)
653
+ .await;
654
+ let client = common::test_client(&server).await;
655
+ let err = client
656
+ .organizations_it_contacts()
657
+ .create_it_contact_invite(
658
+ "test_id",
659
+ "test_id",
660
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
661
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
662
+ .expect("parse fixture for InviteItContact"),
663
+ ),
664
+ )
665
+ .await
666
+ .expect_err("expected error");
667
+ let api = match &err {
668
+ Error::Api(api) => api.as_ref(),
669
+ other => panic!("expected Error::Api, got {other:?}"),
670
+ };
671
+ assert_eq!(api.status, 400);
672
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
673
+ }
674
+
675
+ #[tokio::test]
676
+ async fn organizations_it_contacts_create_it_contact_invite_unprocessable() {
677
+ let server = MockServer::start().await;
678
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
679
+ Mock::given(method("POST"))
680
+ .and(path_matcher(
681
+ "/organizations/test_id/it_contacts/test_id/invite",
682
+ ))
683
+ .respond_with(template)
684
+ .expect(1)
685
+ .mount(&server)
686
+ .await;
687
+ let client = common::test_client(&server).await;
688
+ let err = client
689
+ .organizations_it_contacts()
690
+ .create_it_contact_invite(
691
+ "test_id",
692
+ "test_id",
693
+ workos::organizations_it_contacts::CreateItContactInviteParams::new(
694
+ serde_json::from_str(include_str!("fixtures/invite_it_contact.json"))
695
+ .expect("parse fixture for InviteItContact"),
696
+ ),
697
+ )
698
+ .await
699
+ .expect_err("expected error");
700
+ let api = match &err {
701
+ Error::Api(api) => api.as_ref(),
702
+ other => panic!("expected Error::Api, got {other:?}"),
703
+ };
704
+ assert_eq!(api.status, 422);
705
+ }
706
+
707
+ #[tokio::test]
708
+ async fn organizations_it_contacts_revoke_it_contact_round_trip() {
709
+ let server = MockServer::start().await;
710
+ Mock::given(method("POST"))
711
+ .and(path_matcher(
712
+ "/organizations/test_id/it_contacts/test_id/revoke",
713
+ ))
714
+ .respond_with(ResponseTemplate::new(200).set_body_string("{}"))
715
+ .expect(1)
716
+ .mount(&server)
717
+ .await;
718
+ let client = common::test_client(&server).await;
719
+ let _ = client
720
+ .organizations_it_contacts()
721
+ .revoke_it_contact("test_id", "test_id")
722
+ .await;
723
+ }
724
+
725
+ #[tokio::test]
726
+ async fn organizations_it_contacts_revoke_it_contact_unauthorized() {
727
+ let server = MockServer::start().await;
728
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
729
+ Mock::given(method("POST"))
730
+ .and(path_matcher(
731
+ "/organizations/test_id/it_contacts/test_id/revoke",
732
+ ))
733
+ .respond_with(template)
734
+ .expect(1)
735
+ .mount(&server)
736
+ .await;
737
+ let client = common::test_client(&server).await;
738
+ let err = client
739
+ .organizations_it_contacts()
740
+ .revoke_it_contact("test_id", "test_id")
741
+ .await
742
+ .expect_err("expected error");
743
+ let api = match &err {
744
+ Error::Api(api) => api.as_ref(),
745
+ other => panic!("expected Error::Api, got {other:?}"),
746
+ };
747
+ assert_eq!(api.status, 401);
748
+ }
749
+
750
+ #[tokio::test]
751
+ async fn organizations_it_contacts_revoke_it_contact_not_found() {
752
+ let server = MockServer::start().await;
753
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
754
+ Mock::given(method("POST"))
755
+ .and(path_matcher(
756
+ "/organizations/test_id/it_contacts/test_id/revoke",
757
+ ))
758
+ .respond_with(template)
759
+ .expect(1)
760
+ .mount(&server)
761
+ .await;
762
+ let client = common::test_client(&server).await;
763
+ let err = client
764
+ .organizations_it_contacts()
765
+ .revoke_it_contact("test_id", "test_id")
766
+ .await
767
+ .expect_err("expected error");
768
+ let api = match &err {
769
+ Error::Api(api) => api.as_ref(),
770
+ other => panic!("expected Error::Api, got {other:?}"),
771
+ };
772
+ assert_eq!(api.status, 404);
773
+ }
774
+
775
+ #[tokio::test]
776
+ async fn organizations_it_contacts_revoke_it_contact_rate_limited() {
777
+ let server = MockServer::start().await;
778
+ let template = ResponseTemplate::new(429)
779
+ .insert_header("retry-after", "1")
780
+ .set_body_string("{\"message\":\"Slow down\"}");
781
+ Mock::given(method("POST"))
782
+ .and(path_matcher(
783
+ "/organizations/test_id/it_contacts/test_id/revoke",
784
+ ))
785
+ .respond_with(template)
786
+ .expect(1)
787
+ .mount(&server)
788
+ .await;
789
+ let client = common::test_client(&server).await;
790
+ let err = client
791
+ .organizations_it_contacts()
792
+ .revoke_it_contact("test_id", "test_id")
793
+ .await
794
+ .expect_err("expected error");
795
+ let api = match &err {
796
+ Error::Api(api) => api.as_ref(),
797
+ other => panic!("expected Error::Api, got {other:?}"),
798
+ };
799
+ assert_eq!(api.status, 429);
800
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
801
+ }
802
+
803
+ #[tokio::test]
804
+ async fn organizations_it_contacts_revoke_it_contact_server_error() {
805
+ let server = MockServer::start().await;
806
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
807
+ Mock::given(method("POST"))
808
+ .and(path_matcher(
809
+ "/organizations/test_id/it_contacts/test_id/revoke",
810
+ ))
811
+ .respond_with(template)
812
+ .expect(1)
813
+ .mount(&server)
814
+ .await;
815
+ let client = common::test_client(&server).await;
816
+ let err = client
817
+ .organizations_it_contacts()
818
+ .revoke_it_contact("test_id", "test_id")
819
+ .await
820
+ .expect_err("expected error");
821
+ let api = match &err {
822
+ Error::Api(api) => api.as_ref(),
823
+ other => panic!("expected Error::Api, got {other:?}"),
824
+ };
825
+ assert_eq!(api.status, 500);
826
+ }
827
+
828
+ #[tokio::test]
829
+ async fn organizations_it_contacts_revoke_it_contact_bad_request() {
830
+ let server = MockServer::start().await;
831
+ let template = ResponseTemplate::new(400)
832
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
833
+ Mock::given(method("POST"))
834
+ .and(path_matcher(
835
+ "/organizations/test_id/it_contacts/test_id/revoke",
836
+ ))
837
+ .respond_with(template)
838
+ .expect(1)
839
+ .mount(&server)
840
+ .await;
841
+ let client = common::test_client(&server).await;
842
+ let err = client
843
+ .organizations_it_contacts()
844
+ .revoke_it_contact("test_id", "test_id")
845
+ .await
846
+ .expect_err("expected error");
847
+ let api = match &err {
848
+ Error::Api(api) => api.as_ref(),
849
+ other => panic!("expected Error::Api, got {other:?}"),
850
+ };
851
+ assert_eq!(api.status, 400);
852
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
853
+ }
854
+
855
+ #[tokio::test]
856
+ async fn organizations_it_contacts_revoke_it_contact_unprocessable() {
857
+ let server = MockServer::start().await;
858
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
859
+ Mock::given(method("POST"))
860
+ .and(path_matcher(
861
+ "/organizations/test_id/it_contacts/test_id/revoke",
862
+ ))
863
+ .respond_with(template)
864
+ .expect(1)
865
+ .mount(&server)
866
+ .await;
867
+ let client = common::test_client(&server).await;
868
+ let err = client
869
+ .organizations_it_contacts()
870
+ .revoke_it_contact("test_id", "test_id")
871
+ .await
872
+ .expect_err("expected error");
873
+ let api = match &err {
874
+ Error::Api(api) => api.as_ref(),
875
+ other => panic!("expected Error::Api, got {other:?}"),
876
+ };
877
+ assert_eq!(api.status, 422);
878
+ }

All files in this language are hidden by the current filters.