WorkOS SDK code diff report

Show:

code: 35 · tests: 2 · manifest: 1

dotnet/.oagen-manifest.json
dotnet/.oagen-manifest.json CHANGED
@@ -9,6 +9,7 @@
9
  "src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs",
10
  "src/WorkOS.net/Client/WorkOSClient.Generated.cs",
11
  "src/WorkOS.net/Entities/AccessTokenAgentRegistrationCredentialIssuedDataDetail.cs",
 
12
  "src/WorkOS.net/Entities/ActionAuthenticationDenied.cs",
13
  "src/WorkOS.net/Entities/ActionAuthenticationDeniedData.cs",
14
  "src/WorkOS.net/Entities/ActionUserRegistrationDenied.cs",
@@ -134,6 +135,7 @@
134
  "src/WorkOS.net/Entities/AuthenticationSSOSucceededData.cs",
135
  "src/WorkOS.net/Entities/AuthenticationSSOTimedOut.cs",
136
  "src/WorkOS.net/Entities/AuthenticationSSOTimedOutData.cs",
 
137
  "src/WorkOS.net/Entities/AuthorizationCheck.cs",
138
  "src/WorkOS.net/Entities/AuthorizationCodeSessionAuthenticateRequest.cs",
139
  "src/WorkOS.net/Entities/AuthorizationPermission.cs",
@@ -437,7 +439,7 @@
437
  "src/WorkOS.net/Enums/ConnectionsConnectionType.cs",
438
  "src/WorkOS.net/Enums/CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.cs",
439
  "src/WorkOS.net/Enums/CreateConnectionOidcOptionsTokenAuthenticationMethod.cs",
440
- "src/WorkOS.net/Enums/CreateDataIntegrationAuthMethods.cs",
441
  "src/WorkOS.net/Enums/CreateUserInviteOptionsLocale.cs",
442
  "src/WorkOS.net/Enums/CreateUserPasswordHashType.cs",
443
  "src/WorkOS.net/Enums/CreateUserPasswordSaltPosition.cs",
@@ -475,7 +477,6 @@
475
  "src/WorkOS.net/Enums/SSOGrantType.cs",
476
  "src/WorkOS.net/Enums/SSOProvider.cs",
477
  "src/WorkOS.net/Enums/SessionCreatedDataAuthMethod.cs",
478
- "src/WorkOS.net/Enums/SessionCreatedDataStatus.cs",
479
  "src/WorkOS.net/Enums/TeamProductionState.cs",
480
  "src/WorkOS.net/Enums/UpdateAuditLogsRetentionRetentionPeriod.cs",
481
  "src/WorkOS.net/Enums/UpdateWebhookEndpointStatus.cs",
@@ -486,7 +487,6 @@
486
  "src/WorkOS.net/Enums/VaultByokKeyProvider.cs",
487
  "src/WorkOS.net/Enums/VaultDataCreatedDataActorSource.cs",
488
  "src/WorkOS.net/Enums/VaultOrder.cs",
489
- "src/WorkOS.net/Enums/WaitlistUserState.cs",
490
  "src/WorkOS.net/Enums/WidgetSessionTokenScopes.cs",
491
  "src/WorkOS.net/Services/AdminPortal/AdminPortalService.cs",
492
  "src/WorkOS.net/Services/AdminPortal/_interfaces/AdminPortalOptions.cs",
@@ -563,6 +563,7 @@
563
  "test/WorkOSTests/Tests/WebhooksServiceTest.cs",
564
  "test/WorkOSTests/Tests/WidgetsServiceTest.cs",
565
  "test/WorkOSTests/testdata/access_token_agent_registration_credential_issued_data_detail.json",
 
566
  "test/WorkOSTests/testdata/action_authentication_denied.json",
567
  "test/WorkOSTests/testdata/action_authentication_denied_data.json",
568
  "test/WorkOSTests/testdata/action_authentication_denied_data_nulls.json",
@@ -840,6 +841,7 @@
840
  "test/WorkOSTests/testdata/authentication_sso_timed_out_data_sso.json",
841
  "test/WorkOSTests/testdata/authentication_sso_timed_out_data_sso_nulls.json",
842
  "test/WorkOSTests/testdata/authentication_sso_timed_out_nulls.json",
 
843
  "test/WorkOSTests/testdata/authorization_check.json",
844
  "test/WorkOSTests/testdata/authorization_code_session_authenticate_request.json",
845
  "test/WorkOSTests/testdata/authorization_code_session_authenticate_request_nulls.json",
@@ -902,6 +904,8 @@
902
  "test/WorkOSTests/testdata/connection_saml_certificate_renewed_nulls.json",
903
  "test/WorkOSTests/testdata/cors_origin_response.json",
904
  "test/WorkOSTests/testdata/create_application_secret.json",
 
 
905
  "test/WorkOSTests/testdata/create_authorization_permission.json",
906
  "test/WorkOSTests/testdata/create_authorization_permission_nulls.json",
907
  "test/WorkOSTests/testdata/create_authorization_resource.json",
@@ -1197,6 +1201,7 @@
1197
  "test/WorkOSTests/testdata/list_audit_log_action.json",
1198
  "test/WorkOSTests/testdata/list_audit_log_schema.json",
1199
  "test/WorkOSTests/testdata/list_authentication_factor.json",
 
1200
  "test/WorkOSTests/testdata/list_authorization_permission.json",
1201
  "test/WorkOSTests/testdata/list_authorization_resource.json",
1202
  "test/WorkOSTests/testdata/list_authorized_connect_application_list_data.json",
@@ -1213,6 +1218,7 @@
1213
  "test/WorkOSTests/testdata/list_empty_audit_log_action.json",
1214
  "test/WorkOSTests/testdata/list_empty_audit_log_schema.json",
1215
  "test/WorkOSTests/testdata/list_empty_authentication_factor.json",
 
1216
  "test/WorkOSTests/testdata/list_empty_authorization_permission.json",
1217
  "test/WorkOSTests/testdata/list_empty_authorization_resource.json",
1218
  "test/WorkOSTests/testdata/list_empty_authorized_connect_application_list_data.json",
@@ -1635,6 +1641,34 @@
1635
  "test/WorkOSTests/testdata/widget_session_token_response.json"
1636
  ],
1637
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1638
  "PATCH /agents/claims/attempts": {
1639
  "sdkMethod": "UpdateAttemptsAsync",
1640
  "service": "agents"
@@ -1647,6 +1681,30 @@
1647
  "sdkMethod": "GetRegistrationAsync",
1648
  "service": "agents"
1649
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1650
  "POST /auth/challenges/{id}/verify": {
1651
  "sdkMethod": "VerifyChallengeAsync",
1652
  "service": "multi_factor_auth"
@@ -1891,10 +1949,54 @@
1891
  "sdkMethod": "ListConnectionsAsync",
1892
  "service": "sso"
1893
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1894
  "GET /connections/{id}": {
1895
  "sdkMethod": "GetConnectionAsync",
1896
  "service": "sso"
1897
  },
 
 
 
 
1898
  "DELETE /connections/{id}": {
1899
  "sdkMethod": "DeleteConnectionAsync",
1900
  "service": "sso"
@@ -1927,10 +2029,26 @@
1927
  "sdkMethod": "AuthorizeDataIntegrationAsync",
1928
  "service": "pipes"
1929
  },
 
 
 
 
1930
  "POST /data-integrations/{slug}/credentials": {
1931
  "sdkMethod": "CreateDataIntegrationCredentialAsync",
1932
  "service": "pipes"
1933
  },
 
 
 
 
 
 
 
 
 
 
 
 
1934
  "POST /data-integrations/{provider}/token": {
1935
  "sdkMethod": "GetAccessTokenAsync",
1936
  "service": "pipes"
@@ -2099,6 +2217,34 @@
2099
  "sdkMethod": "ListAuthorizedApplicationsAsync",
2100
  "service": "organizations"
2101
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2102
  "POST /portal/generate_link": {
2103
  "sdkMethod": "GenerateLinkAsync",
2104
  "service": "admin_portal"
@@ -2171,6 +2317,18 @@
2171
  "sdkMethod": "RevokeSessionAsync",
2172
  "service": "user_management"
2173
  },
 
 
 
 
 
 
 
 
 
 
 
 
2174
  "GET /user_management/cors_origins": {
2175
  "sdkMethod": "ListCorsOriginsAsync",
2176
  "service": "user_management"
@@ -2371,6 +2529,34 @@
2371
  "sdkMethod": "CreateUserAuthFactorAsync",
2372
  "service": "multi_factor_auth"
2373
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2374
  "POST /vault/v1/keys/data-key": {
2375
  "sdkMethod": "CreateDataKeyAsync",
2376
  "service": "vault"
@@ -2478,162 +2664,6 @@
2478
  "GET /audit_logs/exports/{auditLogExportId}": {
2479
  "sdkMethod": "GetExportAsync",
2480
  "service": "audit_logs"
2481
- },
2482
- "PUT /data-integrations/{slug}/client-credentials": {
2483
- "sdkMethod": "UpdateDataIntegrationClientCredentialsAsync",
2484
- "service": "pipes"
2485
- },
2486
- "GET /agents/blueprints": {
2487
- "sdkMethod": "ListBlueprintsAsync",
2488
- "service": "agents"
2489
- },
2490
- "POST /agents/blueprints": {
2491
- "sdkMethod": "CreateBlueprintAsync",
2492
- "service": "agents"
2493
- },
2494
- "GET /agents/blueprints/{agent_blueprint_id}": {
2495
- "sdkMethod": "GetBlueprintAsync",
2496
- "service": "agents"
2497
- },
2498
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
2499
- "sdkMethod": "UpdateBlueprintAsync",
2500
- "service": "agents"
2501
- },
2502
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
2503
- "sdkMethod": "DeleteBlueprintAsync",
2504
- "service": "agents"
2505
- },
2506
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
2507
- "sdkMethod": "CreateBlueprintTokenAsync",
2508
- "service": "agents"
2509
- },
2510
- "GET /agents/instances": {
2511
- "sdkMethod": "ListInstancesAsync",
2512
- "service": "agents"
2513
- },
2514
- "GET /agents/instances/{agent_instance_id}": {
2515
- "sdkMethod": "GetInstanceAsync",
2516
- "service": "agents"
2517
- },
2518
- "DELETE /agents/instances/{agent_instance_id}": {
2519
- "sdkMethod": "DeleteInstanceAsync",
2520
- "service": "agents"
2521
- },
2522
- "GET /agents/sessions": {
2523
- "sdkMethod": "ListSessionsAsync",
2524
- "service": "agents"
2525
- },
2526
- "GET /agents/sessions/{agent_instance_session_id}": {
2527
- "sdkMethod": "GetSessionAsync",
2528
- "service": "agents"
2529
- },
2530
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
2531
- "sdkMethod": "RevokeSessionAsync",
2532
- "service": "agents"
2533
- },
2534
- "POST /connections": {
2535
- "sdkMethod": "CreateConnectionAsync",
2536
- "service": "sso"
2537
- },
2538
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
2539
- "sdkMethod": "ListConnectionSAMLIdpSigningCertsAsync",
2540
- "service": "sso"
2541
- },
2542
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
2543
- "sdkMethod": "CreateConnectionSAMLIdpSigningCertAsync",
2544
- "service": "sso"
2545
- },
2546
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
2547
- "sdkMethod": "DeleteConnectionSAMLIdpSigningCertAsync",
2548
- "service": "sso"
2549
- },
2550
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
2551
- "sdkMethod": "ListConnectionSAMLSpEncryptionCertsAsync",
2552
- "service": "sso"
2553
- },
2554
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
2555
- "sdkMethod": "CreateConnectionSAMLSpEncryptionCertAsync",
2556
- "service": "sso"
2557
- },
2558
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
2559
- "sdkMethod": "DeleteConnectionSAMLSpEncryptionCertAsync",
2560
- "service": "sso"
2561
- },
2562
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
2563
- "sdkMethod": "ListConnectionSAMLSpSigningCertAsync",
2564
- "service": "sso"
2565
- },
2566
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
2567
- "sdkMethod": "CreateConnectionSAMLSpSigningCertAsync",
2568
- "service": "sso"
2569
- },
2570
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
2571
- "sdkMethod": "DeleteConnectionSAMLSpSigningCertAsync",
2572
- "service": "sso"
2573
- },
2574
- "PATCH /connections/{id}": {
2575
- "sdkMethod": "UpdateConnectionAsync",
2576
- "service": "sso"
2577
- },
2578
- "GET /organizations/{organization_id}/it_contacts": {
2579
- "sdkMethod": "ListItContactsAsync",
2580
- "service": "organizations"
2581
- },
2582
- "POST /organizations/{organization_id}/it_contacts": {
2583
- "sdkMethod": "CreateItContactAsync",
2584
- "service": "organizations"
2585
- },
2586
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2587
- "sdkMethod": "DeleteItContactAsync",
2588
- "service": "organizations"
2589
- },
2590
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2591
- "sdkMethod": "InviteItContactAsync",
2592
- "service": "organizations"
2593
- },
2594
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2595
- "sdkMethod": "RevokeItContactAsync",
2596
- "service": "organizations"
2597
- },
2598
- "POST /platform/teams": {
2599
- "sdkMethod": "CreateTeamAsync",
2600
- "service": "platform_teams"
2601
- },
2602
- "GET /platform/teams/{team_id}": {
2603
- "sdkMethod": "GetTeamAsync",
2604
- "service": "platform_teams"
2605
- },
2606
- "DELETE /user_management/waitlist_entries/{id}": {
2607
- "sdkMethod": "DeleteWaitlistEntryAsync",
2608
- "service": "user_management"
2609
- },
2610
- "POST /user_management/waitlist_entries/{id}/approve": {
2611
- "sdkMethod": "CreateWaitlistEntryApproveAsync",
2612
- "service": "user_management"
2613
- },
2614
- "POST /user_management/waitlist_entries/{id}/deny": {
2615
- "sdkMethod": "CreateWaitlistEntryDenyAsync",
2616
- "service": "user_management"
2617
- },
2618
- "GET /user_management/waitlists": {
2619
- "sdkMethod": "ListWaitlistsAsync",
2620
- "service": "user_management"
2621
- },
2622
- "GET /user_management/waitlists/{id}": {
2623
- "sdkMethod": "GetWaitlistAsync",
2624
- "service": "user_management"
2625
- },
2626
- "GET /user_management/waitlists/{id}/entries": {
2627
- "sdkMethod": "ListWaitlistEntriesAsync",
2628
- "service": "user_management"
2629
- },
2630
- "POST /user_management/waitlists/{id}/entries": {
2631
- "sdkMethod": "CreateWaitlistEntryAsync",
2632
- "service": "user_management"
2633
- },
2634
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
2635
- "sdkMethod": "ValidateBlueprintTokenAsync",
2636
- "service": "agents"
2637
  }
2638
  }
2639
  }
 
9
  "src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs",
10
  "src/WorkOS.net/Client/WorkOSClient.Generated.cs",
11
  "src/WorkOS.net/Entities/AccessTokenAgentRegistrationCredentialIssuedDataDetail.cs",
12
+ "src/WorkOS.net/Entities/AccountSelectionRequiredError.cs",
13
  "src/WorkOS.net/Entities/ActionAuthenticationDenied.cs",
14
  "src/WorkOS.net/Entities/ActionAuthenticationDeniedData.cs",
15
  "src/WorkOS.net/Entities/ActionUserRegistrationDenied.cs",
 
135
  "src/WorkOS.net/Entities/AuthenticationSSOSucceededData.cs",
136
  "src/WorkOS.net/Entities/AuthenticationSSOTimedOut.cs",
137
  "src/WorkOS.net/Entities/AuthenticationSSOTimedOutData.cs",
138
+ "src/WorkOS.net/Entities/AuthkitOAuthResource.cs",
139
  "src/WorkOS.net/Entities/AuthorizationCheck.cs",
140
  "src/WorkOS.net/Entities/AuthorizationCodeSessionAuthenticateRequest.cs",
141
  "src/WorkOS.net/Entities/AuthorizationPermission.cs",
 
439
  "src/WorkOS.net/Enums/ConnectionsConnectionType.cs",
440
  "src/WorkOS.net/Enums/CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.cs",
441
  "src/WorkOS.net/Enums/CreateConnectionOidcOptionsTokenAuthenticationMethod.cs",
442
+ "src/WorkOS.net/Enums/CreateDataIntegrationOwnership.cs",
443
  "src/WorkOS.net/Enums/CreateUserInviteOptionsLocale.cs",
444
  "src/WorkOS.net/Enums/CreateUserPasswordHashType.cs",
445
  "src/WorkOS.net/Enums/CreateUserPasswordSaltPosition.cs",
 
477
  "src/WorkOS.net/Enums/SSOGrantType.cs",
478
  "src/WorkOS.net/Enums/SSOProvider.cs",
479
  "src/WorkOS.net/Enums/SessionCreatedDataAuthMethod.cs",
 
480
  "src/WorkOS.net/Enums/TeamProductionState.cs",
481
  "src/WorkOS.net/Enums/UpdateAuditLogsRetentionRetentionPeriod.cs",
482
  "src/WorkOS.net/Enums/UpdateWebhookEndpointStatus.cs",
 
487
  "src/WorkOS.net/Enums/VaultByokKeyProvider.cs",
488
  "src/WorkOS.net/Enums/VaultDataCreatedDataActorSource.cs",
489
  "src/WorkOS.net/Enums/VaultOrder.cs",
 
490
  "src/WorkOS.net/Enums/WidgetSessionTokenScopes.cs",
491
  "src/WorkOS.net/Services/AdminPortal/AdminPortalService.cs",
492
  "src/WorkOS.net/Services/AdminPortal/_interfaces/AdminPortalOptions.cs",
 
563
  "test/WorkOSTests/Tests/WebhooksServiceTest.cs",
564
  "test/WorkOSTests/Tests/WidgetsServiceTest.cs",
565
  "test/WorkOSTests/testdata/access_token_agent_registration_credential_issued_data_detail.json",
566
+ "test/WorkOSTests/testdata/account_selection_required_error.json",
567
  "test/WorkOSTests/testdata/action_authentication_denied.json",
568
  "test/WorkOSTests/testdata/action_authentication_denied_data.json",
569
  "test/WorkOSTests/testdata/action_authentication_denied_data_nulls.json",
 
841
  "test/WorkOSTests/testdata/authentication_sso_timed_out_data_sso.json",
842
  "test/WorkOSTests/testdata/authentication_sso_timed_out_data_sso_nulls.json",
843
  "test/WorkOSTests/testdata/authentication_sso_timed_out_nulls.json",
844
+ "test/WorkOSTests/testdata/authkit_oauth_resource.json",
845
  "test/WorkOSTests/testdata/authorization_check.json",
846
  "test/WorkOSTests/testdata/authorization_code_session_authenticate_request.json",
847
  "test/WorkOSTests/testdata/authorization_code_session_authenticate_request_nulls.json",
 
904
  "test/WorkOSTests/testdata/connection_saml_certificate_renewed_nulls.json",
905
  "test/WorkOSTests/testdata/cors_origin_response.json",
906
  "test/WorkOSTests/testdata/create_application_secret.json",
907
+ "test/WorkOSTests/testdata/create_authkit_oauth_resource.json",
908
+ "test/WorkOSTests/testdata/create_authkit_oauth_resource_nulls.json",
909
  "test/WorkOSTests/testdata/create_authorization_permission.json",
910
  "test/WorkOSTests/testdata/create_authorization_permission_nulls.json",
911
  "test/WorkOSTests/testdata/create_authorization_resource.json",
 
1201
  "test/WorkOSTests/testdata/list_audit_log_action.json",
1202
  "test/WorkOSTests/testdata/list_audit_log_schema.json",
1203
  "test/WorkOSTests/testdata/list_authentication_factor.json",
1204
+ "test/WorkOSTests/testdata/list_authkit_oauth_resource.json",
1205
  "test/WorkOSTests/testdata/list_authorization_permission.json",
1206
  "test/WorkOSTests/testdata/list_authorization_resource.json",
1207
  "test/WorkOSTests/testdata/list_authorized_connect_application_list_data.json",
 
1218
  "test/WorkOSTests/testdata/list_empty_audit_log_action.json",
1219
  "test/WorkOSTests/testdata/list_empty_audit_log_schema.json",
1220
  "test/WorkOSTests/testdata/list_empty_authentication_factor.json",
1221
+ "test/WorkOSTests/testdata/list_empty_authkit_oauth_resource.json",
1222
  "test/WorkOSTests/testdata/list_empty_authorization_permission.json",
1223
  "test/WorkOSTests/testdata/list_empty_authorization_resource.json",
1224
  "test/WorkOSTests/testdata/list_empty_authorized_connect_application_list_data.json",
 
1641
  "test/WorkOSTests/testdata/widget_session_token_response.json"
1642
  ],
1643
  "operations": {
1644
+ "GET /agents/blueprints": {
1645
+ "sdkMethod": "ListBlueprintsAsync",
1646
+ "service": "agents"
1647
+ },
1648
+ "POST /agents/blueprints": {
1649
+ "sdkMethod": "CreateBlueprintAsync",
1650
+ "service": "agents"
1651
+ },
1652
+ "GET /agents/blueprints/{agent_blueprint_id}": {
1653
+ "sdkMethod": "GetBlueprintAsync",
1654
+ "service": "agents"
1655
+ },
1656
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
1657
+ "sdkMethod": "UpdateBlueprintAsync",
1658
+ "service": "agents"
1659
+ },
1660
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
1661
+ "sdkMethod": "DeleteBlueprintAsync",
1662
+ "service": "agents"
1663
+ },
1664
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1665
+ "sdkMethod": "CreateBlueprintTokenAsync",
1666
+ "service": "agents"
1667
+ },
1668
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1669
+ "sdkMethod": "ValidateBlueprintTokenAsync",
1670
+ "service": "agents"
1671
+ },
1672
  "PATCH /agents/claims/attempts": {
1673
  "sdkMethod": "UpdateAttemptsAsync",
1674
  "service": "agents"
 
1681
  "sdkMethod": "GetRegistrationAsync",
1682
  "service": "agents"
1683
  },
1684
+ "GET /agents/instances": {
1685
+ "sdkMethod": "ListInstancesAsync",
1686
+ "service": "agents"
1687
+ },
1688
+ "GET /agents/instances/{agent_instance_id}": {
1689
+ "sdkMethod": "GetInstanceAsync",
1690
+ "service": "agents"
1691
+ },
1692
+ "DELETE /agents/instances/{agent_instance_id}": {
1693
+ "sdkMethod": "DeleteInstanceAsync",
1694
+ "service": "agents"
1695
+ },
1696
+ "GET /agents/sessions": {
1697
+ "sdkMethod": "ListSessionsAsync",
1698
+ "service": "agents"
1699
+ },
1700
+ "GET /agents/sessions/{agent_instance_session_id}": {
1701
+ "sdkMethod": "GetSessionAsync",
1702
+ "service": "agents"
1703
+ },
1704
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1705
+ "sdkMethod": "RevokeSessionAsync",
1706
+ "service": "agents"
1707
+ },
1708
  "POST /auth/challenges/{id}/verify": {
1709
  "sdkMethod": "VerifyChallengeAsync",
1710
  "service": "multi_factor_auth"
 
1949
  "sdkMethod": "ListConnectionsAsync",
1950
  "service": "sso"
1951
  },
1952
+ "POST /connections": {
1953
+ "sdkMethod": "CreateConnectionAsync",
1954
+ "service": "sso"
1955
+ },
1956
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1957
+ "sdkMethod": "ListConnectionSAMLIdpSigningCertsAsync",
1958
+ "service": "sso"
1959
+ },
1960
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1961
+ "sdkMethod": "CreateConnectionSAMLIdpSigningCertAsync",
1962
+ "service": "sso"
1963
+ },
1964
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1965
+ "sdkMethod": "DeleteConnectionSAMLIdpSigningCertAsync",
1966
+ "service": "sso"
1967
+ },
1968
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1969
+ "sdkMethod": "ListConnectionSAMLSpEncryptionCertsAsync",
1970
+ "service": "sso"
1971
+ },
1972
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1973
+ "sdkMethod": "CreateConnectionSAMLSpEncryptionCertAsync",
1974
+ "service": "sso"
1975
+ },
1976
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1977
+ "sdkMethod": "DeleteConnectionSAMLSpEncryptionCertAsync",
1978
+ "service": "sso"
1979
+ },
1980
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1981
+ "sdkMethod": "ListConnectionSAMLSpSigningCertAsync",
1982
+ "service": "sso"
1983
+ },
1984
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1985
+ "sdkMethod": "CreateConnectionSAMLSpSigningCertAsync",
1986
+ "service": "sso"
1987
+ },
1988
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1989
+ "sdkMethod": "DeleteConnectionSAMLSpSigningCertAsync",
1990
+ "service": "sso"
1991
+ },
1992
  "GET /connections/{id}": {
1993
  "sdkMethod": "GetConnectionAsync",
1994
  "service": "sso"
1995
  },
1996
+ "PATCH /connections/{id}": {
1997
+ "sdkMethod": "UpdateConnectionAsync",
1998
+ "service": "sso"
1999
+ },
2000
  "DELETE /connections/{id}": {
2001
  "sdkMethod": "DeleteConnectionAsync",
2002
  "service": "sso"
 
2029
  "sdkMethod": "AuthorizeDataIntegrationAsync",
2030
  "service": "pipes"
2031
  },
2032
+ "PUT /data-integrations/{slug}/client-credentials": {
2033
+ "sdkMethod": "UpdateDataIntegrationClientCredentialsAsync",
2034
+ "service": "pipes"
2035
+ },
2036
  "POST /data-integrations/{slug}/credentials": {
2037
  "sdkMethod": "CreateDataIntegrationCredentialAsync",
2038
  "service": "pipes"
2039
  },
2040
+ "GET /data-integrations/{slug}/organization": {
2041
+ "sdkMethod": "ListDataIntegrationOrganizationAsync",
2042
+ "service": "pipes"
2043
+ },
2044
+ "PUT /data-integrations/{slug}/organization": {
2045
+ "sdkMethod": "UpdateDataIntegrationOrganizationAsync",
2046
+ "service": "pipes"
2047
+ },
2048
+ "DELETE /data-integrations/{slug}/organization": {
2049
+ "sdkMethod": "DeleteDataIntegrationOrganizationAsync",
2050
+ "service": "pipes"
2051
+ },
2052
  "POST /data-integrations/{provider}/token": {
2053
  "sdkMethod": "GetAccessTokenAsync",
2054
  "service": "pipes"
 
2217
  "sdkMethod": "ListAuthorizedApplicationsAsync",
2218
  "service": "organizations"
2219
  },
2220
+ "GET /organizations/{organization_id}/it_contacts": {
2221
+ "sdkMethod": "ListItContactsAsync",
2222
+ "service": "organizations"
2223
+ },
2224
+ "POST /organizations/{organization_id}/it_contacts": {
2225
+ "sdkMethod": "CreateItContactAsync",
2226
+ "service": "organizations"
2227
+ },
2228
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2229
+ "sdkMethod": "DeleteItContactAsync",
2230
+ "service": "organizations"
2231
+ },
2232
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2233
+ "sdkMethod": "InviteItContactAsync",
2234
+ "service": "organizations"
2235
+ },
2236
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2237
+ "sdkMethod": "RevokeItContactAsync",
2238
+ "service": "organizations"
2239
+ },
2240
+ "POST /platform/teams": {
2241
+ "sdkMethod": "CreateTeamAsync",
2242
+ "service": "platform_teams"
2243
+ },
2244
+ "GET /platform/teams/{team_id}": {
2245
+ "sdkMethod": "GetTeamAsync",
2246
+ "service": "platform_teams"
2247
+ },
2248
  "POST /portal/generate_link": {
2249
  "sdkMethod": "GenerateLinkAsync",
2250
  "service": "admin_portal"
 
2317
  "sdkMethod": "RevokeSessionAsync",
2318
  "service": "user_management"
2319
  },
2320
+ "GET /user_management/authkit_oauth_resources": {
2321
+ "sdkMethod": "ListAuthkitOAuthResourcesAsync",
2322
+ "service": "user_management"
2323
+ },
2324
+ "POST /user_management/authkit_oauth_resources": {
2325
+ "sdkMethod": "CreateAuthkitOAuthResourceAsync",
2326
+ "service": "user_management"
2327
+ },
2328
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
2329
+ "sdkMethod": "DeleteAuthkitOAuthResourceAsync",
2330
+ "service": "user_management"
2331
+ },
2332
  "GET /user_management/cors_origins": {
2333
  "sdkMethod": "ListCorsOriginsAsync",
2334
  "service": "user_management"
 
2529
  "sdkMethod": "CreateUserAuthFactorAsync",
2530
  "service": "multi_factor_auth"
2531
  },
2532
+ "DELETE /user_management/waitlist_entries/{id}": {
2533
+ "sdkMethod": "DeleteWaitlistEntryAsync",
2534
+ "service": "user_management"
2535
+ },
2536
+ "POST /user_management/waitlist_entries/{id}/approve": {
2537
+ "sdkMethod": "CreateWaitlistEntryApproveAsync",
2538
+ "service": "user_management"
2539
+ },
2540
+ "POST /user_management/waitlist_entries/{id}/deny": {
2541
+ "sdkMethod": "CreateWaitlistEntryDenyAsync",
2542
+ "service": "user_management"
2543
+ },
2544
+ "GET /user_management/waitlists": {
2545
+ "sdkMethod": "ListWaitlistsAsync",
2546
+ "service": "user_management"
2547
+ },
2548
+ "GET /user_management/waitlists/{id}": {
2549
+ "sdkMethod": "GetWaitlistAsync",
2550
+ "service": "user_management"
2551
+ },
2552
+ "GET /user_management/waitlists/{id}/entries": {
2553
+ "sdkMethod": "ListWaitlistEntriesAsync",
2554
+ "service": "user_management"
2555
+ },
2556
+ "POST /user_management/waitlists/{id}/entries": {
2557
+ "sdkMethod": "CreateWaitlistEntryAsync",
2558
+ "service": "user_management"
2559
+ },
2560
  "POST /vault/v1/keys/data-key": {
2561
  "sdkMethod": "CreateDataKeyAsync",
2562
  "service": "vault"
 
2664
  "GET /audit_logs/exports/{auditLogExportId}": {
2665
  "sdkMethod": "GetExportAsync",
2666
  "service": "audit_logs"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2667
  }
2668
  }
2669
  }
dotnet/src/WorkOS.net/Entities/AccountSelectionRequiredError.cs
dotnet/src/WorkOS.net/Entities/AccountSelectionRequiredError.cs ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+
6
+ /// <summary>Represents an account selection required error.</summary>
7
+ public class AccountSelectionRequiredError
8
+ {
9
+
10
+ /// <summary>Indicates that several connected accounts match and the request must name one.</summary>
11
+ public string Code { get; internal set; } = "account_selection_required";
12
+
13
+ /// <summary>A human-readable explanation of the ambiguity.</summary>
14
+ public string Message { get; set; } = default!;
15
+ }
16
+ }
dotnet/src/WorkOS.net/Entities/AuditLogsRetention.cs
dotnet/src/WorkOS.net/Entities/AuditLogsRetention.cs CHANGED
@@ -7,7 +7,7 @@ namespace WorkOS
7
  public class AuditLogsRetention
8
  {
9
 
10
- /// <summary>The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365.</summary>
11
  public long? RetentionPeriodInDays { get; set; }
12
  }
13
  }
 
7
  public class AuditLogsRetention
8
  {
9
 
10
+ /// <summary>The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 through 330 in 30-day increments and 365 through 3650 in 365-day increments.</summary>
11
  public long? RetentionPeriodInDays { get; set; }
12
  }
13
  }
dotnet/src/WorkOS.net/Entities/AuthkitOAuthResource.cs
dotnet/src/WorkOS.net/Entities/AuthkitOAuthResource.cs ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ namespace WorkOS
4
+ {
5
+
6
+ /// <summary>Represents an authkit o auth resource.</summary>
7
+ public class AuthkitOAuthResource
8
+ {
9
+
10
+ /// <summary>The object type.</summary>
11
+ public string Object { get; internal set; } = "authkit_oauth_resource";
12
+
13
+ /// <summary>The ID of the AuthKit OAuth resource.</summary>
14
+ public string Id { get; set; } = default!;
15
+
16
+ /// <summary>The resource URI.</summary>
17
+ public string Uri { get; set; } = default!;
18
+
19
+ /// <summary>Whether this is the default AuthKit OAuth resource for the environment.</summary>
20
+ public bool Default { get; set; }
21
+
22
+ /// <summary>The timestamp when the AuthKit OAuth resource was created.</summary>
23
+ public string CreatedAt { get; set; } = default!;
24
+
25
+ /// <summary>The timestamp when the AuthKit OAuth resource was last updated.</summary>
26
+ public string UpdatedAt { get; set; } = default!;
27
+ }
28
+ }
dotnet/src/WorkOS.net/Entities/DataIntegration.cs
dotnet/src/WorkOS.net/Entities/DataIntegration.cs CHANGED
@@ -23,6 +23,11 @@ namespace WorkOS
23
  /// <summary>The integration type derived from the provider.</summary>
24
  public string IntegrationType { get; set; } = default!;
25
 
 
 
 
 
 
26
  /// <summary>An optional description of the Data Integration.</summary>
27
  public string? Description { get; set; }
28
 
 
23
  /// <summary>The integration type derived from the provider.</summary>
24
  public string IntegrationType { get; set; } = default!;
25
 
26
+ /// <summary>Who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation.</summary>
27
+ [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
28
+ [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingDefault)]
29
+ public CreateDataIntegrationOwnership Ownership { get; set; }
30
+
31
  /// <summary>An optional description of the Data Integration.</summary>
32
  public string? Description { get; set; }
33
 
dotnet/src/WorkOS.net/Entities/DataIntegrationInstallation.cs
dotnet/src/WorkOS.net/Entities/DataIntegrationInstallation.cs CHANGED
@@ -10,10 +10,10 @@ namespace WorkOS
10
  /// <summary>Unique identifier of the installation.</summary>
11
  public string Id { get; set; } = default!;
12
 
13
- /// <summary>The User the API key was installed for.</summary>
14
- public string UserId { get; set; } = default!;
15
 
16
- /// <summary>The Organization the installation is scoped to, or null when unscoped.</summary>
17
  public string? OrganizationId { get; set; }
18
 
19
  /// <summary>The last four characters of the stored API key. The full key is never returned.</summary>
 
10
  /// <summary>Unique identifier of the installation.</summary>
11
  public string Id { get; set; } = default!;
12
 
13
+ /// <summary>The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization.</summary>
14
+ public string? UserId { get; set; }
15
 
16
+ /// <summary>The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped.</summary>
17
  public string? OrganizationId { get; set; }
18
 
19
  /// <summary>The last four characters of the stored API key. The full key is never returned.</summary>
dotnet/src/WorkOS.net/Entities/DataIntegrationsListResponseData.cs
dotnet/src/WorkOS.net/Entities/DataIntegrationsListResponseData.cs CHANGED
@@ -48,10 +48,10 @@ namespace WorkOS
48
  /// <summary>The timestamp when the provider was last updated.</summary>
49
  public string UpdatedAt { get; set; } = default!;
50
 
51
- /// <summary>The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected.</summary>
52
  public DataIntegrationsListResponseDataConnectedAccount? ConnectedAccount { get; set; }
53
 
54
- /// <summary>The user's connected accounts for this provider in the requested ownership context.</summary>
55
  public List<DataIntegrationsListResponseDataConnectedAccount> ConnectedAccounts { get; set; } = default!;
56
  }
57
  }
 
48
  /// <summary>The timestamp when the provider was last updated.</summary>
49
  public string UpdatedAt { get; set; } = default!;
50
 
51
+ /// <summary>The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection.</summary>
52
  public DataIntegrationsListResponseDataConnectedAccount? ConnectedAccount { get; set; }
53
 
54
+ /// <summary>The user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`.</summary>
55
  public List<DataIntegrationsListResponseDataConnectedAccount> ConnectedAccounts { get; set; } = default!;
56
  }
57
  }
dotnet/src/WorkOS.net/Enums/CreateDataIntegrationOwnership.cs
dotnet/src/WorkOS.net/Enums/{CreateDataIntegrationAuthMethods.cs → CreateDataIntegrationOwnership.cs} RENAMED
@@ -6,17 +6,17 @@ namespace WorkOS
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
  }
 
6
  using Newtonsoft.Json;
7
  using STJS = System.Text.Json.Serialization;
8
 
9
+ /// <summary>Represents create data integration ownership values.</summary>
10
  [JsonConverter(typeof(WorkOSNewtonsoftStringEnumConverter))]
11
  [STJS.JsonConverter(typeof(WorkOSStringEnumConverterFactory))]
12
+ public enum CreateDataIntegrationOwnership
13
  {
14
  [EnumMember(Value = "unknown")]
15
  Unknown,
16
 
17
+ [EnumMember(Value = "user")]
18
+ User,
19
+ [EnumMember(Value = "organization")]
20
+ Organization,
21
  }
22
  }
dotnet/src/WorkOS.net/Enums/ResourceExportCompletedDataResourceType.cs
dotnet/src/WorkOS.net/Enums/ResourceExportCompletedDataResourceType.cs CHANGED
@@ -24,5 +24,7 @@ namespace WorkOS
24
  Sessions,
25
  [EnumMember(Value = "auditLogEvents")]
26
  AuditLogEvents,
 
 
27
  }
28
  }
 
24
  Sessions,
25
  [EnumMember(Value = "auditLogEvents")]
26
  AuditLogEvents,
27
+ [EnumMember(Value = "connections")]
28
+ Connections,
29
  }
30
  }
dotnet/src/WorkOS.net/Enums/SessionCreatedDataStatus.cs
dotnet/src/WorkOS.net/Enums/SessionCreatedDataStatus.cs DELETED
@@ -1,24 +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 session created data status values.</summary>
10
- [JsonConverter(typeof(WorkOSNewtonsoftStringEnumConverter))]
11
- [STJS.JsonConverter(typeof(WorkOSStringEnumConverterFactory))]
12
- public enum SessionCreatedDataStatus
13
- {
14
- [EnumMember(Value = "unknown")]
15
- Unknown,
16
-
17
- [EnumMember(Value = "active")]
18
- Active,
19
- [EnumMember(Value = "expired")]
20
- Expired,
21
- [EnumMember(Value = "revoked")]
22
- Revoked,
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dotnet/src/WorkOS.net/Enums/WaitlistUserState.cs
dotnet/src/WorkOS.net/Enums/WaitlistUserState.cs DELETED
@@ -1,24 +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 waitlist user state values.</summary>
10
- [JsonConverter(typeof(WorkOSNewtonsoftStringEnumConverter))]
11
- [STJS.JsonConverter(typeof(WorkOSStringEnumConverterFactory))]
12
- public enum WaitlistUserState
13
- {
14
- [EnumMember(Value = "unknown")]
15
- Unknown,
16
-
17
- [EnumMember(Value = "pending")]
18
- Pending,
19
- [EnumMember(Value = "approved")]
20
- Approved,
21
- [EnumMember(Value = "denied")]
22
- Denied,
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dotnet/src/WorkOS.net/Services/AdminPortal/_interfaces/AdminPortalOptions.cs
dotnet/src/WorkOS.net/Services/AdminPortal/_interfaces/AdminPortalOptions.cs CHANGED
@@ -10,10 +10,10 @@ namespace WorkOS
10
  /// <summary>Request options for <see cref="AdminPortalService.GenerateLinkAsync"/>: Generate a Portal Link</summary>
11
  public class AdminPortalGenerateLinkOptions : BaseOptions
12
  {
13
- /// <summary>The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.</summary>
14
  public string? ReturnUrl { get; set; }
15
 
16
- /// <summary>The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.</summary>
17
  public string? SuccessUrl { get; set; }
18
 
19
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier.</summary>
 
10
  /// <summary>Request options for <see cref="AdminPortalService.GenerateLinkAsync"/>: Generate a Portal Link</summary>
11
  public class AdminPortalGenerateLinkOptions : BaseOptions
12
  {
13
+ /// <summary>The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.</summary>
14
  public string? ReturnUrl { get; set; }
15
 
16
+ /// <summary>The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.</summary>
17
  public string? SuccessUrl { get; set; }
18
 
19
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier.</summary>
dotnet/src/WorkOS.net/Services/Pipes/PipesService.cs
dotnet/src/WorkOS.net/Services/Pipes/PipesService.cs CHANGED
@@ -26,7 +26,7 @@ namespace WorkOS
26
 
27
  /// <summary>List data integrations</summary>
28
  /// <remarks>
29
- /// Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
30
  /// </remarks>
31
  /// <param name="options">Request options.</param>
32
  /// <param name="requestOptions">Per-request configuration overrides.</param>
@@ -55,7 +55,7 @@ namespace WorkOS
55
 
56
  /// <summary>Create a data integration</summary>
57
  /// <remarks>
58
- /// Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
59
  /// </remarks>
60
  /// <param name="options">Request options.</param>
61
  /// <param name="requestOptions">Per-request configuration overrides.</param>
@@ -74,7 +74,7 @@ namespace WorkOS
74
 
75
  /// <summary>Get a data integration</summary>
76
  /// <remarks>
77
- /// Retrieves a data integration by its slug.
78
  /// </remarks>
79
  /// <param name="slug">The slug identifier of the data integration.</param>
80
  /// <param name="requestOptions">Per-request configuration overrides.</param>
@@ -93,7 +93,7 @@ namespace WorkOS
93
 
94
  /// <summary>Update a data integration</summary>
95
  /// <remarks>
96
- /// Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
97
  /// </remarks>
98
  /// <param name="slug">The slug identifier of the data integration.</param>
99
  /// <param name="options">Request options.</param>
@@ -113,7 +113,7 @@ namespace WorkOS
113
 
114
  /// <summary>Delete a data integration</summary>
115
  /// <remarks>
116
- /// Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
117
  /// </remarks>
118
  /// <param name="slug">The slug identifier of the data integration.</param>
119
  /// <param name="requestOptions">Per-request configuration overrides.</param>
@@ -131,7 +131,7 @@ namespace WorkOS
131
 
132
  /// <summary>Upsert an API key for a connected account</summary>
133
  /// <remarks>
134
- /// Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
135
  /// </remarks>
136
  /// <param name="slug">The identifier of the integration.</param>
137
  /// <param name="options">Request options.</param>
@@ -171,7 +171,7 @@ namespace WorkOS
171
 
172
  /// <summary>Upsert client credentials for a connected account</summary>
173
  /// <remarks>
174
- /// Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
175
  /// </remarks>
176
  /// <param name="slug">The identifier of the integration.</param>
177
  /// <param name="options">Request options.</param>
@@ -209,6 +209,63 @@ namespace WorkOS
209
  return this.CreateDataIntegrationCredentialAsync(slug, options, requestOptions, cancellationToken);
210
  }
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  /// <summary>Get an access token for a connected account</summary>
213
  /// <remarks>
214
  /// Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
 
26
 
27
  /// <summary>List data integrations</summary>
28
  /// <remarks>
29
+ /// Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
30
  /// </remarks>
31
  /// <param name="options">Request options.</param>
32
  /// <param name="requestOptions">Per-request configuration overrides.</param>
 
55
 
56
  /// <summary>Create a data integration</summary>
57
  /// <remarks>
58
+ /// Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
59
  /// </remarks>
60
  /// <param name="options">Request options.</param>
61
  /// <param name="requestOptions">Per-request configuration overrides.</param>
 
74
 
75
  /// <summary>Get a data integration</summary>
76
  /// <remarks>
77
+ /// Retrieves the user-owned data integration by its slug.
78
  /// </remarks>
79
  /// <param name="slug">The slug identifier of the data integration.</param>
80
  /// <param name="requestOptions">Per-request configuration overrides.</param>
 
93
 
94
  /// <summary>Update a data integration</summary>
95
  /// <remarks>
96
+ /// Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
97
  /// </remarks>
98
  /// <param name="slug">The slug identifier of the data integration.</param>
99
  /// <param name="options">Request options.</param>
 
113
 
114
  /// <summary>Delete a data integration</summary>
115
  /// <remarks>
116
+ /// Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
117
  /// </remarks>
118
  /// <param name="slug">The slug identifier of the data integration.</param>
119
  /// <param name="requestOptions">Per-request configuration overrides.</param>
 
131
 
132
  /// <summary>Upsert an API key for a connected account</summary>
133
  /// <remarks>
134
+ /// Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
135
  /// </remarks>
136
  /// <param name="slug">The identifier of the integration.</param>
137
  /// <param name="options">Request options.</param>
 
171
 
172
  /// <summary>Upsert client credentials for a connected account</summary>
173
  /// <remarks>
174
+ /// Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
175
  /// </remarks>
176
  /// <param name="slug">The identifier of the integration.</param>
177
  /// <param name="options">Request options.</param>
 
209
  return this.CreateDataIntegrationCredentialAsync(slug, options, requestOptions, cancellationToken);
210
  }
211
 
212
+ /// <summary>Get an organization-owned data integration</summary>
213
+ /// <remarks>
214
+ /// Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
215
+ /// </remarks>
216
+ /// <param name="slug">The slug identifier of the data integration.</param>
217
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
218
+ /// <param name="cancellationToken">Cancellation token.</param>
219
+ /// <returns>The <see cref="DataIntegration"/> result.</returns>
220
+ public virtual async Task<DataIntegration> ListDataIntegrationOrganizationAsync(string slug, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
221
+ {
222
+ return await this.GetAsync<DataIntegration>($"/data-integrations/{Uri.EscapeDataString(slug)}/organization", null, requestOptions, cancellationToken);
223
+ }
224
+
225
+ /// <summary>Compatibility wrapper for <see cref="ListDataIntegrationOrganizationAsync"/>.</summary>
226
+ public virtual Task<DataIntegration> ListDataIntegrationOrganization(string slug, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
227
+ {
228
+ return this.ListDataIntegrationOrganizationAsync(slug, requestOptions, cancellationToken);
229
+ }
230
+
231
+ /// <summary>Update an organization-owned data integration</summary>
232
+ /// <remarks>
233
+ /// Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
234
+ /// </remarks>
235
+ /// <param name="slug">The slug identifier of the data integration.</param>
236
+ /// <param name="options">Request options.</param>
237
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
238
+ /// <param name="cancellationToken">Cancellation token.</param>
239
+ /// <returns>The <see cref="DataIntegration"/> result.</returns>
240
+ public virtual async Task<DataIntegration> UpdateDataIntegrationOrganizationAsync(string slug, PipesUpdateDataIntegrationOrganizationOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
241
+ {
242
+ return await this.PutAsync<DataIntegration>($"/data-integrations/{Uri.EscapeDataString(slug)}/organization", options, requestOptions, cancellationToken);
243
+ }
244
+
245
+ /// <summary>Compatibility wrapper for <see cref="UpdateDataIntegrationOrganizationAsync"/>.</summary>
246
+ public virtual Task<DataIntegration> UpdateDataIntegrationOrganization(string slug, PipesUpdateDataIntegrationOrganizationOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
247
+ {
248
+ return this.UpdateDataIntegrationOrganizationAsync(slug, options, requestOptions, cancellationToken);
249
+ }
250
+
251
+ /// <summary>Delete an organization-owned data integration</summary>
252
+ /// <remarks>
253
+ /// Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
254
+ /// </remarks>
255
+ /// <param name="slug">The slug identifier of the data integration.</param>
256
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
257
+ /// <param name="cancellationToken">Cancellation token.</param>
258
+ public virtual async Task DeleteDataIntegrationOrganizationAsync(string slug, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
259
+ {
260
+ await this.DeleteAsync($"/data-integrations/{Uri.EscapeDataString(slug)}/organization", null, requestOptions, cancellationToken);
261
+ }
262
+
263
+ /// <summary>Compatibility wrapper for <see cref="DeleteDataIntegrationOrganizationAsync"/>.</summary>
264
+ public virtual Task DeleteDataIntegrationOrganization(string slug, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
265
+ {
266
+ return this.DeleteDataIntegrationOrganizationAsync(slug, requestOptions, cancellationToken);
267
+ }
268
+
269
  /// <summary>Get an access token for a connected account</summary>
270
  /// <remarks>
271
  /// Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
dotnet/src/WorkOS.net/Services/Pipes/_interfaces/PipesOptions.cs
dotnet/src/WorkOS.net/Services/Pipes/_interfaces/PipesOptions.cs CHANGED
@@ -10,6 +10,9 @@ namespace WorkOS
10
  /// <summary>Request options for <see cref="PipesService.ListDataIntegrationsAsync"/>: List data integrations</summary>
11
  public class PipesListDataIntegrationsOptions : ListOptions
12
  {
 
 
 
13
  }
14
 
15
  /// <summary>Request options for <see cref="PipesService.CreateDataIntegrationAsync"/>: Create a data integration</summary>
@@ -18,6 +21,9 @@ namespace WorkOS
18
  /// <summary>The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.</summary>
19
  public string Provider { get; set; } = default!;
20
 
 
 
 
21
  /// <summary>An optional description of the Data Integration.</summary>
22
  public string? Description { get; set; }
23
 
@@ -73,9 +79,15 @@ namespace WorkOS
73
  /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier.</summary>
74
  public string UserId { get; set; } = default!;
75
 
76
- /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.</summary>
77
  public string? OrganizationId { get; set; }
78
 
 
 
 
 
 
 
79
  /// <summary>The API key secret to store for this integration.</summary>
80
  public string Secret { get; set; } = default!;
81
 
@@ -104,9 +116,15 @@ namespace WorkOS
104
  /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier.</summary>
105
  public string UserId { get; set; } = default!;
106
 
107
- /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.</summary>
108
  public string? OrganizationId { get; set; }
109
 
 
 
 
 
 
 
110
  /// <summary>The OAuth client ID to store for this integration.</summary>
111
  public string ClientId { get; set; } = default!;
112
 
@@ -121,29 +139,64 @@ namespace WorkOS
121
  /// <summary>Request options for <see cref="PipesService.CreateDataIntegrationCredentialAsync"/>: Vend credentials for a connected account</summary>
122
  public class PipesCreateDataIntegrationCredentialOptions : BaseOptions
123
  {
124
- /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier.</summary>
125
  public string UserId { get; set; } = default!;
126
 
127
- /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.</summary>
128
  public string? OrganizationId { get; set; }
129
 
130
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.</summary>
131
  public string? ConnectedAccountId { get; set; }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  }
134
 
135
  /// <summary>Request options for <see cref="PipesService.GetAccessTokenAsync"/>: Get an access token for a connected account</summary>
136
  public class PipesGetAccessTokenOptions : BaseOptions
137
  {
138
- /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier.</summary>
139
  public string UserId { get; set; } = default!;
140
 
141
- /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.</summary>
142
  public string? OrganizationId { get; set; }
143
 
144
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.</summary>
145
  public string? ConnectedAccountId { get; set; }
146
 
 
 
 
 
 
 
147
  }
148
 
149
  /// <summary>Request options for <see cref="PipesService.GetUserConnectedAccountAsync"/>: Get a connected account</summary>
@@ -152,6 +205,9 @@ namespace WorkOS
152
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.</summary>
153
  public string? OrganizationId { get; set; }
154
 
 
 
 
155
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.</summary>
156
  public string? ConnectedAccountId { get; set; }
157
 
@@ -201,6 +257,9 @@ namespace WorkOS
201
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.</summary>
202
  public string? OrganizationId { get; set; }
203
 
 
 
 
204
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.</summary>
205
  public string? ConnectedAccountId { get; set; }
206
 
@@ -212,6 +271,9 @@ namespace WorkOS
212
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.</summary>
213
  public string? OrganizationId { get; set; }
214
 
 
 
 
215
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.</summary>
216
  public string? ConnectedAccountId { get; set; }
217
 
@@ -223,5 +285,8 @@ namespace WorkOS
223
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.</summary>
224
  public string? OrganizationId { get; set; }
225
 
 
 
 
226
  }
227
  }
 
10
  /// <summary>Request options for <see cref="PipesService.ListDataIntegrationsAsync"/>: List data integrations</summary>
11
  public class PipesListDataIntegrationsOptions : ListOptions
12
  {
13
+ /// <summary>Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.</summary>
14
+ public CreateDataIntegrationOwnership? Ownership { get; set; }
15
+
16
  }
17
 
18
  /// <summary>Request options for <see cref="PipesService.CreateDataIntegrationAsync"/>: Create a data integration</summary>
 
21
  /// <summary>The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.</summary>
22
  public string Provider { get; set; } = default!;
23
 
24
+ /// <summary>Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.</summary>
25
+ public CreateDataIntegrationOwnership? Ownership { get; set; }
26
+
27
  /// <summary>An optional description of the Data Integration.</summary>
28
  public string? Description { get; set; }
29
 
 
79
  /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier.</summary>
80
  public string UserId { get; set; } = default!;
81
 
82
+ /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.</summary>
83
  public string? OrganizationId { get; set; }
84
 
85
+ /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.</summary>
86
+ public string? ConnectedAccountId { get; set; }
87
+
88
+ /// <summary>Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.</summary>
89
+ public CreateDataIntegrationOwnership? ConnectionOwner { get; set; }
90
+
91
  /// <summary>The API key secret to store for this integration.</summary>
92
  public string Secret { get; set; } = default!;
93
 
 
116
  /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier.</summary>
117
  public string UserId { get; set; } = default!;
118
 
119
+ /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.</summary>
120
  public string? OrganizationId { get; set; }
121
 
122
+ /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.</summary>
123
+ public string? ConnectedAccountId { get; set; }
124
+
125
+ /// <summary>Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.</summary>
126
+ public CreateDataIntegrationOwnership? ConnectionOwner { get; set; }
127
+
128
  /// <summary>The OAuth client ID to store for this integration.</summary>
129
  public string ClientId { get; set; } = default!;
130
 
 
139
  /// <summary>Request options for <see cref="PipesService.CreateDataIntegrationCredentialAsync"/>: Vend credentials for a connected account</summary>
140
  public class PipesCreateDataIntegrationCredentialOptions : BaseOptions
141
  {
142
+ /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.</summary>
143
  public string UserId { get; set; } = default!;
144
 
145
+ /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.</summary>
146
  public string? OrganizationId { get; set; }
147
 
148
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.</summary>
149
  public string? ConnectedAccountId { get; set; }
150
 
151
+ /// <summary>Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.</summary>
152
+ public CreateDataIntegrationOwnership? ConnectionOwner { get; set; }
153
+
154
+ /// <summary>Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.</summary>
155
+ public bool? SupportsMultipleConnections { get; set; }
156
+
157
+ }
158
+
159
+ /// <summary>Request options for <see cref="PipesService.UpdateDataIntegrationOrganizationAsync"/>: Update an organization-owned data integration</summary>
160
+ public class PipesUpdateDataIntegrationOrganizationOptions : BaseOptions
161
+ {
162
+ /// <summary>An optional description of the Data Integration.</summary>
163
+ public string? Description { get; set; }
164
+
165
+ /// <summary>Whether the Data Integration is enabled.</summary>
166
+ public bool? Enabled { get; set; }
167
+
168
+ /// <summary>The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.</summary>
169
+ public List<string>? Scopes { get; set; }
170
+
171
+ /// <summary>New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.</summary>
172
+ public DataIntegrationCredentialsInput? Credentials { get; set; }
173
+
174
+ /// <summary>An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).</summary>
175
+ public ApiKeyInstallation? ApiKey { get; set; }
176
+
177
+ /// <summary>Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.</summary>
178
+ public UpdateCustomProviderDefinition? CustomProvider { get; set; }
179
+
180
  }
181
 
182
  /// <summary>Request options for <see cref="PipesService.GetAccessTokenAsync"/>: Get an access token for a connected account</summary>
183
  public class PipesGetAccessTokenOptions : BaseOptions
184
  {
185
+ /// <summary>A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.</summary>
186
  public string UserId { get; set; } = default!;
187
 
188
+ /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.</summary>
189
  public string? OrganizationId { get; set; }
190
 
191
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.</summary>
192
  public string? ConnectedAccountId { get; set; }
193
 
194
+ /// <summary>Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.</summary>
195
+ public CreateDataIntegrationOwnership? ConnectionOwner { get; set; }
196
+
197
+ /// <summary>Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.</summary>
198
+ public bool? SupportsMultipleConnections { get; set; }
199
+
200
  }
201
 
202
  /// <summary>Request options for <see cref="PipesService.GetUserConnectedAccountAsync"/>: Get a connected account</summary>
 
205
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.</summary>
206
  public string? OrganizationId { get; set; }
207
 
208
+ /// <summary>Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.</summary>
209
+ public bool? SupportsMultipleConnections { get; set; }
210
+
211
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.</summary>
212
  public string? ConnectedAccountId { get; set; }
213
 
 
257
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.</summary>
258
  public string? OrganizationId { get; set; }
259
 
260
+ /// <summary>Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.</summary>
261
+ public bool? SupportsMultipleConnections { get; set; }
262
+
263
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.</summary>
264
  public string? ConnectedAccountId { get; set; }
265
 
 
271
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.</summary>
272
  public string? OrganizationId { get; set; }
273
 
274
+ /// <summary>Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.</summary>
275
+ public bool? SupportsMultipleConnections { get; set; }
276
+
277
  /// <summary>A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.</summary>
278
  public string? ConnectedAccountId { get; set; }
279
 
 
285
  /// <summary>An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.</summary>
286
  public string? OrganizationId { get; set; }
287
 
288
+ /// <summary>Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.</summary>
289
+ public bool? SupportsMultipleConnections { get; set; }
290
+
291
  }
292
  }
dotnet/src/WorkOS.net/Services/UserManagement/UserManagementService.cs
dotnet/src/WorkOS.net/Services/UserManagement/UserManagementService.cs CHANGED
@@ -345,6 +345,72 @@ namespace WorkOS
345
  return this.RevokeSessionAsync(options, requestOptions, cancellationToken);
346
  }
347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
  /// <summary>List CORS origins</summary>
349
  /// <remarks>
350
  /// Lists the CORS origins for the current environment.
 
345
  return this.RevokeSessionAsync(options, requestOptions, cancellationToken);
346
  }
347
 
348
+ /// <summary>List AuthKit OAuth resources</summary>
349
+ /// <remarks>
350
+ /// Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
351
+ /// </remarks>
352
+ /// <param name="options">Request options.</param>
353
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
354
+ /// <param name="cancellationToken">Cancellation token.</param>
355
+ /// <returns>A page of <see cref="AuthkitOAuthResource"/> results.</returns>
356
+ public virtual async Task<WorkOSList<AuthkitOAuthResource>> ListAuthkitOAuthResourcesAsync(UserManagementListAuthkitOAuthResourcesOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
357
+ {
358
+ return await this.GetAsync<WorkOSList<AuthkitOAuthResource>>("/user_management/authkit_oauth_resources", options, requestOptions, cancellationToken);
359
+ }
360
+
361
+ /// <summary>Compatibility wrapper for <see cref="ListAuthkitOAuthResourcesAsync"/>.</summary>
362
+ public virtual Task<WorkOSList<AuthkitOAuthResource>> ListAuthkitOAuthResources(UserManagementListAuthkitOAuthResourcesOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
363
+ {
364
+ return this.ListAuthkitOAuthResourcesAsync(options, requestOptions, cancellationToken);
365
+ }
366
+
367
+ /// <summary>Auto-paging variant of <see cref="ListAuthkitOAuthResourcesAsync"/>. Yields individual items across all pages.</summary>
368
+ /// <param name="options">Request options.</param>
369
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
370
+ /// <param name="cancellationToken">Cancellation token.</param>
371
+ /// <returns>An async sequence of <see cref="AuthkitOAuthResource"/> items.</returns>
372
+ public virtual IAsyncEnumerable<AuthkitOAuthResource> ListAuthkitOAuthResourcesAutoPagingAsync(UserManagementListAuthkitOAuthResourcesOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
373
+ {
374
+ return this.ListAutoPagingAsync<AuthkitOAuthResource>("/user_management/authkit_oauth_resources", options, requestOptions, cancellationToken);
375
+ }
376
+
377
+ /// <summary>Create an AuthKit OAuth resource</summary>
378
+ /// <remarks>
379
+ /// Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
380
+ /// </remarks>
381
+ /// <param name="options">Request options.</param>
382
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
383
+ /// <param name="cancellationToken">Cancellation token.</param>
384
+ /// <returns>The <see cref="AuthkitOAuthResource"/> result.</returns>
385
+ public virtual async Task<AuthkitOAuthResource> CreateAuthkitOAuthResourceAsync(UserManagementCreateAuthkitOAuthResourceOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
386
+ {
387
+ return await this.PostAsync<AuthkitOAuthResource>("/user_management/authkit_oauth_resources", options, requestOptions, cancellationToken);
388
+ }
389
+
390
+ /// <summary>Compatibility wrapper for <see cref="CreateAuthkitOAuthResourceAsync"/>.</summary>
391
+ public virtual Task<AuthkitOAuthResource> CreateAuthkitOAuthResource(UserManagementCreateAuthkitOAuthResourceOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
392
+ {
393
+ return this.CreateAuthkitOAuthResourceAsync(options, requestOptions, cancellationToken);
394
+ }
395
+
396
+ /// <summary>Delete an AuthKit OAuth resource</summary>
397
+ /// <remarks>
398
+ /// Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
399
+ /// </remarks>
400
+ /// <param name="id">The ID of the AuthKit OAuth resource to delete.</param>
401
+ /// <param name="requestOptions">Per-request configuration overrides.</param>
402
+ /// <param name="cancellationToken">Cancellation token.</param>
403
+ public virtual async Task DeleteAuthkitOAuthResourceAsync(string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
404
+ {
405
+ await this.DeleteAsync($"/user_management/authkit_oauth_resources/{Uri.EscapeDataString(id)}", null, requestOptions, cancellationToken);
406
+ }
407
+
408
+ /// <summary>Compatibility wrapper for <see cref="DeleteAuthkitOAuthResourceAsync"/>.</summary>
409
+ public virtual Task DeleteAuthkitOAuthResource(string id, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
410
+ {
411
+ return this.DeleteAuthkitOAuthResourceAsync(id, requestOptions, cancellationToken);
412
+ }
413
+
414
  /// <summary>List CORS origins</summary>
415
  /// <remarks>
416
  /// Lists the CORS origins for the current environment.
dotnet/src/WorkOS.net/Services/UserManagement/_interfaces/UserManagementOptions.cs
dotnet/src/WorkOS.net/Services/UserManagement/_interfaces/UserManagementOptions.cs CHANGED
@@ -108,6 +108,22 @@ namespace WorkOS
108
 
109
  }
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  /// <summary>Request options for <see cref="UserManagementService.ListCorsOriginsAsync"/>: List CORS origins</summary>
112
  public class UserManagementListCorsOriginsOptions : ListOptions
113
  {
 
108
 
109
  }
110
 
111
+ /// <summary>Request options for <see cref="UserManagementService.ListAuthkitOAuthResourcesAsync"/>: List AuthKit OAuth resources</summary>
112
+ public class UserManagementListAuthkitOAuthResourcesOptions : ListOptions
113
+ {
114
+ }
115
+
116
+ /// <summary>Request options for <see cref="UserManagementService.CreateAuthkitOAuthResourceAsync"/>: Create an AuthKit OAuth resource</summary>
117
+ public class UserManagementCreateAuthkitOAuthResourceOptions : BaseOptions
118
+ {
119
+ /// <summary>The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.</summary>
120
+ public string Uri { get; set; } = default!;
121
+
122
+ /// <summary>Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.</summary>
123
+ public bool? Default { get; set; }
124
+
125
+ }
126
+
127
  /// <summary>Request options for <see cref="UserManagementService.ListCorsOriginsAsync"/>: List CORS origins</summary>
128
  public class UserManagementListCorsOriginsOptions : ListOptions
129
  {
dotnet/test/WorkOSTests/Tests/PipesServiceTest.cs
dotnet/test/WorkOSTests/Tests/PipesServiceTest.cs CHANGED
@@ -159,6 +159,40 @@ namespace WorkOSTests
159
  await this.httpMock.AssertRequestBodyContainsAsync("user_id", "test_user_id");
160
  }
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  [Fact]
163
  public async Task TestGetAccessTokenAsync()
164
  {
 
159
  await this.httpMock.AssertRequestBodyContainsAsync("user_id", "test_user_id");
160
  }
161
 
162
+ [Fact]
163
+ public async Task TestListDataIntegrationOrganizationAsync()
164
+ {
165
+ var fixture = System.IO.File.ReadAllText("testdata/data_integration.json");
166
+ this.httpMock.MockResponse(HttpMethod.Get, "/data-integrations/test_slug/organization", HttpStatusCode.OK, fixture);
167
+ var result = await this.service.ListDataIntegrationOrganizationAsync("test_slug");
168
+ Assert.NotNull(result);
169
+ Assert.Equal("data_integration_01EHZNVPK3SFK441A1RGBFSHRT", result.Id);
170
+ Assert.Equal("github", result.Slug);
171
+ Assert.Equal("github", result.IntegrationType);
172
+ this.httpMock.AssertRequestWasMade(HttpMethod.Get, "/data-integrations/test_slug/organization");
173
+ }
174
+
175
+ [Fact]
176
+ public async Task TestUpdateDataIntegrationOrganizationAsync()
177
+ {
178
+ var fixture = System.IO.File.ReadAllText("testdata/data_integration.json");
179
+ this.httpMock.MockResponse(HttpMethod.Put, "/data-integrations/test_slug/organization", HttpStatusCode.OK, fixture);
180
+ var result = await this.service.UpdateDataIntegrationOrganizationAsync("test_slug", new PipesUpdateDataIntegrationOrganizationOptions());
181
+ Assert.NotNull(result);
182
+ Assert.Equal("data_integration_01EHZNVPK3SFK441A1RGBFSHRT", result.Id);
183
+ Assert.Equal("github", result.Slug);
184
+ Assert.Equal("github", result.IntegrationType);
185
+ this.httpMock.AssertRequestWasMade(HttpMethod.Put, "/data-integrations/test_slug/organization");
186
+ }
187
+
188
+ [Fact]
189
+ public async Task TestDeleteDataIntegrationOrganizationAsync()
190
+ {
191
+ this.httpMock.MockResponse(HttpMethod.Delete, "/data-integrations/test_slug/organization", HttpStatusCode.NoContent, "");
192
+ await this.service.DeleteDataIntegrationOrganizationAsync("test_slug");
193
+ this.httpMock.AssertRequestWasMade(HttpMethod.Delete, "/data-integrations/test_slug/organization");
194
+ }
195
+
196
  [Fact]
197
  public async Task TestGetAccessTokenAsync()
198
  {
dotnet/test/WorkOSTests/Tests/UserManagementServiceTest.cs
dotnet/test/WorkOSTests/Tests/UserManagementServiceTest.cs CHANGED
@@ -107,6 +107,50 @@ namespace WorkOSTests
107
  this.httpMock.AssertRequestWasMade(HttpMethod.Post, "/user_management/sessions/revoke");
108
  }
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  [Fact]
111
  public async Task TestListCorsOriginsAsync()
112
  {
@@ -723,6 +767,38 @@ namespace WorkOSTests
723
  await this.httpMock.AssertRequestBodyContainsAsync("organization_id", "test_organization_id");
724
  }
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  [Fact]
727
  public async Task TestListCorsOriginsAutoPagingAsync()
728
  {
 
107
  this.httpMock.AssertRequestWasMade(HttpMethod.Post, "/user_management/sessions/revoke");
108
  }
109
 
110
+ [Fact]
111
+ public async Task TestListAuthkitOAuthResourcesAsync()
112
+ {
113
+ var fixture = System.IO.File.ReadAllText("testdata/list_authkit_oauth_resource.json");
114
+ this.httpMock.MockResponse(HttpMethod.Get, "/user_management/authkit_oauth_resources", HttpStatusCode.OK, fixture);
115
+ var result = await this.service.ListAuthkitOAuthResourcesAsync(new UserManagementListAuthkitOAuthResourcesOptions());
116
+ Assert.NotNull(result);
117
+ Assert.NotEmpty(result.Data);
118
+ this.httpMock.AssertRequestWasMade(HttpMethod.Get, "/user_management/authkit_oauth_resources");
119
+ }
120
+
121
+ [Fact]
122
+ public async Task TestListAuthkitOAuthResourcesAsyncEmpty()
123
+ {
124
+ this.httpMock.MockResponse(HttpMethod.Get, "/user_management/authkit_oauth_resources", HttpStatusCode.OK, "{\"data\":[],\"list_metadata\":{\"before\":null,\"after\":null}}");
125
+ var result = await this.service.ListAuthkitOAuthResourcesAsync(new UserManagementListAuthkitOAuthResourcesOptions());
126
+ Assert.NotNull(result);
127
+ Assert.Empty(result.Data);
128
+ }
129
+
130
+ [Fact]
131
+ public async Task TestCreateAuthkitOAuthResourceAsync()
132
+ {
133
+ var fixture = System.IO.File.ReadAllText("testdata/authkit_oauth_resource.json");
134
+ this.httpMock.MockResponse(HttpMethod.Post, "/user_management/authkit_oauth_resources", HttpStatusCode.OK, fixture);
135
+ var options = new UserManagementCreateAuthkitOAuthResourceOptions();
136
+ options.Uri = "test_uri";
137
+ var result = await this.service.CreateAuthkitOAuthResourceAsync(options);
138
+ Assert.NotNull(result);
139
+ Assert.Equal("authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT", result.Id);
140
+ Assert.Equal("https://api.example.com", result.Uri);
141
+ Assert.Equal("2026-01-15T12:00:00.000Z", result.CreatedAt);
142
+ this.httpMock.AssertRequestWasMade(HttpMethod.Post, "/user_management/authkit_oauth_resources");
143
+ await this.httpMock.AssertRequestBodyContainsAsync("uri", "test_uri");
144
+ }
145
+
146
+ [Fact]
147
+ public async Task TestDeleteAuthkitOAuthResourceAsync()
148
+ {
149
+ this.httpMock.MockResponse(HttpMethod.Delete, "/user_management/authkit_oauth_resources/test_id", HttpStatusCode.NoContent, "");
150
+ await this.service.DeleteAuthkitOAuthResourceAsync("test_id");
151
+ this.httpMock.AssertRequestWasMade(HttpMethod.Delete, "/user_management/authkit_oauth_resources/test_id");
152
+ }
153
+
154
  [Fact]
155
  public async Task TestListCorsOriginsAsync()
156
  {
 
767
  await this.httpMock.AssertRequestBodyContainsAsync("organization_id", "test_organization_id");
768
  }
769
 
770
+ [Fact]
771
+ public async Task TestListAuthkitOAuthResourcesAutoPagingAsync()
772
+ {
773
+ var fixture = System.IO.File.ReadAllText("testdata/authkit_oauth_resource.json");
774
+ var page1 = "{\"data\":[" + fixture + "],\"list_metadata\":{\"before\":null,\"after\":\"cursor_123\"}}";
775
+ var page2 = "{\"data\":[" + fixture + "],\"list_metadata\":{\"before\":null,\"after\":null}}";
776
+ this.httpMock.MockSequentialResponses(HttpMethod.Get, "/user_management/authkit_oauth_resources", HttpStatusCode.OK, new[] { page1, page2 });
777
+
778
+ var items = new List<AuthkitOAuthResource>();
779
+ await foreach (var item in this.service.ListAuthkitOAuthResourcesAutoPagingAsync(new UserManagementListAuthkitOAuthResourcesOptions()))
780
+ {
781
+ items.Add(item);
782
+ }
783
+
784
+ Assert.Equal(2, items.Count);
785
+ }
786
+
787
+ [Fact]
788
+ public async Task TestListAuthkitOAuthResourcesAutoPagingAsyncEmpty()
789
+ {
790
+ var empty = "{\"data\":[],\"list_metadata\":{\"before\":null,\"after\":null}}";
791
+ this.httpMock.MockSequentialResponses(HttpMethod.Get, "/user_management/authkit_oauth_resources", HttpStatusCode.OK, new[] { empty });
792
+
793
+ var items = new List<AuthkitOAuthResource>();
794
+ await foreach (var item in this.service.ListAuthkitOAuthResourcesAutoPagingAsync(new UserManagementListAuthkitOAuthResourcesOptions()))
795
+ {
796
+ items.Add(item);
797
+ }
798
+
799
+ Assert.Empty(items);
800
+ }
801
+
802
  [Fact]
803
  public async Task TestListCorsOriginsAutoPagingAsync()
804
  {
dotnet/test/WorkOSTests/testdata/account_selection_required_error.json
dotnet/test/WorkOSTests/testdata/account_selection_required_error.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "code": "account_selection_required",
3
+ "message": "Several connected accounts match this user for this provider. Name one with a connected account id."
4
+ }
dotnet/test/WorkOSTests/testdata/authkit_oauth_resource.json
dotnet/test/WorkOSTests/testdata/authkit_oauth_resource.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "authkit_oauth_resource",
3
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "uri": "https://api.example.com",
5
+ "default": false,
6
+ "created_at": "2026-01-15T12:00:00.000Z",
7
+ "updated_at": "2026-01-15T12:00:00.000Z"
8
+ }
dotnet/test/WorkOSTests/testdata/create_authkit_oauth_resource.json
dotnet/test/WorkOSTests/testdata/create_authkit_oauth_resource.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "uri": "https://api.example.com",
3
+ "default": false
4
+ }
dotnet/test/WorkOSTests/testdata/create_authkit_oauth_resource_nulls.json
dotnet/test/WorkOSTests/testdata/create_authkit_oauth_resource_nulls.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "uri": "https://api.example.com",
3
+ "default": null
4
+ }
dotnet/test/WorkOSTests/testdata/create_data_integration.json
dotnet/test/WorkOSTests/testdata/create_data_integration.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "provider": "github",
 
3
  "description": "Production GitHub app",
4
  "enabled": true,
5
  "scopes": [
 
1
  {
2
  "provider": "github",
3
+ "ownership": "user",
4
  "description": "Production GitHub app",
5
  "enabled": true,
6
  "scopes": [
dotnet/test/WorkOSTests/testdata/create_data_integration_nulls.json
dotnet/test/WorkOSTests/testdata/create_data_integration_nulls.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "provider": "github",
 
3
  "description": null,
4
  "enabled": null,
5
  "scopes": null,
 
1
  {
2
  "provider": "github",
3
+ "ownership": null,
4
  "description": null,
5
  "enabled": null,
6
  "scopes": null,
dotnet/test/WorkOSTests/testdata/data_integration.json
dotnet/test/WorkOSTests/testdata/data_integration.json CHANGED
@@ -3,6 +3,7 @@
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
 
6
  "description": "Production GitHub app",
7
  "enabled": true,
8
  "state": "valid",
 
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
6
+ "ownership": "user",
7
  "description": "Production GitHub app",
8
  "enabled": true,
9
  "state": "valid",
dotnet/test/WorkOSTests/testdata/data_integration_installation_nulls.json
dotnet/test/WorkOSTests/testdata/data_integration_installation_nulls.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
3
- "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "organization_id": null,
5
  "api_key_last_4": null
6
  }
 
1
  {
2
  "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
3
+ "user_id": null,
4
  "organization_id": null,
5
  "api_key_last_4": null
6
  }
dotnet/test/WorkOSTests/testdata/data_integration_nulls.json
dotnet/test/WorkOSTests/testdata/data_integration_nulls.json CHANGED
@@ -3,6 +3,7 @@
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
 
6
  "description": null,
7
  "enabled": true,
8
  "state": "valid",
 
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
6
+ "ownership": "user",
7
  "description": null,
8
  "enabled": true,
9
  "state": "valid",
dotnet/test/WorkOSTests/testdata/data_integrations_get_user_token_request.json
dotnet/test/WorkOSTests/testdata/data_integrations_get_user_token_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
dotnet/test/WorkOSTests/testdata/data_integrations_get_user_token_request_nulls.json
dotnet/test/WorkOSTests/testdata/data_integrations_get_user_token_request_nulls.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
4
- "connected_account_id": null
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
4
+ "connected_account_id": null,
5
+ "connection_owner": null,
6
+ "supports_multiple_connections": null
7
  }
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_api_key_request.json
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_api_key_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "secret": "sk-1234567890abcdef"
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "secret": "sk-1234567890abcdef"
7
  }
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_api_key_request_nulls.json
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_api_key_request_nulls.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
 
 
4
  "secret": "sk-1234567890abcdef"
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
4
+ "connected_account_id": null,
5
+ "connection_owner": null,
6
  "secret": "sk-1234567890abcdef"
7
  }
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_client_credentials_request.json
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_client_credentials_request.json CHANGED
@@ -1,6 +1,8 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "client_id": "3MVG9...",
5
  "client_secret": "shhh-secret",
6
  "config": {
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "client_id": "3MVG9...",
7
  "client_secret": "shhh-secret",
8
  "config": {
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_client_credentials_request_nulls.json
dotnet/test/WorkOSTests/testdata/data_integrations_upsert_client_credentials_request_nulls.json CHANGED
@@ -1,6 +1,8 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
 
 
4
  "client_id": "3MVG9...",
5
  "client_secret": "shhh-secret",
6
  "config": null
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
4
+ "connected_account_id": null,
5
+ "connection_owner": null,
6
  "client_id": "3MVG9...",
7
  "client_secret": "shhh-secret",
8
  "config": null
dotnet/test/WorkOSTests/testdata/data_integrations_vend_credentials_request.json
dotnet/test/WorkOSTests/testdata/data_integrations_vend_credentials_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
dotnet/test/WorkOSTests/testdata/data_integrations_vend_credentials_request_nulls.json
dotnet/test/WorkOSTests/testdata/data_integrations_vend_credentials_request_nulls.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
4
- "connected_account_id": null
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": null,
4
+ "connected_account_id": null,
5
+ "connection_owner": null,
6
+ "supports_multiple_connections": null
7
  }
dotnet/test/WorkOSTests/testdata/list_authkit_oauth_resource.json
dotnet/test/WorkOSTests/testdata/list_authkit_oauth_resource.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [
3
+ {
4
+ "object": "authkit_oauth_resource",
5
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
6
+ "uri": "https://api.example.com",
7
+ "default": false,
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": null,
14
+ "after": null
15
+ }
16
+ }
dotnet/test/WorkOSTests/testdata/list_data_integration.json
dotnet/test/WorkOSTests/testdata/list_data_integration.json CHANGED
@@ -5,6 +5,7 @@
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
 
8
  "description": "Production GitHub app",
9
  "enabled": true,
10
  "state": "valid",
 
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
8
+ "ownership": "user",
9
  "description": "Production GitHub app",
10
  "enabled": true,
11
  "state": "valid",
dotnet/test/WorkOSTests/testdata/list_empty_authkit_oauth_resource.json
dotnet/test/WorkOSTests/testdata/list_empty_authkit_oauth_resource.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [],
3
+ "list_metadata": {
4
+ "before": null,
5
+ "after": null
6
+ }
7
+ }

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

code: 17 · tests: 2 · manifest: 1

go/.oagen-manifest.json
go/.oagen-manifest.json CHANGED
@@ -47,6 +47,7 @@
47
  "sso.go",
48
  "sso_test.go",
49
  "testdata/access_token_agent_registration_credential_issued_data_detail.json",
 
50
  "testdata/action_authentication_denied.json",
51
  "testdata/action_authentication_denied_data.json",
52
  "testdata/action_user_registration_denied.json",
@@ -134,7 +135,6 @@
134
  "testdata/audit_logs_retention.json",
135
  "testdata/auth_method_mismatch_error.json",
136
  "testdata/authenticate_response.json",
137
- "testdata/authenticate_response_impersonator.json",
138
  "testdata/authenticate_response_oauth_token.json",
139
  "testdata/authentication_challenge.json",
140
  "testdata/authentication_challenge_verify_response.json",
@@ -183,6 +183,7 @@
183
  "testdata/authentication_sso_succeeded_data.json",
184
  "testdata/authentication_sso_timed_out.json",
185
  "testdata/authentication_sso_timed_out_data.json",
 
186
  "testdata/authorization_check.json",
187
  "testdata/authorization_code_session_authenticate_request.json",
188
  "testdata/authorization_permission.json",
@@ -195,7 +196,6 @@
195
  "testdata/client_api_token.json",
196
  "testdata/client_api_token_response.json",
197
  "testdata/configure_data_integration_body.json",
198
- "testdata/confirm_email_change.json",
199
  "testdata/connect_application.json",
200
  "testdata/connect_application_m2m.json",
201
  "testdata/connect_application_oauth.json",
@@ -222,6 +222,7 @@
222
  "testdata/connection_saml_certificate_renewed_data_connection.json",
223
  "testdata/cors_origin_response.json",
224
  "testdata/create_application_secret.json",
 
225
  "testdata/create_authorization_permission.json",
226
  "testdata/create_authorization_resource.json",
227
  "testdata/create_connection.json",
@@ -380,6 +381,7 @@
380
  "testdata/list_audit_log_action.json",
381
  "testdata/list_audit_log_schema.json",
382
  "testdata/list_authentication_factor.json",
 
383
  "testdata/list_authorization_permission.json",
384
  "testdata/list_authorization_resource.json",
385
  "testdata/list_authorized_connect_application_list_data.json",
@@ -559,7 +561,6 @@
559
  "testdata/user_role_assignment_resource.json",
560
  "testdata/user_role_assignment_source.json",
561
  "testdata/user_sessions_impersonator.json",
562
- "testdata/user_sessions_list_item.json",
563
  "testdata/user_updated.json",
564
  "testdata/validate_api_key.json",
565
  "testdata/vault_byok_key_deleted.json",
@@ -610,6 +611,34 @@
610
  "workos.go"
611
  ],
612
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  "PATCH /agents/claims/attempts": {
614
  "sdkMethod": "UpdateAttempts",
615
  "service": "agents"
@@ -622,6 +651,30 @@
622
  "sdkMethod": "GetRegistration",
623
  "service": "agents"
624
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
625
  "POST /auth/challenges/{id}/verify": {
626
  "sdkMethod": "VerifyChallenge",
627
  "service": "multi_factor_auth"
@@ -866,10 +919,54 @@
866
  "sdkMethod": "ListConnections",
867
  "service": "sso"
868
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
869
  "GET /connections/{id}": {
870
  "sdkMethod": "GetConnection",
871
  "service": "sso"
872
  },
 
 
 
 
873
  "DELETE /connections/{id}": {
874
  "sdkMethod": "DeleteConnection",
875
  "service": "sso"
@@ -902,10 +999,26 @@
902
  "sdkMethod": "AuthorizeDataIntegration",
903
  "service": "pipes"
904
  },
 
 
 
 
905
  "POST /data-integrations/{slug}/credentials": {
906
  "sdkMethod": "CreateDataIntegrationCredential",
907
  "service": "pipes"
908
  },
 
 
 
 
 
 
 
 
 
 
 
 
909
  "POST /data-integrations/{provider}/token": {
910
  "sdkMethod": "GetAccessToken",
911
  "service": "pipes"
@@ -1074,6 +1187,34 @@
1074
  "sdkMethod": "ListAuthorizedApplications",
1075
  "service": "organizations"
1076
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1077
  "POST /portal/generate_link": {
1078
  "sdkMethod": "GenerateLink",
1079
  "service": "admin_portal"
@@ -1146,6 +1287,18 @@
1146
  "sdkMethod": "RevokeSession",
1147
  "service": "user_management"
1148
  },
 
 
 
 
 
 
 
 
 
 
 
 
1149
  "GET /user_management/cors_origins": {
1150
  "sdkMethod": "ListCORSOrigins",
1151
  "service": "user_management"
@@ -1346,6 +1499,34 @@
1346
  "sdkMethod": "CreateUserAuthFactor",
1347
  "service": "multi_factor_auth"
1348
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1349
  "POST /vault/v1/keys/data-key": {
1350
  "sdkMethod": "CreateDataKey",
1351
  "service": "vault"
@@ -1453,162 +1634,6 @@
1453
  "GET /audit_logs/exports/{auditLogExportId}": {
1454
  "sdkMethod": "GetExport",
1455
  "service": "audit_logs"
1456
- },
1457
- "PUT /data-integrations/{slug}/client-credentials": {
1458
- "sdkMethod": "UpdateDataIntegrationClientCredentials",
1459
- "service": "pipes"
1460
- },
1461
- "GET /agents/blueprints": {
1462
- "sdkMethod": "ListBlueprints",
1463
- "service": "agents"
1464
- },
1465
- "POST /agents/blueprints": {
1466
- "sdkMethod": "CreateBlueprint",
1467
- "service": "agents"
1468
- },
1469
- "GET /agents/blueprints/{agent_blueprint_id}": {
1470
- "sdkMethod": "GetBlueprint",
1471
- "service": "agents"
1472
- },
1473
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
1474
- "sdkMethod": "UpdateBlueprint",
1475
- "service": "agents"
1476
- },
1477
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
1478
- "sdkMethod": "DeleteBlueprint",
1479
- "service": "agents"
1480
- },
1481
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1482
- "sdkMethod": "CreateBlueprintToken",
1483
- "service": "agents"
1484
- },
1485
- "GET /agents/instances": {
1486
- "sdkMethod": "ListInstances",
1487
- "service": "agents"
1488
- },
1489
- "GET /agents/instances/{agent_instance_id}": {
1490
- "sdkMethod": "GetInstance",
1491
- "service": "agents"
1492
- },
1493
- "DELETE /agents/instances/{agent_instance_id}": {
1494
- "sdkMethod": "DeleteInstance",
1495
- "service": "agents"
1496
- },
1497
- "GET /agents/sessions": {
1498
- "sdkMethod": "ListSessions",
1499
- "service": "agents"
1500
- },
1501
- "GET /agents/sessions/{agent_instance_session_id}": {
1502
- "sdkMethod": "GetSession",
1503
- "service": "agents"
1504
- },
1505
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1506
- "sdkMethod": "RevokeSession",
1507
- "service": "agents"
1508
- },
1509
- "POST /connections": {
1510
- "sdkMethod": "CreateConnection",
1511
- "service": "sso"
1512
- },
1513
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
1514
- "sdkMethod": "ListConnectionSAMLIdpSigningCerts",
1515
- "service": "sso"
1516
- },
1517
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
1518
- "sdkMethod": "CreateConnectionSAMLIdpSigningCert",
1519
- "service": "sso"
1520
- },
1521
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1522
- "sdkMethod": "DeleteConnectionSAMLIdpSigningCert",
1523
- "service": "sso"
1524
- },
1525
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1526
- "sdkMethod": "ListConnectionSAMLSpEncryptionCerts",
1527
- "service": "sso"
1528
- },
1529
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1530
- "sdkMethod": "CreateConnectionSAMLSpEncryptionCert",
1531
- "service": "sso"
1532
- },
1533
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1534
- "sdkMethod": "DeleteConnectionSAMLSpEncryptionCert",
1535
- "service": "sso"
1536
- },
1537
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
1538
- "sdkMethod": "ListConnectionSAMLSpSigningCert",
1539
- "service": "sso"
1540
- },
1541
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
1542
- "sdkMethod": "CreateConnectionSAMLSpSigningCert",
1543
- "service": "sso"
1544
- },
1545
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1546
- "sdkMethod": "DeleteConnectionSAMLSpSigningCert",
1547
- "service": "sso"
1548
- },
1549
- "PATCH /connections/{id}": {
1550
- "sdkMethod": "UpdateConnection",
1551
- "service": "sso"
1552
- },
1553
- "GET /organizations/{organization_id}/it_contacts": {
1554
- "sdkMethod": "ListItContacts",
1555
- "service": "organizations"
1556
- },
1557
- "POST /organizations/{organization_id}/it_contacts": {
1558
- "sdkMethod": "CreateItContact",
1559
- "service": "organizations"
1560
- },
1561
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1562
- "sdkMethod": "DeleteItContact",
1563
- "service": "organizations"
1564
- },
1565
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1566
- "sdkMethod": "InviteItContact",
1567
- "service": "organizations"
1568
- },
1569
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1570
- "sdkMethod": "RevokeItContact",
1571
- "service": "organizations"
1572
- },
1573
- "POST /platform/teams": {
1574
- "sdkMethod": "CreateTeam",
1575
- "service": "platform_teams"
1576
- },
1577
- "GET /platform/teams/{team_id}": {
1578
- "sdkMethod": "GetTeam",
1579
- "service": "platform_teams"
1580
- },
1581
- "DELETE /user_management/waitlist_entries/{id}": {
1582
- "sdkMethod": "DeleteWaitlistEntry",
1583
- "service": "user_management"
1584
- },
1585
- "POST /user_management/waitlist_entries/{id}/approve": {
1586
- "sdkMethod": "CreateWaitlistEntryApprove",
1587
- "service": "user_management"
1588
- },
1589
- "POST /user_management/waitlist_entries/{id}/deny": {
1590
- "sdkMethod": "CreateWaitlistEntryDeny",
1591
- "service": "user_management"
1592
- },
1593
- "GET /user_management/waitlists": {
1594
- "sdkMethod": "ListWaitlists",
1595
- "service": "user_management"
1596
- },
1597
- "GET /user_management/waitlists/{id}": {
1598
- "sdkMethod": "GetWaitlist",
1599
- "service": "user_management"
1600
- },
1601
- "GET /user_management/waitlists/{id}/entries": {
1602
- "sdkMethod": "ListWaitlistEntries",
1603
- "service": "user_management"
1604
- },
1605
- "POST /user_management/waitlists/{id}/entries": {
1606
- "sdkMethod": "CreateWaitlistEntry",
1607
- "service": "user_management"
1608
- },
1609
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1610
- "sdkMethod": "ValidateBlueprintToken",
1611
- "service": "agents"
1612
  }
1613
  }
1614
  }
 
47
  "sso.go",
48
  "sso_test.go",
49
  "testdata/access_token_agent_registration_credential_issued_data_detail.json",
50
+ "testdata/account_selection_required_error.json",
51
  "testdata/action_authentication_denied.json",
52
  "testdata/action_authentication_denied_data.json",
53
  "testdata/action_user_registration_denied.json",
 
135
  "testdata/audit_logs_retention.json",
136
  "testdata/auth_method_mismatch_error.json",
137
  "testdata/authenticate_response.json",
 
138
  "testdata/authenticate_response_oauth_token.json",
139
  "testdata/authentication_challenge.json",
140
  "testdata/authentication_challenge_verify_response.json",
 
183
  "testdata/authentication_sso_succeeded_data.json",
184
  "testdata/authentication_sso_timed_out.json",
185
  "testdata/authentication_sso_timed_out_data.json",
186
+ "testdata/authkit_oauth_resource.json",
187
  "testdata/authorization_check.json",
188
  "testdata/authorization_code_session_authenticate_request.json",
189
  "testdata/authorization_permission.json",
 
196
  "testdata/client_api_token.json",
197
  "testdata/client_api_token_response.json",
198
  "testdata/configure_data_integration_body.json",
 
199
  "testdata/connect_application.json",
200
  "testdata/connect_application_m2m.json",
201
  "testdata/connect_application_oauth.json",
 
222
  "testdata/connection_saml_certificate_renewed_data_connection.json",
223
  "testdata/cors_origin_response.json",
224
  "testdata/create_application_secret.json",
225
+ "testdata/create_authkit_oauth_resource.json",
226
  "testdata/create_authorization_permission.json",
227
  "testdata/create_authorization_resource.json",
228
  "testdata/create_connection.json",
 
381
  "testdata/list_audit_log_action.json",
382
  "testdata/list_audit_log_schema.json",
383
  "testdata/list_authentication_factor.json",
384
+ "testdata/list_authkit_oauth_resource.json",
385
  "testdata/list_authorization_permission.json",
386
  "testdata/list_authorization_resource.json",
387
  "testdata/list_authorized_connect_application_list_data.json",
 
561
  "testdata/user_role_assignment_resource.json",
562
  "testdata/user_role_assignment_source.json",
563
  "testdata/user_sessions_impersonator.json",
 
564
  "testdata/user_updated.json",
565
  "testdata/validate_api_key.json",
566
  "testdata/vault_byok_key_deleted.json",
 
611
  "workos.go"
612
  ],
613
  "operations": {
614
+ "GET /agents/blueprints": {
615
+ "sdkMethod": "ListBlueprints",
616
+ "service": "agents"
617
+ },
618
+ "POST /agents/blueprints": {
619
+ "sdkMethod": "CreateBlueprint",
620
+ "service": "agents"
621
+ },
622
+ "GET /agents/blueprints/{agent_blueprint_id}": {
623
+ "sdkMethod": "GetBlueprint",
624
+ "service": "agents"
625
+ },
626
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
627
+ "sdkMethod": "UpdateBlueprint",
628
+ "service": "agents"
629
+ },
630
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
631
+ "sdkMethod": "DeleteBlueprint",
632
+ "service": "agents"
633
+ },
634
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
635
+ "sdkMethod": "CreateBlueprintToken",
636
+ "service": "agents"
637
+ },
638
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
639
+ "sdkMethod": "ValidateBlueprintToken",
640
+ "service": "agents"
641
+ },
642
  "PATCH /agents/claims/attempts": {
643
  "sdkMethod": "UpdateAttempts",
644
  "service": "agents"
 
651
  "sdkMethod": "GetRegistration",
652
  "service": "agents"
653
  },
654
+ "GET /agents/instances": {
655
+ "sdkMethod": "ListInstances",
656
+ "service": "agents"
657
+ },
658
+ "GET /agents/instances/{agent_instance_id}": {
659
+ "sdkMethod": "GetInstance",
660
+ "service": "agents"
661
+ },
662
+ "DELETE /agents/instances/{agent_instance_id}": {
663
+ "sdkMethod": "DeleteInstance",
664
+ "service": "agents"
665
+ },
666
+ "GET /agents/sessions": {
667
+ "sdkMethod": "ListSessions",
668
+ "service": "agents"
669
+ },
670
+ "GET /agents/sessions/{agent_instance_session_id}": {
671
+ "sdkMethod": "GetSession",
672
+ "service": "agents"
673
+ },
674
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
675
+ "sdkMethod": "RevokeSession",
676
+ "service": "agents"
677
+ },
678
  "POST /auth/challenges/{id}/verify": {
679
  "sdkMethod": "VerifyChallenge",
680
  "service": "multi_factor_auth"
 
919
  "sdkMethod": "ListConnections",
920
  "service": "sso"
921
  },
922
+ "POST /connections": {
923
+ "sdkMethod": "CreateConnection",
924
+ "service": "sso"
925
+ },
926
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
927
+ "sdkMethod": "ListConnectionSAMLIdpSigningCerts",
928
+ "service": "sso"
929
+ },
930
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
931
+ "sdkMethod": "CreateConnectionSAMLIdpSigningCert",
932
+ "service": "sso"
933
+ },
934
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
935
+ "sdkMethod": "DeleteConnectionSAMLIdpSigningCert",
936
+ "service": "sso"
937
+ },
938
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
939
+ "sdkMethod": "ListConnectionSAMLSpEncryptionCerts",
940
+ "service": "sso"
941
+ },
942
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
943
+ "sdkMethod": "CreateConnectionSAMLSpEncryptionCert",
944
+ "service": "sso"
945
+ },
946
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
947
+ "sdkMethod": "DeleteConnectionSAMLSpEncryptionCert",
948
+ "service": "sso"
949
+ },
950
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
951
+ "sdkMethod": "ListConnectionSAMLSpSigningCert",
952
+ "service": "sso"
953
+ },
954
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
955
+ "sdkMethod": "CreateConnectionSAMLSpSigningCert",
956
+ "service": "sso"
957
+ },
958
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
959
+ "sdkMethod": "DeleteConnectionSAMLSpSigningCert",
960
+ "service": "sso"
961
+ },
962
  "GET /connections/{id}": {
963
  "sdkMethod": "GetConnection",
964
  "service": "sso"
965
  },
966
+ "PATCH /connections/{id}": {
967
+ "sdkMethod": "UpdateConnection",
968
+ "service": "sso"
969
+ },
970
  "DELETE /connections/{id}": {
971
  "sdkMethod": "DeleteConnection",
972
  "service": "sso"
 
999
  "sdkMethod": "AuthorizeDataIntegration",
1000
  "service": "pipes"
1001
  },
1002
+ "PUT /data-integrations/{slug}/client-credentials": {
1003
+ "sdkMethod": "UpdateDataIntegrationClientCredentials",
1004
+ "service": "pipes"
1005
+ },
1006
  "POST /data-integrations/{slug}/credentials": {
1007
  "sdkMethod": "CreateDataIntegrationCredential",
1008
  "service": "pipes"
1009
  },
1010
+ "GET /data-integrations/{slug}/organization": {
1011
+ "sdkMethod": "ListDataIntegrationOrganization",
1012
+ "service": "pipes"
1013
+ },
1014
+ "PUT /data-integrations/{slug}/organization": {
1015
+ "sdkMethod": "UpdateDataIntegrationOrganization",
1016
+ "service": "pipes"
1017
+ },
1018
+ "DELETE /data-integrations/{slug}/organization": {
1019
+ "sdkMethod": "DeleteDataIntegrationOrganization",
1020
+ "service": "pipes"
1021
+ },
1022
  "POST /data-integrations/{provider}/token": {
1023
  "sdkMethod": "GetAccessToken",
1024
  "service": "pipes"
 
1187
  "sdkMethod": "ListAuthorizedApplications",
1188
  "service": "organizations"
1189
  },
1190
+ "GET /organizations/{organization_id}/it_contacts": {
1191
+ "sdkMethod": "ListItContacts",
1192
+ "service": "organizations"
1193
+ },
1194
+ "POST /organizations/{organization_id}/it_contacts": {
1195
+ "sdkMethod": "CreateItContact",
1196
+ "service": "organizations"
1197
+ },
1198
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1199
+ "sdkMethod": "DeleteItContact",
1200
+ "service": "organizations"
1201
+ },
1202
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1203
+ "sdkMethod": "InviteItContact",
1204
+ "service": "organizations"
1205
+ },
1206
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1207
+ "sdkMethod": "RevokeItContact",
1208
+ "service": "organizations"
1209
+ },
1210
+ "POST /platform/teams": {
1211
+ "sdkMethod": "CreateTeam",
1212
+ "service": "platform_teams"
1213
+ },
1214
+ "GET /platform/teams/{team_id}": {
1215
+ "sdkMethod": "GetTeam",
1216
+ "service": "platform_teams"
1217
+ },
1218
  "POST /portal/generate_link": {
1219
  "sdkMethod": "GenerateLink",
1220
  "service": "admin_portal"
 
1287
  "sdkMethod": "RevokeSession",
1288
  "service": "user_management"
1289
  },
1290
+ "GET /user_management/authkit_oauth_resources": {
1291
+ "sdkMethod": "ListAuthkitOAuthResources",
1292
+ "service": "user_management"
1293
+ },
1294
+ "POST /user_management/authkit_oauth_resources": {
1295
+ "sdkMethod": "CreateAuthkitOAuthResource",
1296
+ "service": "user_management"
1297
+ },
1298
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
1299
+ "sdkMethod": "DeleteAuthkitOAuthResource",
1300
+ "service": "user_management"
1301
+ },
1302
  "GET /user_management/cors_origins": {
1303
  "sdkMethod": "ListCORSOrigins",
1304
  "service": "user_management"
 
1499
  "sdkMethod": "CreateUserAuthFactor",
1500
  "service": "multi_factor_auth"
1501
  },
1502
+ "DELETE /user_management/waitlist_entries/{id}": {
1503
+ "sdkMethod": "DeleteWaitlistEntry",
1504
+ "service": "user_management"
1505
+ },
1506
+ "POST /user_management/waitlist_entries/{id}/approve": {
1507
+ "sdkMethod": "CreateWaitlistEntryApprove",
1508
+ "service": "user_management"
1509
+ },
1510
+ "POST /user_management/waitlist_entries/{id}/deny": {
1511
+ "sdkMethod": "CreateWaitlistEntryDeny",
1512
+ "service": "user_management"
1513
+ },
1514
+ "GET /user_management/waitlists": {
1515
+ "sdkMethod": "ListWaitlists",
1516
+ "service": "user_management"
1517
+ },
1518
+ "GET /user_management/waitlists/{id}": {
1519
+ "sdkMethod": "GetWaitlist",
1520
+ "service": "user_management"
1521
+ },
1522
+ "GET /user_management/waitlists/{id}/entries": {
1523
+ "sdkMethod": "ListWaitlistEntries",
1524
+ "service": "user_management"
1525
+ },
1526
+ "POST /user_management/waitlists/{id}/entries": {
1527
+ "sdkMethod": "CreateWaitlistEntry",
1528
+ "service": "user_management"
1529
+ },
1530
  "POST /vault/v1/keys/data-key": {
1531
  "sdkMethod": "CreateDataKey",
1532
  "service": "vault"
 
1634
  "GET /audit_logs/exports/{auditLogExportId}": {
1635
  "sdkMethod": "GetExport",
1636
  "service": "audit_logs"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1637
  }
1638
  }
1639
  }
go/admin_portal.go
go/admin_portal.go CHANGED
@@ -13,9 +13,9 @@ type AdminPortalService struct {
13
 
14
  // AdminPortalGenerateLinkParams contains the parameters for GenerateLink.
15
  type AdminPortalGenerateLinkParams struct {
16
- // ReturnURL is the URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
17
  ReturnURL *string `json:"return_url,omitempty" url:"-"`
18
- // SuccessURL is the URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
19
  SuccessURL *string `json:"success_url,omitempty" url:"-"`
20
  // Organization is an [Organization](https://workos.com/docs/reference/organization) identifier.
21
  Organization string `json:"organization" url:"-"`
 
13
 
14
  // AdminPortalGenerateLinkParams contains the parameters for GenerateLink.
15
  type AdminPortalGenerateLinkParams struct {
16
+ // ReturnURL is the URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
17
  ReturnURL *string `json:"return_url,omitempty" url:"-"`
18
+ // SuccessURL is the URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
19
  SuccessURL *string `json:"success_url,omitempty" url:"-"`
20
  // Organization is an [Organization](https://workos.com/docs/reference/organization) identifier.
21
  Organization string `json:"organization" url:"-"`
go/enums.go
go/enums.go CHANGED
@@ -111,6 +111,14 @@ const (
111
  CustomProviderDefinitionAuthenticateViaBasicAuthHeader CustomProviderDefinitionAuthenticateVia = "basic_auth_header"
112
  )
113
 
 
 
 
 
 
 
 
 
114
  // CreateDataIntegrationAuthMethods is an alias for ConnectedAccountAuthMethod.
115
  type CreateDataIntegrationAuthMethods = ConnectedAccountAuthMethod
116
 
@@ -919,6 +927,7 @@ const (
919
  ResourceExportCompletedDataResourceTypeEvents ResourceExportCompletedDataResourceType = "events"
920
  ResourceExportCompletedDataResourceTypeSessions ResourceExportCompletedDataResourceType = "sessions"
921
  ResourceExportCompletedDataResourceTypeAuditLogEvents ResourceExportCompletedDataResourceType = "auditLogEvents"
 
922
  )
923
 
924
  // ResourceExportCreatedDataResourceType is an alias for ResourceExportCompletedDataResourceType.
@@ -1008,6 +1017,9 @@ const (
1008
  DataIntegrationCredentialsCredentialsTypeOrganization DataIntegrationCredentialsCredentialsType = "organization"
1009
  )
1010
 
 
 
 
1011
  // DataIntegrationState represents data integration state values.
1012
  type DataIntegrationState string
1013
 
@@ -1215,6 +1227,15 @@ const (
1215
  AuthenticationFactorsCreateRequestTypeTOTP AuthenticationFactorsCreateRequestType = "totp"
1216
  )
1217
 
 
 
 
 
 
 
 
 
 
1218
  // RadarStandaloneAssessRequestAuthMethod represents radar standalone assess request auth method values.
1219
  type RadarStandaloneAssessRequestAuthMethod string
1220
 
@@ -1268,6 +1289,9 @@ type UserSessionsAuthMethod = SessionCreatedDataAuthMethod
1268
  // UserSessionsStatus is an alias for AgentInstanceSessionStatus.
1269
  type UserSessionsStatus = AgentInstanceSessionStatus
1270
 
 
 
 
1271
  // DataIntegrationsListResponseDataConnectedAccountAuthMethod is an alias for ConnectedAccountAuthMethod.
1272
  type DataIntegrationsListResponseDataConnectedAccountAuthMethod = ConnectedAccountAuthMethod
1273
 
@@ -1343,6 +1367,9 @@ const (
1343
  ConnectionsConnectionTypeXeroOAuth ConnectionsConnectionType = "XeroOAuth"
1344
  )
1345
 
 
 
 
1346
  // RadarListType represents radar list type values.
1347
  type RadarListType string
1348
 
 
111
  CustomProviderDefinitionAuthenticateViaBasicAuthHeader CustomProviderDefinitionAuthenticateVia = "basic_auth_header"
112
  )
113
 
114
+ // CreateDataIntegrationOwnership represents create data integration ownership values.
115
+ type CreateDataIntegrationOwnership string
116
+
117
+ const (
118
+ CreateDataIntegrationOwnershipUser CreateDataIntegrationOwnership = "user"
119
+ CreateDataIntegrationOwnershipOrganization CreateDataIntegrationOwnership = "organization"
120
+ )
121
+
122
  // CreateDataIntegrationAuthMethods is an alias for ConnectedAccountAuthMethod.
123
  type CreateDataIntegrationAuthMethods = ConnectedAccountAuthMethod
124
 
 
927
  ResourceExportCompletedDataResourceTypeEvents ResourceExportCompletedDataResourceType = "events"
928
  ResourceExportCompletedDataResourceTypeSessions ResourceExportCompletedDataResourceType = "sessions"
929
  ResourceExportCompletedDataResourceTypeAuditLogEvents ResourceExportCompletedDataResourceType = "auditLogEvents"
930
+ ResourceExportCompletedDataResourceTypeConnections ResourceExportCompletedDataResourceType = "connections"
931
  )
932
 
933
  // ResourceExportCreatedDataResourceType is an alias for ResourceExportCompletedDataResourceType.
 
1017
  DataIntegrationCredentialsCredentialsTypeOrganization DataIntegrationCredentialsCredentialsType = "organization"
1018
  )
1019
 
1020
+ // DataIntegrationOwnership is an alias for CreateDataIntegrationOwnership.
1021
+ type DataIntegrationOwnership = CreateDataIntegrationOwnership
1022
+
1023
  // DataIntegrationState represents data integration state values.
1024
  type DataIntegrationState string
1025
 
 
1227
  AuthenticationFactorsCreateRequestTypeTOTP AuthenticationFactorsCreateRequestType = "totp"
1228
  )
1229
 
1230
+ // DataIntegrationsUpsertAPIKeyRequestConnectionOwner is an alias for CreateDataIntegrationOwnership.
1231
+ type DataIntegrationsUpsertAPIKeyRequestConnectionOwner = CreateDataIntegrationOwnership
1232
+
1233
+ // DataIntegrationsUpsertClientCredentialsRequestConnectionOwner is an alias for CreateDataIntegrationOwnership.
1234
+ type DataIntegrationsUpsertClientCredentialsRequestConnectionOwner = CreateDataIntegrationOwnership
1235
+
1236
+ // DataIntegrationsVendCredentialsRequestConnectionOwner is an alias for CreateDataIntegrationOwnership.
1237
+ type DataIntegrationsVendCredentialsRequestConnectionOwner = CreateDataIntegrationOwnership
1238
+
1239
  // RadarStandaloneAssessRequestAuthMethod represents radar standalone assess request auth method values.
1240
  type RadarStandaloneAssessRequestAuthMethod string
1241
 
 
1289
  // UserSessionsStatus is an alias for AgentInstanceSessionStatus.
1290
  type UserSessionsStatus = AgentInstanceSessionStatus
1291
 
1292
+ // DataIntegrationsGetUserTokenRequestConnectionOwner is an alias for CreateDataIntegrationOwnership.
1293
+ type DataIntegrationsGetUserTokenRequestConnectionOwner = CreateDataIntegrationOwnership
1294
+
1295
  // DataIntegrationsListResponseDataConnectedAccountAuthMethod is an alias for ConnectedAccountAuthMethod.
1296
  type DataIntegrationsListResponseDataConnectedAccountAuthMethod = ConnectedAccountAuthMethod
1297
 
 
1367
  ConnectionsConnectionTypeXeroOAuth ConnectionsConnectionType = "XeroOAuth"
1368
  )
1369
 
1370
+ // PipesOwnership is an alias for CreateDataIntegrationOwnership.
1371
+ type PipesOwnership = CreateDataIntegrationOwnership
1372
+
1373
  // RadarListType represents radar list type values.
1374
  type RadarListType string
1375
 
go/models.go
go/models.go CHANGED
@@ -780,7 +780,7 @@ type AuditLogExport struct {
780
 
781
  // AuditLogsRetention represents an audit logs retention.
782
  type AuditLogsRetention struct {
783
- // RetentionPeriodInDays is the number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365.
784
  RetentionPeriodInDays *int `json:"retention_period_in_days"`
785
  }
786
 
@@ -5434,6 +5434,8 @@ type DataIntegration struct {
5434
  Slug string `json:"slug"`
5435
  // IntegrationType is the integration type derived from the provider.
5436
  IntegrationType string `json:"integration_type"`
 
 
5437
  // Description is an optional description of the Data Integration.
5438
  Description *string `json:"description"`
5439
  // Enabled is whether the Data Integration is enabled.
@@ -5477,6 +5479,14 @@ type DataIntegrationAccessTokenResponse struct {
5477
  Error *DataIntegrationAccessTokenResponseError `json:"error,omitempty"`
5478
  }
5479
 
 
 
 
 
 
 
 
 
5480
  // AuthMethodMismatchError represents an auth method mismatch error.
5481
  type AuthMethodMismatchError struct {
5482
  // Code is error code indicating the endpoint does not match the installation auth method.
@@ -5594,6 +5604,22 @@ type RadarListEntryAlreadyPresentResponse struct {
5594
  Message string `json:"message"`
5595
  }
5596
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5597
  // RedirectURI represents a redirect uri.
5598
  type RedirectURI struct {
5599
  // Object is the object type.
@@ -6177,9 +6203,9 @@ type DataIntegrationsListResponseData struct {
6177
  CreatedAt string `json:"created_at"`
6178
  // UpdatedAt is the timestamp when the provider was last updated.
6179
  UpdatedAt string `json:"updated_at"`
6180
- // ConnectedAccount is the user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected.
6181
  ConnectedAccount *DataIntegrationsListResponseDataConnectedAccount `json:"connected_account"`
6182
- // ConnectedAccounts is the user's connected accounts for this provider in the requested ownership context.
6183
  ConnectedAccounts []*DataIntegrationsListResponseDataConnectedAccount `json:"connected_accounts"`
6184
  }
6185
 
@@ -6227,9 +6253,9 @@ type DataIntegrationCredential struct {
6227
  type DataIntegrationInstallation struct {
6228
  // ID is unique identifier of the installation.
6229
  ID string `json:"id"`
6230
- // UserID is the User the API key was installed for.
6231
- UserID string `json:"user_id"`
6232
- // OrganizationID is the Organization the installation is scoped to, or null when unscoped.
6233
  OrganizationID *string `json:"organization_id"`
6234
  // APIKeyLast4 is the last four characters of the stored API key. The full key is never returned.
6235
  APIKeyLast4 *string `json:"api_key_last_4"`
 
780
 
781
  // AuditLogsRetention represents an audit logs retention.
782
  type AuditLogsRetention struct {
783
+ // RetentionPeriodInDays is the number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 through 330 in 30-day increments and 365 through 3650 in 365-day increments.
784
  RetentionPeriodInDays *int `json:"retention_period_in_days"`
785
  }
786
 
 
5434
  Slug string `json:"slug"`
5435
  // IntegrationType is the integration type derived from the provider.
5436
  IntegrationType string `json:"integration_type"`
5437
+ // Ownership is who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation.
5438
+ Ownership DataIntegrationOwnership `json:"ownership"`
5439
  // Description is an optional description of the Data Integration.
5440
  Description *string `json:"description"`
5441
  // Enabled is whether the Data Integration is enabled.
 
5479
  Error *DataIntegrationAccessTokenResponseError `json:"error,omitempty"`
5480
  }
5481
 
5482
+ // AccountSelectionRequiredError represents an account selection required error.
5483
+ type AccountSelectionRequiredError struct {
5484
+ // Code indicates that several connected accounts match and the request must name one.
5485
+ Code string `json:"code"`
5486
+ // Message is a human-readable explanation of the ambiguity.
5487
+ Message string `json:"message"`
5488
+ }
5489
+
5490
  // AuthMethodMismatchError represents an auth method mismatch error.
5491
  type AuthMethodMismatchError struct {
5492
  // Code is error code indicating the endpoint does not match the installation auth method.
 
5604
  Message string `json:"message"`
5605
  }
5606
 
5607
+ // AuthkitOAuthResource represents an authkit OAuth resource.
5608
+ type AuthkitOAuthResource struct {
5609
+ // Object is the object type.
5610
+ Object string `json:"object"`
5611
+ // ID is the ID of the AuthKit OAuth resource.
5612
+ ID string `json:"id"`
5613
+ // URI is the resource URI.
5614
+ URI string `json:"uri"`
5615
+ // Default is whether this is the default AuthKit OAuth resource for the environment.
5616
+ Default bool `json:"default"`
5617
+ // CreatedAt is the timestamp when the AuthKit OAuth resource was created.
5618
+ CreatedAt string `json:"created_at"`
5619
+ // UpdatedAt is the timestamp when the AuthKit OAuth resource was last updated.
5620
+ UpdatedAt string `json:"updated_at"`
5621
+ }
5622
+
5623
  // RedirectURI represents a redirect uri.
5624
  type RedirectURI struct {
5625
  // Object is the object type.
 
6203
  CreatedAt string `json:"created_at"`
6204
  // UpdatedAt is the timestamp when the provider was last updated.
6205
  UpdatedAt string `json:"updated_at"`
6206
+ // ConnectedAccount is the user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection.
6207
  ConnectedAccount *DataIntegrationsListResponseDataConnectedAccount `json:"connected_account"`
6208
+ // ConnectedAccounts is the user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`.
6209
  ConnectedAccounts []*DataIntegrationsListResponseDataConnectedAccount `json:"connected_accounts"`
6210
  }
6211
 
 
6253
  type DataIntegrationInstallation struct {
6254
  // ID is unique identifier of the installation.
6255
  ID string `json:"id"`
6256
+ // UserID is the User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization.
6257
+ UserID *string `json:"user_id"`
6258
+ // OrganizationID is the Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped.
6259
  OrganizationID *string `json:"organization_id"`
6260
  // APIKeyLast4 is the last four characters of the stored API key. The full key is never returned.
6261
  APIKeyLast4 *string `json:"api_key_last_4"`
go/pipes.go
go/pipes.go CHANGED
@@ -17,10 +17,12 @@ type PipeService struct {
17
  // PipesListDataIntegrationsParams contains the parameters for ListDataIntegrations.
18
  type PipesListDataIntegrationsParams struct {
19
  PaginationParams
 
 
20
  }
21
 
22
  // ListDataIntegrations
23
- // Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
24
  func (s *PipeService) ListDataIntegrations(ctx context.Context, params *PipesListDataIntegrationsParams, opts ...RequestOption) *Iterator[DataIntegration] {
25
  return newIterator[DataIntegration](ctx, s.client, "GET", "/data-integrations", params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
26
  }
@@ -29,6 +31,8 @@ func (s *PipeService) ListDataIntegrations(ctx context.Context, params *PipesLis
29
  type PipesCreateDataIntegrationParams struct {
30
  // Provider is the provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
31
  Provider string `json:"provider" url:"-"`
 
 
32
  // Description is an optional description of the Data Integration.
33
  Description *string `json:"description,omitempty" url:"-"`
34
  // Enabled is whether the Data Integration is enabled. Defaults to `false`.
@@ -78,7 +82,7 @@ func (p PipesCreateDataIntegrationParams) MarshalJSON() ([]byte, error) {
78
  }
79
 
80
  // CreateDataIntegration create a data integration
81
- // Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
82
  func (s *PipeService) CreateDataIntegration(ctx context.Context, params *PipesCreateDataIntegrationParams, opts ...RequestOption) (*DataIntegration, error) {
83
  var result DataIntegration
84
  _, err := s.client.request(ctx, "POST", "/data-integrations", nil, params, &result, opts)
@@ -89,7 +93,7 @@ func (s *PipeService) CreateDataIntegration(ctx context.Context, params *PipesCr
89
  }
90
 
91
  // GetDataIntegration get a data integration
92
- // Retrieves a data integration by its slug.
93
  func (s *PipeService) GetDataIntegration(ctx context.Context, slug string, opts ...RequestOption) (*DataIntegration, error) {
94
  var result DataIntegration
95
  _, err := s.client.request(ctx, "GET", fmt.Sprintf("/data-integrations/%s", url.PathEscape(slug)), nil, nil, &result, opts)
@@ -146,7 +150,7 @@ func (p PipesUpdateDataIntegrationParams) MarshalJSON() ([]byte, error) {
146
  }
147
 
148
  // UpdateDataIntegration update a data integration
149
- // Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
150
  func (s *PipeService) UpdateDataIntegration(ctx context.Context, slug string, params *PipesUpdateDataIntegrationParams, opts ...RequestOption) (*DataIntegration, error) {
151
  var result DataIntegration
152
  _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s", url.PathEscape(slug)), nil, params, &result, opts)
@@ -157,7 +161,7 @@ func (s *PipeService) UpdateDataIntegration(ctx context.Context, slug string, pa
157
  }
158
 
159
  // DeleteDataIntegration delete a data integration
160
- // Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
161
  func (s *PipeService) DeleteDataIntegration(ctx context.Context, slug string, opts ...RequestOption) error {
162
  _, err := s.client.request(ctx, "DELETE", fmt.Sprintf("/data-integrations/%s", url.PathEscape(slug)), nil, nil, nil, opts)
163
  return err
@@ -167,14 +171,18 @@ func (s *PipeService) DeleteDataIntegration(ctx context.Context, slug string, op
167
  type PipesUpdateDataIntegrationAPIKeyParams struct {
168
  // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier.
169
  UserID string `json:"user_id" url:"-"`
170
- // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
171
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
 
 
 
 
172
  // Secret is the API key secret to store for this integration.
173
  Secret string `json:"secret" url:"-"`
174
  }
175
 
176
  // UpdateDataIntegrationAPIKey upsert an API key for a connected account
177
- // Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
178
  func (s *PipeService) UpdateDataIntegrationAPIKey(ctx context.Context, slug string, params *PipesUpdateDataIntegrationAPIKeyParams, opts ...RequestOption) (*ConnectedAccount, error) {
179
  var result ConnectedAccount
180
  _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s/api-key", url.PathEscape(slug)), nil, params, &result, opts)
@@ -211,8 +219,12 @@ func (s *PipeService) AuthorizeDataIntegration(ctx context.Context, slug string,
211
  type PipesUpdateDataIntegrationClientCredentialsParams struct {
212
  // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier.
213
  UserID string `json:"user_id" url:"-"`
214
- // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
215
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
 
 
 
 
216
  // ClientID is the OAuth client ID to store for this integration.
217
  ClientID string `json:"client_id" url:"-"`
218
  // ClientSecret is the OAuth client secret to store for this integration.
@@ -222,7 +234,7 @@ type PipesUpdateDataIntegrationClientCredentialsParams struct {
222
  }
223
 
224
  // UpdateDataIntegrationClientCredentials upsert client credentials for a connected account
225
- // Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
226
  func (s *PipeService) UpdateDataIntegrationClientCredentials(ctx context.Context, slug string, params *PipesUpdateDataIntegrationClientCredentialsParams, opts ...RequestOption) (*ConnectedAccount, error) {
227
  var result ConnectedAccount
228
  _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s/client-credentials", url.PathEscape(slug)), nil, params, &result, opts)
@@ -234,12 +246,16 @@ func (s *PipeService) UpdateDataIntegrationClientCredentials(ctx context.Context
234
 
235
  // PipesCreateDataIntegrationCredentialParams contains the parameters for CreateDataIntegrationCredential.
236
  type PipesCreateDataIntegrationCredentialParams struct {
237
- // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier.
238
  UserID string `json:"user_id" url:"-"`
239
- // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
240
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
241
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
242
  ConnectedAccountID *string `json:"connected_account_id,omitempty" url:"-"`
 
 
 
 
243
  }
244
 
245
  // CreateDataIntegrationCredential vend credentials for a connected account
@@ -253,14 +269,93 @@ func (s *PipeService) CreateDataIntegrationCredential(ctx context.Context, slug
253
  return &result, nil
254
  }
255
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  // PipesGetAccessTokenParams contains the parameters for GetAccessToken.
257
  type PipesGetAccessTokenParams struct {
258
- // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier.
259
  UserID string `json:"user_id" url:"-"`
260
- // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
261
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
262
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
263
  ConnectedAccountID *string `json:"connected_account_id,omitempty" url:"-"`
 
 
 
 
264
  // NullFields lists JSON field names to send as an explicit null,
265
  // clearing the corresponding value (e.g. []string{"external_id"}).
266
  NullFields []string `json:"-" url:"-"`
@@ -307,6 +402,8 @@ func (s *PipeService) GetAccessToken(ctx context.Context, provider string, param
307
  type PipesGetUserConnectedAccountParams struct {
308
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
309
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
 
 
310
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
311
  ConnectedAccountID *string `url:"connected_account_id,omitempty" json:"-"`
312
  }
@@ -363,6 +460,8 @@ type PipesUpdateUserConnectedAccountParams struct {
363
  State *ConnectedAccountInputState `json:"state,omitempty" url:"-"`
364
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
365
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
 
 
366
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
367
  ConnectedAccountID *string `url:"connected_account_id,omitempty" json:"-"`
368
  }
@@ -382,6 +481,8 @@ func (s *PipeService) UpdateUserConnectedAccount(ctx context.Context, userID str
382
  type PipesDeleteUserConnectedAccountParams struct {
383
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
384
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
 
 
385
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
386
  ConnectedAccountID *string `url:"connected_account_id,omitempty" json:"-"`
387
  }
@@ -397,6 +498,8 @@ func (s *PipeService) DeleteUserConnectedAccount(ctx context.Context, userID str
397
  type PipesListUserDataProvidersParams struct {
398
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
399
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
 
 
400
  }
401
 
402
  // ListUserDataProviders list providers for a user
 
17
  // PipesListDataIntegrationsParams contains the parameters for ListDataIntegrations.
18
  type PipesListDataIntegrationsParams struct {
19
  PaginationParams
20
+ // Ownership is only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
21
+ Ownership *PipesOwnership `url:"ownership,omitempty" json:"-"`
22
  }
23
 
24
  // ListDataIntegrations
25
+ // Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
26
  func (s *PipeService) ListDataIntegrations(ctx context.Context, params *PipesListDataIntegrationsParams, opts ...RequestOption) *Iterator[DataIntegration] {
27
  return newIterator[DataIntegration](ctx, s.client, "GET", "/data-integrations", params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
28
  }
 
31
  type PipesCreateDataIntegrationParams struct {
32
  // Provider is the provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
33
  Provider string `json:"provider" url:"-"`
34
+ // Ownership is who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
35
+ Ownership *CreateDataIntegrationOwnership `json:"ownership,omitempty" url:"-"`
36
  // Description is an optional description of the Data Integration.
37
  Description *string `json:"description,omitempty" url:"-"`
38
  // Enabled is whether the Data Integration is enabled. Defaults to `false`.
 
82
  }
83
 
84
  // CreateDataIntegration create a data integration
85
+ // Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
86
  func (s *PipeService) CreateDataIntegration(ctx context.Context, params *PipesCreateDataIntegrationParams, opts ...RequestOption) (*DataIntegration, error) {
87
  var result DataIntegration
88
  _, err := s.client.request(ctx, "POST", "/data-integrations", nil, params, &result, opts)
 
93
  }
94
 
95
  // GetDataIntegration get a data integration
96
+ // Retrieves the user-owned data integration by its slug.
97
  func (s *PipeService) GetDataIntegration(ctx context.Context, slug string, opts ...RequestOption) (*DataIntegration, error) {
98
  var result DataIntegration
99
  _, err := s.client.request(ctx, "GET", fmt.Sprintf("/data-integrations/%s", url.PathEscape(slug)), nil, nil, &result, opts)
 
150
  }
151
 
152
  // UpdateDataIntegration update a data integration
153
+ // Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
154
  func (s *PipeService) UpdateDataIntegration(ctx context.Context, slug string, params *PipesUpdateDataIntegrationParams, opts ...RequestOption) (*DataIntegration, error) {
155
  var result DataIntegration
156
  _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s", url.PathEscape(slug)), nil, params, &result, opts)
 
161
  }
162
 
163
  // DeleteDataIntegration delete a data integration
164
+ // Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
165
  func (s *PipeService) DeleteDataIntegration(ctx context.Context, slug string, opts ...RequestOption) error {
166
  _, err := s.client.request(ctx, "DELETE", fmt.Sprintf("/data-integrations/%s", url.PathEscape(slug)), nil, nil, nil, opts)
167
  return err
 
171
  type PipesUpdateDataIntegrationAPIKeyParams struct {
172
  // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier.
173
  UserID string `json:"user_id" url:"-"`
174
+ // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
175
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
176
+ // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
177
+ ConnectedAccountID *string `json:"connected_account_id,omitempty" url:"-"`
178
+ // ConnectionOwner is whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
179
+ ConnectionOwner *DataIntegrationsUpsertAPIKeyRequestConnectionOwner `json:"connection_owner,omitempty" url:"-"`
180
  // Secret is the API key secret to store for this integration.
181
  Secret string `json:"secret" url:"-"`
182
  }
183
 
184
  // UpdateDataIntegrationAPIKey upsert an API key for a connected account
185
+ // Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
186
  func (s *PipeService) UpdateDataIntegrationAPIKey(ctx context.Context, slug string, params *PipesUpdateDataIntegrationAPIKeyParams, opts ...RequestOption) (*ConnectedAccount, error) {
187
  var result ConnectedAccount
188
  _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s/api-key", url.PathEscape(slug)), nil, params, &result, opts)
 
219
  type PipesUpdateDataIntegrationClientCredentialsParams struct {
220
  // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier.
221
  UserID string `json:"user_id" url:"-"`
222
+ // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
223
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
224
+ // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
225
+ ConnectedAccountID *string `json:"connected_account_id,omitempty" url:"-"`
226
+ // ConnectionOwner is whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
227
+ ConnectionOwner *DataIntegrationsUpsertClientCredentialsRequestConnectionOwner `json:"connection_owner,omitempty" url:"-"`
228
  // ClientID is the OAuth client ID to store for this integration.
229
  ClientID string `json:"client_id" url:"-"`
230
  // ClientSecret is the OAuth client secret to store for this integration.
 
234
  }
235
 
236
  // UpdateDataIntegrationClientCredentials upsert client credentials for a connected account
237
+ // Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
238
  func (s *PipeService) UpdateDataIntegrationClientCredentials(ctx context.Context, slug string, params *PipesUpdateDataIntegrationClientCredentialsParams, opts ...RequestOption) (*ConnectedAccount, error) {
239
  var result ConnectedAccount
240
  _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s/client-credentials", url.PathEscape(slug)), nil, params, &result, opts)
 
246
 
247
  // PipesCreateDataIntegrationCredentialParams contains the parameters for CreateDataIntegrationCredential.
248
  type PipesCreateDataIntegrationCredentialParams struct {
249
+ // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
250
  UserID string `json:"user_id" url:"-"`
251
+ // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
252
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
253
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
254
  ConnectedAccountID *string `json:"connected_account_id,omitempty" url:"-"`
255
+ // ConnectionOwner is which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
256
+ ConnectionOwner *DataIntegrationsVendCredentialsRequestConnectionOwner `json:"connection_owner,omitempty" url:"-"`
257
+ // SupportsMultipleConnections is set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
258
+ SupportsMultipleConnections *bool `json:"supports_multiple_connections,omitempty" url:"-"`
259
  }
260
 
261
  // CreateDataIntegrationCredential vend credentials for a connected account
 
269
  return &result, nil
270
  }
271
 
272
+ // ListDataIntegrationOrganization get an organization-owned data integration
273
+ // Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
274
+ func (s *PipeService) ListDataIntegrationOrganization(ctx context.Context, slug string, opts ...RequestOption) (*DataIntegration, error) {
275
+ var result DataIntegration
276
+ _, err := s.client.request(ctx, "GET", fmt.Sprintf("/data-integrations/%s/organization", url.PathEscape(slug)), nil, nil, &result, opts)
277
+ if err != nil {
278
+ return nil, err
279
+ }
280
+ return &result, nil
281
+ }
282
+
283
+ // PipesUpdateDataIntegrationOrganizationParams contains the parameters for UpdateDataIntegrationOrganization.
284
+ type PipesUpdateDataIntegrationOrganizationParams struct {
285
+ // Description is an optional description of the Data Integration.
286
+ Description *string `json:"description,omitempty" url:"-"`
287
+ // Enabled is whether the Data Integration is enabled.
288
+ Enabled *bool `json:"enabled,omitempty" url:"-"`
289
+ // Scopes is the OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
290
+ Scopes []string `json:"scopes,omitempty" url:"-"`
291
+ // Credentials is new OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
292
+ Credentials *DataIntegrationCredentialsInput `json:"credentials,omitempty" url:"-"`
293
+ // APIKey is an API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
294
+ APIKey *APIKeyInstallation `json:"api_key,omitempty" url:"-"`
295
+ // CustomProvider updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
296
+ CustomProvider *UpdateCustomProviderDefinition `json:"custom_provider,omitempty" url:"-"`
297
+ // NullFields lists JSON field names to send as an explicit null,
298
+ // clearing the corresponding value (e.g. []string{"external_id"}).
299
+ NullFields []string `json:"-" url:"-"`
300
+ }
301
+
302
+ // MarshalJSON implements json.Marshaler for PipesUpdateDataIntegrationOrganizationParams.
303
+ func (p PipesUpdateDataIntegrationOrganizationParams) MarshalJSON() ([]byte, error) {
304
+ type Alias PipesUpdateDataIntegrationOrganizationParams
305
+ data, err := json.Marshal(Alias(p))
306
+ if err != nil {
307
+ return nil, err
308
+ }
309
+ if len(p.NullFields) == 0 {
310
+ return data, nil
311
+ }
312
+ var m map[string]any
313
+ if err := json.Unmarshal(data, &m); err != nil {
314
+ return nil, err
315
+ }
316
+ nullable := map[string]bool{
317
+ "description": true,
318
+ "scopes": true,
319
+ }
320
+ for _, f := range p.NullFields {
321
+ if !nullable[f] {
322
+ return nil, fmt.Errorf("PipesUpdateDataIntegrationOrganizationParams: %q is not a nullable field", f)
323
+ }
324
+ m[f] = nil
325
+ }
326
+ return json.Marshal(m)
327
+ }
328
+
329
+ // UpdateDataIntegrationOrganization update an organization-owned data integration
330
+ // Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
331
+ func (s *PipeService) UpdateDataIntegrationOrganization(ctx context.Context, slug string, params *PipesUpdateDataIntegrationOrganizationParams, opts ...RequestOption) (*DataIntegration, error) {
332
+ var result DataIntegration
333
+ _, err := s.client.request(ctx, "PUT", fmt.Sprintf("/data-integrations/%s/organization", url.PathEscape(slug)), nil, params, &result, opts)
334
+ if err != nil {
335
+ return nil, err
336
+ }
337
+ return &result, nil
338
+ }
339
+
340
+ // DeleteDataIntegrationOrganization delete an organization-owned data integration
341
+ // Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
342
+ func (s *PipeService) DeleteDataIntegrationOrganization(ctx context.Context, slug string, opts ...RequestOption) error {
343
+ _, err := s.client.request(ctx, "DELETE", fmt.Sprintf("/data-integrations/%s/organization", url.PathEscape(slug)), nil, nil, nil, opts)
344
+ return err
345
+ }
346
+
347
  // PipesGetAccessTokenParams contains the parameters for GetAccessToken.
348
  type PipesGetAccessTokenParams struct {
349
+ // UserID is a [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
350
  UserID string `json:"user_id" url:"-"`
351
+ // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
352
  OrganizationID *string `json:"organization_id,omitempty" url:"-"`
353
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
354
  ConnectedAccountID *string `json:"connected_account_id,omitempty" url:"-"`
355
+ // ConnectionOwner is which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
356
+ ConnectionOwner *DataIntegrationsGetUserTokenRequestConnectionOwner `json:"connection_owner,omitempty" url:"-"`
357
+ // SupportsMultipleConnections is set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
358
+ SupportsMultipleConnections *bool `json:"supports_multiple_connections,omitempty" url:"-"`
359
  // NullFields lists JSON field names to send as an explicit null,
360
  // clearing the corresponding value (e.g. []string{"external_id"}).
361
  NullFields []string `json:"-" url:"-"`
 
402
  type PipesGetUserConnectedAccountParams struct {
403
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
404
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
405
+ // SupportsMultipleConnections is set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
406
+ SupportsMultipleConnections *bool `url:"supports_multiple_connections,omitempty" json:"-"`
407
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
408
  ConnectedAccountID *string `url:"connected_account_id,omitempty" json:"-"`
409
  }
 
460
  State *ConnectedAccountInputState `json:"state,omitempty" url:"-"`
461
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
462
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
463
+ // SupportsMultipleConnections is set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
464
+ SupportsMultipleConnections *bool `url:"supports_multiple_connections,omitempty" json:"-"`
465
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
466
  ConnectedAccountID *string `url:"connected_account_id,omitempty" json:"-"`
467
  }
 
481
  type PipesDeleteUserConnectedAccountParams struct {
482
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
483
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
484
+ // SupportsMultipleConnections is set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
485
+ SupportsMultipleConnections *bool `url:"supports_multiple_connections,omitempty" json:"-"`
486
  // ConnectedAccountID is a [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
487
  ConnectedAccountID *string `url:"connected_account_id,omitempty" json:"-"`
488
  }
 
498
  type PipesListUserDataProvidersParams struct {
499
  // OrganizationID is an [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
500
  OrganizationID *string `url:"organization_id,omitempty" json:"-"`
501
+ // SupportsMultipleConnections is set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
502
+ SupportsMultipleConnections *bool `url:"supports_multiple_connections,omitempty" json:"-"`
503
  }
504
 
505
  // ListUserDataProviders list providers for a user
go/pipes_test.go
go/pipes_test.go CHANGED
@@ -240,6 +240,68 @@ func TestPipes_CreateDataIntegrationCredential(t *testing.T) {
240
  require.NotNil(t, result)
241
  }
242
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  func TestPipes_GetAccessToken(t *testing.T) {
244
  server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
245
  require.Equal(t, "POST", r.Method)
 
240
  require.NotNil(t, result)
241
  }
242
 
243
+ func TestPipes_ListDataIntegrationOrganization(t *testing.T) {
244
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
245
+ require.Equal(t, "GET", r.Method)
246
+ require.Equal(t, "/data-integrations/test_slug/organization", r.URL.Path)
247
+ w.Header().Set("Content-Type", "application/json")
248
+ w.WriteHeader(http.StatusOK)
249
+ fixture, err := os.ReadFile("testdata/data_integration.json")
250
+ if err != nil {
251
+ t.Fatalf("failed to read fixture: %v", err)
252
+ }
253
+ w.Write(fixture)
254
+ }))
255
+ defer server.Close()
256
+
257
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
258
+ result, err := client.Pipes().ListDataIntegrationOrganization(context.Background(), "test_slug")
259
+ require.NoError(t, err)
260
+ require.NotNil(t, result)
261
+ require.Equal(t, "data_integration_01EHZNVPK3SFK441A1RGBFSHRT", result.ID)
262
+ require.Equal(t, "github", result.Slug)
263
+ require.Equal(t, "github", result.IntegrationType)
264
+ }
265
+
266
+ func TestPipes_UpdateDataIntegrationOrganization(t *testing.T) {
267
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
268
+ require.Equal(t, "PUT", r.Method)
269
+ require.Equal(t, "/data-integrations/test_slug/organization", r.URL.Path)
270
+ body, _ := io.ReadAll(r.Body)
271
+ var bodyMap map[string]interface{}
272
+ require.NoError(t, json.Unmarshal(body, &bodyMap))
273
+ w.Header().Set("Content-Type", "application/json")
274
+ w.WriteHeader(http.StatusOK)
275
+ fixture, err := os.ReadFile("testdata/data_integration.json")
276
+ if err != nil {
277
+ t.Fatalf("failed to read fixture: %v", err)
278
+ }
279
+ w.Write(fixture)
280
+ }))
281
+ defer server.Close()
282
+
283
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
284
+ result, err := client.Pipes().UpdateDataIntegrationOrganization(context.Background(), "test_slug", &workos.PipesUpdateDataIntegrationOrganizationParams{})
285
+ require.NoError(t, err)
286
+ require.NotNil(t, result)
287
+ require.Equal(t, "data_integration_01EHZNVPK3SFK441A1RGBFSHRT", result.ID)
288
+ require.Equal(t, "github", result.Slug)
289
+ require.Equal(t, "github", result.IntegrationType)
290
+ }
291
+
292
+ func TestPipes_DeleteDataIntegrationOrganization(t *testing.T) {
293
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
294
+ require.Equal(t, "DELETE", r.Method)
295
+ require.Equal(t, "/data-integrations/test_slug/organization", r.URL.Path)
296
+ w.WriteHeader(http.StatusNoContent)
297
+ }))
298
+ defer server.Close()
299
+
300
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
301
+ err := client.Pipes().DeleteDataIntegrationOrganization(context.Background(), "test_slug")
302
+ require.NoError(t, err)
303
+ }
304
+
305
  func TestPipes_GetAccessToken(t *testing.T) {
306
  server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
307
  require.Equal(t, "POST", r.Method)
go/pkg/events/events.go
go/pkg/events/events.go CHANGED
@@ -6,11 +6,19 @@ package events
6
  type Event string
7
 
8
  const (
 
 
 
 
 
 
 
9
  AgentRegistrationCreated = "agent.registration.created"
10
  AgentRegistrationClaimAttemptCreated = "agent.registration.claim.attempt.created"
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"
 
6
  type Event string
7
 
8
  const (
9
+ AgentBlueprintCreated = "agent.blueprint.created"
10
+ AgentBlueprintDeleted = "agent.blueprint.deleted"
11
+ AgentBlueprintUpdated = "agent.blueprint.updated"
12
+ AgentInstanceCreated = "agent.instance.created"
13
+ AgentInstanceDeleted = "agent.instance.deleted"
14
+ AgentInstanceSessionCreated = "agent.instance.session.created"
15
+ AgentInstanceSessionRevoked = "agent.instance.session.revoked"
16
  AgentRegistrationCreated = "agent.registration.created"
17
  AgentRegistrationClaimAttemptCreated = "agent.registration.claim.attempt.created"
18
  AgentRegistrationClaimCompleted = "agent.registration.claim.completed"
19
  AgentRegistrationCredentialIssued = "agent.registration.credential.issued"
20
  AgentRegistrationDeleted = "agent.registration.deleted"
21
+ AgentRegistrationRefreshed = "agent.registration.refreshed"
22
  AgentRegistrationExpired = "agent.registration.expired"
23
  AgentRegistrationOrganizationSwitched = "agent.registration.organization.switched"
24
  AgentRegistrationRevoked = "agent.registration.revoked"
go/testdata/account_selection_required_error.json
go/testdata/account_selection_required_error.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "code": "account_selection_required",
3
+ "message": "Several connected accounts match this user for this provider. Name one with a connected account id."
4
+ }
go/testdata/authkit_oauth_resource.json
go/testdata/authkit_oauth_resource.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "authkit_oauth_resource",
3
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "uri": "https://api.example.com",
5
+ "default": false,
6
+ "created_at": "2026-01-15T12:00:00.000Z",
7
+ "updated_at": "2026-01-15T12:00:00.000Z"
8
+ }
go/testdata/create_authkit_oauth_resource.json
go/testdata/create_authkit_oauth_resource.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "uri": "https://api.example.com",
3
+ "default": false
4
+ }
go/testdata/create_data_integration.json
go/testdata/create_data_integration.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "provider": "github",
 
3
  "description": "Production GitHub app",
4
  "enabled": true,
5
  "scopes": [
 
1
  {
2
  "provider": "github",
3
+ "ownership": "user",
4
  "description": "Production GitHub app",
5
  "enabled": true,
6
  "scopes": [
go/testdata/data_integration.json
go/testdata/data_integration.json CHANGED
@@ -3,6 +3,7 @@
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
 
6
  "description": "Production GitHub app",
7
  "enabled": true,
8
  "state": "valid",
 
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
6
+ "ownership": "user",
7
  "description": "Production GitHub app",
8
  "enabled": true,
9
  "state": "valid",
go/testdata/data_integrations_get_user_token_request.json
go/testdata/data_integrations_get_user_token_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
go/testdata/data_integrations_upsert_api_key_request.json
go/testdata/data_integrations_upsert_api_key_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "secret": "sk-1234567890abcdef"
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "secret": "sk-1234567890abcdef"
7
  }
go/testdata/data_integrations_upsert_client_credentials_request.json
go/testdata/data_integrations_upsert_client_credentials_request.json CHANGED
@@ -1,6 +1,8 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "client_id": "3MVG9...",
5
  "client_secret": "shhh-secret",
6
  "config": {
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "client_id": "3MVG9...",
7
  "client_secret": "shhh-secret",
8
  "config": {
go/testdata/data_integrations_vend_credentials_request.json
go/testdata/data_integrations_vend_credentials_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
go/testdata/list_authkit_oauth_resource.json
go/testdata/list_authkit_oauth_resource.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [
3
+ {
4
+ "object": "authkit_oauth_resource",
5
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
6
+ "uri": "https://api.example.com",
7
+ "default": false,
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": null,
14
+ "after": null
15
+ }
16
+ }
go/testdata/list_data_integration.json
go/testdata/list_data_integration.json CHANGED
@@ -5,6 +5,7 @@
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
 
8
  "description": "Production GitHub app",
9
  "enabled": true,
10
  "state": "valid",
 
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
8
+ "ownership": "user",
9
  "description": "Production GitHub app",
10
  "enabled": true,
11
  "state": "valid",
go/user_management.go
go/user_management.go CHANGED
@@ -726,6 +726,43 @@ func (s *UserManagementService) RevokeSession(ctx context.Context, params *UserM
726
  return err
727
  }
728
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
729
  // UserManagementListCORSOriginsParams contains the parameters for ListCORSOrigins.
730
  type UserManagementListCORSOriginsParams struct {
731
  PaginationParams
 
726
  return err
727
  }
728
 
729
+ // UserManagementListAuthkitOAuthResourcesParams contains the parameters for ListAuthkitOAuthResources.
730
+ type UserManagementListAuthkitOAuthResourcesParams struct {
731
+ PaginationParams
732
+ }
733
+
734
+ // ListAuthkitOAuthResources
735
+ // Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
736
+ func (s *UserManagementService) ListAuthkitOAuthResources(ctx context.Context, params *UserManagementListAuthkitOAuthResourcesParams, opts ...RequestOption) *Iterator[AuthkitOAuthResource] {
737
+ return newIterator[AuthkitOAuthResource](ctx, s.client, "GET", "/user_management/authkit_oauth_resources", params, "after", "data", opts, map[string]string{"limit": "10", "order": "desc"})
738
+ }
739
+
740
+ // UserManagementCreateAuthkitOAuthResourceParams contains the parameters for CreateAuthkitOAuthResource.
741
+ type UserManagementCreateAuthkitOAuthResourceParams struct {
742
+ // URI is the resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
743
+ URI string `json:"uri" url:"-"`
744
+ // Default is whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
745
+ Default *bool `json:"default,omitempty" url:"-"`
746
+ }
747
+
748
+ // CreateAuthkitOAuthResource create an AuthKit OAuth resource
749
+ // Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
750
+ func (s *UserManagementService) CreateAuthkitOAuthResource(ctx context.Context, params *UserManagementCreateAuthkitOAuthResourceParams, opts ...RequestOption) (*AuthkitOAuthResource, error) {
751
+ var result AuthkitOAuthResource
752
+ _, err := s.client.request(ctx, "POST", "/user_management/authkit_oauth_resources", nil, params, &result, opts)
753
+ if err != nil {
754
+ return nil, err
755
+ }
756
+ return &result, nil
757
+ }
758
+
759
+ // DeleteAuthkitOAuthResource delete an AuthKit OAuth resource
760
+ // Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
761
+ func (s *UserManagementService) DeleteAuthkitOAuthResource(ctx context.Context, id string, opts ...RequestOption) error {
762
+ _, err := s.client.request(ctx, "DELETE", fmt.Sprintf("/user_management/authkit_oauth_resources/%s", url.PathEscape(id)), nil, nil, nil, opts)
763
+ return err
764
+ }
765
+
766
  // UserManagementListCORSOriginsParams contains the parameters for ListCORSOrigins.
767
  type UserManagementListCORSOriginsParams struct {
768
  PaginationParams
go/user_management_test.go
go/user_management_test.go CHANGED
@@ -135,6 +135,83 @@ func TestUserManagement_RevokeSession(t *testing.T) {
135
  require.NoError(t, err)
136
  }
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  func TestUserManagement_ListCORSOrigins(t *testing.T) {
139
  server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
140
  require.Equal(t, "GET", r.Method)
 
135
  require.NoError(t, err)
136
  }
137
 
138
+ func TestUserManagement_ListAuthkitOAuthResources(t *testing.T) {
139
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
140
+ require.Equal(t, "GET", r.Method)
141
+ require.Equal(t, "/user_management/authkit_oauth_resources", r.URL.Path)
142
+ require.Equal(t, "10", r.URL.Query().Get("limit"))
143
+ w.Header().Set("Content-Type", "application/json")
144
+ w.WriteHeader(http.StatusOK)
145
+ fixture, err := os.ReadFile("testdata/list_authkit_oauth_resource.json")
146
+ if err != nil {
147
+ t.Fatalf("failed to read fixture: %v", err)
148
+ }
149
+ w.Write(fixture)
150
+ }))
151
+ defer server.Close()
152
+
153
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
154
+ iter := client.UserManagement().ListAuthkitOAuthResources(context.Background(), &workos.UserManagementListAuthkitOAuthResourcesParams{PaginationParams: workos.PaginationParams{Limit: ptrInt(10)}})
155
+ require.NotNil(t, iter)
156
+ require.True(t, iter.Next())
157
+ require.NoError(t, iter.Err())
158
+ item := iter.Current()
159
+ require.NotNil(t, item)
160
+ }
161
+
162
+ func TestUserManagement_ListAuthkitOAuthResources_Empty(t *testing.T) {
163
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
164
+ w.Header().Set("Content-Type", "application/json")
165
+ w.WriteHeader(http.StatusOK)
166
+ w.Write([]byte(`{"data":[],"list_metadata":{"before":null,"after":null}}`))
167
+ }))
168
+ defer server.Close()
169
+
170
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
171
+ iter := client.UserManagement().ListAuthkitOAuthResources(context.Background(), &workos.UserManagementListAuthkitOAuthResourcesParams{PaginationParams: workos.PaginationParams{Limit: ptrInt(10)}})
172
+ require.False(t, iter.Next())
173
+ require.NoError(t, iter.Err())
174
+ }
175
+
176
+ func TestUserManagement_CreateAuthkitOAuthResource(t *testing.T) {
177
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
178
+ require.Equal(t, "POST", r.Method)
179
+ require.Equal(t, "/user_management/authkit_oauth_resources", r.URL.Path)
180
+ body, _ := io.ReadAll(r.Body)
181
+ var bodyMap map[string]interface{}
182
+ require.NoError(t, json.Unmarshal(body, &bodyMap))
183
+ w.Header().Set("Content-Type", "application/json")
184
+ w.WriteHeader(http.StatusOK)
185
+ fixture, err := os.ReadFile("testdata/authkit_oauth_resource.json")
186
+ if err != nil {
187
+ t.Fatalf("failed to read fixture: %v", err)
188
+ }
189
+ w.Write(fixture)
190
+ }))
191
+ defer server.Close()
192
+
193
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
194
+ result, err := client.UserManagement().CreateAuthkitOAuthResource(context.Background(), &workos.UserManagementCreateAuthkitOAuthResourceParams{})
195
+ require.NoError(t, err)
196
+ require.NotNil(t, result)
197
+ require.Equal(t, "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT", result.ID)
198
+ require.Equal(t, "https://api.example.com", result.URI)
199
+ require.Equal(t, "2026-01-15T12:00:00.000Z", result.CreatedAt)
200
+ }
201
+
202
+ func TestUserManagement_DeleteAuthkitOAuthResource(t *testing.T) {
203
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
204
+ require.Equal(t, "DELETE", r.Method)
205
+ require.Equal(t, "/user_management/authkit_oauth_resources/test_id", r.URL.Path)
206
+ w.WriteHeader(http.StatusNoContent)
207
+ }))
208
+ defer server.Close()
209
+
210
+ client := workos.NewClient("sk_test", workos.WithBaseURL(server.URL))
211
+ err := client.UserManagement().DeleteAuthkitOAuthResource(context.Background(), "test_id")
212
+ require.NoError(t, err)
213
+ }
214
+
215
  func TestUserManagement_ListCORSOrigins(t *testing.T) {
216
  server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
217
  require.Equal(t, "GET", r.Method)

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

code: 27 · tests: 0 · manifest: 1

ios/.oagen-manifest.json
ios/.oagen-manifest.json CHANGED
@@ -46,6 +46,7 @@
46
  "Sources/WorkOS/Enums/CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.swift",
47
  "Sources/WorkOS/Enums/CreateConnectionOidcOptionsTokenAuthenticationMethod.swift",
48
  "Sources/WorkOS/Enums/CreateDataIntegrationAuthMethods.swift",
 
49
  "Sources/WorkOS/Enums/CreateUserInviteOptionsLocale.swift",
50
  "Sources/WorkOS/Enums/CreateUserPasswordHashType.swift",
51
  "Sources/WorkOS/Enums/CreateUserPasswordSaltPosition.swift",
@@ -58,11 +59,16 @@
58
  "Sources/WorkOS/Enums/DataIntegrationCredentialsInputType.swift",
59
  "Sources/WorkOS/Enums/DataIntegrationCredentialsResponseError.swift",
60
  "Sources/WorkOS/Enums/DataIntegrationCustomProviderAuthenticateVia.swift",
 
61
  "Sources/WorkOS/Enums/DataIntegrationState.swift",
 
62
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataAuthMethods.swift",
63
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataConnectedAccountAuthMethod.swift",
64
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataConnectedAccountState.swift",
65
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataOwnership.swift",
 
 
 
66
  "Sources/WorkOS/Enums/DirectoryState.swift",
67
  "Sources/WorkOS/Enums/DirectoryType.swift",
68
  "Sources/WorkOS/Enums/DirectoryUserState.swift",
@@ -114,6 +120,7 @@
114
  "Sources/WorkOS/Enums/PatchConnectionOidcOptionsIdTokenSignatureAlgorithm.swift",
115
  "Sources/WorkOS/Enums/PatchConnectionOidcOptionsTokenAuthenticationMethod.swift",
116
  "Sources/WorkOS/Enums/PipeConnectedAccountState.swift",
 
117
  "Sources/WorkOS/Enums/ProfileConnectionType.swift",
118
  "Sources/WorkOS/Enums/RadarListAction.swift",
119
  "Sources/WorkOS/Enums/RadarListType.swift",
@@ -170,6 +177,7 @@
170
  "Sources/WorkOS/Enums/WebhookEndpointStatus.swift",
171
  "Sources/WorkOS/Enums/WidgetSessionTokenScopes.swift",
172
  "Sources/WorkOS/Models/AccessTokenAgentRegistrationCredentialIssuedDataDetail.swift",
 
173
  "Sources/WorkOS/Models/ActionAuthenticationDenied.swift",
174
  "Sources/WorkOS/Models/ActionAuthenticationDeniedData.swift",
175
  "Sources/WorkOS/Models/ActionUserRegistrationDenied.swift",
@@ -334,6 +342,7 @@
334
  "Sources/WorkOS/Models/AuthenticationSSOTimedOutData.swift",
335
  "Sources/WorkOS/Models/AuthenticationSSOTimedOutDataError.swift",
336
  "Sources/WorkOS/Models/AuthenticationSSOTimedOutDataSSO.swift",
 
337
  "Sources/WorkOS/Models/AuthorizationCheck.swift",
338
  "Sources/WorkOS/Models/AuthorizationCodeSessionAuthenticateRequest.swift",
339
  "Sources/WorkOS/Models/AuthorizationPermission.swift",
@@ -384,6 +393,7 @@
384
  "Sources/WorkOS/Models/ConnectionSAMLCertificateRenewedDataConnection.swift",
385
  "Sources/WorkOS/Models/CorsOriginResponse.swift",
386
  "Sources/WorkOS/Models/CreateApplicationSecret.swift",
 
387
  "Sources/WorkOS/Models/CreateAuthorizationPermission.swift",
388
  "Sources/WorkOS/Models/CreateAuthorizationResource.swift",
389
  "Sources/WorkOS/Models/CreateConnection.swift",
@@ -866,6 +876,34 @@
866
  "Tests/WorkOSTests/WidgetsTests.swift"
867
  ],
868
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
869
  "PATCH /agents/claims/attempts": {
870
  "sdkMethod": "updateAttempts",
871
  "service": "agents"
@@ -878,6 +916,30 @@
878
  "sdkMethod": "getRegistration",
879
  "service": "agents"
880
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
881
  "POST /auth/challenges/{id}/verify": {
882
  "sdkMethod": "verifyChallenge",
883
  "service": "multiFactorAuth"
@@ -1136,10 +1198,54 @@
1136
  "sdkMethod": "listConnections",
1137
  "service": "sso"
1138
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1139
  "GET /connections/{id}": {
1140
  "sdkMethod": "getConnection",
1141
  "service": "sso"
1142
  },
 
 
 
 
1143
  "DELETE /connections/{id}": {
1144
  "sdkMethod": "deleteConnection",
1145
  "service": "sso"
@@ -1184,10 +1290,26 @@
1184
  "sdkMethod": "authorizeDataIntegration",
1185
  "service": "pipes"
1186
  },
 
 
 
 
1187
  "POST /data-integrations/{slug}/credentials": {
1188
  "sdkMethod": "createDataIntegrationCredential",
1189
  "service": "pipes"
1190
  },
 
 
 
 
 
 
 
 
 
 
 
 
1191
  "POST /data-integrations/{provider}/token": {
1192
  "sdkMethod": "getAccessToken",
1193
  "service": "pipes"
@@ -1324,6 +1446,26 @@
1324
  "sdkMethod": "listAuthorizedApplications",
1325
  "service": "organizations"
1326
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1327
  "GET /organizations/{id}/audit_logs_retention": {
1328
  "sdkMethod": "getOrganizationAuditLogsRetention",
1329
  "service": "auditLogs"
@@ -1416,6 +1558,14 @@
1416
  "sdkMethod": "deleteOrganizationMembership",
1417
  "service": "groups"
1418
  },
 
 
 
 
 
 
 
 
1419
  "POST /portal/generate_link": {
1420
  "sdkMethod": "generateLink",
1421
  "service": "adminPortal"
@@ -1498,6 +1648,18 @@
1498
  "sdkMethod": "revokeSession",
1499
  "service": "userManagement"
1500
  },
 
 
 
 
 
 
 
 
 
 
 
 
1501
  "GET /user_management/cors_origins": {
1502
  "sdkMethod": "listCorsOrigins",
1503
  "service": "userManagement"
@@ -1634,6 +1796,34 @@
1634
  "sdkMethod": "deleteAuthorizedApplication",
1635
  "service": "userManagement"
1636
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1637
  "GET /user_management/users/{userId}/api_keys": {
1638
  "sdkMethod": "listApiKeys",
1639
  "service": "userManagement"
@@ -1737,162 +1927,6 @@
1737
  "POST /widgets/token": {
1738
  "sdkMethod": "createToken",
1739
  "service": "widgets"
1740
- },
1741
- "PUT /data-integrations/{slug}/client-credentials": {
1742
- "sdkMethod": "updateDataIntegrationClientCredentials",
1743
- "service": "pipes"
1744
- },
1745
- "GET /agents/blueprints": {
1746
- "sdkMethod": "listBlueprints",
1747
- "service": "agents"
1748
- },
1749
- "POST /agents/blueprints": {
1750
- "sdkMethod": "createBlueprint",
1751
- "service": "agents"
1752
- },
1753
- "GET /agents/blueprints/{agent_blueprint_id}": {
1754
- "sdkMethod": "getBlueprint",
1755
- "service": "agents"
1756
- },
1757
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
1758
- "sdkMethod": "updateBlueprint",
1759
- "service": "agents"
1760
- },
1761
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
1762
- "sdkMethod": "deleteBlueprint",
1763
- "service": "agents"
1764
- },
1765
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1766
- "sdkMethod": "createBlueprintToken",
1767
- "service": "agents"
1768
- },
1769
- "GET /agents/instances": {
1770
- "sdkMethod": "listInstances",
1771
- "service": "agents"
1772
- },
1773
- "GET /agents/instances/{agent_instance_id}": {
1774
- "sdkMethod": "getInstance",
1775
- "service": "agents"
1776
- },
1777
- "DELETE /agents/instances/{agent_instance_id}": {
1778
- "sdkMethod": "deleteInstance",
1779
- "service": "agents"
1780
- },
1781
- "GET /agents/sessions": {
1782
- "sdkMethod": "listSessions",
1783
- "service": "agents"
1784
- },
1785
- "GET /agents/sessions/{agent_instance_session_id}": {
1786
- "sdkMethod": "getSession",
1787
- "service": "agents"
1788
- },
1789
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1790
- "sdkMethod": "revokeSession",
1791
- "service": "agents"
1792
- },
1793
- "POST /connections": {
1794
- "sdkMethod": "createConnection",
1795
- "service": "sso"
1796
- },
1797
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
1798
- "sdkMethod": "listConnectionSAMLIdpSigningCerts",
1799
- "service": "sso"
1800
- },
1801
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
1802
- "sdkMethod": "createConnectionSAMLIdpSigningCert",
1803
- "service": "sso"
1804
- },
1805
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1806
- "sdkMethod": "deleteConnectionSAMLIdpSigningCert",
1807
- "service": "sso"
1808
- },
1809
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1810
- "sdkMethod": "listConnectionSAMLSpEncryptionCerts",
1811
- "service": "sso"
1812
- },
1813
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1814
- "sdkMethod": "createConnectionSAMLSpEncryptionCert",
1815
- "service": "sso"
1816
- },
1817
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1818
- "sdkMethod": "deleteConnectionSAMLSpEncryptionCert",
1819
- "service": "sso"
1820
- },
1821
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
1822
- "sdkMethod": "listConnectionSAMLSpSigningCert",
1823
- "service": "sso"
1824
- },
1825
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
1826
- "sdkMethod": "createConnectionSAMLSpSigningCert",
1827
- "service": "sso"
1828
- },
1829
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1830
- "sdkMethod": "deleteConnectionSAMLSpSigningCert",
1831
- "service": "sso"
1832
- },
1833
- "PATCH /connections/{id}": {
1834
- "sdkMethod": "updateConnection",
1835
- "service": "sso"
1836
- },
1837
- "GET /organizations/{organization_id}/it_contacts": {
1838
- "sdkMethod": "listItContacts",
1839
- "service": "organizations"
1840
- },
1841
- "POST /organizations/{organization_id}/it_contacts": {
1842
- "sdkMethod": "createItContact",
1843
- "service": "organizations"
1844
- },
1845
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1846
- "sdkMethod": "deleteItContact",
1847
- "service": "organizations"
1848
- },
1849
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1850
- "sdkMethod": "inviteItContact",
1851
- "service": "organizations"
1852
- },
1853
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1854
- "sdkMethod": "revokeItContact",
1855
- "service": "organizations"
1856
- },
1857
- "POST /platform/teams": {
1858
- "sdkMethod": "createTeam",
1859
- "service": "platformTeams"
1860
- },
1861
- "GET /platform/teams/{team_id}": {
1862
- "sdkMethod": "getTeam",
1863
- "service": "platformTeams"
1864
- },
1865
- "DELETE /user_management/waitlist_entries/{id}": {
1866
- "sdkMethod": "deleteWaitlistEntry",
1867
- "service": "userManagement"
1868
- },
1869
- "POST /user_management/waitlist_entries/{id}/approve": {
1870
- "sdkMethod": "createWaitlistEntryApprove",
1871
- "service": "userManagement"
1872
- },
1873
- "POST /user_management/waitlist_entries/{id}/deny": {
1874
- "sdkMethod": "createWaitlistEntryDeny",
1875
- "service": "userManagement"
1876
- },
1877
- "GET /user_management/waitlists": {
1878
- "sdkMethod": "listWaitlists",
1879
- "service": "userManagement"
1880
- },
1881
- "GET /user_management/waitlists/{id}": {
1882
- "sdkMethod": "getWaitlist",
1883
- "service": "userManagement"
1884
- },
1885
- "GET /user_management/waitlists/{id}/entries": {
1886
- "sdkMethod": "listWaitlistEntries",
1887
- "service": "userManagement"
1888
- },
1889
- "POST /user_management/waitlists/{id}/entries": {
1890
- "sdkMethod": "createWaitlistEntry",
1891
- "service": "userManagement"
1892
- },
1893
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1894
- "sdkMethod": "validateBlueprintToken",
1895
- "service": "agents"
1896
  }
1897
  }
1898
  }
 
46
  "Sources/WorkOS/Enums/CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.swift",
47
  "Sources/WorkOS/Enums/CreateConnectionOidcOptionsTokenAuthenticationMethod.swift",
48
  "Sources/WorkOS/Enums/CreateDataIntegrationAuthMethods.swift",
49
+ "Sources/WorkOS/Enums/CreateDataIntegrationOwnership.swift",
50
  "Sources/WorkOS/Enums/CreateUserInviteOptionsLocale.swift",
51
  "Sources/WorkOS/Enums/CreateUserPasswordHashType.swift",
52
  "Sources/WorkOS/Enums/CreateUserPasswordSaltPosition.swift",
 
59
  "Sources/WorkOS/Enums/DataIntegrationCredentialsInputType.swift",
60
  "Sources/WorkOS/Enums/DataIntegrationCredentialsResponseError.swift",
61
  "Sources/WorkOS/Enums/DataIntegrationCustomProviderAuthenticateVia.swift",
62
+ "Sources/WorkOS/Enums/DataIntegrationOwnership.swift",
63
  "Sources/WorkOS/Enums/DataIntegrationState.swift",
64
+ "Sources/WorkOS/Enums/DataIntegrationsGetUserTokenRequestConnectionOwner.swift",
65
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataAuthMethods.swift",
66
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataConnectedAccountAuthMethod.swift",
67
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataConnectedAccountState.swift",
68
  "Sources/WorkOS/Enums/DataIntegrationsListResponseDataOwnership.swift",
69
+ "Sources/WorkOS/Enums/DataIntegrationsUpsertApiKeyRequestConnectionOwner.swift",
70
+ "Sources/WorkOS/Enums/DataIntegrationsUpsertClientCredentialsRequestConnectionOwner.swift",
71
+ "Sources/WorkOS/Enums/DataIntegrationsVendCredentialsRequestConnectionOwner.swift",
72
  "Sources/WorkOS/Enums/DirectoryState.swift",
73
  "Sources/WorkOS/Enums/DirectoryType.swift",
74
  "Sources/WorkOS/Enums/DirectoryUserState.swift",
 
120
  "Sources/WorkOS/Enums/PatchConnectionOidcOptionsIdTokenSignatureAlgorithm.swift",
121
  "Sources/WorkOS/Enums/PatchConnectionOidcOptionsTokenAuthenticationMethod.swift",
122
  "Sources/WorkOS/Enums/PipeConnectedAccountState.swift",
123
+ "Sources/WorkOS/Enums/PipesOwnership.swift",
124
  "Sources/WorkOS/Enums/ProfileConnectionType.swift",
125
  "Sources/WorkOS/Enums/RadarListAction.swift",
126
  "Sources/WorkOS/Enums/RadarListType.swift",
 
177
  "Sources/WorkOS/Enums/WebhookEndpointStatus.swift",
178
  "Sources/WorkOS/Enums/WidgetSessionTokenScopes.swift",
179
  "Sources/WorkOS/Models/AccessTokenAgentRegistrationCredentialIssuedDataDetail.swift",
180
+ "Sources/WorkOS/Models/AccountSelectionRequiredError.swift",
181
  "Sources/WorkOS/Models/ActionAuthenticationDenied.swift",
182
  "Sources/WorkOS/Models/ActionAuthenticationDeniedData.swift",
183
  "Sources/WorkOS/Models/ActionUserRegistrationDenied.swift",
 
342
  "Sources/WorkOS/Models/AuthenticationSSOTimedOutData.swift",
343
  "Sources/WorkOS/Models/AuthenticationSSOTimedOutDataError.swift",
344
  "Sources/WorkOS/Models/AuthenticationSSOTimedOutDataSSO.swift",
345
+ "Sources/WorkOS/Models/AuthkitOAuthResource.swift",
346
  "Sources/WorkOS/Models/AuthorizationCheck.swift",
347
  "Sources/WorkOS/Models/AuthorizationCodeSessionAuthenticateRequest.swift",
348
  "Sources/WorkOS/Models/AuthorizationPermission.swift",
 
393
  "Sources/WorkOS/Models/ConnectionSAMLCertificateRenewedDataConnection.swift",
394
  "Sources/WorkOS/Models/CorsOriginResponse.swift",
395
  "Sources/WorkOS/Models/CreateApplicationSecret.swift",
396
+ "Sources/WorkOS/Models/CreateAuthkitOAuthResource.swift",
397
  "Sources/WorkOS/Models/CreateAuthorizationPermission.swift",
398
  "Sources/WorkOS/Models/CreateAuthorizationResource.swift",
399
  "Sources/WorkOS/Models/CreateConnection.swift",
 
876
  "Tests/WorkOSTests/WidgetsTests.swift"
877
  ],
878
  "operations": {
879
+ "GET /agents/blueprints": {
880
+ "sdkMethod": "listBlueprints",
881
+ "service": "agents"
882
+ },
883
+ "POST /agents/blueprints": {
884
+ "sdkMethod": "createBlueprint",
885
+ "service": "agents"
886
+ },
887
+ "GET /agents/blueprints/{agent_blueprint_id}": {
888
+ "sdkMethod": "getBlueprint",
889
+ "service": "agents"
890
+ },
891
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
892
+ "sdkMethod": "updateBlueprint",
893
+ "service": "agents"
894
+ },
895
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
896
+ "sdkMethod": "deleteBlueprint",
897
+ "service": "agents"
898
+ },
899
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
900
+ "sdkMethod": "createBlueprintToken",
901
+ "service": "agents"
902
+ },
903
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
904
+ "sdkMethod": "validateBlueprintToken",
905
+ "service": "agents"
906
+ },
907
  "PATCH /agents/claims/attempts": {
908
  "sdkMethod": "updateAttempts",
909
  "service": "agents"
 
916
  "sdkMethod": "getRegistration",
917
  "service": "agents"
918
  },
919
+ "GET /agents/instances": {
920
+ "sdkMethod": "listInstances",
921
+ "service": "agents"
922
+ },
923
+ "GET /agents/instances/{agent_instance_id}": {
924
+ "sdkMethod": "getInstance",
925
+ "service": "agents"
926
+ },
927
+ "DELETE /agents/instances/{agent_instance_id}": {
928
+ "sdkMethod": "deleteInstance",
929
+ "service": "agents"
930
+ },
931
+ "GET /agents/sessions": {
932
+ "sdkMethod": "listSessions",
933
+ "service": "agents"
934
+ },
935
+ "GET /agents/sessions/{agent_instance_session_id}": {
936
+ "sdkMethod": "getSession",
937
+ "service": "agents"
938
+ },
939
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
940
+ "sdkMethod": "revokeSession",
941
+ "service": "agents"
942
+ },
943
  "POST /auth/challenges/{id}/verify": {
944
  "sdkMethod": "verifyChallenge",
945
  "service": "multiFactorAuth"
 
1198
  "sdkMethod": "listConnections",
1199
  "service": "sso"
1200
  },
1201
+ "POST /connections": {
1202
+ "sdkMethod": "createConnection",
1203
+ "service": "sso"
1204
+ },
1205
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1206
+ "sdkMethod": "listConnectionSAMLIdpSigningCerts",
1207
+ "service": "sso"
1208
+ },
1209
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1210
+ "sdkMethod": "createConnectionSAMLIdpSigningCert",
1211
+ "service": "sso"
1212
+ },
1213
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1214
+ "sdkMethod": "deleteConnectionSAMLIdpSigningCert",
1215
+ "service": "sso"
1216
+ },
1217
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1218
+ "sdkMethod": "listConnectionSAMLSpEncryptionCerts",
1219
+ "service": "sso"
1220
+ },
1221
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1222
+ "sdkMethod": "createConnectionSAMLSpEncryptionCert",
1223
+ "service": "sso"
1224
+ },
1225
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1226
+ "sdkMethod": "deleteConnectionSAMLSpEncryptionCert",
1227
+ "service": "sso"
1228
+ },
1229
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1230
+ "sdkMethod": "listConnectionSAMLSpSigningCert",
1231
+ "service": "sso"
1232
+ },
1233
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1234
+ "sdkMethod": "createConnectionSAMLSpSigningCert",
1235
+ "service": "sso"
1236
+ },
1237
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1238
+ "sdkMethod": "deleteConnectionSAMLSpSigningCert",
1239
+ "service": "sso"
1240
+ },
1241
  "GET /connections/{id}": {
1242
  "sdkMethod": "getConnection",
1243
  "service": "sso"
1244
  },
1245
+ "PATCH /connections/{id}": {
1246
+ "sdkMethod": "updateConnection",
1247
+ "service": "sso"
1248
+ },
1249
  "DELETE /connections/{id}": {
1250
  "sdkMethod": "deleteConnection",
1251
  "service": "sso"
 
1290
  "sdkMethod": "authorizeDataIntegration",
1291
  "service": "pipes"
1292
  },
1293
+ "PUT /data-integrations/{slug}/client-credentials": {
1294
+ "sdkMethod": "updateDataIntegrationClientCredentials",
1295
+ "service": "pipes"
1296
+ },
1297
  "POST /data-integrations/{slug}/credentials": {
1298
  "sdkMethod": "createDataIntegrationCredential",
1299
  "service": "pipes"
1300
  },
1301
+ "GET /data-integrations/{slug}/organization": {
1302
+ "sdkMethod": "listDataIntegrationOrganization",
1303
+ "service": "pipes"
1304
+ },
1305
+ "PUT /data-integrations/{slug}/organization": {
1306
+ "sdkMethod": "updateDataIntegrationOrganization",
1307
+ "service": "pipes"
1308
+ },
1309
+ "DELETE /data-integrations/{slug}/organization": {
1310
+ "sdkMethod": "deleteDataIntegrationOrganization",
1311
+ "service": "pipes"
1312
+ },
1313
  "POST /data-integrations/{provider}/token": {
1314
  "sdkMethod": "getAccessToken",
1315
  "service": "pipes"
 
1446
  "sdkMethod": "listAuthorizedApplications",
1447
  "service": "organizations"
1448
  },
1449
+ "GET /organizations/{organization_id}/it_contacts": {
1450
+ "sdkMethod": "listItContacts",
1451
+ "service": "organizations"
1452
+ },
1453
+ "POST /organizations/{organization_id}/it_contacts": {
1454
+ "sdkMethod": "createItContact",
1455
+ "service": "organizations"
1456
+ },
1457
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1458
+ "sdkMethod": "deleteItContact",
1459
+ "service": "organizations"
1460
+ },
1461
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1462
+ "sdkMethod": "inviteItContact",
1463
+ "service": "organizations"
1464
+ },
1465
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1466
+ "sdkMethod": "revokeItContact",
1467
+ "service": "organizations"
1468
+ },
1469
  "GET /organizations/{id}/audit_logs_retention": {
1470
  "sdkMethod": "getOrganizationAuditLogsRetention",
1471
  "service": "auditLogs"
 
1558
  "sdkMethod": "deleteOrganizationMembership",
1559
  "service": "groups"
1560
  },
1561
+ "POST /platform/teams": {
1562
+ "sdkMethod": "createTeam",
1563
+ "service": "platformTeams"
1564
+ },
1565
+ "GET /platform/teams/{team_id}": {
1566
+ "sdkMethod": "getTeam",
1567
+ "service": "platformTeams"
1568
+ },
1569
  "POST /portal/generate_link": {
1570
  "sdkMethod": "generateLink",
1571
  "service": "adminPortal"
 
1648
  "sdkMethod": "revokeSession",
1649
  "service": "userManagement"
1650
  },
1651
+ "GET /user_management/authkit_oauth_resources": {
1652
+ "sdkMethod": "listAuthkitOAuthResources",
1653
+ "service": "userManagement"
1654
+ },
1655
+ "POST /user_management/authkit_oauth_resources": {
1656
+ "sdkMethod": "createAuthkitOAuthResource",
1657
+ "service": "userManagement"
1658
+ },
1659
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
1660
+ "sdkMethod": "deleteAuthkitOAuthResource",
1661
+ "service": "userManagement"
1662
+ },
1663
  "GET /user_management/cors_origins": {
1664
  "sdkMethod": "listCorsOrigins",
1665
  "service": "userManagement"
 
1796
  "sdkMethod": "deleteAuthorizedApplication",
1797
  "service": "userManagement"
1798
  },
1799
+ "DELETE /user_management/waitlist_entries/{id}": {
1800
+ "sdkMethod": "deleteWaitlistEntry",
1801
+ "service": "userManagement"
1802
+ },
1803
+ "POST /user_management/waitlist_entries/{id}/approve": {
1804
+ "sdkMethod": "createWaitlistEntryApprove",
1805
+ "service": "userManagement"
1806
+ },
1807
+ "POST /user_management/waitlist_entries/{id}/deny": {
1808
+ "sdkMethod": "createWaitlistEntryDeny",
1809
+ "service": "userManagement"
1810
+ },
1811
+ "GET /user_management/waitlists": {
1812
+ "sdkMethod": "listWaitlists",
1813
+ "service": "userManagement"
1814
+ },
1815
+ "GET /user_management/waitlists/{id}": {
1816
+ "sdkMethod": "getWaitlist",
1817
+ "service": "userManagement"
1818
+ },
1819
+ "GET /user_management/waitlists/{id}/entries": {
1820
+ "sdkMethod": "listWaitlistEntries",
1821
+ "service": "userManagement"
1822
+ },
1823
+ "POST /user_management/waitlists/{id}/entries": {
1824
+ "sdkMethod": "createWaitlistEntry",
1825
+ "service": "userManagement"
1826
+ },
1827
  "GET /user_management/users/{userId}/api_keys": {
1828
  "sdkMethod": "listApiKeys",
1829
  "service": "userManagement"
 
1927
  "POST /widgets/token": {
1928
  "sdkMethod": "createToken",
1929
  "service": "widgets"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1930
  }
1931
  }
1932
  }
ios/Sources/WorkOS/Enums/CreateDataIntegrationOwnership.swift
ios/Sources/WorkOS/Enums/CreateDataIntegrationOwnership.swift ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid CreateDataIntegrationOwnership values.
6
+ public enum CreateDataIntegrationOwnership: RawRepresentable, Codable, Sendable, Hashable {
7
+ case user
8
+ case organization
9
+ /// A value not known at SDK generation time.
10
+ case unknown(String)
11
+
12
+ public init(rawValue: String) {
13
+ switch rawValue {
14
+ case "user": self = .user
15
+ case "organization": self = .organization
16
+ default: self = .unknown(rawValue)
17
+ }
18
+ }
19
+
20
+ public var rawValue: String {
21
+ switch self {
22
+ case .user: return "user"
23
+ case .organization: return "organization"
24
+ case .unknown(let value): return value
25
+ }
26
+ }
27
+
28
+ public init(from decoder: Decoder) throws {
29
+ let raw = try decoder.singleValueContainer().decode(String.self)
30
+ self.init(rawValue: raw)
31
+ }
32
+
33
+ public func encode(to encoder: Encoder) throws {
34
+ var container = encoder.singleValueContainer()
35
+ try container.encode(rawValue)
36
+ }
37
+
38
+ public static let allKnownCases: [CreateDataIntegrationOwnership] = [.user, .organization]
39
+ }
ios/Sources/WorkOS/Enums/DataIntegrationOwnership.swift
ios/Sources/WorkOS/Enums/DataIntegrationOwnership.swift ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid DataIntegrationOwnership values.
6
+ public enum DataIntegrationOwnership: RawRepresentable, Codable, Sendable, Hashable {
7
+ case user
8
+ case organization
9
+ /// A value not known at SDK generation time.
10
+ case unknown(String)
11
+
12
+ public init(rawValue: String) {
13
+ switch rawValue {
14
+ case "user": self = .user
15
+ case "organization": self = .organization
16
+ default: self = .unknown(rawValue)
17
+ }
18
+ }
19
+
20
+ public var rawValue: String {
21
+ switch self {
22
+ case .user: return "user"
23
+ case .organization: return "organization"
24
+ case .unknown(let value): return value
25
+ }
26
+ }
27
+
28
+ public init(from decoder: Decoder) throws {
29
+ let raw = try decoder.singleValueContainer().decode(String.self)
30
+ self.init(rawValue: raw)
31
+ }
32
+
33
+ public func encode(to encoder: Encoder) throws {
34
+ var container = encoder.singleValueContainer()
35
+ try container.encode(rawValue)
36
+ }
37
+
38
+ public static let allKnownCases: [DataIntegrationOwnership] = [.user, .organization]
39
+ }
ios/Sources/WorkOS/Enums/DataIntegrationsGetUserTokenRequestConnectionOwner.swift
ios/Sources/WorkOS/Enums/DataIntegrationsGetUserTokenRequestConnectionOwner.swift ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid DataIntegrationsGetUserTokenRequestConnectionOwner values.
6
+ public enum DataIntegrationsGetUserTokenRequestConnectionOwner: RawRepresentable, Codable, Sendable,
7
+ Hashable
8
+ {
9
+ case user
10
+ case organization
11
+ /// A value not known at SDK generation time.
12
+ case unknown(String)
13
+
14
+ public init(rawValue: String) {
15
+ switch rawValue {
16
+ case "user": self = .user
17
+ case "organization": self = .organization
18
+ default: self = .unknown(rawValue)
19
+ }
20
+ }
21
+
22
+ public var rawValue: String {
23
+ switch self {
24
+ case .user: return "user"
25
+ case .organization: return "organization"
26
+ case .unknown(let value): return value
27
+ }
28
+ }
29
+
30
+ public init(from decoder: Decoder) throws {
31
+ let raw = try decoder.singleValueContainer().decode(String.self)
32
+ self.init(rawValue: raw)
33
+ }
34
+
35
+ public func encode(to encoder: Encoder) throws {
36
+ var container = encoder.singleValueContainer()
37
+ try container.encode(rawValue)
38
+ }
39
+
40
+ public static let allKnownCases: [DataIntegrationsGetUserTokenRequestConnectionOwner] = [
41
+ .user,
42
+ .organization,
43
+ ]
44
+ }
ios/Sources/WorkOS/Enums/DataIntegrationsUpsertApiKeyRequestConnectionOwner.swift
ios/Sources/WorkOS/Enums/DataIntegrationsUpsertApiKeyRequestConnectionOwner.swift ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid DataIntegrationsUpsertApiKeyRequestConnectionOwner values.
6
+ public enum DataIntegrationsUpsertApiKeyRequestConnectionOwner: RawRepresentable, Codable, Sendable,
7
+ Hashable
8
+ {
9
+ case user
10
+ case organization
11
+ /// A value not known at SDK generation time.
12
+ case unknown(String)
13
+
14
+ public init(rawValue: String) {
15
+ switch rawValue {
16
+ case "user": self = .user
17
+ case "organization": self = .organization
18
+ default: self = .unknown(rawValue)
19
+ }
20
+ }
21
+
22
+ public var rawValue: String {
23
+ switch self {
24
+ case .user: return "user"
25
+ case .organization: return "organization"
26
+ case .unknown(let value): return value
27
+ }
28
+ }
29
+
30
+ public init(from decoder: Decoder) throws {
31
+ let raw = try decoder.singleValueContainer().decode(String.self)
32
+ self.init(rawValue: raw)
33
+ }
34
+
35
+ public func encode(to encoder: Encoder) throws {
36
+ var container = encoder.singleValueContainer()
37
+ try container.encode(rawValue)
38
+ }
39
+
40
+ public static let allKnownCases: [DataIntegrationsUpsertApiKeyRequestConnectionOwner] = [
41
+ .user,
42
+ .organization,
43
+ ]
44
+ }
ios/Sources/WorkOS/Enums/DataIntegrationsUpsertClientCredentialsRequestConnectionOwner.swift
ios/Sources/WorkOS/Enums/DataIntegrationsUpsertClientCredentialsRequestConnectionOwner.swift ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid DataIntegrationsUpsertClientCredentialsRequestConnectionOwner values.
6
+ public enum DataIntegrationsUpsertClientCredentialsRequestConnectionOwner: RawRepresentable,
7
+ Codable, Sendable, Hashable
8
+ {
9
+ case user
10
+ case organization
11
+ /// A value not known at SDK generation time.
12
+ case unknown(String)
13
+
14
+ public init(rawValue: String) {
15
+ switch rawValue {
16
+ case "user": self = .user
17
+ case "organization": self = .organization
18
+ default: self = .unknown(rawValue)
19
+ }
20
+ }
21
+
22
+ public var rawValue: String {
23
+ switch self {
24
+ case .user: return "user"
25
+ case .organization: return "organization"
26
+ case .unknown(let value): return value
27
+ }
28
+ }
29
+
30
+ public init(from decoder: Decoder) throws {
31
+ let raw = try decoder.singleValueContainer().decode(String.self)
32
+ self.init(rawValue: raw)
33
+ }
34
+
35
+ public func encode(to encoder: Encoder) throws {
36
+ var container = encoder.singleValueContainer()
37
+ try container.encode(rawValue)
38
+ }
39
+
40
+ public static let allKnownCases:
41
+ [DataIntegrationsUpsertClientCredentialsRequestConnectionOwner] = [
42
+ .user,
43
+ .organization,
44
+ ]
45
+ }
ios/Sources/WorkOS/Enums/DataIntegrationsVendCredentialsRequestConnectionOwner.swift
ios/Sources/WorkOS/Enums/DataIntegrationsVendCredentialsRequestConnectionOwner.swift ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid DataIntegrationsVendCredentialsRequestConnectionOwner values.
6
+ public enum DataIntegrationsVendCredentialsRequestConnectionOwner: RawRepresentable, Codable,
7
+ Sendable, Hashable
8
+ {
9
+ case user
10
+ case organization
11
+ /// A value not known at SDK generation time.
12
+ case unknown(String)
13
+
14
+ public init(rawValue: String) {
15
+ switch rawValue {
16
+ case "user": self = .user
17
+ case "organization": self = .organization
18
+ default: self = .unknown(rawValue)
19
+ }
20
+ }
21
+
22
+ public var rawValue: String {
23
+ switch self {
24
+ case .user: return "user"
25
+ case .organization: return "organization"
26
+ case .unknown(let value): return value
27
+ }
28
+ }
29
+
30
+ public init(from decoder: Decoder) throws {
31
+ let raw = try decoder.singleValueContainer().decode(String.self)
32
+ self.init(rawValue: raw)
33
+ }
34
+
35
+ public func encode(to encoder: Encoder) throws {
36
+ var container = encoder.singleValueContainer()
37
+ try container.encode(rawValue)
38
+ }
39
+
40
+ public static let allKnownCases: [DataIntegrationsVendCredentialsRequestConnectionOwner] = [
41
+ .user,
42
+ .organization,
43
+ ]
44
+ }
ios/Sources/WorkOS/Enums/PipesOwnership.swift
ios/Sources/WorkOS/Enums/PipesOwnership.swift ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ /// Enumeration of valid PipesOwnership values.
6
+ public enum PipesOwnership: RawRepresentable, Codable, Sendable, Hashable {
7
+ case user
8
+ case organization
9
+ /// A value not known at SDK generation time.
10
+ case unknown(String)
11
+
12
+ public init(rawValue: String) {
13
+ switch rawValue {
14
+ case "user": self = .user
15
+ case "organization": self = .organization
16
+ default: self = .unknown(rawValue)
17
+ }
18
+ }
19
+
20
+ public var rawValue: String {
21
+ switch self {
22
+ case .user: return "user"
23
+ case .organization: return "organization"
24
+ case .unknown(let value): return value
25
+ }
26
+ }
27
+
28
+ public init(from decoder: Decoder) throws {
29
+ let raw = try decoder.singleValueContainer().decode(String.self)
30
+ self.init(rawValue: raw)
31
+ }
32
+
33
+ public func encode(to encoder: Encoder) throws {
34
+ var container = encoder.singleValueContainer()
35
+ try container.encode(rawValue)
36
+ }
37
+
38
+ public static let allKnownCases: [PipesOwnership] = [.user, .organization]
39
+ }
ios/Sources/WorkOS/Enums/ResourceExportCompletedDataResourceType.swift
ios/Sources/WorkOS/Enums/ResourceExportCompletedDataResourceType.swift CHANGED
@@ -9,6 +9,7 @@ public enum ResourceExportCompletedDataResourceType: RawRepresentable, Codable,
9
  case events
10
  case sessions
11
  case auditLogEvents
 
12
  /// A value not known at SDK generation time.
13
  case unknown(String)
14
 
@@ -19,6 +20,7 @@ public enum ResourceExportCompletedDataResourceType: RawRepresentable, Codable,
19
  case "events": self = .events
20
  case "sessions": self = .sessions
21
  case "auditLogEvents": self = .auditLogEvents
 
22
  default: self = .unknown(rawValue)
23
  }
24
  }
@@ -30,6 +32,7 @@ public enum ResourceExportCompletedDataResourceType: RawRepresentable, Codable,
30
  case .events: return "events"
31
  case .sessions: return "sessions"
32
  case .auditLogEvents: return "auditLogEvents"
 
33
  case .unknown(let value): return value
34
  }
35
  }
@@ -50,5 +53,6 @@ public enum ResourceExportCompletedDataResourceType: RawRepresentable, Codable,
50
  .events,
51
  .sessions,
52
  .auditLogEvents,
 
53
  ]
54
  }
 
9
  case events
10
  case sessions
11
  case auditLogEvents
12
+ case connections
13
  /// A value not known at SDK generation time.
14
  case unknown(String)
15
 
 
20
  case "events": self = .events
21
  case "sessions": self = .sessions
22
  case "auditLogEvents": self = .auditLogEvents
23
+ case "connections": self = .connections
24
  default: self = .unknown(rawValue)
25
  }
26
  }
 
32
  case .events: return "events"
33
  case .sessions: return "sessions"
34
  case .auditLogEvents: return "auditLogEvents"
35
+ case .connections: return "connections"
36
  case .unknown(let value): return value
37
  }
38
  }
 
53
  .events,
54
  .sessions,
55
  .auditLogEvents,
56
+ .connections,
57
  ]
58
  }
ios/Sources/WorkOS/Enums/ResourceExportCreatedDataResourceType.swift
ios/Sources/WorkOS/Enums/ResourceExportCreatedDataResourceType.swift CHANGED
@@ -9,6 +9,7 @@ public enum ResourceExportCreatedDataResourceType: RawRepresentable, Codable, Se
9
  case events
10
  case sessions
11
  case auditLogEvents
 
12
  /// A value not known at SDK generation time.
13
  case unknown(String)
14
 
@@ -19,6 +20,7 @@ public enum ResourceExportCreatedDataResourceType: RawRepresentable, Codable, Se
19
  case "events": self = .events
20
  case "sessions": self = .sessions
21
  case "auditLogEvents": self = .auditLogEvents
 
22
  default: self = .unknown(rawValue)
23
  }
24
  }
@@ -30,6 +32,7 @@ public enum ResourceExportCreatedDataResourceType: RawRepresentable, Codable, Se
30
  case .events: return "events"
31
  case .sessions: return "sessions"
32
  case .auditLogEvents: return "auditLogEvents"
 
33
  case .unknown(let value): return value
34
  }
35
  }
@@ -50,5 +53,6 @@ public enum ResourceExportCreatedDataResourceType: RawRepresentable, Codable, Se
50
  .events,
51
  .sessions,
52
  .auditLogEvents,
 
53
  ]
54
  }
 
9
  case events
10
  case sessions
11
  case auditLogEvents
12
+ case connections
13
  /// A value not known at SDK generation time.
14
  case unknown(String)
15
 
 
20
  case "events": self = .events
21
  case "sessions": self = .sessions
22
  case "auditLogEvents": self = .auditLogEvents
23
+ case "connections": self = .connections
24
  default: self = .unknown(rawValue)
25
  }
26
  }
 
32
  case .events: return "events"
33
  case .sessions: return "sessions"
34
  case .auditLogEvents: return "auditLogEvents"
35
+ case .connections: return "connections"
36
  case .unknown(let value): return value
37
  }
38
  }
 
53
  .events,
54
  .sessions,
55
  .auditLogEvents,
56
+ .connections,
57
  ]
58
  }
ios/Sources/WorkOS/Enums/ResourceExportDownloadedDataResourceType.swift
ios/Sources/WorkOS/Enums/ResourceExportDownloadedDataResourceType.swift CHANGED
@@ -10,6 +10,7 @@ public enum ResourceExportDownloadedDataResourceType: RawRepresentable, Codable,
10
  case events
11
  case sessions
12
  case auditLogEvents
 
13
  /// A value not known at SDK generation time.
14
  case unknown(String)
15
 
@@ -20,6 +21,7 @@ public enum ResourceExportDownloadedDataResourceType: RawRepresentable, Codable,
20
  case "events": self = .events
21
  case "sessions": self = .sessions
22
  case "auditLogEvents": self = .auditLogEvents
 
23
  default: self = .unknown(rawValue)
24
  }
25
  }
@@ -31,6 +33,7 @@ public enum ResourceExportDownloadedDataResourceType: RawRepresentable, Codable,
31
  case .events: return "events"
32
  case .sessions: return "sessions"
33
  case .auditLogEvents: return "auditLogEvents"
 
34
  case .unknown(let value): return value
35
  }
36
  }
@@ -51,5 +54,6 @@ public enum ResourceExportDownloadedDataResourceType: RawRepresentable, Codable,
51
  .events,
52
  .sessions,
53
  .auditLogEvents,
 
54
  ]
55
  }
 
10
  case events
11
  case sessions
12
  case auditLogEvents
13
+ case connections
14
  /// A value not known at SDK generation time.
15
  case unknown(String)
16
 
 
21
  case "events": self = .events
22
  case "sessions": self = .sessions
23
  case "auditLogEvents": self = .auditLogEvents
24
+ case "connections": self = .connections
25
  default: self = .unknown(rawValue)
26
  }
27
  }
 
33
  case .events: return "events"
34
  case .sessions: return "sessions"
35
  case .auditLogEvents: return "auditLogEvents"
36
+ case .connections: return "connections"
37
  case .unknown(let value): return value
38
  }
39
  }
 
54
  .events,
55
  .sessions,
56
  .auditLogEvents,
57
+ .connections,
58
  ]
59
  }
ios/Sources/WorkOS/Enums/ResourceExportFailedDataResourceType.swift
ios/Sources/WorkOS/Enums/ResourceExportFailedDataResourceType.swift CHANGED
@@ -9,6 +9,7 @@ public enum ResourceExportFailedDataResourceType: RawRepresentable, Codable, Sen
9
  case events
10
  case sessions
11
  case auditLogEvents
 
12
  /// A value not known at SDK generation time.
13
  case unknown(String)
14
 
@@ -19,6 +20,7 @@ public enum ResourceExportFailedDataResourceType: RawRepresentable, Codable, Sen
19
  case "events": self = .events
20
  case "sessions": self = .sessions
21
  case "auditLogEvents": self = .auditLogEvents
 
22
  default: self = .unknown(rawValue)
23
  }
24
  }
@@ -30,6 +32,7 @@ public enum ResourceExportFailedDataResourceType: RawRepresentable, Codable, Sen
30
  case .events: return "events"
31
  case .sessions: return "sessions"
32
  case .auditLogEvents: return "auditLogEvents"
 
33
  case .unknown(let value): return value
34
  }
35
  }
@@ -50,5 +53,6 @@ public enum ResourceExportFailedDataResourceType: RawRepresentable, Codable, Sen
50
  .events,
51
  .sessions,
52
  .auditLogEvents,
 
53
  ]
54
  }
 
9
  case events
10
  case sessions
11
  case auditLogEvents
12
+ case connections
13
  /// A value not known at SDK generation time.
14
  case unknown(String)
15
 
 
20
  case "events": self = .events
21
  case "sessions": self = .sessions
22
  case "auditLogEvents": self = .auditLogEvents
23
+ case "connections": self = .connections
24
  default: self = .unknown(rawValue)
25
  }
26
  }
 
32
  case .events: return "events"
33
  case .sessions: return "sessions"
34
  case .auditLogEvents: return "auditLogEvents"
35
+ case .connections: return "connections"
36
  case .unknown(let value): return value
37
  }
38
  }
 
53
  .events,
54
  .sessions,
55
  .auditLogEvents,
56
+ .connections,
57
  ]
58
  }
ios/Sources/WorkOS/Models/AccountSelectionRequiredError.swift
ios/Sources/WorkOS/Models/AccountSelectionRequiredError.swift ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ public struct AccountSelectionRequiredError: Codable, Sendable, Equatable {
6
+ /// Indicates that several connected accounts match and the request must name one.
7
+ public let code: String
8
+ /// A human-readable explanation of the ambiguity.
9
+ public let message: String
10
+
11
+ public init(
12
+ code: String,
13
+ message: String
14
+ ) {
15
+ self.code = code
16
+ self.message = message
17
+ }
18
+
19
+ private enum CodingKeys: String, CodingKey {
20
+ case code
21
+ case message
22
+ }
23
+ }
ios/Sources/WorkOS/Models/AuthkitOAuthResource.swift
ios/Sources/WorkOS/Models/AuthkitOAuthResource.swift ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ public struct AuthkitOAuthResource: Codable, Sendable, Equatable {
6
+ /// The object type.
7
+ public let object: String
8
+ /// The ID of the AuthKit OAuth resource.
9
+ public let id: String
10
+ /// The resource URI.
11
+ public let uri: String
12
+ /// Whether this is the default AuthKit OAuth resource for the environment.
13
+ public let `default`: Bool
14
+ /// The timestamp when the AuthKit OAuth resource was created.
15
+ public let createdAt: String
16
+ /// The timestamp when the AuthKit OAuth resource was last updated.
17
+ public let updatedAt: String
18
+
19
+ public init(
20
+ object: String,
21
+ id: String,
22
+ uri: String,
23
+ `default`: Bool,
24
+ createdAt: String,
25
+ updatedAt: String
26
+ ) {
27
+ self.object = object
28
+ self.id = id
29
+ self.uri = uri
30
+ self.`default` = `default`
31
+ self.createdAt = createdAt
32
+ self.updatedAt = updatedAt
33
+ }
34
+
35
+ private enum CodingKeys: String, CodingKey {
36
+ case object
37
+ case id
38
+ case uri
39
+ case `default`
40
+ case createdAt = "created_at"
41
+ case updatedAt = "updated_at"
42
+ }
43
+ }
ios/Sources/WorkOS/Models/CreateAuthkitOAuthResource.swift
ios/Sources/WorkOS/Models/CreateAuthkitOAuthResource.swift ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ import Foundation
4
+
5
+ public struct CreateAuthkitOAuthResource: Codable, Sendable, Equatable {
6
+ /// The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
7
+ public let uri: String
8
+ /// Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
9
+ public let `default`: Bool?
10
+
11
+ public init(
12
+ uri: String,
13
+ `default`: Bool? = nil
14
+ ) {
15
+ self.uri = uri
16
+ self.`default` = `default`
17
+ }
18
+
19
+ private enum CodingKeys: String, CodingKey {
20
+ case uri
21
+ case `default`
22
+ }
23
+ }
ios/Sources/WorkOS/Models/CreateDataIntegration.swift
ios/Sources/WorkOS/Models/CreateDataIntegration.swift CHANGED
@@ -5,6 +5,8 @@ import Foundation
5
  public struct CreateDataIntegration: Codable, Sendable, Equatable {
6
  /// The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
7
  public let provider: String
 
 
8
  /// An optional description of the Data Integration.
9
  public let description: String?
10
  /// Whether the Data Integration is enabled. Defaults to `false`.
@@ -24,6 +26,7 @@ public struct CreateDataIntegration: Codable, Sendable, Equatable {
24
 
25
  public init(
26
  provider: String,
 
27
  description: String? = nil,
28
  enabled: Bool? = nil,
29
  scopes: [String]? = nil,
@@ -34,6 +37,7 @@ public struct CreateDataIntegration: Codable, Sendable, Equatable {
34
  customProvider: CustomProviderDefinition? = nil
35
  ) {
36
  self.provider = provider
 
37
  self.description = description
38
  self.enabled = enabled
39
  self.scopes = scopes
@@ -46,6 +50,7 @@ public struct CreateDataIntegration: Codable, Sendable, Equatable {
46
 
47
  private enum CodingKeys: String, CodingKey {
48
  case provider
 
49
  case description
50
  case enabled
51
  case scopes
 
5
  public struct CreateDataIntegration: Codable, Sendable, Equatable {
6
  /// The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
7
  public let provider: String
8
+ /// Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
9
+ public let ownership: CreateDataIntegrationOwnership?
10
  /// An optional description of the Data Integration.
11
  public let description: String?
12
  /// Whether the Data Integration is enabled. Defaults to `false`.
 
26
 
27
  public init(
28
  provider: String,
29
+ ownership: CreateDataIntegrationOwnership? = nil,
30
  description: String? = nil,
31
  enabled: Bool? = nil,
32
  scopes: [String]? = nil,
 
37
  customProvider: CustomProviderDefinition? = nil
38
  ) {
39
  self.provider = provider
40
+ self.ownership = ownership
41
  self.description = description
42
  self.enabled = enabled
43
  self.scopes = scopes
 
50
 
51
  private enum CodingKeys: String, CodingKey {
52
  case provider
53
+ case ownership
54
  case description
55
  case enabled
56
  case scopes
ios/Sources/WorkOS/Models/DataIntegration.swift
ios/Sources/WorkOS/Models/DataIntegration.swift CHANGED
@@ -11,6 +11,8 @@ public struct DataIntegration: Codable, Sendable, Equatable {
11
  public let slug: String
12
  /// The integration type derived from the provider.
13
  public let integrationType: String
 
 
14
  /// An optional description of the Data Integration.
15
  public let description: String?
16
  /// Whether the Data Integration is enabled.
@@ -41,6 +43,7 @@ public struct DataIntegration: Codable, Sendable, Equatable {
41
  id: String,
42
  slug: String,
43
  integrationType: String,
 
44
  enabled: Bool,
45
  state: DataIntegrationState,
46
  redirectUri: String,
@@ -58,6 +61,7 @@ public struct DataIntegration: Codable, Sendable, Equatable {
58
  self.id = id
59
  self.slug = slug
60
  self.integrationType = integrationType
 
61
  self.description = description
62
  self.enabled = enabled
63
  self.state = state
@@ -77,6 +81,7 @@ public struct DataIntegration: Codable, Sendable, Equatable {
77
  case id
78
  case slug
79
  case integrationType = "integration_type"
 
80
  case description
81
  case enabled
82
  case state
 
11
  public let slug: String
12
  /// The integration type derived from the provider.
13
  public let integrationType: String
14
+ /// Who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation.
15
+ public let ownership: DataIntegrationOwnership
16
  /// An optional description of the Data Integration.
17
  public let description: String?
18
  /// Whether the Data Integration is enabled.
 
43
  id: String,
44
  slug: String,
45
  integrationType: String,
46
+ ownership: DataIntegrationOwnership,
47
  enabled: Bool,
48
  state: DataIntegrationState,
49
  redirectUri: String,
 
61
  self.id = id
62
  self.slug = slug
63
  self.integrationType = integrationType
64
+ self.ownership = ownership
65
  self.description = description
66
  self.enabled = enabled
67
  self.state = state
 
81
  case id
82
  case slug
83
  case integrationType = "integration_type"
84
+ case ownership
85
  case description
86
  case enabled
87
  case state
ios/Sources/WorkOS/Models/DataIntegrationInstallation.swift
ios/Sources/WorkOS/Models/DataIntegrationInstallation.swift CHANGED
@@ -5,16 +5,16 @@ import Foundation
5
  public struct DataIntegrationInstallation: Codable, Sendable, Equatable {
6
  /// Unique identifier of the installation.
7
  public let id: String
8
- /// The User the API key was installed for.
9
- public let userId: String
10
- /// The Organization the installation is scoped to, or null when unscoped.
11
  public let organizationId: String?
12
  /// The last four characters of the stored API key. The full key is never returned.
13
  public let apiKeyLast4: String?
14
 
15
  public init(
16
  id: String,
17
- userId: String,
18
  organizationId: String? = nil,
19
  apiKeyLast4: String? = nil
20
  ) {
 
5
  public struct DataIntegrationInstallation: Codable, Sendable, Equatable {
6
  /// Unique identifier of the installation.
7
  public let id: String
8
+ /// The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization.
9
+ public let userId: String?
10
+ /// The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped.
11
  public let organizationId: String?
12
  /// The last four characters of the stored API key. The full key is never returned.
13
  public let apiKeyLast4: String?
14
 
15
  public init(
16
  id: String,
17
+ userId: String? = nil,
18
  organizationId: String? = nil,
19
  apiKeyLast4: String? = nil
20
  ) {
ios/Sources/WorkOS/Models/DataIntegrationsGetUserTokenRequest.swift
ios/Sources/WorkOS/Models/DataIntegrationsGetUserTokenRequest.swift CHANGED
@@ -3,26 +3,36 @@
3
  import Foundation
4
 
5
  public struct DataIntegrationsGetUserTokenRequest: Codable, Sendable, Equatable {
6
- /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
7
  public let userId: String
8
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
9
  public let organizationId: String?
10
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
11
  public let connectedAccountId: String?
 
 
 
 
12
 
13
  public init(
14
  userId: String,
15
  organizationId: String? = nil,
16
- connectedAccountId: String? = nil
 
 
17
  ) {
18
  self.userId = userId
19
  self.organizationId = organizationId
20
  self.connectedAccountId = connectedAccountId
 
 
21
  }
22
 
23
  private enum CodingKeys: String, CodingKey {
24
  case userId = "user_id"
25
  case organizationId = "organization_id"
26
  case connectedAccountId = "connected_account_id"
 
 
27
  }
28
  }
 
3
  import Foundation
4
 
5
  public struct DataIntegrationsGetUserTokenRequest: Codable, Sendable, Equatable {
6
+ /// A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
7
  public let userId: String
8
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
9
  public let organizationId: String?
10
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
11
  public let connectedAccountId: String?
12
+ /// Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
13
+ public let connectionOwner: DataIntegrationsGetUserTokenRequestConnectionOwner?
14
+ /// Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
15
+ public let supportsMultipleConnections: Bool?
16
 
17
  public init(
18
  userId: String,
19
  organizationId: String? = nil,
20
+ connectedAccountId: String? = nil,
21
+ connectionOwner: DataIntegrationsGetUserTokenRequestConnectionOwner? = nil,
22
+ supportsMultipleConnections: Bool? = nil
23
  ) {
24
  self.userId = userId
25
  self.organizationId = organizationId
26
  self.connectedAccountId = connectedAccountId
27
+ self.connectionOwner = connectionOwner
28
+ self.supportsMultipleConnections = supportsMultipleConnections
29
  }
30
 
31
  private enum CodingKeys: String, CodingKey {
32
  case userId = "user_id"
33
  case organizationId = "organization_id"
34
  case connectedAccountId = "connected_account_id"
35
+ case connectionOwner = "connection_owner"
36
+ case supportsMultipleConnections = "supports_multiple_connections"
37
  }
38
  }
ios/Sources/WorkOS/Models/DataIntegrationsListResponseData.swift
ios/Sources/WorkOS/Models/DataIntegrationsListResponseData.swift CHANGED
@@ -27,9 +27,9 @@ public struct DataIntegrationsListResponseData: Codable, Sendable, Equatable {
27
  public let createdAt: String
28
  /// The timestamp when the provider was last updated.
29
  public let updatedAt: String
30
- /// The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected.
31
  public let connectedAccount: DataIntegrationsListResponseDataConnectedAccount?
32
- /// The user's connected accounts for this provider in the requested ownership context.
33
  public let connectedAccounts: [DataIntegrationsListResponseDataConnectedAccount]
34
 
35
  public init(
 
27
  public let createdAt: String
28
  /// The timestamp when the provider was last updated.
29
  public let updatedAt: String
30
+ /// The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection.
31
  public let connectedAccount: DataIntegrationsListResponseDataConnectedAccount?
32
+ /// The user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`.
33
  public let connectedAccounts: [DataIntegrationsListResponseDataConnectedAccount]
34
 
35
  public init(
ios/Sources/WorkOS/Models/DataIntegrationsUpsertApiKeyRequest.swift
ios/Sources/WorkOS/Models/DataIntegrationsUpsertApiKeyRequest.swift CHANGED
@@ -5,24 +5,34 @@ import Foundation
5
  public struct DataIntegrationsUpsertApiKeyRequest: Codable, Sendable, Equatable {
6
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
7
  public let userId: String
8
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
9
  public let organizationId: String?
 
 
 
 
10
  /// The API key secret to store for this integration.
11
  public let secret: String
12
 
13
  public init(
14
  userId: String,
15
  secret: String,
16
- organizationId: String? = nil
 
 
17
  ) {
18
  self.userId = userId
19
  self.organizationId = organizationId
 
 
20
  self.secret = secret
21
  }
22
 
23
  private enum CodingKeys: String, CodingKey {
24
  case userId = "user_id"
25
  case organizationId = "organization_id"
 
 
26
  case secret
27
  }
28
  }
 
5
  public struct DataIntegrationsUpsertApiKeyRequest: Codable, Sendable, Equatable {
6
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
7
  public let userId: String
8
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
9
  public let organizationId: String?
10
+ /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
11
+ public let connectedAccountId: String?
12
+ /// Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
13
+ public let connectionOwner: DataIntegrationsUpsertApiKeyRequestConnectionOwner?
14
  /// The API key secret to store for this integration.
15
  public let secret: String
16
 
17
  public init(
18
  userId: String,
19
  secret: String,
20
+ organizationId: String? = nil,
21
+ connectedAccountId: String? = nil,
22
+ connectionOwner: DataIntegrationsUpsertApiKeyRequestConnectionOwner? = nil
23
  ) {
24
  self.userId = userId
25
  self.organizationId = organizationId
26
+ self.connectedAccountId = connectedAccountId
27
+ self.connectionOwner = connectionOwner
28
  self.secret = secret
29
  }
30
 
31
  private enum CodingKeys: String, CodingKey {
32
  case userId = "user_id"
33
  case organizationId = "organization_id"
34
+ case connectedAccountId = "connected_account_id"
35
+ case connectionOwner = "connection_owner"
36
  case secret
37
  }
38
  }
ios/Sources/WorkOS/Models/DataIntegrationsUpsertClientCredentialsRequest.swift
ios/Sources/WorkOS/Models/DataIntegrationsUpsertClientCredentialsRequest.swift CHANGED
@@ -5,8 +5,12 @@ import Foundation
5
  public struct DataIntegrationsUpsertClientCredentialsRequest: Codable, Sendable, Equatable {
6
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
7
  public let userId: String
8
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
9
  public let organizationId: String?
 
 
 
 
10
  /// The OAuth client ID to store for this integration.
11
  public let clientId: String
12
  /// The OAuth client secret to store for this integration.
@@ -19,10 +23,14 @@ public struct DataIntegrationsUpsertClientCredentialsRequest: Codable, Sendable,
19
  clientId: String,
20
  clientSecret: String,
21
  organizationId: String? = nil,
 
 
22
  config: [String: String]? = nil
23
  ) {
24
  self.userId = userId
25
  self.organizationId = organizationId
 
 
26
  self.clientId = clientId
27
  self.clientSecret = clientSecret
28
  self.config = config
@@ -31,6 +39,8 @@ public struct DataIntegrationsUpsertClientCredentialsRequest: Codable, Sendable,
31
  private enum CodingKeys: String, CodingKey {
32
  case userId = "user_id"
33
  case organizationId = "organization_id"
 
 
34
  case clientId = "client_id"
35
  case clientSecret = "client_secret"
36
  case config
 
5
  public struct DataIntegrationsUpsertClientCredentialsRequest: Codable, Sendable, Equatable {
6
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
7
  public let userId: String
8
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
9
  public let organizationId: String?
10
+ /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
11
+ public let connectedAccountId: String?
12
+ /// Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
13
+ public let connectionOwner: DataIntegrationsUpsertClientCredentialsRequestConnectionOwner?
14
  /// The OAuth client ID to store for this integration.
15
  public let clientId: String
16
  /// The OAuth client secret to store for this integration.
 
23
  clientId: String,
24
  clientSecret: String,
25
  organizationId: String? = nil,
26
+ connectedAccountId: String? = nil,
27
+ connectionOwner: DataIntegrationsUpsertClientCredentialsRequestConnectionOwner? = nil,
28
  config: [String: String]? = nil
29
  ) {
30
  self.userId = userId
31
  self.organizationId = organizationId
32
+ self.connectedAccountId = connectedAccountId
33
+ self.connectionOwner = connectionOwner
34
  self.clientId = clientId
35
  self.clientSecret = clientSecret
36
  self.config = config
 
39
  private enum CodingKeys: String, CodingKey {
40
  case userId = "user_id"
41
  case organizationId = "organization_id"
42
+ case connectedAccountId = "connected_account_id"
43
+ case connectionOwner = "connection_owner"
44
  case clientId = "client_id"
45
  case clientSecret = "client_secret"
46
  case config
ios/Sources/WorkOS/Models/DataIntegrationsVendCredentialsRequest.swift
ios/Sources/WorkOS/Models/DataIntegrationsVendCredentialsRequest.swift CHANGED
@@ -3,26 +3,36 @@
3
  import Foundation
4
 
5
  public struct DataIntegrationsVendCredentialsRequest: Codable, Sendable, Equatable {
6
- /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
7
  public let userId: String
8
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
9
  public let organizationId: String?
10
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
11
  public let connectedAccountId: String?
 
 
 
 
12
 
13
  public init(
14
  userId: String,
15
  organizationId: String? = nil,
16
- connectedAccountId: String? = nil
 
 
17
  ) {
18
  self.userId = userId
19
  self.organizationId = organizationId
20
  self.connectedAccountId = connectedAccountId
 
 
21
  }
22
 
23
  private enum CodingKeys: String, CodingKey {
24
  case userId = "user_id"
25
  case organizationId = "organization_id"
26
  case connectedAccountId = "connected_account_id"
 
 
27
  }
28
  }
 
3
  import Foundation
4
 
5
  public struct DataIntegrationsVendCredentialsRequest: Codable, Sendable, Equatable {
6
+ /// A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
7
  public let userId: String
8
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
9
  public let organizationId: String?
10
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
11
  public let connectedAccountId: String?
12
+ /// Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
13
+ public let connectionOwner: DataIntegrationsVendCredentialsRequestConnectionOwner?
14
+ /// Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
15
+ public let supportsMultipleConnections: Bool?
16
 
17
  public init(
18
  userId: String,
19
  organizationId: String? = nil,
20
+ connectedAccountId: String? = nil,
21
+ connectionOwner: DataIntegrationsVendCredentialsRequestConnectionOwner? = nil,
22
+ supportsMultipleConnections: Bool? = nil
23
  ) {
24
  self.userId = userId
25
  self.organizationId = organizationId
26
  self.connectedAccountId = connectedAccountId
27
+ self.connectionOwner = connectionOwner
28
+ self.supportsMultipleConnections = supportsMultipleConnections
29
  }
30
 
31
  private enum CodingKeys: String, CodingKey {
32
  case userId = "user_id"
33
  case organizationId = "organization_id"
34
  case connectedAccountId = "connected_account_id"
35
+ case connectionOwner = "connection_owner"
36
+ case supportsMultipleConnections = "supports_multiple_connections"
37
  }
38
  }
ios/Sources/WorkOS/Resources/Pipes.swift
ios/Sources/WorkOS/Resources/Pipes.swift CHANGED
@@ -8,18 +8,20 @@ public struct Pipes: Sendable {
8
 
9
  /// List data integrations
10
  ///
11
- /// Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
12
  ///
13
  /// - Parameter 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"`.
14
  /// - Parameter after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
15
  /// - Parameter limit: Upper limit on the number of objects to return, between `1` and `100`.
16
  /// - Parameter order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
 
17
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
18
  public func listDataIntegrations(
19
  before: String? = nil,
20
  after: String? = nil,
21
  limit: Int? = nil,
22
  order: PaginationOrder? = nil,
 
23
  requestOptions: RequestOptions? = nil
24
  ) async throws -> Page<DataIntegration> {
25
  let path = "data-integrations"
@@ -36,6 +38,9 @@ public struct Pipes: Sendable {
36
  if let order {
37
  query.append(URLQueryItem(name: "order", value: order.rawValue))
38
  }
 
 
 
39
  return try await transport.request(
40
  method: "GET",
41
  path: path,
@@ -52,11 +57,13 @@ public struct Pipes: Sendable {
52
  /// - Parameter 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"`.
53
  /// - Parameter limit: Upper limit on the number of objects to return, between `1` and `100`.
54
  /// - Parameter order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
 
55
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
56
  public func listDataIntegrationsAutoPaging(
57
  before: String? = nil,
58
  limit: Int? = nil,
59
  order: PaginationOrder? = nil,
 
60
  requestOptions: RequestOptions? = nil
61
  ) -> AutoPagingSequence<DataIntegration> {
62
  AutoPagingSequence { cursor in
@@ -65,6 +72,7 @@ public struct Pipes: Sendable {
65
  after: cursor,
66
  limit: limit,
67
  order: order,
 
68
  requestOptions: requestOptions
69
  )
70
  }
@@ -72,9 +80,10 @@ public struct Pipes: Sendable {
72
 
73
  /// Create a data integration
74
  ///
75
- /// Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
76
  ///
77
  /// - Parameter provider: The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
 
78
  /// - Parameter description: An optional description of the Data Integration.
79
  /// - Parameter enabled: Whether the Data Integration is enabled. Defaults to `false`.
80
  /// - Parameter scopes: The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
@@ -86,6 +95,7 @@ public struct Pipes: Sendable {
86
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
87
  public func createDataIntegration(
88
  provider: String,
 
89
  description: String? = nil,
90
  enabled: Bool? = nil,
91
  scopes: [String]? = nil,
@@ -99,6 +109,7 @@ public struct Pipes: Sendable {
99
  let path = "data-integrations"
100
  var body = EncodableBody()
101
  body.set("provider", provider)
 
102
  body.set("description", description)
103
  body.set("enabled", enabled)
104
  body.set("scopes", scopes)
@@ -119,7 +130,7 @@ public struct Pipes: Sendable {
119
 
120
  /// Get a data integration
121
  ///
122
- /// Retrieves a data integration by its slug.
123
  ///
124
  /// - Parameter slug: The slug identifier of the data integration.
125
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
@@ -140,7 +151,7 @@ public struct Pipes: Sendable {
140
 
141
  /// Update a data integration
142
  ///
143
- /// Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
144
  ///
145
  /// - Parameter slug: The slug identifier of the data integration.
146
  /// - Parameter description: An optional description of the Data Integration.
@@ -180,7 +191,7 @@ public struct Pipes: Sendable {
180
 
181
  /// Delete a data integration
182
  ///
183
- /// Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
184
  ///
185
  /// - Parameter slug: The slug identifier of the data integration.
186
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
@@ -200,17 +211,21 @@ public struct Pipes: Sendable {
200
 
201
  /// Upsert an API key for a connected account
202
  ///
203
- /// Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
204
  ///
205
  /// - Parameter slug: The identifier of the integration.
206
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
207
- /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
208
  /// - Parameter secret: The API key secret to store for this integration.
209
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
210
  public func updateDataIntegrationApiKey(
211
  slug: String,
212
  userId: String,
213
  organizationId: String? = nil,
 
 
214
  secret: String,
215
  requestOptions: RequestOptions? = nil
216
  ) async throws -> ConnectedAccount {
@@ -218,6 +233,8 @@ public struct Pipes: Sendable {
218
  var body = EncodableBody()
219
  body.set("user_id", userId)
220
  body.set("organization_id", organizationId)
 
 
221
  body.set("secret", secret)
222
  return try await transport.request(
223
  method: "PUT",
@@ -265,11 +282,13 @@ public struct Pipes: Sendable {
265
 
266
  /// Upsert client credentials for a connected account
267
  ///
268
- /// Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
269
  ///
270
  /// - Parameter slug: The identifier of the integration.
271
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
272
- /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
273
  /// - Parameter clientId: The OAuth client ID to store for this integration.
274
  /// - Parameter clientSecret: The OAuth client secret to store for this integration.
275
  /// - Parameter config: Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
@@ -278,6 +297,8 @@ public struct Pipes: Sendable {
278
  slug: String,
279
  userId: String,
280
  organizationId: String? = nil,
 
 
281
  clientId: String,
282
  clientSecret: String,
283
  config: [String: String]? = nil,
@@ -287,6 +308,8 @@ public struct Pipes: Sendable {
287
  var body = EncodableBody()
288
  body.set("user_id", userId)
289
  body.set("organization_id", organizationId)
 
 
290
  body.set("client_id", clientId)
291
  body.set("client_secret", clientSecret)
292
  body.set("config", config)
@@ -305,15 +328,19 @@ public struct Pipes: Sendable {
305
  /// Returns credentials for a user's connected account. Branches on the installation's `auth_method`: OAuth installations return an access token (refreshed if needed); API-key installations return the stored secret.
306
  ///
307
  /// - Parameter slug: The identifier of the integration.
308
- /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
309
- /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
310
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
311
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
312
  public func createDataIntegrationCredential(
313
  slug: String,
314
  userId: String,
315
  organizationId: String? = nil,
316
  connectedAccountId: String? = nil,
 
 
317
  requestOptions: RequestOptions? = nil
318
  ) async throws -> DataIntegrationCredentialsResponse {
319
  let path = "data-integrations/\(PathEncoding.segment(slug))/credentials"
@@ -321,6 +348,8 @@ public struct Pipes: Sendable {
321
  body.set("user_id", userId)
322
  body.set("organization_id", organizationId)
323
  body.set("connected_account_id", connectedAccountId)
 
 
324
  return try await transport.request(
325
  method: "POST",
326
  path: path,
@@ -331,20 +360,105 @@ public struct Pipes: Sendable {
331
  )
332
  }
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  /// Get an access token for a connected account
335
  ///
336
  /// Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
337
  ///
338
  /// - Parameter provider: The identifier of the integration.
339
- /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
340
- /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
341
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
342
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
343
  public func getAccessToken(
344
  provider: String,
345
  userId: String,
346
  organizationId: String? = nil,
347
  connectedAccountId: String? = nil,
 
 
348
  requestOptions: RequestOptions? = nil
349
  ) async throws -> DataIntegrationAccessTokenResponse {
350
  let path = "data-integrations/\(PathEncoding.segment(provider))/token"
@@ -352,6 +466,8 @@ public struct Pipes: Sendable {
352
  body.set("user_id", userId)
353
  body.set("organization_id", organizationId)
354
  body.set("connected_account_id", connectedAccountId)
 
 
355
  return try await transport.request(
356
  method: "POST",
357
  path: path,
@@ -369,12 +485,14 @@ public struct Pipes: Sendable {
369
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
370
  /// - Parameter slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
371
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
372
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
373
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
374
  public func getUserConnectedAccount(
375
  userId: String,
376
  slug: String,
377
  organizationId: String? = nil,
 
378
  connectedAccountId: String? = nil,
379
  requestOptions: RequestOptions? = nil
380
  ) async throws -> ConnectedAccount {
@@ -384,6 +502,11 @@ public struct Pipes: Sendable {
384
  if let organizationId {
385
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
386
  }
 
 
 
 
 
387
  if let connectedAccountId {
388
  query.append(URLQueryItem(name: "connected_account_id", value: connectedAccountId))
389
  }
@@ -455,6 +578,7 @@ public struct Pipes: Sendable {
455
  /// - Parameter scopes: The OAuth scopes granted for this connection.
456
  /// - Parameter state: Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
457
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
458
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
459
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
460
  public func updateUserConnectedAccount(
@@ -466,6 +590,7 @@ public struct Pipes: Sendable {
466
  scopes: [String]? = nil,
467
  state: ConnectedAccountInputState? = nil,
468
  organizationId: String? = nil,
 
469
  connectedAccountId: String? = nil,
470
  requestOptions: RequestOptions? = nil
471
  ) async throws -> ConnectedAccount {
@@ -475,6 +600,11 @@ public struct Pipes: Sendable {
475
  if let organizationId {
476
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
477
  }
 
 
 
 
 
478
  if let connectedAccountId {
479
  query.append(URLQueryItem(name: "connected_account_id", value: connectedAccountId))
480
  }
@@ -501,12 +631,14 @@ public struct Pipes: Sendable {
501
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
502
  /// - Parameter slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
503
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
504
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
505
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
506
  public func deleteUserConnectedAccount(
507
  userId: String,
508
  slug: String,
509
  organizationId: String? = nil,
 
510
  connectedAccountId: String? = nil,
511
  requestOptions: RequestOptions? = nil
512
  ) async throws {
@@ -516,6 +648,11 @@ public struct Pipes: Sendable {
516
  if let organizationId {
517
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
518
  }
 
 
 
 
 
519
  if let connectedAccountId {
520
  query.append(URLQueryItem(name: "connected_account_id", value: connectedAccountId))
521
  }
@@ -534,10 +671,12 @@ public struct Pipes: Sendable {
534
  ///
535
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
536
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
 
537
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
538
  public func listUserDataProviders(
539
  userId: String,
540
  organizationId: String? = nil,
 
541
  requestOptions: RequestOptions? = nil
542
  ) async throws -> DataIntegrationsListResponse {
543
  let path = "user_management/users/\(PathEncoding.segment(userId))/data_providers"
@@ -545,6 +684,11 @@ public struct Pipes: Sendable {
545
  if let organizationId {
546
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
547
  }
 
 
 
 
 
548
  return try await transport.request(
549
  method: "GET",
550
  path: path,
 
8
 
9
  /// List data integrations
10
  ///
11
+ /// Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
12
  ///
13
  /// - Parameter 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"`.
14
  /// - Parameter after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
15
  /// - Parameter limit: Upper limit on the number of objects to return, between `1` and `100`.
16
  /// - Parameter order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
17
+ /// - Parameter ownership: Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
18
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
19
  public func listDataIntegrations(
20
  before: String? = nil,
21
  after: String? = nil,
22
  limit: Int? = nil,
23
  order: PaginationOrder? = nil,
24
+ ownership: PipesOwnership? = nil,
25
  requestOptions: RequestOptions? = nil
26
  ) async throws -> Page<DataIntegration> {
27
  let path = "data-integrations"
 
38
  if let order {
39
  query.append(URLQueryItem(name: "order", value: order.rawValue))
40
  }
41
+ if let ownership {
42
+ query.append(URLQueryItem(name: "ownership", value: ownership.rawValue))
43
+ }
44
  return try await transport.request(
45
  method: "GET",
46
  path: path,
 
57
  /// - Parameter 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"`.
58
  /// - Parameter limit: Upper limit on the number of objects to return, between `1` and `100`.
59
  /// - Parameter order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
60
+ /// - Parameter ownership: Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
61
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
62
  public func listDataIntegrationsAutoPaging(
63
  before: String? = nil,
64
  limit: Int? = nil,
65
  order: PaginationOrder? = nil,
66
+ ownership: PipesOwnership? = nil,
67
  requestOptions: RequestOptions? = nil
68
  ) -> AutoPagingSequence<DataIntegration> {
69
  AutoPagingSequence { cursor in
 
72
  after: cursor,
73
  limit: limit,
74
  order: order,
75
+ ownership: ownership,
76
  requestOptions: requestOptions
77
  )
78
  }
 
80
 
81
  /// Create a data integration
82
  ///
83
+ /// Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
84
  ///
85
  /// - Parameter provider: The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
86
+ /// - Parameter ownership: Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
87
  /// - Parameter description: An optional description of the Data Integration.
88
  /// - Parameter enabled: Whether the Data Integration is enabled. Defaults to `false`.
89
  /// - Parameter scopes: The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
 
95
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
96
  public func createDataIntegration(
97
  provider: String,
98
+ ownership: CreateDataIntegrationOwnership? = nil,
99
  description: String? = nil,
100
  enabled: Bool? = nil,
101
  scopes: [String]? = nil,
 
109
  let path = "data-integrations"
110
  var body = EncodableBody()
111
  body.set("provider", provider)
112
+ body.set("ownership", ownership)
113
  body.set("description", description)
114
  body.set("enabled", enabled)
115
  body.set("scopes", scopes)
 
130
 
131
  /// Get a data integration
132
  ///
133
+ /// Retrieves the user-owned data integration by its slug.
134
  ///
135
  /// - Parameter slug: The slug identifier of the data integration.
136
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
 
151
 
152
  /// Update a data integration
153
  ///
154
+ /// Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
155
  ///
156
  /// - Parameter slug: The slug identifier of the data integration.
157
  /// - Parameter description: An optional description of the Data Integration.
 
191
 
192
  /// Delete a data integration
193
  ///
194
+ /// Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
195
  ///
196
  /// - Parameter slug: The slug identifier of the data integration.
197
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
 
211
 
212
  /// Upsert an API key for a connected account
213
  ///
214
+ /// Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
215
  ///
216
  /// - Parameter slug: The identifier of the integration.
217
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
218
+ /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
219
+ /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
220
+ /// - Parameter connectionOwner: Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
221
  /// - Parameter secret: The API key secret to store for this integration.
222
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
223
  public func updateDataIntegrationApiKey(
224
  slug: String,
225
  userId: String,
226
  organizationId: String? = nil,
227
+ connectedAccountId: String? = nil,
228
+ connectionOwner: DataIntegrationsUpsertApiKeyRequestConnectionOwner? = nil,
229
  secret: String,
230
  requestOptions: RequestOptions? = nil
231
  ) async throws -> ConnectedAccount {
 
233
  var body = EncodableBody()
234
  body.set("user_id", userId)
235
  body.set("organization_id", organizationId)
236
+ body.set("connected_account_id", connectedAccountId)
237
+ body.set("connection_owner", connectionOwner)
238
  body.set("secret", secret)
239
  return try await transport.request(
240
  method: "PUT",
 
282
 
283
  /// Upsert client credentials for a connected account
284
  ///
285
+ /// Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
286
  ///
287
  /// - Parameter slug: The identifier of the integration.
288
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
289
+ /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
290
+ /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
291
+ /// - Parameter connectionOwner: Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
292
  /// - Parameter clientId: The OAuth client ID to store for this integration.
293
  /// - Parameter clientSecret: The OAuth client secret to store for this integration.
294
  /// - Parameter config: Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
 
297
  slug: String,
298
  userId: String,
299
  organizationId: String? = nil,
300
+ connectedAccountId: String? = nil,
301
+ connectionOwner: DataIntegrationsUpsertClientCredentialsRequestConnectionOwner? = nil,
302
  clientId: String,
303
  clientSecret: String,
304
  config: [String: String]? = nil,
 
308
  var body = EncodableBody()
309
  body.set("user_id", userId)
310
  body.set("organization_id", organizationId)
311
+ body.set("connected_account_id", connectedAccountId)
312
+ body.set("connection_owner", connectionOwner)
313
  body.set("client_id", clientId)
314
  body.set("client_secret", clientSecret)
315
  body.set("config", config)
 
328
  /// Returns credentials for a user's connected account. Branches on the installation's `auth_method`: OAuth installations return an access token (refreshed if needed); API-key installations return the stored secret.
329
  ///
330
  /// - Parameter slug: The identifier of the integration.
331
+ /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
332
+ /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
333
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
334
+ /// - Parameter connectionOwner: Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
335
+ /// - Parameter supportsMultipleConnections: Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
336
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
337
  public func createDataIntegrationCredential(
338
  slug: String,
339
  userId: String,
340
  organizationId: String? = nil,
341
  connectedAccountId: String? = nil,
342
+ connectionOwner: DataIntegrationsVendCredentialsRequestConnectionOwner? = nil,
343
+ supportsMultipleConnections: Bool? = nil,
344
  requestOptions: RequestOptions? = nil
345
  ) async throws -> DataIntegrationCredentialsResponse {
346
  let path = "data-integrations/\(PathEncoding.segment(slug))/credentials"
 
348
  body.set("user_id", userId)
349
  body.set("organization_id", organizationId)
350
  body.set("connected_account_id", connectedAccountId)
351
+ body.set("connection_owner", connectionOwner)
352
+ body.set("supports_multiple_connections", supportsMultipleConnections)
353
  return try await transport.request(
354
  method: "POST",
355
  path: path,
 
360
  )
361
  }
362
 
363
+ /// Get an organization-owned data integration
364
+ ///
365
+ /// Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
366
+ ///
367
+ /// - Parameter slug: The slug identifier of the data integration.
368
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
369
+ public func listDataIntegrationOrganization(
370
+ slug: String,
371
+ requestOptions: RequestOptions? = nil
372
+ ) async throws -> DataIntegration {
373
+ let path = "data-integrations/\(PathEncoding.segment(slug))/organization"
374
+ return try await transport.request(
375
+ method: "GET",
376
+ path: path,
377
+ query: [],
378
+ body: nil,
379
+ options: requestOptions,
380
+ as: DataIntegration.self
381
+ )
382
+ }
383
+
384
+ /// Update an organization-owned data integration
385
+ ///
386
+ /// Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
387
+ ///
388
+ /// - Parameter slug: The slug identifier of the data integration.
389
+ /// - Parameter description: An optional description of the Data Integration.
390
+ /// - Parameter enabled: Whether the Data Integration is enabled.
391
+ /// - Parameter scopes: The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
392
+ /// - Parameter credentials: New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
393
+ /// - Parameter apiKey: An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
394
+ /// - Parameter customProvider: Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
395
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
396
+ public func updateDataIntegrationOrganization(
397
+ slug: String,
398
+ description: String? = nil,
399
+ enabled: Bool? = nil,
400
+ scopes: [String]? = nil,
401
+ credentials: DataIntegrationCredentialsInput? = nil,
402
+ apiKey: ApiKeyInstallation? = nil,
403
+ customProvider: UpdateCustomProviderDefinition? = nil,
404
+ requestOptions: RequestOptions? = nil
405
+ ) async throws -> DataIntegration {
406
+ let path = "data-integrations/\(PathEncoding.segment(slug))/organization"
407
+ var body = EncodableBody()
408
+ body.set("description", description)
409
+ body.set("enabled", enabled)
410
+ body.set("scopes", scopes)
411
+ body.set("credentials", credentials)
412
+ body.set("api_key", apiKey)
413
+ body.set("custom_provider", customProvider)
414
+ return try await transport.request(
415
+ method: "PUT",
416
+ path: path,
417
+ query: [],
418
+ body: body,
419
+ options: requestOptions,
420
+ as: DataIntegration.self
421
+ )
422
+ }
423
+
424
+ /// Delete an organization-owned data integration
425
+ ///
426
+ /// Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
427
+ ///
428
+ /// - Parameter slug: The slug identifier of the data integration.
429
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
430
+ public func deleteDataIntegrationOrganization(
431
+ slug: String,
432
+ requestOptions: RequestOptions? = nil
433
+ ) async throws {
434
+ let path = "data-integrations/\(PathEncoding.segment(slug))/organization"
435
+ try await transport.requestVoid(
436
+ method: "DELETE",
437
+ path: path,
438
+ query: [],
439
+ body: nil,
440
+ options: requestOptions
441
+ )
442
+ }
443
+
444
  /// Get an access token for a connected account
445
  ///
446
  /// Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
447
  ///
448
  /// - Parameter provider: The identifier of the integration.
449
+ /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
450
+ /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
451
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
452
+ /// - Parameter connectionOwner: Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
453
+ /// - Parameter supportsMultipleConnections: Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
454
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
455
  public func getAccessToken(
456
  provider: String,
457
  userId: String,
458
  organizationId: String? = nil,
459
  connectedAccountId: String? = nil,
460
+ connectionOwner: DataIntegrationsGetUserTokenRequestConnectionOwner? = nil,
461
+ supportsMultipleConnections: Bool? = nil,
462
  requestOptions: RequestOptions? = nil
463
  ) async throws -> DataIntegrationAccessTokenResponse {
464
  let path = "data-integrations/\(PathEncoding.segment(provider))/token"
 
466
  body.set("user_id", userId)
467
  body.set("organization_id", organizationId)
468
  body.set("connected_account_id", connectedAccountId)
469
+ body.set("connection_owner", connectionOwner)
470
+ body.set("supports_multiple_connections", supportsMultipleConnections)
471
  return try await transport.request(
472
  method: "POST",
473
  path: path,
 
485
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
486
  /// - Parameter slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
487
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
488
+ /// - Parameter supportsMultipleConnections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
489
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
490
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
491
  public func getUserConnectedAccount(
492
  userId: String,
493
  slug: String,
494
  organizationId: String? = nil,
495
+ supportsMultipleConnections: Bool? = nil,
496
  connectedAccountId: String? = nil,
497
  requestOptions: RequestOptions? = nil
498
  ) async throws -> ConnectedAccount {
 
502
  if let organizationId {
503
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
504
  }
505
+ if let supportsMultipleConnections {
506
+ query.append(
507
+ URLQueryItem(
508
+ name: "supports_multiple_connections", value: "\(supportsMultipleConnections)"))
509
+ }
510
  if let connectedAccountId {
511
  query.append(URLQueryItem(name: "connected_account_id", value: connectedAccountId))
512
  }
 
578
  /// - Parameter scopes: The OAuth scopes granted for this connection.
579
  /// - Parameter state: Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
580
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
581
+ /// - Parameter supportsMultipleConnections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
582
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
583
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
584
  public func updateUserConnectedAccount(
 
590
  scopes: [String]? = nil,
591
  state: ConnectedAccountInputState? = nil,
592
  organizationId: String? = nil,
593
+ supportsMultipleConnections: Bool? = nil,
594
  connectedAccountId: String? = nil,
595
  requestOptions: RequestOptions? = nil
596
  ) async throws -> ConnectedAccount {
 
600
  if let organizationId {
601
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
602
  }
603
+ if let supportsMultipleConnections {
604
+ query.append(
605
+ URLQueryItem(
606
+ name: "supports_multiple_connections", value: "\(supportsMultipleConnections)"))
607
+ }
608
  if let connectedAccountId {
609
  query.append(URLQueryItem(name: "connected_account_id", value: connectedAccountId))
610
  }
 
631
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier.
632
  /// - Parameter slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
633
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
634
+ /// - Parameter supportsMultipleConnections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
635
  /// - Parameter connectedAccountId: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
636
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
637
  public func deleteUserConnectedAccount(
638
  userId: String,
639
  slug: String,
640
  organizationId: String? = nil,
641
+ supportsMultipleConnections: Bool? = nil,
642
  connectedAccountId: String? = nil,
643
  requestOptions: RequestOptions? = nil
644
  ) async throws {
 
648
  if let organizationId {
649
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
650
  }
651
+ if let supportsMultipleConnections {
652
+ query.append(
653
+ URLQueryItem(
654
+ name: "supports_multiple_connections", value: "\(supportsMultipleConnections)"))
655
+ }
656
  if let connectedAccountId {
657
  query.append(URLQueryItem(name: "connected_account_id", value: connectedAccountId))
658
  }
 
671
  ///
672
  /// - Parameter userId: A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
673
  /// - Parameter organizationId: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
674
+ /// - Parameter supportsMultipleConnections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
675
  /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
676
  public func listUserDataProviders(
677
  userId: String,
678
  organizationId: String? = nil,
679
+ supportsMultipleConnections: Bool? = nil,
680
  requestOptions: RequestOptions? = nil
681
  ) async throws -> DataIntegrationsListResponse {
682
  let path = "user_management/users/\(PathEncoding.segment(userId))/data_providers"
 
684
  if let organizationId {
685
  query.append(URLQueryItem(name: "organization_id", value: organizationId))
686
  }
687
+ if let supportsMultipleConnections {
688
+ query.append(
689
+ URLQueryItem(
690
+ name: "supports_multiple_connections", value: "\(supportsMultipleConnections)"))
691
+ }
692
  return try await transport.request(
693
  method: "GET",
694
  path: path,
ios/Sources/WorkOS/Resources/UserManagement.swift
ios/Sources/WorkOS/Resources/UserManagement.swift CHANGED
@@ -627,6 +627,116 @@ public struct UserManagement: Sendable {
627
  )
628
  }
629
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
630
  /// List CORS origins
631
  ///
632
  /// Lists the CORS origins for the current environment.
 
627
  )
628
  }
629
 
630
+ /// List AuthKit OAuth resources
631
+ ///
632
+ /// Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
633
+ ///
634
+ /// - Parameter 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"`.
635
+ /// - Parameter after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
636
+ /// - Parameter limit: Upper limit on the number of objects to return, between `1` and `100`.
637
+ /// - Parameter order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
638
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
639
+ public func listAuthkitOAuthResources(
640
+ before: String? = nil,
641
+ after: String? = nil,
642
+ limit: Int? = nil,
643
+ order: PaginationOrder? = nil,
644
+ requestOptions: RequestOptions? = nil
645
+ ) async throws -> Page<AuthkitOAuthResource> {
646
+ let path = "user_management/authkit_oauth_resources"
647
+ var query: [URLQueryItem] = []
648
+ if let before {
649
+ query.append(URLQueryItem(name: "before", value: before))
650
+ }
651
+ if let after {
652
+ query.append(URLQueryItem(name: "after", value: after))
653
+ }
654
+ if let limit {
655
+ query.append(URLQueryItem(name: "limit", value: "\(limit)"))
656
+ }
657
+ if let order {
658
+ query.append(URLQueryItem(name: "order", value: order.rawValue))
659
+ }
660
+ return try await transport.request(
661
+ method: "GET",
662
+ path: path,
663
+ query: query,
664
+ body: nil,
665
+ options: requestOptions,
666
+ as: Page<AuthkitOAuthResource>.self
667
+ )
668
+ }
669
+
670
+ /// Auto-paginating variant of `listAuthkitOAuthResources`: fetches successive
671
+ /// pages as the sequence is iterated.
672
+ ///
673
+ /// - Parameter 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"`.
674
+ /// - Parameter limit: Upper limit on the number of objects to return, between `1` and `100`.
675
+ /// - Parameter order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
676
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
677
+ public func listAuthkitOAuthResourcesAutoPaging(
678
+ before: String? = nil,
679
+ limit: Int? = nil,
680
+ order: PaginationOrder? = nil,
681
+ requestOptions: RequestOptions? = nil
682
+ ) -> AutoPagingSequence<AuthkitOAuthResource> {
683
+ AutoPagingSequence { cursor in
684
+ try await self.listAuthkitOAuthResources(
685
+ before: before,
686
+ after: cursor,
687
+ limit: limit,
688
+ order: order,
689
+ requestOptions: requestOptions
690
+ )
691
+ }
692
+ }
693
+
694
+ /// Create an AuthKit OAuth resource
695
+ ///
696
+ /// Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
697
+ ///
698
+ /// - Parameter uri: The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
699
+ /// - Parameter `default`: Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
700
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
701
+ public func createAuthkitOAuthResource(
702
+ uri: String,
703
+ `default`: Bool? = nil,
704
+ requestOptions: RequestOptions? = nil
705
+ ) async throws -> AuthkitOAuthResource {
706
+ let path = "user_management/authkit_oauth_resources"
707
+ var body = EncodableBody()
708
+ body.set("uri", uri)
709
+ body.set("default", `default`)
710
+ return try await transport.request(
711
+ method: "POST",
712
+ path: path,
713
+ query: [],
714
+ body: body,
715
+ options: requestOptions,
716
+ as: AuthkitOAuthResource.self
717
+ )
718
+ }
719
+
720
+ /// Delete an AuthKit OAuth resource
721
+ ///
722
+ /// Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
723
+ ///
724
+ /// - Parameter id: The ID of the AuthKit OAuth resource to delete.
725
+ /// - Parameter requestOptions: Per-request overrides (idempotency key, API key, headers, timeout).
726
+ public func deleteAuthkitOAuthResource(
727
+ id: String,
728
+ requestOptions: RequestOptions? = nil
729
+ ) async throws {
730
+ let path = "user_management/authkit_oauth_resources/\(PathEncoding.segment(id))"
731
+ try await transport.requestVoid(
732
+ method: "DELETE",
733
+ path: path,
734
+ query: [],
735
+ body: nil,
736
+ options: requestOptions
737
+ )
738
+ }
739
+
740
  /// List CORS origins
741
  ///
742
  /// Lists the CORS origins for the current environment.
ios/Tests/WorkOSTests/PipesTests.swift
ios/Tests/WorkOSTests/PipesTests.swift CHANGED
@@ -18,7 +18,7 @@ import Testing
18
  @Test func listDataIntegrationsSendsExpectedRequest() async throws {
19
  let (client, recorder) = makeTestClient(
20
  responding:
21
- #"{"data":[{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}],"list_metadata":{"before":null,"after":null}}"#
22
  )
23
  let result = try await client.pipes.listDataIntegrations()
24
 
@@ -32,7 +32,7 @@ import Testing
32
  @Test func createDataIntegrationSendsExpectedRequest() async throws {
33
  let (client, recorder) = makeTestClient(
34
  responding:
35
- #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
36
  )
37
  let result = try await client.pipes.createDataIntegration(provider: "test_provider")
38
 
@@ -65,7 +65,7 @@ import Testing
65
  @Test func getDataIntegrationSendsExpectedRequest() async throws {
66
  let (client, recorder) = makeTestClient(
67
  responding:
68
- #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
69
  )
70
  let result = try await client.pipes.getDataIntegration(slug: "sample-slug")
71
 
@@ -78,7 +78,7 @@ import Testing
78
  @Test func updateDataIntegrationSendsExpectedRequest() async throws {
79
  let (client, recorder) = makeTestClient(
80
  responding:
81
- #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
82
  )
83
  let result = try await client.pipes.updateDataIntegration(slug: "sample-slug")
84
 
@@ -166,6 +166,41 @@ import Testing
166
  _ = result
167
  }
168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  @Test func getUserConnectedAccountSendsExpectedRequest() async throws {
170
  let (client, recorder) = makeTestClient(
171
  responding:
 
18
  @Test func listDataIntegrationsSendsExpectedRequest() async throws {
19
  let (client, recorder) = makeTestClient(
20
  responding:
21
+ #"{"data":[{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","ownership":"user","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}],"list_metadata":{"before":null,"after":null}}"#
22
  )
23
  let result = try await client.pipes.listDataIntegrations()
24
 
 
32
  @Test func createDataIntegrationSendsExpectedRequest() async throws {
33
  let (client, recorder) = makeTestClient(
34
  responding:
35
+ #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","ownership":"user","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
36
  )
37
  let result = try await client.pipes.createDataIntegration(provider: "test_provider")
38
 
 
65
  @Test func getDataIntegrationSendsExpectedRequest() async throws {
66
  let (client, recorder) = makeTestClient(
67
  responding:
68
+ #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","ownership":"user","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
69
  )
70
  let result = try await client.pipes.getDataIntegration(slug: "sample-slug")
71
 
 
78
  @Test func updateDataIntegrationSendsExpectedRequest() async throws {
79
  let (client, recorder) = makeTestClient(
80
  responding:
81
+ #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","ownership":"user","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
82
  )
83
  let result = try await client.pipes.updateDataIntegration(slug: "sample-slug")
84
 
 
166
  _ = result
167
  }
168
 
169
+ @Test func listDataIntegrationOrganizationSendsExpectedRequest() async throws {
170
+ let (client, recorder) = makeTestClient(
171
+ responding:
172
+ #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","ownership":"user","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
173
+ )
174
+ let result = try await client.pipes.listDataIntegrationOrganization(slug: "sample-slug")
175
+
176
+ let request = try #require(recorder.lastRequest)
177
+ #expect(request.httpMethod == "GET")
178
+ #expect(request.url?.path == "/data-integrations/sample-slug/organization")
179
+ #expect(result.id == "data_integration_01EHZNVPK3SFK441A1RGBFSHRT")
180
+ }
181
+
182
+ @Test func updateDataIntegrationOrganizationSendsExpectedRequest() async throws {
183
+ let (client, recorder) = makeTestClient(
184
+ responding:
185
+ #"{"object":"data_integration","id":"data_integration_01EHZNVPK3SFK441A1RGBFSHRT","slug":"github","integration_type":"github","ownership":"user","description":"Production GitHub app","enabled":true,"state":"valid","scopes":["repo","read:org"],"redirect_uri":"https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback","auth_methods":["oauth"],"credentials":{"type":"custom","client_id":"Iv1.abc123","redacted_client_secret":"6789"},"installation":null,"config":{"account":"myorg-myaccount"},"custom_provider":{"name":"My OAuth App","authorization_url":"https://provider.example.com/oauth/authorize","token_url":"https://provider.example.com/oauth/token","refresh_token_url":"https://provider.example.com/oauth/token","pkce_enabled":true,"request_scope_separator":" ","scopes_required":false,"client_secret_required":true,"additional_authorization_parameters":{"prompt":"consent"},"token_body_content_type":"application/x-www-form-urlencoded","authenticate_via":"request_body"},"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
186
+ )
187
+ let result = try await client.pipes.updateDataIntegrationOrganization(slug: "sample-slug")
188
+
189
+ let request = try #require(recorder.lastRequest)
190
+ #expect(request.httpMethod == "PUT")
191
+ #expect(request.url?.path == "/data-integrations/sample-slug/organization")
192
+ #expect(result.id == "data_integration_01EHZNVPK3SFK441A1RGBFSHRT")
193
+ }
194
+
195
+ @Test func deleteDataIntegrationOrganizationSendsExpectedRequest() async throws {
196
+ let (client, recorder) = makeTestClient(responding: #"{}"#)
197
+ try await client.pipes.deleteDataIntegrationOrganization(slug: "sample-slug")
198
+
199
+ let request = try #require(recorder.lastRequest)
200
+ #expect(request.httpMethod == "DELETE")
201
+ #expect(request.url?.path == "/data-integrations/sample-slug/organization")
202
+ }
203
+
204
  @Test func getUserConnectedAccountSendsExpectedRequest() async throws {
205
  let (client, recorder) = makeTestClient(
206
  responding:
ios/Tests/WorkOSTests/SSOTests.swift
ios/Tests/WorkOSTests/SSOTests.swift CHANGED
@@ -29,31 +29,6 @@ import Testing
29
  #expect(result.data.first?.id == "conn_01E4ZCR3C56J083X43JQXF3JK5")
30
  }
31
 
32
- @Test func listConnectionsAutoPagingFetchesAllPages() async throws {
33
- let (client, recorder) = makeTestClient(stubs: [
34
- .init(
35
- statusCode: 200,
36
- data: Data(
37
- #"{"data":[{"object":"connection","id":"conn_01E4ZCR3C56J083X43JQXF3JK5","organization_id":"org_01EHWNCE74X7JSDV0X3SZ3KJNY","connection_type":"OktaSAML","name":"Foo Corp","state":"active","status":"linked","domains":[{"id":"org_domain_01EHZNVPK2QXHMVWCEDQEKY69A","object":"connection_domain","domain":"foo-corp.com"}],"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}],"list_metadata":{"before":null,"after":"cursor_2"}}"#
38
- .utf8), headers: [:]),
39
- .init(
40
- statusCode: 200,
41
- data: Data(
42
- #"{"data":[{"object":"connection","id":"conn_01E4ZCR3C56J083X43JQXF3JK5","organization_id":"org_01EHWNCE74X7JSDV0X3SZ3KJNY","connection_type":"OktaSAML","name":"Foo Corp","state":"active","status":"linked","domains":[{"id":"org_domain_01EHZNVPK2QXHMVWCEDQEKY69A","object":"connection_domain","domain":"foo-corp.com"}],"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}],"list_metadata":{"before":null,"after":null}}"#
43
- .utf8), headers: [:]),
44
- ])
45
- var items: [Connection] = []
46
- for try await item in client.sso.listConnectionsAutoPaging() {
47
- items.append(item)
48
- }
49
-
50
- #expect(items.count == 2)
51
- #expect(recorder.allRequests.count == 2)
52
- let second = try #require(recorder.allRequests.last?.url)
53
- let query = URLComponents(url: second, resolvingAgainstBaseURL: false)?.queryItems ?? []
54
- #expect(query.contains(URLQueryItem(name: "after", value: "cursor_2")))
55
- }
56
-
57
  @Test func createConnectionSendsExpectedRequest() async throws {
58
  let (client, recorder) = makeTestClient(
59
  responding:
 
29
  #expect(result.data.first?.id == "conn_01E4ZCR3C56J083X43JQXF3JK5")
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  @Test func createConnectionSendsExpectedRequest() async throws {
33
  let (client, recorder) = makeTestClient(
34
  responding:
ios/Tests/WorkOSTests/UserManagementTests.swift
ios/Tests/WorkOSTests/UserManagementTests.swift CHANGED
@@ -216,6 +216,45 @@ import Testing
216
  _ = result
217
  }
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  @Test func getAuthorizationUrlBuildsExpectedUrl() throws {
220
  let (client, _) = makeTestClient()
221
  let url = client.userManagement.getAuthorizationUrl(redirectUri: "test_redirect_uri")
 
216
  _ = result
217
  }
218
 
219
+ @Test func listAuthkitOAuthResourcesSendsExpectedRequest() async throws {
220
+ let (client, recorder) = makeTestClient(
221
+ responding:
222
+ #"{"data":[{"object":"authkit_oauth_resource","id":"authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT","uri":"https://api.example.com","default":false,"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}],"list_metadata":{"before":null,"after":null}}"#
223
+ )
224
+ let result = try await client.userManagement.listAuthkitOAuthResources()
225
+
226
+ let request = try #require(recorder.lastRequest)
227
+ #expect(request.httpMethod == "GET")
228
+ #expect(request.url?.path == "/user_management/authkit_oauth_resources")
229
+ #expect(result.data.count == 1)
230
+ #expect(result.data.first?.id == "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT")
231
+ }
232
+
233
+ @Test func createAuthkitOAuthResourceSendsExpectedRequest() async throws {
234
+ let (client, recorder) = makeTestClient(
235
+ responding:
236
+ #"{"object":"authkit_oauth_resource","id":"authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT","uri":"https://api.example.com","default":false,"created_at":"2026-01-15T12:00:00.000Z","updated_at":"2026-01-15T12:00:00.000Z"}"#
237
+ )
238
+ let result = try await client.userManagement.createAuthkitOAuthResource(uri: "test_uri")
239
+
240
+ let request = try #require(recorder.lastRequest)
241
+ #expect(request.httpMethod == "POST")
242
+ #expect(request.url?.path == "/user_management/authkit_oauth_resources")
243
+ let body = try #require(recorder.lastBody)
244
+ let json = try JSONSerialization.jsonObject(with: body) as? [String: Any]
245
+ #expect(json?["uri"] != nil)
246
+ #expect(result.id == "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT")
247
+ }
248
+
249
+ @Test func deleteAuthkitOAuthResourceSendsExpectedRequest() async throws {
250
+ let (client, recorder) = makeTestClient(responding: #"{}"#)
251
+ try await client.userManagement.deleteAuthkitOAuthResource(id: "sample-id")
252
+
253
+ let request = try #require(recorder.lastRequest)
254
+ #expect(request.httpMethod == "DELETE")
255
+ #expect(request.url?.path == "/user_management/authkit_oauth_resources/sample-id")
256
+ }
257
+
258
  @Test func getAuthorizationUrlBuildsExpectedUrl() throws {
259
  let (client, _) = makeTestClient()
260
  let url = client.userManagement.getAuthorizationUrl(redirectUri: "test_redirect_uri")

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

code: 25 · tests: 4 · manifest: 1

kotlin/.oagen-manifest.json
kotlin/.oagen-manifest.json CHANGED
@@ -15,6 +15,7 @@
15
  "src/main/kotlin/com/workos/featureflags/FeatureFlags.kt",
16
  "src/main/kotlin/com/workos/groups/Groups.kt",
17
  "src/main/kotlin/com/workos/models/AccessTokenAgentRegistrationCredentialIssuedDataDetail.kt",
 
18
  "src/main/kotlin/com/workos/models/ActionAuthenticationDenied.kt",
19
  "src/main/kotlin/com/workos/models/ActionAuthenticationDeniedData.kt",
20
  "src/main/kotlin/com/workos/models/ActionUserRegistrationDenied.kt",
@@ -179,6 +180,7 @@
179
  "src/main/kotlin/com/workos/models/AuthenticationSSOTimedOutData.kt",
180
  "src/main/kotlin/com/workos/models/AuthenticationSSOTimedOutDataError.kt",
181
  "src/main/kotlin/com/workos/models/AuthenticationSSOTimedOutDataSSO.kt",
 
182
  "src/main/kotlin/com/workos/models/AuthorizationCheck.kt",
183
  "src/main/kotlin/com/workos/models/AuthorizationCodeSessionAuthenticateRequest.kt",
184
  "src/main/kotlin/com/workos/models/AuthorizationPermission.kt",
@@ -219,6 +221,7 @@
219
  "src/main/kotlin/com/workos/models/ConnectionSAMLCertificateRenewedDataConnection.kt",
220
  "src/main/kotlin/com/workos/models/CorsOriginResponse.kt",
221
  "src/main/kotlin/com/workos/models/CreateApplicationSecret.kt",
 
222
  "src/main/kotlin/com/workos/models/CreateAuthorizationPermission.kt",
223
  "src/main/kotlin/com/workos/models/CreateAuthorizationResource.kt",
224
  "src/main/kotlin/com/workos/models/CreateConnection.kt",
@@ -667,6 +670,7 @@
667
  "src/main/kotlin/com/workos/types/CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.kt",
668
  "src/main/kotlin/com/workos/types/CreateConnectionOidcOptionsTokenAuthenticationMethod.kt",
669
  "src/main/kotlin/com/workos/types/CreateDataIntegrationAuthMethods.kt",
 
670
  "src/main/kotlin/com/workos/types/CreateUserInviteOptionsLocale.kt",
671
  "src/main/kotlin/com/workos/types/CreateUserPasswordHashType.kt",
672
  "src/main/kotlin/com/workos/types/CreateUserPasswordSaltPosition.kt",
@@ -679,11 +683,16 @@
679
  "src/main/kotlin/com/workos/types/DataIntegrationCredentialsInputType.kt",
680
  "src/main/kotlin/com/workos/types/DataIntegrationCredentialsResponseError.kt",
681
  "src/main/kotlin/com/workos/types/DataIntegrationCustomProviderAuthenticateVia.kt",
 
682
  "src/main/kotlin/com/workos/types/DataIntegrationState.kt",
 
683
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataAuthMethods.kt",
684
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataConnectedAccountAuthMethod.kt",
685
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataConnectedAccountState.kt",
686
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataOwnership.kt",
 
 
 
687
  "src/main/kotlin/com/workos/types/DirectoryState.kt",
688
  "src/main/kotlin/com/workos/types/DirectoryType.kt",
689
  "src/main/kotlin/com/workos/types/DirectoryUserState.kt",
@@ -735,6 +744,7 @@
735
  "src/main/kotlin/com/workos/types/PatchConnectionOidcOptionsIdTokenSignatureAlgorithm.kt",
736
  "src/main/kotlin/com/workos/types/PatchConnectionOidcOptionsTokenAuthenticationMethod.kt",
737
  "src/main/kotlin/com/workos/types/PipeConnectedAccountState.kt",
 
738
  "src/main/kotlin/com/workos/types/ProfileConnectionType.kt",
739
  "src/main/kotlin/com/workos/types/RadarListAction.kt",
740
  "src/main/kotlin/com/workos/types/RadarListType.kt",
@@ -822,6 +832,34 @@
822
  "src/test/kotlin/com/workos/widgets/WidgetsTest.kt"
823
  ],
824
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
825
  "PATCH /agents/claims/attempts": {
826
  "sdkMethod": "updateAttempts",
827
  "service": "agents"
@@ -834,6 +872,30 @@
834
  "sdkMethod": "getRegistration",
835
  "service": "agents"
836
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
837
  "POST /auth/challenges/{id}/verify": {
838
  "sdkMethod": "verifyChallenge",
839
  "service": "multiFactorAuth"
@@ -1084,10 +1146,54 @@
1084
  "sdkMethod": "listConnections",
1085
  "service": "sso"
1086
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1087
  "GET /connections/{id}": {
1088
  "sdkMethod": "getConnection",
1089
  "service": "sso"
1090
  },
 
 
 
 
1091
  "DELETE /connections/{id}": {
1092
  "sdkMethod": "deleteConnection",
1093
  "service": "sso"
@@ -1120,10 +1226,26 @@
1120
  "sdkMethod": "authorizeDataIntegration",
1121
  "service": "pipes"
1122
  },
 
 
 
 
1123
  "POST /data-integrations/{slug}/credentials": {
1124
  "sdkMethod": "createDataIntegrationCredential",
1125
  "service": "pipes"
1126
  },
 
 
 
 
 
 
 
 
 
 
 
 
1127
  "POST /data-integrations/{provider}/token": {
1128
  "sdkMethod": "getAccessToken",
1129
  "service": "pipes"
@@ -1292,6 +1414,34 @@
1292
  "sdkMethod": "listAuthorizedApplications",
1293
  "service": "organizations"
1294
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1295
  "POST /portal/generate_link": {
1296
  "sdkMethod": "generateLink",
1297
  "service": "adminPortal"
@@ -1386,6 +1536,18 @@
1386
  "sdkMethod": "revokeSession",
1387
  "service": "userManagement"
1388
  },
 
 
 
 
 
 
 
 
 
 
 
 
1389
  "GET /user_management/cors_origins": {
1390
  "sdkMethod": "listCorsOrigins",
1391
  "service": "userManagement"
@@ -1586,6 +1748,34 @@
1586
  "sdkMethod": "createUserAuthFactor",
1587
  "service": "multiFactorAuth"
1588
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1589
  "POST /vault/v1/keys/data-key": {
1590
  "sdkMethod": "createDataKey",
1591
  "service": "vault"
@@ -1693,162 +1883,6 @@
1693
  "GET /audit_logs/exports/{auditLogExportId}": {
1694
  "sdkMethod": "getExport",
1695
  "service": "auditLogs"
1696
- },
1697
- "PUT /data-integrations/{slug}/client-credentials": {
1698
- "sdkMethod": "updateDataIntegrationClientCredentials",
1699
- "service": "pipes"
1700
- },
1701
- "GET /agents/blueprints": {
1702
- "sdkMethod": "listBlueprints",
1703
- "service": "agents"
1704
- },
1705
- "POST /agents/blueprints": {
1706
- "sdkMethod": "createBlueprint",
1707
- "service": "agents"
1708
- },
1709
- "GET /agents/blueprints/{agent_blueprint_id}": {
1710
- "sdkMethod": "getBlueprint",
1711
- "service": "agents"
1712
- },
1713
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
1714
- "sdkMethod": "updateBlueprint",
1715
- "service": "agents"
1716
- },
1717
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
1718
- "sdkMethod": "deleteBlueprint",
1719
- "service": "agents"
1720
- },
1721
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1722
- "sdkMethod": "createBlueprintToken",
1723
- "service": "agents"
1724
- },
1725
- "GET /agents/instances": {
1726
- "sdkMethod": "listInstances",
1727
- "service": "agents"
1728
- },
1729
- "GET /agents/instances/{agent_instance_id}": {
1730
- "sdkMethod": "getInstance",
1731
- "service": "agents"
1732
- },
1733
- "DELETE /agents/instances/{agent_instance_id}": {
1734
- "sdkMethod": "deleteInstance",
1735
- "service": "agents"
1736
- },
1737
- "GET /agents/sessions": {
1738
- "sdkMethod": "listSessions",
1739
- "service": "agents"
1740
- },
1741
- "GET /agents/sessions/{agent_instance_session_id}": {
1742
- "sdkMethod": "getSession",
1743
- "service": "agents"
1744
- },
1745
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1746
- "sdkMethod": "revokeSession",
1747
- "service": "agents"
1748
- },
1749
- "POST /connections": {
1750
- "sdkMethod": "createConnection",
1751
- "service": "sso"
1752
- },
1753
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
1754
- "sdkMethod": "listConnectionSAMLIdpSigningCerts",
1755
- "service": "sso"
1756
- },
1757
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
1758
- "sdkMethod": "createConnectionSAMLIdpSigningCert",
1759
- "service": "sso"
1760
- },
1761
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1762
- "sdkMethod": "deleteConnectionSAMLIdpSigningCert",
1763
- "service": "sso"
1764
- },
1765
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1766
- "sdkMethod": "listConnectionSAMLSpEncryptionCerts",
1767
- "service": "sso"
1768
- },
1769
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1770
- "sdkMethod": "createConnectionSAMLSpEncryptionCert",
1771
- "service": "sso"
1772
- },
1773
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1774
- "sdkMethod": "deleteConnectionSAMLSpEncryptionCert",
1775
- "service": "sso"
1776
- },
1777
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
1778
- "sdkMethod": "listConnectionSAMLSpSigningCert",
1779
- "service": "sso"
1780
- },
1781
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
1782
- "sdkMethod": "createConnectionSAMLSpSigningCert",
1783
- "service": "sso"
1784
- },
1785
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1786
- "sdkMethod": "deleteConnectionSAMLSpSigningCert",
1787
- "service": "sso"
1788
- },
1789
- "PATCH /connections/{id}": {
1790
- "sdkMethod": "updateConnection",
1791
- "service": "sso"
1792
- },
1793
- "GET /organizations/{organization_id}/it_contacts": {
1794
- "sdkMethod": "listItContacts",
1795
- "service": "organizations"
1796
- },
1797
- "POST /organizations/{organization_id}/it_contacts": {
1798
- "sdkMethod": "createItContact",
1799
- "service": "organizations"
1800
- },
1801
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1802
- "sdkMethod": "deleteItContact",
1803
- "service": "organizations"
1804
- },
1805
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1806
- "sdkMethod": "inviteItContact",
1807
- "service": "organizations"
1808
- },
1809
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1810
- "sdkMethod": "revokeItContact",
1811
- "service": "organizations"
1812
- },
1813
- "POST /platform/teams": {
1814
- "sdkMethod": "createTeam",
1815
- "service": "platformTeams"
1816
- },
1817
- "GET /platform/teams/{team_id}": {
1818
- "sdkMethod": "getTeam",
1819
- "service": "platformTeams"
1820
- },
1821
- "DELETE /user_management/waitlist_entries/{id}": {
1822
- "sdkMethod": "deleteWaitlistEntry",
1823
- "service": "userManagement"
1824
- },
1825
- "POST /user_management/waitlist_entries/{id}/approve": {
1826
- "sdkMethod": "createWaitlistEntryApprove",
1827
- "service": "userManagement"
1828
- },
1829
- "POST /user_management/waitlist_entries/{id}/deny": {
1830
- "sdkMethod": "createWaitlistEntryDeny",
1831
- "service": "userManagement"
1832
- },
1833
- "GET /user_management/waitlists": {
1834
- "sdkMethod": "listWaitlists",
1835
- "service": "userManagement"
1836
- },
1837
- "GET /user_management/waitlists/{id}": {
1838
- "sdkMethod": "getWaitlist",
1839
- "service": "userManagement"
1840
- },
1841
- "GET /user_management/waitlists/{id}/entries": {
1842
- "sdkMethod": "listWaitlistEntries",
1843
- "service": "userManagement"
1844
- },
1845
- "POST /user_management/waitlists/{id}/entries": {
1846
- "sdkMethod": "createWaitlistEntry",
1847
- "service": "userManagement"
1848
- },
1849
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1850
- "sdkMethod": "validateBlueprintToken",
1851
- "service": "agents"
1852
  }
1853
  }
1854
  }
 
15
  "src/main/kotlin/com/workos/featureflags/FeatureFlags.kt",
16
  "src/main/kotlin/com/workos/groups/Groups.kt",
17
  "src/main/kotlin/com/workos/models/AccessTokenAgentRegistrationCredentialIssuedDataDetail.kt",
18
+ "src/main/kotlin/com/workos/models/AccountSelectionRequiredError.kt",
19
  "src/main/kotlin/com/workos/models/ActionAuthenticationDenied.kt",
20
  "src/main/kotlin/com/workos/models/ActionAuthenticationDeniedData.kt",
21
  "src/main/kotlin/com/workos/models/ActionUserRegistrationDenied.kt",
 
180
  "src/main/kotlin/com/workos/models/AuthenticationSSOTimedOutData.kt",
181
  "src/main/kotlin/com/workos/models/AuthenticationSSOTimedOutDataError.kt",
182
  "src/main/kotlin/com/workos/models/AuthenticationSSOTimedOutDataSSO.kt",
183
+ "src/main/kotlin/com/workos/models/AuthkitOAuthResource.kt",
184
  "src/main/kotlin/com/workos/models/AuthorizationCheck.kt",
185
  "src/main/kotlin/com/workos/models/AuthorizationCodeSessionAuthenticateRequest.kt",
186
  "src/main/kotlin/com/workos/models/AuthorizationPermission.kt",
 
221
  "src/main/kotlin/com/workos/models/ConnectionSAMLCertificateRenewedDataConnection.kt",
222
  "src/main/kotlin/com/workos/models/CorsOriginResponse.kt",
223
  "src/main/kotlin/com/workos/models/CreateApplicationSecret.kt",
224
+ "src/main/kotlin/com/workos/models/CreateAuthkitOAuthResource.kt",
225
  "src/main/kotlin/com/workos/models/CreateAuthorizationPermission.kt",
226
  "src/main/kotlin/com/workos/models/CreateAuthorizationResource.kt",
227
  "src/main/kotlin/com/workos/models/CreateConnection.kt",
 
670
  "src/main/kotlin/com/workos/types/CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.kt",
671
  "src/main/kotlin/com/workos/types/CreateConnectionOidcOptionsTokenAuthenticationMethod.kt",
672
  "src/main/kotlin/com/workos/types/CreateDataIntegrationAuthMethods.kt",
673
+ "src/main/kotlin/com/workos/types/CreateDataIntegrationOwnership.kt",
674
  "src/main/kotlin/com/workos/types/CreateUserInviteOptionsLocale.kt",
675
  "src/main/kotlin/com/workos/types/CreateUserPasswordHashType.kt",
676
  "src/main/kotlin/com/workos/types/CreateUserPasswordSaltPosition.kt",
 
683
  "src/main/kotlin/com/workos/types/DataIntegrationCredentialsInputType.kt",
684
  "src/main/kotlin/com/workos/types/DataIntegrationCredentialsResponseError.kt",
685
  "src/main/kotlin/com/workos/types/DataIntegrationCustomProviderAuthenticateVia.kt",
686
+ "src/main/kotlin/com/workos/types/DataIntegrationOwnership.kt",
687
  "src/main/kotlin/com/workos/types/DataIntegrationState.kt",
688
+ "src/main/kotlin/com/workos/types/DataIntegrationsGetUserTokenRequestConnectionOwner.kt",
689
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataAuthMethods.kt",
690
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataConnectedAccountAuthMethod.kt",
691
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataConnectedAccountState.kt",
692
  "src/main/kotlin/com/workos/types/DataIntegrationsListResponseDataOwnership.kt",
693
+ "src/main/kotlin/com/workos/types/DataIntegrationsUpsertApiKeyRequestConnectionOwner.kt",
694
+ "src/main/kotlin/com/workos/types/DataIntegrationsUpsertClientCredentialsRequestConnectionOwner.kt",
695
+ "src/main/kotlin/com/workos/types/DataIntegrationsVendCredentialsRequestConnectionOwner.kt",
696
  "src/main/kotlin/com/workos/types/DirectoryState.kt",
697
  "src/main/kotlin/com/workos/types/DirectoryType.kt",
698
  "src/main/kotlin/com/workos/types/DirectoryUserState.kt",
 
744
  "src/main/kotlin/com/workos/types/PatchConnectionOidcOptionsIdTokenSignatureAlgorithm.kt",
745
  "src/main/kotlin/com/workos/types/PatchConnectionOidcOptionsTokenAuthenticationMethod.kt",
746
  "src/main/kotlin/com/workos/types/PipeConnectedAccountState.kt",
747
+ "src/main/kotlin/com/workos/types/PipesOwnership.kt",
748
  "src/main/kotlin/com/workos/types/ProfileConnectionType.kt",
749
  "src/main/kotlin/com/workos/types/RadarListAction.kt",
750
  "src/main/kotlin/com/workos/types/RadarListType.kt",
 
832
  "src/test/kotlin/com/workos/widgets/WidgetsTest.kt"
833
  ],
834
  "operations": {
835
+ "GET /agents/blueprints": {
836
+ "sdkMethod": "listBlueprints",
837
+ "service": "agents"
838
+ },
839
+ "POST /agents/blueprints": {
840
+ "sdkMethod": "createBlueprint",
841
+ "service": "agents"
842
+ },
843
+ "GET /agents/blueprints/{agent_blueprint_id}": {
844
+ "sdkMethod": "getBlueprint",
845
+ "service": "agents"
846
+ },
847
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
848
+ "sdkMethod": "updateBlueprint",
849
+ "service": "agents"
850
+ },
851
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
852
+ "sdkMethod": "deleteBlueprint",
853
+ "service": "agents"
854
+ },
855
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
856
+ "sdkMethod": "createBlueprintToken",
857
+ "service": "agents"
858
+ },
859
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
860
+ "sdkMethod": "validateBlueprintToken",
861
+ "service": "agents"
862
+ },
863
  "PATCH /agents/claims/attempts": {
864
  "sdkMethod": "updateAttempts",
865
  "service": "agents"
 
872
  "sdkMethod": "getRegistration",
873
  "service": "agents"
874
  },
875
+ "GET /agents/instances": {
876
+ "sdkMethod": "listInstances",
877
+ "service": "agents"
878
+ },
879
+ "GET /agents/instances/{agent_instance_id}": {
880
+ "sdkMethod": "getInstance",
881
+ "service": "agents"
882
+ },
883
+ "DELETE /agents/instances/{agent_instance_id}": {
884
+ "sdkMethod": "deleteInstance",
885
+ "service": "agents"
886
+ },
887
+ "GET /agents/sessions": {
888
+ "sdkMethod": "listSessions",
889
+ "service": "agents"
890
+ },
891
+ "GET /agents/sessions/{agent_instance_session_id}": {
892
+ "sdkMethod": "getSession",
893
+ "service": "agents"
894
+ },
895
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
896
+ "sdkMethod": "revokeSession",
897
+ "service": "agents"
898
+ },
899
  "POST /auth/challenges/{id}/verify": {
900
  "sdkMethod": "verifyChallenge",
901
  "service": "multiFactorAuth"
 
1146
  "sdkMethod": "listConnections",
1147
  "service": "sso"
1148
  },
1149
+ "POST /connections": {
1150
+ "sdkMethod": "createConnection",
1151
+ "service": "sso"
1152
+ },
1153
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1154
+ "sdkMethod": "listConnectionSAMLIdpSigningCerts",
1155
+ "service": "sso"
1156
+ },
1157
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1158
+ "sdkMethod": "createConnectionSAMLIdpSigningCert",
1159
+ "service": "sso"
1160
+ },
1161
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1162
+ "sdkMethod": "deleteConnectionSAMLIdpSigningCert",
1163
+ "service": "sso"
1164
+ },
1165
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1166
+ "sdkMethod": "listConnectionSAMLSpEncryptionCerts",
1167
+ "service": "sso"
1168
+ },
1169
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1170
+ "sdkMethod": "createConnectionSAMLSpEncryptionCert",
1171
+ "service": "sso"
1172
+ },
1173
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1174
+ "sdkMethod": "deleteConnectionSAMLSpEncryptionCert",
1175
+ "service": "sso"
1176
+ },
1177
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1178
+ "sdkMethod": "listConnectionSAMLSpSigningCert",
1179
+ "service": "sso"
1180
+ },
1181
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1182
+ "sdkMethod": "createConnectionSAMLSpSigningCert",
1183
+ "service": "sso"
1184
+ },
1185
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1186
+ "sdkMethod": "deleteConnectionSAMLSpSigningCert",
1187
+ "service": "sso"
1188
+ },
1189
  "GET /connections/{id}": {
1190
  "sdkMethod": "getConnection",
1191
  "service": "sso"
1192
  },
1193
+ "PATCH /connections/{id}": {
1194
+ "sdkMethod": "updateConnection",
1195
+ "service": "sso"
1196
+ },
1197
  "DELETE /connections/{id}": {
1198
  "sdkMethod": "deleteConnection",
1199
  "service": "sso"
 
1226
  "sdkMethod": "authorizeDataIntegration",
1227
  "service": "pipes"
1228
  },
1229
+ "PUT /data-integrations/{slug}/client-credentials": {
1230
+ "sdkMethod": "updateDataIntegrationClientCredentials",
1231
+ "service": "pipes"
1232
+ },
1233
  "POST /data-integrations/{slug}/credentials": {
1234
  "sdkMethod": "createDataIntegrationCredential",
1235
  "service": "pipes"
1236
  },
1237
+ "GET /data-integrations/{slug}/organization": {
1238
+ "sdkMethod": "listDataIntegrationOrganization",
1239
+ "service": "pipes"
1240
+ },
1241
+ "PUT /data-integrations/{slug}/organization": {
1242
+ "sdkMethod": "updateDataIntegrationOrganization",
1243
+ "service": "pipes"
1244
+ },
1245
+ "DELETE /data-integrations/{slug}/organization": {
1246
+ "sdkMethod": "deleteDataIntegrationOrganization",
1247
+ "service": "pipes"
1248
+ },
1249
  "POST /data-integrations/{provider}/token": {
1250
  "sdkMethod": "getAccessToken",
1251
  "service": "pipes"
 
1414
  "sdkMethod": "listAuthorizedApplications",
1415
  "service": "organizations"
1416
  },
1417
+ "GET /organizations/{organization_id}/it_contacts": {
1418
+ "sdkMethod": "listItContacts",
1419
+ "service": "organizations"
1420
+ },
1421
+ "POST /organizations/{organization_id}/it_contacts": {
1422
+ "sdkMethod": "createItContact",
1423
+ "service": "organizations"
1424
+ },
1425
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1426
+ "sdkMethod": "deleteItContact",
1427
+ "service": "organizations"
1428
+ },
1429
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1430
+ "sdkMethod": "inviteItContact",
1431
+ "service": "organizations"
1432
+ },
1433
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1434
+ "sdkMethod": "revokeItContact",
1435
+ "service": "organizations"
1436
+ },
1437
+ "POST /platform/teams": {
1438
+ "sdkMethod": "createTeam",
1439
+ "service": "platformTeams"
1440
+ },
1441
+ "GET /platform/teams/{team_id}": {
1442
+ "sdkMethod": "getTeam",
1443
+ "service": "platformTeams"
1444
+ },
1445
  "POST /portal/generate_link": {
1446
  "sdkMethod": "generateLink",
1447
  "service": "adminPortal"
 
1536
  "sdkMethod": "revokeSession",
1537
  "service": "userManagement"
1538
  },
1539
+ "GET /user_management/authkit_oauth_resources": {
1540
+ "sdkMethod": "listAuthkitOAuthResources",
1541
+ "service": "userManagement"
1542
+ },
1543
+ "POST /user_management/authkit_oauth_resources": {
1544
+ "sdkMethod": "createAuthkitOAuthResource",
1545
+ "service": "userManagement"
1546
+ },
1547
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
1548
+ "sdkMethod": "deleteAuthkitOAuthResource",
1549
+ "service": "userManagement"
1550
+ },
1551
  "GET /user_management/cors_origins": {
1552
  "sdkMethod": "listCorsOrigins",
1553
  "service": "userManagement"
 
1748
  "sdkMethod": "createUserAuthFactor",
1749
  "service": "multiFactorAuth"
1750
  },
1751
+ "DELETE /user_management/waitlist_entries/{id}": {
1752
+ "sdkMethod": "deleteWaitlistEntry",
1753
+ "service": "userManagement"
1754
+ },
1755
+ "POST /user_management/waitlist_entries/{id}/approve": {
1756
+ "sdkMethod": "createWaitlistEntryApprove",
1757
+ "service": "userManagement"
1758
+ },
1759
+ "POST /user_management/waitlist_entries/{id}/deny": {
1760
+ "sdkMethod": "createWaitlistEntryDeny",
1761
+ "service": "userManagement"
1762
+ },
1763
+ "GET /user_management/waitlists": {
1764
+ "sdkMethod": "listWaitlists",
1765
+ "service": "userManagement"
1766
+ },
1767
+ "GET /user_management/waitlists/{id}": {
1768
+ "sdkMethod": "getWaitlist",
1769
+ "service": "userManagement"
1770
+ },
1771
+ "GET /user_management/waitlists/{id}/entries": {
1772
+ "sdkMethod": "listWaitlistEntries",
1773
+ "service": "userManagement"
1774
+ },
1775
+ "POST /user_management/waitlists/{id}/entries": {
1776
+ "sdkMethod": "createWaitlistEntry",
1777
+ "service": "userManagement"
1778
+ },
1779
  "POST /vault/v1/keys/data-key": {
1780
  "sdkMethod": "createDataKey",
1781
  "service": "vault"
 
1883
  "GET /audit_logs/exports/{auditLogExportId}": {
1884
  "sdkMethod": "getExport",
1885
  "service": "auditLogs"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1886
  }
1887
  }
1888
  }
kotlin/src/main/kotlin/com/workos/adminportal/AdminPortal.kt
kotlin/src/main/kotlin/com/workos/adminportal/AdminPortal.kt CHANGED
@@ -25,8 +25,8 @@ class AdminPortal(
25
  * Generate a Portal Link scoped to an Organization.
26
  *
27
  * @param organization An [Organization](https://workos.com/docs/reference/organization) identifier.
28
- * @param returnUrl The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
29
- * @param successUrl The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
30
  * @param intent The intent of the Admin Portal.
31
  * @param itContactEmails The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.
32
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
 
25
  * Generate a Portal Link scoped to an Organization.
26
  *
27
  * @param organization An [Organization](https://workos.com/docs/reference/organization) identifier.
28
+ * @param returnUrl The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
29
+ * @param successUrl The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
30
  * @param intent The intent of the Admin Portal.
31
  * @param itContactEmails The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.
32
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
kotlin/src/main/kotlin/com/workos/models/AccountSelectionRequiredError.kt
kotlin/src/main/kotlin/com/workos/models/AccountSelectionRequiredError.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
+ /** AccountSelectionRequiredError model. */
8
+ data class AccountSelectionRequiredError(
9
+ /** A human-readable explanation of the ambiguity. */
10
+ @JsonProperty("message")
11
+ val message: String,
12
+
13
+ /** Indicates that several connected accounts match and the request must name one. */
14
+ @JsonProperty("code")
15
+ val code: String = "account_selection_required"
16
+ )
kotlin/src/main/kotlin/com/workos/models/AuditLogsRetention.kt
kotlin/src/main/kotlin/com/workos/models/AuditLogsRetention.kt CHANGED
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
6
 
7
  /** AuditLogsRetention model. */
8
  data class AuditLogsRetention(
9
- /** The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365. */
10
  @JsonProperty("retention_period_in_days")
11
  val retentionPeriodInDays: Long?
12
  )
 
6
 
7
  /** AuditLogsRetention model. */
8
  data class AuditLogsRetention(
9
+ /** The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 through 330 in 30-day increments and 365 through 3650 in 365-day increments. */
10
  @JsonProperty("retention_period_in_days")
11
  val retentionPeriodInDays: Long?
12
  )
kotlin/src/main/kotlin/com/workos/models/AuthkitOAuthResource.kt
kotlin/src/main/kotlin/com/workos/models/AuthkitOAuthResource.kt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /** AuthkitOAuthResource model. */
8
+ data class AuthkitOAuthResource(
9
+ /** The ID of the AuthKit OAuth resource. */
10
+ @JsonProperty("id")
11
+ val id: String,
12
+
13
+ /** The resource URI. */
14
+ @JsonProperty("uri")
15
+ val uri: String,
16
+
17
+ /** Whether this is the default AuthKit OAuth resource for the environment. */
18
+ @JsonProperty("default")
19
+ val default: Boolean,
20
+
21
+ /** The timestamp when the AuthKit OAuth resource was created. */
22
+ @JsonProperty("created_at")
23
+ val createdAt: String,
24
+
25
+ /** The timestamp when the AuthKit OAuth resource was last updated. */
26
+ @JsonProperty("updated_at")
27
+ val updatedAt: String,
28
+
29
+ /** The object type. */
30
+ @JsonProperty("object")
31
+ val objectType: String = "authkit_oauth_resource"
32
+ )
kotlin/src/main/kotlin/com/workos/models/CreateAuthkitOAuthResource.kt
kotlin/src/main/kotlin/com/workos/models/CreateAuthkitOAuthResource.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
+ /** CreateAuthkitOAuthResource model. */
8
+ data class CreateAuthkitOAuthResource(
9
+ /** The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment. */
10
+ @JsonProperty("uri")
11
+ val uri: String,
12
+
13
+ /** Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default. */
14
+ @JsonProperty("default")
15
+ val default: Boolean? = null
16
+ )
kotlin/src/main/kotlin/com/workos/models/CreateDataIntegration.kt
kotlin/src/main/kotlin/com/workos/models/CreateDataIntegration.kt CHANGED
@@ -4,6 +4,7 @@ package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
  import com.workos.types.CreateDataIntegrationAuthMethods
 
7
 
8
  /** CreateDataIntegration model. */
9
  data class CreateDataIntegration(
@@ -11,6 +12,10 @@ data class CreateDataIntegration(
11
  @JsonProperty("provider")
12
  val provider: String,
13
 
 
 
 
 
14
  /** An optional description of the Data Integration. */
15
  @JsonProperty("description")
16
  val description: String? = null,
 
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
  import com.workos.types.CreateDataIntegrationAuthMethods
7
+ import com.workos.types.CreateDataIntegrationOwnership
8
 
9
  /** CreateDataIntegration model. */
10
  data class CreateDataIntegration(
 
12
  @JsonProperty("provider")
13
  val provider: String,
14
 
15
+ /** Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`. */
16
+ @JsonProperty("ownership")
17
+ val ownership: CreateDataIntegrationOwnership? = null,
18
+
19
  /** An optional description of the Data Integration. */
20
  @JsonProperty("description")
21
  val description: String? = null,
kotlin/src/main/kotlin/com/workos/models/CreateSAMLIdpSigningCertificate.kt
kotlin/src/main/kotlin/com/workos/models/CreateSAMLIdpSigningCertificate.kt CHANGED
@@ -2,5 +2,11 @@
2
 
3
  package com.workos.models
4
 
5
- /** Alias for [ValidateApiKey]. */
 
6
- typealias CreateSAMLIdpSigningCertificate = ValidateApiKey
 
 
 
 
 
 
2
 
3
  package com.workos.models
4
 
5
+ import com.fasterxml.jackson.annotation.JsonProperty
6
+
7
+ /** CreateSAMLIdpSigningCertificate model. */
8
+ data class CreateSAMLIdpSigningCertificate(
9
+ /** The PEM-encoded X.509 certificate. */
10
+ @JsonProperty("value")
11
+ val value: String
12
+ )
kotlin/src/main/kotlin/com/workos/models/DataIntegration.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegration.kt CHANGED
@@ -4,6 +4,7 @@ package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
  import com.workos.types.DataIntegrationAuthMethods
 
7
  import com.workos.types.DataIntegrationState
8
  import java.time.OffsetDateTime
9
 
@@ -21,6 +22,10 @@ data class DataIntegration(
21
  @JsonProperty("integration_type")
22
  val integrationType: String,
23
 
 
 
 
 
24
  /** An optional description of the Data Integration. */
25
  @JsonProperty("description")
26
  val description: String?,
 
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
  import com.workos.types.DataIntegrationAuthMethods
7
+ import com.workos.types.DataIntegrationOwnership
8
  import com.workos.types.DataIntegrationState
9
  import java.time.OffsetDateTime
10
 
 
22
  @JsonProperty("integration_type")
23
  val integrationType: String,
24
 
25
+ /** Who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation. */
26
+ @JsonProperty("ownership")
27
+ val ownership: DataIntegrationOwnership,
28
+
29
  /** An optional description of the Data Integration. */
30
  @JsonProperty("description")
31
  val description: String?,
kotlin/src/main/kotlin/com/workos/models/DataIntegrationInstallation.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegrationInstallation.kt CHANGED
@@ -10,11 +10,11 @@ data class DataIntegrationInstallation(
10
  @JsonProperty("id")
11
  val id: String,
12
 
13
- /** The User the API key was installed for. */
14
  @JsonProperty("user_id")
15
- val userId: String,
16
 
17
- /** The Organization the installation is scoped to, or null when unscoped. */
18
  @JsonProperty("organization_id")
19
  val organizationId: String?,
20
 
 
10
  @JsonProperty("id")
11
  val id: String,
12
 
13
+ /** The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization. */
14
  @JsonProperty("user_id")
15
+ val userId: String?,
16
 
17
+ /** The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped. */
18
  @JsonProperty("organization_id")
19
  val organizationId: String?,
20
 
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsGetUserTokenRequest.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsGetUserTokenRequest.kt CHANGED
@@ -3,18 +3,27 @@
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
 
6
 
7
  /** DataIntegrationsGetUserTokenRequest model. */
8
  data class DataIntegrationsGetUserTokenRequest(
9
- /** A [User](https://workos.com/docs/reference/authkit/user) identifier. */
10
  @JsonProperty("user_id")
11
  val userId: String,
12
 
13
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
14
  @JsonProperty("organization_id")
15
  val organizationId: String? = null,
16
 
17
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
18
  @JsonProperty("connected_account_id")
19
- val connectedAccountId: String? = null
 
 
 
 
 
 
 
 
20
  )
 
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
+ import com.workos.types.DataIntegrationsGetUserTokenRequestConnectionOwner
7
 
8
  /** DataIntegrationsGetUserTokenRequest model. */
9
  data class DataIntegrationsGetUserTokenRequest(
10
+ /** A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization. */
11
  @JsonProperty("user_id")
12
  val userId: String,
13
 
14
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
15
  @JsonProperty("organization_id")
16
  val organizationId: String? = null,
17
 
18
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
19
  @JsonProperty("connected_account_id")
20
+ val connectedAccountId: String? = null,
21
+
22
+ /** Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`. */
23
+ @JsonProperty("connection_owner")
24
+ val connectionOwner: DataIntegrationsGetUserTokenRequestConnectionOwner? = null,
25
+
26
+ /** Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered. */
27
+ @JsonProperty("supports_multiple_connections")
28
+ val supportsMultipleConnections: Boolean? = null
29
  )
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsListResponseData.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsListResponseData.kt CHANGED
@@ -48,11 +48,11 @@ data class DataIntegrationsListResponseData(
48
  @JsonProperty("updated_at")
49
  val updatedAt: String,
50
 
51
- /** The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected. */
52
  @JsonProperty("connected_account")
53
  val connectedAccount: DataIntegrationsListResponseDataConnectedAccount?,
54
 
55
- /** The user's connected accounts for this provider in the requested ownership context. */
56
  @JsonProperty("connected_accounts")
57
  val connectedAccounts: List<DataIntegrationsListResponseDataConnectedAccount>,
58
 
 
48
  @JsonProperty("updated_at")
49
  val updatedAt: String,
50
 
51
+ /** The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection. */
52
  @JsonProperty("connected_account")
53
  val connectedAccount: DataIntegrationsListResponseDataConnectedAccount?,
54
 
55
+ /** The user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`. */
56
  @JsonProperty("connected_accounts")
57
  val connectedAccounts: List<DataIntegrationsListResponseDataConnectedAccount>,
58
 
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsUpsertApiKeyRequest.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsUpsertApiKeyRequest.kt CHANGED
@@ -3,6 +3,7 @@
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
 
6
 
7
  /** DataIntegrationsUpsertApiKeyRequest model. */
8
  data class DataIntegrationsUpsertApiKeyRequest(
@@ -14,7 +15,15 @@ data class DataIntegrationsUpsertApiKeyRequest(
14
  @JsonProperty("secret")
15
  val secret: String,
16
 
17
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
18
  @JsonProperty("organization_id")
19
- val organizationId: String? = null
 
 
 
 
 
 
 
 
20
  )
 
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
+ import com.workos.types.DataIntegrationsUpsertApiKeyRequestConnectionOwner
7
 
8
  /** DataIntegrationsUpsertApiKeyRequest model. */
9
  data class DataIntegrationsUpsertApiKeyRequest(
 
15
  @JsonProperty("secret")
16
  val secret: String,
17
 
18
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
19
  @JsonProperty("organization_id")
20
+ val organizationId: String? = null,
21
+
22
+ /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection. */
23
+ @JsonProperty("connected_account_id")
24
+ val connectedAccountId: String? = null,
25
+
26
+ /** Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. */
27
+ @JsonProperty("connection_owner")
28
+ val connectionOwner: DataIntegrationsUpsertApiKeyRequestConnectionOwner? = null
29
  )
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsUpsertClientCredentialsRequest.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsUpsertClientCredentialsRequest.kt CHANGED
@@ -3,6 +3,7 @@
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
 
6
 
7
  /** DataIntegrationsUpsertClientCredentialsRequest model. */
8
  data class DataIntegrationsUpsertClientCredentialsRequest(
@@ -18,10 +19,18 @@ data class DataIntegrationsUpsertClientCredentialsRequest(
18
  @JsonProperty("client_secret")
19
  val clientSecret: String,
20
 
21
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
22
  @JsonProperty("organization_id")
23
  val organizationId: String? = null,
24
 
 
 
 
 
 
 
 
 
25
  /** Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors. */
26
  @JsonProperty("config")
27
  val config: Map<String, String>? = null
 
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
+ import com.workos.types.DataIntegrationsUpsertClientCredentialsRequestConnectionOwner
7
 
8
  /** DataIntegrationsUpsertClientCredentialsRequest model. */
9
  data class DataIntegrationsUpsertClientCredentialsRequest(
 
19
  @JsonProperty("client_secret")
20
  val clientSecret: String,
21
 
22
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
23
  @JsonProperty("organization_id")
24
  val organizationId: String? = null,
25
 
26
+ /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection. */
27
+ @JsonProperty("connected_account_id")
28
+ val connectedAccountId: String? = null,
29
+
30
+ /** Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. */
31
+ @JsonProperty("connection_owner")
32
+ val connectionOwner: DataIntegrationsUpsertClientCredentialsRequestConnectionOwner? = null,
33
+
34
  /** Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors. */
35
  @JsonProperty("config")
36
  val config: Map<String, String>? = null
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsVendCredentialsRequest.kt
kotlin/src/main/kotlin/com/workos/models/DataIntegrationsVendCredentialsRequest.kt CHANGED
@@ -3,18 +3,27 @@
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
 
6
 
7
  /** DataIntegrationsVendCredentialsRequest model. */
8
  data class DataIntegrationsVendCredentialsRequest(
9
- /** A [User](https://workos.com/docs/reference/authkit/user) identifier. */
10
  @JsonProperty("user_id")
11
  val userId: String,
12
 
13
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
14
  @JsonProperty("organization_id")
15
  val organizationId: String? = null,
16
 
17
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
18
  @JsonProperty("connected_account_id")
19
- val connectedAccountId: String? = null
 
 
 
 
 
 
 
 
20
  )
 
3
  package com.workos.models
4
 
5
  import com.fasterxml.jackson.annotation.JsonProperty
6
+ import com.workos.types.DataIntegrationsVendCredentialsRequestConnectionOwner
7
 
8
  /** DataIntegrationsVendCredentialsRequest model. */
9
  data class DataIntegrationsVendCredentialsRequest(
10
+ /** A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization. */
11
  @JsonProperty("user_id")
12
  val userId: String,
13
 
14
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
15
  @JsonProperty("organization_id")
16
  val organizationId: String? = null,
17
 
18
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
19
  @JsonProperty("connected_account_id")
20
+ val connectedAccountId: String? = null,
21
+
22
+ /** Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`. */
23
+ @JsonProperty("connection_owner")
24
+ val connectionOwner: DataIntegrationsVendCredentialsRequestConnectionOwner? = null,
25
+
26
+ /** Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered. */
27
+ @JsonProperty("supports_multiple_connections")
28
+ val supportsMultipleConnections: Boolean? = null
29
  )
kotlin/src/main/kotlin/com/workos/models/GenerateLink.kt
kotlin/src/main/kotlin/com/workos/models/GenerateLink.kt CHANGED
@@ -11,11 +11,11 @@ data class GenerateLink(
11
  @JsonProperty("organization")
12
  val organization: String,
13
 
14
- /** The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used. */
15
  @JsonProperty("return_url")
16
  val returnUrl: String? = null,
17
 
18
- /** The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used. */
19
  @JsonProperty("success_url")
20
  val successUrl: String? = null,
21
 
 
11
  @JsonProperty("organization")
12
  val organization: String,
13
 
14
+ /** The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used. */
15
  @JsonProperty("return_url")
16
  val returnUrl: String? = null,
17
 
18
+ /** The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used. */
19
  @JsonProperty("success_url")
20
  val successUrl: String? = null,
21
 
kotlin/src/main/kotlin/com/workos/pipes/Pipes.kt
kotlin/src/main/kotlin/com/workos/pipes/Pipes.kt CHANGED
@@ -23,6 +23,7 @@ import com.workos.models.UpdateCustomProviderDefinition
23
  import com.workos.types.ConnectedAccountAuthMethod
24
  import com.workos.types.PaginationOrder
25
  import com.workos.types.PipeConnectedAccountState
 
26
  import kotlinx.coroutines.Dispatchers
27
  import kotlinx.coroutines.withContext
28
  import java.time.OffsetDateTime
@@ -38,12 +39,13 @@ class Pipes(
38
  /**
39
  * List data integrations
40
  *
41
- * Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
42
  *
43
  * @param 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"`.
44
  * @param after 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
45
  * @param limit Upper limit on the number of objects to return, between `1` and `100`.
46
  * @param order the order to return records in. See [PaginationOrder].
 
47
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
48
  *
49
  * @return a [com.workos.common.http.Page] of results
@@ -54,6 +56,7 @@ class Pipes(
54
  after: String? = null,
55
  limit: Int? = null,
56
  order: PaginationOrder? = null,
 
57
  requestOptions: RequestOptions? = null
58
  ): Page<DataIntegration> {
59
  val itemType = object : TypeReference<DataIntegration>() {}
@@ -67,6 +70,7 @@ class Pipes(
67
  ) {
68
  limit?.let { add("limit" to it.toString()) }
69
  order?.let { add("order" to it.value) }
 
70
  }
71
  }
72
 
@@ -84,18 +88,20 @@ class Pipes(
84
  after: String? = null,
85
  limit: Int? = null,
86
  order: PaginationOrder? = null,
 
87
  requestOptions: RequestOptions? = null
88
  ): Page<DataIntegration> =
89
  withContext(Dispatchers.IO) {
90
- listDataIntegrations(before, after, limit, order, requestOptions)
91
  }
92
 
93
  /**
94
  * Create a data integration
95
  *
96
- * Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
97
  *
98
  * @param provider The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
 
99
  * @param description An optional description of the Data Integration.
100
  * @param enabled Whether the Data Integration is enabled. Defaults to `false`.
101
  * @param scopes The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
@@ -111,6 +117,7 @@ class Pipes(
111
  @JvmOverloads
112
  fun createDataIntegration(
113
  provider: String,
 
114
  description: String? = null,
115
  enabled: Boolean? = null,
116
  scopes: List<String>? = null,
@@ -124,6 +131,7 @@ class Pipes(
124
  val body =
125
  bodyOf(
126
  "provider" to provider,
 
127
  "description" to description,
128
  "enabled" to enabled,
129
  "scopes" to scopes,
@@ -154,6 +162,7 @@ class Pipes(
154
  @JvmName("createDataIntegrationSuspend")
155
  suspend fun createDataIntegrationSuspend(
156
  provider: String,
 
157
  description: String? = null,
158
  enabled: Boolean? = null,
159
  scopes: List<String>? = null,
@@ -167,6 +176,7 @@ class Pipes(
167
  withContext(Dispatchers.IO) {
168
  createDataIntegration(
169
  provider,
 
170
  description,
171
  enabled,
172
  scopes,
@@ -182,7 +192,7 @@ class Pipes(
182
  /**
183
  * Get a data integration
184
  *
185
- * Retrieves a data integration by its slug.
186
  *
187
  * @param slug The slug identifier of the data integration.
188
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
@@ -223,7 +233,7 @@ class Pipes(
223
  /**
224
  * Update a data integration
225
  *
226
- * Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
227
  *
228
  * @param slug The slug identifier of the data integration.
229
  * @param description An optional description of the Data Integration.
@@ -292,7 +302,7 @@ class Pipes(
292
  /**
293
  * Delete a data integration
294
  *
295
- * Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
296
  *
297
  * @param slug The slug identifier of the data integration.
298
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
@@ -330,12 +340,14 @@ class Pipes(
330
  /**
331
  * Upsert an API key for a connected account
332
  *
333
- * Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
334
  *
335
  * @param slug The identifier of the integration.
336
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
337
  * @param secret The API key secret to store for this integration.
338
- * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
339
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
340
  *
341
  * @return the ConnectedAccount
@@ -346,13 +358,17 @@ class Pipes(
346
  userId: String,
347
  secret: String,
348
  organizationId: String? = null,
 
 
349
  requestOptions: RequestOptions? = null
350
  ): ConnectedAccount {
351
  val body =
352
  bodyOf(
353
  "user_id" to userId,
354
  "secret" to secret,
355
- "organization_id" to organizationId
 
 
356
  )
357
  val config =
358
  RequestConfig(
@@ -378,10 +394,12 @@ class Pipes(
378
  userId: String,
379
  secret: String,
380
  organizationId: String? = null,
 
 
381
  requestOptions: RequestOptions? = null
382
  ): ConnectedAccount =
383
  withContext(Dispatchers.IO) {
384
- updateDataIntegrationApiKey(slug, userId, secret, organizationId, requestOptions)
385
  }
386
 
387
  /**
@@ -448,13 +466,15 @@ class Pipes(
448
  /**
449
  * Upsert client credentials for a connected account
450
  *
451
- * Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
452
  *
453
  * @param slug The identifier of the integration.
454
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
455
  * @param clientId The OAuth client ID to store for this integration.
456
  * @param clientSecret The OAuth client secret to store for this integration.
457
- * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
458
  * @param config Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
459
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
460
  *
@@ -467,6 +487,8 @@ class Pipes(
467
  clientId: String,
468
  clientSecret: String,
469
  organizationId: String? = null,
 
 
470
  config: Map<String, String>? = null,
471
  requestOptions: RequestOptions? = null
472
  ): ConnectedAccount {
@@ -476,6 +498,8 @@ class Pipes(
476
  "client_id" to clientId,
477
  "client_secret" to clientSecret,
478
  "organization_id" to organizationId,
 
 
479
  "config" to config
480
  )
481
  val config =
@@ -503,11 +527,23 @@ class Pipes(
503
  clientId: String,
504
  clientSecret: String,
505
  organizationId: String? = null,
 
 
506
  config: Map<String, String>? = null,
507
  requestOptions: RequestOptions? = null
508
  ): ConnectedAccount =
509
  withContext(Dispatchers.IO) {
510
- updateDataIntegrationClientCredentials(slug, userId, clientId, clientSecret, organizationId, config, requestOptions)
 
 
 
 
 
 
 
 
 
 
511
  }
512
 
513
  /**
@@ -516,9 +552,11 @@ class Pipes(
516
  * Returns credentials for a user's connected account. Branches on the installation's `auth_method`: OAuth installations return an access token (refreshed if needed); API-key installations return the stored secret.
517
  *
518
  * @param slug The identifier of the integration.
519
- * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
520
- * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
521
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
522
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
523
  *
524
  * @return the DataIntegrationCredentialsResponse
@@ -529,13 +567,17 @@ class Pipes(
529
  userId: String,
530
  organizationId: String? = null,
531
  connectedAccountId: String? = null,
 
 
532
  requestOptions: RequestOptions? = null
533
  ): DataIntegrationCredentialsResponse {
534
  val body =
535
  bodyOf(
536
  "user_id" to userId,
537
  "organization_id" to organizationId,
538
- "connected_account_id" to connectedAccountId
 
 
539
  )
540
  val config =
541
  RequestConfig(
@@ -561,21 +603,181 @@ class Pipes(
561
  userId: String,
562
  organizationId: String? = null,
563
  connectedAccountId: String? = null,
 
 
564
  requestOptions: RequestOptions? = null
565
  ): DataIntegrationCredentialsResponse =
566
  withContext(Dispatchers.IO) {
567
- createDataIntegrationCredential(slug, userId, organizationId, connectedAccountId, requestOptions)
 
 
 
 
 
 
 
 
568
  }
569
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
  /**
571
  * Get an access token for a connected account
572
  *
573
  * Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
574
  *
575
  * @param provider The identifier of the integration.
576
- * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
577
- * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
578
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
579
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
580
  *
581
  * @return the DataIntegrationAccessTokenResponse
@@ -586,13 +788,17 @@ class Pipes(
586
  userId: String,
587
  organizationId: String? = null,
588
  connectedAccountId: String? = null,
 
 
589
  requestOptions: RequestOptions? = null
590
  ): DataIntegrationAccessTokenResponse {
591
  val body =
592
  bodyOf(
593
  "user_id" to userId,
594
  "organization_id" to organizationId,
595
- "connected_account_id" to connectedAccountId
 
 
596
  )
597
  val config =
598
  RequestConfig(
@@ -618,10 +824,12 @@ class Pipes(
618
  userId: String,
619
  organizationId: String? = null,
620
  connectedAccountId: String? = null,
 
 
621
  requestOptions: RequestOptions? = null
622
  ): DataIntegrationAccessTokenResponse =
623
  withContext(Dispatchers.IO) {
624
- getAccessToken(provider, userId, organizationId, connectedAccountId, requestOptions)
625
  }
626
 
627
  /**
@@ -632,6 +840,7 @@ class Pipes(
632
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
633
  * @param slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
634
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
635
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
636
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
637
  *
@@ -642,11 +851,13 @@ class Pipes(
642
  userId: String,
643
  slug: String,
644
  organizationId: String? = null,
 
645
  connectedAccountId: String? = null,
646
  requestOptions: RequestOptions? = null
647
  ): ConnectedAccount {
648
  val params = mutableListOf<Pair<String, String>>()
649
  params.addIfNotNull("organization_id", organizationId)
 
650
  params.addIfNotNull("connected_account_id", connectedAccountId)
651
  val config =
652
  RequestConfig(
@@ -671,11 +882,12 @@ class Pipes(
671
  userId: String,
672
  slug: String,
673
  organizationId: String? = null,
 
674
  connectedAccountId: String? = null,
675
  requestOptions: RequestOptions? = null
676
  ): ConnectedAccount =
677
  withContext(Dispatchers.IO) {
678
- getUserConnectedAccount(userId, slug, organizationId, connectedAccountId, requestOptions)
679
  }
680
 
681
  /**
@@ -760,6 +972,7 @@ class Pipes(
760
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
761
  * @param slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
762
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
763
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
764
  * @param accessToken The OAuth access token for the connected account.
765
  * @param refreshToken The OAuth refresh token for the connected account.
@@ -775,6 +988,7 @@ class Pipes(
775
  userId: String,
776
  slug: String,
777
  organizationId: String? = null,
 
778
  connectedAccountId: String? = null,
779
  accessToken: String? = null,
780
  refreshToken: String? = null,
@@ -785,6 +999,7 @@ class Pipes(
785
  ): ConnectedAccount {
786
  val params = mutableListOf<Pair<String, String>>()
787
  params.addIfNotNull("organization_id", organizationId)
 
788
  params.addIfNotNull("connected_account_id", connectedAccountId)
789
  val body =
790
  bodyOf(
@@ -818,6 +1033,7 @@ class Pipes(
818
  userId: String,
819
  slug: String,
820
  organizationId: String? = null,
 
821
  connectedAccountId: String? = null,
822
  accessToken: String? = null,
823
  refreshToken: String? = null,
@@ -831,6 +1047,7 @@ class Pipes(
831
  userId,
832
  slug,
833
  organizationId,
 
834
  connectedAccountId,
835
  accessToken,
836
  refreshToken,
@@ -849,6 +1066,7 @@ class Pipes(
849
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
850
  * @param slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
851
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
852
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
853
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
854
  */
@@ -857,11 +1075,13 @@ class Pipes(
857
  userId: String,
858
  slug: String,
859
  organizationId: String? = null,
 
860
  connectedAccountId: String? = null,
861
  requestOptions: RequestOptions? = null
862
  ) {
863
  val params = mutableListOf<Pair<String, String>>()
864
  params.addIfNotNull("organization_id", organizationId)
 
865
  params.addIfNotNull("connected_account_id", connectedAccountId)
866
  val config =
867
  RequestConfig(
@@ -886,10 +1106,11 @@ class Pipes(
886
  userId: String,
887
  slug: String,
888
  organizationId: String? = null,
 
889
  connectedAccountId: String? = null,
890
  requestOptions: RequestOptions? = null
891
  ) = withContext(Dispatchers.IO) {
892
- deleteUserConnectedAccount(userId, slug, organizationId, connectedAccountId, requestOptions)
893
  }
894
 
895
  /**
@@ -899,6 +1120,7 @@ class Pipes(
899
  *
900
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
901
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
 
902
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
903
  *
904
  * @return the DataIntegrationsListResponse
@@ -907,10 +1129,12 @@ class Pipes(
907
  fun listUserDataProviders(
908
  userId: String,
909
  organizationId: String? = null,
 
910
  requestOptions: RequestOptions? = null
911
  ): DataIntegrationsListResponse {
912
  val params = mutableListOf<Pair<String, String>>()
913
  params.addIfNotNull("organization_id", organizationId)
 
914
  val config =
915
  RequestConfig(
916
  method = "GET",
@@ -933,9 +1157,10 @@ class Pipes(
933
  suspend fun listUserDataProvidersSuspend(
934
  userId: String,
935
  organizationId: String? = null,
 
936
  requestOptions: RequestOptions? = null
937
  ): DataIntegrationsListResponse =
938
  withContext(Dispatchers.IO) {
939
- listUserDataProviders(userId, organizationId, requestOptions)
940
  }
941
  }
 
23
  import com.workos.types.ConnectedAccountAuthMethod
24
  import com.workos.types.PaginationOrder
25
  import com.workos.types.PipeConnectedAccountState
26
+ import com.workos.types.PipesOwnership
27
  import kotlinx.coroutines.Dispatchers
28
  import kotlinx.coroutines.withContext
29
  import java.time.OffsetDateTime
 
39
  /**
40
  * List data integrations
41
  *
42
+ * Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
43
  *
44
  * @param 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"`.
45
  * @param after 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
46
  * @param limit Upper limit on the number of objects to return, between `1` and `100`.
47
  * @param order the order to return records in. See [PaginationOrder].
48
+ * @param ownership Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
49
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
50
  *
51
  * @return a [com.workos.common.http.Page] of results
 
56
  after: String? = null,
57
  limit: Int? = null,
58
  order: PaginationOrder? = null,
59
+ ownership: PipesOwnership? = null,
60
  requestOptions: RequestOptions? = null
61
  ): Page<DataIntegration> {
62
  val itemType = object : TypeReference<DataIntegration>() {}
 
70
  ) {
71
  limit?.let { add("limit" to it.toString()) }
72
  order?.let { add("order" to it.value) }
73
+ ownership?.let { add("ownership" to it.value) }
74
  }
75
  }
76
 
 
88
  after: String? = null,
89
  limit: Int? = null,
90
  order: PaginationOrder? = null,
91
+ ownership: PipesOwnership? = null,
92
  requestOptions: RequestOptions? = null
93
  ): Page<DataIntegration> =
94
  withContext(Dispatchers.IO) {
95
+ listDataIntegrations(before, after, limit, order, ownership, requestOptions)
96
  }
97
 
98
  /**
99
  * Create a data integration
100
  *
101
+ * Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
102
  *
103
  * @param provider The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
104
+ * @param ownership Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
105
  * @param description An optional description of the Data Integration.
106
  * @param enabled Whether the Data Integration is enabled. Defaults to `false`.
107
  * @param scopes The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
 
117
  @JvmOverloads
118
  fun createDataIntegration(
119
  provider: String,
120
+ ownership: PipesOwnership? = null,
121
  description: String? = null,
122
  enabled: Boolean? = null,
123
  scopes: List<String>? = null,
 
131
  val body =
132
  bodyOf(
133
  "provider" to provider,
134
+ "ownership" to ownership,
135
  "description" to description,
136
  "enabled" to enabled,
137
  "scopes" to scopes,
 
162
  @JvmName("createDataIntegrationSuspend")
163
  suspend fun createDataIntegrationSuspend(
164
  provider: String,
165
+ ownership: PipesOwnership? = null,
166
  description: String? = null,
167
  enabled: Boolean? = null,
168
  scopes: List<String>? = null,
 
176
  withContext(Dispatchers.IO) {
177
  createDataIntegration(
178
  provider,
179
+ ownership,
180
  description,
181
  enabled,
182
  scopes,
 
192
  /**
193
  * Get a data integration
194
  *
195
+ * Retrieves the user-owned data integration by its slug.
196
  *
197
  * @param slug The slug identifier of the data integration.
198
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
 
233
  /**
234
  * Update a data integration
235
  *
236
+ * Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
237
  *
238
  * @param slug The slug identifier of the data integration.
239
  * @param description An optional description of the Data Integration.
 
302
  /**
303
  * Delete a data integration
304
  *
305
+ * Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
306
  *
307
  * @param slug The slug identifier of the data integration.
308
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
 
340
  /**
341
  * Upsert an API key for a connected account
342
  *
343
+ * Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
344
  *
345
  * @param slug The identifier of the integration.
346
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
347
  * @param secret The API key secret to store for this integration.
348
+ * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
349
+ * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
350
+ * @param connectionOwner Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
351
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
352
  *
353
  * @return the ConnectedAccount
 
358
  userId: String,
359
  secret: String,
360
  organizationId: String? = null,
361
+ connectedAccountId: String? = null,
362
+ connectionOwner: PipesOwnership? = null,
363
  requestOptions: RequestOptions? = null
364
  ): ConnectedAccount {
365
  val body =
366
  bodyOf(
367
  "user_id" to userId,
368
  "secret" to secret,
369
+ "organization_id" to organizationId,
370
+ "connected_account_id" to connectedAccountId,
371
+ "connection_owner" to connectionOwner
372
  )
373
  val config =
374
  RequestConfig(
 
394
  userId: String,
395
  secret: String,
396
  organizationId: String? = null,
397
+ connectedAccountId: String? = null,
398
+ connectionOwner: PipesOwnership? = null,
399
  requestOptions: RequestOptions? = null
400
  ): ConnectedAccount =
401
  withContext(Dispatchers.IO) {
402
+ updateDataIntegrationApiKey(slug, userId, secret, organizationId, connectedAccountId, connectionOwner, requestOptions)
403
  }
404
 
405
  /**
 
466
  /**
467
  * Upsert client credentials for a connected account
468
  *
469
+ * Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
470
  *
471
  * @param slug The identifier of the integration.
472
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
473
  * @param clientId The OAuth client ID to store for this integration.
474
  * @param clientSecret The OAuth client secret to store for this integration.
475
+ * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
476
+ * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
477
+ * @param connectionOwner Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
478
  * @param config Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
479
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
480
  *
 
487
  clientId: String,
488
  clientSecret: String,
489
  organizationId: String? = null,
490
+ connectedAccountId: String? = null,
491
+ connectionOwner: PipesOwnership? = null,
492
  config: Map<String, String>? = null,
493
  requestOptions: RequestOptions? = null
494
  ): ConnectedAccount {
 
498
  "client_id" to clientId,
499
  "client_secret" to clientSecret,
500
  "organization_id" to organizationId,
501
+ "connected_account_id" to connectedAccountId,
502
+ "connection_owner" to connectionOwner,
503
  "config" to config
504
  )
505
  val config =
 
527
  clientId: String,
528
  clientSecret: String,
529
  organizationId: String? = null,
530
+ connectedAccountId: String? = null,
531
+ connectionOwner: PipesOwnership? = null,
532
  config: Map<String, String>? = null,
533
  requestOptions: RequestOptions? = null
534
  ): ConnectedAccount =
535
  withContext(Dispatchers.IO) {
536
+ updateDataIntegrationClientCredentials(
537
+ slug,
538
+ userId,
539
+ clientId,
540
+ clientSecret,
541
+ organizationId,
542
+ connectedAccountId,
543
+ connectionOwner,
544
+ config,
545
+ requestOptions
546
+ )
547
  }
548
 
549
  /**
 
552
  * Returns credentials for a user's connected account. Branches on the installation's `auth_method`: OAuth installations return an access token (refreshed if needed); API-key installations return the stored secret.
553
  *
554
  * @param slug The identifier of the integration.
555
+ * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
556
+ * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
557
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
558
+ * @param connectionOwner Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
559
+ * @param supportsMultipleConnections Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
560
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
561
  *
562
  * @return the DataIntegrationCredentialsResponse
 
567
  userId: String,
568
  organizationId: String? = null,
569
  connectedAccountId: String? = null,
570
+ connectionOwner: PipesOwnership? = null,
571
+ supportsMultipleConnections: Boolean? = null,
572
  requestOptions: RequestOptions? = null
573
  ): DataIntegrationCredentialsResponse {
574
  val body =
575
  bodyOf(
576
  "user_id" to userId,
577
  "organization_id" to organizationId,
578
+ "connected_account_id" to connectedAccountId,
579
+ "connection_owner" to connectionOwner,
580
+ "supports_multiple_connections" to supportsMultipleConnections
581
  )
582
  val config =
583
  RequestConfig(
 
603
  userId: String,
604
  organizationId: String? = null,
605
  connectedAccountId: String? = null,
606
+ connectionOwner: PipesOwnership? = null,
607
+ supportsMultipleConnections: Boolean? = null,
608
  requestOptions: RequestOptions? = null
609
  ): DataIntegrationCredentialsResponse =
610
  withContext(Dispatchers.IO) {
611
+ createDataIntegrationCredential(
612
+ slug,
613
+ userId,
614
+ organizationId,
615
+ connectedAccountId,
616
+ connectionOwner,
617
+ supportsMultipleConnections,
618
+ requestOptions
619
+ )
620
  }
621
 
622
+ /**
623
+ * Get an organization-owned data integration
624
+ *
625
+ * Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
626
+ *
627
+ * @param slug The slug identifier of the data integration.
628
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
629
+ *
630
+ * @return the DataIntegration
631
+ */
632
+ @JvmOverloads
633
+ fun listDataIntegrationOrganization(
634
+ slug: String,
635
+ requestOptions: RequestOptions? = null
636
+ ): DataIntegration {
637
+ val config =
638
+ RequestConfig(
639
+ method = "GET",
640
+ path = "/data-integrations/${encodePathSegment(slug)}/organization",
641
+ requestOptions = requestOptions
642
+ )
643
+ return workos.baseClient.request(config, DataIntegration::class.java)
644
+ }
645
+
646
+ /**
647
+ * Coroutine-aware variant of [listDataIntegrationOrganization]. Use this from
648
+ * a `suspend` function or coroutine scope.
649
+ *
650
+ * Delegates to the blocking [listDataIntegrationOrganization] under
651
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
652
+ * coroutine dispatcher (including `Dispatchers.Main`).
653
+ */
654
+ @JvmName("listDataIntegrationOrganizationSuspend")
655
+ suspend fun listDataIntegrationOrganizationSuspend(
656
+ slug: String,
657
+ requestOptions: RequestOptions? = null
658
+ ): DataIntegration =
659
+ withContext(Dispatchers.IO) {
660
+ listDataIntegrationOrganization(slug, requestOptions)
661
+ }
662
+
663
+ /**
664
+ * Update an organization-owned data integration
665
+ *
666
+ * Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
667
+ *
668
+ * @param slug The slug identifier of the data integration.
669
+ * @param description An optional description of the Data Integration.
670
+ * @param enabled Whether the Data Integration is enabled.
671
+ * @param scopes The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
672
+ * @param credentials New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
673
+ * @param apiKey An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
674
+ * @param customProvider Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
675
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
676
+ *
677
+ * @return the DataIntegration
678
+ */
679
+ @JvmOverloads
680
+ fun updateDataIntegrationOrganization(
681
+ slug: String,
682
+ description: String? = null,
683
+ enabled: Boolean? = null,
684
+ scopes: List<String>? = null,
685
+ credentials: DataIntegrationCredentialsInput? = null,
686
+ apiKey: ApiKeyInstallation? = null,
687
+ customProvider: UpdateCustomProviderDefinition? = null,
688
+ requestOptions: RequestOptions? = null
689
+ ): DataIntegration {
690
+ val body =
691
+ bodyOf(
692
+ "description" to description,
693
+ "enabled" to enabled,
694
+ "scopes" to scopes,
695
+ "credentials" to credentials,
696
+ "api_key" to apiKey,
697
+ "custom_provider" to customProvider
698
+ )
699
+ val config =
700
+ RequestConfig(
701
+ method = "PUT",
702
+ path = "/data-integrations/${encodePathSegment(slug)}/organization",
703
+ body = body,
704
+ requestOptions = requestOptions
705
+ )
706
+ return workos.baseClient.request(config, DataIntegration::class.java)
707
+ }
708
+
709
+ /**
710
+ * Coroutine-aware variant of [updateDataIntegrationOrganization]. Use this from
711
+ * a `suspend` function or coroutine scope.
712
+ *
713
+ * Delegates to the blocking [updateDataIntegrationOrganization] under
714
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
715
+ * coroutine dispatcher (including `Dispatchers.Main`).
716
+ */
717
+ @JvmName("updateDataIntegrationOrganizationSuspend")
718
+ suspend fun updateDataIntegrationOrganizationSuspend(
719
+ slug: String,
720
+ description: String? = null,
721
+ enabled: Boolean? = null,
722
+ scopes: List<String>? = null,
723
+ credentials: DataIntegrationCredentialsInput? = null,
724
+ apiKey: ApiKeyInstallation? = null,
725
+ customProvider: UpdateCustomProviderDefinition? = null,
726
+ requestOptions: RequestOptions? = null
727
+ ): DataIntegration =
728
+ withContext(Dispatchers.IO) {
729
+ updateDataIntegrationOrganization(slug, description, enabled, scopes, credentials, apiKey, customProvider, requestOptions)
730
+ }
731
+
732
+ /**
733
+ * Delete an organization-owned data integration
734
+ *
735
+ * Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
736
+ *
737
+ * @param slug The slug identifier of the data integration.
738
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
739
+ */
740
+ @JvmOverloads
741
+ fun deleteDataIntegrationOrganization(
742
+ slug: String,
743
+ requestOptions: RequestOptions? = null
744
+ ) {
745
+ val config =
746
+ RequestConfig(
747
+ method = "DELETE",
748
+ path = "/data-integrations/${encodePathSegment(slug)}/organization",
749
+ requestOptions = requestOptions
750
+ )
751
+ workos.baseClient.requestVoid(config)
752
+ }
753
+
754
+ /**
755
+ * Coroutine-aware variant of [deleteDataIntegrationOrganization]. Use this from
756
+ * a `suspend` function or coroutine scope.
757
+ *
758
+ * Delegates to the blocking [deleteDataIntegrationOrganization] under
759
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
760
+ * coroutine dispatcher (including `Dispatchers.Main`).
761
+ */
762
+ @JvmName("deleteDataIntegrationOrganizationSuspend")
763
+ suspend fun deleteDataIntegrationOrganizationSuspend(
764
+ slug: String,
765
+ requestOptions: RequestOptions? = null
766
+ ) = withContext(Dispatchers.IO) {
767
+ deleteDataIntegrationOrganization(slug, requestOptions)
768
+ }
769
+
770
  /**
771
  * Get an access token for a connected account
772
  *
773
  * Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
774
  *
775
  * @param provider The identifier of the integration.
776
+ * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
777
+ * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
778
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
779
+ * @param connectionOwner Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
780
+ * @param supportsMultipleConnections Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
781
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
782
  *
783
  * @return the DataIntegrationAccessTokenResponse
 
788
  userId: String,
789
  organizationId: String? = null,
790
  connectedAccountId: String? = null,
791
+ connectionOwner: PipesOwnership? = null,
792
+ supportsMultipleConnections: Boolean? = null,
793
  requestOptions: RequestOptions? = null
794
  ): DataIntegrationAccessTokenResponse {
795
  val body =
796
  bodyOf(
797
  "user_id" to userId,
798
  "organization_id" to organizationId,
799
+ "connected_account_id" to connectedAccountId,
800
+ "connection_owner" to connectionOwner,
801
+ "supports_multiple_connections" to supportsMultipleConnections
802
  )
803
  val config =
804
  RequestConfig(
 
824
  userId: String,
825
  organizationId: String? = null,
826
  connectedAccountId: String? = null,
827
+ connectionOwner: PipesOwnership? = null,
828
+ supportsMultipleConnections: Boolean? = null,
829
  requestOptions: RequestOptions? = null
830
  ): DataIntegrationAccessTokenResponse =
831
  withContext(Dispatchers.IO) {
832
+ getAccessToken(provider, userId, organizationId, connectedAccountId, connectionOwner, supportsMultipleConnections, requestOptions)
833
  }
834
 
835
  /**
 
840
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
841
  * @param slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
842
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
843
+ * @param supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
844
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
845
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
846
  *
 
851
  userId: String,
852
  slug: String,
853
  organizationId: String? = null,
854
+ supportsMultipleConnections: Boolean? = null,
855
  connectedAccountId: String? = null,
856
  requestOptions: RequestOptions? = null
857
  ): ConnectedAccount {
858
  val params = mutableListOf<Pair<String, String>>()
859
  params.addIfNotNull("organization_id", organizationId)
860
+ supportsMultipleConnections?.let { params += "supports_multiple_connections" to it.toString() }
861
  params.addIfNotNull("connected_account_id", connectedAccountId)
862
  val config =
863
  RequestConfig(
 
882
  userId: String,
883
  slug: String,
884
  organizationId: String? = null,
885
+ supportsMultipleConnections: Boolean? = null,
886
  connectedAccountId: String? = null,
887
  requestOptions: RequestOptions? = null
888
  ): ConnectedAccount =
889
  withContext(Dispatchers.IO) {
890
+ getUserConnectedAccount(userId, slug, organizationId, supportsMultipleConnections, connectedAccountId, requestOptions)
891
  }
892
 
893
  /**
 
972
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
973
  * @param slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
974
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
975
+ * @param supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
976
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
977
  * @param accessToken The OAuth access token for the connected account.
978
  * @param refreshToken The OAuth refresh token for the connected account.
 
988
  userId: String,
989
  slug: String,
990
  organizationId: String? = null,
991
+ supportsMultipleConnections: Boolean? = null,
992
  connectedAccountId: String? = null,
993
  accessToken: String? = null,
994
  refreshToken: String? = null,
 
999
  ): ConnectedAccount {
1000
  val params = mutableListOf<Pair<String, String>>()
1001
  params.addIfNotNull("organization_id", organizationId)
1002
+ supportsMultipleConnections?.let { params += "supports_multiple_connections" to it.toString() }
1003
  params.addIfNotNull("connected_account_id", connectedAccountId)
1004
  val body =
1005
  bodyOf(
 
1033
  userId: String,
1034
  slug: String,
1035
  organizationId: String? = null,
1036
+ supportsMultipleConnections: Boolean? = null,
1037
  connectedAccountId: String? = null,
1038
  accessToken: String? = null,
1039
  refreshToken: String? = null,
 
1047
  userId,
1048
  slug,
1049
  organizationId,
1050
+ supportsMultipleConnections,
1051
  connectedAccountId,
1052
  accessToken,
1053
  refreshToken,
 
1066
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
1067
  * @param slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
1068
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
1069
+ * @param supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
1070
  * @param connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
1071
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
1072
  */
 
1075
  userId: String,
1076
  slug: String,
1077
  organizationId: String? = null,
1078
+ supportsMultipleConnections: Boolean? = null,
1079
  connectedAccountId: String? = null,
1080
  requestOptions: RequestOptions? = null
1081
  ) {
1082
  val params = mutableListOf<Pair<String, String>>()
1083
  params.addIfNotNull("organization_id", organizationId)
1084
+ supportsMultipleConnections?.let { params += "supports_multiple_connections" to it.toString() }
1085
  params.addIfNotNull("connected_account_id", connectedAccountId)
1086
  val config =
1087
  RequestConfig(
 
1106
  userId: String,
1107
  slug: String,
1108
  organizationId: String? = null,
1109
+ supportsMultipleConnections: Boolean? = null,
1110
  connectedAccountId: String? = null,
1111
  requestOptions: RequestOptions? = null
1112
  ) = withContext(Dispatchers.IO) {
1113
+ deleteUserConnectedAccount(userId, slug, organizationId, supportsMultipleConnections, connectedAccountId, requestOptions)
1114
  }
1115
 
1116
  /**
 
1120
  *
1121
  * @param userId A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
1122
  * @param organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
1123
+ * @param supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
1124
  * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
1125
  *
1126
  * @return the DataIntegrationsListResponse
 
1129
  fun listUserDataProviders(
1130
  userId: String,
1131
  organizationId: String? = null,
1132
+ supportsMultipleConnections: Boolean? = null,
1133
  requestOptions: RequestOptions? = null
1134
  ): DataIntegrationsListResponse {
1135
  val params = mutableListOf<Pair<String, String>>()
1136
  params.addIfNotNull("organization_id", organizationId)
1137
+ supportsMultipleConnections?.let { params += "supports_multiple_connections" to it.toString() }
1138
  val config =
1139
  RequestConfig(
1140
  method = "GET",
 
1157
  suspend fun listUserDataProvidersSuspend(
1158
  userId: String,
1159
  organizationId: String? = null,
1160
+ supportsMultipleConnections: Boolean? = null,
1161
  requestOptions: RequestOptions? = null
1162
  ): DataIntegrationsListResponse =
1163
  withContext(Dispatchers.IO) {
1164
+ listUserDataProviders(userId, organizationId, supportsMultipleConnections, requestOptions)
1165
  }
1166
  }
kotlin/src/main/kotlin/com/workos/types/CreateDataIntegrationOwnership.kt
kotlin/src/main/kotlin/com/workos/types/CreateDataIntegrationOwnership.kt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ /** Alias for [PipesOwnership]. */
6
+ typealias CreateDataIntegrationOwnership = PipesOwnership
kotlin/src/main/kotlin/com/workos/types/DataIntegrationOwnership.kt
kotlin/src/main/kotlin/com/workos/types/DataIntegrationOwnership.kt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ /** Alias for [PipesOwnership]. */
6
+ typealias DataIntegrationOwnership = PipesOwnership
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsGetUserTokenRequestConnectionOwner.kt
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsGetUserTokenRequestConnectionOwner.kt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ /** Alias for [PipesOwnership]. */
6
+ typealias DataIntegrationsGetUserTokenRequestConnectionOwner = PipesOwnership
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsUpsertApiKeyRequestConnectionOwner.kt
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsUpsertApiKeyRequestConnectionOwner.kt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ /** Alias for [PipesOwnership]. */
6
+ typealias DataIntegrationsUpsertApiKeyRequestConnectionOwner = PipesOwnership
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsUpsertClientCredentialsRequestConnectionOwner.kt
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsUpsertClientCredentialsRequestConnectionOwner.kt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ /** Alias for [PipesOwnership]. */
6
+ typealias DataIntegrationsUpsertClientCredentialsRequestConnectionOwner = PipesOwnership
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsVendCredentialsRequestConnectionOwner.kt
kotlin/src/main/kotlin/com/workos/types/DataIntegrationsVendCredentialsRequestConnectionOwner.kt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ // This file is auto-generated by oagen. Do not edit.
2
+
3
+ package com.workos.types
4
+
5
+ /** Alias for [PipesOwnership]. */
6
+ typealias DataIntegrationsVendCredentialsRequestConnectionOwner = PipesOwnership
kotlin/src/main/kotlin/com/workos/types/PipesOwnership.kt
kotlin/src/main/kotlin/com/workos/types/PipesOwnership.kt ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 PipesOwnership values returned or accepted by the API. */
9
+ enum class PipesOwnership(
10
+ /** The wire value sent to and received from the API. */
11
+ @JsonValue val value: String
12
+ ) {
13
+ @JsonEnumDefaultValue
14
+ Unknown("unknown"),
15
+ User("user"),
16
+ Organization("organization")
17
+ }
kotlin/src/main/kotlin/com/workos/types/ResourceExportFailedDataResourceType.kt
kotlin/src/main/kotlin/com/workos/types/ResourceExportFailedDataResourceType.kt CHANGED
@@ -16,5 +16,6 @@ enum class ResourceExportFailedDataResourceType(
16
  Organizations("organizations"),
17
  Events("events"),
18
  Sessions("sessions"),
19
- AuditLogEvents("auditLogEvents")
 
20
  }
 
16
  Organizations("organizations"),
17
  Events("events"),
18
  Sessions("sessions"),
19
+ AuditLogEvents("auditLogEvents"),
20
+ Connections("connections")
21
  }
kotlin/src/main/kotlin/com/workos/usermanagement/UserManagement.kt
kotlin/src/main/kotlin/com/workos/usermanagement/UserManagement.kt CHANGED
@@ -11,6 +11,7 @@ import com.workos.common.http.addIfNotNull
11
  import com.workos.common.http.bodyOf
12
  import com.workos.common.http.encodePathSegment
13
  import com.workos.models.AuthenticateResponse
 
14
  import com.workos.models.AuthorizedConnectApplicationListData
15
  import com.workos.models.CorsOriginResponse
16
  import com.workos.models.DeviceAuthorizationResponse
@@ -930,6 +931,149 @@ class UserManagement(
930
  revokeSession(sessionId, requestOptions)
931
  }
932
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
933
  /**
934
  * List CORS origins
935
  *
 
11
  import com.workos.common.http.bodyOf
12
  import com.workos.common.http.encodePathSegment
13
  import com.workos.models.AuthenticateResponse
14
+ import com.workos.models.AuthkitOAuthResource
15
  import com.workos.models.AuthorizedConnectApplicationListData
16
  import com.workos.models.CorsOriginResponse
17
  import com.workos.models.DeviceAuthorizationResponse
 
931
  revokeSession(sessionId, requestOptions)
932
  }
933
 
934
+ /**
935
+ * List AuthKit OAuth resources
936
+ *
937
+ * Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
938
+ *
939
+ * @param 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"`.
940
+ * @param after 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
941
+ * @param limit Upper limit on the number of objects to return, between `1` and `100`.
942
+ * @param order the order to return records in. See [PaginationOrder].
943
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
944
+ *
945
+ * @return a [com.workos.common.http.Page] of results
946
+ */
947
+ @JvmOverloads
948
+ fun listAuthkitOAuthResources(
949
+ before: String? = null,
950
+ after: String? = null,
951
+ limit: Int? = null,
952
+ order: PaginationOrder? = null,
953
+ requestOptions: RequestOptions? = null
954
+ ): Page<AuthkitOAuthResource> {
955
+ val itemType = object : TypeReference<AuthkitOAuthResource>() {}
956
+ return workos.baseClient.requestPage(
957
+ method = "GET",
958
+ path = "/user_management/authkit_oauth_resources",
959
+ itemType = itemType,
960
+ requestOptions = requestOptions,
961
+ before = before,
962
+ after = after
963
+ ) {
964
+ limit?.let { add("limit" to it.toString()) }
965
+ order?.let { add("order" to it.value) }
966
+ }
967
+ }
968
+
969
+ /**
970
+ * Coroutine-aware variant of [listAuthkitOAuthResources]. Use this from
971
+ * a `suspend` function or coroutine scope.
972
+ *
973
+ * Delegates to the blocking [listAuthkitOAuthResources] under
974
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
975
+ * coroutine dispatcher (including `Dispatchers.Main`).
976
+ */
977
+ @JvmName("listAuthkitOAuthResourcesSuspend")
978
+ suspend fun listAuthkitOAuthResourcesSuspend(
979
+ before: String? = null,
980
+ after: String? = null,
981
+ limit: Int? = null,
982
+ order: PaginationOrder? = null,
983
+ requestOptions: RequestOptions? = null
984
+ ): Page<AuthkitOAuthResource> =
985
+ withContext(Dispatchers.IO) {
986
+ listAuthkitOAuthResources(before, after, limit, order, requestOptions)
987
+ }
988
+
989
+ /**
990
+ * Create an AuthKit OAuth resource
991
+ *
992
+ * Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
993
+ *
994
+ * @param uri The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
995
+ * @param default Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
996
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
997
+ *
998
+ * @return the AuthkitOAuthResource
999
+ */
1000
+ @JvmOverloads
1001
+ fun createAuthkitOAuthResource(
1002
+ uri: String,
1003
+ default: Boolean? = null,
1004
+ requestOptions: RequestOptions? = null
1005
+ ): AuthkitOAuthResource {
1006
+ val body =
1007
+ bodyOf(
1008
+ "uri" to uri,
1009
+ "default" to default
1010
+ )
1011
+ val config =
1012
+ RequestConfig(
1013
+ method = "POST",
1014
+ path = "/user_management/authkit_oauth_resources",
1015
+ body = body,
1016
+ requestOptions = requestOptions
1017
+ )
1018
+ return workos.baseClient.request(config, AuthkitOAuthResource::class.java)
1019
+ }
1020
+
1021
+ /**
1022
+ * Coroutine-aware variant of [createAuthkitOAuthResource]. Use this from
1023
+ * a `suspend` function or coroutine scope.
1024
+ *
1025
+ * Delegates to the blocking [createAuthkitOAuthResource] under
1026
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
1027
+ * coroutine dispatcher (including `Dispatchers.Main`).
1028
+ */
1029
+ @JvmName("createAuthkitOAuthResourceSuspend")
1030
+ suspend fun createAuthkitOAuthResourceSuspend(
1031
+ uri: String,
1032
+ default: Boolean? = null,
1033
+ requestOptions: RequestOptions? = null
1034
+ ): AuthkitOAuthResource =
1035
+ withContext(Dispatchers.IO) {
1036
+ createAuthkitOAuthResource(uri, default, requestOptions)
1037
+ }
1038
+
1039
+ /**
1040
+ * Delete an AuthKit OAuth resource
1041
+ *
1042
+ * Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
1043
+ *
1044
+ * @param id The ID of the AuthKit OAuth resource to delete.
1045
+ * @param requestOptions per-request overrides (idempotency key, API key, headers, timeout)
1046
+ */
1047
+ @JvmOverloads
1048
+ fun deleteAuthkitOAuthResource(
1049
+ id: String,
1050
+ requestOptions: RequestOptions? = null
1051
+ ) {
1052
+ val config =
1053
+ RequestConfig(
1054
+ method = "DELETE",
1055
+ path = "/user_management/authkit_oauth_resources/${encodePathSegment(id)}",
1056
+ requestOptions = requestOptions
1057
+ )
1058
+ workos.baseClient.requestVoid(config)
1059
+ }
1060
+
1061
+ /**
1062
+ * Coroutine-aware variant of [deleteAuthkitOAuthResource]. Use this from
1063
+ * a `suspend` function or coroutine scope.
1064
+ *
1065
+ * Delegates to the blocking [deleteAuthkitOAuthResource] under
1066
+ * `withContext(Dispatchers.IO)`, so this is safe to call from any
1067
+ * coroutine dispatcher (including `Dispatchers.Main`).
1068
+ */
1069
+ @JvmName("deleteAuthkitOAuthResourceSuspend")
1070
+ suspend fun deleteAuthkitOAuthResourceSuspend(
1071
+ id: String,
1072
+ requestOptions: RequestOptions? = null
1073
+ ) = withContext(Dispatchers.IO) {
1074
+ deleteAuthkitOAuthResource(id, requestOptions)
1075
+ }
1076
+
1077
  /**
1078
  * List CORS origins
1079
  *
kotlin/src/test/kotlin/com/workos/models/GeneratedForwardCompatTest.kt
kotlin/src/test/kotlin/com/workos/models/GeneratedForwardCompatTest.kt CHANGED
@@ -5,19 +5,19 @@ package com.workos.models
5
  import com.fasterxml.jackson.core.type.TypeReference
6
  import com.workos.common.json.ObjectMapperFactory
7
  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
@@ -41,94 +41,94 @@ class GeneratedForwardCompatTest {
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.
46
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", OrganizationDomainDataState::class.java)
47
- assertEquals(OrganizationDomainDataState.Unknown, parsed)
48
  }
49
 
50
  @Test
51
- fun `unknown DataIntegrationCredentialsInputType wire values deserialize to Unknown`() {
52
  // Simulates a future server release that introduces a new enum variant.
53
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", DataIntegrationCredentialsInputType::class.java)
54
- assertEquals(DataIntegrationCredentialsInputType.Unknown, parsed)
55
  }
56
 
57
  @Test
58
- fun `unknown CustomProviderDefinitionAuthenticateVia wire values deserialize to Unknown`() {
59
  // Simulates a future server release that introduces a new enum variant.
60
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", CustomProviderDefinitionAuthenticateVia::class.java)
61
- assertEquals(CustomProviderDefinitionAuthenticateVia.Unknown, parsed)
62
  }
63
 
64
  @Test
65
- fun `unknown CreateDataIntegrationAuthMethods wire values deserialize to Unknown`() {
66
  // Simulates a future server release that introduces a new enum variant.
67
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateDataIntegrationAuthMethods::class.java)
68
- assertEquals(CreateDataIntegrationAuthMethods.Unknown, parsed)
69
  }
70
 
71
  @Test
72
- fun `unknown UpdateCustomProviderDefinitionAuthenticateVia wire values deserialize to Unknown`() {
73
  // Simulates a future server release that introduces a new enum variant.
74
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", UpdateCustomProviderDefinitionAuthenticateVia::class.java)
75
- assertEquals(UpdateCustomProviderDefinitionAuthenticateVia.Unknown, parsed)
76
  }
77
 
78
  @Test
79
- fun `unknown ConnectedAccountInputState wire values deserialize to Unknown`() {
80
  // Simulates a future server release that introduces a new enum variant.
81
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", ConnectedAccountInputState::class.java)
82
- assertEquals(ConnectedAccountInputState.Unknown, parsed)
83
  }
84
 
85
  @Test
86
- fun `unknown GenerateLinkIntent wire values deserialize to Unknown`() {
87
  // Simulates a future server release that introduces a new enum variant.
88
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", GenerateLinkIntent::class.java)
89
- assertEquals(GenerateLinkIntent.Unknown, parsed)
90
  }
91
 
92
  @Test
93
- fun `unknown CreateUserInviteOptionsLocale wire values deserialize to Unknown`() {
94
  // Simulates a future server release that introduces a new enum variant.
95
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateUserInviteOptionsLocale::class.java)
96
- assertEquals(CreateUserInviteOptionsLocale.Unknown, parsed)
97
  }
98
 
99
  @Test
100
- fun `unknown ResendUserInviteOptionsLocale wire values deserialize to Unknown`() {
101
  // Simulates a future server release that introduces a new enum variant.
102
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", ResendUserInviteOptionsLocale::class.java)
103
- assertEquals(ResendUserInviteOptionsLocale.Unknown, parsed)
104
  }
105
 
106
  @Test
107
- fun `unknown CreateUserPasswordHashType wire values deserialize to Unknown`() {
108
  // Simulates a future server release that introduces a new enum variant.
109
- val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateUserPasswordHashType::class.java)
110
- assertEquals(CreateUserPasswordHashType.Unknown, parsed)
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
 
5
  import com.fasterxml.jackson.core.type.TypeReference
6
  import com.workos.common.json.ObjectMapperFactory
7
  import com.workos.types.ConnectedAccountInputState
8
+ import com.workos.types.CreateConnectionOidcOptionsIdTokenSignatureAlgorithm
9
+ import com.workos.types.CreateConnectionOidcOptionsTokenAuthenticationMethod
10
  import com.workos.types.CreateDataIntegrationAuthMethods
11
+ import com.workos.types.CreateDataIntegrationOwnership
 
 
12
  import com.workos.types.CustomProviderDefinitionAuthenticateVia
13
  import com.workos.types.DataIntegrationCredentialsInputType
14
+ import com.workos.types.InviteItContactIntents
15
  import com.workos.types.OrganizationDomainDataState
16
  import com.workos.types.PaginationOrder
17
+ import com.workos.types.PatchConnectionOidcOptionsIdTokenSignatureAlgorithm
18
+ import com.workos.types.PatchConnectionOidcOptionsTokenAuthenticationMethod
19
+ import com.workos.types.UpdateAuditLogsRetentionRetentionPeriod
20
  import com.workos.types.UpdateCustomProviderDefinitionAuthenticateVia
 
 
21
  import com.workos.types.VaultByokKeyProvider
22
  import org.junit.jupiter.api.Assertions.assertEquals
23
  import org.junit.jupiter.api.Assertions.assertNotNull
 
41
  }
42
 
43
  @Test
44
+ fun `unknown UpdateAuditLogsRetentionRetentionPeriod 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__\"", UpdateAuditLogsRetentionRetentionPeriod::class.java)
47
+ assertEquals(UpdateAuditLogsRetentionRetentionPeriod.Unknown, parsed)
48
  }
49
 
50
  @Test
51
+ fun `unknown CreateConnectionOidcOptionsTokenAuthenticationMethod wire values deserialize to Unknown`() {
52
  // Simulates a future server release that introduces a new enum variant.
53
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateConnectionOidcOptionsTokenAuthenticationMethod::class.java)
54
+ assertEquals(CreateConnectionOidcOptionsTokenAuthenticationMethod.Unknown, parsed)
55
  }
56
 
57
  @Test
58
+ fun `unknown CreateConnectionOidcOptionsIdTokenSignatureAlgorithm wire values deserialize to Unknown`() {
59
  // Simulates a future server release that introduces a new enum variant.
60
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateConnectionOidcOptionsIdTokenSignatureAlgorithm::class.java)
61
+ assertEquals(CreateConnectionOidcOptionsIdTokenSignatureAlgorithm.Unknown, parsed)
62
  }
63
 
64
  @Test
65
+ fun `unknown PatchConnectionOidcOptionsTokenAuthenticationMethod wire values deserialize to Unknown`() {
66
  // Simulates a future server release that introduces a new enum variant.
67
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", PatchConnectionOidcOptionsTokenAuthenticationMethod::class.java)
68
+ assertEquals(PatchConnectionOidcOptionsTokenAuthenticationMethod.Unknown, parsed)
69
  }
70
 
71
  @Test
72
+ fun `unknown PatchConnectionOidcOptionsIdTokenSignatureAlgorithm wire values deserialize to Unknown`() {
73
  // Simulates a future server release that introduces a new enum variant.
74
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", PatchConnectionOidcOptionsIdTokenSignatureAlgorithm::class.java)
75
+ assertEquals(PatchConnectionOidcOptionsIdTokenSignatureAlgorithm.Unknown, parsed)
76
  }
77
 
78
  @Test
79
+ fun `unknown InviteItContactIntents wire values deserialize to Unknown`() {
80
  // Simulates a future server release that introduces a new enum variant.
81
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", InviteItContactIntents::class.java)
82
+ assertEquals(InviteItContactIntents.Unknown, parsed)
83
  }
84
 
85
  @Test
86
+ fun `unknown OrganizationDomainDataState wire values deserialize to Unknown`() {
87
  // Simulates a future server release that introduces a new enum variant.
88
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", OrganizationDomainDataState::class.java)
89
+ assertEquals(OrganizationDomainDataState.Unknown, parsed)
90
  }
91
 
92
  @Test
93
+ fun `unknown DataIntegrationCredentialsInputType wire values deserialize to Unknown`() {
94
  // Simulates a future server release that introduces a new enum variant.
95
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", DataIntegrationCredentialsInputType::class.java)
96
+ assertEquals(DataIntegrationCredentialsInputType.Unknown, parsed)
97
  }
98
 
99
  @Test
100
+ fun `unknown CustomProviderDefinitionAuthenticateVia wire values deserialize to Unknown`() {
101
  // Simulates a future server release that introduces a new enum variant.
102
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", CustomProviderDefinitionAuthenticateVia::class.java)
103
+ assertEquals(CustomProviderDefinitionAuthenticateVia.Unknown, parsed)
104
  }
105
 
106
  @Test
107
+ fun `unknown CreateDataIntegrationOwnership wire values deserialize to Unknown`() {
108
  // Simulates a future server release that introduces a new enum variant.
109
+ val parsed = mapper.readValue("\"__oagen_new_variant__\"", CreateDataIntegrationOwnership::class.java)
110
+ assertEquals(CreateDataIntegrationOwnership.Unknown, parsed)
111
  }
112
 
113
  @Test
114
+ fun `unknown CreateDataIntegrationAuthMethods 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__\"", CreateDataIntegrationAuthMethods::class.java)
117
+ assertEquals(CreateDataIntegrationAuthMethods.Unknown, parsed)
118
  }
119
 
120
  @Test
121
+ fun `unknown UpdateCustomProviderDefinitionAuthenticateVia 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__\"", UpdateCustomProviderDefinitionAuthenticateVia::class.java)
124
+ assertEquals(UpdateCustomProviderDefinitionAuthenticateVia.Unknown, parsed)
125
  }
126
 
127
  @Test
128
+ fun `unknown ConnectedAccountInputState 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__\"", ConnectedAccountInputState::class.java)
131
+ assertEquals(ConnectedAccountInputState.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
@@ -1192,6 +1192,16 @@ class GeneratedModelRoundTripTest {
1192
  assertEquals(tree1, tree2)
1193
  }
1194
 
 
 
 
 
 
 
 
 
 
 
1195
  @Test
1196
  fun `AuthMethodMismatchError round-trips through Jackson`() {
1197
  val json = "{\"code\": \"auth_method_mismatch\", \"message\": \"sample\"}"
@@ -1245,6 +1255,18 @@ class GeneratedModelRoundTripTest {
1245
  assertEquals(tree1, tree2)
1246
  }
1247
 
 
 
 
 
 
 
 
 
 
 
 
 
1248
  @Test
1249
  fun `RedirectUri round-trips through Jackson`() {
1250
  val json =
@@ -1480,7 +1502,7 @@ class GeneratedModelRoundTripTest {
1480
 
1481
  @Test
1482
  fun `DataIntegrationInstallation round-trips through Jackson`() {
1483
- val json = "{\"id\": \"sample\", \"user_id\": \"sample\", \"organization_id\": null, \"api_key_last_4\": null}"
1484
  val parsed = mapper.readValue(json, DataIntegrationInstallation::class.java)
1485
  val reserialized = mapper.writeValueAsString(parsed)
1486
  val tree1 = mapper.readTree(json)
 
1192
  assertEquals(tree1, tree2)
1193
  }
1194
 
1195
+ @Test
1196
+ fun `AccountSelectionRequiredError round-trips through Jackson`() {
1197
+ val json = "{\"code\": \"account_selection_required\", \"message\": \"sample\"}"
1198
+ val parsed = mapper.readValue(json, AccountSelectionRequiredError::class.java)
1199
+ val reserialized = mapper.writeValueAsString(parsed)
1200
+ val tree1 = mapper.readTree(json)
1201
+ val tree2 = mapper.readTree(reserialized)
1202
+ assertEquals(tree1, tree2)
1203
+ }
1204
+
1205
  @Test
1206
  fun `AuthMethodMismatchError round-trips through Jackson`() {
1207
  val json = "{\"code\": \"auth_method_mismatch\", \"message\": \"sample\"}"
 
1255
  assertEquals(tree1, tree2)
1256
  }
1257
 
1258
+ @Test
1259
+ fun `AuthkitOAuthResource round-trips through Jackson`() {
1260
+ val json =
1261
+ "{\"object\": \"authkit_oauth_resource\", \"id\": \"sample\", \"uri\": \"sample\", \"default\": false, \"created_at\": " +
1262
+ "\"sample\", \"updated_at\": \"sample\"}"
1263
+ val parsed = mapper.readValue(json, AuthkitOAuthResource::class.java)
1264
+ val reserialized = mapper.writeValueAsString(parsed)
1265
+ val tree1 = mapper.readTree(json)
1266
+ val tree2 = mapper.readTree(reserialized)
1267
+ assertEquals(tree1, tree2)
1268
+ }
1269
+
1270
  @Test
1271
  fun `RedirectUri round-trips through Jackson`() {
1272
  val json =
 
1502
 
1503
  @Test
1504
  fun `DataIntegrationInstallation round-trips through Jackson`() {
1505
+ val json = "{\"id\": \"sample\", \"user_id\": null, \"organization_id\": null, \"api_key_last_4\": null}"
1506
  val parsed = mapper.readValue(json, DataIntegrationInstallation::class.java)
1507
  val reserialized = mapper.writeValueAsString(parsed)
1508
  val tree1 = mapper.readTree(json)
kotlin/src/test/kotlin/com/workos/pipes/PipesTest.kt
kotlin/src/test/kotlin/com/workos/pipes/PipesTest.kt CHANGED
@@ -32,9 +32,9 @@ class PipesTest : TestBase() {
32
  "POST",
33
  "/data-integrations",
34
  200,
35
- "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"description\": " +
36
- "null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", \"auth_methods\": [], " +
37
- "\"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
38
  "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
39
  )
40
  val result = api().createDataIntegration("sample-arg")
@@ -56,9 +56,9 @@ class PipesTest : TestBase() {
56
  "GET",
57
  "/data-integrations/sample-arg",
58
  200,
59
- "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"description\": " +
60
- "null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", \"auth_methods\": [], " +
61
- "\"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
62
  "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
63
  )
64
  val result = api().getDataIntegration("sample-arg")
@@ -76,9 +76,9 @@ class PipesTest : TestBase() {
76
  "PUT",
77
  "/data-integrations/sample-arg",
78
  200,
79
- "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"description\": " +
80
- "null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", \"auth_methods\": [], " +
81
- "\"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
82
  "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
83
  )
84
  val result = api().updateDataIntegration("sample-arg")
@@ -164,6 +164,52 @@ class PipesTest : TestBase() {
164
  )
165
  }
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  @Test
168
  fun `getAccessToken returns a typed response`() {
169
  stubResponse("POST", "/data-integrations/sample-arg/token", 200, "{}")
 
32
  "POST",
33
  "/data-integrations",
34
  200,
35
+ "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"ownership\": " +
36
+ "\"user\", \"description\": null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", " +
37
+ "\"auth_methods\": [], \"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
38
  "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
39
  )
40
  val result = api().createDataIntegration("sample-arg")
 
56
  "GET",
57
  "/data-integrations/sample-arg",
58
  200,
59
+ "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"ownership\": " +
60
+ "\"user\", \"description\": null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", " +
61
+ "\"auth_methods\": [], \"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
62
  "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
63
  )
64
  val result = api().getDataIntegration("sample-arg")
 
76
  "PUT",
77
  "/data-integrations/sample-arg",
78
  200,
79
+ "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"ownership\": " +
80
+ "\"user\", \"description\": null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", " +
81
+ "\"auth_methods\": [], \"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
82
  "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
83
  )
84
  val result = api().updateDataIntegration("sample-arg")
 
164
  )
165
  }
166
 
167
+ @Test
168
+ fun `listDataIntegrationOrganization returns a typed response`() {
169
+ stubResponse(
170
+ "GET",
171
+ "/data-integrations/sample-arg/organization",
172
+ 200,
173
+ "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"ownership\": " +
174
+ "\"user\", \"description\": null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", " +
175
+ "\"auth_methods\": [], \"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
176
+ "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
177
+ )
178
+ val result = api().listDataIntegrationOrganization("sample-arg")
179
+ assertNotNull(result)
180
+ assertEquals("data_integration", result.objectType)
181
+ assertEquals("sample", result.id)
182
+ assertEquals("sample", result.slug)
183
+ assertEquals("sample", result.integrationType)
184
+ assertEquals(false, result.enabled)
185
+ }
186
+
187
+ @Test
188
+ fun `updateDataIntegrationOrganization returns a typed response`() {
189
+ stubResponse(
190
+ "PUT",
191
+ "/data-integrations/sample-arg/organization",
192
+ 200,
193
+ "{\"object\": \"data_integration\", \"id\": \"sample\", \"slug\": \"sample\", \"integration_type\": \"sample\", \"ownership\": " +
194
+ "\"user\", \"description\": null, \"enabled\": false, \"state\": \"valid\", \"scopes\": null, \"redirect_uri\": \"sample\", " +
195
+ "\"auth_methods\": [], \"credentials\": null, \"installation\": null, \"config\": {}, \"custom_provider\": null, \"created_at\": " +
196
+ "\"2024-01-01T00:00:00Z\", \"updated_at\": \"2024-01-01T00:00:00Z\"}"
197
+ )
198
+ val result = api().updateDataIntegrationOrganization("sample-arg")
199
+ assertNotNull(result)
200
+ assertEquals("data_integration", result.objectType)
201
+ assertEquals("sample", result.id)
202
+ assertEquals("sample", result.slug)
203
+ assertEquals("sample", result.integrationType)
204
+ assertEquals(false, result.enabled)
205
+ }
206
+
207
+ @Test
208
+ fun `deleteDataIntegrationOrganization completes without throwing`() {
209
+ stubResponse("DELETE", "/data-integrations/sample-arg/organization", 204)
210
+ api().deleteDataIntegrationOrganization("sample-arg")
211
+ }
212
+
213
  @Test
214
  fun `getAccessToken returns a typed response`() {
215
  stubResponse("POST", "/data-integrations/sample-arg/token", 200, "{}")
kotlin/src/test/kotlin/com/workos/usermanagement/UserManagementTest.kt
kotlin/src/test/kotlin/com/workos/usermanagement/UserManagementTest.kt CHANGED
@@ -262,6 +262,46 @@ class UserManagementTest : TestBase() {
262
  )
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  @Test
266
  fun `listCorsOrigins returns a typed response`() {
267
  stubResponse("GET", "/user_management/cors_origins", 200, "{\"data\": [], \"list_metadata\": {\"before\": null, \"after\": null}}")
 
262
  )
263
  }
264
 
265
+ @Test
266
+ fun `listAuthkitOAuthResources returns a typed response`() {
267
+ stubResponse(
268
+ "GET",
269
+ "/user_management/authkit_oauth_resources",
270
+ 200,
271
+ "{\"data\": [], \"list_metadata\": {\"before\": null, \"after\": null}}"
272
+ )
273
+ val result = api().listAuthkitOAuthResources()
274
+ assertNotNull(result)
275
+ }
276
+
277
+ @Test
278
+ fun `createAuthkitOAuthResource returns a typed response`() {
279
+ stubResponse(
280
+ "POST",
281
+ "/user_management/authkit_oauth_resources",
282
+ 200,
283
+ "{\"object\": \"authkit_oauth_resource\", \"id\": \"sample\", \"uri\": \"sample\", \"default\": false, \"created_at\": " +
284
+ "\"sample\", \"updated_at\": \"sample\"}"
285
+ )
286
+ val result = api().createAuthkitOAuthResource("sample-arg")
287
+ assertNotNull(result)
288
+ assertEquals("authkit_oauth_resource", result.objectType)
289
+ assertEquals("sample", result.id)
290
+ assertEquals("sample", result.uri)
291
+ assertEquals(false, result.default)
292
+ assertEquals("sample", result.createdAt)
293
+ wireMockRule.verify(
294
+ postRequestedFor(urlPathMatching("/user_management/authkit_oauth_resources"))
295
+ .withRequestBody(matchingJsonPath("\$.uri"))
296
+ )
297
+ }
298
+
299
+ @Test
300
+ fun `deleteAuthkitOAuthResource completes without throwing`() {
301
+ stubResponse("DELETE", "/user_management/authkit_oauth_resources/sample-arg", 204)
302
+ api().deleteAuthkitOAuthResource("sample-arg")
303
+ }
304
+
305
  @Test
306
  fun `listCorsOrigins returns a typed response`() {
307
  stubResponse("GET", "/user_management/cors_origins", 200, "{\"data\": [], \"list_metadata\": {\"before\": null, \"after\": null}}")

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

code: 18 · tests: 16 · manifest: 1

php/.oagen-manifest.json
php/.oagen-manifest.json CHANGED
@@ -3,6 +3,7 @@
3
  "language": "php",
4
  "files": [
5
  "lib/Resource/AccessTokenAgentRegistrationCredentialIssuedDataDetail.php",
 
6
  "lib/Resource/ActionAuthenticationDenied.php",
7
  "lib/Resource/ActionAuthenticationDeniedData.php",
8
  "lib/Resource/ActionUserRegistrationDenied.php",
@@ -182,6 +183,7 @@
182
  "lib/Resource/AuthenticationSSOTimedOutData.php",
183
  "lib/Resource/AuthenticationSSOTimedOutDataError.php",
184
  "lib/Resource/AuthenticationSSOTimedOutDataSSO.php",
 
185
  "lib/Resource/AuthorizationAssignment.php",
186
  "lib/Resource/AuthorizationCheck.php",
187
  "lib/Resource/AuthorizationCodeSessionAuthenticateRequest.php",
@@ -231,6 +233,7 @@
231
  "lib/Resource/ConnectionType.php",
232
  "lib/Resource/ConnectionsConnectionType.php",
233
  "lib/Resource/CreateApplicationSecret.php",
 
234
  "lib/Resource/CreateAuthorizationPermission.php",
235
  "lib/Resource/CreateAuthorizationResource.php",
236
  "lib/Resource/CreateCORSOrigin.php",
@@ -241,7 +244,6 @@
241
  "lib/Resource/CreateConnectionSAMLOptions.php",
242
  "lib/Resource/CreateConnectionStandardAttributes.php",
243
  "lib/Resource/CreateDataIntegration.php",
244
- "lib/Resource/CreateDataIntegrationAuthMethods.php",
245
  "lib/Resource/CreateDataKeyRequest.php",
246
  "lib/Resource/CreateDataKeyResponse.php",
247
  "lib/Resource/CreateGroup.php",
@@ -514,6 +516,7 @@
514
  "lib/Resource/PipesConnectedAccountConnectionFailedData.php",
515
  "lib/Resource/PipesConnectedAccountDisconnected.php",
516
  "lib/Resource/PipesConnectedAccountReauthorizationNeeded.php",
 
517
  "lib/Resource/PortalLinkResponse.php",
518
  "lib/Resource/Profile.php",
519
  "lib/Resource/RadarChallenge.php",
@@ -724,6 +727,7 @@
724
  "lib/WorkOS.php",
725
  "tests/ClientTest.php",
726
  "tests/Fixtures/access_token_agent_registration_credential_issued_data_detail.json",
 
727
  "tests/Fixtures/action_authentication_denied.json",
728
  "tests/Fixtures/action_authentication_denied_data.json",
729
  "tests/Fixtures/action_user_registration_denied.json",
@@ -888,6 +892,7 @@
888
  "tests/Fixtures/authentication_sso_timed_out_data.json",
889
  "tests/Fixtures/authentication_sso_timed_out_data_error.json",
890
  "tests/Fixtures/authentication_sso_timed_out_data_sso.json",
 
891
  "tests/Fixtures/authorization_check.json",
892
  "tests/Fixtures/authorization_code_session_authenticate_request.json",
893
  "tests/Fixtures/authorization_permission.json",
@@ -927,6 +932,7 @@
927
  "tests/Fixtures/connection_saml_certificate_renewed_data_connection.json",
928
  "tests/Fixtures/cors_origin_response.json",
929
  "tests/Fixtures/create_application_secret.json",
 
930
  "tests/Fixtures/create_authorization_permission.json",
931
  "tests/Fixtures/create_authorization_resource.json",
932
  "tests/Fixtures/create_connection.json",
@@ -1104,6 +1110,7 @@
1104
  "tests/Fixtures/list_audit_log_action.json",
1105
  "tests/Fixtures/list_audit_log_schema.json",
1106
  "tests/Fixtures/list_authentication_factor.json",
 
1107
  "tests/Fixtures/list_authorization_permission.json",
1108
  "tests/Fixtures/list_authorization_resource.json",
1109
  "tests/Fixtures/list_authorized_connect_application_list_data.json",
@@ -1380,6 +1387,34 @@
1380
  "tests/Service/WidgetsTest.php"
1381
  ],
1382
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1383
  "PATCH /agents/claims/attempts": {
1384
  "sdkMethod": "updateAttempts",
1385
  "service": "agents"
@@ -1392,6 +1427,30 @@
1392
  "sdkMethod": "getRegistration",
1393
  "service": "agents"
1394
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1395
  "POST /auth/challenges/{id}/verify": {
1396
  "sdkMethod": "verifyChallenge",
1397
  "service": "multiFactorAuth"
@@ -1636,10 +1695,54 @@
1636
  "sdkMethod": "listConnections",
1637
  "service": "sso"
1638
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1639
  "GET /connections/{id}": {
1640
  "sdkMethod": "getConnection",
1641
  "service": "sso"
1642
  },
 
 
 
 
1643
  "DELETE /connections/{id}": {
1644
  "sdkMethod": "deleteConnection",
1645
  "service": "sso"
@@ -1672,10 +1775,26 @@
1672
  "sdkMethod": "authorizeDataIntegration",
1673
  "service": "pipes"
1674
  },
 
 
 
 
1675
  "POST /data-integrations/{slug}/credentials": {
1676
  "sdkMethod": "createDataIntegrationCredential",
1677
  "service": "pipes"
1678
  },
 
 
 
 
 
 
 
 
 
 
 
 
1679
  "POST /data-integrations/{provider}/token": {
1680
  "sdkMethod": "getAccessToken",
1681
  "service": "pipes"
@@ -1844,6 +1963,34 @@
1844
  "sdkMethod": "listAuthorizedApplications",
1845
  "service": "organizations"
1846
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1847
  "POST /portal/generate_link": {
1848
  "sdkMethod": "generateLink",
1849
  "service": "adminPortal"
@@ -1916,6 +2063,18 @@
1916
  "sdkMethod": "revokeSession",
1917
  "service": "userManagement"
1918
  },
 
 
 
 
 
 
 
 
 
 
 
 
1919
  "GET /user_management/cors_origins": {
1920
  "sdkMethod": "listCorsOrigins",
1921
  "service": "userManagement"
@@ -2116,6 +2275,34 @@
2116
  "sdkMethod": "createUserAuthFactor",
2117
  "service": "multiFactorAuth"
2118
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2119
  "POST /vault/v1/keys/data-key": {
2120
  "sdkMethod": "createDataKey",
2121
  "service": "vault"
@@ -2223,162 +2410,6 @@
2223
  "GET /audit_logs/exports/{auditLogExportId}": {
2224
  "sdkMethod": "getExport",
2225
  "service": "auditLogs"
2226
- },
2227
- "PUT /data-integrations/{slug}/client-credentials": {
2228
- "sdkMethod": "updateDataIntegrationClientCredentials",
2229
- "service": "pipes"
2230
- },
2231
- "GET /agents/blueprints": {
2232
- "sdkMethod": "listBlueprints",
2233
- "service": "agents"
2234
- },
2235
- "POST /agents/blueprints": {
2236
- "sdkMethod": "createBlueprint",
2237
- "service": "agents"
2238
- },
2239
- "GET /agents/blueprints/{agent_blueprint_id}": {
2240
- "sdkMethod": "getBlueprint",
2241
- "service": "agents"
2242
- },
2243
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
2244
- "sdkMethod": "updateBlueprint",
2245
- "service": "agents"
2246
- },
2247
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
2248
- "sdkMethod": "deleteBlueprint",
2249
- "service": "agents"
2250
- },
2251
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
2252
- "sdkMethod": "createBlueprintToken",
2253
- "service": "agents"
2254
- },
2255
- "GET /agents/instances": {
2256
- "sdkMethod": "listInstances",
2257
- "service": "agents"
2258
- },
2259
- "GET /agents/instances/{agent_instance_id}": {
2260
- "sdkMethod": "getInstance",
2261
- "service": "agents"
2262
- },
2263
- "DELETE /agents/instances/{agent_instance_id}": {
2264
- "sdkMethod": "deleteInstance",
2265
- "service": "agents"
2266
- },
2267
- "GET /agents/sessions": {
2268
- "sdkMethod": "listSessions",
2269
- "service": "agents"
2270
- },
2271
- "GET /agents/sessions/{agent_instance_session_id}": {
2272
- "sdkMethod": "getSession",
2273
- "service": "agents"
2274
- },
2275
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
2276
- "sdkMethod": "revokeSession",
2277
- "service": "agents"
2278
- },
2279
- "POST /connections": {
2280
- "sdkMethod": "createConnection",
2281
- "service": "sso"
2282
- },
2283
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
2284
- "sdkMethod": "listConnectionSAMLIdpSigningCerts",
2285
- "service": "sso"
2286
- },
2287
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
2288
- "sdkMethod": "createConnectionSAMLIdpSigningCert",
2289
- "service": "sso"
2290
- },
2291
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
2292
- "sdkMethod": "deleteConnectionSAMLIdpSigningCert",
2293
- "service": "sso"
2294
- },
2295
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
2296
- "sdkMethod": "listConnectionSAMLSpEncryptionCerts",
2297
- "service": "sso"
2298
- },
2299
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
2300
- "sdkMethod": "createConnectionSAMLSpEncryptionCert",
2301
- "service": "sso"
2302
- },
2303
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
2304
- "sdkMethod": "deleteConnectionSAMLSpEncryptionCert",
2305
- "service": "sso"
2306
- },
2307
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
2308
- "sdkMethod": "listConnectionSAMLSpSigningCert",
2309
- "service": "sso"
2310
- },
2311
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
2312
- "sdkMethod": "createConnectionSAMLSpSigningCert",
2313
- "service": "sso"
2314
- },
2315
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
2316
- "sdkMethod": "deleteConnectionSAMLSpSigningCert",
2317
- "service": "sso"
2318
- },
2319
- "PATCH /connections/{id}": {
2320
- "sdkMethod": "updateConnection",
2321
- "service": "sso"
2322
- },
2323
- "GET /organizations/{organization_id}/it_contacts": {
2324
- "sdkMethod": "listItContacts",
2325
- "service": "organizations"
2326
- },
2327
- "POST /organizations/{organization_id}/it_contacts": {
2328
- "sdkMethod": "createItContact",
2329
- "service": "organizations"
2330
- },
2331
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2332
- "sdkMethod": "deleteItContact",
2333
- "service": "organizations"
2334
- },
2335
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2336
- "sdkMethod": "inviteItContact",
2337
- "service": "organizations"
2338
- },
2339
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2340
- "sdkMethod": "revokeItContact",
2341
- "service": "organizations"
2342
- },
2343
- "POST /platform/teams": {
2344
- "sdkMethod": "createTeam",
2345
- "service": "platformTeams"
2346
- },
2347
- "GET /platform/teams/{team_id}": {
2348
- "sdkMethod": "getTeam",
2349
- "service": "platformTeams"
2350
- },
2351
- "DELETE /user_management/waitlist_entries/{id}": {
2352
- "sdkMethod": "deleteWaitlistEntry",
2353
- "service": "userManagement"
2354
- },
2355
- "POST /user_management/waitlist_entries/{id}/approve": {
2356
- "sdkMethod": "createWaitlistEntryApprove",
2357
- "service": "userManagement"
2358
- },
2359
- "POST /user_management/waitlist_entries/{id}/deny": {
2360
- "sdkMethod": "createWaitlistEntryDeny",
2361
- "service": "userManagement"
2362
- },
2363
- "GET /user_management/waitlists": {
2364
- "sdkMethod": "listWaitlists",
2365
- "service": "userManagement"
2366
- },
2367
- "GET /user_management/waitlists/{id}": {
2368
- "sdkMethod": "getWaitlist",
2369
- "service": "userManagement"
2370
- },
2371
- "GET /user_management/waitlists/{id}/entries": {
2372
- "sdkMethod": "listWaitlistEntries",
2373
- "service": "userManagement"
2374
- },
2375
- "POST /user_management/waitlists/{id}/entries": {
2376
- "sdkMethod": "createWaitlistEntry",
2377
- "service": "userManagement"
2378
- },
2379
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
2380
- "sdkMethod": "validateBlueprintToken",
2381
- "service": "agents"
2382
  }
2383
  }
2384
  }
 
3
  "language": "php",
4
  "files": [
5
  "lib/Resource/AccessTokenAgentRegistrationCredentialIssuedDataDetail.php",
6
+ "lib/Resource/AccountSelectionRequiredError.php",
7
  "lib/Resource/ActionAuthenticationDenied.php",
8
  "lib/Resource/ActionAuthenticationDeniedData.php",
9
  "lib/Resource/ActionUserRegistrationDenied.php",
 
183
  "lib/Resource/AuthenticationSSOTimedOutData.php",
184
  "lib/Resource/AuthenticationSSOTimedOutDataError.php",
185
  "lib/Resource/AuthenticationSSOTimedOutDataSSO.php",
186
+ "lib/Resource/AuthkitOAuthResource.php",
187
  "lib/Resource/AuthorizationAssignment.php",
188
  "lib/Resource/AuthorizationCheck.php",
189
  "lib/Resource/AuthorizationCodeSessionAuthenticateRequest.php",
 
233
  "lib/Resource/ConnectionType.php",
234
  "lib/Resource/ConnectionsConnectionType.php",
235
  "lib/Resource/CreateApplicationSecret.php",
236
+ "lib/Resource/CreateAuthkitOAuthResource.php",
237
  "lib/Resource/CreateAuthorizationPermission.php",
238
  "lib/Resource/CreateAuthorizationResource.php",
239
  "lib/Resource/CreateCORSOrigin.php",
 
244
  "lib/Resource/CreateConnectionSAMLOptions.php",
245
  "lib/Resource/CreateConnectionStandardAttributes.php",
246
  "lib/Resource/CreateDataIntegration.php",
 
247
  "lib/Resource/CreateDataKeyRequest.php",
248
  "lib/Resource/CreateDataKeyResponse.php",
249
  "lib/Resource/CreateGroup.php",
 
516
  "lib/Resource/PipesConnectedAccountConnectionFailedData.php",
517
  "lib/Resource/PipesConnectedAccountDisconnected.php",
518
  "lib/Resource/PipesConnectedAccountReauthorizationNeeded.php",
519
+ "lib/Resource/PipesOwnership.php",
520
  "lib/Resource/PortalLinkResponse.php",
521
  "lib/Resource/Profile.php",
522
  "lib/Resource/RadarChallenge.php",
 
727
  "lib/WorkOS.php",
728
  "tests/ClientTest.php",
729
  "tests/Fixtures/access_token_agent_registration_credential_issued_data_detail.json",
730
+ "tests/Fixtures/account_selection_required_error.json",
731
  "tests/Fixtures/action_authentication_denied.json",
732
  "tests/Fixtures/action_authentication_denied_data.json",
733
  "tests/Fixtures/action_user_registration_denied.json",
 
892
  "tests/Fixtures/authentication_sso_timed_out_data.json",
893
  "tests/Fixtures/authentication_sso_timed_out_data_error.json",
894
  "tests/Fixtures/authentication_sso_timed_out_data_sso.json",
895
+ "tests/Fixtures/authkit_oauth_resource.json",
896
  "tests/Fixtures/authorization_check.json",
897
  "tests/Fixtures/authorization_code_session_authenticate_request.json",
898
  "tests/Fixtures/authorization_permission.json",
 
932
  "tests/Fixtures/connection_saml_certificate_renewed_data_connection.json",
933
  "tests/Fixtures/cors_origin_response.json",
934
  "tests/Fixtures/create_application_secret.json",
935
+ "tests/Fixtures/create_authkit_oauth_resource.json",
936
  "tests/Fixtures/create_authorization_permission.json",
937
  "tests/Fixtures/create_authorization_resource.json",
938
  "tests/Fixtures/create_connection.json",
 
1110
  "tests/Fixtures/list_audit_log_action.json",
1111
  "tests/Fixtures/list_audit_log_schema.json",
1112
  "tests/Fixtures/list_authentication_factor.json",
1113
+ "tests/Fixtures/list_authkit_oauth_resource.json",
1114
  "tests/Fixtures/list_authorization_permission.json",
1115
  "tests/Fixtures/list_authorization_resource.json",
1116
  "tests/Fixtures/list_authorized_connect_application_list_data.json",
 
1387
  "tests/Service/WidgetsTest.php"
1388
  ],
1389
  "operations": {
1390
+ "GET /agents/blueprints": {
1391
+ "sdkMethod": "listBlueprints",
1392
+ "service": "agents"
1393
+ },
1394
+ "POST /agents/blueprints": {
1395
+ "sdkMethod": "createBlueprint",
1396
+ "service": "agents"
1397
+ },
1398
+ "GET /agents/blueprints/{agent_blueprint_id}": {
1399
+ "sdkMethod": "getBlueprint",
1400
+ "service": "agents"
1401
+ },
1402
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
1403
+ "sdkMethod": "updateBlueprint",
1404
+ "service": "agents"
1405
+ },
1406
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
1407
+ "sdkMethod": "deleteBlueprint",
1408
+ "service": "agents"
1409
+ },
1410
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1411
+ "sdkMethod": "createBlueprintToken",
1412
+ "service": "agents"
1413
+ },
1414
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1415
+ "sdkMethod": "validateBlueprintToken",
1416
+ "service": "agents"
1417
+ },
1418
  "PATCH /agents/claims/attempts": {
1419
  "sdkMethod": "updateAttempts",
1420
  "service": "agents"
 
1427
  "sdkMethod": "getRegistration",
1428
  "service": "agents"
1429
  },
1430
+ "GET /agents/instances": {
1431
+ "sdkMethod": "listInstances",
1432
+ "service": "agents"
1433
+ },
1434
+ "GET /agents/instances/{agent_instance_id}": {
1435
+ "sdkMethod": "getInstance",
1436
+ "service": "agents"
1437
+ },
1438
+ "DELETE /agents/instances/{agent_instance_id}": {
1439
+ "sdkMethod": "deleteInstance",
1440
+ "service": "agents"
1441
+ },
1442
+ "GET /agents/sessions": {
1443
+ "sdkMethod": "listSessions",
1444
+ "service": "agents"
1445
+ },
1446
+ "GET /agents/sessions/{agent_instance_session_id}": {
1447
+ "sdkMethod": "getSession",
1448
+ "service": "agents"
1449
+ },
1450
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1451
+ "sdkMethod": "revokeSession",
1452
+ "service": "agents"
1453
+ },
1454
  "POST /auth/challenges/{id}/verify": {
1455
  "sdkMethod": "verifyChallenge",
1456
  "service": "multiFactorAuth"
 
1695
  "sdkMethod": "listConnections",
1696
  "service": "sso"
1697
  },
1698
+ "POST /connections": {
1699
+ "sdkMethod": "createConnection",
1700
+ "service": "sso"
1701
+ },
1702
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1703
+ "sdkMethod": "listConnectionSAMLIdpSigningCerts",
1704
+ "service": "sso"
1705
+ },
1706
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1707
+ "sdkMethod": "createConnectionSAMLIdpSigningCert",
1708
+ "service": "sso"
1709
+ },
1710
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1711
+ "sdkMethod": "deleteConnectionSAMLIdpSigningCert",
1712
+ "service": "sso"
1713
+ },
1714
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1715
+ "sdkMethod": "listConnectionSAMLSpEncryptionCerts",
1716
+ "service": "sso"
1717
+ },
1718
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1719
+ "sdkMethod": "createConnectionSAMLSpEncryptionCert",
1720
+ "service": "sso"
1721
+ },
1722
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1723
+ "sdkMethod": "deleteConnectionSAMLSpEncryptionCert",
1724
+ "service": "sso"
1725
+ },
1726
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1727
+ "sdkMethod": "listConnectionSAMLSpSigningCert",
1728
+ "service": "sso"
1729
+ },
1730
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1731
+ "sdkMethod": "createConnectionSAMLSpSigningCert",
1732
+ "service": "sso"
1733
+ },
1734
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1735
+ "sdkMethod": "deleteConnectionSAMLSpSigningCert",
1736
+ "service": "sso"
1737
+ },
1738
  "GET /connections/{id}": {
1739
  "sdkMethod": "getConnection",
1740
  "service": "sso"
1741
  },
1742
+ "PATCH /connections/{id}": {
1743
+ "sdkMethod": "updateConnection",
1744
+ "service": "sso"
1745
+ },
1746
  "DELETE /connections/{id}": {
1747
  "sdkMethod": "deleteConnection",
1748
  "service": "sso"
 
1775
  "sdkMethod": "authorizeDataIntegration",
1776
  "service": "pipes"
1777
  },
1778
+ "PUT /data-integrations/{slug}/client-credentials": {
1779
+ "sdkMethod": "updateDataIntegrationClientCredentials",
1780
+ "service": "pipes"
1781
+ },
1782
  "POST /data-integrations/{slug}/credentials": {
1783
  "sdkMethod": "createDataIntegrationCredential",
1784
  "service": "pipes"
1785
  },
1786
+ "GET /data-integrations/{slug}/organization": {
1787
+ "sdkMethod": "listDataIntegrationOrganization",
1788
+ "service": "pipes"
1789
+ },
1790
+ "PUT /data-integrations/{slug}/organization": {
1791
+ "sdkMethod": "updateDataIntegrationOrganization",
1792
+ "service": "pipes"
1793
+ },
1794
+ "DELETE /data-integrations/{slug}/organization": {
1795
+ "sdkMethod": "deleteDataIntegrationOrganization",
1796
+ "service": "pipes"
1797
+ },
1798
  "POST /data-integrations/{provider}/token": {
1799
  "sdkMethod": "getAccessToken",
1800
  "service": "pipes"
 
1963
  "sdkMethod": "listAuthorizedApplications",
1964
  "service": "organizations"
1965
  },
1966
+ "GET /organizations/{organization_id}/it_contacts": {
1967
+ "sdkMethod": "listItContacts",
1968
+ "service": "organizations"
1969
+ },
1970
+ "POST /organizations/{organization_id}/it_contacts": {
1971
+ "sdkMethod": "createItContact",
1972
+ "service": "organizations"
1973
+ },
1974
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
1975
+ "sdkMethod": "deleteItContact",
1976
+ "service": "organizations"
1977
+ },
1978
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
1979
+ "sdkMethod": "inviteItContact",
1980
+ "service": "organizations"
1981
+ },
1982
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
1983
+ "sdkMethod": "revokeItContact",
1984
+ "service": "organizations"
1985
+ },
1986
+ "POST /platform/teams": {
1987
+ "sdkMethod": "createTeam",
1988
+ "service": "platformTeams"
1989
+ },
1990
+ "GET /platform/teams/{team_id}": {
1991
+ "sdkMethod": "getTeam",
1992
+ "service": "platformTeams"
1993
+ },
1994
  "POST /portal/generate_link": {
1995
  "sdkMethod": "generateLink",
1996
  "service": "adminPortal"
 
2063
  "sdkMethod": "revokeSession",
2064
  "service": "userManagement"
2065
  },
2066
+ "GET /user_management/authkit_oauth_resources": {
2067
+ "sdkMethod": "listAuthkitOAuthResources",
2068
+ "service": "userManagement"
2069
+ },
2070
+ "POST /user_management/authkit_oauth_resources": {
2071
+ "sdkMethod": "createAuthkitOAuthResource",
2072
+ "service": "userManagement"
2073
+ },
2074
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
2075
+ "sdkMethod": "deleteAuthkitOAuthResource",
2076
+ "service": "userManagement"
2077
+ },
2078
  "GET /user_management/cors_origins": {
2079
  "sdkMethod": "listCorsOrigins",
2080
  "service": "userManagement"
 
2275
  "sdkMethod": "createUserAuthFactor",
2276
  "service": "multiFactorAuth"
2277
  },
2278
+ "DELETE /user_management/waitlist_entries/{id}": {
2279
+ "sdkMethod": "deleteWaitlistEntry",
2280
+ "service": "userManagement"
2281
+ },
2282
+ "POST /user_management/waitlist_entries/{id}/approve": {
2283
+ "sdkMethod": "createWaitlistEntryApprove",
2284
+ "service": "userManagement"
2285
+ },
2286
+ "POST /user_management/waitlist_entries/{id}/deny": {
2287
+ "sdkMethod": "createWaitlistEntryDeny",
2288
+ "service": "userManagement"
2289
+ },
2290
+ "GET /user_management/waitlists": {
2291
+ "sdkMethod": "listWaitlists",
2292
+ "service": "userManagement"
2293
+ },
2294
+ "GET /user_management/waitlists/{id}": {
2295
+ "sdkMethod": "getWaitlist",
2296
+ "service": "userManagement"
2297
+ },
2298
+ "GET /user_management/waitlists/{id}/entries": {
2299
+ "sdkMethod": "listWaitlistEntries",
2300
+ "service": "userManagement"
2301
+ },
2302
+ "POST /user_management/waitlists/{id}/entries": {
2303
+ "sdkMethod": "createWaitlistEntry",
2304
+ "service": "userManagement"
2305
+ },
2306
  "POST /vault/v1/keys/data-key": {
2307
  "sdkMethod": "createDataKey",
2308
  "service": "vault"
 
2410
  "GET /audit_logs/exports/{auditLogExportId}": {
2411
  "sdkMethod": "getExport",
2412
  "service": "auditLogs"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2413
  }
2414
  }
2415
  }
php/lib/Resource/AccountSelectionRequiredError.php
php/lib/Resource/AccountSelectionRequiredError.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 AccountSelectionRequiredError implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /** Indicates that several connected accounts match and the request must name one. */
15
+ public string $code,
16
+ /** A human-readable explanation of the ambiguity. */
17
+ public string $message,
18
+ ) {
19
+ }
20
+
21
+ public static function fromArray(array $data): self
22
+ {
23
+ return new self(
24
+ code: $data['code'] ?? 'account_selection_required',
25
+ message: $data['message'],
26
+ );
27
+ }
28
+
29
+ public function toArray(): array
30
+ {
31
+ return [
32
+ 'code' => $this->code,
33
+ 'message' => $this->message,
34
+ ];
35
+ }
36
+ }
php/lib/Resource/AuditLogsRetention.php
php/lib/Resource/AuditLogsRetention.php CHANGED
@@ -11,7 +11,7 @@ readonly class AuditLogsRetention implements \JsonSerializable
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
- /** The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365. */
15
  public ?int $retentionPeriodInDays,
16
  ) {
17
  }
 
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
+ /** The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 through 330 in 30-day increments and 365 through 3650 in 365-day increments. */
15
  public ?int $retentionPeriodInDays,
16
  ) {
17
  }
php/lib/Resource/AuthkitOAuthResource.php
php/lib/Resource/AuthkitOAuthResource.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 AuthkitOAuthResource implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /** The object type. */
15
+ public string $object,
16
+ /** The ID of the AuthKit OAuth resource. */
17
+ public string $id,
18
+ /** The resource URI. */
19
+ public string $uri,
20
+ /** Whether this is the default AuthKit OAuth resource for the environment. */
21
+ public bool $default,
22
+ /** The timestamp when the AuthKit OAuth resource was created. */
23
+ public string $createdAt,
24
+ /** The timestamp when the AuthKit OAuth resource was last updated. */
25
+ public string $updatedAt,
26
+ ) {
27
+ }
28
+
29
+ public static function fromArray(array $data): self
30
+ {
31
+ return new self(
32
+ object: $data['object'] ?? 'authkit_oauth_resource',
33
+ id: $data['id'],
34
+ uri: $data['uri'],
35
+ default: $data['default'],
36
+ createdAt: $data['created_at'],
37
+ updatedAt: $data['updated_at'],
38
+ );
39
+ }
40
+
41
+ public function toArray(): array
42
+ {
43
+ return [
44
+ 'object' => $this->object,
45
+ 'id' => $this->id,
46
+ 'uri' => $this->uri,
47
+ 'default' => $this->default,
48
+ 'created_at' => $this->createdAt,
49
+ 'updated_at' => $this->updatedAt,
50
+ ];
51
+ }
52
+ }
php/lib/Resource/CreateAuthkitOAuthResource.php
php/lib/Resource/CreateAuthkitOAuthResource.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CreateAuthkitOAuthResource implements \JsonSerializable
10
+ {
11
+ use JsonSerializableTrait;
12
+
13
+ public function __construct(
14
+ /** The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment. */
15
+ public string $uri,
16
+ /** Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default. */
17
+ public ?bool $default = null,
18
+ ) {
19
+ }
20
+
21
+ public static function fromArray(array $data): self
22
+ {
23
+ return new self(
24
+ uri: $data['uri'],
25
+ default: $data['default'] ?? null,
26
+ );
27
+ }
28
+
29
+ public function toArray(): array
30
+ {
31
+ return [
32
+ 'uri' => $this->uri,
33
+ 'default' => $this->default,
34
+ ];
35
+ }
36
+ }
php/lib/Resource/CreateDataIntegration.php
php/lib/Resource/CreateDataIntegration.php CHANGED
@@ -13,6 +13,8 @@ readonly class CreateDataIntegration implements \JsonSerializable
13
  public function __construct(
14
  /** The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug. */
15
  public string $provider,
 
 
16
  /** An optional description of the Data Integration. */
17
  public ?string $description = null,
18
  /** Whether the Data Integration is enabled. Defaults to `false`. */
@@ -45,6 +47,7 @@ readonly class CreateDataIntegration implements \JsonSerializable
45
  {
46
  return new self(
47
  provider: $data['provider'],
 
48
  description: $data['description'] ?? null,
49
  enabled: $data['enabled'] ?? null,
50
  scopes: $data['scopes'] ?? null,
@@ -60,6 +63,7 @@ readonly class CreateDataIntegration implements \JsonSerializable
60
  {
61
  return [
62
  'provider' => $this->provider,
 
63
  'description' => $this->description,
64
  'enabled' => $this->enabled,
65
  'scopes' => $this->scopes,
 
13
  public function __construct(
14
  /** The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug. */
15
  public string $provider,
16
+ /** Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`. */
17
+ public ?PipesOwnership $ownership = null,
18
  /** An optional description of the Data Integration. */
19
  public ?string $description = null,
20
  /** Whether the Data Integration is enabled. Defaults to `false`. */
 
47
  {
48
  return new self(
49
  provider: $data['provider'],
50
+ ownership: isset($data['ownership']) ? PipesOwnership::from($data['ownership']) : null,
51
  description: $data['description'] ?? null,
52
  enabled: $data['enabled'] ?? null,
53
  scopes: $data['scopes'] ?? null,
 
63
  {
64
  return [
65
  'provider' => $this->provider,
66
+ 'ownership' => $this->ownership?->value,
67
  'description' => $this->description,
68
  'enabled' => $this->enabled,
69
  'scopes' => $this->scopes,
php/lib/Resource/DataIntegration.php
php/lib/Resource/DataIntegration.php CHANGED
@@ -19,6 +19,8 @@ readonly class DataIntegration implements \JsonSerializable
19
  public string $slug,
20
  /** The integration type derived from the provider. */
21
  public string $integrationType,
 
 
22
  /** An optional description of the Data Integration. */
23
  public ?string $description,
24
  /** Whether the Data Integration is enabled. */
@@ -62,6 +64,7 @@ readonly class DataIntegration implements \JsonSerializable
62
  id: $data['id'],
63
  slug: $data['slug'],
64
  integrationType: $data['integration_type'],
 
65
  description: $data['description'] ?? null,
66
  enabled: $data['enabled'],
67
  state: DataIntegrationState::from($data['state']),
@@ -84,6 +87,7 @@ readonly class DataIntegration implements \JsonSerializable
84
  'id' => $this->id,
85
  'slug' => $this->slug,
86
  'integration_type' => $this->integrationType,
 
87
  'description' => $this->description,
88
  'enabled' => $this->enabled,
89
  'state' => $this->state->value,
 
19
  public string $slug,
20
  /** The integration type derived from the provider. */
21
  public string $integrationType,
22
+ /** Who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation. */
23
+ public PipesOwnership $ownership,
24
  /** An optional description of the Data Integration. */
25
  public ?string $description,
26
  /** Whether the Data Integration is enabled. */
 
64
  id: $data['id'],
65
  slug: $data['slug'],
66
  integrationType: $data['integration_type'],
67
+ ownership: PipesOwnership::from($data['ownership']),
68
  description: $data['description'] ?? null,
69
  enabled: $data['enabled'],
70
  state: DataIntegrationState::from($data['state']),
 
87
  'id' => $this->id,
88
  'slug' => $this->slug,
89
  'integration_type' => $this->integrationType,
90
+ 'ownership' => $this->ownership->value,
91
  'description' => $this->description,
92
  'enabled' => $this->enabled,
93
  'state' => $this->state->value,
php/lib/Resource/DataIntegrationInstallation.php
php/lib/Resource/DataIntegrationInstallation.php CHANGED
@@ -13,9 +13,9 @@ readonly class DataIntegrationInstallation implements \JsonSerializable
13
  public function __construct(
14
  /** Unique identifier of the installation. */
15
  public string $id,
16
- /** The User the API key was installed for. */
17
- public string $userId,
18
- /** The Organization the installation is scoped to, or null when unscoped. */
19
  public ?string $organizationId,
20
  /** The last four characters of the stored API key. The full key is never returned. */
21
  public ?string $apiKeyLast4,
@@ -26,7 +26,7 @@ readonly class DataIntegrationInstallation implements \JsonSerializable
26
  {
27
  return new self(
28
  id: $data['id'],
29
- userId: $data['user_id'],
30
  organizationId: $data['organization_id'] ?? null,
31
  apiKeyLast4: $data['api_key_last_4'] ?? null,
32
  );
 
13
  public function __construct(
14
  /** Unique identifier of the installation. */
15
  public string $id,
16
+ /** The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization. */
17
+ public ?string $userId,
18
+ /** The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped. */
19
  public ?string $organizationId,
20
  /** The last four characters of the stored API key. The full key is never returned. */
21
  public ?string $apiKeyLast4,
 
26
  {
27
  return new self(
28
  id: $data['id'],
29
+ userId: $data['user_id'] ?? null,
30
  organizationId: $data['organization_id'] ?? null,
31
  apiKeyLast4: $data['api_key_last_4'] ?? null,
32
  );
php/lib/Resource/DataIntegrationsGetUserTokenRequest.php
php/lib/Resource/DataIntegrationsGetUserTokenRequest.php CHANGED
@@ -11,12 +11,16 @@ readonly class DataIntegrationsGetUserTokenRequest implements \JsonSerializable
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
- /** A [User](https://workos.com/docs/reference/authkit/user) identifier. */
15
  public string $userId,
16
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
17
  public ?string $organizationId = null,
18
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
19
  public ?string $connectedAccountId = null,
 
 
 
 
20
  ) {
21
  }
22
 
@@ -26,6 +30,8 @@ readonly class DataIntegrationsGetUserTokenRequest implements \JsonSerializable
26
  userId: $data['user_id'],
27
  organizationId: $data['organization_id'] ?? null,
28
  connectedAccountId: $data['connected_account_id'] ?? null,
 
 
29
  );
30
  }
31
 
@@ -35,6 +41,8 @@ readonly class DataIntegrationsGetUserTokenRequest implements \JsonSerializable
35
  'user_id' => $this->userId,
36
  'organization_id' => $this->organizationId,
37
  'connected_account_id' => $this->connectedAccountId,
 
 
38
  ];
39
  }
40
  }
 
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
+ /** A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization. */
15
  public string $userId,
16
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
17
  public ?string $organizationId = null,
18
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
19
  public ?string $connectedAccountId = null,
20
+ /** Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`. */
21
+ public ?PipesOwnership $connectionOwner = null,
22
+ /** Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered. */
23
+ public ?bool $supportsMultipleConnections = null,
24
  ) {
25
  }
26
 
 
30
  userId: $data['user_id'],
31
  organizationId: $data['organization_id'] ?? null,
32
  connectedAccountId: $data['connected_account_id'] ?? null,
33
+ connectionOwner: isset($data['connection_owner']) ? PipesOwnership::from($data['connection_owner']) : null,
34
+ supportsMultipleConnections: $data['supports_multiple_connections'] ?? null,
35
  );
36
  }
37
 
 
41
  'user_id' => $this->userId,
42
  'organization_id' => $this->organizationId,
43
  'connected_account_id' => $this->connectedAccountId,
44
+ 'connection_owner' => $this->connectionOwner?->value,
45
+ 'supports_multiple_connections' => $this->supportsMultipleConnections,
46
  ];
47
  }
48
  }
php/lib/Resource/DataIntegrationsListResponseData.php
php/lib/Resource/DataIntegrationsListResponseData.php CHANGED
@@ -36,10 +36,10 @@ readonly class DataIntegrationsListResponseData implements \JsonSerializable
36
  public string $createdAt,
37
  /** The timestamp when the provider was last updated. */
38
  public string $updatedAt,
39
- /** The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected. */
40
  public ?DataIntegrationsListResponseDataConnectedAccount $connectedAccount,
41
  /**
42
- * The user's connected accounts for this provider in the requested ownership context.
43
  * @var array<\WorkOS\Resource\DataIntegrationsListResponseDataConnectedAccount>
44
  */
45
  public array $connectedAccounts,
 
36
  public string $createdAt,
37
  /** The timestamp when the provider was last updated. */
38
  public string $updatedAt,
39
+ /** The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection. */
40
  public ?DataIntegrationsListResponseDataConnectedAccount $connectedAccount,
41
  /**
42
+ * The user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`.
43
  * @var array<\WorkOS\Resource\DataIntegrationsListResponseDataConnectedAccount>
44
  */
45
  public array $connectedAccounts,
php/lib/Resource/DataIntegrationsUpsertApiKeyRequest.php
php/lib/Resource/DataIntegrationsUpsertApiKeyRequest.php CHANGED
@@ -15,8 +15,12 @@ readonly class DataIntegrationsUpsertApiKeyRequest implements \JsonSerializable
15
  public string $userId,
16
  /** The API key secret to store for this integration. */
17
  public string $secret,
18
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
19
  public ?string $organizationId = null,
 
 
 
 
20
  ) {
21
  }
22
 
@@ -26,6 +30,8 @@ readonly class DataIntegrationsUpsertApiKeyRequest implements \JsonSerializable
26
  userId: $data['user_id'],
27
  secret: $data['secret'],
28
  organizationId: $data['organization_id'] ?? null,
 
 
29
  );
30
  }
31
 
@@ -35,6 +41,8 @@ readonly class DataIntegrationsUpsertApiKeyRequest implements \JsonSerializable
35
  'user_id' => $this->userId,
36
  'secret' => $this->secret,
37
  'organization_id' => $this->organizationId,
 
 
38
  ];
39
  }
40
  }
 
15
  public string $userId,
16
  /** The API key secret to store for this integration. */
17
  public string $secret,
18
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
19
  public ?string $organizationId = null,
20
+ /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection. */
21
+ public ?string $connectedAccountId = null,
22
+ /** Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. */
23
+ public ?PipesOwnership $connectionOwner = null,
24
  ) {
25
  }
26
 
 
30
  userId: $data['user_id'],
31
  secret: $data['secret'],
32
  organizationId: $data['organization_id'] ?? null,
33
+ connectedAccountId: $data['connected_account_id'] ?? null,
34
+ connectionOwner: isset($data['connection_owner']) ? PipesOwnership::from($data['connection_owner']) : null,
35
  );
36
  }
37
 
 
41
  'user_id' => $this->userId,
42
  'secret' => $this->secret,
43
  'organization_id' => $this->organizationId,
44
+ 'connected_account_id' => $this->connectedAccountId,
45
+ 'connection_owner' => $this->connectionOwner?->value,
46
  ];
47
  }
48
  }
php/lib/Resource/DataIntegrationsUpsertClientCredentialsRequest.php
php/lib/Resource/DataIntegrationsUpsertClientCredentialsRequest.php CHANGED
@@ -17,8 +17,12 @@ readonly class DataIntegrationsUpsertClientCredentialsRequest implements \JsonSe
17
  public string $clientId,
18
  /** The OAuth client secret to store for this integration. */
19
  public string $clientSecret,
20
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
21
  public ?string $organizationId = null,
 
 
 
 
22
  /**
23
  * Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
24
  * @var array<string, string>|null
@@ -34,6 +38,8 @@ readonly class DataIntegrationsUpsertClientCredentialsRequest implements \JsonSe
34
  clientId: $data['client_id'],
35
  clientSecret: $data['client_secret'],
36
  organizationId: $data['organization_id'] ?? null,
 
 
37
  config: $data['config'] ?? null,
38
  );
39
  }
@@ -45,6 +51,8 @@ readonly class DataIntegrationsUpsertClientCredentialsRequest implements \JsonSe
45
  'client_id' => $this->clientId,
46
  'client_secret' => $this->clientSecret,
47
  'organization_id' => $this->organizationId,
 
 
48
  'config' => $this->config,
49
  ];
50
  }
 
17
  public string $clientId,
18
  /** The OAuth client secret to store for this integration. */
19
  public string $clientSecret,
20
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
21
  public ?string $organizationId = null,
22
+ /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection. */
23
+ public ?string $connectedAccountId = null,
24
+ /** Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization. */
25
+ public ?PipesOwnership $connectionOwner = null,
26
  /**
27
  * Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
28
  * @var array<string, string>|null
 
38
  clientId: $data['client_id'],
39
  clientSecret: $data['client_secret'],
40
  organizationId: $data['organization_id'] ?? null,
41
+ connectedAccountId: $data['connected_account_id'] ?? null,
42
+ connectionOwner: isset($data['connection_owner']) ? PipesOwnership::from($data['connection_owner']) : null,
43
  config: $data['config'] ?? null,
44
  );
45
  }
 
51
  'client_id' => $this->clientId,
52
  'client_secret' => $this->clientSecret,
53
  'organization_id' => $this->organizationId,
54
+ 'connected_account_id' => $this->connectedAccountId,
55
+ 'connection_owner' => $this->connectionOwner?->value,
56
  'config' => $this->config,
57
  ];
58
  }
php/lib/Resource/DataIntegrationsVendCredentialsRequest.php
php/lib/Resource/DataIntegrationsVendCredentialsRequest.php CHANGED
@@ -11,12 +11,16 @@ readonly class DataIntegrationsVendCredentialsRequest implements \JsonSerializab
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
- /** A [User](https://workos.com/docs/reference/authkit/user) identifier. */
15
  public string $userId,
16
- /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. */
17
  public ?string $organizationId = null,
18
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
19
  public ?string $connectedAccountId = null,
 
 
 
 
20
  ) {
21
  }
22
 
@@ -26,6 +30,8 @@ readonly class DataIntegrationsVendCredentialsRequest implements \JsonSerializab
26
  userId: $data['user_id'],
27
  organizationId: $data['organization_id'] ?? null,
28
  connectedAccountId: $data['connected_account_id'] ?? null,
 
 
29
  );
30
  }
31
 
@@ -35,6 +41,8 @@ readonly class DataIntegrationsVendCredentialsRequest implements \JsonSerializab
35
  'user_id' => $this->userId,
36
  'organization_id' => $this->organizationId,
37
  'connected_account_id' => $this->connectedAccountId,
 
 
38
  ];
39
  }
40
  }
 
11
  use JsonSerializableTrait;
12
 
13
  public function __construct(
14
+ /** A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization. */
15
  public string $userId,
16
+ /** An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`. */
17
  public ?string $organizationId = null,
18
  /** A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider. */
19
  public ?string $connectedAccountId = null,
20
+ /** Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`. */
21
+ public ?PipesOwnership $connectionOwner = null,
22
+ /** Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered. */
23
+ public ?bool $supportsMultipleConnections = null,
24
  ) {
25
  }
26
 
 
30
  userId: $data['user_id'],
31
  organizationId: $data['organization_id'] ?? null,
32
  connectedAccountId: $data['connected_account_id'] ?? null,
33
+ connectionOwner: isset($data['connection_owner']) ? PipesOwnership::from($data['connection_owner']) : null,
34
+ supportsMultipleConnections: $data['supports_multiple_connections'] ?? null,
35
  );
36
  }
37
 
 
41
  'user_id' => $this->userId,
42
  'organization_id' => $this->organizationId,
43
  'connected_account_id' => $this->connectedAccountId,
44
+ 'connection_owner' => $this->connectionOwner?->value,
45
+ 'supports_multiple_connections' => $this->supportsMultipleConnections,
46
  ];
47
  }
48
  }
php/lib/Resource/GenerateLink.php
php/lib/Resource/GenerateLink.php CHANGED
@@ -13,9 +13,9 @@ readonly class GenerateLink implements \JsonSerializable
13
  public function __construct(
14
  /** An [Organization](https://workos.com/docs/reference/organization) identifier. */
15
  public string $organization,
16
- /** The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used. */
17
  public ?string $returnUrl = null,
18
- /** The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used. */
19
  public ?string $successUrl = null,
20
  /**
21
  *
 
13
  public function __construct(
14
  /** An [Organization](https://workos.com/docs/reference/organization) identifier. */
15
  public string $organization,
16
+ /** The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used. */
17
  public ?string $returnUrl = null,
18
+ /** The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used. */
19
  public ?string $successUrl = null,
20
  /**
21
  *
php/lib/Resource/PipesOwnership.php
php/lib/Resource/{CreateDataIntegrationAuthMethods.php → PipesOwnership.php} RENAMED
@@ -6,8 +6,8 @@ declare(strict_types=1);
6
 
7
  namespace WorkOS\Resource;
8
 
9
- enum CreateDataIntegrationAuthMethods: string
10
  {
11
- case OAuth = 'oauth';
12
- case ApiKey = 'api_key';
13
  }
 
6
 
7
  namespace WorkOS\Resource;
8
 
9
+ enum PipesOwnership: string
10
  {
11
+ case User = 'user';
12
+ case Organization = 'organization';
13
  }
php/lib/Resource/ResourceExportFailedDataResourceType.php
php/lib/Resource/ResourceExportFailedDataResourceType.php CHANGED
@@ -13,4 +13,5 @@ enum ResourceExportFailedDataResourceType: string
13
  case Events = 'events';
14
  case Sessions = 'sessions';
15
  case AuditLogEvents = 'auditLogEvents';
 
16
  }
 
13
  case Events = 'events';
14
  case Sessions = 'sessions';
15
  case AuditLogEvents = 'auditLogEvents';
16
+ case Connections = 'connections';
17
  }
php/lib/Service/AdminPortal.php
php/lib/Service/AdminPortal.php CHANGED
@@ -19,8 +19,8 @@ class AdminPortal
19
  * Generate a Portal Link
20
  *
21
  * Generate a Portal Link scoped to an Organization.
22
- * @param string|null $returnUrl The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
23
- * @param string|null $successUrl The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
24
  * @param string $organization An [Organization](https://workos.com/docs/reference/organization) identifier.
25
  * @param \WorkOS\Resource\GenerateLinkIntent|null $intent
26
  * The intent of the Admin Portal.
 
19
  * Generate a Portal Link
20
  *
21
  * Generate a Portal Link scoped to an Organization.
22
+ * @param string|null $returnUrl The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
23
+ * @param string|null $successUrl The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
24
  * @param string $organization An [Organization](https://workos.com/docs/reference/organization) identifier.
25
  * @param \WorkOS\Resource\GenerateLinkIntent|null $intent
26
  * The intent of the Admin Portal.
php/lib/Service/Pipes.php
php/lib/Service/Pipes.php CHANGED
@@ -23,11 +23,12 @@ class Pipes
23
  /**
24
  * List data integrations
25
  *
26
- * Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
27
  * @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"`.
28
  * @param string|null $after 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
29
  * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10.
30
  * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc".
 
31
  * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\DataIntegration>
32
  * @throws \WorkOS\Exception\WorkOSException
33
  */
@@ -36,6 +37,7 @@ class Pipes
36
  ?string $after = null,
37
  ?int $limit = null,
38
  \WorkOS\Resource\PaginationOrder $order = \WorkOS\Resource\PaginationOrder::Desc,
 
39
  ?\WorkOS\RequestOptions $options = null,
40
  ): \WorkOS\PaginatedResponse {
41
  $query = array_filter([
@@ -43,6 +45,7 @@ class Pipes
43
  'after' => $after,
44
  'limit' => $limit,
45
  'order' => $order->value,
 
46
  ], fn ($v) => $v !== null);
47
  return $this->client->requestPage(
48
  method: 'GET',
@@ -56,8 +59,9 @@ class Pipes
56
  /**
57
  * Create a data integration
58
  *
59
- * Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
60
  * @param string $provider The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
 
61
  * @param string|null $description An optional description of the Data Integration.
62
  * @param bool|null $enabled Whether the Data Integration is enabled. Defaults to `false`.
63
  * @param array<string>|null $scopes The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
@@ -71,6 +75,7 @@ class Pipes
71
  */
72
  public function createDataIntegration(
73
  string $provider,
 
74
  ?string $description = null,
75
  ?bool $enabled = null,
76
  ?array $scopes = null,
@@ -83,6 +88,7 @@ class Pipes
83
  ): \WorkOS\Resource\DataIntegration {
84
  $body = array_filter([
85
  'provider' => $provider,
 
86
  'description' => $description,
87
  'enabled' => $enabled,
88
  'scopes' => $scopes,
@@ -104,7 +110,7 @@ class Pipes
104
  /**
105
  * Get a data integration
106
  *
107
- * Retrieves a data integration by its slug.
108
  * @param string $slug The slug identifier of the data integration.
109
  * @return \WorkOS\Resource\DataIntegration
110
  * @throws \WorkOS\Exception\WorkOSException
@@ -124,7 +130,7 @@ class Pipes
124
  /**
125
  * Update a data integration
126
  *
127
- * Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
128
  * @param string $slug The slug identifier of the data integration.
129
  * @param string|null $description An optional description of the Data Integration.
130
  * @param bool|null $enabled Whether the Data Integration is enabled.
@@ -165,7 +171,7 @@ class Pipes
165
  /**
166
  * Delete a data integration
167
  *
168
- * Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
169
  * @param string $slug The slug identifier of the data integration.
170
  * @return void
171
  * @throws \WorkOS\Exception\WorkOSException
@@ -184,10 +190,12 @@ class Pipes
184
  /**
185
  * Upsert an API key for a connected account
186
  *
187
- * Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
188
  * @param string $slug The identifier of the integration.
189
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
190
- * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
191
  * @param string $secret The API key secret to store for this integration.
192
  * @return \WorkOS\Resource\ConnectedAccount
193
  * @throws \WorkOS\Exception\WorkOSException
@@ -197,11 +205,15 @@ class Pipes
197
  string $userId,
198
  string $secret,
199
  ?string $organizationId = null,
 
 
200
  ?\WorkOS\RequestOptions $options = null,
201
  ): \WorkOS\Resource\ConnectedAccount {
202
  $body = array_filter([
203
  'user_id' => $userId,
204
  'organization_id' => $organizationId,
 
 
205
  'secret' => $secret,
206
  ], fn ($v) => $v !== null);
207
  $response = $this->client->request(
@@ -251,10 +263,12 @@ class Pipes
251
  /**
252
  * Upsert client credentials for a connected account
253
  *
254
- * Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
255
  * @param string $slug The identifier of the integration.
256
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
257
- * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
258
  * @param string $clientId The OAuth client ID to store for this integration.
259
  * @param string $clientSecret The OAuth client secret to store for this integration.
260
  * @param array<string, string>|null $config Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
@@ -267,12 +281,16 @@ class Pipes
267
  string $clientId,
268
  string $clientSecret,
269
  ?string $organizationId = null,
 
 
270
  ?array $config = null,
271
  ?\WorkOS\RequestOptions $options = null,
272
  ): \WorkOS\Resource\ConnectedAccount {
273
  $body = array_filter([
274
  'user_id' => $userId,
275
  'organization_id' => $organizationId,
 
 
276
  'client_id' => $clientId,
277
  'client_secret' => $clientSecret,
278
  'config' => $config,
@@ -291,9 +309,11 @@ class Pipes
291
  *
292
  * Returns credentials for a user's connected account. Branches on the installation's `auth_method`: OAuth installations return an access token (refreshed if needed); API-key installations return the stored secret.
293
  * @param string $slug The identifier of the integration.
294
- * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
295
- * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
296
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
297
  * @return \WorkOS\Resource\DataIntegrationCredentialsResponse
298
  * @throws \WorkOS\Exception\WorkOSException
299
  */
@@ -302,12 +322,16 @@ class Pipes
302
  string $userId,
303
  ?string $organizationId = null,
304
  ?string $connectedAccountId = null,
 
 
305
  ?\WorkOS\RequestOptions $options = null,
306
  ): \WorkOS\Resource\DataIntegrationCredentialsResponse {
307
  $body = array_filter([
308
  'user_id' => $userId,
309
  'organization_id' => $organizationId,
310
  'connected_account_id' => $connectedAccountId,
 
 
311
  ], fn ($v) => $v !== null);
312
  $response = $this->client->request(
313
  method: 'POST',
@@ -318,14 +342,96 @@ class Pipes
318
  return DataIntegrationCredentialsResponse::fromArray($response);
319
  }
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  /**
322
  * Get an access token for a connected account
323
  *
324
  * Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
325
  * @param string $provider The identifier of the integration.
326
- * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
327
- * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
328
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
329
  * @return \WorkOS\Resource\DataIntegrationAccessTokenResponse
330
  * @throws \WorkOS\Exception\WorkOSException
331
  */
@@ -334,12 +440,16 @@ class Pipes
334
  string $userId,
335
  ?string $organizationId = null,
336
  ?string $connectedAccountId = null,
 
 
337
  ?\WorkOS\RequestOptions $options = null,
338
  ): \WorkOS\Resource\DataIntegrationAccessTokenResponse {
339
  $body = array_filter([
340
  'user_id' => $userId,
341
  'organization_id' => $organizationId,
342
  'connected_account_id' => $connectedAccountId,
 
 
343
  ], fn ($v) => $v !== null);
344
  $response = $this->client->request(
345
  method: 'POST',
@@ -357,6 +467,7 @@ class Pipes
357
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
358
  * @param string $slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
359
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
360
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
361
  * @return \WorkOS\Resource\ConnectedAccount
362
  * @throws \WorkOS\Exception\WorkOSException
@@ -365,11 +476,13 @@ class Pipes
365
  string $userId,
366
  string $slug,
367
  ?string $organizationId = null,
 
368
  ?string $connectedAccountId = null,
369
  ?\WorkOS\RequestOptions $options = null,
370
  ): \WorkOS\Resource\ConnectedAccount {
371
  $query = array_filter([
372
  'organization_id' => $organizationId,
 
373
  'connected_account_id' => $connectedAccountId,
374
  ], fn ($v) => $v !== null);
375
  $response = $this->client->request(
@@ -435,6 +548,7 @@ class Pipes
435
  * @param array<string>|null $scopes The OAuth scopes granted for this connection.
436
  * @param \WorkOS\Resource\PipeConnectedAccountState|null $state Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
437
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
438
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
439
  * @return \WorkOS\Resource\ConnectedAccount
440
  * @throws \WorkOS\Exception\WorkOSException
@@ -448,6 +562,7 @@ class Pipes
448
  ?array $scopes = null,
449
  ?\WorkOS\Resource\PipeConnectedAccountState $state = null,
450
  ?string $organizationId = null,
 
451
  ?string $connectedAccountId = null,
452
  ?\WorkOS\RequestOptions $options = null,
453
  ): \WorkOS\Resource\ConnectedAccount {
@@ -474,6 +589,7 @@ class Pipes
474
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
475
  * @param string $slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
476
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
477
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
478
  * @return void
479
  * @throws \WorkOS\Exception\WorkOSException
@@ -482,11 +598,13 @@ class Pipes
482
  string $userId,
483
  string $slug,
484
  ?string $organizationId = null,
 
485
  ?string $connectedAccountId = null,
486
  ?\WorkOS\RequestOptions $options = null,
487
  ): void {
488
  $query = array_filter([
489
  'organization_id' => $organizationId,
 
490
  'connected_account_id' => $connectedAccountId,
491
  ], fn ($v) => $v !== null);
492
  $this->client->request(
@@ -503,16 +621,19 @@ class Pipes
503
  * Retrieves a list of available providers and the user's connection status for each. Returns all providers configured for your environment, along with the user's [connected account](https://workos.com/docs/reference/pipes/connected-account) information where applicable.
504
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
505
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
 
506
  * @return \WorkOS\Resource\DataIntegrationsListResponse
507
  * @throws \WorkOS\Exception\WorkOSException
508
  */
509
  public function listUserDataProviders(
510
  string $userId,
511
  ?string $organizationId = null,
 
512
  ?\WorkOS\RequestOptions $options = null,
513
  ): \WorkOS\Resource\DataIntegrationsListResponse {
514
  $query = array_filter([
515
  'organization_id' => $organizationId,
 
516
  ], fn ($v) => $v !== null);
517
  $response = $this->client->request(
518
  method: 'GET',
 
23
  /**
24
  * List data integrations
25
  *
26
+ * Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
27
  * @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"`.
28
  * @param string|null $after 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
29
  * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10.
30
  * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc".
31
+ * @param \WorkOS\Resource\PipesOwnership|null $ownership Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
32
  * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\DataIntegration>
33
  * @throws \WorkOS\Exception\WorkOSException
34
  */
 
37
  ?string $after = null,
38
  ?int $limit = null,
39
  \WorkOS\Resource\PaginationOrder $order = \WorkOS\Resource\PaginationOrder::Desc,
40
+ ?\WorkOS\Resource\PipesOwnership $ownership = null,
41
  ?\WorkOS\RequestOptions $options = null,
42
  ): \WorkOS\PaginatedResponse {
43
  $query = array_filter([
 
45
  'after' => $after,
46
  'limit' => $limit,
47
  'order' => $order->value,
48
+ 'ownership' => $ownership?->value,
49
  ], fn ($v) => $v !== null);
50
  return $this->client->requestPage(
51
  method: 'GET',
 
59
  /**
60
  * Create a data integration
61
  *
62
+ * Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
63
  * @param string $provider The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
64
+ * @param \WorkOS\Resource\PipesOwnership|null $ownership Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
65
  * @param string|null $description An optional description of the Data Integration.
66
  * @param bool|null $enabled Whether the Data Integration is enabled. Defaults to `false`.
67
  * @param array<string>|null $scopes The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
 
75
  */
76
  public function createDataIntegration(
77
  string $provider,
78
+ ?\WorkOS\Resource\PipesOwnership $ownership = null,
79
  ?string $description = null,
80
  ?bool $enabled = null,
81
  ?array $scopes = null,
 
88
  ): \WorkOS\Resource\DataIntegration {
89
  $body = array_filter([
90
  'provider' => $provider,
91
+ 'ownership' => $ownership?->value,
92
  'description' => $description,
93
  'enabled' => $enabled,
94
  'scopes' => $scopes,
 
110
  /**
111
  * Get a data integration
112
  *
113
+ * Retrieves the user-owned data integration by its slug.
114
  * @param string $slug The slug identifier of the data integration.
115
  * @return \WorkOS\Resource\DataIntegration
116
  * @throws \WorkOS\Exception\WorkOSException
 
130
  /**
131
  * Update a data integration
132
  *
133
+ * Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
134
  * @param string $slug The slug identifier of the data integration.
135
  * @param string|null $description An optional description of the Data Integration.
136
  * @param bool|null $enabled Whether the Data Integration is enabled.
 
171
  /**
172
  * Delete a data integration
173
  *
174
+ * Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
175
  * @param string $slug The slug identifier of the data integration.
176
  * @return void
177
  * @throws \WorkOS\Exception\WorkOSException
 
190
  /**
191
  * Upsert an API key for a connected account
192
  *
193
+ * Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
194
  * @param string $slug The identifier of the integration.
195
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
196
+ * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
197
+ * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
198
+ * @param \WorkOS\Resource\PipesOwnership|null $connectionOwner Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
199
  * @param string $secret The API key secret to store for this integration.
200
  * @return \WorkOS\Resource\ConnectedAccount
201
  * @throws \WorkOS\Exception\WorkOSException
 
205
  string $userId,
206
  string $secret,
207
  ?string $organizationId = null,
208
+ ?string $connectedAccountId = null,
209
+ ?\WorkOS\Resource\PipesOwnership $connectionOwner = null,
210
  ?\WorkOS\RequestOptions $options = null,
211
  ): \WorkOS\Resource\ConnectedAccount {
212
  $body = array_filter([
213
  'user_id' => $userId,
214
  'organization_id' => $organizationId,
215
+ 'connected_account_id' => $connectedAccountId,
216
+ 'connection_owner' => $connectionOwner?->value,
217
  'secret' => $secret,
218
  ], fn ($v) => $v !== null);
219
  $response = $this->client->request(
 
263
  /**
264
  * Upsert client credentials for a connected account
265
  *
266
+ * Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
267
  * @param string $slug The identifier of the integration.
268
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
269
+ * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
270
+ * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
271
+ * @param \WorkOS\Resource\PipesOwnership|null $connectionOwner Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
272
  * @param string $clientId The OAuth client ID to store for this integration.
273
  * @param string $clientSecret The OAuth client secret to store for this integration.
274
  * @param array<string, string>|null $config Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
 
281
  string $clientId,
282
  string $clientSecret,
283
  ?string $organizationId = null,
284
+ ?string $connectedAccountId = null,
285
+ ?\WorkOS\Resource\PipesOwnership $connectionOwner = null,
286
  ?array $config = null,
287
  ?\WorkOS\RequestOptions $options = null,
288
  ): \WorkOS\Resource\ConnectedAccount {
289
  $body = array_filter([
290
  'user_id' => $userId,
291
  'organization_id' => $organizationId,
292
+ 'connected_account_id' => $connectedAccountId,
293
+ 'connection_owner' => $connectionOwner?->value,
294
  'client_id' => $clientId,
295
  'client_secret' => $clientSecret,
296
  'config' => $config,
 
309
  *
310
  * Returns credentials for a user's connected account. Branches on the installation's `auth_method`: OAuth installations return an access token (refreshed if needed); API-key installations return the stored secret.
311
  * @param string $slug The identifier of the integration.
312
+ * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
313
+ * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
314
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
315
+ * @param \WorkOS\Resource\PipesOwnership|null $connectionOwner Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
316
+ * @param bool|null $supportsMultipleConnections Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
317
  * @return \WorkOS\Resource\DataIntegrationCredentialsResponse
318
  * @throws \WorkOS\Exception\WorkOSException
319
  */
 
322
  string $userId,
323
  ?string $organizationId = null,
324
  ?string $connectedAccountId = null,
325
+ ?\WorkOS\Resource\PipesOwnership $connectionOwner = null,
326
+ ?bool $supportsMultipleConnections = null,
327
  ?\WorkOS\RequestOptions $options = null,
328
  ): \WorkOS\Resource\DataIntegrationCredentialsResponse {
329
  $body = array_filter([
330
  'user_id' => $userId,
331
  'organization_id' => $organizationId,
332
  'connected_account_id' => $connectedAccountId,
333
+ 'connection_owner' => $connectionOwner?->value,
334
+ 'supports_multiple_connections' => $supportsMultipleConnections,
335
  ], fn ($v) => $v !== null);
336
  $response = $this->client->request(
337
  method: 'POST',
 
342
  return DataIntegrationCredentialsResponse::fromArray($response);
343
  }
344
 
345
+ /**
346
+ * Get an organization-owned data integration
347
+ *
348
+ * Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
349
+ * @param string $slug The slug identifier of the data integration.
350
+ * @return \WorkOS\Resource\DataIntegration
351
+ * @throws \WorkOS\Exception\WorkOSException
352
+ */
353
+ public function listDataIntegrationOrganization(
354
+ string $slug,
355
+ ?\WorkOS\RequestOptions $options = null,
356
+ ): \WorkOS\Resource\DataIntegration {
357
+ $response = $this->client->request(
358
+ method: 'GET',
359
+ path: 'data-integrations/' . rawurlencode($slug) . '/organization',
360
+ options: $options,
361
+ );
362
+ return DataIntegration::fromArray($response);
363
+ }
364
+
365
+ /**
366
+ * Update an organization-owned data integration
367
+ *
368
+ * Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
369
+ * @param string $slug The slug identifier of the data integration.
370
+ * @param string|null $description An optional description of the Data Integration.
371
+ * @param bool|null $enabled Whether the Data Integration is enabled.
372
+ * @param array<string>|null $scopes The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
373
+ * @param \WorkOS\Resource\DataIntegrationCredentialsInput|null $credentials New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
374
+ * @param \WorkOS\Resource\ApiKeyInstallation|null $apiKey An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
375
+ * @param \WorkOS\Resource\UpdateCustomProviderDefinition|null $customProvider Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
376
+ * @return \WorkOS\Resource\DataIntegration
377
+ * @throws \WorkOS\Exception\WorkOSException
378
+ */
379
+ public function updateDataIntegrationOrganization(
380
+ string $slug,
381
+ ?string $description = null,
382
+ ?bool $enabled = null,
383
+ ?array $scopes = null,
384
+ ?\WorkOS\Resource\DataIntegrationCredentialsInput $credentials = null,
385
+ ?\WorkOS\Resource\ApiKeyInstallation $apiKey = null,
386
+ ?\WorkOS\Resource\UpdateCustomProviderDefinition $customProvider = null,
387
+ ?\WorkOS\RequestOptions $options = null,
388
+ ): \WorkOS\Resource\DataIntegration {
389
+ $body = array_filter([
390
+ 'description' => $description,
391
+ 'enabled' => $enabled,
392
+ 'scopes' => $scopes,
393
+ 'credentials' => $credentials,
394
+ 'api_key' => $apiKey,
395
+ 'custom_provider' => $customProvider,
396
+ ], fn ($v) => $v !== null);
397
+ $response = $this->client->request(
398
+ method: 'PUT',
399
+ path: 'data-integrations/' . rawurlencode($slug) . '/organization',
400
+ body: $body,
401
+ options: $options,
402
+ );
403
+ return DataIntegration::fromArray($response);
404
+ }
405
+
406
+ /**
407
+ * Delete an organization-owned data integration
408
+ *
409
+ * Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
410
+ * @param string $slug The slug identifier of the data integration.
411
+ * @return void
412
+ * @throws \WorkOS\Exception\WorkOSException
413
+ */
414
+ public function deleteDataIntegrationOrganization(
415
+ string $slug,
416
+ ?\WorkOS\RequestOptions $options = null,
417
+ ): void {
418
+ $this->client->request(
419
+ method: 'DELETE',
420
+ path: 'data-integrations/' . rawurlencode($slug) . '/organization',
421
+ options: $options,
422
+ );
423
+ }
424
+
425
  /**
426
  * Get an access token for a connected account
427
  *
428
  * Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
429
  * @param string $provider The identifier of the integration.
430
+ * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
431
+ * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
432
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
433
+ * @param \WorkOS\Resource\PipesOwnership|null $connectionOwner Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
434
+ * @param bool|null $supportsMultipleConnections Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
435
  * @return \WorkOS\Resource\DataIntegrationAccessTokenResponse
436
  * @throws \WorkOS\Exception\WorkOSException
437
  */
 
440
  string $userId,
441
  ?string $organizationId = null,
442
  ?string $connectedAccountId = null,
443
+ ?\WorkOS\Resource\PipesOwnership $connectionOwner = null,
444
+ ?bool $supportsMultipleConnections = null,
445
  ?\WorkOS\RequestOptions $options = null,
446
  ): \WorkOS\Resource\DataIntegrationAccessTokenResponse {
447
  $body = array_filter([
448
  'user_id' => $userId,
449
  'organization_id' => $organizationId,
450
  'connected_account_id' => $connectedAccountId,
451
+ 'connection_owner' => $connectionOwner?->value,
452
+ 'supports_multiple_connections' => $supportsMultipleConnections,
453
  ], fn ($v) => $v !== null);
454
  $response = $this->client->request(
455
  method: 'POST',
 
467
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
468
  * @param string $slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
469
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
470
+ * @param bool|null $supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
471
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
472
  * @return \WorkOS\Resource\ConnectedAccount
473
  * @throws \WorkOS\Exception\WorkOSException
 
476
  string $userId,
477
  string $slug,
478
  ?string $organizationId = null,
479
+ ?bool $supportsMultipleConnections = null,
480
  ?string $connectedAccountId = null,
481
  ?\WorkOS\RequestOptions $options = null,
482
  ): \WorkOS\Resource\ConnectedAccount {
483
  $query = array_filter([
484
  'organization_id' => $organizationId,
485
+ 'supports_multiple_connections' => $supportsMultipleConnections,
486
  'connected_account_id' => $connectedAccountId,
487
  ], fn ($v) => $v !== null);
488
  $response = $this->client->request(
 
548
  * @param array<string>|null $scopes The OAuth scopes granted for this connection.
549
  * @param \WorkOS\Resource\PipeConnectedAccountState|null $state Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
550
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
551
+ * @param bool|null $supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
552
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
553
  * @return \WorkOS\Resource\ConnectedAccount
554
  * @throws \WorkOS\Exception\WorkOSException
 
562
  ?array $scopes = null,
563
  ?\WorkOS\Resource\PipeConnectedAccountState $state = null,
564
  ?string $organizationId = null,
565
+ ?bool $supportsMultipleConnections = null,
566
  ?string $connectedAccountId = null,
567
  ?\WorkOS\RequestOptions $options = null,
568
  ): \WorkOS\Resource\ConnectedAccount {
 
589
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier.
590
  * @param string $slug The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
591
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
592
+ * @param bool|null $supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
593
  * @param string|null $connectedAccountId A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
594
  * @return void
595
  * @throws \WorkOS\Exception\WorkOSException
 
598
  string $userId,
599
  string $slug,
600
  ?string $organizationId = null,
601
+ ?bool $supportsMultipleConnections = null,
602
  ?string $connectedAccountId = null,
603
  ?\WorkOS\RequestOptions $options = null,
604
  ): void {
605
  $query = array_filter([
606
  'organization_id' => $organizationId,
607
+ 'supports_multiple_connections' => $supportsMultipleConnections,
608
  'connected_account_id' => $connectedAccountId,
609
  ], fn ($v) => $v !== null);
610
  $this->client->request(
 
621
  * Retrieves a list of available providers and the user's connection status for each. Returns all providers configured for your environment, along with the user's [connected account](https://workos.com/docs/reference/pipes/connected-account) information where applicable.
622
  * @param string $userId A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
623
  * @param string|null $organizationId An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
624
+ * @param bool|null $supportsMultipleConnections Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
625
  * @return \WorkOS\Resource\DataIntegrationsListResponse
626
  * @throws \WorkOS\Exception\WorkOSException
627
  */
628
  public function listUserDataProviders(
629
  string $userId,
630
  ?string $organizationId = null,
631
+ ?bool $supportsMultipleConnections = null,
632
  ?\WorkOS\RequestOptions $options = null,
633
  ): \WorkOS\Resource\DataIntegrationsListResponse {
634
  $query = array_filter([
635
  'organization_id' => $organizationId,
636
+ 'supports_multiple_connections' => $supportsMultipleConnections,
637
  ], fn ($v) => $v !== null);
638
  $response = $this->client->request(
639
  method: 'GET',
php/lib/Service/UserManagement.php
php/lib/Service/UserManagement.php CHANGED
@@ -7,6 +7,7 @@ declare(strict_types=1);
7
  namespace WorkOS\Service;
8
 
9
  use WorkOS\Resource\AuthenticateResponse;
 
10
  use WorkOS\Resource\AuthorizedConnectApplicationListData;
11
  use WorkOS\Resource\CORSOriginResponse;
12
  use WorkOS\Resource\DeviceAuthorizationResponse;
@@ -647,6 +648,85 @@ class UserManagement
647
  return $response;
648
  }
649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  /**
651
  * List CORS origins
652
  *
 
7
  namespace WorkOS\Service;
8
 
9
  use WorkOS\Resource\AuthenticateResponse;
10
+ use WorkOS\Resource\AuthkitOAuthResource;
11
  use WorkOS\Resource\AuthorizedConnectApplicationListData;
12
  use WorkOS\Resource\CORSOriginResponse;
13
  use WorkOS\Resource\DeviceAuthorizationResponse;
 
648
  return $response;
649
  }
650
 
651
+ /**
652
+ * List AuthKit OAuth resources
653
+ *
654
+ * Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
655
+ * @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"`.
656
+ * @param string|null $after 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
657
+ * @param int|null $limit Upper limit on the number of objects to return, between `1` and `100`. Defaults to 10.
658
+ * @param \WorkOS\Resource\PaginationOrder $order Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to "desc".
659
+ * @return \WorkOS\PaginatedResponse<\WorkOS\Resource\AuthkitOAuthResource>
660
+ * @throws \WorkOS\Exception\WorkOSException
661
+ */
662
+ public function listAuthkitOAuthResources(
663
+ ?string $before = null,
664
+ ?string $after = null,
665
+ ?int $limit = null,
666
+ \WorkOS\Resource\PaginationOrder $order = \WorkOS\Resource\PaginationOrder::Desc,
667
+ ?\WorkOS\RequestOptions $options = null,
668
+ ): \WorkOS\PaginatedResponse {
669
+ $query = array_filter([
670
+ 'before' => $before,
671
+ 'after' => $after,
672
+ 'limit' => $limit,
673
+ 'order' => $order->value,
674
+ ], fn ($v) => $v !== null);
675
+ return $this->client->requestPage(
676
+ method: 'GET',
677
+ path: 'user_management/authkit_oauth_resources',
678
+ query: $query,
679
+ modelClass: AuthkitOAuthResource::class,
680
+ options: $options,
681
+ );
682
+ }
683
+
684
+ /**
685
+ * Create an AuthKit OAuth resource
686
+ *
687
+ * Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
688
+ * @param string $uri The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
689
+ * @param bool|null $default Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
690
+ * @return \WorkOS\Resource\AuthkitOAuthResource
691
+ * @throws \WorkOS\Exception\WorkOSException
692
+ */
693
+ public function createAuthkitOAuthResource(
694
+ string $uri,
695
+ ?bool $default = null,
696
+ ?\WorkOS\RequestOptions $options = null,
697
+ ): \WorkOS\Resource\AuthkitOAuthResource {
698
+ $body = array_filter([
699
+ 'uri' => $uri,
700
+ 'default' => $default,
701
+ ], fn ($v) => $v !== null);
702
+ $response = $this->client->request(
703
+ method: 'POST',
704
+ path: 'user_management/authkit_oauth_resources',
705
+ body: $body,
706
+ options: $options,
707
+ );
708
+ return AuthkitOAuthResource::fromArray($response);
709
+ }
710
+
711
+ /**
712
+ * Delete an AuthKit OAuth resource
713
+ *
714
+ * Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
715
+ * @param string $id The ID of the AuthKit OAuth resource to delete.
716
+ * @return void
717
+ * @throws \WorkOS\Exception\WorkOSException
718
+ */
719
+ public function deleteAuthkitOAuthResource(
720
+ string $id,
721
+ ?\WorkOS\RequestOptions $options = null,
722
+ ): void {
723
+ $this->client->request(
724
+ method: 'DELETE',
725
+ path: 'user_management/authkit_oauth_resources/' . rawurlencode($id),
726
+ options: $options,
727
+ );
728
+ }
729
+
730
  /**
731
  * List CORS origins
732
  *
php/tests/Fixtures/account_selection_required_error.json
php/tests/Fixtures/account_selection_required_error.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "code": "account_selection_required",
3
+ "message": "Several connected accounts match this user for this provider. Name one with a connected account id."
4
+ }
php/tests/Fixtures/authkit_oauth_resource.json
php/tests/Fixtures/authkit_oauth_resource.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "authkit_oauth_resource",
3
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "uri": "https://api.example.com",
5
+ "default": false,
6
+ "created_at": "2026-01-15T12:00:00.000Z",
7
+ "updated_at": "2026-01-15T12:00:00.000Z"
8
+ }
php/tests/Fixtures/create_authkit_oauth_resource.json
php/tests/Fixtures/create_authkit_oauth_resource.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "uri": "https://api.example.com",
3
+ "default": false
4
+ }
php/tests/Fixtures/create_data_integration.json
php/tests/Fixtures/create_data_integration.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "provider": "github",
 
3
  "description": "Production GitHub app",
4
  "enabled": true,
5
  "scopes": [
 
1
  {
2
  "provider": "github",
3
+ "ownership": "user",
4
  "description": "Production GitHub app",
5
  "enabled": true,
6
  "scopes": [
php/tests/Fixtures/data_integration.json
php/tests/Fixtures/data_integration.json CHANGED
@@ -3,6 +3,7 @@
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
 
6
  "description": "Production GitHub app",
7
  "enabled": true,
8
  "state": "valid",
 
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
6
+ "ownership": "user",
7
  "description": "Production GitHub app",
8
  "enabled": true,
9
  "state": "valid",
php/tests/Fixtures/data_integrations_get_user_token_request.json
php/tests/Fixtures/data_integrations_get_user_token_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
php/tests/Fixtures/data_integrations_upsert_api_key_request.json
php/tests/Fixtures/data_integrations_upsert_api_key_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "secret": "sk-1234567890abcdef"
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "secret": "sk-1234567890abcdef"
7
  }
php/tests/Fixtures/data_integrations_upsert_client_credentials_request.json
php/tests/Fixtures/data_integrations_upsert_client_credentials_request.json CHANGED
@@ -1,6 +1,8 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "client_id": "3MVG9...",
5
  "client_secret": "shhh-secret",
6
  "config": {
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "client_id": "3MVG9...",
7
  "client_secret": "shhh-secret",
8
  "config": {
php/tests/Fixtures/data_integrations_vend_credentials_request.json
php/tests/Fixtures/data_integrations_vend_credentials_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
php/tests/Fixtures/list_authkit_oauth_resource.json
php/tests/Fixtures/list_authkit_oauth_resource.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [
3
+ {
4
+ "object": "authkit_oauth_resource",
5
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
6
+ "uri": "https://api.example.com",
7
+ "default": false,
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": null,
14
+ "after": null
15
+ }
16
+ }
php/tests/Fixtures/list_data_integration.json
php/tests/Fixtures/list_data_integration.json CHANGED
@@ -5,6 +5,7 @@
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
 
8
  "description": "Production GitHub app",
9
  "enabled": true,
10
  "state": "valid",
 
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
8
+ "ownership": "user",
9
  "description": "Production GitHub app",
10
  "enabled": true,
11
  "state": "valid",
php/tests/Service/AdminPortalTest.php
php/tests/Service/AdminPortalTest.php CHANGED
@@ -19,7 +19,6 @@ class AdminPortalTest extends TestCase
19
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
20
  $result = $client->adminPortal()->generateLink(organization: 'test_value');
21
  $this->assertInstanceOf(\WorkOS\Resource\PortalLinkResponse::class, $result);
22
- $this->assertSame($fixture['link'], $result->link);
23
  $this->assertIsArray($result->toArray());
24
  $request = $this->getLastRequest();
25
  $this->assertSame('POST', $request->getMethod());
 
19
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
20
  $result = $client->adminPortal()->generateLink(organization: 'test_value');
21
  $this->assertInstanceOf(\WorkOS\Resource\PortalLinkResponse::class, $result);
 
22
  $this->assertIsArray($result->toArray());
23
  $request = $this->getLastRequest();
24
  $this->assertSame('POST', $request->getMethod());
php/tests/Service/AgentsTest.php
php/tests/Service/AgentsTest.php CHANGED
@@ -117,7 +117,6 @@ class AgentsTest extends TestCase
117
  $result = $client->agents()->updateAttempts(type: 'test_value', claimAttemptToken: 'test_value', user: \WorkOS\Resource\AgentAdminLinkClaimAttemptToExternalUserRequestUser::fromArray($this->loadFixture('agent_admin_link_claim_attempt_to_external_user_request_user')));
118
  $this->assertInstanceOf(\WorkOS\Resource\ClaimViewResponse::class, $result);
119
  $this->assertSame($fixture['id'], $result->id);
120
- $this->assertSame($fixture['user_code'], $result->userCode);
121
  $this->assertIsArray($result->toArray());
122
  $request = $this->getLastRequest();
123
  $this->assertSame('PATCH', $request->getMethod());
 
117
  $result = $client->agents()->updateAttempts(type: 'test_value', claimAttemptToken: 'test_value', user: \WorkOS\Resource\AgentAdminLinkClaimAttemptToExternalUserRequestUser::fromArray($this->loadFixture('agent_admin_link_claim_attempt_to_external_user_request_user')));
118
  $this->assertInstanceOf(\WorkOS\Resource\ClaimViewResponse::class, $result);
119
  $this->assertSame($fixture['id'], $result->id);
 
120
  $this->assertIsArray($result->toArray());
121
  $request = $this->getLastRequest();
122
  $this->assertSame('PATCH', $request->getMethod());
php/tests/Service/PipesTest.php
php/tests/Service/PipesTest.php CHANGED
@@ -17,7 +17,7 @@ class PipesTest extends TestCase
17
  {
18
  $fixture = $this->loadFixture('list_data_integration');
19
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
20
- $result = $client->pipes()->listDataIntegrations(before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal);
21
  $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result);
22
  $request = $this->getLastRequest();
23
  $this->assertSame('GET', $request->getMethod());
@@ -27,6 +27,7 @@ class PipesTest extends TestCase
27
  $this->assertSame('test_value', $query['after']);
28
  $this->assertArrayHasKey('limit', $query);
29
  $this->assertSame('normal', $query['order']);
 
30
  }
31
 
32
  public function testCreateDataIntegration(): void
@@ -146,6 +147,43 @@ class PipesTest extends TestCase
146
  $this->assertSame('test_value', $body['user_id']);
147
  }
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  public function testGetAccessToken(): void
150
  {
151
  $fixture = $this->loadFixture('data_integration_access_token_response');
 
17
  {
18
  $fixture = $this->loadFixture('list_data_integration');
19
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
20
+ $result = $client->pipes()->listDataIntegrations(before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal, ownership: \WorkOS\Resource\PipesOwnership::User);
21
  $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result);
22
  $request = $this->getLastRequest();
23
  $this->assertSame('GET', $request->getMethod());
 
27
  $this->assertSame('test_value', $query['after']);
28
  $this->assertArrayHasKey('limit', $query);
29
  $this->assertSame('normal', $query['order']);
30
+ $this->assertSame('user', $query['ownership']);
31
  }
32
 
33
  public function testCreateDataIntegration(): void
 
147
  $this->assertSame('test_value', $body['user_id']);
148
  }
149
 
150
+ public function testListDataIntegrationOrganization(): void
151
+ {
152
+ $fixture = $this->loadFixture('data_integration');
153
+ $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
154
+ $result = $client->pipes()->listDataIntegrationOrganization('test_slug');
155
+ $this->assertInstanceOf(\WorkOS\Resource\DataIntegration::class, $result);
156
+ $this->assertSame($fixture['id'], $result->id);
157
+ $this->assertSame($fixture['slug'], $result->slug);
158
+ $this->assertIsArray($result->toArray());
159
+ $request = $this->getLastRequest();
160
+ $this->assertSame('GET', $request->getMethod());
161
+ $this->assertStringEndsWith('data-integrations/test_slug/organization', $request->getUri()->getPath());
162
+ }
163
+
164
+ public function testUpdateDataIntegrationOrganization(): void
165
+ {
166
+ $fixture = $this->loadFixture('data_integration');
167
+ $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
168
+ $result = $client->pipes()->updateDataIntegrationOrganization('test_slug');
169
+ $this->assertInstanceOf(\WorkOS\Resource\DataIntegration::class, $result);
170
+ $this->assertSame($fixture['id'], $result->id);
171
+ $this->assertSame($fixture['slug'], $result->slug);
172
+ $this->assertIsArray($result->toArray());
173
+ $request = $this->getLastRequest();
174
+ $this->assertSame('PUT', $request->getMethod());
175
+ $this->assertStringEndsWith('data-integrations/test_slug/organization', $request->getUri()->getPath());
176
+ }
177
+
178
+ public function testDeleteDataIntegrationOrganization(): void
179
+ {
180
+ $client = $this->createMockClient([['status' => 204]]);
181
+ $client->pipes()->deleteDataIntegrationOrganization('test_slug');
182
+ $request = $this->getLastRequest();
183
+ $this->assertSame('DELETE', $request->getMethod());
184
+ $this->assertStringEndsWith('data-integrations/test_slug/organization', $request->getUri()->getPath());
185
+ }
186
+
187
  public function testGetAccessToken(): void
188
  {
189
  $fixture = $this->loadFixture('data_integration_access_token_response');
php/tests/Service/SSOTest.php
php/tests/Service/SSOTest.php CHANGED
@@ -231,7 +231,7 @@ class SSOTest extends TestCase
231
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
232
  $result = $client->sso()->authorizeLogout(profileId: 'test_value');
233
  $this->assertInstanceOf(\WorkOS\Resource\SSOLogoutAuthorizeResponse::class, $result);
234
- $this->assertSame($fixture['logout_url'], $result->logoutUrl);
235
  $this->assertIsArray($result->toArray());
236
  $request = $this->getLastRequest();
237
  $this->assertSame('POST', $request->getMethod());
 
231
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
232
  $result = $client->sso()->authorizeLogout(profileId: 'test_value');
233
  $this->assertInstanceOf(\WorkOS\Resource\SSOLogoutAuthorizeResponse::class, $result);
234
+ $this->assertSame($fixture['logout_token'], $result->logoutToken);
235
  $this->assertIsArray($result->toArray());
236
  $request = $this->getLastRequest();
237
  $this->assertSame('POST', $request->getMethod());
php/tests/Service/UserManagementTest.php
php/tests/Service/UserManagementTest.php CHANGED
@@ -54,7 +54,6 @@ class UserManagementTest extends TestCase
54
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
55
  $result = $client->userManagement()->createDevice(clientId: 'test_value');
56
  $this->assertInstanceOf(\WorkOS\Resource\DeviceAuthorizationResponse::class, $result);
57
- $this->assertSame($fixture['device_code'], $result->deviceCode);
58
  $this->assertIsArray($result->toArray());
59
  $request = $this->getLastRequest();
60
  $this->assertSame('POST', $request->getMethod());
@@ -114,6 +113,47 @@ class UserManagementTest extends TestCase
114
  $this->assertStringEndsWith('user_management/sessions/revoke', $request->getUri()->getPath());
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  public function testListCorsOrigins(): void
118
  {
119
  $fixture = $this->loadFixture('list_cors_origin_response');
@@ -815,12 +855,12 @@ class UserManagementTest extends TestCase
815
 
816
  public function testPaginationBoundary(): void
817
  {
818
- $fixture = $this->loadFixture('list_cors_origin_response');
819
  // Ensure cursors are null (first/last page boundary)
820
  $fixture['list_metadata']['before'] = null;
821
  $fixture['list_metadata']['after'] = null;
822
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
823
- $result = $client->userManagement()->listCorsOrigins();
824
  $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result);
825
  // Verify cursors are null on boundary page
826
  $this->assertNull($result->listMetadata['before']);
 
54
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
55
  $result = $client->userManagement()->createDevice(clientId: 'test_value');
56
  $this->assertInstanceOf(\WorkOS\Resource\DeviceAuthorizationResponse::class, $result);
 
57
  $this->assertIsArray($result->toArray());
58
  $request = $this->getLastRequest();
59
  $this->assertSame('POST', $request->getMethod());
 
113
  $this->assertStringEndsWith('user_management/sessions/revoke', $request->getUri()->getPath());
114
  }
115
 
116
+ public function testListAuthkitOAuthResources(): void
117
+ {
118
+ $fixture = $this->loadFixture('list_authkit_oauth_resource');
119
+ $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
120
+ $result = $client->userManagement()->listAuthkitOAuthResources(before: 'test_value', after: 'test_value', limit: 1, order: \WorkOS\Resource\PaginationOrder::Normal);
121
+ $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result);
122
+ $request = $this->getLastRequest();
123
+ $this->assertSame('GET', $request->getMethod());
124
+ $this->assertStringEndsWith('user_management/authkit_oauth_resources', $request->getUri()->getPath());
125
+ parse_str($request->getUri()->getQuery(), $query);
126
+ $this->assertSame('test_value', $query['before']);
127
+ $this->assertSame('test_value', $query['after']);
128
+ $this->assertArrayHasKey('limit', $query);
129
+ $this->assertSame('normal', $query['order']);
130
+ }
131
+
132
+ public function testCreateAuthkitOAuthResource(): void
133
+ {
134
+ $fixture = $this->loadFixture('authkit_oauth_resource');
135
+ $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
136
+ $result = $client->userManagement()->createAuthkitOAuthResource(uri: 'test_value');
137
+ $this->assertInstanceOf(\WorkOS\Resource\AuthkitOAuthResource::class, $result);
138
+ $this->assertSame($fixture['id'], $result->id);
139
+ $this->assertSame($fixture['uri'], $result->uri);
140
+ $this->assertIsArray($result->toArray());
141
+ $request = $this->getLastRequest();
142
+ $this->assertSame('POST', $request->getMethod());
143
+ $this->assertStringEndsWith('user_management/authkit_oauth_resources', $request->getUri()->getPath());
144
+ $body = json_decode((string) $request->getBody(), true);
145
+ $this->assertSame('test_value', $body['uri']);
146
+ }
147
+
148
+ public function testDeleteAuthkitOAuthResource(): void
149
+ {
150
+ $client = $this->createMockClient([['status' => 204]]);
151
+ $client->userManagement()->deleteAuthkitOAuthResource('test_id');
152
+ $request = $this->getLastRequest();
153
+ $this->assertSame('DELETE', $request->getMethod());
154
+ $this->assertStringEndsWith('user_management/authkit_oauth_resources/test_id', $request->getUri()->getPath());
155
+ }
156
+
157
  public function testListCorsOrigins(): void
158
  {
159
  $fixture = $this->loadFixture('list_cors_origin_response');
 
855
 
856
  public function testPaginationBoundary(): void
857
  {
858
+ $fixture = $this->loadFixture('list_authkit_oauth_resource');
859
  // Ensure cursors are null (first/last page boundary)
860
  $fixture['list_metadata']['before'] = null;
861
  $fixture['list_metadata']['after'] = null;
862
  $client = $this->createMockClient([['status' => 200, 'body' => $fixture]]);
863
+ $result = $client->userManagement()->listAuthkitOAuthResources();
864
  $this->assertInstanceOf(\WorkOS\PaginatedResponse::class, $result);
865
  // Verify cursors are null on boundary page
866
  $this->assertNull($result->listMetadata['before']);

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

code: 30 · tests: 16 · manifest: 1

python/.oagen-manifest.json
python/.oagen-manifest.json CHANGED
@@ -106,6 +106,7 @@
106
  "src/workos/common/__init__.py",
107
  "src/workos/common/models/__init__.py",
108
  "src/workos/common/models/access_token_agent_registration_credential_issued_data_detail.py",
 
109
  "src/workos/common/models/action_authentication_denied.py",
110
  "src/workos/common/models/action_authentication_denied_data.py",
111
  "src/workos/common/models/action_user_registration_denied.py",
@@ -280,6 +281,7 @@
280
  "src/workos/common/models/create_connection_oidc_options_id_token_signature_algorithm.py",
281
  "src/workos/common/models/create_connection_oidc_options_token_authentication_method.py",
282
  "src/workos/common/models/create_data_integration_auth_methods.py",
 
283
  "src/workos/common/models/create_user_invite_options_locale.py",
284
  "src/workos/common/models/create_user_password_hash_type.py",
285
  "src/workos/common/models/create_user_password_salt_position.py",
@@ -292,11 +294,16 @@
292
  "src/workos/common/models/data_integration_credentials_input_type.py",
293
  "src/workos/common/models/data_integration_credentials_response_error.py",
294
  "src/workos/common/models/data_integration_custom_provider_authenticate_via.py",
 
295
  "src/workos/common/models/data_integration_state.py",
 
296
  "src/workos/common/models/data_integrations_list_response_data_auth_methods.py",
297
  "src/workos/common/models/data_integrations_list_response_data_connected_account_auth_method.py",
298
  "src/workos/common/models/data_integrations_list_response_data_connected_account_state.py",
299
  "src/workos/common/models/data_integrations_list_response_data_ownership.py",
 
 
 
300
  "src/workos/common/models/directory_group.py",
301
  "src/workos/common/models/directory_state.py",
302
  "src/workos/common/models/directory_type.py",
@@ -690,6 +697,7 @@
690
  "src/workos/pipes/models/data_integrations_upsert_api_key_request.py",
691
  "src/workos/pipes/models/data_integrations_upsert_client_credentials_request.py",
692
  "src/workos/pipes/models/data_integrations_vend_credentials_request.py",
 
693
  "src/workos/pipes/models/update_custom_provider_definition.py",
694
  "src/workos/pipes/models/update_data_integration.py",
695
  "src/workos/pipes_provider/__init__.py",
@@ -777,10 +785,12 @@
777
  "src/workos/user_management/models/__init__.py",
778
  "src/workos/user_management/models/authenticate_response.py",
779
  "src/workos/user_management/models/authenticate_response_oauth_token.py",
 
780
  "src/workos/user_management/models/authorization_code_session_authenticate_request.py",
781
  "src/workos/user_management/models/authorized_connect_application_list_data.py",
782
  "src/workos/user_management/models/confirm_email_change.py",
783
  "src/workos/user_management/models/cors_origin_response.py",
 
784
  "src/workos/user_management/models/create_cors_origin.py",
785
  "src/workos/user_management/models/create_magic_code_and_return.py",
786
  "src/workos/user_management/models/create_password_reset.py",
@@ -868,6 +878,7 @@
868
  "src/workos/widgets/models/widget_session_token.py",
869
  "src/workos/widgets/models/widget_session_token_response.py",
870
  "tests/fixtures/access_token_agent_registration_credential_issued_data_detail.json",
 
871
  "tests/fixtures/action_authentication_denied.json",
872
  "tests/fixtures/action_authentication_denied_data.json",
873
  "tests/fixtures/action_user_registration_denied.json",
@@ -1032,6 +1043,7 @@
1032
  "tests/fixtures/authentication_sso_timed_out_data.json",
1033
  "tests/fixtures/authentication_sso_timed_out_data_error.json",
1034
  "tests/fixtures/authentication_sso_timed_out_data_sso.json",
 
1035
  "tests/fixtures/authorization_check.json",
1036
  "tests/fixtures/authorization_code_session_authenticate_request.json",
1037
  "tests/fixtures/authorization_permission.json",
@@ -1070,6 +1082,7 @@
1070
  "tests/fixtures/connection_saml_certificate_renewed_data_certificate.json",
1071
  "tests/fixtures/connection_saml_certificate_renewed_data_connection.json",
1072
  "tests/fixtures/cors_origin_response.json",
 
1073
  "tests/fixtures/create_authorization_permission.json",
1074
  "tests/fixtures/create_authorization_resource.json",
1075
  "tests/fixtures/create_connection.json",
@@ -1249,6 +1262,7 @@
1249
  "tests/fixtures/list_audit_log_action.json",
1250
  "tests/fixtures/list_audit_log_schema.json",
1251
  "tests/fixtures/list_authentication_factor.json",
 
1252
  "tests/fixtures/list_authorization_permission.json",
1253
  "tests/fixtures/list_authorization_resource.json",
1254
  "tests/fixtures/list_authorized_connect_application_list_data.json",
@@ -1551,6 +1565,34 @@
1551
  "tests/test_widgets_models_round_trip.py"
1552
  ],
1553
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1554
  "PATCH /agents/claims/attempts": {
1555
  "sdkMethod": "update_attempts",
1556
  "service": "agents"
@@ -1563,6 +1605,30 @@
1563
  "sdkMethod": "get_registration",
1564
  "service": "agents"
1565
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1566
  "POST /auth/challenges/{id}/verify": {
1567
  "sdkMethod": "verify_challenge",
1568
  "service": "multi_factor_auth"
@@ -1807,10 +1873,54 @@
1807
  "sdkMethod": "list_connections",
1808
  "service": "sso"
1809
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1810
  "GET /connections/{id}": {
1811
  "sdkMethod": "get_connection",
1812
  "service": "sso"
1813
  },
 
 
 
 
1814
  "DELETE /connections/{id}": {
1815
  "sdkMethod": "delete_connection",
1816
  "service": "sso"
@@ -1843,10 +1953,26 @@
1843
  "sdkMethod": "authorize_data_integration",
1844
  "service": "pipes"
1845
  },
 
 
 
 
1846
  "POST /data-integrations/{slug}/credentials": {
1847
  "sdkMethod": "create_data_integration_credential",
1848
  "service": "pipes"
1849
  },
 
 
 
 
 
 
 
 
 
 
 
 
1850
  "POST /data-integrations/{provider}/token": {
1851
  "sdkMethod": "get_access_token",
1852
  "service": "pipes"
@@ -2015,6 +2141,34 @@
2015
  "sdkMethod": "list_authorized_applications",
2016
  "service": "organizations"
2017
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2018
  "POST /portal/generate_link": {
2019
  "sdkMethod": "generate_link",
2020
  "service": "admin_portal"
@@ -2087,6 +2241,18 @@
2087
  "sdkMethod": "revoke_session",
2088
  "service": "user_management"
2089
  },
 
 
 
 
 
 
 
 
 
 
 
 
2090
  "GET /user_management/cors_origins": {
2091
  "sdkMethod": "list_cors_origins",
2092
  "service": "user_management"
@@ -2287,6 +2453,34 @@
2287
  "sdkMethod": "create_user_auth_factor",
2288
  "service": "multi_factor_auth"
2289
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2290
  "POST /vault/v1/keys/data-key": {
2291
  "sdkMethod": "create_data_key",
2292
  "service": "vault"
@@ -2394,162 +2588,6 @@
2394
  "GET /audit_logs/exports/{auditLogExportId}": {
2395
  "sdkMethod": "get_export",
2396
  "service": "audit_logs"
2397
- },
2398
- "PUT /data-integrations/{slug}/client-credentials": {
2399
- "sdkMethod": "update_data_integration_client_credentials",
2400
- "service": "pipes"
2401
- },
2402
- "GET /agents/blueprints": {
2403
- "sdkMethod": "list_blueprints",
2404
- "service": "agents"
2405
- },
2406
- "POST /agents/blueprints": {
2407
- "sdkMethod": "create_blueprint",
2408
- "service": "agents"
2409
- },
2410
- "GET /agents/blueprints/{agent_blueprint_id}": {
2411
- "sdkMethod": "get_blueprint",
2412
- "service": "agents"
2413
- },
2414
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
2415
- "sdkMethod": "update_blueprint",
2416
- "service": "agents"
2417
- },
2418
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
2419
- "sdkMethod": "delete_blueprint",
2420
- "service": "agents"
2421
- },
2422
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
2423
- "sdkMethod": "create_blueprint_token",
2424
- "service": "agents"
2425
- },
2426
- "GET /agents/instances": {
2427
- "sdkMethod": "list_instances",
2428
- "service": "agents"
2429
- },
2430
- "GET /agents/instances/{agent_instance_id}": {
2431
- "sdkMethod": "get_instance",
2432
- "service": "agents"
2433
- },
2434
- "DELETE /agents/instances/{agent_instance_id}": {
2435
- "sdkMethod": "delete_instance",
2436
- "service": "agents"
2437
- },
2438
- "GET /agents/sessions": {
2439
- "sdkMethod": "list_sessions",
2440
- "service": "agents"
2441
- },
2442
- "GET /agents/sessions/{agent_instance_session_id}": {
2443
- "sdkMethod": "get_session",
2444
- "service": "agents"
2445
- },
2446
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
2447
- "sdkMethod": "revoke_session",
2448
- "service": "agents"
2449
- },
2450
- "POST /connections": {
2451
- "sdkMethod": "create_connection",
2452
- "service": "sso"
2453
- },
2454
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
2455
- "sdkMethod": "list_connection_saml_idp_signing_certs",
2456
- "service": "sso"
2457
- },
2458
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
2459
- "sdkMethod": "create_connection_saml_idp_signing_cert",
2460
- "service": "sso"
2461
- },
2462
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
2463
- "sdkMethod": "delete_connection_saml_idp_signing_cert",
2464
- "service": "sso"
2465
- },
2466
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
2467
- "sdkMethod": "list_connection_saml_sp_encryption_certs",
2468
- "service": "sso"
2469
- },
2470
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
2471
- "sdkMethod": "create_connection_saml_sp_encryption_cert",
2472
- "service": "sso"
2473
- },
2474
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
2475
- "sdkMethod": "delete_connection_saml_sp_encryption_cert",
2476
- "service": "sso"
2477
- },
2478
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
2479
- "sdkMethod": "list_connection_saml_sp_signing_cert",
2480
- "service": "sso"
2481
- },
2482
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
2483
- "sdkMethod": "create_connection_saml_sp_signing_cert",
2484
- "service": "sso"
2485
- },
2486
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
2487
- "sdkMethod": "delete_connection_saml_sp_signing_cert",
2488
- "service": "sso"
2489
- },
2490
- "PATCH /connections/{id}": {
2491
- "sdkMethod": "update_connection",
2492
- "service": "sso"
2493
- },
2494
- "GET /organizations/{organization_id}/it_contacts": {
2495
- "sdkMethod": "list_it_contacts",
2496
- "service": "organizations"
2497
- },
2498
- "POST /organizations/{organization_id}/it_contacts": {
2499
- "sdkMethod": "create_it_contact",
2500
- "service": "organizations"
2501
- },
2502
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2503
- "sdkMethod": "delete_it_contact",
2504
- "service": "organizations"
2505
- },
2506
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2507
- "sdkMethod": "invite_it_contact",
2508
- "service": "organizations"
2509
- },
2510
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2511
- "sdkMethod": "revoke_it_contact",
2512
- "service": "organizations"
2513
- },
2514
- "POST /platform/teams": {
2515
- "sdkMethod": "create_team",
2516
- "service": "platform_teams"
2517
- },
2518
- "GET /platform/teams/{team_id}": {
2519
- "sdkMethod": "get_team",
2520
- "service": "platform_teams"
2521
- },
2522
- "DELETE /user_management/waitlist_entries/{id}": {
2523
- "sdkMethod": "delete_waitlist_entry",
2524
- "service": "user_management"
2525
- },
2526
- "POST /user_management/waitlist_entries/{id}/approve": {
2527
- "sdkMethod": "create_waitlist_entry_approve",
2528
- "service": "user_management"
2529
- },
2530
- "POST /user_management/waitlist_entries/{id}/deny": {
2531
- "sdkMethod": "create_waitlist_entry_deny",
2532
- "service": "user_management"
2533
- },
2534
- "GET /user_management/waitlists": {
2535
- "sdkMethod": "list_waitlists",
2536
- "service": "user_management"
2537
- },
2538
- "GET /user_management/waitlists/{id}": {
2539
- "sdkMethod": "get_waitlist",
2540
- "service": "user_management"
2541
- },
2542
- "GET /user_management/waitlists/{id}/entries": {
2543
- "sdkMethod": "list_waitlist_entries",
2544
- "service": "user_management"
2545
- },
2546
- "POST /user_management/waitlists/{id}/entries": {
2547
- "sdkMethod": "create_waitlist_entry",
2548
- "service": "user_management"
2549
- },
2550
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
2551
- "sdkMethod": "validate_blueprint_token",
2552
- "service": "agents"
2553
  }
2554
  }
2555
  }
 
106
  "src/workos/common/__init__.py",
107
  "src/workos/common/models/__init__.py",
108
  "src/workos/common/models/access_token_agent_registration_credential_issued_data_detail.py",
109
+ "src/workos/common/models/account_selection_required_error.py",
110
  "src/workos/common/models/action_authentication_denied.py",
111
  "src/workos/common/models/action_authentication_denied_data.py",
112
  "src/workos/common/models/action_user_registration_denied.py",
 
281
  "src/workos/common/models/create_connection_oidc_options_id_token_signature_algorithm.py",
282
  "src/workos/common/models/create_connection_oidc_options_token_authentication_method.py",
283
  "src/workos/common/models/create_data_integration_auth_methods.py",
284
+ "src/workos/common/models/create_data_integration_ownership.py",
285
  "src/workos/common/models/create_user_invite_options_locale.py",
286
  "src/workos/common/models/create_user_password_hash_type.py",
287
  "src/workos/common/models/create_user_password_salt_position.py",
 
294
  "src/workos/common/models/data_integration_credentials_input_type.py",
295
  "src/workos/common/models/data_integration_credentials_response_error.py",
296
  "src/workos/common/models/data_integration_custom_provider_authenticate_via.py",
297
+ "src/workos/common/models/data_integration_ownership.py",
298
  "src/workos/common/models/data_integration_state.py",
299
+ "src/workos/common/models/data_integrations_get_user_token_request_connection_owner.py",
300
  "src/workos/common/models/data_integrations_list_response_data_auth_methods.py",
301
  "src/workos/common/models/data_integrations_list_response_data_connected_account_auth_method.py",
302
  "src/workos/common/models/data_integrations_list_response_data_connected_account_state.py",
303
  "src/workos/common/models/data_integrations_list_response_data_ownership.py",
304
+ "src/workos/common/models/data_integrations_upsert_api_key_request_connection_owner.py",
305
+ "src/workos/common/models/data_integrations_upsert_client_credentials_request_connection_owner.py",
306
+ "src/workos/common/models/data_integrations_vend_credentials_request_connection_owner.py",
307
  "src/workos/common/models/directory_group.py",
308
  "src/workos/common/models/directory_state.py",
309
  "src/workos/common/models/directory_type.py",
 
697
  "src/workos/pipes/models/data_integrations_upsert_api_key_request.py",
698
  "src/workos/pipes/models/data_integrations_upsert_client_credentials_request.py",
699
  "src/workos/pipes/models/data_integrations_vend_credentials_request.py",
700
+ "src/workos/pipes/models/pipes_ownership.py",
701
  "src/workos/pipes/models/update_custom_provider_definition.py",
702
  "src/workos/pipes/models/update_data_integration.py",
703
  "src/workos/pipes_provider/__init__.py",
 
785
  "src/workos/user_management/models/__init__.py",
786
  "src/workos/user_management/models/authenticate_response.py",
787
  "src/workos/user_management/models/authenticate_response_oauth_token.py",
788
+ "src/workos/user_management/models/authkit_oauth_resource.py",
789
  "src/workos/user_management/models/authorization_code_session_authenticate_request.py",
790
  "src/workos/user_management/models/authorized_connect_application_list_data.py",
791
  "src/workos/user_management/models/confirm_email_change.py",
792
  "src/workos/user_management/models/cors_origin_response.py",
793
+ "src/workos/user_management/models/create_authkit_oauth_resource.py",
794
  "src/workos/user_management/models/create_cors_origin.py",
795
  "src/workos/user_management/models/create_magic_code_and_return.py",
796
  "src/workos/user_management/models/create_password_reset.py",
 
878
  "src/workos/widgets/models/widget_session_token.py",
879
  "src/workos/widgets/models/widget_session_token_response.py",
880
  "tests/fixtures/access_token_agent_registration_credential_issued_data_detail.json",
881
+ "tests/fixtures/account_selection_required_error.json",
882
  "tests/fixtures/action_authentication_denied.json",
883
  "tests/fixtures/action_authentication_denied_data.json",
884
  "tests/fixtures/action_user_registration_denied.json",
 
1043
  "tests/fixtures/authentication_sso_timed_out_data.json",
1044
  "tests/fixtures/authentication_sso_timed_out_data_error.json",
1045
  "tests/fixtures/authentication_sso_timed_out_data_sso.json",
1046
+ "tests/fixtures/authkit_oauth_resource.json",
1047
  "tests/fixtures/authorization_check.json",
1048
  "tests/fixtures/authorization_code_session_authenticate_request.json",
1049
  "tests/fixtures/authorization_permission.json",
 
1082
  "tests/fixtures/connection_saml_certificate_renewed_data_certificate.json",
1083
  "tests/fixtures/connection_saml_certificate_renewed_data_connection.json",
1084
  "tests/fixtures/cors_origin_response.json",
1085
+ "tests/fixtures/create_authkit_oauth_resource.json",
1086
  "tests/fixtures/create_authorization_permission.json",
1087
  "tests/fixtures/create_authorization_resource.json",
1088
  "tests/fixtures/create_connection.json",
 
1262
  "tests/fixtures/list_audit_log_action.json",
1263
  "tests/fixtures/list_audit_log_schema.json",
1264
  "tests/fixtures/list_authentication_factor.json",
1265
+ "tests/fixtures/list_authkit_oauth_resource.json",
1266
  "tests/fixtures/list_authorization_permission.json",
1267
  "tests/fixtures/list_authorization_resource.json",
1268
  "tests/fixtures/list_authorized_connect_application_list_data.json",
 
1565
  "tests/test_widgets_models_round_trip.py"
1566
  ],
1567
  "operations": {
1568
+ "GET /agents/blueprints": {
1569
+ "sdkMethod": "list_blueprints",
1570
+ "service": "agents"
1571
+ },
1572
+ "POST /agents/blueprints": {
1573
+ "sdkMethod": "create_blueprint",
1574
+ "service": "agents"
1575
+ },
1576
+ "GET /agents/blueprints/{agent_blueprint_id}": {
1577
+ "sdkMethod": "get_blueprint",
1578
+ "service": "agents"
1579
+ },
1580
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
1581
+ "sdkMethod": "update_blueprint",
1582
+ "service": "agents"
1583
+ },
1584
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
1585
+ "sdkMethod": "delete_blueprint",
1586
+ "service": "agents"
1587
+ },
1588
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1589
+ "sdkMethod": "create_blueprint_token",
1590
+ "service": "agents"
1591
+ },
1592
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1593
+ "sdkMethod": "validate_blueprint_token",
1594
+ "service": "agents"
1595
+ },
1596
  "PATCH /agents/claims/attempts": {
1597
  "sdkMethod": "update_attempts",
1598
  "service": "agents"
 
1605
  "sdkMethod": "get_registration",
1606
  "service": "agents"
1607
  },
1608
+ "GET /agents/instances": {
1609
+ "sdkMethod": "list_instances",
1610
+ "service": "agents"
1611
+ },
1612
+ "GET /agents/instances/{agent_instance_id}": {
1613
+ "sdkMethod": "get_instance",
1614
+ "service": "agents"
1615
+ },
1616
+ "DELETE /agents/instances/{agent_instance_id}": {
1617
+ "sdkMethod": "delete_instance",
1618
+ "service": "agents"
1619
+ },
1620
+ "GET /agents/sessions": {
1621
+ "sdkMethod": "list_sessions",
1622
+ "service": "agents"
1623
+ },
1624
+ "GET /agents/sessions/{agent_instance_session_id}": {
1625
+ "sdkMethod": "get_session",
1626
+ "service": "agents"
1627
+ },
1628
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1629
+ "sdkMethod": "revoke_session",
1630
+ "service": "agents"
1631
+ },
1632
  "POST /auth/challenges/{id}/verify": {
1633
  "sdkMethod": "verify_challenge",
1634
  "service": "multi_factor_auth"
 
1873
  "sdkMethod": "list_connections",
1874
  "service": "sso"
1875
  },
1876
+ "POST /connections": {
1877
+ "sdkMethod": "create_connection",
1878
+ "service": "sso"
1879
+ },
1880
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1881
+ "sdkMethod": "list_connection_saml_idp_signing_certs",
1882
+ "service": "sso"
1883
+ },
1884
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1885
+ "sdkMethod": "create_connection_saml_idp_signing_cert",
1886
+ "service": "sso"
1887
+ },
1888
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1889
+ "sdkMethod": "delete_connection_saml_idp_signing_cert",
1890
+ "service": "sso"
1891
+ },
1892
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1893
+ "sdkMethod": "list_connection_saml_sp_encryption_certs",
1894
+ "service": "sso"
1895
+ },
1896
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1897
+ "sdkMethod": "create_connection_saml_sp_encryption_cert",
1898
+ "service": "sso"
1899
+ },
1900
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1901
+ "sdkMethod": "delete_connection_saml_sp_encryption_cert",
1902
+ "service": "sso"
1903
+ },
1904
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1905
+ "sdkMethod": "list_connection_saml_sp_signing_cert",
1906
+ "service": "sso"
1907
+ },
1908
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1909
+ "sdkMethod": "create_connection_saml_sp_signing_cert",
1910
+ "service": "sso"
1911
+ },
1912
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1913
+ "sdkMethod": "delete_connection_saml_sp_signing_cert",
1914
+ "service": "sso"
1915
+ },
1916
  "GET /connections/{id}": {
1917
  "sdkMethod": "get_connection",
1918
  "service": "sso"
1919
  },
1920
+ "PATCH /connections/{id}": {
1921
+ "sdkMethod": "update_connection",
1922
+ "service": "sso"
1923
+ },
1924
  "DELETE /connections/{id}": {
1925
  "sdkMethod": "delete_connection",
1926
  "service": "sso"
 
1953
  "sdkMethod": "authorize_data_integration",
1954
  "service": "pipes"
1955
  },
1956
+ "PUT /data-integrations/{slug}/client-credentials": {
1957
+ "sdkMethod": "update_data_integration_client_credentials",
1958
+ "service": "pipes"
1959
+ },
1960
  "POST /data-integrations/{slug}/credentials": {
1961
  "sdkMethod": "create_data_integration_credential",
1962
  "service": "pipes"
1963
  },
1964
+ "GET /data-integrations/{slug}/organization": {
1965
+ "sdkMethod": "list_data_integration_organization",
1966
+ "service": "pipes"
1967
+ },
1968
+ "PUT /data-integrations/{slug}/organization": {
1969
+ "sdkMethod": "update_data_integration_organization",
1970
+ "service": "pipes"
1971
+ },
1972
+ "DELETE /data-integrations/{slug}/organization": {
1973
+ "sdkMethod": "delete_data_integration_organization",
1974
+ "service": "pipes"
1975
+ },
1976
  "POST /data-integrations/{provider}/token": {
1977
  "sdkMethod": "get_access_token",
1978
  "service": "pipes"
 
2141
  "sdkMethod": "list_authorized_applications",
2142
  "service": "organizations"
2143
  },
2144
+ "GET /organizations/{organization_id}/it_contacts": {
2145
+ "sdkMethod": "list_it_contacts",
2146
+ "service": "organizations"
2147
+ },
2148
+ "POST /organizations/{organization_id}/it_contacts": {
2149
+ "sdkMethod": "create_it_contact",
2150
+ "service": "organizations"
2151
+ },
2152
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2153
+ "sdkMethod": "delete_it_contact",
2154
+ "service": "organizations"
2155
+ },
2156
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2157
+ "sdkMethod": "invite_it_contact",
2158
+ "service": "organizations"
2159
+ },
2160
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2161
+ "sdkMethod": "revoke_it_contact",
2162
+ "service": "organizations"
2163
+ },
2164
+ "POST /platform/teams": {
2165
+ "sdkMethod": "create_team",
2166
+ "service": "platform_teams"
2167
+ },
2168
+ "GET /platform/teams/{team_id}": {
2169
+ "sdkMethod": "get_team",
2170
+ "service": "platform_teams"
2171
+ },
2172
  "POST /portal/generate_link": {
2173
  "sdkMethod": "generate_link",
2174
  "service": "admin_portal"
 
2241
  "sdkMethod": "revoke_session",
2242
  "service": "user_management"
2243
  },
2244
+ "GET /user_management/authkit_oauth_resources": {
2245
+ "sdkMethod": "list_authkit_oauth_resources",
2246
+ "service": "user_management"
2247
+ },
2248
+ "POST /user_management/authkit_oauth_resources": {
2249
+ "sdkMethod": "create_authkit_oauth_resource",
2250
+ "service": "user_management"
2251
+ },
2252
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
2253
+ "sdkMethod": "delete_authkit_oauth_resource",
2254
+ "service": "user_management"
2255
+ },
2256
  "GET /user_management/cors_origins": {
2257
  "sdkMethod": "list_cors_origins",
2258
  "service": "user_management"
 
2453
  "sdkMethod": "create_user_auth_factor",
2454
  "service": "multi_factor_auth"
2455
  },
2456
+ "DELETE /user_management/waitlist_entries/{id}": {
2457
+ "sdkMethod": "delete_waitlist_entry",
2458
+ "service": "user_management"
2459
+ },
2460
+ "POST /user_management/waitlist_entries/{id}/approve": {
2461
+ "sdkMethod": "create_waitlist_entry_approve",
2462
+ "service": "user_management"
2463
+ },
2464
+ "POST /user_management/waitlist_entries/{id}/deny": {
2465
+ "sdkMethod": "create_waitlist_entry_deny",
2466
+ "service": "user_management"
2467
+ },
2468
+ "GET /user_management/waitlists": {
2469
+ "sdkMethod": "list_waitlists",
2470
+ "service": "user_management"
2471
+ },
2472
+ "GET /user_management/waitlists/{id}": {
2473
+ "sdkMethod": "get_waitlist",
2474
+ "service": "user_management"
2475
+ },
2476
+ "GET /user_management/waitlists/{id}/entries": {
2477
+ "sdkMethod": "list_waitlist_entries",
2478
+ "service": "user_management"
2479
+ },
2480
+ "POST /user_management/waitlists/{id}/entries": {
2481
+ "sdkMethod": "create_waitlist_entry",
2482
+ "service": "user_management"
2483
+ },
2484
  "POST /vault/v1/keys/data-key": {
2485
  "sdkMethod": "create_data_key",
2486
  "service": "vault"
 
2588
  "GET /audit_logs/exports/{auditLogExportId}": {
2589
  "sdkMethod": "get_export",
2590
  "service": "audit_logs"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2591
  }
2592
  }
2593
  }
python/src/workos/admin_portal/_resource.py
python/src/workos/admin_portal/_resource.py CHANGED
@@ -34,8 +34,8 @@ class AdminPortal:
34
  Generate a Portal Link scoped to an Organization.
35
 
36
  Args:
37
- return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
38
- success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
39
  organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
40
  intent: The intent of the Admin Portal.
41
  - `sso` - Launch Admin Portal for creating SSO connections
@@ -101,8 +101,8 @@ class AsyncAdminPortal:
101
  Generate a Portal Link scoped to an Organization.
102
 
103
  Args:
104
- return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
105
- success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
106
  organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
107
  intent: The intent of the Admin Portal.
108
  - `sso` - Launch Admin Portal for creating SSO connections
 
34
  Generate a Portal Link scoped to an Organization.
35
 
36
  Args:
37
+ return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
38
+ success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
39
  organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
40
  intent: The intent of the Admin Portal.
41
  - `sso` - Launch Admin Portal for creating SSO connections
 
101
  Generate a Portal Link scoped to an Organization.
102
 
103
  Args:
104
+ return_url: The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
105
+ success_url: The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
106
  organization: An [Organization](https://workos.com/docs/reference/organization) identifier.
107
  intent: The intent of the Admin Portal.
108
  - `sso` - Launch Admin Portal for creating SSO connections
python/src/workos/admin_portal/models/generate_link.py
python/src/workos/admin_portal/models/generate_link.py CHANGED
@@ -17,9 +17,9 @@ class GenerateLink:
17
  organization: str
18
  """An [Organization](https://workos.com/docs/reference/organization) identifier."""
19
  return_url: str | None = None
20
- """The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used."""
21
  success_url: str | None = None
22
- """The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used."""
23
  intent: GenerateLinkIntent | None = None
24
  """
25
  The intent of the Admin Portal.
 
17
  organization: str
18
  """An [Organization](https://workos.com/docs/reference/organization) identifier."""
19
  return_url: str | None = None
20
+ """The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used."""
21
  success_url: str | None = None
22
+ """The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used."""
23
  intent: GenerateLinkIntent | None = None
24
  """
25
  The intent of the Admin Portal.
python/src/workos/api_keys/models/validate_api_key.py
python/src/workos/api_keys/models/validate_api_key.py CHANGED
@@ -1,9 +1,32 @@
1
  # This file is auto-generated by oagen. Do not edit.
2
 
3
- from typing import TypeAlias
4
 
5
- from workos.sso.models.create_saml_idp_signing_certificate import (
6
- CreateSAMLIdpSigningCertificate,
7
- )
8
 
9
- ValidateApiKey: TypeAlias = CreateSAMLIdpSigningCertificate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ValidateApiKey:
13
+ """Validate Api Key model."""
14
+
15
+ value: str
16
+ """The value for an API key."""
17
+
18
+ @classmethod
19
+ def from_dict(cls, data: dict[str, Any]) -> ValidateApiKey:
20
+ """Deserialize from a dictionary."""
21
+ try:
22
+ return cls(
23
+ value=data["value"],
24
+ )
25
+ except (KeyError, ValueError) as e:
26
+ _raise_deserialize_error("ValidateApiKey", e)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ """Serialize to a dictionary."""
30
+ result: dict[str, Any] = {}
31
+ result["value"] = self.value
32
+ return result
python/src/workos/common/__init__.py
python/src/workos/common/__init__.py CHANGED
@@ -1,9 +1,9 @@
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
  )
 
7
  from .models import ActionAuthenticationDenied as ActionAuthenticationDenied
8
  from .models import ActionAuthenticationDeniedData as ActionAuthenticationDeniedData
9
  from .models import ActionUserRegistrationDenied as ActionUserRegistrationDenied
@@ -262,6 +262,7 @@ from .models import (
262
  CreateConnectionOIDCOptionsTokenAuthenticationMethod as CreateConnectionOIDCOptionsTokenAuthenticationMethod,
263
  )
264
  from .models import CreateDataIntegrationAuthMethods as CreateDataIntegrationAuthMethods
 
265
  from .models import CreateUserInviteOptionsLocale as CreateUserInviteOptionsLocale
266
  from .models import CreateUserPasswordHashType as CreateUserPasswordHashType
267
  from .models import CreateUserPasswordSaltPosition as CreateUserPasswordSaltPosition
@@ -286,6 +287,10 @@ from .models import DataIntegrationCredentialType as DataIntegrationCredentialTy
286
  from .models import (
287
  DataIntegrationCustomProviderAuthenticateVia as DataIntegrationCustomProviderAuthenticateVia,
288
  )
 
 
 
 
289
  from .models import (
290
  DataIntegrationsListResponseDataAuthMethods as DataIntegrationsListResponseDataAuthMethods,
291
  )
@@ -299,6 +304,15 @@ from .models import (
299
  DataIntegrationsListResponseDataOwnership as DataIntegrationsListResponseDataOwnership,
300
  )
301
  from .models import DataIntegrationState as DataIntegrationState
 
 
 
 
 
 
 
 
 
302
  from .models import DirectoryGroup as DirectoryGroup
303
  from .models import DirectoryState as DirectoryState
304
  from .models import DirectoryType as DirectoryType
 
1
  # This file is auto-generated by oagen. Do not edit.
2
 
 
3
  from .models import (
4
  AccessTokenAgentRegistrationCredentialIssuedDataDetail as AccessTokenAgentRegistrationCredentialIssuedDataDetail,
5
  )
6
+ from .models import AccountSelectionRequiredError as AccountSelectionRequiredError
7
  from .models import ActionAuthenticationDenied as ActionAuthenticationDenied
8
  from .models import ActionAuthenticationDeniedData as ActionAuthenticationDeniedData
9
  from .models import ActionUserRegistrationDenied as ActionUserRegistrationDenied
 
262
  CreateConnectionOIDCOptionsTokenAuthenticationMethod as CreateConnectionOIDCOptionsTokenAuthenticationMethod,
263
  )
264
  from .models import CreateDataIntegrationAuthMethods as CreateDataIntegrationAuthMethods
265
+ from .models import CreateDataIntegrationOwnership as CreateDataIntegrationOwnership
266
  from .models import CreateUserInviteOptionsLocale as CreateUserInviteOptionsLocale
267
  from .models import CreateUserPasswordHashType as CreateUserPasswordHashType
268
  from .models import CreateUserPasswordSaltPosition as CreateUserPasswordSaltPosition
 
287
  from .models import (
288
  DataIntegrationCustomProviderAuthenticateVia as DataIntegrationCustomProviderAuthenticateVia,
289
  )
290
+ from .models import DataIntegrationOwnership as DataIntegrationOwnership
291
+ from .models import (
292
+ DataIntegrationsGetUserTokenRequestConnectionOwner as DataIntegrationsGetUserTokenRequestConnectionOwner,
293
+ )
294
  from .models import (
295
  DataIntegrationsListResponseDataAuthMethods as DataIntegrationsListResponseDataAuthMethods,
296
  )
 
304
  DataIntegrationsListResponseDataOwnership as DataIntegrationsListResponseDataOwnership,
305
  )
306
  from .models import DataIntegrationState as DataIntegrationState
307
+ from .models import (
308
+ DataIntegrationsUpsertApiKeyRequestConnectionOwner as DataIntegrationsUpsertApiKeyRequestConnectionOwner,
309
+ )
310
+ from .models import (
311
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner as DataIntegrationsUpsertClientCredentialsRequestConnectionOwner,
312
+ )
313
+ from .models import (
314
+ DataIntegrationsVendCredentialsRequestConnectionOwner as DataIntegrationsVendCredentialsRequestConnectionOwner,
315
+ )
316
  from .models import DirectoryGroup as DirectoryGroup
317
  from .models import DirectoryState as DirectoryState
318
  from .models import DirectoryType as DirectoryType
python/src/workos/common/models/__init__.py
python/src/workos/common/models/__init__.py CHANGED
@@ -3,6 +3,9 @@
3
  from .access_token_agent_registration_credential_issued_data_detail import (
4
  AccessTokenAgentRegistrationCredentialIssuedDataDetail as AccessTokenAgentRegistrationCredentialIssuedDataDetail,
5
  )
 
 
 
6
  from .action_authentication_denied import (
7
  ActionAuthenticationDenied as ActionAuthenticationDenied,
8
  )
@@ -51,12 +54,10 @@ from .agent_instance_created import AgentInstanceCreated as AgentInstanceCreated
51
  from .agent_instance_created_data import (
52
  AgentInstanceCreatedData as AgentInstanceCreatedData,
53
  )
54
- from .agent_instance_created_data_type import *
55
  from .agent_instance_deleted import AgentInstanceDeleted as AgentInstanceDeleted
56
  from .agent_instance_deleted_data import (
57
  AgentInstanceDeletedData as AgentInstanceDeletedData,
58
  )
59
- from .agent_instance_deleted_data_type import *
60
  from .agent_instance_session_created import (
61
  AgentInstanceSessionCreated as AgentInstanceSessionCreated,
62
  )
@@ -97,9 +98,6 @@ from .agent_registration_created_data import (
97
  from .agent_registration_created_data_agent_identity import (
98
  AgentRegistrationCreatedDataAgentIdentity as AgentRegistrationCreatedDataAgentIdentity,
99
  )
100
- from .agent_registration_created_data_kind import *
101
- from .agent_registration_created_data_method import *
102
- from .agent_registration_created_data_status import *
103
  from .agent_registration_credential_issued import (
104
  AgentRegistrationCredentialIssued as AgentRegistrationCredentialIssued,
105
  )
@@ -296,7 +294,6 @@ from .authentication_radar_risk_detected import (
296
  from .authentication_radar_risk_detected_data import (
297
  AuthenticationRadarRiskDetectedData as AuthenticationRadarRiskDetectedData,
298
  )
299
- from .authentication_radar_risk_detected_data_action import *
300
  from .authentication_reauthentication_succeeded import (
301
  AuthenticationReauthenticationSucceeded as AuthenticationReauthenticationSucceeded,
302
  )
@@ -371,26 +368,18 @@ from .connection_activated import ConnectionActivated as ConnectionActivated
371
  from .connection_activated_data import (
372
  ConnectionActivatedData as ConnectionActivatedData,
373
  )
374
- from .connection_activated_data_connection_type import *
375
  from .connection_activated_data_domain import (
376
  ConnectionActivatedDataDomain as ConnectionActivatedDataDomain,
377
  )
378
- from .connection_activated_data_state import *
379
- from .connection_activated_data_status import *
380
  from .connection_deactivated import ConnectionDeactivated as ConnectionDeactivated
381
  from .connection_deactivated_data import (
382
  ConnectionDeactivatedData as ConnectionDeactivatedData,
383
  )
384
- from .connection_deactivated_data_connection_type import *
385
  from .connection_deactivated_data_domain import (
386
  ConnectionDeactivatedDataDomain as ConnectionDeactivatedDataDomain,
387
  )
388
- from .connection_deactivated_data_state import *
389
- from .connection_deactivated_data_status import *
390
  from .connection_deleted import ConnectionDeleted as ConnectionDeleted
391
  from .connection_deleted_data import ConnectionDeletedData as ConnectionDeletedData
392
- from .connection_deleted_data_connection_type import *
393
- from .connection_deleted_data_state import *
394
  from .connection_saml_certificate_renewal_required import (
395
  ConnectionSAMLCertificateRenewalRequired as ConnectionSAMLCertificateRenewalRequired,
396
  )
@@ -400,7 +389,6 @@ from .connection_saml_certificate_renewal_required_data import (
400
  from .connection_saml_certificate_renewal_required_data_certificate import (
401
  ConnectionSAMLCertificateRenewalRequiredDataCertificate as ConnectionSAMLCertificateRenewalRequiredDataCertificate,
402
  )
403
- from .connection_saml_certificate_renewal_required_data_certificate_certificate_type import *
404
  from .connection_saml_certificate_renewal_required_data_connection import (
405
  ConnectionSAMLCertificateRenewalRequiredDataConnection as ConnectionSAMLCertificateRenewalRequiredDataConnection,
406
  )
@@ -413,7 +401,6 @@ from .connection_saml_certificate_renewed_data import (
413
  from .connection_saml_certificate_renewed_data_certificate import (
414
  ConnectionSAMLCertificateRenewedDataCertificate as ConnectionSAMLCertificateRenewedDataCertificate,
415
  )
416
- from .connection_saml_certificate_renewed_data_certificate_certificate_type import *
417
  from .connection_saml_certificate_renewed_data_connection import (
418
  ConnectionSAMLCertificateRenewedDataConnection as ConnectionSAMLCertificateRenewedDataConnection,
419
  )
@@ -429,6 +416,9 @@ from .create_connection_oidc_options_token_authentication_method import (
429
  from .create_data_integration_auth_methods import (
430
  CreateDataIntegrationAuthMethods as CreateDataIntegrationAuthMethods,
431
  )
 
 
 
432
  from .create_user_invite_options_locale import (
433
  CreateUserInviteOptionsLocale as CreateUserInviteOptionsLocale,
434
  )
@@ -465,7 +455,13 @@ from .data_integration_credentials_response_error import (
465
  from .data_integration_custom_provider_authenticate_via import (
466
  DataIntegrationCustomProviderAuthenticateVia as DataIntegrationCustomProviderAuthenticateVia,
467
  )
 
 
 
468
  from .data_integration_state import DataIntegrationState as DataIntegrationState
 
 
 
469
  from .data_integrations_list_response_data_auth_methods import (
470
  DataIntegrationsListResponseDataAuthMethods as DataIntegrationsListResponseDataAuthMethods,
471
  )
@@ -478,12 +474,20 @@ from .data_integrations_list_response_data_connected_account_state import (
478
  from .data_integrations_list_response_data_ownership import (
479
  DataIntegrationsListResponseDataOwnership as DataIntegrationsListResponseDataOwnership,
480
  )
 
 
 
 
 
 
 
 
 
481
  from .directory_group import DirectoryGroup as DirectoryGroup
482
  from .directory_state import DirectoryState as DirectoryState
483
  from .directory_type import DirectoryType as DirectoryType
484
  from .directory_user import DirectoryUser as DirectoryUser
485
  from .directory_user_email import DirectoryUserEmail as DirectoryUserEmail
486
- from .directory_user_state import *
487
  from .directory_user_with_groups_state import (
488
  DirectoryUserWithGroupsState as DirectoryUserWithGroupsState,
489
  )
@@ -492,12 +496,8 @@ from .dsync_activated_data import DsyncActivatedData as DsyncActivatedData
492
  from .dsync_activated_data_domain import (
493
  DsyncActivatedDataDomain as DsyncActivatedDataDomain,
494
  )
495
- from .dsync_activated_data_state import *
496
- from .dsync_activated_data_type import *
497
  from .dsync_deleted import DsyncDeleted as DsyncDeleted
498
  from .dsync_deleted_data import DsyncDeletedData as DsyncDeletedData
499
- from .dsync_deleted_data_state import *
500
- from .dsync_deleted_data_type import *
501
  from .dsync_group_created import DsyncGroupCreated as DsyncGroupCreated
502
  from .dsync_group_deleted import DsyncGroupDeleted as DsyncGroupDeleted
503
  from .dsync_group_updated import DsyncGroupUpdated as DsyncGroupUpdated
@@ -521,7 +521,6 @@ from .dsync_user_updated_data import DsyncUserUpdatedData as DsyncUserUpdatedDat
521
  from .dsync_user_updated_data_email import (
522
  DsyncUserUpdatedDataEmail as DsyncUserUpdatedDataEmail,
523
  )
524
- from .dsync_user_updated_data_state import *
525
  from .email_verification_created import (
526
  EmailVerificationCreated as EmailVerificationCreated,
527
  )
@@ -531,7 +530,6 @@ from .email_verification_created_data import (
531
  from .error_response import ErrorResponse as ErrorResponse
532
  from .event_context import EventContext as EventContext
533
  from .event_context_actor import EventContextActor as EventContextActor
534
- from .event_context_actor_source import *
535
  from .event_context_google_analytics_session import (
536
  EventContextGoogleAnalyticsSession as EventContextGoogleAnalyticsSession,
537
  )
@@ -543,7 +541,6 @@ from .flag_created_context import FlagCreatedContext as FlagCreatedContext
543
  from .flag_created_context_actor import (
544
  FlagCreatedContextActor as FlagCreatedContextActor,
545
  )
546
- from .flag_created_context_actor_source import *
547
  from .flag_created_data import FlagCreatedData as FlagCreatedData
548
  from .flag_created_data_owner import FlagCreatedDataOwner as FlagCreatedDataOwner
549
  from .flag_deleted import FlagDeleted as FlagDeleted
@@ -551,17 +548,14 @@ from .flag_deleted_context import FlagDeletedContext as FlagDeletedContext
551
  from .flag_deleted_context_actor import (
552
  FlagDeletedContextActor as FlagDeletedContextActor,
553
  )
554
- from .flag_deleted_context_actor_source import *
555
  from .flag_deleted_data import FlagDeletedData as FlagDeletedData
556
  from .flag_deleted_data_owner import FlagDeletedDataOwner as FlagDeletedDataOwner
557
  from .flag_owner import FlagOwner as FlagOwner
558
  from .flag_rule_updated import FlagRuleUpdated as FlagRuleUpdated
559
  from .flag_rule_updated_context import FlagRuleUpdatedContext as FlagRuleUpdatedContext
560
- from .flag_rule_updated_context_access_type import *
561
  from .flag_rule_updated_context_actor import (
562
  FlagRuleUpdatedContextActor as FlagRuleUpdatedContextActor,
563
  )
564
- from .flag_rule_updated_context_actor_source import *
565
  from .flag_rule_updated_context_configured_target import (
566
  FlagRuleUpdatedContextConfiguredTarget as FlagRuleUpdatedContextConfiguredTarget,
567
  )
@@ -577,7 +571,6 @@ from .flag_rule_updated_context_previous_attribute import (
577
  from .flag_rule_updated_context_previous_attribute_context import (
578
  FlagRuleUpdatedContextPreviousAttributeContext as FlagRuleUpdatedContextPreviousAttributeContext,
579
  )
580
- from .flag_rule_updated_context_previous_attribute_context_access_type import *
581
  from .flag_rule_updated_context_previous_attribute_context_configured_target import (
582
  FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget as FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget,
583
  )
@@ -599,7 +592,6 @@ from .flag_updated_context import FlagUpdatedContext as FlagUpdatedContext
599
  from .flag_updated_context_actor import (
600
  FlagUpdatedContextActor as FlagUpdatedContextActor,
601
  )
602
- from .flag_updated_context_actor_source import *
603
  from .flag_updated_context_previous_attribute import (
604
  FlagUpdatedContextPreviousAttribute as FlagUpdatedContextPreviousAttribute,
605
  )
@@ -619,16 +611,12 @@ from .group_member_removed_data import GroupMemberRemovedData as GroupMemberRemo
619
  from .group_updated import GroupUpdated as GroupUpdated
620
  from .invitation_accepted import InvitationAccepted as InvitationAccepted
621
  from .invitation_accepted_data import InvitationAcceptedData as InvitationAcceptedData
622
- from .invitation_accepted_data_state import *
623
  from .invitation_created import InvitationCreated as InvitationCreated
624
  from .invitation_created_data import InvitationCreatedData as InvitationCreatedData
625
- from .invitation_created_data_state import *
626
  from .invitation_resent import InvitationResent as InvitationResent
627
  from .invitation_resent_data import InvitationResentData as InvitationResentData
628
- from .invitation_resent_data_state import *
629
  from .invitation_revoked import InvitationRevoked as InvitationRevoked
630
  from .invitation_revoked_data import InvitationRevokedData as InvitationRevokedData
631
- from .invitation_revoked_data_state import *
632
  from .invitation_state import InvitationState as InvitationState
633
  from .invite_it_contact_intents import InviteItContactIntents as InviteItContactIntents
634
  from .list_metadata import ListMetadata as ListMetadata
@@ -641,8 +629,6 @@ from .organization_created_data import (
641
  from .organization_created_data_domain import (
642
  OrganizationCreatedDataDomain as OrganizationCreatedDataDomain,
643
  )
644
- from .organization_created_data_domain_state import *
645
- from .organization_created_data_domain_verification_strategy import *
646
  from .organization_deleted import OrganizationDeleted as OrganizationDeleted
647
  from .organization_deleted_data import (
648
  OrganizationDeletedData as OrganizationDeletedData,
@@ -650,8 +636,6 @@ from .organization_deleted_data import (
650
  from .organization_deleted_data_domain import (
651
  OrganizationDeletedDataDomain as OrganizationDeletedDataDomain,
652
  )
653
- from .organization_deleted_data_domain_state import *
654
- from .organization_deleted_data_domain_verification_strategy import *
655
  from .organization_domain import OrganizationDomain as OrganizationDomain
656
  from .organization_domain_created import (
657
  OrganizationDomainCreated as OrganizationDomainCreated,
@@ -659,8 +643,6 @@ from .organization_domain_created import (
659
  from .organization_domain_created_data import (
660
  OrganizationDomainCreatedData as OrganizationDomainCreatedData,
661
  )
662
- from .organization_domain_created_data_state import *
663
- from .organization_domain_created_data_verification_strategy import *
664
  from .organization_domain_data_state import (
665
  OrganizationDomainDataState as OrganizationDomainDataState,
666
  )
@@ -670,8 +652,6 @@ from .organization_domain_deleted import (
670
  from .organization_domain_deleted_data import (
671
  OrganizationDomainDeletedData as OrganizationDomainDeletedData,
672
  )
673
- from .organization_domain_deleted_data_state import *
674
- from .organization_domain_deleted_data_verification_strategy import *
675
  from .organization_domain_state import (
676
  OrganizationDomainState as OrganizationDomainState,
677
  )
@@ -681,8 +661,6 @@ from .organization_domain_updated import (
681
  from .organization_domain_updated_data import (
682
  OrganizationDomainUpdatedData as OrganizationDomainUpdatedData,
683
  )
684
- from .organization_domain_updated_data_state import *
685
- from .organization_domain_updated_data_verification_strategy import *
686
  from .organization_domain_verification_failed import (
687
  OrganizationDomainVerificationFailed as OrganizationDomainVerificationFailed,
688
  )
@@ -692,9 +670,6 @@ from .organization_domain_verification_failed_data import (
692
  from .organization_domain_verification_failed_data_organization_domain import (
693
  OrganizationDomainVerificationFailedDataOrganizationDomain as OrganizationDomainVerificationFailedDataOrganizationDomain,
694
  )
695
- from .organization_domain_verification_failed_data_organization_domain_state import *
696
- from .organization_domain_verification_failed_data_organization_domain_verification_strategy import *
697
- from .organization_domain_verification_failed_data_reason import *
698
  from .organization_domain_verification_strategy import (
699
  OrganizationDomainVerificationStrategy as OrganizationDomainVerificationStrategy,
700
  )
@@ -704,22 +679,18 @@ from .organization_domain_verified import (
704
  from .organization_domain_verified_data import (
705
  OrganizationDomainVerifiedData as OrganizationDomainVerifiedData,
706
  )
707
- from .organization_domain_verified_data_state import *
708
- from .organization_domain_verified_data_verification_strategy import *
709
  from .organization_membership_created import (
710
  OrganizationMembershipCreated as OrganizationMembershipCreated,
711
  )
712
  from .organization_membership_created_data import (
713
  OrganizationMembershipCreatedData as OrganizationMembershipCreatedData,
714
  )
715
- from .organization_membership_created_data_status import *
716
  from .organization_membership_deleted import (
717
  OrganizationMembershipDeleted as OrganizationMembershipDeleted,
718
  )
719
  from .organization_membership_deleted_data import (
720
  OrganizationMembershipDeletedData as OrganizationMembershipDeletedData,
721
  )
722
- from .organization_membership_deleted_data_status import *
723
  from .organization_membership_status import (
724
  OrganizationMembershipStatus as OrganizationMembershipStatus,
725
  )
@@ -729,7 +700,6 @@ from .organization_membership_updated import (
729
  from .organization_membership_updated_data import (
730
  OrganizationMembershipUpdatedData as OrganizationMembershipUpdatedData,
731
  )
732
- from .organization_membership_updated_data_status import *
733
  from .organization_role_created import (
734
  OrganizationRoleCreated as OrganizationRoleCreated,
735
  )
@@ -755,8 +725,6 @@ from .organization_updated_data import (
755
  from .organization_updated_data_domain import (
756
  OrganizationUpdatedDataDomain as OrganizationUpdatedDataDomain,
757
  )
758
- from .organization_updated_data_domain_state import *
759
- from .organization_updated_data_domain_verification_strategy import *
760
  from .pagination_order import PaginationOrder as PaginationOrder
761
  from .password_reset_created import PasswordResetCreated as PasswordResetCreated
762
  from .password_reset_created_data import (
@@ -779,7 +747,6 @@ from .permission_deleted_data import PermissionDeletedData as PermissionDeletedD
779
  from .permission_updated import PermissionUpdated as PermissionUpdated
780
  from .permission_updated_data import PermissionUpdatedData as PermissionUpdatedData
781
  from .pipe_connected_account import PipeConnectedAccount as PipeConnectedAccount
782
- from .pipe_connected_account_state import *
783
  from .pipes_connected_account_connected import (
784
  PipesConnectedAccountConnected as PipesConnectedAccountConnected,
785
  )
@@ -824,24 +791,20 @@ from .resource_export_completed import (
824
  from .resource_export_completed_data import (
825
  ResourceExportCompletedData as ResourceExportCompletedData,
826
  )
827
- from .resource_export_completed_data_resource_type import *
828
  from .resource_export_created import ResourceExportCreated as ResourceExportCreated
829
  from .resource_export_created_data import (
830
  ResourceExportCreatedData as ResourceExportCreatedData,
831
  )
832
- from .resource_export_created_data_resource_type import *
833
  from .resource_export_downloaded import (
834
  ResourceExportDownloaded as ResourceExportDownloaded,
835
  )
836
  from .resource_export_downloaded_data import (
837
  ResourceExportDownloadedData as ResourceExportDownloadedData,
838
  )
839
- from .resource_export_downloaded_data_resource_type import *
840
  from .resource_export_failed import ResourceExportFailed as ResourceExportFailed
841
  from .resource_export_failed_data import (
842
  ResourceExportFailedData as ResourceExportFailedData,
843
  )
844
- from .resource_export_failed_data_resource_type import *
845
  from .role_created import RoleCreated as RoleCreated
846
  from .role_created_data import RoleCreatedData as RoleCreatedData
847
  from .role_deleted import RoleDeleted as RoleDeleted
@@ -851,18 +814,14 @@ from .role_updated import RoleUpdated as RoleUpdated
851
  from .role_updated_data import RoleUpdatedData as RoleUpdatedData
852
  from .session_created import SessionCreated as SessionCreated
853
  from .session_created_data import SessionCreatedData as SessionCreatedData
854
- from .session_created_data_auth_method import *
855
  from .session_created_data_impersonator import (
856
  SessionCreatedDataImpersonator as SessionCreatedDataImpersonator,
857
  )
858
- from .session_created_data_status import *
859
  from .session_revoked import SessionRevoked as SessionRevoked
860
  from .session_revoked_data import SessionRevokedData as SessionRevokedData
861
- from .session_revoked_data_auth_method import *
862
  from .session_revoked_data_impersonator import (
863
  SessionRevokedDataImpersonator as SessionRevokedDataImpersonator,
864
  )
865
- from .session_revoked_data_status import *
866
  from .slim_role import SlimRole as SlimRole
867
  from .team_production_state import TeamProductionState as TeamProductionState
868
  from .token_query_grant_type import TokenQueryGrantType as TokenQueryGrantType
@@ -923,7 +882,6 @@ from .vault_byok_key_deleted import VaultByokKeyDeleted as VaultByokKeyDeleted
923
  from .vault_byok_key_deleted_data import (
924
  VaultByokKeyDeletedData as VaultByokKeyDeletedData,
925
  )
926
- from .vault_byok_key_provider import *
927
  from .vault_byok_key_verification_completed import (
928
  VaultByokKeyVerificationCompleted as VaultByokKeyVerificationCompleted,
929
  )
@@ -932,40 +890,29 @@ from .vault_byok_key_verification_completed_data import (
932
  )
933
  from .vault_data_created import VaultDataCreated as VaultDataCreated
934
  from .vault_data_created_data import VaultDataCreatedData as VaultDataCreatedData
935
- from .vault_data_created_data_actor_source import *
936
  from .vault_data_deleted import VaultDataDeleted as VaultDataDeleted
937
  from .vault_data_deleted_data import VaultDataDeletedData as VaultDataDeletedData
938
- from .vault_data_deleted_data_actor_source import *
939
  from .vault_data_read import VaultDataRead as VaultDataRead
940
  from .vault_data_read_data import VaultDataReadData as VaultDataReadData
941
- from .vault_data_read_data_actor_source import *
942
  from .vault_data_updated import VaultDataUpdated as VaultDataUpdated
943
  from .vault_data_updated_data import VaultDataUpdatedData as VaultDataUpdatedData
944
- from .vault_data_updated_data_actor_source import *
945
  from .vault_dek_decrypted import VaultDekDecrypted as VaultDekDecrypted
946
  from .vault_dek_decrypted_data import VaultDekDecryptedData as VaultDekDecryptedData
947
- from .vault_dek_decrypted_data_actor_source import *
948
  from .vault_dek_read import VaultDekRead as VaultDekRead
949
  from .vault_dek_read_data import VaultDekReadData as VaultDekReadData
950
- from .vault_dek_read_data_actor_source import *
951
  from .vault_kek_created import VaultKekCreated as VaultKekCreated
952
  from .vault_kek_created_data import VaultKekCreatedData as VaultKekCreatedData
953
- from .vault_kek_created_data_actor_source import *
954
  from .vault_kek_deleted import VaultKekDeleted as VaultKekDeleted
955
  from .vault_kek_deleted_data import VaultKekDeletedData as VaultKekDeletedData
956
- from .vault_kek_deleted_data_actor_source import *
957
  from .vault_metadata_read import VaultMetadataRead as VaultMetadataRead
958
  from .vault_metadata_read_data import VaultMetadataReadData as VaultMetadataReadData
959
- from .vault_metadata_read_data_actor_source import *
960
  from .vault_names_listed import VaultNamesListed as VaultNamesListed
961
  from .vault_names_listed_data import VaultNamesListedData as VaultNamesListedData
962
- from .vault_names_listed_data_actor_source import *
963
  from .waitlist_entry_state import WaitlistEntryState as WaitlistEntryState
964
  from .waitlist_user import WaitlistUser as WaitlistUser
965
  from .waitlist_user_approved import WaitlistUserApproved as WaitlistUserApproved
966
  from .waitlist_user_created import WaitlistUserCreated as WaitlistUserCreated
967
  from .waitlist_user_denied import WaitlistUserDenied as WaitlistUserDenied
968
- from .waitlist_user_state import *
969
  from .webhook_endpoint_status import WebhookEndpointStatus as WebhookEndpointStatus
970
  from .widget_session_token_scopes import (
971
  WidgetSessionTokenScopes as WidgetSessionTokenScopes,
 
3
  from .access_token_agent_registration_credential_issued_data_detail import (
4
  AccessTokenAgentRegistrationCredentialIssuedDataDetail as AccessTokenAgentRegistrationCredentialIssuedDataDetail,
5
  )
6
+ from .account_selection_required_error import (
7
+ AccountSelectionRequiredError as AccountSelectionRequiredError,
8
+ )
9
  from .action_authentication_denied import (
10
  ActionAuthenticationDenied as ActionAuthenticationDenied,
11
  )
 
54
  from .agent_instance_created_data import (
55
  AgentInstanceCreatedData as AgentInstanceCreatedData,
56
  )
 
57
  from .agent_instance_deleted import AgentInstanceDeleted as AgentInstanceDeleted
58
  from .agent_instance_deleted_data import (
59
  AgentInstanceDeletedData as AgentInstanceDeletedData,
60
  )
 
61
  from .agent_instance_session_created import (
62
  AgentInstanceSessionCreated as AgentInstanceSessionCreated,
63
  )
 
98
  from .agent_registration_created_data_agent_identity import (
99
  AgentRegistrationCreatedDataAgentIdentity as AgentRegistrationCreatedDataAgentIdentity,
100
  )
 
 
 
101
  from .agent_registration_credential_issued import (
102
  AgentRegistrationCredentialIssued as AgentRegistrationCredentialIssued,
103
  )
 
294
  from .authentication_radar_risk_detected_data import (
295
  AuthenticationRadarRiskDetectedData as AuthenticationRadarRiskDetectedData,
296
  )
 
297
  from .authentication_reauthentication_succeeded import (
298
  AuthenticationReauthenticationSucceeded as AuthenticationReauthenticationSucceeded,
299
  )
 
368
  from .connection_activated_data import (
369
  ConnectionActivatedData as ConnectionActivatedData,
370
  )
 
371
  from .connection_activated_data_domain import (
372
  ConnectionActivatedDataDomain as ConnectionActivatedDataDomain,
373
  )
 
 
374
  from .connection_deactivated import ConnectionDeactivated as ConnectionDeactivated
375
  from .connection_deactivated_data import (
376
  ConnectionDeactivatedData as ConnectionDeactivatedData,
377
  )
 
378
  from .connection_deactivated_data_domain import (
379
  ConnectionDeactivatedDataDomain as ConnectionDeactivatedDataDomain,
380
  )
 
 
381
  from .connection_deleted import ConnectionDeleted as ConnectionDeleted
382
  from .connection_deleted_data import ConnectionDeletedData as ConnectionDeletedData
 
 
383
  from .connection_saml_certificate_renewal_required import (
384
  ConnectionSAMLCertificateRenewalRequired as ConnectionSAMLCertificateRenewalRequired,
385
  )
 
389
  from .connection_saml_certificate_renewal_required_data_certificate import (
390
  ConnectionSAMLCertificateRenewalRequiredDataCertificate as ConnectionSAMLCertificateRenewalRequiredDataCertificate,
391
  )
 
392
  from .connection_saml_certificate_renewal_required_data_connection import (
393
  ConnectionSAMLCertificateRenewalRequiredDataConnection as ConnectionSAMLCertificateRenewalRequiredDataConnection,
394
  )
 
401
  from .connection_saml_certificate_renewed_data_certificate import (
402
  ConnectionSAMLCertificateRenewedDataCertificate as ConnectionSAMLCertificateRenewedDataCertificate,
403
  )
 
404
  from .connection_saml_certificate_renewed_data_connection import (
405
  ConnectionSAMLCertificateRenewedDataConnection as ConnectionSAMLCertificateRenewedDataConnection,
406
  )
 
416
  from .create_data_integration_auth_methods import (
417
  CreateDataIntegrationAuthMethods as CreateDataIntegrationAuthMethods,
418
  )
419
+ from .create_data_integration_ownership import (
420
+ CreateDataIntegrationOwnership as CreateDataIntegrationOwnership,
421
+ )
422
  from .create_user_invite_options_locale import (
423
  CreateUserInviteOptionsLocale as CreateUserInviteOptionsLocale,
424
  )
 
455
  from .data_integration_custom_provider_authenticate_via import (
456
  DataIntegrationCustomProviderAuthenticateVia as DataIntegrationCustomProviderAuthenticateVia,
457
  )
458
+ from .data_integration_ownership import (
459
+ DataIntegrationOwnership as DataIntegrationOwnership,
460
+ )
461
  from .data_integration_state import DataIntegrationState as DataIntegrationState
462
+ from .data_integrations_get_user_token_request_connection_owner import (
463
+ DataIntegrationsGetUserTokenRequestConnectionOwner as DataIntegrationsGetUserTokenRequestConnectionOwner,
464
+ )
465
  from .data_integrations_list_response_data_auth_methods import (
466
  DataIntegrationsListResponseDataAuthMethods as DataIntegrationsListResponseDataAuthMethods,
467
  )
 
474
  from .data_integrations_list_response_data_ownership import (
475
  DataIntegrationsListResponseDataOwnership as DataIntegrationsListResponseDataOwnership,
476
  )
477
+ from .data_integrations_upsert_api_key_request_connection_owner import (
478
+ DataIntegrationsUpsertApiKeyRequestConnectionOwner as DataIntegrationsUpsertApiKeyRequestConnectionOwner,
479
+ )
480
+ from .data_integrations_upsert_client_credentials_request_connection_owner import (
481
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner as DataIntegrationsUpsertClientCredentialsRequestConnectionOwner,
482
+ )
483
+ from .data_integrations_vend_credentials_request_connection_owner import (
484
+ DataIntegrationsVendCredentialsRequestConnectionOwner as DataIntegrationsVendCredentialsRequestConnectionOwner,
485
+ )
486
  from .directory_group import DirectoryGroup as DirectoryGroup
487
  from .directory_state import DirectoryState as DirectoryState
488
  from .directory_type import DirectoryType as DirectoryType
489
  from .directory_user import DirectoryUser as DirectoryUser
490
  from .directory_user_email import DirectoryUserEmail as DirectoryUserEmail
 
491
  from .directory_user_with_groups_state import (
492
  DirectoryUserWithGroupsState as DirectoryUserWithGroupsState,
493
  )
 
496
  from .dsync_activated_data_domain import (
497
  DsyncActivatedDataDomain as DsyncActivatedDataDomain,
498
  )
 
 
499
  from .dsync_deleted import DsyncDeleted as DsyncDeleted
500
  from .dsync_deleted_data import DsyncDeletedData as DsyncDeletedData
 
 
501
  from .dsync_group_created import DsyncGroupCreated as DsyncGroupCreated
502
  from .dsync_group_deleted import DsyncGroupDeleted as DsyncGroupDeleted
503
  from .dsync_group_updated import DsyncGroupUpdated as DsyncGroupUpdated
 
521
  from .dsync_user_updated_data_email import (
522
  DsyncUserUpdatedDataEmail as DsyncUserUpdatedDataEmail,
523
  )
 
524
  from .email_verification_created import (
525
  EmailVerificationCreated as EmailVerificationCreated,
526
  )
 
530
  from .error_response import ErrorResponse as ErrorResponse
531
  from .event_context import EventContext as EventContext
532
  from .event_context_actor import EventContextActor as EventContextActor
 
533
  from .event_context_google_analytics_session import (
534
  EventContextGoogleAnalyticsSession as EventContextGoogleAnalyticsSession,
535
  )
 
541
  from .flag_created_context_actor import (
542
  FlagCreatedContextActor as FlagCreatedContextActor,
543
  )
 
544
  from .flag_created_data import FlagCreatedData as FlagCreatedData
545
  from .flag_created_data_owner import FlagCreatedDataOwner as FlagCreatedDataOwner
546
  from .flag_deleted import FlagDeleted as FlagDeleted
 
548
  from .flag_deleted_context_actor import (
549
  FlagDeletedContextActor as FlagDeletedContextActor,
550
  )
 
551
  from .flag_deleted_data import FlagDeletedData as FlagDeletedData
552
  from .flag_deleted_data_owner import FlagDeletedDataOwner as FlagDeletedDataOwner
553
  from .flag_owner import FlagOwner as FlagOwner
554
  from .flag_rule_updated import FlagRuleUpdated as FlagRuleUpdated
555
  from .flag_rule_updated_context import FlagRuleUpdatedContext as FlagRuleUpdatedContext
 
556
  from .flag_rule_updated_context_actor import (
557
  FlagRuleUpdatedContextActor as FlagRuleUpdatedContextActor,
558
  )
 
559
  from .flag_rule_updated_context_configured_target import (
560
  FlagRuleUpdatedContextConfiguredTarget as FlagRuleUpdatedContextConfiguredTarget,
561
  )
 
571
  from .flag_rule_updated_context_previous_attribute_context import (
572
  FlagRuleUpdatedContextPreviousAttributeContext as FlagRuleUpdatedContextPreviousAttributeContext,
573
  )
 
574
  from .flag_rule_updated_context_previous_attribute_context_configured_target import (
575
  FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget as FlagRuleUpdatedContextPreviousAttributeContextConfiguredTarget,
576
  )
 
592
  from .flag_updated_context_actor import (
593
  FlagUpdatedContextActor as FlagUpdatedContextActor,
594
  )
 
595
  from .flag_updated_context_previous_attribute import (
596
  FlagUpdatedContextPreviousAttribute as FlagUpdatedContextPreviousAttribute,
597
  )
 
611
  from .group_updated import GroupUpdated as GroupUpdated
612
  from .invitation_accepted import InvitationAccepted as InvitationAccepted
613
  from .invitation_accepted_data import InvitationAcceptedData as InvitationAcceptedData
 
614
  from .invitation_created import InvitationCreated as InvitationCreated
615
  from .invitation_created_data import InvitationCreatedData as InvitationCreatedData
 
616
  from .invitation_resent import InvitationResent as InvitationResent
617
  from .invitation_resent_data import InvitationResentData as InvitationResentData
 
618
  from .invitation_revoked import InvitationRevoked as InvitationRevoked
619
  from .invitation_revoked_data import InvitationRevokedData as InvitationRevokedData
 
620
  from .invitation_state import InvitationState as InvitationState
621
  from .invite_it_contact_intents import InviteItContactIntents as InviteItContactIntents
622
  from .list_metadata import ListMetadata as ListMetadata
 
629
  from .organization_created_data_domain import (
630
  OrganizationCreatedDataDomain as OrganizationCreatedDataDomain,
631
  )
 
 
632
  from .organization_deleted import OrganizationDeleted as OrganizationDeleted
633
  from .organization_deleted_data import (
634
  OrganizationDeletedData as OrganizationDeletedData,
 
636
  from .organization_deleted_data_domain import (
637
  OrganizationDeletedDataDomain as OrganizationDeletedDataDomain,
638
  )
 
 
639
  from .organization_domain import OrganizationDomain as OrganizationDomain
640
  from .organization_domain_created import (
641
  OrganizationDomainCreated as OrganizationDomainCreated,
 
643
  from .organization_domain_created_data import (
644
  OrganizationDomainCreatedData as OrganizationDomainCreatedData,
645
  )
 
 
646
  from .organization_domain_data_state import (
647
  OrganizationDomainDataState as OrganizationDomainDataState,
648
  )
 
652
  from .organization_domain_deleted_data import (
653
  OrganizationDomainDeletedData as OrganizationDomainDeletedData,
654
  )
 
 
655
  from .organization_domain_state import (
656
  OrganizationDomainState as OrganizationDomainState,
657
  )
 
661
  from .organization_domain_updated_data import (
662
  OrganizationDomainUpdatedData as OrganizationDomainUpdatedData,
663
  )
 
 
664
  from .organization_domain_verification_failed import (
665
  OrganizationDomainVerificationFailed as OrganizationDomainVerificationFailed,
666
  )
 
670
  from .organization_domain_verification_failed_data_organization_domain import (
671
  OrganizationDomainVerificationFailedDataOrganizationDomain as OrganizationDomainVerificationFailedDataOrganizationDomain,
672
  )
 
 
 
673
  from .organization_domain_verification_strategy import (
674
  OrganizationDomainVerificationStrategy as OrganizationDomainVerificationStrategy,
675
  )
 
679
  from .organization_domain_verified_data import (
680
  OrganizationDomainVerifiedData as OrganizationDomainVerifiedData,
681
  )
 
 
682
  from .organization_membership_created import (
683
  OrganizationMembershipCreated as OrganizationMembershipCreated,
684
  )
685
  from .organization_membership_created_data import (
686
  OrganizationMembershipCreatedData as OrganizationMembershipCreatedData,
687
  )
 
688
  from .organization_membership_deleted import (
689
  OrganizationMembershipDeleted as OrganizationMembershipDeleted,
690
  )
691
  from .organization_membership_deleted_data import (
692
  OrganizationMembershipDeletedData as OrganizationMembershipDeletedData,
693
  )
 
694
  from .organization_membership_status import (
695
  OrganizationMembershipStatus as OrganizationMembershipStatus,
696
  )
 
700
  from .organization_membership_updated_data import (
701
  OrganizationMembershipUpdatedData as OrganizationMembershipUpdatedData,
702
  )
 
703
  from .organization_role_created import (
704
  OrganizationRoleCreated as OrganizationRoleCreated,
705
  )
 
725
  from .organization_updated_data_domain import (
726
  OrganizationUpdatedDataDomain as OrganizationUpdatedDataDomain,
727
  )
 
 
728
  from .pagination_order import PaginationOrder as PaginationOrder
729
  from .password_reset_created import PasswordResetCreated as PasswordResetCreated
730
  from .password_reset_created_data import (
 
747
  from .permission_updated import PermissionUpdated as PermissionUpdated
748
  from .permission_updated_data import PermissionUpdatedData as PermissionUpdatedData
749
  from .pipe_connected_account import PipeConnectedAccount as PipeConnectedAccount
 
750
  from .pipes_connected_account_connected import (
751
  PipesConnectedAccountConnected as PipesConnectedAccountConnected,
752
  )
 
791
  from .resource_export_completed_data import (
792
  ResourceExportCompletedData as ResourceExportCompletedData,
793
  )
 
794
  from .resource_export_created import ResourceExportCreated as ResourceExportCreated
795
  from .resource_export_created_data import (
796
  ResourceExportCreatedData as ResourceExportCreatedData,
797
  )
 
798
  from .resource_export_downloaded import (
799
  ResourceExportDownloaded as ResourceExportDownloaded,
800
  )
801
  from .resource_export_downloaded_data import (
802
  ResourceExportDownloadedData as ResourceExportDownloadedData,
803
  )
 
804
  from .resource_export_failed import ResourceExportFailed as ResourceExportFailed
805
  from .resource_export_failed_data import (
806
  ResourceExportFailedData as ResourceExportFailedData,
807
  )
 
808
  from .role_created import RoleCreated as RoleCreated
809
  from .role_created_data import RoleCreatedData as RoleCreatedData
810
  from .role_deleted import RoleDeleted as RoleDeleted
 
814
  from .role_updated_data import RoleUpdatedData as RoleUpdatedData
815
  from .session_created import SessionCreated as SessionCreated
816
  from .session_created_data import SessionCreatedData as SessionCreatedData
 
817
  from .session_created_data_impersonator import (
818
  SessionCreatedDataImpersonator as SessionCreatedDataImpersonator,
819
  )
 
820
  from .session_revoked import SessionRevoked as SessionRevoked
821
  from .session_revoked_data import SessionRevokedData as SessionRevokedData
 
822
  from .session_revoked_data_impersonator import (
823
  SessionRevokedDataImpersonator as SessionRevokedDataImpersonator,
824
  )
 
825
  from .slim_role import SlimRole as SlimRole
826
  from .team_production_state import TeamProductionState as TeamProductionState
827
  from .token_query_grant_type import TokenQueryGrantType as TokenQueryGrantType
 
882
  from .vault_byok_key_deleted_data import (
883
  VaultByokKeyDeletedData as VaultByokKeyDeletedData,
884
  )
 
885
  from .vault_byok_key_verification_completed import (
886
  VaultByokKeyVerificationCompleted as VaultByokKeyVerificationCompleted,
887
  )
 
890
  )
891
  from .vault_data_created import VaultDataCreated as VaultDataCreated
892
  from .vault_data_created_data import VaultDataCreatedData as VaultDataCreatedData
 
893
  from .vault_data_deleted import VaultDataDeleted as VaultDataDeleted
894
  from .vault_data_deleted_data import VaultDataDeletedData as VaultDataDeletedData
 
895
  from .vault_data_read import VaultDataRead as VaultDataRead
896
  from .vault_data_read_data import VaultDataReadData as VaultDataReadData
 
897
  from .vault_data_updated import VaultDataUpdated as VaultDataUpdated
898
  from .vault_data_updated_data import VaultDataUpdatedData as VaultDataUpdatedData
 
899
  from .vault_dek_decrypted import VaultDekDecrypted as VaultDekDecrypted
900
  from .vault_dek_decrypted_data import VaultDekDecryptedData as VaultDekDecryptedData
 
901
  from .vault_dek_read import VaultDekRead as VaultDekRead
902
  from .vault_dek_read_data import VaultDekReadData as VaultDekReadData
 
903
  from .vault_kek_created import VaultKekCreated as VaultKekCreated
904
  from .vault_kek_created_data import VaultKekCreatedData as VaultKekCreatedData
 
905
  from .vault_kek_deleted import VaultKekDeleted as VaultKekDeleted
906
  from .vault_kek_deleted_data import VaultKekDeletedData as VaultKekDeletedData
 
907
  from .vault_metadata_read import VaultMetadataRead as VaultMetadataRead
908
  from .vault_metadata_read_data import VaultMetadataReadData as VaultMetadataReadData
 
909
  from .vault_names_listed import VaultNamesListed as VaultNamesListed
910
  from .vault_names_listed_data import VaultNamesListedData as VaultNamesListedData
 
911
  from .waitlist_entry_state import WaitlistEntryState as WaitlistEntryState
912
  from .waitlist_user import WaitlistUser as WaitlistUser
913
  from .waitlist_user_approved import WaitlistUserApproved as WaitlistUserApproved
914
  from .waitlist_user_created import WaitlistUserCreated as WaitlistUserCreated
915
  from .waitlist_user_denied import WaitlistUserDenied as WaitlistUserDenied
 
916
  from .webhook_endpoint_status import WebhookEndpointStatus as WebhookEndpointStatus
917
  from .widget_session_token_scopes import (
918
  WidgetSessionTokenScopes as WidgetSessionTokenScopes,
python/src/workos/common/models/account_selection_required_error.py
python/src/workos/common/models/account_selection_required_error.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
7
+
8
+ from workos._types import _raise_deserialize_error
9
+
10
+
11
+ @dataclass(slots=True)
12
+ class AccountSelectionRequiredError:
13
+ """Account Selection Required Error model."""
14
+
15
+ code: Literal["account_selection_required"]
16
+ """Indicates that several connected accounts match and the request must name one."""
17
+ message: str
18
+ """A human-readable explanation of the ambiguity."""
19
+
20
+ @classmethod
21
+ def from_dict(cls, data: dict[str, Any]) -> AccountSelectionRequiredError:
22
+ """Deserialize from a dictionary."""
23
+ try:
24
+ return cls(
25
+ code=data.get("code", "account_selection_required"),
26
+ message=data["message"],
27
+ )
28
+ except (KeyError, ValueError) as e:
29
+ _raise_deserialize_error("AccountSelectionRequiredError", e)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ """Serialize to a dictionary."""
33
+ result: dict[str, Any] = {}
34
+ result["code"] = self.code
35
+ result["message"] = self.message
36
+ return result
python/src/workos/common/models/create_data_integration_ownership.py
python/src/workos/common/models/create_data_integration_ownership.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ """Enumeration of create data integration ownership values."""
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Literal, TypeAlias
9
+
10
+
11
+ class CreateDataIntegrationOwnership(str, Enum):
12
+ """Known values for CreateDataIntegrationOwnership."""
13
+
14
+ USER = "user"
15
+ ORGANIZATION = "organization"
16
+
17
+ @classmethod
18
+ def _missing_(cls, value: object) -> CreateDataIntegrationOwnership | None:
19
+ if not isinstance(value, str):
20
+ return None
21
+ unknown = str.__new__(cls, value)
22
+ unknown._name_ = value.upper()
23
+ unknown._value_ = value
24
+ return unknown
25
+
26
+
27
+ CreateDataIntegrationOwnershipLiteral: TypeAlias = Literal["user", "organization"]
python/src/workos/common/models/data_integration_ownership.py
python/src/workos/common/models/data_integration_ownership.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TypeAlias
4
+
5
+ from .create_data_integration_ownership import CreateDataIntegrationOwnership
6
+
7
+ DataIntegrationOwnership: TypeAlias = CreateDataIntegrationOwnership
8
+ __all__ = ["DataIntegrationOwnership"]
python/src/workos/common/models/data_integrations_get_user_token_request_connection_owner.py
python/src/workos/common/models/data_integrations_get_user_token_request_connection_owner.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TypeAlias
4
+
5
+ from .create_data_integration_ownership import CreateDataIntegrationOwnership
6
+
7
+ DataIntegrationsGetUserTokenRequestConnectionOwner: TypeAlias = (
8
+ CreateDataIntegrationOwnership
9
+ )
10
+ __all__ = ["DataIntegrationsGetUserTokenRequestConnectionOwner"]
python/src/workos/common/models/data_integrations_upsert_api_key_request_connection_owner.py
python/src/workos/common/models/data_integrations_upsert_api_key_request_connection_owner.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TypeAlias
4
+
5
+ from .create_data_integration_ownership import CreateDataIntegrationOwnership
6
+
7
+ DataIntegrationsUpsertApiKeyRequestConnectionOwner: TypeAlias = (
8
+ CreateDataIntegrationOwnership
9
+ )
10
+ __all__ = ["DataIntegrationsUpsertApiKeyRequestConnectionOwner"]
python/src/workos/common/models/data_integrations_upsert_client_credentials_request_connection_owner.py
python/src/workos/common/models/data_integrations_upsert_client_credentials_request_connection_owner.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TypeAlias
4
+
5
+ from .create_data_integration_ownership import CreateDataIntegrationOwnership
6
+
7
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner: TypeAlias = (
8
+ CreateDataIntegrationOwnership
9
+ )
10
+ __all__ = ["DataIntegrationsUpsertClientCredentialsRequestConnectionOwner"]
python/src/workos/common/models/data_integrations_vend_credentials_request_connection_owner.py
python/src/workos/common/models/data_integrations_vend_credentials_request_connection_owner.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TypeAlias
4
+
5
+ from .create_data_integration_ownership import CreateDataIntegrationOwnership
6
+
7
+ DataIntegrationsVendCredentialsRequestConnectionOwner: TypeAlias = (
8
+ CreateDataIntegrationOwnership
9
+ )
10
+ __all__ = ["DataIntegrationsVendCredentialsRequestConnectionOwner"]
python/src/workos/common/models/resource_export_completed_data_resource_type.py
python/src/workos/common/models/resource_export_completed_data_resource_type.py CHANGED
@@ -16,6 +16,7 @@ class ResourceExportCompletedDataResourceType(str, Enum):
16
  EVENTS = "events"
17
  SESSIONS = "sessions"
18
  AUDIT_LOG_EVENTS = "auditLogEvents"
 
19
 
20
  @classmethod
21
  def _missing_(cls, value: object) -> ResourceExportCompletedDataResourceType | None:
@@ -28,5 +29,5 @@ class ResourceExportCompletedDataResourceType(str, Enum):
28
 
29
 
30
  ResourceExportCompletedDataResourceTypeLiteral: TypeAlias = Literal[
31
- "users", "organizations", "events", "sessions", "auditLogEvents"
32
  ]
 
16
  EVENTS = "events"
17
  SESSIONS = "sessions"
18
  AUDIT_LOG_EVENTS = "auditLogEvents"
19
+ CONNECTIONS = "connections"
20
 
21
  @classmethod
22
  def _missing_(cls, value: object) -> ResourceExportCompletedDataResourceType | None:
 
29
 
30
 
31
  ResourceExportCompletedDataResourceTypeLiteral: TypeAlias = Literal[
32
+ "users", "organizations", "events", "sessions", "auditLogEvents", "connections"
33
  ]
python/src/workos/organizations/models/audit_logs_retention.py
python/src/workos/organizations/models/audit_logs_retention.py CHANGED
@@ -13,7 +13,7 @@ class AuditLogsRetention:
13
  """Audit Logs Retention model."""
14
 
15
  retention_period_in_days: int | None
16
- """The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365."""
17
 
18
  @classmethod
19
  def from_dict(cls, data: dict[str, Any]) -> AuditLogsRetention:
 
13
  """Audit Logs Retention model."""
14
 
15
  retention_period_in_days: int | None
16
+ """The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 through 330 in 30-day increments and 365 through 3650 in 365-day increments."""
17
 
18
  @classmethod
19
  def from_dict(cls, data: dict[str, Any]) -> AuditLogsRetention:
python/src/workos/pipes/_resource.py
python/src/workos/pipes/_resource.py CHANGED
@@ -14,6 +14,21 @@ from workos.common.models.connected_account_input_state import (
14
  from workos.common.models.create_data_integration_auth_methods import (
15
  CreateDataIntegrationAuthMethods,
16
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  from workos.common.models.pagination_order import PaginationOrder
18
 
19
  from .._pagination import AsyncPage, SyncPage
@@ -27,6 +42,7 @@ from .models import (
27
  DataIntegrationCredentialsInput,
28
  DataIntegrationCredentialsResponse,
29
  DataIntegrationsListResponse,
 
30
  UpdateCustomProviderDefinition,
31
  )
32
 
@@ -44,17 +60,19 @@ class Pipes:
44
  before: str | None = None,
45
  after: str | None = None,
46
  order: PaginationOrder | str | None = "desc",
 
47
  request_options: RequestOptions | None = None,
48
  ) -> SyncPage[DataIntegration]:
49
  """List data integrations
50
 
51
- Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
52
 
53
  Args:
54
  limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
55
  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"`.
56
  after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
57
  order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`.
 
58
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
59
 
60
  Returns:
@@ -62,6 +80,8 @@ class Pipes:
62
 
63
  Raises:
64
  AuthenticationError: If the API key is invalid (401).
 
 
65
  RateLimitExceededError: If rate limited (429).
66
  ServerError: If the server returns a 5xx error.
67
  """
@@ -72,6 +92,7 @@ class Pipes:
72
  "before": before,
73
  "after": after,
74
  "order": enum_value(order) if order is not None else None,
 
75
  }.items()
76
  if v is not None
77
  }
@@ -87,6 +108,7 @@ class Pipes:
87
  self,
88
  *,
89
  provider: str,
 
90
  description: str | None | NotGiven = NOT_GIVEN,
91
  enabled: bool | None = None,
92
  scopes: list[str] | None | NotGiven = NOT_GIVEN,
@@ -99,10 +121,11 @@ class Pipes:
99
  ) -> DataIntegration:
100
  """Create a data integration
101
 
102
- Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
103
 
104
  Args:
105
  provider: The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
 
106
  description: An optional description of the Data Integration.
107
  enabled: Whether the Data Integration is enabled. Defaults to `false`.
108
  scopes: The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
@@ -130,6 +153,7 @@ class Pipes:
130
  k: v
131
  for k, v in {
132
  "provider": provider,
 
133
  "enabled": enabled,
134
  "auth_methods": auth_methods,
135
  "config": config,
@@ -163,7 +187,7 @@ class Pipes:
163
  ) -> DataIntegration:
164
  """Get a data integration
165
 
166
- Retrieves a data integration by its slug.
167
 
168
  Args:
169
  slug: The slug identifier of the data integration.
@@ -199,7 +223,7 @@ class Pipes:
199
  ) -> DataIntegration:
200
  """Update a data integration
201
 
202
- Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
203
 
204
  Args:
205
  slug: The slug identifier of the data integration.
@@ -258,7 +282,7 @@ class Pipes:
258
  ) -> None:
259
  """Delete a data integration
260
 
261
- Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
262
 
263
  Args:
264
  slug: The slug identifier of the data integration.
@@ -283,16 +307,22 @@ class Pipes:
283
  user_id: str,
284
  secret: str,
285
  organization_id: str | None = None,
 
 
 
 
286
  request_options: RequestOptions | None = None,
287
  ) -> ConnectedAccount:
288
  """Upsert an API key for a connected account
289
 
290
- Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
291
 
292
  Args:
293
  slug: The identifier of the integration.
294
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
295
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
296
  secret: The API key secret to store for this integration.
297
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
298
 
@@ -314,6 +344,10 @@ class Pipes:
314
  for k, v in {
315
  "user_id": user_id,
316
  "organization_id": organization_id,
 
 
 
 
317
  "secret": secret,
318
  }.items()
319
  if v is not None
@@ -385,17 +419,23 @@ class Pipes:
385
  client_id: str,
386
  client_secret: str,
387
  organization_id: str | None = None,
 
 
 
 
388
  config: dict[str, str] | None = None,
389
  request_options: RequestOptions | None = None,
390
  ) -> ConnectedAccount:
391
  """Upsert client credentials for a connected account
392
 
393
- Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
394
 
395
  Args:
396
  slug: The identifier of the integration.
397
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
398
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
399
  client_id: The OAuth client ID to store for this integration.
400
  client_secret: The OAuth client secret to store for this integration.
401
  config: Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
@@ -419,6 +459,10 @@ class Pipes:
419
  for k, v in {
420
  "user_id": user_id,
421
  "organization_id": organization_id,
 
 
 
 
422
  "client_id": client_id,
423
  "client_secret": client_secret,
424
  "config": config,
@@ -440,6 +484,10 @@ class Pipes:
440
  user_id: str,
441
  organization_id: str | None = None,
442
  connected_account_id: str | None = None,
 
 
 
 
443
  request_options: RequestOptions | None = None,
444
  ) -> DataIntegrationCredentialsResponse:
445
  """Vend credentials for a connected account
@@ -448,9 +496,11 @@ class Pipes:
448
 
449
  Args:
450
  slug: The identifier of the integration.
451
- user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
452
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
453
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
454
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
455
 
456
  Returns:
@@ -459,6 +509,7 @@ class Pipes:
459
  Raises:
460
  BadRequestError: If the request is malformed (400).
461
  AuthenticationError: If the API key is invalid (401).
 
462
  NotFoundError: If the resource is not found (404).
463
  ConflictError: If a conflict occurs (409).
464
  UnprocessableEntityError: If the request data is unprocessable (422).
@@ -471,6 +522,10 @@ class Pipes:
471
  "user_id": user_id,
472
  "organization_id": organization_id,
473
  "connected_account_id": connected_account_id,
 
 
 
 
474
  }.items()
475
  if v is not None
476
  }
@@ -482,6 +537,127 @@ class Pipes:
482
  request_options=request_options,
483
  )
484
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  def get_access_token(
486
  self,
487
  provider: str,
@@ -489,6 +665,10 @@ class Pipes:
489
  user_id: str,
490
  organization_id: str | None | NotGiven = NOT_GIVEN,
491
  connected_account_id: str | None = None,
 
 
 
 
492
  request_options: RequestOptions | None = None,
493
  ) -> DataIntegrationAccessTokenResponse:
494
  """Get an access token for a connected account
@@ -497,9 +677,11 @@ class Pipes:
497
 
498
  Args:
499
  provider: The identifier of the integration.
500
- user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
501
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
502
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
503
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
504
 
505
  Returns:
@@ -508,6 +690,7 @@ class Pipes:
508
  Raises:
509
  BadRequestError: If the request is malformed (400).
510
  AuthenticationError: If the API key is invalid (401).
 
511
  NotFoundError: If the resource is not found (404).
512
  ConflictError: If a conflict occurs (409).
513
  UnprocessableEntityError: If the request data is unprocessable (422).
@@ -519,6 +702,10 @@ class Pipes:
519
  for k, v in {
520
  "user_id": user_id,
521
  "connected_account_id": connected_account_id,
 
 
 
 
522
  }.items()
523
  if v is not None
524
  }
@@ -538,6 +725,7 @@ class Pipes:
538
  slug: str,
539
  *,
540
  organization_id: str | None = None,
 
541
  connected_account_id: str | None = None,
542
  request_options: RequestOptions | None = None,
543
  ) -> ConnectedAccount:
@@ -549,6 +737,7 @@ class Pipes:
549
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
550
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
551
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
552
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
553
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
554
 
@@ -567,6 +756,7 @@ class Pipes:
567
  k: v
568
  for k, v in {
569
  "organization_id": organization_id,
 
570
  "connected_account_id": connected_account_id,
571
  }.items()
572
  if v is not None
@@ -668,6 +858,7 @@ class Pipes:
668
  scopes: list[str] | None = None,
669
  state: ConnectedAccountInputState | str | None = None,
670
  organization_id: str | None = None,
 
671
  connected_account_id: str | None = None,
672
  request_options: RequestOptions | None = None,
673
  ) -> ConnectedAccount:
@@ -684,6 +875,7 @@ class Pipes:
684
  scopes: The OAuth scopes granted for this connection.
685
  state: Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
686
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
687
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
688
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
689
 
@@ -713,6 +905,7 @@ class Pipes:
713
  k: v
714
  for k, v in {
715
  "organization_id": organization_id,
 
716
  "connected_account_id": connected_account_id,
717
  }.items()
718
  if v is not None
@@ -738,6 +931,7 @@ class Pipes:
738
  slug: str,
739
  *,
740
  organization_id: str | None = None,
 
741
  connected_account_id: str | None = None,
742
  request_options: RequestOptions | None = None,
743
  ) -> None:
@@ -749,6 +943,7 @@ class Pipes:
749
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
750
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
751
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
752
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
753
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
754
 
@@ -764,6 +959,7 @@ class Pipes:
764
  k: v
765
  for k, v in {
766
  "organization_id": organization_id,
 
767
  "connected_account_id": connected_account_id,
768
  }.items()
769
  if v is not None
@@ -786,6 +982,7 @@ class Pipes:
786
  user_id: str,
787
  *,
788
  organization_id: str | None = None,
 
789
  request_options: RequestOptions | None = None,
790
  ) -> DataIntegrationsListResponse:
791
  """List providers for a user
@@ -795,6 +992,7 @@ class Pipes:
795
  Args:
796
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
797
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
 
798
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
799
 
800
  Returns:
@@ -810,6 +1008,7 @@ class Pipes:
810
  k: v
811
  for k, v in {
812
  "organization_id": organization_id,
 
813
  }.items()
814
  if v is not None
815
  }
@@ -835,17 +1034,19 @@ class AsyncPipes:
835
  before: str | None = None,
836
  after: str | None = None,
837
  order: PaginationOrder | str | None = "desc",
 
838
  request_options: RequestOptions | None = None,
839
  ) -> AsyncPage[DataIntegration]:
840
  """List data integrations
841
 
842
- Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
843
 
844
  Args:
845
  limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
846
  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"`.
847
  after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
848
  order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`.
 
849
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
850
 
851
  Returns:
@@ -853,6 +1054,8 @@ class AsyncPipes:
853
 
854
  Raises:
855
  AuthenticationError: If the API key is invalid (401).
 
 
856
  RateLimitExceededError: If rate limited (429).
857
  ServerError: If the server returns a 5xx error.
858
  """
@@ -863,6 +1066,7 @@ class AsyncPipes:
863
  "before": before,
864
  "after": after,
865
  "order": enum_value(order) if order is not None else None,
 
866
  }.items()
867
  if v is not None
868
  }
@@ -878,6 +1082,7 @@ class AsyncPipes:
878
  self,
879
  *,
880
  provider: str,
 
881
  description: str | None | NotGiven = NOT_GIVEN,
882
  enabled: bool | None = None,
883
  scopes: list[str] | None | NotGiven = NOT_GIVEN,
@@ -890,10 +1095,11 @@ class AsyncPipes:
890
  ) -> DataIntegration:
891
  """Create a data integration
892
 
893
- Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
894
 
895
  Args:
896
  provider: The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
 
897
  description: An optional description of the Data Integration.
898
  enabled: Whether the Data Integration is enabled. Defaults to `false`.
899
  scopes: The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
@@ -921,6 +1127,7 @@ class AsyncPipes:
921
  k: v
922
  for k, v in {
923
  "provider": provider,
 
924
  "enabled": enabled,
925
  "auth_methods": auth_methods,
926
  "config": config,
@@ -954,7 +1161,7 @@ class AsyncPipes:
954
  ) -> DataIntegration:
955
  """Get a data integration
956
 
957
- Retrieves a data integration by its slug.
958
 
959
  Args:
960
  slug: The slug identifier of the data integration.
@@ -990,7 +1197,7 @@ class AsyncPipes:
990
  ) -> DataIntegration:
991
  """Update a data integration
992
 
993
- Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
994
 
995
  Args:
996
  slug: The slug identifier of the data integration.
@@ -1049,7 +1256,7 @@ class AsyncPipes:
1049
  ) -> None:
1050
  """Delete a data integration
1051
 
1052
- Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
1053
 
1054
  Args:
1055
  slug: The slug identifier of the data integration.
@@ -1074,16 +1281,22 @@ class AsyncPipes:
1074
  user_id: str,
1075
  secret: str,
1076
  organization_id: str | None = None,
 
 
 
 
1077
  request_options: RequestOptions | None = None,
1078
  ) -> ConnectedAccount:
1079
  """Upsert an API key for a connected account
1080
 
1081
- Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
1082
 
1083
  Args:
1084
  slug: The identifier of the integration.
1085
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1086
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
1087
  secret: The API key secret to store for this integration.
1088
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1089
 
@@ -1105,6 +1318,10 @@ class AsyncPipes:
1105
  for k, v in {
1106
  "user_id": user_id,
1107
  "organization_id": organization_id,
 
 
 
 
1108
  "secret": secret,
1109
  }.items()
1110
  if v is not None
@@ -1176,17 +1393,23 @@ class AsyncPipes:
1176
  client_id: str,
1177
  client_secret: str,
1178
  organization_id: str | None = None,
 
 
 
 
1179
  config: dict[str, str] | None = None,
1180
  request_options: RequestOptions | None = None,
1181
  ) -> ConnectedAccount:
1182
  """Upsert client credentials for a connected account
1183
 
1184
- Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
1185
 
1186
  Args:
1187
  slug: The identifier of the integration.
1188
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1189
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
1190
  client_id: The OAuth client ID to store for this integration.
1191
  client_secret: The OAuth client secret to store for this integration.
1192
  config: Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
@@ -1210,6 +1433,10 @@ class AsyncPipes:
1210
  for k, v in {
1211
  "user_id": user_id,
1212
  "organization_id": organization_id,
 
 
 
 
1213
  "client_id": client_id,
1214
  "client_secret": client_secret,
1215
  "config": config,
@@ -1231,6 +1458,10 @@ class AsyncPipes:
1231
  user_id: str,
1232
  organization_id: str | None = None,
1233
  connected_account_id: str | None = None,
 
 
 
 
1234
  request_options: RequestOptions | None = None,
1235
  ) -> DataIntegrationCredentialsResponse:
1236
  """Vend credentials for a connected account
@@ -1239,9 +1470,11 @@ class AsyncPipes:
1239
 
1240
  Args:
1241
  slug: The identifier of the integration.
1242
- user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1243
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
1244
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
1245
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1246
 
1247
  Returns:
@@ -1250,6 +1483,7 @@ class AsyncPipes:
1250
  Raises:
1251
  BadRequestError: If the request is malformed (400).
1252
  AuthenticationError: If the API key is invalid (401).
 
1253
  NotFoundError: If the resource is not found (404).
1254
  ConflictError: If a conflict occurs (409).
1255
  UnprocessableEntityError: If the request data is unprocessable (422).
@@ -1262,6 +1496,10 @@ class AsyncPipes:
1262
  "user_id": user_id,
1263
  "organization_id": organization_id,
1264
  "connected_account_id": connected_account_id,
 
 
 
 
1265
  }.items()
1266
  if v is not None
1267
  }
@@ -1273,6 +1511,127 @@ class AsyncPipes:
1273
  request_options=request_options,
1274
  )
1275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1276
  async def get_access_token(
1277
  self,
1278
  provider: str,
@@ -1280,6 +1639,10 @@ class AsyncPipes:
1280
  user_id: str,
1281
  organization_id: str | None | NotGiven = NOT_GIVEN,
1282
  connected_account_id: str | None = None,
 
 
 
 
1283
  request_options: RequestOptions | None = None,
1284
  ) -> DataIntegrationAccessTokenResponse:
1285
  """Get an access token for a connected account
@@ -1288,9 +1651,11 @@ class AsyncPipes:
1288
 
1289
  Args:
1290
  provider: The identifier of the integration.
1291
- user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1292
- organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
1293
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
1294
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1295
 
1296
  Returns:
@@ -1299,6 +1664,7 @@ class AsyncPipes:
1299
  Raises:
1300
  BadRequestError: If the request is malformed (400).
1301
  AuthenticationError: If the API key is invalid (401).
 
1302
  NotFoundError: If the resource is not found (404).
1303
  ConflictError: If a conflict occurs (409).
1304
  UnprocessableEntityError: If the request data is unprocessable (422).
@@ -1310,6 +1676,10 @@ class AsyncPipes:
1310
  for k, v in {
1311
  "user_id": user_id,
1312
  "connected_account_id": connected_account_id,
 
 
 
 
1313
  }.items()
1314
  if v is not None
1315
  }
@@ -1329,6 +1699,7 @@ class AsyncPipes:
1329
  slug: str,
1330
  *,
1331
  organization_id: str | None = None,
 
1332
  connected_account_id: str | None = None,
1333
  request_options: RequestOptions | None = None,
1334
  ) -> ConnectedAccount:
@@ -1340,6 +1711,7 @@ class AsyncPipes:
1340
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1341
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
1342
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
1343
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
1344
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1345
 
@@ -1358,6 +1730,7 @@ class AsyncPipes:
1358
  k: v
1359
  for k, v in {
1360
  "organization_id": organization_id,
 
1361
  "connected_account_id": connected_account_id,
1362
  }.items()
1363
  if v is not None
@@ -1459,6 +1832,7 @@ class AsyncPipes:
1459
  scopes: list[str] | None = None,
1460
  state: ConnectedAccountInputState | str | None = None,
1461
  organization_id: str | None = None,
 
1462
  connected_account_id: str | None = None,
1463
  request_options: RequestOptions | None = None,
1464
  ) -> ConnectedAccount:
@@ -1475,6 +1849,7 @@ class AsyncPipes:
1475
  scopes: The OAuth scopes granted for this connection.
1476
  state: Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
1477
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
1478
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
1479
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1480
 
@@ -1504,6 +1879,7 @@ class AsyncPipes:
1504
  k: v
1505
  for k, v in {
1506
  "organization_id": organization_id,
 
1507
  "connected_account_id": connected_account_id,
1508
  }.items()
1509
  if v is not None
@@ -1529,6 +1905,7 @@ class AsyncPipes:
1529
  slug: str,
1530
  *,
1531
  organization_id: str | None = None,
 
1532
  connected_account_id: str | None = None,
1533
  request_options: RequestOptions | None = None,
1534
  ) -> None:
@@ -1540,6 +1917,7 @@ class AsyncPipes:
1540
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1541
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
1542
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
1543
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
1544
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1545
 
@@ -1555,6 +1933,7 @@ class AsyncPipes:
1555
  k: v
1556
  for k, v in {
1557
  "organization_id": organization_id,
 
1558
  "connected_account_id": connected_account_id,
1559
  }.items()
1560
  if v is not None
@@ -1577,6 +1956,7 @@ class AsyncPipes:
1577
  user_id: str,
1578
  *,
1579
  organization_id: str | None = None,
 
1580
  request_options: RequestOptions | None = None,
1581
  ) -> DataIntegrationsListResponse:
1582
  """List providers for a user
@@ -1586,6 +1966,7 @@ class AsyncPipes:
1586
  Args:
1587
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
1588
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
 
1589
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1590
 
1591
  Returns:
@@ -1601,6 +1982,7 @@ class AsyncPipes:
1601
  k: v
1602
  for k, v in {
1603
  "organization_id": organization_id,
 
1604
  }.items()
1605
  if v is not None
1606
  }
 
14
  from workos.common.models.create_data_integration_auth_methods import (
15
  CreateDataIntegrationAuthMethods,
16
  )
17
+ from workos.common.models.create_data_integration_ownership import (
18
+ CreateDataIntegrationOwnership,
19
+ )
20
+ from workos.common.models.data_integrations_get_user_token_request_connection_owner import (
21
+ DataIntegrationsGetUserTokenRequestConnectionOwner,
22
+ )
23
+ from workos.common.models.data_integrations_upsert_api_key_request_connection_owner import (
24
+ DataIntegrationsUpsertApiKeyRequestConnectionOwner,
25
+ )
26
+ from workos.common.models.data_integrations_upsert_client_credentials_request_connection_owner import (
27
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner,
28
+ )
29
+ from workos.common.models.data_integrations_vend_credentials_request_connection_owner import (
30
+ DataIntegrationsVendCredentialsRequestConnectionOwner,
31
+ )
32
  from workos.common.models.pagination_order import PaginationOrder
33
 
34
  from .._pagination import AsyncPage, SyncPage
 
42
  DataIntegrationCredentialsInput,
43
  DataIntegrationCredentialsResponse,
44
  DataIntegrationsListResponse,
45
+ PipesOwnership,
46
  UpdateCustomProviderDefinition,
47
  )
48
 
 
60
  before: str | None = None,
61
  after: str | None = None,
62
  order: PaginationOrder | str | None = "desc",
63
+ ownership: PipesOwnership | str | None = None,
64
  request_options: RequestOptions | None = None,
65
  ) -> SyncPage[DataIntegration]:
66
  """List data integrations
67
 
68
+ Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
69
 
70
  Args:
71
  limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
72
  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"`.
73
  after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
74
  order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`.
75
+ ownership: Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
76
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
77
 
78
  Returns:
 
80
 
81
  Raises:
82
  AuthenticationError: If the API key is invalid (401).
83
+ NotFoundError: If the resource is not found (404).
84
+ UnprocessableEntityError: If the request data is unprocessable (422).
85
  RateLimitExceededError: If rate limited (429).
86
  ServerError: If the server returns a 5xx error.
87
  """
 
92
  "before": before,
93
  "after": after,
94
  "order": enum_value(order) if order is not None else None,
95
+ "ownership": enum_value(ownership) if ownership is not None else None,
96
  }.items()
97
  if v is not None
98
  }
 
108
  self,
109
  *,
110
  provider: str,
111
+ ownership: CreateDataIntegrationOwnership | str | None = None,
112
  description: str | None | NotGiven = NOT_GIVEN,
113
  enabled: bool | None = None,
114
  scopes: list[str] | None | NotGiven = NOT_GIVEN,
 
121
  ) -> DataIntegration:
122
  """Create a data integration
123
 
124
+ Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
125
 
126
  Args:
127
  provider: The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
128
+ ownership: Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
129
  description: An optional description of the Data Integration.
130
  enabled: Whether the Data Integration is enabled. Defaults to `false`.
131
  scopes: The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
 
153
  k: v
154
  for k, v in {
155
  "provider": provider,
156
+ "ownership": enum_value(ownership) if ownership is not None else None,
157
  "enabled": enabled,
158
  "auth_methods": auth_methods,
159
  "config": config,
 
187
  ) -> DataIntegration:
188
  """Get a data integration
189
 
190
+ Retrieves the user-owned data integration by its slug.
191
 
192
  Args:
193
  slug: The slug identifier of the data integration.
 
223
  ) -> DataIntegration:
224
  """Update a data integration
225
 
226
+ Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
227
 
228
  Args:
229
  slug: The slug identifier of the data integration.
 
282
  ) -> None:
283
  """Delete a data integration
284
 
285
+ Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
286
 
287
  Args:
288
  slug: The slug identifier of the data integration.
 
307
  user_id: str,
308
  secret: str,
309
  organization_id: str | None = None,
310
+ connected_account_id: str | None = None,
311
+ connection_owner: DataIntegrationsUpsertApiKeyRequestConnectionOwner
312
+ | str
313
+ | None = None,
314
  request_options: RequestOptions | None = None,
315
  ) -> ConnectedAccount:
316
  """Upsert an API key for a connected account
317
 
318
+ Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
319
 
320
  Args:
321
  slug: The identifier of the integration.
322
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
323
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
324
+ connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
325
+ connection_owner: Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
326
  secret: The API key secret to store for this integration.
327
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
328
 
 
344
  for k, v in {
345
  "user_id": user_id,
346
  "organization_id": organization_id,
347
+ "connected_account_id": connected_account_id,
348
+ "connection_owner": enum_value(connection_owner)
349
+ if connection_owner is not None
350
+ else None,
351
  "secret": secret,
352
  }.items()
353
  if v is not None
 
419
  client_id: str,
420
  client_secret: str,
421
  organization_id: str | None = None,
422
+ connected_account_id: str | None = None,
423
+ connection_owner: DataIntegrationsUpsertClientCredentialsRequestConnectionOwner
424
+ | str
425
+ | None = None,
426
  config: dict[str, str] | None = None,
427
  request_options: RequestOptions | None = None,
428
  ) -> ConnectedAccount:
429
  """Upsert client credentials for a connected account
430
 
431
+ Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
432
 
433
  Args:
434
  slug: The identifier of the integration.
435
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
436
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
437
+ connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
438
+ connection_owner: Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
439
  client_id: The OAuth client ID to store for this integration.
440
  client_secret: The OAuth client secret to store for this integration.
441
  config: Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
 
459
  for k, v in {
460
  "user_id": user_id,
461
  "organization_id": organization_id,
462
+ "connected_account_id": connected_account_id,
463
+ "connection_owner": enum_value(connection_owner)
464
+ if connection_owner is not None
465
+ else None,
466
  "client_id": client_id,
467
  "client_secret": client_secret,
468
  "config": config,
 
484
  user_id: str,
485
  organization_id: str | None = None,
486
  connected_account_id: str | None = None,
487
+ connection_owner: DataIntegrationsVendCredentialsRequestConnectionOwner
488
+ | str
489
+ | None = None,
490
+ supports_multiple_connections: bool | None = None,
491
  request_options: RequestOptions | None = None,
492
  ) -> DataIntegrationCredentialsResponse:
493
  """Vend credentials for a connected account
 
496
 
497
  Args:
498
  slug: The identifier of the integration.
499
+ user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
500
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
501
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
502
+ connection_owner: Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
503
+ supports_multiple_connections: Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
504
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
505
 
506
  Returns:
 
509
  Raises:
510
  BadRequestError: If the request is malformed (400).
511
  AuthenticationError: If the API key is invalid (401).
512
+ AuthorizationError: If the request is forbidden (403).
513
  NotFoundError: If the resource is not found (404).
514
  ConflictError: If a conflict occurs (409).
515
  UnprocessableEntityError: If the request data is unprocessable (422).
 
522
  "user_id": user_id,
523
  "organization_id": organization_id,
524
  "connected_account_id": connected_account_id,
525
+ "connection_owner": enum_value(connection_owner)
526
+ if connection_owner is not None
527
+ else None,
528
+ "supports_multiple_connections": supports_multiple_connections,
529
  }.items()
530
  if v is not None
531
  }
 
537
  request_options=request_options,
538
  )
539
 
540
+ def list_data_integration_organization(
541
+ self,
542
+ slug: str,
543
+ *,
544
+ request_options: RequestOptions | None = None,
545
+ ) -> DataIntegration:
546
+ """Get an organization-owned data integration
547
+
548
+ Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
549
+
550
+ Args:
551
+ slug: The slug identifier of the data integration.
552
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
553
+
554
+ Returns:
555
+ DataIntegration
556
+
557
+ Raises:
558
+ AuthenticationError: If the API key is invalid (401).
559
+ NotFoundError: If the resource is not found (404).
560
+ RateLimitExceededError: If rate limited (429).
561
+ ServerError: If the server returns a 5xx error.
562
+ """
563
+ return self._client.request(
564
+ method="get",
565
+ path=("data-integrations", str(slug), "organization"),
566
+ model=DataIntegration,
567
+ request_options=request_options,
568
+ )
569
+
570
+ def update_data_integration_organization(
571
+ self,
572
+ slug: str,
573
+ *,
574
+ description: str | None | NotGiven = NOT_GIVEN,
575
+ enabled: bool | None = None,
576
+ scopes: list[str] | None | NotGiven = NOT_GIVEN,
577
+ credentials: DataIntegrationCredentialsInput | None = None,
578
+ api_key: ApiKeyInstallation | None = None,
579
+ custom_provider: UpdateCustomProviderDefinition | None = None,
580
+ request_options: RequestOptions | None = None,
581
+ ) -> DataIntegration:
582
+ """Update an organization-owned data integration
583
+
584
+ Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
585
+
586
+ Args:
587
+ slug: The slug identifier of the data integration.
588
+ description: An optional description of the Data Integration.
589
+ enabled: Whether the Data Integration is enabled.
590
+ scopes: The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
591
+ credentials: New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
592
+ api_key: An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
593
+ custom_provider: Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
594
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
595
+
596
+ Returns:
597
+ DataIntegration
598
+
599
+ Raises:
600
+ BadRequestError: If the request is malformed (400).
601
+ AuthenticationError: If the API key is invalid (401).
602
+ AuthorizationError: If the request is forbidden (403).
603
+ NotFoundError: If the resource is not found (404).
604
+ ConflictError: If a conflict occurs (409).
605
+ UnprocessableEntityError: If the request data is unprocessable (422).
606
+ RateLimitExceededError: If rate limited (429).
607
+ ServerError: If the server returns a 5xx error.
608
+ """
609
+ body: dict[str, Any] = {
610
+ k: v
611
+ for k, v in {
612
+ "enabled": enabled,
613
+ "credentials": credentials.to_dict()
614
+ if credentials is not None
615
+ else None,
616
+ "api_key": api_key.to_dict() if api_key is not None else None,
617
+ "custom_provider": custom_provider.to_dict()
618
+ if custom_provider is not None
619
+ else None,
620
+ }.items()
621
+ if v is not None
622
+ }
623
+ if not isinstance(description, NotGiven):
624
+ body["description"] = description
625
+ if not isinstance(scopes, NotGiven):
626
+ body["scopes"] = scopes
627
+ return self._client.request(
628
+ method="put",
629
+ path=("data-integrations", str(slug), "organization"),
630
+ body=body,
631
+ model=DataIntegration,
632
+ request_options=request_options,
633
+ )
634
+
635
+ def delete_data_integration_organization(
636
+ self,
637
+ slug: str,
638
+ *,
639
+ request_options: RequestOptions | None = None,
640
+ ) -> None:
641
+ """Delete an organization-owned data integration
642
+
643
+ Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
644
+
645
+ Args:
646
+ slug: The slug identifier of the data integration.
647
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
648
+
649
+ Raises:
650
+ AuthenticationError: If the API key is invalid (401).
651
+ NotFoundError: If the resource is not found (404).
652
+ RateLimitExceededError: If rate limited (429).
653
+ ServerError: If the server returns a 5xx error.
654
+ """
655
+ self._client.request(
656
+ method="delete",
657
+ path=("data-integrations", str(slug), "organization"),
658
+ request_options=request_options,
659
+ )
660
+
661
  def get_access_token(
662
  self,
663
  provider: str,
 
665
  user_id: str,
666
  organization_id: str | None | NotGiven = NOT_GIVEN,
667
  connected_account_id: str | None = None,
668
+ connection_owner: DataIntegrationsGetUserTokenRequestConnectionOwner
669
+ | str
670
+ | None = None,
671
+ supports_multiple_connections: bool | None = None,
672
  request_options: RequestOptions | None = None,
673
  ) -> DataIntegrationAccessTokenResponse:
674
  """Get an access token for a connected account
 
677
 
678
  Args:
679
  provider: The identifier of the integration.
680
+ user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
681
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
682
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
683
+ connection_owner: Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
684
+ supports_multiple_connections: Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
685
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
686
 
687
  Returns:
 
690
  Raises:
691
  BadRequestError: If the request is malformed (400).
692
  AuthenticationError: If the API key is invalid (401).
693
+ AuthorizationError: If the request is forbidden (403).
694
  NotFoundError: If the resource is not found (404).
695
  ConflictError: If a conflict occurs (409).
696
  UnprocessableEntityError: If the request data is unprocessable (422).
 
702
  for k, v in {
703
  "user_id": user_id,
704
  "connected_account_id": connected_account_id,
705
+ "connection_owner": enum_value(connection_owner)
706
+ if connection_owner is not None
707
+ else None,
708
+ "supports_multiple_connections": supports_multiple_connections,
709
  }.items()
710
  if v is not None
711
  }
 
725
  slug: str,
726
  *,
727
  organization_id: str | None = None,
728
+ supports_multiple_connections: bool | None = None,
729
  connected_account_id: str | None = None,
730
  request_options: RequestOptions | None = None,
731
  ) -> ConnectedAccount:
 
737
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
738
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
739
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
740
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
741
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
742
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
743
 
 
756
  k: v
757
  for k, v in {
758
  "organization_id": organization_id,
759
+ "supports_multiple_connections": supports_multiple_connections,
760
  "connected_account_id": connected_account_id,
761
  }.items()
762
  if v is not None
 
858
  scopes: list[str] | None = None,
859
  state: ConnectedAccountInputState | str | None = None,
860
  organization_id: str | None = None,
861
+ supports_multiple_connections: bool | None = None,
862
  connected_account_id: str | None = None,
863
  request_options: RequestOptions | None = None,
864
  ) -> ConnectedAccount:
 
875
  scopes: The OAuth scopes granted for this connection.
876
  state: Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
877
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
878
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
879
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
880
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
881
 
 
905
  k: v
906
  for k, v in {
907
  "organization_id": organization_id,
908
+ "supports_multiple_connections": supports_multiple_connections,
909
  "connected_account_id": connected_account_id,
910
  }.items()
911
  if v is not None
 
931
  slug: str,
932
  *,
933
  organization_id: str | None = None,
934
+ supports_multiple_connections: bool | None = None,
935
  connected_account_id: str | None = None,
936
  request_options: RequestOptions | None = None,
937
  ) -> None:
 
943
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
944
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
945
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
946
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
947
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
948
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
949
 
 
959
  k: v
960
  for k, v in {
961
  "organization_id": organization_id,
962
+ "supports_multiple_connections": supports_multiple_connections,
963
  "connected_account_id": connected_account_id,
964
  }.items()
965
  if v is not None
 
982
  user_id: str,
983
  *,
984
  organization_id: str | None = None,
985
+ supports_multiple_connections: bool | None = None,
986
  request_options: RequestOptions | None = None,
987
  ) -> DataIntegrationsListResponse:
988
  """List providers for a user
 
992
  Args:
993
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
994
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
995
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
996
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
997
 
998
  Returns:
 
1008
  k: v
1009
  for k, v in {
1010
  "organization_id": organization_id,
1011
+ "supports_multiple_connections": supports_multiple_connections,
1012
  }.items()
1013
  if v is not None
1014
  }
 
1034
  before: str | None = None,
1035
  after: str | None = None,
1036
  order: PaginationOrder | str | None = "desc",
1037
+ ownership: PipesOwnership | str | None = None,
1038
  request_options: RequestOptions | None = None,
1039
  ) -> AsyncPage[DataIntegration]:
1040
  """List data integrations
1041
 
1042
+ Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
1043
 
1044
  Args:
1045
  limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
1046
  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"`.
1047
  after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
1048
  order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`.
1049
+ ownership: Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
1050
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1051
 
1052
  Returns:
 
1054
 
1055
  Raises:
1056
  AuthenticationError: If the API key is invalid (401).
1057
+ NotFoundError: If the resource is not found (404).
1058
+ UnprocessableEntityError: If the request data is unprocessable (422).
1059
  RateLimitExceededError: If rate limited (429).
1060
  ServerError: If the server returns a 5xx error.
1061
  """
 
1066
  "before": before,
1067
  "after": after,
1068
  "order": enum_value(order) if order is not None else None,
1069
+ "ownership": enum_value(ownership) if ownership is not None else None,
1070
  }.items()
1071
  if v is not None
1072
  }
 
1082
  self,
1083
  *,
1084
  provider: str,
1085
+ ownership: CreateDataIntegrationOwnership | str | None = None,
1086
  description: str | None | NotGiven = NOT_GIVEN,
1087
  enabled: bool | None = None,
1088
  scopes: list[str] | None | NotGiven = NOT_GIVEN,
 
1095
  ) -> DataIntegration:
1096
  """Create a data integration
1097
 
1098
+ Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
1099
 
1100
  Args:
1101
  provider: The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
1102
+ ownership: Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
1103
  description: An optional description of the Data Integration.
1104
  enabled: Whether the Data Integration is enabled. Defaults to `false`.
1105
  scopes: The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
 
1127
  k: v
1128
  for k, v in {
1129
  "provider": provider,
1130
+ "ownership": enum_value(ownership) if ownership is not None else None,
1131
  "enabled": enabled,
1132
  "auth_methods": auth_methods,
1133
  "config": config,
 
1161
  ) -> DataIntegration:
1162
  """Get a data integration
1163
 
1164
+ Retrieves the user-owned data integration by its slug.
1165
 
1166
  Args:
1167
  slug: The slug identifier of the data integration.
 
1197
  ) -> DataIntegration:
1198
  """Update a data integration
1199
 
1200
+ Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
1201
 
1202
  Args:
1203
  slug: The slug identifier of the data integration.
 
1256
  ) -> None:
1257
  """Delete a data integration
1258
 
1259
+ Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
1260
 
1261
  Args:
1262
  slug: The slug identifier of the data integration.
 
1281
  user_id: str,
1282
  secret: str,
1283
  organization_id: str | None = None,
1284
+ connected_account_id: str | None = None,
1285
+ connection_owner: DataIntegrationsUpsertApiKeyRequestConnectionOwner
1286
+ | str
1287
+ | None = None,
1288
  request_options: RequestOptions | None = None,
1289
  ) -> ConnectedAccount:
1290
  """Upsert an API key for a connected account
1291
 
1292
+ Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
1293
 
1294
  Args:
1295
  slug: The identifier of the integration.
1296
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1297
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
1298
+ connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
1299
+ connection_owner: Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
1300
  secret: The API key secret to store for this integration.
1301
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1302
 
 
1318
  for k, v in {
1319
  "user_id": user_id,
1320
  "organization_id": organization_id,
1321
+ "connected_account_id": connected_account_id,
1322
+ "connection_owner": enum_value(connection_owner)
1323
+ if connection_owner is not None
1324
+ else None,
1325
  "secret": secret,
1326
  }.items()
1327
  if v is not None
 
1393
  client_id: str,
1394
  client_secret: str,
1395
  organization_id: str | None = None,
1396
+ connected_account_id: str | None = None,
1397
+ connection_owner: DataIntegrationsUpsertClientCredentialsRequestConnectionOwner
1398
+ | str
1399
+ | None = None,
1400
  config: dict[str, str] | None = None,
1401
  request_options: RequestOptions | None = None,
1402
  ) -> ConnectedAccount:
1403
  """Upsert client credentials for a connected account
1404
 
1405
+ Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
1406
 
1407
  Args:
1408
  slug: The identifier of the integration.
1409
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1410
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
1411
+ connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
1412
+ connection_owner: Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
1413
  client_id: The OAuth client ID to store for this integration.
1414
  client_secret: The OAuth client secret to store for this integration.
1415
  config: Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
 
1433
  for k, v in {
1434
  "user_id": user_id,
1435
  "organization_id": organization_id,
1436
+ "connected_account_id": connected_account_id,
1437
+ "connection_owner": enum_value(connection_owner)
1438
+ if connection_owner is not None
1439
+ else None,
1440
  "client_id": client_id,
1441
  "client_secret": client_secret,
1442
  "config": config,
 
1458
  user_id: str,
1459
  organization_id: str | None = None,
1460
  connected_account_id: str | None = None,
1461
+ connection_owner: DataIntegrationsVendCredentialsRequestConnectionOwner
1462
+ | str
1463
+ | None = None,
1464
+ supports_multiple_connections: bool | None = None,
1465
  request_options: RequestOptions | None = None,
1466
  ) -> DataIntegrationCredentialsResponse:
1467
  """Vend credentials for a connected account
 
1470
 
1471
  Args:
1472
  slug: The identifier of the integration.
1473
+ user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
1474
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
1475
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
1476
+ connection_owner: Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
1477
+ supports_multiple_connections: Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
1478
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1479
 
1480
  Returns:
 
1483
  Raises:
1484
  BadRequestError: If the request is malformed (400).
1485
  AuthenticationError: If the API key is invalid (401).
1486
+ AuthorizationError: If the request is forbidden (403).
1487
  NotFoundError: If the resource is not found (404).
1488
  ConflictError: If a conflict occurs (409).
1489
  UnprocessableEntityError: If the request data is unprocessable (422).
 
1496
  "user_id": user_id,
1497
  "organization_id": organization_id,
1498
  "connected_account_id": connected_account_id,
1499
+ "connection_owner": enum_value(connection_owner)
1500
+ if connection_owner is not None
1501
+ else None,
1502
+ "supports_multiple_connections": supports_multiple_connections,
1503
  }.items()
1504
  if v is not None
1505
  }
 
1511
  request_options=request_options,
1512
  )
1513
 
1514
+ async def list_data_integration_organization(
1515
+ self,
1516
+ slug: str,
1517
+ *,
1518
+ request_options: RequestOptions | None = None,
1519
+ ) -> DataIntegration:
1520
+ """Get an organization-owned data integration
1521
+
1522
+ Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
1523
+
1524
+ Args:
1525
+ slug: The slug identifier of the data integration.
1526
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1527
+
1528
+ Returns:
1529
+ DataIntegration
1530
+
1531
+ Raises:
1532
+ AuthenticationError: If the API key is invalid (401).
1533
+ NotFoundError: If the resource is not found (404).
1534
+ RateLimitExceededError: If rate limited (429).
1535
+ ServerError: If the server returns a 5xx error.
1536
+ """
1537
+ return await self._client.request(
1538
+ method="get",
1539
+ path=("data-integrations", str(slug), "organization"),
1540
+ model=DataIntegration,
1541
+ request_options=request_options,
1542
+ )
1543
+
1544
+ async def update_data_integration_organization(
1545
+ self,
1546
+ slug: str,
1547
+ *,
1548
+ description: str | None | NotGiven = NOT_GIVEN,
1549
+ enabled: bool | None = None,
1550
+ scopes: list[str] | None | NotGiven = NOT_GIVEN,
1551
+ credentials: DataIntegrationCredentialsInput | None = None,
1552
+ api_key: ApiKeyInstallation | None = None,
1553
+ custom_provider: UpdateCustomProviderDefinition | None = None,
1554
+ request_options: RequestOptions | None = None,
1555
+ ) -> DataIntegration:
1556
+ """Update an organization-owned data integration
1557
+
1558
+ Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
1559
+
1560
+ Args:
1561
+ slug: The slug identifier of the data integration.
1562
+ description: An optional description of the Data Integration.
1563
+ enabled: Whether the Data Integration is enabled.
1564
+ scopes: The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
1565
+ credentials: New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
1566
+ api_key: An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
1567
+ custom_provider: Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
1568
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1569
+
1570
+ Returns:
1571
+ DataIntegration
1572
+
1573
+ Raises:
1574
+ BadRequestError: If the request is malformed (400).
1575
+ AuthenticationError: If the API key is invalid (401).
1576
+ AuthorizationError: If the request is forbidden (403).
1577
+ NotFoundError: If the resource is not found (404).
1578
+ ConflictError: If a conflict occurs (409).
1579
+ UnprocessableEntityError: If the request data is unprocessable (422).
1580
+ RateLimitExceededError: If rate limited (429).
1581
+ ServerError: If the server returns a 5xx error.
1582
+ """
1583
+ body: dict[str, Any] = {
1584
+ k: v
1585
+ for k, v in {
1586
+ "enabled": enabled,
1587
+ "credentials": credentials.to_dict()
1588
+ if credentials is not None
1589
+ else None,
1590
+ "api_key": api_key.to_dict() if api_key is not None else None,
1591
+ "custom_provider": custom_provider.to_dict()
1592
+ if custom_provider is not None
1593
+ else None,
1594
+ }.items()
1595
+ if v is not None
1596
+ }
1597
+ if not isinstance(description, NotGiven):
1598
+ body["description"] = description
1599
+ if not isinstance(scopes, NotGiven):
1600
+ body["scopes"] = scopes
1601
+ return await self._client.request(
1602
+ method="put",
1603
+ path=("data-integrations", str(slug), "organization"),
1604
+ body=body,
1605
+ model=DataIntegration,
1606
+ request_options=request_options,
1607
+ )
1608
+
1609
+ async def delete_data_integration_organization(
1610
+ self,
1611
+ slug: str,
1612
+ *,
1613
+ request_options: RequestOptions | None = None,
1614
+ ) -> None:
1615
+ """Delete an organization-owned data integration
1616
+
1617
+ Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
1618
+
1619
+ Args:
1620
+ slug: The slug identifier of the data integration.
1621
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1622
+
1623
+ Raises:
1624
+ AuthenticationError: If the API key is invalid (401).
1625
+ NotFoundError: If the resource is not found (404).
1626
+ RateLimitExceededError: If rate limited (429).
1627
+ ServerError: If the server returns a 5xx error.
1628
+ """
1629
+ await self._client.request(
1630
+ method="delete",
1631
+ path=("data-integrations", str(slug), "organization"),
1632
+ request_options=request_options,
1633
+ )
1634
+
1635
  async def get_access_token(
1636
  self,
1637
  provider: str,
 
1639
  user_id: str,
1640
  organization_id: str | None | NotGiven = NOT_GIVEN,
1641
  connected_account_id: str | None = None,
1642
+ connection_owner: DataIntegrationsGetUserTokenRequestConnectionOwner
1643
+ | str
1644
+ | None = None,
1645
+ supports_multiple_connections: bool | None = None,
1646
  request_options: RequestOptions | None = None,
1647
  ) -> DataIntegrationAccessTokenResponse:
1648
  """Get an access token for a connected account
 
1651
 
1652
  Args:
1653
  provider: The identifier of the integration.
1654
+ user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
1655
+ organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
1656
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
1657
+ connection_owner: Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
1658
+ supports_multiple_connections: Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
1659
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1660
 
1661
  Returns:
 
1664
  Raises:
1665
  BadRequestError: If the request is malformed (400).
1666
  AuthenticationError: If the API key is invalid (401).
1667
+ AuthorizationError: If the request is forbidden (403).
1668
  NotFoundError: If the resource is not found (404).
1669
  ConflictError: If a conflict occurs (409).
1670
  UnprocessableEntityError: If the request data is unprocessable (422).
 
1676
  for k, v in {
1677
  "user_id": user_id,
1678
  "connected_account_id": connected_account_id,
1679
+ "connection_owner": enum_value(connection_owner)
1680
+ if connection_owner is not None
1681
+ else None,
1682
+ "supports_multiple_connections": supports_multiple_connections,
1683
  }.items()
1684
  if v is not None
1685
  }
 
1699
  slug: str,
1700
  *,
1701
  organization_id: str | None = None,
1702
+ supports_multiple_connections: bool | None = None,
1703
  connected_account_id: str | None = None,
1704
  request_options: RequestOptions | None = None,
1705
  ) -> ConnectedAccount:
 
1711
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1712
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
1713
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
1714
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
1715
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
1716
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1717
 
 
1730
  k: v
1731
  for k, v in {
1732
  "organization_id": organization_id,
1733
+ "supports_multiple_connections": supports_multiple_connections,
1734
  "connected_account_id": connected_account_id,
1735
  }.items()
1736
  if v is not None
 
1832
  scopes: list[str] | None = None,
1833
  state: ConnectedAccountInputState | str | None = None,
1834
  organization_id: str | None = None,
1835
+ supports_multiple_connections: bool | None = None,
1836
  connected_account_id: str | None = None,
1837
  request_options: RequestOptions | None = None,
1838
  ) -> ConnectedAccount:
 
1849
  scopes: The OAuth scopes granted for this connection.
1850
  state: Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
1851
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
1852
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
1853
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
1854
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1855
 
 
1879
  k: v
1880
  for k, v in {
1881
  "organization_id": organization_id,
1882
+ "supports_multiple_connections": supports_multiple_connections,
1883
  "connected_account_id": connected_account_id,
1884
  }.items()
1885
  if v is not None
 
1905
  slug: str,
1906
  *,
1907
  organization_id: str | None = None,
1908
+ supports_multiple_connections: bool | None = None,
1909
  connected_account_id: str | None = None,
1910
  request_options: RequestOptions | None = None,
1911
  ) -> None:
 
1917
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier.
1918
  slug: The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
1919
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
1920
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
1921
  connected_account_id: A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
1922
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1923
 
 
1933
  k: v
1934
  for k, v in {
1935
  "organization_id": organization_id,
1936
+ "supports_multiple_connections": supports_multiple_connections,
1937
  "connected_account_id": connected_account_id,
1938
  }.items()
1939
  if v is not None
 
1956
  user_id: str,
1957
  *,
1958
  organization_id: str | None = None,
1959
+ supports_multiple_connections: bool | None = None,
1960
  request_options: RequestOptions | None = None,
1961
  ) -> DataIntegrationsListResponse:
1962
  """List providers for a user
 
1966
  Args:
1967
  user_id: A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
1968
  organization_id: An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
1969
+ supports_multiple_connections: Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
1970
  request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
1971
 
1972
  Returns:
 
1982
  k: v
1983
  for k, v in {
1984
  "organization_id": organization_id,
1985
+ "supports_multiple_connections": supports_multiple_connections,
1986
  }.items()
1987
  if v is not None
1988
  }
python/src/workos/pipes/models/__init__.py
python/src/workos/pipes/models/__init__.py CHANGED
@@ -60,6 +60,7 @@ from .data_integrations_upsert_client_credentials_request import (
60
  from .data_integrations_vend_credentials_request import (
61
  DataIntegrationsVendCredentialsRequest as DataIntegrationsVendCredentialsRequest,
62
  )
 
63
  from .update_custom_provider_definition import (
64
  UpdateCustomProviderDefinition as UpdateCustomProviderDefinition,
65
  )
 
60
  from .data_integrations_vend_credentials_request import (
61
  DataIntegrationsVendCredentialsRequest as DataIntegrationsVendCredentialsRequest,
62
  )
63
+ from .pipes_ownership import PipesOwnership as PipesOwnership
64
  from .update_custom_provider_definition import (
65
  UpdateCustomProviderDefinition as UpdateCustomProviderDefinition,
66
  )
python/src/workos/pipes/models/api_key_installation.py
python/src/workos/pipes/models/api_key_installation.py CHANGED
@@ -1,9 +1,41 @@
1
  # This file is auto-generated by oagen. Do not edit.
2
 
3
- from typing import TypeAlias
4
 
5
- from .data_integrations_upsert_api_key_request import (
6
- DataIntegrationsUpsertApiKeyRequest,
7
- )
8
 
9
- ApiKeyInstallation: TypeAlias = DataIntegrationsUpsertApiKeyRequest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ApiKeyInstallation:
13
+ """Api Key Installation model."""
14
+
15
+ secret: str
16
+ """The API key secret to store for the tenant."""
17
+ user_id: str
18
+ """The User identifier the API key is installed for."""
19
+ organization_id: str | None = None
20
+ """An Organization identifier to scope the installation to a specific organization."""
21
+
22
+ @classmethod
23
+ def from_dict(cls, data: dict[str, Any]) -> ApiKeyInstallation:
24
+ """Deserialize from a dictionary."""
25
+ try:
26
+ return cls(
27
+ secret=data["secret"],
28
+ user_id=data["user_id"],
29
+ organization_id=data.get("organization_id"),
30
+ )
31
+ except (KeyError, ValueError) as e:
32
+ _raise_deserialize_error("ApiKeyInstallation", e)
33
+
34
+ def to_dict(self) -> dict[str, Any]:
35
+ """Serialize to a dictionary."""
36
+ result: dict[str, Any] = {}
37
+ result["secret"] = self.secret
38
+ result["user_id"] = self.user_id
39
+ if self.organization_id is not None:
40
+ result["organization_id"] = self.organization_id
41
+ return result
python/src/workos/pipes/models/create_data_integration.py
python/src/workos/pipes/models/create_data_integration.py CHANGED
@@ -10,6 +10,9 @@ from workos._types import _raise_deserialize_error
10
  from workos.common.models.create_data_integration_auth_methods import (
11
  CreateDataIntegrationAuthMethods,
12
  )
 
 
 
13
 
14
  from .api_key_installation import ApiKeyInstallation
15
  from .custom_provider_definition import CustomProviderDefinition
@@ -22,6 +25,8 @@ class CreateDataIntegration:
22
 
23
  provider: str
24
  """The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug."""
 
 
25
  description: str | None = None
26
  """An optional description of the Data Integration."""
27
  enabled: bool | None = None
@@ -45,6 +50,9 @@ class CreateDataIntegration:
45
  try:
46
  return cls(
47
  provider=data["provider"],
 
 
 
48
  description=data.get("description"),
49
  enabled=data.get("enabled"),
50
  scopes=data.get("scopes"),
@@ -76,6 +84,12 @@ class CreateDataIntegration:
76
  """Serialize to a dictionary."""
77
  result: dict[str, Any] = {}
78
  result["provider"] = self.provider
 
 
 
 
 
 
79
  if self.description is not None:
80
  result["description"] = self.description
81
  else:
 
10
  from workos.common.models.create_data_integration_auth_methods import (
11
  CreateDataIntegrationAuthMethods,
12
  )
13
+ from workos.common.models.create_data_integration_ownership import (
14
+ CreateDataIntegrationOwnership,
15
+ )
16
 
17
  from .api_key_installation import ApiKeyInstallation
18
  from .custom_provider_definition import CustomProviderDefinition
 
25
 
26
  provider: str
27
  """The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug."""
28
+ ownership: CreateDataIntegrationOwnership | None = None
29
+ """Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`."""
30
  description: str | None = None
31
  """An optional description of the Data Integration."""
32
  enabled: bool | None = None
 
50
  try:
51
  return cls(
52
  provider=data["provider"],
53
+ ownership=CreateDataIntegrationOwnership(_v_ownership)
54
+ if (_v_ownership := data.get("ownership")) is not None
55
+ else None,
56
  description=data.get("description"),
57
  enabled=data.get("enabled"),
58
  scopes=data.get("scopes"),
 
84
  """Serialize to a dictionary."""
85
  result: dict[str, Any] = {}
86
  result["provider"] = self.provider
87
+ if self.ownership is not None:
88
+ result["ownership"] = (
89
+ self.ownership.value
90
+ if isinstance(self.ownership, Enum)
91
+ else self.ownership
92
+ )
93
  if self.description is not None:
94
  result["description"] = self.description
95
  else:
python/src/workos/pipes/models/data_integration.py
python/src/workos/pipes/models/data_integration.py CHANGED
@@ -11,6 +11,7 @@ from workos._types import _format_datetime, _parse_datetime, _raise_deserialize_
11
  from workos.common.models.data_integration_auth_methods import (
12
  DataIntegrationAuthMethods,
13
  )
 
14
  from workos.common.models.data_integration_state import DataIntegrationState
15
 
16
  from .data_integration_credential import DataIntegrationCredential
@@ -30,6 +31,8 @@ class DataIntegration:
30
  """The provider slug for this Data Integration."""
31
  integration_type: str
32
  """The integration type derived from the provider."""
 
 
33
  description: str | None
34
  """An optional description of the Data Integration."""
35
  enabled: bool
@@ -64,6 +67,7 @@ class DataIntegration:
64
  id=data["id"],
65
  slug=data["slug"],
66
  integration_type=data["integration_type"],
 
67
  description=data["description"],
68
  enabled=data["enabled"],
69
  state=DataIntegrationState(data["state"]),
@@ -102,6 +106,9 @@ class DataIntegration:
102
  result["id"] = self.id
103
  result["slug"] = self.slug
104
  result["integration_type"] = self.integration_type
 
 
 
105
  if self.description is not None:
106
  result["description"] = self.description
107
  else:
 
11
  from workos.common.models.data_integration_auth_methods import (
12
  DataIntegrationAuthMethods,
13
  )
14
+ from workos.common.models.data_integration_ownership import DataIntegrationOwnership
15
  from workos.common.models.data_integration_state import DataIntegrationState
16
 
17
  from .data_integration_credential import DataIntegrationCredential
 
31
  """The provider slug for this Data Integration."""
32
  integration_type: str
33
  """The integration type derived from the provider."""
34
+ ownership: DataIntegrationOwnership
35
+ """Who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation."""
36
  description: str | None
37
  """An optional description of the Data Integration."""
38
  enabled: bool
 
67
  id=data["id"],
68
  slug=data["slug"],
69
  integration_type=data["integration_type"],
70
+ ownership=DataIntegrationOwnership(data["ownership"]),
71
  description=data["description"],
72
  enabled=data["enabled"],
73
  state=DataIntegrationState(data["state"]),
 
106
  result["id"] = self.id
107
  result["slug"] = self.slug
108
  result["integration_type"] = self.integration_type
109
+ result["ownership"] = (
110
+ self.ownership.value if isinstance(self.ownership, Enum) else self.ownership
111
+ )
112
  if self.description is not None:
113
  result["description"] = self.description
114
  else:
python/src/workos/pipes/models/data_integration_installation.py
python/src/workos/pipes/models/data_integration_installation.py CHANGED
@@ -14,10 +14,10 @@ class DataIntegrationInstallation:
14
 
15
  id: str
16
  """Unique identifier of the installation."""
17
- user_id: str
18
- """The User the API key was installed for."""
19
  organization_id: str | None
20
- """The Organization the installation is scoped to, or null when unscoped."""
21
  api_key_last_4: str | None
22
  """The last four characters of the stored API key. The full key is never returned."""
23
 
@@ -38,7 +38,10 @@ class DataIntegrationInstallation:
38
  """Serialize to a dictionary."""
39
  result: dict[str, Any] = {}
40
  result["id"] = self.id
 
41
- result["user_id"] = self.user_id
 
 
42
  if self.organization_id is not None:
43
  result["organization_id"] = self.organization_id
44
  else:
 
14
 
15
  id: str
16
  """Unique identifier of the installation."""
17
+ user_id: str | None
18
+ """The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization."""
19
  organization_id: str | None
20
+ """The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped."""
21
  api_key_last_4: str | None
22
  """The last four characters of the stored API key. The full key is never returned."""
23
 
 
38
  """Serialize to a dictionary."""
39
  result: dict[str, Any] = {}
40
  result["id"] = self.id
41
+ if self.user_id is not None:
42
+ result["user_id"] = self.user_id
43
+ else:
44
+ result["user_id"] = None
45
  if self.organization_id is not None:
46
  result["organization_id"] = self.organization_id
47
  else:
python/src/workos/pipes/models/data_integrations_get_user_token_request.py
python/src/workos/pipes/models/data_integrations_get_user_token_request.py CHANGED
@@ -3,9 +3,13 @@
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)
@@ -13,11 +17,15 @@ class DataIntegrationsGetUserTokenRequest:
13
  """Data Integrations Get User Token Request model."""
14
 
15
  user_id: str
16
- """A [User](https://workos.com/docs/reference/authkit/user) identifier."""
17
  organization_id: str | None = None
18
- """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization."""
19
  connected_account_id: str | None = None
20
  """A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider."""
 
 
 
 
21
 
22
  @classmethod
23
  def from_dict(cls, data: dict[str, Any]) -> DataIntegrationsGetUserTokenRequest:
@@ -27,6 +35,12 @@ class DataIntegrationsGetUserTokenRequest:
27
  user_id=data["user_id"],
28
  organization_id=data.get("organization_id"),
29
  connected_account_id=data.get("connected_account_id"),
 
 
 
 
 
 
30
  )
31
  except (KeyError, ValueError) as e:
32
  _raise_deserialize_error("DataIntegrationsGetUserTokenRequest", e)
@@ -41,4 +55,12 @@ class DataIntegrationsGetUserTokenRequest:
41
  result["organization_id"] = None
42
  if self.connected_account_id is not None:
43
  result["connected_account_id"] = self.connected_account_id
 
 
 
 
 
 
 
 
44
  return result
 
3
  from __future__ import annotations
4
 
5
  from dataclasses import dataclass
6
+ from enum import Enum
7
  from typing import Any
8
 
9
  from workos._types import _raise_deserialize_error
10
+ from workos.common.models.data_integrations_get_user_token_request_connection_owner import (
11
+ DataIntegrationsGetUserTokenRequestConnectionOwner,
12
+ )
13
 
14
 
15
  @dataclass(slots=True)
 
17
  """Data Integrations Get User Token Request model."""
18
 
19
  user_id: str
20
+ """A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization."""
21
  organization_id: str | None = None
22
+ """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`."""
23
  connected_account_id: str | None = None
24
  """A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider."""
25
+ connection_owner: DataIntegrationsGetUserTokenRequestConnectionOwner | None = None
26
+ """Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`."""
27
+ supports_multiple_connections: bool | None = None
28
+ """Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered."""
29
 
30
  @classmethod
31
  def from_dict(cls, data: dict[str, Any]) -> DataIntegrationsGetUserTokenRequest:
 
35
  user_id=data["user_id"],
36
  organization_id=data.get("organization_id"),
37
  connected_account_id=data.get("connected_account_id"),
38
+ connection_owner=DataIntegrationsGetUserTokenRequestConnectionOwner(
39
+ _v_connection_owner
40
+ )
41
+ if (_v_connection_owner := data.get("connection_owner")) is not None
42
+ else None,
43
+ supports_multiple_connections=data.get("supports_multiple_connections"),
44
  )
45
  except (KeyError, ValueError) as e:
46
  _raise_deserialize_error("DataIntegrationsGetUserTokenRequest", e)
 
55
  result["organization_id"] = None
56
  if self.connected_account_id is not None:
57
  result["connected_account_id"] = self.connected_account_id
58
+ if self.connection_owner is not None:
59
+ result["connection_owner"] = (
60
+ self.connection_owner.value
61
+ if isinstance(self.connection_owner, Enum)
62
+ else self.connection_owner
63
+ )
64
+ if self.supports_multiple_connections is not None:
65
+ result["supports_multiple_connections"] = self.supports_multiple_connections
66
  return result
python/src/workos/pipes/models/data_integrations_list_response_data.py
python/src/workos/pipes/models/data_integrations_list_response_data.py CHANGED
@@ -46,9 +46,9 @@ class DataIntegrationsListResponseData:
46
  updated_at: str
47
  """The timestamp when the provider was last updated."""
48
  connected_account: DataIntegrationsListResponseDataConnectedAccount | None
49
- """The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected."""
50
  connected_accounts: list[DataIntegrationsListResponseDataConnectedAccount]
51
- """The user's connected accounts for this provider in the requested ownership context."""
52
  auth_methods: list[DataIntegrationsListResponseDataAuthMethods] | None = None
53
  """The authentication methods supported by this provider (`oauth`, `api_key`, `client_credentials`, or a combination). Defaults to `["oauth"]` if absent."""
54
 
 
46
  updated_at: str
47
  """The timestamp when the provider was last updated."""
48
  connected_account: DataIntegrationsListResponseDataConnectedAccount | None
49
+ """The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection."""
50
  connected_accounts: list[DataIntegrationsListResponseDataConnectedAccount]
51
+ """The user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`."""
52
  auth_methods: list[DataIntegrationsListResponseDataAuthMethods] | None = None
53
  """The authentication methods supported by this provider (`oauth`, `api_key`, `client_credentials`, or a combination). Defaults to `["oauth"]` if absent."""
54
 
python/src/workos/pipes/models/data_integrations_upsert_api_key_request.py
python/src/workos/pipes/models/data_integrations_upsert_api_key_request.py CHANGED
@@ -3,9 +3,13 @@
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)
@@ -17,7 +21,11 @@ class DataIntegrationsUpsertApiKeyRequest:
17
  secret: str
18
  """The API key secret to store for this integration."""
19
  organization_id: str | None = None
20
- """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization."""
 
 
 
 
21
 
22
  @classmethod
23
  def from_dict(cls, data: dict[str, Any]) -> DataIntegrationsUpsertApiKeyRequest:
@@ -27,6 +35,12 @@ class DataIntegrationsUpsertApiKeyRequest:
27
  user_id=data["user_id"],
28
  secret=data["secret"],
29
  organization_id=data.get("organization_id"),
 
 
 
 
 
 
30
  )
31
  except (KeyError, ValueError) as e:
32
  _raise_deserialize_error("DataIntegrationsUpsertApiKeyRequest", e)
@@ -38,4 +52,12 @@ class DataIntegrationsUpsertApiKeyRequest:
38
  result["secret"] = self.secret
39
  if self.organization_id is not None:
40
  result["organization_id"] = self.organization_id
 
 
 
 
 
 
 
 
41
  return result
 
3
  from __future__ import annotations
4
 
5
  from dataclasses import dataclass
6
+ from enum import Enum
7
  from typing import Any
8
 
9
  from workos._types import _raise_deserialize_error
10
+ from workos.common.models.data_integrations_upsert_api_key_request_connection_owner import (
11
+ DataIntegrationsUpsertApiKeyRequestConnectionOwner,
12
+ )
13
 
14
 
15
  @dataclass(slots=True)
 
21
  secret: str
22
  """The API key secret to store for this integration."""
23
  organization_id: str | None = None
24
+ """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`."""
25
+ connected_account_id: str | None = None
26
+ """A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection."""
27
+ connection_owner: DataIntegrationsUpsertApiKeyRequestConnectionOwner | None = None
28
+ """Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization."""
29
 
30
  @classmethod
31
  def from_dict(cls, data: dict[str, Any]) -> DataIntegrationsUpsertApiKeyRequest:
 
35
  user_id=data["user_id"],
36
  secret=data["secret"],
37
  organization_id=data.get("organization_id"),
38
+ connected_account_id=data.get("connected_account_id"),
39
+ connection_owner=DataIntegrationsUpsertApiKeyRequestConnectionOwner(
40
+ _v_connection_owner
41
+ )
42
+ if (_v_connection_owner := data.get("connection_owner")) is not None
43
+ else None,
44
  )
45
  except (KeyError, ValueError) as e:
46
  _raise_deserialize_error("DataIntegrationsUpsertApiKeyRequest", e)
 
52
  result["secret"] = self.secret
53
  if self.organization_id is not None:
54
  result["organization_id"] = self.organization_id
55
+ if self.connected_account_id is not None:
56
+ result["connected_account_id"] = self.connected_account_id
57
+ if self.connection_owner is not None:
58
+ result["connection_owner"] = (
59
+ self.connection_owner.value
60
+ if isinstance(self.connection_owner, Enum)
61
+ else self.connection_owner
62
+ )
63
  return result
python/src/workos/pipes/models/data_integrations_upsert_client_credentials_request.py
python/src/workos/pipes/models/data_integrations_upsert_client_credentials_request.py CHANGED
@@ -3,9 +3,13 @@
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)
@@ -19,7 +23,13 @@ class DataIntegrationsUpsertClientCredentialsRequest:
19
  client_secret: str
20
  """The OAuth client secret to store for this integration."""
21
  organization_id: str | None = None
22
- """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization."""
 
 
 
 
 
 
23
  config: dict[str, str] | None = None
24
  """Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors."""
25
 
@@ -34,6 +44,12 @@ class DataIntegrationsUpsertClientCredentialsRequest:
34
  client_id=data["client_id"],
35
  client_secret=data["client_secret"],
36
  organization_id=data.get("organization_id"),
 
 
 
 
 
 
37
  config=data.get("config"),
38
  )
39
  except (KeyError, ValueError) as e:
@@ -49,6 +65,14 @@ class DataIntegrationsUpsertClientCredentialsRequest:
49
  result["client_secret"] = self.client_secret
50
  if self.organization_id is not None:
51
  result["organization_id"] = self.organization_id
 
 
 
 
 
 
 
 
52
  if self.config is not None:
53
  result["config"] = self.config
54
  return result
 
3
  from __future__ import annotations
4
 
5
  from dataclasses import dataclass
6
+ from enum import Enum
7
  from typing import Any
8
 
9
  from workos._types import _raise_deserialize_error
10
+ from workos.common.models.data_integrations_upsert_client_credentials_request_connection_owner import (
11
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner,
12
+ )
13
 
14
 
15
  @dataclass(slots=True)
 
23
  client_secret: str
24
  """The OAuth client secret to store for this integration."""
25
  organization_id: str | None = None
26
+ """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`."""
27
+ connected_account_id: str | None = None
28
+ """A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection."""
29
+ connection_owner: (
30
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner | None
31
+ ) = None
32
+ """Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization."""
33
  config: dict[str, str] | None = None
34
  """Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors."""
35
 
 
44
  client_id=data["client_id"],
45
  client_secret=data["client_secret"],
46
  organization_id=data.get("organization_id"),
47
+ connected_account_id=data.get("connected_account_id"),
48
+ connection_owner=DataIntegrationsUpsertClientCredentialsRequestConnectionOwner(
49
+ _v_connection_owner
50
+ )
51
+ if (_v_connection_owner := data.get("connection_owner")) is not None
52
+ else None,
53
  config=data.get("config"),
54
  )
55
  except (KeyError, ValueError) as e:
 
65
  result["client_secret"] = self.client_secret
66
  if self.organization_id is not None:
67
  result["organization_id"] = self.organization_id
68
+ if self.connected_account_id is not None:
69
+ result["connected_account_id"] = self.connected_account_id
70
+ if self.connection_owner is not None:
71
+ result["connection_owner"] = (
72
+ self.connection_owner.value
73
+ if isinstance(self.connection_owner, Enum)
74
+ else self.connection_owner
75
+ )
76
  if self.config is not None:
77
  result["config"] = self.config
78
  return result
python/src/workos/pipes/models/data_integrations_vend_credentials_request.py
python/src/workos/pipes/models/data_integrations_vend_credentials_request.py CHANGED
@@ -3,9 +3,13 @@
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)
@@ -13,11 +17,17 @@ class DataIntegrationsVendCredentialsRequest:
13
  """Data Integrations Vend Credentials Request model."""
14
 
15
  user_id: str
16
- """A [User](https://workos.com/docs/reference/authkit/user) identifier."""
17
  organization_id: str | None = None
18
- """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization."""
19
  connected_account_id: str | None = None
20
  """A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider."""
 
 
 
 
 
 
21
 
22
  @classmethod
23
  def from_dict(cls, data: dict[str, Any]) -> DataIntegrationsVendCredentialsRequest:
@@ -27,6 +37,12 @@ class DataIntegrationsVendCredentialsRequest:
27
  user_id=data["user_id"],
28
  organization_id=data.get("organization_id"),
29
  connected_account_id=data.get("connected_account_id"),
 
 
 
 
 
 
30
  )
31
  except (KeyError, ValueError) as e:
32
  _raise_deserialize_error("DataIntegrationsVendCredentialsRequest", e)
@@ -39,4 +55,12 @@ class DataIntegrationsVendCredentialsRequest:
39
  result["organization_id"] = self.organization_id
40
  if self.connected_account_id is not None:
41
  result["connected_account_id"] = self.connected_account_id
 
 
 
 
 
 
 
 
42
  return result
 
3
  from __future__ import annotations
4
 
5
  from dataclasses import dataclass
6
+ from enum import Enum
7
  from typing import Any
8
 
9
  from workos._types import _raise_deserialize_error
10
+ from workos.common.models.data_integrations_vend_credentials_request_connection_owner import (
11
+ DataIntegrationsVendCredentialsRequestConnectionOwner,
12
+ )
13
 
14
 
15
  @dataclass(slots=True)
 
17
  """Data Integrations Vend Credentials Request model."""
18
 
19
  user_id: str
20
+ """A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization."""
21
  organization_id: str | None = None
22
+ """An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`."""
23
  connected_account_id: str | None = None
24
  """A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider."""
25
+ connection_owner: DataIntegrationsVendCredentialsRequestConnectionOwner | None = (
26
+ None
27
+ )
28
+ """Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`."""
29
+ supports_multiple_connections: bool | None = None
30
+ """Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered."""
31
 
32
  @classmethod
33
  def from_dict(cls, data: dict[str, Any]) -> DataIntegrationsVendCredentialsRequest:
 
37
  user_id=data["user_id"],
38
  organization_id=data.get("organization_id"),
39
  connected_account_id=data.get("connected_account_id"),
40
+ connection_owner=DataIntegrationsVendCredentialsRequestConnectionOwner(
41
+ _v_connection_owner
42
+ )
43
+ if (_v_connection_owner := data.get("connection_owner")) is not None
44
+ else None,
45
+ supports_multiple_connections=data.get("supports_multiple_connections"),
46
  )
47
  except (KeyError, ValueError) as e:
48
  _raise_deserialize_error("DataIntegrationsVendCredentialsRequest", e)
 
55
  result["organization_id"] = self.organization_id
56
  if self.connected_account_id is not None:
57
  result["connected_account_id"] = self.connected_account_id
58
+ if self.connection_owner is not None:
59
+ result["connection_owner"] = (
60
+ self.connection_owner.value
61
+ if isinstance(self.connection_owner, Enum)
62
+ else self.connection_owner
63
+ )
64
+ if self.supports_multiple_connections is not None:
65
+ result["supports_multiple_connections"] = self.supports_multiple_connections
66
  return result
python/src/workos/pipes/models/pipes_ownership.py
python/src/workos/pipes/models/pipes_ownership.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is auto-generated by oagen. Do not edit.
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ if TYPE_CHECKING:
6
+ from workos.common.models.create_data_integration_ownership import (
7
+ CreateDataIntegrationOwnership as PipesOwnership,
8
+ )
9
+ else:
10
+
11
+ def __getattr__(name: str):
12
+ if name == "PipesOwnership":
13
+ from workos.common.models.create_data_integration_ownership import (
14
+ CreateDataIntegrationOwnership,
15
+ )
16
+
17
+ return CreateDataIntegrationOwnership
18
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
19
+
20
+
21
+ __all__ = ["PipesOwnership"]
python/src/workos/user_management/_resource.py
python/src/workos/user_management/_resource.py CHANGED
@@ -35,6 +35,7 @@ from ..session import (
35
  )
36
  from .models import (
37
  AuthenticateResponse,
 
38
  AuthorizationCodeSessionAuthenticateRequest,
39
  AuthorizedConnectApplicationListData,
40
  CORSOriginResponse,
@@ -816,6 +817,119 @@ class UserManagement:
816
  request_options=request_options,
817
  )
818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  def list_cors_origins(
820
  self,
821
  *,
@@ -3455,6 +3569,119 @@ class AsyncUserManagement:
3455
  request_options=request_options,
3456
  )
3457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3458
  async def list_cors_origins(
3459
  self,
3460
  *,
 
35
  )
36
  from .models import (
37
  AuthenticateResponse,
38
+ AuthkitOAuthResource,
39
  AuthorizationCodeSessionAuthenticateRequest,
40
  AuthorizedConnectApplicationListData,
41
  CORSOriginResponse,
 
817
  request_options=request_options,
818
  )
819
 
820
+ def list_authkit_oauth_resources(
821
+ self,
822
+ *,
823
+ limit: int | None = None,
824
+ before: str | None = None,
825
+ after: str | None = None,
826
+ order: PaginationOrder | str | None = "desc",
827
+ request_options: RequestOptions | None = None,
828
+ ) -> SyncPage[AuthkitOAuthResource]:
829
+ """List AuthKit OAuth resources
830
+
831
+ Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
832
+
833
+ Args:
834
+ limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
835
+ 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"`.
836
+ after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
837
+ order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`.
838
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
839
+
840
+ Returns:
841
+ SyncPage[AuthkitOAuthResource]
842
+
843
+ Raises:
844
+ AuthenticationError: If the API key is invalid (401).
845
+ RateLimitExceededError: If rate limited (429).
846
+ ServerError: If the server returns a 5xx error.
847
+ """
848
+ params = {
849
+ k: v
850
+ for k, v in {
851
+ "limit": limit,
852
+ "before": before,
853
+ "after": after,
854
+ "order": enum_value(order) if order is not None else None,
855
+ }.items()
856
+ if v is not None
857
+ }
858
+ return self._client.request_page(
859
+ method="get",
860
+ path=("user_management", "authkit_oauth_resources"),
861
+ model=AuthkitOAuthResource,
862
+ params=params,
863
+ request_options=request_options,
864
+ )
865
+
866
+ def create_authkit_oauth_resource(
867
+ self,
868
+ *,
869
+ uri: str,
870
+ default: bool | None = None,
871
+ request_options: RequestOptions | None = None,
872
+ ) -> AuthkitOAuthResource:
873
+ """Create an AuthKit OAuth resource
874
+
875
+ Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
876
+
877
+ Args:
878
+ uri: The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
879
+ default: Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
880
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
881
+
882
+ Returns:
883
+ AuthkitOAuthResource
884
+
885
+ Raises:
886
+ AuthenticationError: If the API key is invalid (401).
887
+ UnprocessableEntityError: If the request data is unprocessable (422).
888
+ RateLimitExceededError: If rate limited (429).
889
+ ServerError: If the server returns a 5xx error.
890
+ """
891
+ body: dict[str, Any] = {
892
+ k: v
893
+ for k, v in {
894
+ "uri": uri,
895
+ "default": default,
896
+ }.items()
897
+ if v is not None
898
+ }
899
+ return self._client.request(
900
+ method="post",
901
+ path=("user_management", "authkit_oauth_resources"),
902
+ body=body,
903
+ model=AuthkitOAuthResource,
904
+ request_options=request_options,
905
+ )
906
+
907
+ def delete_authkit_oauth_resource(
908
+ self,
909
+ id: str,
910
+ *,
911
+ request_options: RequestOptions | None = None,
912
+ ) -> None:
913
+ """Delete an AuthKit OAuth resource
914
+
915
+ Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
916
+
917
+ Args:
918
+ id: The ID of the AuthKit OAuth resource to delete.
919
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
920
+
921
+ Raises:
922
+ AuthenticationError: If the API key is invalid (401).
923
+ NotFoundError: If the resource is not found (404).
924
+ RateLimitExceededError: If rate limited (429).
925
+ ServerError: If the server returns a 5xx error.
926
+ """
927
+ self._client.request(
928
+ method="delete",
929
+ path=("user_management", "authkit_oauth_resources", str(id)),
930
+ request_options=request_options,
931
+ )
932
+
933
  def list_cors_origins(
934
  self,
935
  *,
 
3569
  request_options=request_options,
3570
  )
3571
 
3572
+ async def list_authkit_oauth_resources(
3573
+ self,
3574
+ *,
3575
+ limit: int | None = None,
3576
+ before: str | None = None,
3577
+ after: str | None = None,
3578
+ order: PaginationOrder | str | None = "desc",
3579
+ request_options: RequestOptions | None = None,
3580
+ ) -> AsyncPage[AuthkitOAuthResource]:
3581
+ """List AuthKit OAuth resources
3582
+
3583
+ Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
3584
+
3585
+ Args:
3586
+ limit: Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`.
3587
+ 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"`.
3588
+ after: 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
3589
+ order: Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`.
3590
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
3591
+
3592
+ Returns:
3593
+ AsyncPage[AuthkitOAuthResource]
3594
+
3595
+ Raises:
3596
+ AuthenticationError: If the API key is invalid (401).
3597
+ RateLimitExceededError: If rate limited (429).
3598
+ ServerError: If the server returns a 5xx error.
3599
+ """
3600
+ params = {
3601
+ k: v
3602
+ for k, v in {
3603
+ "limit": limit,
3604
+ "before": before,
3605
+ "after": after,
3606
+ "order": enum_value(order) if order is not None else None,
3607
+ }.items()
3608
+ if v is not None
3609
+ }
3610
+ return await self._client.request_page(
3611
+ method="get",
3612
+ path=("user_management", "authkit_oauth_resources"),
3613
+ model=AuthkitOAuthResource,
3614
+ params=params,
3615
+ request_options=request_options,
3616
+ )
3617
+
3618
+ async def create_authkit_oauth_resource(
3619
+ self,
3620
+ *,
3621
+ uri: str,
3622
+ default: bool | None = None,
3623
+ request_options: RequestOptions | None = None,
3624
+ ) -> AuthkitOAuthResource:
3625
+ """Create an AuthKit OAuth resource
3626
+
3627
+ Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
3628
+
3629
+ Args:
3630
+ uri: The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
3631
+ default: Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
3632
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
3633
+
3634
+ Returns:
3635
+ AuthkitOAuthResource
3636
+
3637
+ Raises:
3638
+ AuthenticationError: If the API key is invalid (401).
3639
+ UnprocessableEntityError: If the request data is unprocessable (422).
3640
+ RateLimitExceededError: If rate limited (429).
3641
+ ServerError: If the server returns a 5xx error.
3642
+ """
3643
+ body: dict[str, Any] = {
3644
+ k: v
3645
+ for k, v in {
3646
+ "uri": uri,
3647
+ "default": default,
3648
+ }.items()
3649
+ if v is not None
3650
+ }
3651
+ return await self._client.request(
3652
+ method="post",
3653
+ path=("user_management", "authkit_oauth_resources"),
3654
+ body=body,
3655
+ model=AuthkitOAuthResource,
3656
+ request_options=request_options,
3657
+ )
3658
+
3659
+ async def delete_authkit_oauth_resource(
3660
+ self,
3661
+ id: str,
3662
+ *,
3663
+ request_options: RequestOptions | None = None,
3664
+ ) -> None:
3665
+ """Delete an AuthKit OAuth resource
3666
+
3667
+ Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
3668
+
3669
+ Args:
3670
+ id: The ID of the AuthKit OAuth resource to delete.
3671
+ request_options: Per-request options. Supports extra_headers, timeout, max_retries, and base_url override.
3672
+
3673
+ Raises:
3674
+ AuthenticationError: If the API key is invalid (401).
3675
+ NotFoundError: If the resource is not found (404).
3676
+ RateLimitExceededError: If rate limited (429).
3677
+ ServerError: If the server returns a 5xx error.
3678
+ """
3679
+ await self._client.request(
3680
+ method="delete",
3681
+ path=("user_management", "authkit_oauth_resources", str(id)),
3682
+ request_options=request_options,
3683
+ )
3684
+
3685
  async def list_cors_origins(
3686
  self,
3687
  *,
python/src/workos/user_management/models/__init__.py
python/src/workos/user_management/models/__init__.py CHANGED
@@ -15,6 +15,7 @@ from .authenticate_response import AuthenticateResponse as AuthenticateResponse
15
  from .authenticate_response_oauth_token import (
16
  AuthenticateResponseOAuthToken as AuthenticateResponseOAuthToken,
17
  )
 
18
  from .authorization_code_session_authenticate_request import (
19
  AuthorizationCodeSessionAuthenticateRequest as AuthorizationCodeSessionAuthenticateRequest,
20
  )
@@ -23,6 +24,9 @@ from .authorized_connect_application_list_data import (
23
  )
24
  from .confirm_email_change import ConfirmEmailChange as ConfirmEmailChange
25
  from .cors_origin_response import CORSOriginResponse as CORSOriginResponse
 
 
 
26
  from .create_cors_origin import CreateCORSOrigin as CreateCORSOrigin
27
  from .create_magic_code_and_return import (
28
  CreateMagicCodeAndReturn as CreateMagicCodeAndReturn,
 
15
  from .authenticate_response_oauth_token import (
16
  AuthenticateResponseOAuthToken as AuthenticateResponseOAuthToken,
17
  )
18
+ from .authkit_oauth_resource import AuthkitOAuthResource as AuthkitOAuthResource
19
  from .authorization_code_session_authenticate_request import (
20
  AuthorizationCodeSessionAuthenticateRequest as AuthorizationCodeSessionAuthenticateRequest,
21
  )
 
24
  )
25
  from .confirm_email_change import ConfirmEmailChange as ConfirmEmailChange
26
  from .cors_origin_response import CORSOriginResponse as CORSOriginResponse
27
+ from .create_authkit_oauth_resource import (
28
+ CreateAuthkitOAuthResource as CreateAuthkitOAuthResource,
29
+ )
30
  from .create_cors_origin import CreateCORSOrigin as CreateCORSOrigin
31
  from .create_magic_code_and_return import (
32
  CreateMagicCodeAndReturn as CreateMagicCodeAndReturn,
python/src/workos/user_management/models/authkit_oauth_resource.py
python/src/workos/user_management/models/authkit_oauth_resource.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
7
+
8
+ from workos._types import _raise_deserialize_error
9
+
10
+
11
+ @dataclass(slots=True)
12
+ class AuthkitOAuthResource:
13
+ """Authkit O Auth Resource model."""
14
+
15
+ object: Literal["authkit_oauth_resource"]
16
+ """The object type."""
17
+ id: str
18
+ """The ID of the AuthKit OAuth resource."""
19
+ uri: str
20
+ """The resource URI."""
21
+ default: bool
22
+ """Whether this is the default AuthKit OAuth resource for the environment."""
23
+ created_at: str
24
+ """The timestamp when the AuthKit OAuth resource was created."""
25
+ updated_at: str
26
+ """The timestamp when the AuthKit OAuth resource was last updated."""
27
+
28
+ @classmethod
29
+ def from_dict(cls, data: dict[str, Any]) -> AuthkitOAuthResource:
30
+ """Deserialize from a dictionary."""
31
+ try:
32
+ return cls(
33
+ object=data.get("object", "authkit_oauth_resource"),
34
+ id=data["id"],
35
+ uri=data["uri"],
36
+ default=data["default"],
37
+ created_at=data["created_at"],
38
+ updated_at=data["updated_at"],
39
+ )
40
+ except (KeyError, ValueError) as e:
41
+ _raise_deserialize_error("AuthkitOAuthResource", e)
42
+
43
+ def to_dict(self) -> dict[str, Any]:
44
+ """Serialize to a dictionary."""
45
+ result: dict[str, Any] = {}
46
+ result["object"] = self.object
47
+ result["id"] = self.id
48
+ result["uri"] = self.uri
49
+ result["default"] = self.default
50
+ result["created_at"] = self.created_at
51
+ result["updated_at"] = self.updated_at
52
+ return result
python/src/workos/user_management/models/create_authkit_oauth_resource.py
python/src/workos/user_management/models/create_authkit_oauth_resource.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CreateAuthkitOAuthResource:
13
+ """Create Authkit O Auth Resource model."""
14
+
15
+ uri: str
16
+ """The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment."""
17
+ default: bool | None = None
18
+ """Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default."""
19
+
20
+ @classmethod
21
+ def from_dict(cls, data: dict[str, Any]) -> CreateAuthkitOAuthResource:
22
+ """Deserialize from a dictionary."""
23
+ try:
24
+ return cls(
25
+ uri=data["uri"],
26
+ default=data.get("default"),
27
+ )
28
+ except (KeyError, ValueError) as e:
29
+ _raise_deserialize_error("CreateAuthkitOAuthResource", e)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ """Serialize to a dictionary."""
33
+ result: dict[str, Any] = {}
34
+ result["uri"] = self.uri
35
+ if self.default is not None:
36
+ result["default"] = self.default
37
+ return result
python/tests/fixtures/account_selection_required_error.json
python/tests/fixtures/account_selection_required_error.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "code": "account_selection_required",
3
+ "message": "Several connected accounts match this user for this provider. Name one with a connected account id."
4
+ }
python/tests/fixtures/authkit_oauth_resource.json
python/tests/fixtures/authkit_oauth_resource.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "authkit_oauth_resource",
3
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "uri": "https://api.example.com",
5
+ "default": false,
6
+ "created_at": "2026-01-15T12:00:00.000Z",
7
+ "updated_at": "2026-01-15T12:00:00.000Z"
8
+ }
python/tests/fixtures/create_authkit_oauth_resource.json
python/tests/fixtures/create_authkit_oauth_resource.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "uri": "https://api.example.com",
3
+ "default": false
4
+ }
python/tests/fixtures/create_data_integration.json
python/tests/fixtures/create_data_integration.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "provider": "github",
 
3
  "description": "Production GitHub app",
4
  "enabled": true,
5
  "scopes": [
 
1
  {
2
  "provider": "github",
3
+ "ownership": "user",
4
  "description": "Production GitHub app",
5
  "enabled": true,
6
  "scopes": [
python/tests/fixtures/data_integration.json
python/tests/fixtures/data_integration.json CHANGED
@@ -3,6 +3,7 @@
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
 
6
  "description": "Production GitHub app",
7
  "enabled": true,
8
  "state": "valid",
 
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
6
+ "ownership": "user",
7
  "description": "Production GitHub app",
8
  "enabled": true,
9
  "state": "valid",
python/tests/fixtures/data_integrations_get_user_token_request.json
python/tests/fixtures/data_integrations_get_user_token_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
python/tests/fixtures/data_integrations_upsert_api_key_request.json
python/tests/fixtures/data_integrations_upsert_api_key_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "secret": "sk-1234567890abcdef"
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "secret": "sk-1234567890abcdef"
7
  }
python/tests/fixtures/data_integrations_upsert_client_credentials_request.json
python/tests/fixtures/data_integrations_upsert_client_credentials_request.json CHANGED
@@ -1,6 +1,8 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
 
 
4
  "client_id": "3MVG9...",
5
  "client_secret": "shhh-secret",
6
  "config": {
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
  "client_id": "3MVG9...",
7
  "client_secret": "shhh-secret",
8
  "config": {
python/tests/fixtures/data_integrations_vend_credentials_request.json
python/tests/fixtures/data_integrations_vend_credentials_request.json CHANGED
@@ -1,5 +1,7 @@
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
- "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT"
 
 
5
  }
 
1
  {
2
  "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
3
  "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "connected_account_id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
5
+ "connection_owner": "user",
6
+ "supports_multiple_connections": true
7
  }
python/tests/fixtures/list_authkit_oauth_resource.json
python/tests/fixtures/list_authkit_oauth_resource.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data": [
3
+ {
4
+ "object": "authkit_oauth_resource",
5
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
6
+ "uri": "https://api.example.com",
7
+ "default": false,
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": null,
14
+ "after": null
15
+ }
16
+ }
python/tests/fixtures/list_data_integration.json
python/tests/fixtures/list_data_integration.json CHANGED
@@ -5,6 +5,7 @@
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
 
8
  "description": "Production GitHub app",
9
  "enabled": true,
10
  "state": "valid",
 
5
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
6
  "slug": "github",
7
  "integration_type": "github",
8
+ "ownership": "user",
9
  "description": "Production GitHub app",
10
  "enabled": true,
11
  "state": "valid",
python/tests/test_common_models_round_trip.py
python/tests/test_common_models_round_trip.py CHANGED
@@ -5,6 +5,7 @@
5
  from tests.generated_helpers import load_fixture
6
  from workos.common.models import (
7
  AccessTokenAgentRegistrationCredentialIssuedDataDetail,
 
8
  ActionAuthenticationDenied,
9
  ActionAuthenticationDeniedData,
10
  ActionUserRegistrationDenied,
@@ -14942,6 +14943,24 @@ class TestModelRoundTrip:
14942
  serialized = instance.to_dict()
14943
  assert "context" not in serialized
14944
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14945
  def test_auth_method_mismatch_error_round_trip(self):
14946
  data = load_fixture("auth_method_mismatch_error.json")
14947
  instance = AuthMethodMismatchError.from_dict(data)
 
5
  from tests.generated_helpers import load_fixture
6
  from workos.common.models import (
7
  AccessTokenAgentRegistrationCredentialIssuedDataDetail,
8
+ AccountSelectionRequiredError,
9
  ActionAuthenticationDenied,
10
  ActionAuthenticationDeniedData,
11
  ActionUserRegistrationDenied,
 
14943
  serialized = instance.to_dict()
14944
  assert "context" not in serialized
14945
 
14946
+ def test_account_selection_required_error_round_trip(self):
14947
+ data = load_fixture("account_selection_required_error.json")
14948
+ instance = AccountSelectionRequiredError.from_dict(data)
14949
+ serialized = instance.to_dict()
14950
+ assert serialized == data
14951
+ restored = AccountSelectionRequiredError.from_dict(serialized)
14952
+ assert restored.to_dict() == serialized
14953
+
14954
+ def test_account_selection_required_error_minimal_payload(self):
14955
+ data = {
14956
+ "code": "account_selection_required",
14957
+ "message": "Several connected accounts match this user for this provider. Name one with a connected account id.",
14958
+ }
14959
+ instance = AccountSelectionRequiredError.from_dict(data)
14960
+ serialized = instance.to_dict()
14961
+ assert serialized["code"] == data["code"]
14962
+ assert serialized["message"] == data["message"]
14963
+
14964
  def test_auth_method_mismatch_error_round_trip(self):
14965
  data = load_fixture("auth_method_mismatch_error.json")
14966
  instance = AuthMethodMismatchError.from_dict(data)
python/tests/test_pipes.py
python/tests/test_pipes.py CHANGED
@@ -25,6 +25,7 @@ from workos.pipes.models import (
25
  DataIntegrationAuthorizeUrlResponse,
26
  DataIntegrationCredentialsResponse,
27
  DataIntegrationsListResponse,
 
28
  )
29
 
30
 
@@ -51,12 +52,14 @@ class TestPipes:
51
  before="cursor before",
52
  after="cursor/after",
53
  order=PaginationOrder("value_order"),
 
54
  )
55
  request = httpx_mock.get_request()
56
  assert request.url.params["limit"] == "10"
57
  assert request.url.params["before"] == "cursor before"
58
  assert request.url.params["after"] == "cursor/after"
59
  assert request.url.params["order"] == "value_order"
 
60
 
61
  def test_create_data_integration(self, workos, httpx_mock):
62
  httpx_mock.add_response(
@@ -178,6 +181,38 @@ class TestPipes:
178
  body = json.loads(request.content)
179
  assert body["user_id"] == "test_user_id"
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  def test_get_access_token(self, workos, httpx_mock):
182
  httpx_mock.add_response(
183
  json=load_fixture("data_integration_access_token_response.json"),
@@ -212,10 +247,12 @@ class TestPipes:
212
  "test_user_id",
213
  "test_slug",
214
  organization_id="value organization_id/test",
 
215
  connected_account_id="value connected_account_id/test",
216
  )
217
  request = httpx_mock.get_request()
218
  assert request.url.params["organization_id"] == "value organization_id/test"
 
219
  assert (
220
  request.url.params["connected_account_id"]
221
  == "value connected_account_id/test"
@@ -267,10 +304,12 @@ class TestPipes:
267
  "test_user_id",
268
  "test_slug",
269
  organization_id="value organization_id/test",
 
270
  connected_account_id="value connected_account_id/test",
271
  )
272
  request = httpx_mock.get_request()
273
  assert request.url.params["organization_id"] == "value organization_id/test"
 
274
  assert (
275
  request.url.params["connected_account_id"]
276
  == "value connected_account_id/test"
@@ -294,10 +333,12 @@ class TestPipes:
294
  "test_user_id",
295
  "test_slug",
296
  organization_id="value organization_id/test",
 
297
  connected_account_id="value connected_account_id/test",
298
  )
299
  request = httpx_mock.get_request()
300
  assert request.url.params["organization_id"] == "value organization_id/test"
 
301
  assert (
302
  request.url.params["connected_account_id"]
303
  == "value connected_account_id/test"
@@ -321,10 +362,13 @@ class TestPipes:
321
  json=load_fixture("data_integrations_list_response.json")
322
  )
323
  workos.pipes.list_user_data_providers(
 
324
- "test_user_id", organization_id="value organization_id/test"
 
325
  )
326
  request = httpx_mock.get_request()
327
  assert request.url.params["organization_id"] == "value organization_id/test"
 
328
 
329
  def test_list_data_integrations_with_request_options(self, workos, httpx_mock):
330
  httpx_mock.add_response(json={"data": [], "list_metadata": {}})
@@ -428,12 +472,14 @@ class TestAsyncPipes:
428
  before="cursor before",
429
  after="cursor/after",
430
  order=PaginationOrder("value_order"),
 
431
  )
432
  request = httpx_mock.get_request()
433
  assert request.url.params["limit"] == "10"
434
  assert request.url.params["before"] == "cursor before"
435
  assert request.url.params["after"] == "cursor/after"
436
  assert request.url.params["order"] == "value_order"
 
437
 
438
  @pytest.mark.asyncio
439
  async def test_create_data_integration(self, async_workos, httpx_mock):
@@ -544,6 +590,43 @@ class TestAsyncPipes:
544
  assert request.method == "POST"
545
  assert request.url.path.endswith("/data-integrations/test_slug/credentials")
546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  @pytest.mark.asyncio
548
  async def test_get_access_token(self, async_workos, httpx_mock):
549
  httpx_mock.add_response(
@@ -583,10 +666,12 @@ class TestAsyncPipes:
583
  "test_user_id",
584
  "test_slug",
585
  organization_id="value organization_id/test",
 
586
  connected_account_id="value connected_account_id/test",
587
  )
588
  request = httpx_mock.get_request()
589
  assert request.url.params["organization_id"] == "value organization_id/test"
 
590
  assert (
591
  request.url.params["connected_account_id"]
592
  == "value connected_account_id/test"
@@ -642,10 +727,12 @@ class TestAsyncPipes:
642
  "test_user_id",
643
  "test_slug",
644
  organization_id="value organization_id/test",
 
645
  connected_account_id="value connected_account_id/test",
646
  )
647
  request = httpx_mock.get_request()
648
  assert request.url.params["organization_id"] == "value organization_id/test"
 
649
  assert (
650
  request.url.params["connected_account_id"]
651
  == "value connected_account_id/test"
@@ -673,10 +760,12 @@ class TestAsyncPipes:
673
  "test_user_id",
674
  "test_slug",
675
  organization_id="value organization_id/test",
 
676
  connected_account_id="value connected_account_id/test",
677
  )
678
  request = httpx_mock.get_request()
679
  assert request.url.params["organization_id"] == "value organization_id/test"
 
680
  assert (
681
  request.url.params["connected_account_id"]
682
  == "value connected_account_id/test"
@@ -704,10 +793,13 @@ class TestAsyncPipes:
704
  json=load_fixture("data_integrations_list_response.json")
705
  )
706
  await async_workos.pipes.list_user_data_providers(
 
707
- "test_user_id", organization_id="value organization_id/test"
 
708
  )
709
  request = httpx_mock.get_request()
710
  assert request.url.params["organization_id"] == "value organization_id/test"
 
711
 
712
  @pytest.mark.asyncio
713
  async def test_list_data_integrations_with_request_options(
 
25
  DataIntegrationAuthorizeUrlResponse,
26
  DataIntegrationCredentialsResponse,
27
  DataIntegrationsListResponse,
28
+ PipesOwnership,
29
  )
30
 
31
 
 
52
  before="cursor before",
53
  after="cursor/after",
54
  order=PaginationOrder("value_order"),
55
+ ownership=PipesOwnership("user"),
56
  )
57
  request = httpx_mock.get_request()
58
  assert request.url.params["limit"] == "10"
59
  assert request.url.params["before"] == "cursor before"
60
  assert request.url.params["after"] == "cursor/after"
61
  assert request.url.params["order"] == "value_order"
62
+ assert request.url.params["ownership"] == "user"
63
 
64
  def test_create_data_integration(self, workos, httpx_mock):
65
  httpx_mock.add_response(
 
181
  body = json.loads(request.content)
182
  assert body["user_id"] == "test_user_id"
183
 
184
+ def test_list_data_integration_organization(self, workos, httpx_mock):
185
+ httpx_mock.add_response(
186
+ json=load_fixture("data_integration.json"),
187
+ )
188
+ result = workos.pipes.list_data_integration_organization("test_slug")
189
+ assert isinstance(result, DataIntegration)
190
+ assert result.object == "data_integration"
191
+ assert result.id == "data_integration_01EHZNVPK3SFK441A1RGBFSHRT"
192
+ request = httpx_mock.get_request()
193
+ assert request.method == "GET"
194
+ assert request.url.path.endswith("/data-integrations/test_slug/organization")
195
+
196
+ def test_update_data_integration_organization(self, workos, httpx_mock):
197
+ httpx_mock.add_response(
198
+ json=load_fixture("data_integration.json"),
199
+ )
200
+ result = workos.pipes.update_data_integration_organization("test_slug")
201
+ assert isinstance(result, DataIntegration)
202
+ assert result.object == "data_integration"
203
+ assert result.id == "data_integration_01EHZNVPK3SFK441A1RGBFSHRT"
204
+ request = httpx_mock.get_request()
205
+ assert request.method == "PUT"
206
+ assert request.url.path.endswith("/data-integrations/test_slug/organization")
207
+
208
+ def test_delete_data_integration_organization(self, workos, httpx_mock):
209
+ httpx_mock.add_response(status_code=204)
210
+ result = workos.pipes.delete_data_integration_organization("test_slug")
211
+ assert result is None
212
+ request = httpx_mock.get_request()
213
+ assert request.method == "DELETE"
214
+ assert request.url.path.endswith("/data-integrations/test_slug/organization")
215
+
216
  def test_get_access_token(self, workos, httpx_mock):
217
  httpx_mock.add_response(
218
  json=load_fixture("data_integration_access_token_response.json"),
 
247
  "test_user_id",
248
  "test_slug",
249
  organization_id="value organization_id/test",
250
+ supports_multiple_connections=True,
251
  connected_account_id="value connected_account_id/test",
252
  )
253
  request = httpx_mock.get_request()
254
  assert request.url.params["organization_id"] == "value organization_id/test"
255
+ assert request.url.params["supports_multiple_connections"] == "true"
256
  assert (
257
  request.url.params["connected_account_id"]
258
  == "value connected_account_id/test"
 
304
  "test_user_id",
305
  "test_slug",
306
  organization_id="value organization_id/test",
307
+ supports_multiple_connections=True,
308
  connected_account_id="value connected_account_id/test",
309
  )
310
  request = httpx_mock.get_request()
311
  assert request.url.params["organization_id"] == "value organization_id/test"
312
+ assert request.url.params["supports_multiple_connections"] == "true"
313
  assert (
314
  request.url.params["connected_account_id"]
315
  == "value connected_account_id/test"
 
333
  "test_user_id",
334
  "test_slug",
335
  organization_id="value organization_id/test",
336
+ supports_multiple_connections=True,
337
  connected_account_id="value connected_account_id/test",
338
  )
339
  request = httpx_mock.get_request()
340
  assert request.url.params["organization_id"] == "value organization_id/test"
341
+ assert request.url.params["supports_multiple_connections"] == "true"
342
  assert (
343
  request.url.params["connected_account_id"]
344
  == "value connected_account_id/test"
 
362
  json=load_fixture("data_integrations_list_response.json")
363
  )
364
  workos.pipes.list_user_data_providers(
365
+ "test_user_id",
366
+ organization_id="value organization_id/test",
367
+ supports_multiple_connections=True,
368
  )
369
  request = httpx_mock.get_request()
370
  assert request.url.params["organization_id"] == "value organization_id/test"
371
+ assert request.url.params["supports_multiple_connections"] == "true"
372
 
373
  def test_list_data_integrations_with_request_options(self, workos, httpx_mock):
374
  httpx_mock.add_response(json={"data": [], "list_metadata": {}})
 
472
  before="cursor before",
473
  after="cursor/after",
474
  order=PaginationOrder("value_order"),
475
+ ownership=PipesOwnership("user"),
476
  )
477
  request = httpx_mock.get_request()
478
  assert request.url.params["limit"] == "10"
479
  assert request.url.params["before"] == "cursor before"
480
  assert request.url.params["after"] == "cursor/after"
481
  assert request.url.params["order"] == "value_order"
482
+ assert request.url.params["ownership"] == "user"
483
 
484
  @pytest.mark.asyncio
485
  async def test_create_data_integration(self, async_workos, httpx_mock):
 
590
  assert request.method == "POST"
591
  assert request.url.path.endswith("/data-integrations/test_slug/credentials")
592
 
593
+ @pytest.mark.asyncio
594
+ async def test_list_data_integration_organization(self, async_workos, httpx_mock):
595
+ httpx_mock.add_response(json=load_fixture("data_integration.json"))
596
+ result = await async_workos.pipes.list_data_integration_organization(
597
+ "test_slug"
598
+ )
599
+ assert isinstance(result, DataIntegration)
600
+ assert result.object == "data_integration"
601
+ assert result.id == "data_integration_01EHZNVPK3SFK441A1RGBFSHRT"
602
+ request = httpx_mock.get_request()
603
+ assert request.method == "GET"
604
+ assert request.url.path.endswith("/data-integrations/test_slug/organization")
605
+
606
+ @pytest.mark.asyncio
607
+ async def test_update_data_integration_organization(self, async_workos, httpx_mock):
608
+ httpx_mock.add_response(json=load_fixture("data_integration.json"))
609
+ result = await async_workos.pipes.update_data_integration_organization(
610
+ "test_slug"
611
+ )
612
+ assert isinstance(result, DataIntegration)
613
+ assert result.object == "data_integration"
614
+ assert result.id == "data_integration_01EHZNVPK3SFK441A1RGBFSHRT"
615
+ request = httpx_mock.get_request()
616
+ assert request.method == "PUT"
617
+ assert request.url.path.endswith("/data-integrations/test_slug/organization")
618
+
619
+ @pytest.mark.asyncio
620
+ async def test_delete_data_integration_organization(self, async_workos, httpx_mock):
621
+ httpx_mock.add_response(status_code=204)
622
+ result = await async_workos.pipes.delete_data_integration_organization(
623
+ "test_slug"
624
+ )
625
+ assert result is None
626
+ request = httpx_mock.get_request()
627
+ assert request.method == "DELETE"
628
+ assert request.url.path.endswith("/data-integrations/test_slug/organization")
629
+
630
  @pytest.mark.asyncio
631
  async def test_get_access_token(self, async_workos, httpx_mock):
632
  httpx_mock.add_response(
 
666
  "test_user_id",
667
  "test_slug",
668
  organization_id="value organization_id/test",
669
+ supports_multiple_connections=True,
670
  connected_account_id="value connected_account_id/test",
671
  )
672
  request = httpx_mock.get_request()
673
  assert request.url.params["organization_id"] == "value organization_id/test"
674
+ assert request.url.params["supports_multiple_connections"] == "true"
675
  assert (
676
  request.url.params["connected_account_id"]
677
  == "value connected_account_id/test"
 
727
  "test_user_id",
728
  "test_slug",
729
  organization_id="value organization_id/test",
730
+ supports_multiple_connections=True,
731
  connected_account_id="value connected_account_id/test",
732
  )
733
  request = httpx_mock.get_request()
734
  assert request.url.params["organization_id"] == "value organization_id/test"
735
+ assert request.url.params["supports_multiple_connections"] == "true"
736
  assert (
737
  request.url.params["connected_account_id"]
738
  == "value connected_account_id/test"
 
760
  "test_user_id",
761
  "test_slug",
762
  organization_id="value organization_id/test",
763
+ supports_multiple_connections=True,
764
  connected_account_id="value connected_account_id/test",
765
  )
766
  request = httpx_mock.get_request()
767
  assert request.url.params["organization_id"] == "value organization_id/test"
768
+ assert request.url.params["supports_multiple_connections"] == "true"
769
  assert (
770
  request.url.params["connected_account_id"]
771
  == "value connected_account_id/test"
 
793
  json=load_fixture("data_integrations_list_response.json")
794
  )
795
  await async_workos.pipes.list_user_data_providers(
796
+ "test_user_id",
797
+ organization_id="value organization_id/test",
798
+ supports_multiple_connections=True,
799
  )
800
  request = httpx_mock.get_request()
801
  assert request.url.params["organization_id"] == "value organization_id/test"
802
+ assert request.url.params["supports_multiple_connections"] == "true"
803
 
804
  @pytest.mark.asyncio
805
  async def test_list_data_integrations_with_request_options(
python/tests/test_pipes_models_round_trip.py
python/tests/test_pipes_models_round_trip.py CHANGED
@@ -229,6 +229,7 @@ class TestModelRoundTrip:
229
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
230
  "slug": "github",
231
  "integration_type": "github",
 
232
  "description": None,
233
  "enabled": True,
234
  "state": "valid",
@@ -248,6 +249,7 @@ class TestModelRoundTrip:
248
  assert serialized["id"] == data["id"]
249
  assert serialized["slug"] == data["slug"]
250
  assert serialized["integration_type"] == data["integration_type"]
 
251
  assert serialized["description"] == data["description"]
252
  assert serialized["enabled"] == data["enabled"]
253
  assert serialized["state"] == data["state"]
@@ -267,6 +269,7 @@ class TestModelRoundTrip:
267
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
268
  "slug": "github",
269
  "integration_type": "github",
 
270
  "description": None,
271
  "enabled": True,
272
  "state": "valid",
@@ -294,9 +297,10 @@ class TestModelRoundTrip:
294
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
295
  "slug": "github",
296
  "integration_type": "github",
 
297
  "description": "Production GitHub app",
298
  "enabled": True,
299
- "state": "unexpected_data_integration_state",
300
  "scopes": ["repo", "read:org"],
301
  "redirect_uri": "https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback",
302
  "auth_methods": ["oauth"],
@@ -909,7 +913,7 @@ class TestModelRoundTrip:
909
  def test_data_integration_installation_minimal_payload(self):
910
  data = {
911
  "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
912
- "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
913
  "organization_id": None,
914
  "api_key_last_4": None,
915
  }
@@ -923,12 +927,13 @@ class TestModelRoundTrip:
923
  def test_data_integration_installation_preserves_nullable_fields(self):
924
  data = {
925
  "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
926
- "user_id": "user_01EHZNVPK3SFK441A1RGBFSHRT",
927
  "organization_id": None,
928
  "api_key_last_4": None,
929
  }
930
  instance = DataIntegrationInstallation.from_dict(data)
931
  serialized = instance.to_dict()
 
932
  assert serialized["organization_id"] is None
933
  assert serialized["api_key_last_4"] is None
934
 
 
229
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
230
  "slug": "github",
231
  "integration_type": "github",
232
+ "ownership": "user",
233
  "description": None,
234
  "enabled": True,
235
  "state": "valid",
 
249
  assert serialized["id"] == data["id"]
250
  assert serialized["slug"] == data["slug"]
251
  assert serialized["integration_type"] == data["integration_type"]
252
+ assert serialized["ownership"] == data["ownership"]
253
  assert serialized["description"] == data["description"]
254
  assert serialized["enabled"] == data["enabled"]
255
  assert serialized["state"] == data["state"]
 
269
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
270
  "slug": "github",
271
  "integration_type": "github",
272
+ "ownership": "user",
273
  "description": None,
274
  "enabled": True,
275
  "state": "valid",
 
297
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
298
  "slug": "github",
299
  "integration_type": "github",
300
+ "ownership": "unexpected_data_integration_ownership",
301
  "description": "Production GitHub app",
302
  "enabled": True,
303
+ "state": "valid",
304
  "scopes": ["repo", "read:org"],
305
  "redirect_uri": "https://api.workos.com/data-integrations/github/dik_01EHZNVPK3SFK441A1RGBFSHRT/callback",
306
  "auth_methods": ["oauth"],
 
913
  def test_data_integration_installation_minimal_payload(self):
914
  data = {
915
  "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
916
+ "user_id": None,
917
  "organization_id": None,
918
  "api_key_last_4": None,
919
  }
 
927
  def test_data_integration_installation_preserves_nullable_fields(self):
928
  data = {
929
  "id": "data_installation_01EHZNVPK3SFK441A1RGBFSHRT",
930
+ "user_id": None,
931
  "organization_id": None,
932
  "api_key_last_4": None,
933
  }
934
  instance = DataIntegrationInstallation.from_dict(data)
935
  serialized = instance.to_dict()
936
+ assert serialized["user_id"] is None
937
  assert serialized["organization_id"] is None
938
  assert serialized["api_key_last_4"] is None
939
 
python/tests/test_user_management.py
python/tests/test_user_management.py CHANGED
@@ -23,6 +23,7 @@ from workos.common.models import (
23
  from workos.user_management._resource import PasswordPlaintext
24
  from workos.user_management.models import (
25
  AuthenticateResponse,
 
26
  AuthorizedConnectApplicationListData,
27
  CORSOriginResponse,
28
  DeviceAuthorizationResponse,
@@ -147,6 +148,61 @@ class TestUserManagement:
147
  assert request.method == "POST"
148
  assert request.url.path.endswith("/user_management/sessions/revoke")
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  def test_list_cors_origins(self, workos, httpx_mock):
151
  httpx_mock.add_response(
152
  json=load_fixture("list_cors_origin_response.json"),
@@ -1149,6 +1205,66 @@ class TestAsyncUserManagement:
1149
  assert request.method == "POST"
1150
  assert request.url.path.endswith("/user_management/sessions/revoke")
1151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1152
  @pytest.mark.asyncio
1153
  async def test_list_cors_origins(self, async_workos, httpx_mock):
1154
  httpx_mock.add_response(json=load_fixture("list_cors_origin_response.json"))
 
23
  from workos.user_management._resource import PasswordPlaintext
24
  from workos.user_management.models import (
25
  AuthenticateResponse,
26
+ AuthkitOAuthResource,
27
  AuthorizedConnectApplicationListData,
28
  CORSOriginResponse,
29
  DeviceAuthorizationResponse,
 
148
  assert request.method == "POST"
149
  assert request.url.path.endswith("/user_management/sessions/revoke")
150
 
151
+ def test_list_authkit_oauth_resources(self, workos, httpx_mock):
152
+ httpx_mock.add_response(
153
+ json=load_fixture("list_authkit_oauth_resource.json"),
154
+ )
155
+ page = workos.user_management.list_authkit_oauth_resources()
156
+ assert isinstance(page, SyncPage)
157
+ assert len(page.data) == 1
158
+ assert isinstance(page.data[0], AuthkitOAuthResource)
159
+
160
+ def test_list_authkit_oauth_resources_empty_page(self, workos, httpx_mock):
161
+ httpx_mock.add_response(json={"data": [], "list_metadata": {}})
162
+ page = workos.user_management.list_authkit_oauth_resources()
163
+ assert isinstance(page, SyncPage)
164
+ assert page.data == []
165
+
166
+ def test_list_authkit_oauth_resources_encodes_query_params(
167
+ self, workos, httpx_mock
168
+ ):
169
+ httpx_mock.add_response(json={"data": [], "list_metadata": {}})
170
+ workos.user_management.list_authkit_oauth_resources(
171
+ limit=10,
172
+ before="cursor before",
173
+ after="cursor/after",
174
+ order=PaginationOrder("value_order"),
175
+ )
176
+ request = httpx_mock.get_request()
177
+ assert request.url.params["limit"] == "10"
178
+ assert request.url.params["before"] == "cursor before"
179
+ assert request.url.params["after"] == "cursor/after"
180
+ assert request.url.params["order"] == "value_order"
181
+
182
+ def test_create_authkit_oauth_resource(self, workos, httpx_mock):
183
+ httpx_mock.add_response(
184
+ json=load_fixture("authkit_oauth_resource.json"),
185
+ )
186
+ result = workos.user_management.create_authkit_oauth_resource(uri="test_uri")
187
+ assert isinstance(result, AuthkitOAuthResource)
188
+ assert result.object == "authkit_oauth_resource"
189
+ assert result.id == "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT"
190
+ request = httpx_mock.get_request()
191
+ assert request.method == "POST"
192
+ assert request.url.path.endswith("/user_management/authkit_oauth_resources")
193
+ body = json.loads(request.content)
194
+ assert body["uri"] == "test_uri"
195
+
196
+ def test_delete_authkit_oauth_resource(self, workos, httpx_mock):
197
+ httpx_mock.add_response(status_code=204)
198
+ result = workos.user_management.delete_authkit_oauth_resource("test_id")
199
+ assert result is None
200
+ request = httpx_mock.get_request()
201
+ assert request.method == "DELETE"
202
+ assert request.url.path.endswith(
203
+ "/user_management/authkit_oauth_resources/test_id"
204
+ )
205
+
206
  def test_list_cors_origins(self, workos, httpx_mock):
207
  httpx_mock.add_response(
208
  json=load_fixture("list_cors_origin_response.json"),
 
1205
  assert request.method == "POST"
1206
  assert request.url.path.endswith("/user_management/sessions/revoke")
1207
 
1208
+ @pytest.mark.asyncio
1209
+ async def test_list_authkit_oauth_resources(self, async_workos, httpx_mock):
1210
+ httpx_mock.add_response(json=load_fixture("list_authkit_oauth_resource.json"))
1211
+ page = await async_workos.user_management.list_authkit_oauth_resources()
1212
+ assert isinstance(page, AsyncPage)
1213
+ assert len(page.data) == 1
1214
+ assert isinstance(page.data[0], AuthkitOAuthResource)
1215
+
1216
+ @pytest.mark.asyncio
1217
+ async def test_list_authkit_oauth_resources_empty_page(
1218
+ self, async_workos, httpx_mock
1219
+ ):
1220
+ httpx_mock.add_response(json={"data": [], "list_metadata": {}})
1221
+ page = await async_workos.user_management.list_authkit_oauth_resources()
1222
+ assert isinstance(page, AsyncPage)
1223
+ assert page.data == []
1224
+
1225
+ @pytest.mark.asyncio
1226
+ async def test_list_authkit_oauth_resources_encodes_query_params(
1227
+ self, async_workos, httpx_mock
1228
+ ):
1229
+ httpx_mock.add_response(json={"data": [], "list_metadata": {}})
1230
+ await async_workos.user_management.list_authkit_oauth_resources(
1231
+ limit=10,
1232
+ before="cursor before",
1233
+ after="cursor/after",
1234
+ order=PaginationOrder("value_order"),
1235
+ )
1236
+ request = httpx_mock.get_request()
1237
+ assert request.url.params["limit"] == "10"
1238
+ assert request.url.params["before"] == "cursor before"
1239
+ assert request.url.params["after"] == "cursor/after"
1240
+ assert request.url.params["order"] == "value_order"
1241
+
1242
+ @pytest.mark.asyncio
1243
+ async def test_create_authkit_oauth_resource(self, async_workos, httpx_mock):
1244
+ httpx_mock.add_response(json=load_fixture("authkit_oauth_resource.json"))
1245
+ result = await async_workos.user_management.create_authkit_oauth_resource(
1246
+ uri="test_uri"
1247
+ )
1248
+ assert isinstance(result, AuthkitOAuthResource)
1249
+ assert result.object == "authkit_oauth_resource"
1250
+ assert result.id == "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT"
1251
+ request = httpx_mock.get_request()
1252
+ assert request.method == "POST"
1253
+ assert request.url.path.endswith("/user_management/authkit_oauth_resources")
1254
+
1255
+ @pytest.mark.asyncio
1256
+ async def test_delete_authkit_oauth_resource(self, async_workos, httpx_mock):
1257
+ httpx_mock.add_response(status_code=204)
1258
+ result = await async_workos.user_management.delete_authkit_oauth_resource(
1259
+ "test_id"
1260
+ )
1261
+ assert result is None
1262
+ request = httpx_mock.get_request()
1263
+ assert request.method == "DELETE"
1264
+ assert request.url.path.endswith(
1265
+ "/user_management/authkit_oauth_resources/test_id"
1266
+ )
1267
+
1268
  @pytest.mark.asyncio
1269
  async def test_list_cors_origins(self, async_workos, httpx_mock):
1270
  httpx_mock.add_response(json=load_fixture("list_cors_origin_response.json"))
python/tests/test_user_management_models_round_trip.py
python/tests/test_user_management_models_round_trip.py CHANGED
@@ -7,6 +7,7 @@ from workos.user_management.models import (
7
  AuthenticateResponse,
8
  AuthenticateResponseImpersonator,
9
  AuthenticateResponseOAuthToken,
 
10
  AuthorizedConnectApplicationListData,
11
  CORSOriginResponse,
12
  DeviceAuthorizationResponse,
@@ -200,6 +201,32 @@ class TestModelRoundTrip:
200
  assert serialized["verification_id"] == data["verification_id"]
201
  assert serialized["phone_number"] == data["phone_number"]
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  def test_redirect_uri_round_trip(self):
204
  data = load_fixture("redirect_uri.json")
205
  instance = RedirectUri.from_dict(data)
 
7
  AuthenticateResponse,
8
  AuthenticateResponseImpersonator,
9
  AuthenticateResponseOAuthToken,
10
+ AuthkitOAuthResource,
11
  AuthorizedConnectApplicationListData,
12
  CORSOriginResponse,
13
  DeviceAuthorizationResponse,
 
201
  assert serialized["verification_id"] == data["verification_id"]
202
  assert serialized["phone_number"] == data["phone_number"]
203
 
204
+ def test_authkit_oauth_resource_round_trip(self):
205
+ data = load_fixture("authkit_oauth_resource.json")
206
+ instance = AuthkitOAuthResource.from_dict(data)
207
+ serialized = instance.to_dict()
208
+ assert serialized == data
209
+ restored = AuthkitOAuthResource.from_dict(serialized)
210
+ assert restored.to_dict() == serialized
211
+
212
+ def test_authkit_oauth_resource_minimal_payload(self):
213
+ data = {
214
+ "object": "authkit_oauth_resource",
215
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
216
+ "uri": "https://api.example.com",
217
+ "default": False,
218
+ "created_at": "2026-01-15T12:00:00.000Z",
219
+ "updated_at": "2026-01-15T12:00:00.000Z",
220
+ }
221
+ instance = AuthkitOAuthResource.from_dict(data)
222
+ serialized = instance.to_dict()
223
+ assert serialized["object"] == data["object"]
224
+ assert serialized["id"] == data["id"]
225
+ assert serialized["uri"] == data["uri"]
226
+ assert serialized["default"] == data["default"]
227
+ assert serialized["created_at"] == data["created_at"]
228
+ assert serialized["updated_at"] == data["updated_at"]
229
+
230
  def test_redirect_uri_round_trip(self):
231
  data = load_fixture("redirect_uri.json")
232
  instance = RedirectUri.from_dict(data)

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

code: 34 · tests: 5 · manifest: 1

ruby/.oagen-manifest.json
ruby/.oagen-manifest.json CHANGED
@@ -318,6 +318,7 @@
318
  "lib/workos/radar/radar_standalone_update_radar_attempt_request.rb",
319
  "lib/workos/radar/radar_standalone_update_radar_list_request.rb",
320
  "lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb",
 
321
  "lib/workos/shared/agent_blueprint_created.rb",
322
  "lib/workos/shared/agent_blueprint_created_data.rb",
323
  "lib/workos/shared/agent_blueprint_created_data_invocable_by.rb",
@@ -478,6 +479,7 @@
478
  "lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb",
479
  "lib/workos/types/create_connection_oidc_options_token_authentication_method.rb",
480
  "lib/workos/types/create_data_integration_auth_methods.rb",
 
481
  "lib/workos/types/create_user_invite_options_locale.rb",
482
  "lib/workos/types/create_user_password_hash_type.rb",
483
  "lib/workos/types/create_user_password_salt_position.rb",
@@ -490,11 +492,16 @@
490
  "lib/workos/types/data_integration_credentials_input_type.rb",
491
  "lib/workos/types/data_integration_credentials_response_error.rb",
492
  "lib/workos/types/data_integration_custom_provider_authenticate_via.rb",
 
493
  "lib/workos/types/data_integration_state.rb",
 
494
  "lib/workos/types/data_integrations_list_response_data_auth_methods.rb",
495
  "lib/workos/types/data_integrations_list_response_data_connected_account_auth_method.rb",
496
  "lib/workos/types/data_integrations_list_response_data_connected_account_state.rb",
497
  "lib/workos/types/data_integrations_list_response_data_ownership.rb",
 
 
 
498
  "lib/workos/types/directory_state.rb",
499
  "lib/workos/types/directory_type.rb",
500
  "lib/workos/types/directory_user_state.rb",
@@ -546,6 +553,7 @@
546
  "lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb",
547
  "lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb",
548
  "lib/workos/types/pipe_connected_account_state.rb",
 
549
  "lib/workos/types/profile_connection_type.rb",
550
  "lib/workos/types/radar_list_action.rb",
551
  "lib/workos/types/radar_list_type.rb",
@@ -657,10 +665,12 @@
657
  "lib/workos/user_management/authentication_sso_timed_out_data.rb",
658
  "lib/workos/user_management/authentication_sso_timed_out_data_error.rb",
659
  "lib/workos/user_management/authentication_sso_timed_out_data_sso.rb",
 
660
  "lib/workos/user_management/authorization_code_session_authenticate_request.rb",
661
  "lib/workos/user_management/authorized_connect_application_list_data.rb",
662
  "lib/workos/user_management/confirm_email_change.rb",
663
  "lib/workos/user_management/cors_origin_response.rb",
 
664
  "lib/workos/user_management/create_cors_origin.rb",
665
  "lib/workos/user_management/create_magic_code_and_return.rb",
666
  "lib/workos/user_management/create_password_reset.rb",
@@ -794,6 +804,7 @@
794
  "lib/workos/widgets/widget_session_token.rb",
795
  "lib/workos/widgets/widget_session_token_response.rb",
796
  "rbi/workos/access_token_agent_registration_credential_issued_data_detail.rbi",
 
797
  "rbi/workos/action_authentication_denied.rbi",
798
  "rbi/workos/action_authentication_denied_data.rbi",
799
  "rbi/workos/action_user_registration_denied.rbi",
@@ -962,6 +973,7 @@
962
  "rbi/workos/authentication_sso_timed_out_data.rbi",
963
  "rbi/workos/authentication_sso_timed_out_data_error.rbi",
964
  "rbi/workos/authentication_sso_timed_out_data_sso.rbi",
 
965
  "rbi/workos/authorization.rbi",
966
  "rbi/workos/authorization_check.rbi",
967
  "rbi/workos/authorization_code_session_authenticate_request.rbi",
@@ -1005,6 +1017,7 @@
1005
  "rbi/workos/connection_saml_certificate_renewed_data_connection.rbi",
1006
  "rbi/workos/cors_origin_response.rbi",
1007
  "rbi/workos/create_application_secret.rbi",
 
1008
  "rbi/workos/create_authorization_permission.rbi",
1009
  "rbi/workos/create_authorization_resource.rbi",
1010
  "rbi/workos/create_connection.rbi",
@@ -1462,6 +1475,34 @@
1462
  "test/workos/test_widgets_model_round_trip.rb"
1463
  ],
1464
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1465
  "PATCH /agents/claims/attempts": {
1466
  "sdkMethod": "update_attempts",
1467
  "service": "agents"
@@ -1474,6 +1515,30 @@
1474
  "sdkMethod": "get_registration",
1475
  "service": "agents"
1476
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1477
  "POST /auth/challenges/{id}/verify": {
1478
  "sdkMethod": "verify_challenge",
1479
  "service": "multi_factor_auth"
@@ -1726,10 +1791,54 @@
1726
  "sdkMethod": "list_connections",
1727
  "service": "sso"
1728
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1729
  "GET /connections/{id}": {
1730
  "sdkMethod": "get_connection",
1731
  "service": "sso"
1732
  },
 
 
 
 
1733
  "DELETE /connections/{id}": {
1734
  "sdkMethod": "delete_connection",
1735
  "service": "sso"
@@ -1762,10 +1871,26 @@
1762
  "sdkMethod": "authorize_data_integration",
1763
  "service": "pipes"
1764
  },
 
 
 
 
1765
  "POST /data-integrations/{slug}/credentials": {
1766
  "sdkMethod": "create_data_integration_credential",
1767
  "service": "pipes"
1768
  },
 
 
 
 
 
 
 
 
 
 
 
 
1769
  "POST /data-integrations/{provider}/token": {
1770
  "sdkMethod": "get_access_token",
1771
  "service": "pipes"
@@ -1934,6 +2059,34 @@
1934
  "sdkMethod": "list_authorized_applications",
1935
  "service": "organizations"
1936
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1937
  "POST /portal/generate_link": {
1938
  "sdkMethod": "generate_link",
1939
  "service": "admin_portal"
@@ -2046,6 +2199,18 @@
2046
  "sdkMethod": "revoke_session",
2047
  "service": "user_management"
2048
  },
 
 
 
 
 
 
 
 
 
 
 
 
2049
  "GET /user_management/cors_origins": {
2050
  "sdkMethod": "list_cors_origins",
2051
  "service": "user_management"
@@ -2246,6 +2411,34 @@
2246
  "sdkMethod": "create_user_auth_factor",
2247
  "service": "multi_factor_auth"
2248
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2249
  "POST /vault/v1/keys/data-key": {
2250
  "sdkMethod": "create_data_key",
2251
  "service": "vault"
@@ -2353,162 +2546,6 @@
2353
  "GET /audit_logs/exports/{auditLogExportId}": {
2354
  "sdkMethod": "get_export",
2355
  "service": "audit_logs"
2356
- },
2357
- "PUT /data-integrations/{slug}/client-credentials": {
2358
- "sdkMethod": "update_data_integration_client_credentials",
2359
- "service": "pipes"
2360
- },
2361
- "GET /agents/blueprints": {
2362
- "sdkMethod": "list_blueprints",
2363
- "service": "agents"
2364
- },
2365
- "POST /agents/blueprints": {
2366
- "sdkMethod": "create_blueprint",
2367
- "service": "agents"
2368
- },
2369
- "GET /agents/blueprints/{agent_blueprint_id}": {
2370
- "sdkMethod": "get_blueprint",
2371
- "service": "agents"
2372
- },
2373
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
2374
- "sdkMethod": "update_blueprint",
2375
- "service": "agents"
2376
- },
2377
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
2378
- "sdkMethod": "delete_blueprint",
2379
- "service": "agents"
2380
- },
2381
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
2382
- "sdkMethod": "create_blueprint_token",
2383
- "service": "agents"
2384
- },
2385
- "GET /agents/instances": {
2386
- "sdkMethod": "list_instances",
2387
- "service": "agents"
2388
- },
2389
- "GET /agents/instances/{agent_instance_id}": {
2390
- "sdkMethod": "get_instance",
2391
- "service": "agents"
2392
- },
2393
- "DELETE /agents/instances/{agent_instance_id}": {
2394
- "sdkMethod": "delete_instance",
2395
- "service": "agents"
2396
- },
2397
- "GET /agents/sessions": {
2398
- "sdkMethod": "list_sessions",
2399
- "service": "agents"
2400
- },
2401
- "GET /agents/sessions/{agent_instance_session_id}": {
2402
- "sdkMethod": "get_session",
2403
- "service": "agents"
2404
- },
2405
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
2406
- "sdkMethod": "revoke_session",
2407
- "service": "agents"
2408
- },
2409
- "POST /connections": {
2410
- "sdkMethod": "create_connection",
2411
- "service": "sso"
2412
- },
2413
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
2414
- "sdkMethod": "list_connection_saml_idp_signing_certs",
2415
- "service": "sso"
2416
- },
2417
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
2418
- "sdkMethod": "create_connection_saml_idp_signing_cert",
2419
- "service": "sso"
2420
- },
2421
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
2422
- "sdkMethod": "delete_connection_saml_idp_signing_cert",
2423
- "service": "sso"
2424
- },
2425
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
2426
- "sdkMethod": "list_connection_saml_sp_encryption_certs",
2427
- "service": "sso"
2428
- },
2429
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
2430
- "sdkMethod": "create_connection_saml_sp_encryption_cert",
2431
- "service": "sso"
2432
- },
2433
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
2434
- "sdkMethod": "delete_connection_saml_sp_encryption_cert",
2435
- "service": "sso"
2436
- },
2437
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
2438
- "sdkMethod": "list_connection_saml_sp_signing_cert",
2439
- "service": "sso"
2440
- },
2441
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
2442
- "sdkMethod": "create_connection_saml_sp_signing_cert",
2443
- "service": "sso"
2444
- },
2445
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
2446
- "sdkMethod": "delete_connection_saml_sp_signing_cert",
2447
- "service": "sso"
2448
- },
2449
- "PATCH /connections/{id}": {
2450
- "sdkMethod": "update_connection",
2451
- "service": "sso"
2452
- },
2453
- "GET /organizations/{organization_id}/it_contacts": {
2454
- "sdkMethod": "list_it_contacts",
2455
- "service": "organizations"
2456
- },
2457
- "POST /organizations/{organization_id}/it_contacts": {
2458
- "sdkMethod": "create_it_contact",
2459
- "service": "organizations"
2460
- },
2461
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2462
- "sdkMethod": "delete_it_contact",
2463
- "service": "organizations"
2464
- },
2465
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2466
- "sdkMethod": "invite_it_contact",
2467
- "service": "organizations"
2468
- },
2469
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2470
- "sdkMethod": "revoke_it_contact",
2471
- "service": "organizations"
2472
- },
2473
- "POST /platform/teams": {
2474
- "sdkMethod": "create_team",
2475
- "service": "platform_teams"
2476
- },
2477
- "GET /platform/teams/{team_id}": {
2478
- "sdkMethod": "get_team",
2479
- "service": "platform_teams"
2480
- },
2481
- "DELETE /user_management/waitlist_entries/{id}": {
2482
- "sdkMethod": "delete_waitlist_entry",
2483
- "service": "user_management"
2484
- },
2485
- "POST /user_management/waitlist_entries/{id}/approve": {
2486
- "sdkMethod": "create_waitlist_entry_approve",
2487
- "service": "user_management"
2488
- },
2489
- "POST /user_management/waitlist_entries/{id}/deny": {
2490
- "sdkMethod": "create_waitlist_entry_deny",
2491
- "service": "user_management"
2492
- },
2493
- "GET /user_management/waitlists": {
2494
- "sdkMethod": "list_waitlists",
2495
- "service": "user_management"
2496
- },
2497
- "GET /user_management/waitlists/{id}": {
2498
- "sdkMethod": "get_waitlist",
2499
- "service": "user_management"
2500
- },
2501
- "GET /user_management/waitlists/{id}/entries": {
2502
- "sdkMethod": "list_waitlist_entries",
2503
- "service": "user_management"
2504
- },
2505
- "POST /user_management/waitlists/{id}/entries": {
2506
- "sdkMethod": "create_waitlist_entry",
2507
- "service": "user_management"
2508
- },
2509
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
2510
- "sdkMethod": "validate_blueprint_token",
2511
- "service": "agents"
2512
  }
2513
  }
2514
  }
 
318
  "lib/workos/radar/radar_standalone_update_radar_attempt_request.rb",
319
  "lib/workos/radar/radar_standalone_update_radar_list_request.rb",
320
  "lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb",
321
+ "lib/workos/shared/account_selection_required_error.rb",
322
  "lib/workos/shared/agent_blueprint_created.rb",
323
  "lib/workos/shared/agent_blueprint_created_data.rb",
324
  "lib/workos/shared/agent_blueprint_created_data_invocable_by.rb",
 
479
  "lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb",
480
  "lib/workos/types/create_connection_oidc_options_token_authentication_method.rb",
481
  "lib/workos/types/create_data_integration_auth_methods.rb",
482
+ "lib/workos/types/create_data_integration_ownership.rb",
483
  "lib/workos/types/create_user_invite_options_locale.rb",
484
  "lib/workos/types/create_user_password_hash_type.rb",
485
  "lib/workos/types/create_user_password_salt_position.rb",
 
492
  "lib/workos/types/data_integration_credentials_input_type.rb",
493
  "lib/workos/types/data_integration_credentials_response_error.rb",
494
  "lib/workos/types/data_integration_custom_provider_authenticate_via.rb",
495
+ "lib/workos/types/data_integration_ownership.rb",
496
  "lib/workos/types/data_integration_state.rb",
497
+ "lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb",
498
  "lib/workos/types/data_integrations_list_response_data_auth_methods.rb",
499
  "lib/workos/types/data_integrations_list_response_data_connected_account_auth_method.rb",
500
  "lib/workos/types/data_integrations_list_response_data_connected_account_state.rb",
501
  "lib/workos/types/data_integrations_list_response_data_ownership.rb",
502
+ "lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb",
503
+ "lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb",
504
+ "lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb",
505
  "lib/workos/types/directory_state.rb",
506
  "lib/workos/types/directory_type.rb",
507
  "lib/workos/types/directory_user_state.rb",
 
553
  "lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb",
554
  "lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb",
555
  "lib/workos/types/pipe_connected_account_state.rb",
556
+ "lib/workos/types/pipes_ownership.rb",
557
  "lib/workos/types/profile_connection_type.rb",
558
  "lib/workos/types/radar_list_action.rb",
559
  "lib/workos/types/radar_list_type.rb",
 
665
  "lib/workos/user_management/authentication_sso_timed_out_data.rb",
666
  "lib/workos/user_management/authentication_sso_timed_out_data_error.rb",
667
  "lib/workos/user_management/authentication_sso_timed_out_data_sso.rb",
668
+ "lib/workos/user_management/authkit_oauth_resource.rb",
669
  "lib/workos/user_management/authorization_code_session_authenticate_request.rb",
670
  "lib/workos/user_management/authorized_connect_application_list_data.rb",
671
  "lib/workos/user_management/confirm_email_change.rb",
672
  "lib/workos/user_management/cors_origin_response.rb",
673
+ "lib/workos/user_management/create_authkit_oauth_resource.rb",
674
  "lib/workos/user_management/create_cors_origin.rb",
675
  "lib/workos/user_management/create_magic_code_and_return.rb",
676
  "lib/workos/user_management/create_password_reset.rb",
 
804
  "lib/workos/widgets/widget_session_token.rb",
805
  "lib/workos/widgets/widget_session_token_response.rb",
806
  "rbi/workos/access_token_agent_registration_credential_issued_data_detail.rbi",
807
+ "rbi/workos/account_selection_required_error.rbi",
808
  "rbi/workos/action_authentication_denied.rbi",
809
  "rbi/workos/action_authentication_denied_data.rbi",
810
  "rbi/workos/action_user_registration_denied.rbi",
 
973
  "rbi/workos/authentication_sso_timed_out_data.rbi",
974
  "rbi/workos/authentication_sso_timed_out_data_error.rbi",
975
  "rbi/workos/authentication_sso_timed_out_data_sso.rbi",
976
+ "rbi/workos/authkit_oauth_resource.rbi",
977
  "rbi/workos/authorization.rbi",
978
  "rbi/workos/authorization_check.rbi",
979
  "rbi/workos/authorization_code_session_authenticate_request.rbi",
 
1017
  "rbi/workos/connection_saml_certificate_renewed_data_connection.rbi",
1018
  "rbi/workos/cors_origin_response.rbi",
1019
  "rbi/workos/create_application_secret.rbi",
1020
+ "rbi/workos/create_authkit_oauth_resource.rbi",
1021
  "rbi/workos/create_authorization_permission.rbi",
1022
  "rbi/workos/create_authorization_resource.rbi",
1023
  "rbi/workos/create_connection.rbi",
 
1475
  "test/workos/test_widgets_model_round_trip.rb"
1476
  ],
1477
  "operations": {
1478
+ "GET /agents/blueprints": {
1479
+ "sdkMethod": "list_blueprints",
1480
+ "service": "agents"
1481
+ },
1482
+ "POST /agents/blueprints": {
1483
+ "sdkMethod": "create_blueprint",
1484
+ "service": "agents"
1485
+ },
1486
+ "GET /agents/blueprints/{agent_blueprint_id}": {
1487
+ "sdkMethod": "get_blueprint",
1488
+ "service": "agents"
1489
+ },
1490
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
1491
+ "sdkMethod": "update_blueprint",
1492
+ "service": "agents"
1493
+ },
1494
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
1495
+ "sdkMethod": "delete_blueprint",
1496
+ "service": "agents"
1497
+ },
1498
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1499
+ "sdkMethod": "create_blueprint_token",
1500
+ "service": "agents"
1501
+ },
1502
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1503
+ "sdkMethod": "validate_blueprint_token",
1504
+ "service": "agents"
1505
+ },
1506
  "PATCH /agents/claims/attempts": {
1507
  "sdkMethod": "update_attempts",
1508
  "service": "agents"
 
1515
  "sdkMethod": "get_registration",
1516
  "service": "agents"
1517
  },
1518
+ "GET /agents/instances": {
1519
+ "sdkMethod": "list_instances",
1520
+ "service": "agents"
1521
+ },
1522
+ "GET /agents/instances/{agent_instance_id}": {
1523
+ "sdkMethod": "get_instance",
1524
+ "service": "agents"
1525
+ },
1526
+ "DELETE /agents/instances/{agent_instance_id}": {
1527
+ "sdkMethod": "delete_instance",
1528
+ "service": "agents"
1529
+ },
1530
+ "GET /agents/sessions": {
1531
+ "sdkMethod": "list_sessions",
1532
+ "service": "agents"
1533
+ },
1534
+ "GET /agents/sessions/{agent_instance_session_id}": {
1535
+ "sdkMethod": "get_session",
1536
+ "service": "agents"
1537
+ },
1538
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1539
+ "sdkMethod": "revoke_session",
1540
+ "service": "agents"
1541
+ },
1542
  "POST /auth/challenges/{id}/verify": {
1543
  "sdkMethod": "verify_challenge",
1544
  "service": "multi_factor_auth"
 
1791
  "sdkMethod": "list_connections",
1792
  "service": "sso"
1793
  },
1794
+ "POST /connections": {
1795
+ "sdkMethod": "create_connection",
1796
+ "service": "sso"
1797
+ },
1798
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1799
+ "sdkMethod": "list_connection_saml_idp_signing_certs",
1800
+ "service": "sso"
1801
+ },
1802
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1803
+ "sdkMethod": "create_connection_saml_idp_signing_cert",
1804
+ "service": "sso"
1805
+ },
1806
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1807
+ "sdkMethod": "delete_connection_saml_idp_signing_cert",
1808
+ "service": "sso"
1809
+ },
1810
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1811
+ "sdkMethod": "list_connection_saml_sp_encryption_certs",
1812
+ "service": "sso"
1813
+ },
1814
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1815
+ "sdkMethod": "create_connection_saml_sp_encryption_cert",
1816
+ "service": "sso"
1817
+ },
1818
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1819
+ "sdkMethod": "delete_connection_saml_sp_encryption_cert",
1820
+ "service": "sso"
1821
+ },
1822
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1823
+ "sdkMethod": "list_connection_saml_sp_signing_cert",
1824
+ "service": "sso"
1825
+ },
1826
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1827
+ "sdkMethod": "create_connection_saml_sp_signing_cert",
1828
+ "service": "sso"
1829
+ },
1830
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1831
+ "sdkMethod": "delete_connection_saml_sp_signing_cert",
1832
+ "service": "sso"
1833
+ },
1834
  "GET /connections/{id}": {
1835
  "sdkMethod": "get_connection",
1836
  "service": "sso"
1837
  },
1838
+ "PATCH /connections/{id}": {
1839
+ "sdkMethod": "update_connection",
1840
+ "service": "sso"
1841
+ },
1842
  "DELETE /connections/{id}": {
1843
  "sdkMethod": "delete_connection",
1844
  "service": "sso"
 
1871
  "sdkMethod": "authorize_data_integration",
1872
  "service": "pipes"
1873
  },
1874
+ "PUT /data-integrations/{slug}/client-credentials": {
1875
+ "sdkMethod": "update_data_integration_client_credentials",
1876
+ "service": "pipes"
1877
+ },
1878
  "POST /data-integrations/{slug}/credentials": {
1879
  "sdkMethod": "create_data_integration_credential",
1880
  "service": "pipes"
1881
  },
1882
+ "GET /data-integrations/{slug}/organization": {
1883
+ "sdkMethod": "list_data_integration_organization",
1884
+ "service": "pipes"
1885
+ },
1886
+ "PUT /data-integrations/{slug}/organization": {
1887
+ "sdkMethod": "update_data_integration_organization",
1888
+ "service": "pipes"
1889
+ },
1890
+ "DELETE /data-integrations/{slug}/organization": {
1891
+ "sdkMethod": "delete_data_integration_organization",
1892
+ "service": "pipes"
1893
+ },
1894
  "POST /data-integrations/{provider}/token": {
1895
  "sdkMethod": "get_access_token",
1896
  "service": "pipes"
 
2059
  "sdkMethod": "list_authorized_applications",
2060
  "service": "organizations"
2061
  },
2062
+ "GET /organizations/{organization_id}/it_contacts": {
2063
+ "sdkMethod": "list_it_contacts",
2064
+ "service": "organizations"
2065
+ },
2066
+ "POST /organizations/{organization_id}/it_contacts": {
2067
+ "sdkMethod": "create_it_contact",
2068
+ "service": "organizations"
2069
+ },
2070
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2071
+ "sdkMethod": "delete_it_contact",
2072
+ "service": "organizations"
2073
+ },
2074
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2075
+ "sdkMethod": "invite_it_contact",
2076
+ "service": "organizations"
2077
+ },
2078
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2079
+ "sdkMethod": "revoke_it_contact",
2080
+ "service": "organizations"
2081
+ },
2082
+ "POST /platform/teams": {
2083
+ "sdkMethod": "create_team",
2084
+ "service": "platform_teams"
2085
+ },
2086
+ "GET /platform/teams/{team_id}": {
2087
+ "sdkMethod": "get_team",
2088
+ "service": "platform_teams"
2089
+ },
2090
  "POST /portal/generate_link": {
2091
  "sdkMethod": "generate_link",
2092
  "service": "admin_portal"
 
2199
  "sdkMethod": "revoke_session",
2200
  "service": "user_management"
2201
  },
2202
+ "GET /user_management/authkit_oauth_resources": {
2203
+ "sdkMethod": "list_authkit_oauth_resources",
2204
+ "service": "user_management"
2205
+ },
2206
+ "POST /user_management/authkit_oauth_resources": {
2207
+ "sdkMethod": "create_authkit_oauth_resource",
2208
+ "service": "user_management"
2209
+ },
2210
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
2211
+ "sdkMethod": "delete_authkit_oauth_resource",
2212
+ "service": "user_management"
2213
+ },
2214
  "GET /user_management/cors_origins": {
2215
  "sdkMethod": "list_cors_origins",
2216
  "service": "user_management"
 
2411
  "sdkMethod": "create_user_auth_factor",
2412
  "service": "multi_factor_auth"
2413
  },
2414
+ "DELETE /user_management/waitlist_entries/{id}": {
2415
+ "sdkMethod": "delete_waitlist_entry",
2416
+ "service": "user_management"
2417
+ },
2418
+ "POST /user_management/waitlist_entries/{id}/approve": {
2419
+ "sdkMethod": "create_waitlist_entry_approve",
2420
+ "service": "user_management"
2421
+ },
2422
+ "POST /user_management/waitlist_entries/{id}/deny": {
2423
+ "sdkMethod": "create_waitlist_entry_deny",
2424
+ "service": "user_management"
2425
+ },
2426
+ "GET /user_management/waitlists": {
2427
+ "sdkMethod": "list_waitlists",
2428
+ "service": "user_management"
2429
+ },
2430
+ "GET /user_management/waitlists/{id}": {
2431
+ "sdkMethod": "get_waitlist",
2432
+ "service": "user_management"
2433
+ },
2434
+ "GET /user_management/waitlists/{id}/entries": {
2435
+ "sdkMethod": "list_waitlist_entries",
2436
+ "service": "user_management"
2437
+ },
2438
+ "POST /user_management/waitlists/{id}/entries": {
2439
+ "sdkMethod": "create_waitlist_entry",
2440
+ "service": "user_management"
2441
+ },
2442
  "POST /vault/v1/keys/data-key": {
2443
  "sdkMethod": "create_data_key",
2444
  "service": "vault"
 
2546
  "GET /audit_logs/exports/{auditLogExportId}": {
2547
  "sdkMethod": "get_export",
2548
  "service": "audit_logs"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2549
  }
2550
  }
2551
  }
ruby/lib/workos/admin_portal.rb
ruby/lib/workos/admin_portal.rb CHANGED
@@ -11,8 +11,8 @@ module WorkOS
11
  end
12
 
13
  # Generate a Portal Link
14
- # @param return_url [String, nil] The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
15
- # @param success_url [String, nil] The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
16
  # @param organization [String] An [Organization](https://workos.com/docs/reference/organization) identifier.
17
  # @param intent [WorkOS::Types::GenerateLinkIntent, nil] The intent of the Admin Portal. - `sso` - Launch Admin Portal for creating SSO connections - `dsync` - Launch Admin Portal for creating Directory Sync connections - `audit_logs` - Launch Admin Portal for viewing Audit Logs - `log_streams` - Launch Admin Portal for creating Log Streams - `domain_verification` - Launch Admin Portal for Domain Verification - `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates - `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
18
  # @param it_contact_emails [Array<String>, nil] The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.
 
11
  end
12
 
13
  # Generate a Portal Link
14
+ # @param return_url [String, nil] The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
15
+ # @param success_url [String, nil] The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
16
  # @param organization [String] An [Organization](https://workos.com/docs/reference/organization) identifier.
17
  # @param intent [WorkOS::Types::GenerateLinkIntent, nil] The intent of the Admin Portal. - `sso` - Launch Admin Portal for creating SSO connections - `dsync` - Launch Admin Portal for creating Directory Sync connections - `audit_logs` - Launch Admin Portal for viewing Audit Logs - `log_streams` - Launch Admin Portal for creating Log Streams - `domain_verification` - Launch Admin Portal for Domain Verification - `certificate_renewal` - Launch Admin Portal for renewing SAML Certificates - `bring_your_own_key` - Launch Admin Portal for configuring Bring Your Own Key
18
  # @param it_contact_emails [Array<String>, nil] The email addresses of the IT contacts to grant access to the Admin Portal for the given organization. Accepts up to 20 emails.
ruby/lib/workos/api_keys/validate_api_key.rb
ruby/lib/workos/api_keys/validate_api_key.rb CHANGED
@@ -3,5 +3,16 @@
3
  # This file is auto-generated by oagen. Do not edit.
4
 
5
  module WorkOS
6
- ValidateApiKey = CreateSAMLIdpSigningCertificate
 
 
 
 
 
 
 
 
 
 
 
7
  end
 
3
  # This file is auto-generated by oagen. Do not edit.
4
 
5
  module WorkOS
6
+ class ValidateApiKey < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ value: :value
9
+ }.freeze
10
+
11
+ attr_accessor :value
12
+
13
+ def initialize(json)
14
+ hash = self.class.normalize(json)
15
+ @value = hash[:value]
16
+ end
17
+ end
18
  end
ruby/lib/workos/inflections.rb
ruby/lib/workos/inflections.rb CHANGED
@@ -31,6 +31,7 @@ WORKOS_INFLECTIONS = {
31
  "authentication_sso_timed_out_data" => "AuthenticationSSOTimedOutData",
32
  "authentication_sso_timed_out_data_error" => "AuthenticationSSOTimedOutDataError",
33
  "authentication_sso_timed_out_data_sso" => "AuthenticationSSOTimedOutDataSSO",
 
34
  "connect_application_m2m" => "ConnectApplicationM2M",
35
  "connect_application_oauth" => "ConnectApplicationOAuth",
36
  "connect_application_oauth_redirect_uris" => "ConnectApplicationOAuthRedirectUris",
@@ -45,6 +46,7 @@ WORKOS_INFLECTIONS = {
45
  "connection_saml_certificate_renewed_data_certificate_certificate_type" => "ConnectionSAMLCertificateRenewedDataCertificateCertificateType",
46
  "connection_saml_certificate_renewed_data_connection" => "ConnectionSAMLCertificateRenewedDataConnection",
47
  "cors_origin_response" => "CORSOriginResponse",
 
48
  "create_connection_oidc_options" => "CreateConnectionOIDCOptions",
49
  "create_connection_oidc_options_id_token_signature_algorithm" => "CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm",
50
  "create_connection_oidc_options_token_authentication_method" => "CreateConnectionOIDCOptionsTokenAuthenticationMethod",
 
31
  "authentication_sso_timed_out_data" => "AuthenticationSSOTimedOutData",
32
  "authentication_sso_timed_out_data_error" => "AuthenticationSSOTimedOutDataError",
33
  "authentication_sso_timed_out_data_sso" => "AuthenticationSSOTimedOutDataSSO",
34
+ "authkit_oauth_resource" => "AuthkitOAuthResource",
35
  "connect_application_m2m" => "ConnectApplicationM2M",
36
  "connect_application_oauth" => "ConnectApplicationOAuth",
37
  "connect_application_oauth_redirect_uris" => "ConnectApplicationOAuthRedirectUris",
 
46
  "connection_saml_certificate_renewed_data_certificate_certificate_type" => "ConnectionSAMLCertificateRenewedDataCertificateCertificateType",
47
  "connection_saml_certificate_renewed_data_connection" => "ConnectionSAMLCertificateRenewedDataConnection",
48
  "cors_origin_response" => "CORSOriginResponse",
49
+ "create_authkit_oauth_resource" => "CreateAuthkitOAuthResource",
50
  "create_connection_oidc_options" => "CreateConnectionOIDCOptions",
51
  "create_connection_oidc_options_id_token_signature_algorithm" => "CreateConnectionOIDCOptionsIdTokenSignatureAlgorithm",
52
  "create_connection_oidc_options_token_authentication_method" => "CreateConnectionOIDCOptionsTokenAuthenticationMethod",
ruby/lib/workos/pipes.rb
ruby/lib/workos/pipes.rb CHANGED
@@ -15,6 +15,7 @@ module WorkOS
15
  # @param after [String, nil] 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
16
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
17
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
 
18
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
19
  # @return [WorkOS::Types::ListStruct<WorkOS::DataIntegration>]
20
  def list_data_integrations(
@@ -22,13 +23,15 @@ module WorkOS
22
  after: nil,
23
  limit: 10,
24
  order: "desc",
 
25
  request_options: {}
26
  )
27
  params = {
28
  "before" => before,
29
  "after" => after,
30
  "limit" => limit,
31
- "order" => order
 
32
  }.compact
33
  response = @client.request(
34
  method: :get,
@@ -43,19 +46,21 @@ module WorkOS
43
  after: cursor,
44
  limit: limit,
45
  order: order,
 
46
  request_options: request_options
47
  )
48
  }
49
  WorkOS::Types::ListStruct.from_response(
50
  response,
51
  model: WorkOS::DataIntegration,
52
- filters: {before: before, limit: limit, order: order},
53
  fetch_next: fetch_next
54
  )
55
  end
56
 
57
  # Create a data integration
58
  # @param provider [String] The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
 
59
  # @param description [String, nil] An optional description of the Data Integration.
60
  # @param enabled [Boolean, nil] Whether the Data Integration is enabled. Defaults to `false`.
61
  # @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
@@ -68,6 +73,7 @@ module WorkOS
68
  # @return [WorkOS::DataIntegration]
69
  def create_data_integration(
70
  provider:,
 
71
  description: WorkOS::OMIT,
72
  enabled: nil,
73
  scopes: WorkOS::OMIT,
@@ -80,6 +86,7 @@ module WorkOS
80
  )
81
  body = {
82
  "provider" => provider,
 
83
  "enabled" => enabled,
84
  "auth_methods" => auth_methods,
85
  "config" => config,
@@ -180,7 +187,9 @@ module WorkOS
180
  # Upsert an API key for a connected account
181
  # @param slug [String] The identifier of the integration.
182
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
183
- # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
184
  # @param secret [String] The API key secret to store for this integration.
185
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
186
  # @return [WorkOS::ConnectedAccount]
@@ -189,11 +198,15 @@ module WorkOS
189
  user_id:,
190
  secret:,
191
  organization_id: nil,
 
 
192
  request_options: {}
193
  )
194
  body = {
195
  "user_id" => user_id,
196
  "organization_id" => organization_id,
 
 
197
  "secret" => secret
198
  }.compact
199
  response = @client.request(
@@ -245,7 +258,9 @@ module WorkOS
245
  # Upsert client credentials for a connected account
246
  # @param slug [String] The identifier of the integration.
247
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
248
- # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
 
 
249
  # @param client_id [String] The OAuth client ID to store for this integration.
250
  # @param client_secret [String] The OAuth client secret to store for this integration.
251
  # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
@@ -257,12 +272,16 @@ module WorkOS
257
  client_id:,
258
  client_secret:,
259
  organization_id: nil,
 
 
260
  config: nil,
261
  request_options: {}
262
  )
263
  body = {
264
  "user_id" => user_id,
265
  "organization_id" => organization_id,
 
 
266
  "client_id" => client_id,
267
  "client_secret" => client_secret,
268
  "config" => config
@@ -281,9 +300,11 @@ module WorkOS
281
 
282
  # Vend credentials for a connected account
283
  # @param slug [String] The identifier of the integration.
284
- # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
285
- # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
286
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
287
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
288
  # @return [WorkOS::DataIntegrationCredentialsResponse]
289
  def create_data_integration_credential(
@@ -291,12 +312,16 @@ module WorkOS
291
  user_id:,
292
  organization_id: nil,
293
  connected_account_id: nil,
 
 
294
  request_options: {}
295
  )
296
  body = {
297
  "user_id" => user_id,
298
  "organization_id" => organization_id,
299
- "connected_account_id" => connected_account_id
 
 
300
  }.compact
301
  response = @client.request(
302
  method: :post,
@@ -310,11 +335,89 @@ module WorkOS
310
  result
311
  end
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  # Get an access token for a connected account
314
  # @param provider [String] The identifier of the integration.
315
- # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
316
- # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
317
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
 
 
318
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
319
  # @return [WorkOS::DataIntegrationAccessTokenResponse]
320
  def get_access_token(
@@ -322,11 +425,15 @@ module WorkOS
322
  user_id:,
323
  organization_id: WorkOS::OMIT,
324
  connected_account_id: nil,
 
 
325
  request_options: {}
326
  )
327
  body = {
328
  "user_id" => user_id,
329
- "connected_account_id" => connected_account_id
 
 
330
  }.compact
331
  body["organization_id"] = organization_id unless organization_id.equal?(WorkOS::OMIT)
332
  response = @client.request(
@@ -345,6 +452,7 @@ module WorkOS
345
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
346
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
347
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
348
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
349
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
350
  # @return [WorkOS::ConnectedAccount]
@@ -352,11 +460,13 @@ module WorkOS
352
  user_id:,
353
  slug:,
354
  organization_id: nil,
 
355
  connected_account_id: nil,
356
  request_options: {}
357
  )
358
  params = {
359
  "organization_id" => organization_id,
 
360
  "connected_account_id" => connected_account_id
361
  }.compact
362
  response = @client.request(
@@ -425,6 +535,7 @@ module WorkOS
425
  # @param scopes [Array<String>, nil] The OAuth scopes granted for this connection.
426
  # @param state [WorkOS::Types::ConnectedAccountInputState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
427
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
428
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
429
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
430
  # @return [WorkOS::ConnectedAccount]
@@ -437,11 +548,13 @@ module WorkOS
437
  scopes: nil,
438
  state: nil,
439
  organization_id: nil,
 
440
  connected_account_id: nil,
441
  request_options: {}
442
  )
443
  params = {
444
  "organization_id" => organization_id,
 
445
  "connected_account_id" => connected_account_id
446
  }.compact
447
  body = {
@@ -468,6 +581,7 @@ module WorkOS
468
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
469
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
470
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
 
471
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
472
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
473
  # @return [void]
@@ -475,11 +589,13 @@ module WorkOS
475
  user_id:,
476
  slug:,
477
  organization_id: nil,
 
478
  connected_account_id: nil,
479
  request_options: {}
480
  )
481
  params = {
482
  "organization_id" => organization_id,
 
483
  "connected_account_id" => connected_account_id
484
  }.compact
485
  @client.request(
@@ -495,15 +611,18 @@ module WorkOS
495
  # List providers for a user
496
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
497
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
 
498
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
499
  # @return [WorkOS::DataIntegrationsListResponse]
500
  def list_user_data_providers(
501
  user_id:,
502
  organization_id: nil,
 
503
  request_options: {}
504
  )
505
  params = {
506
- "organization_id" => organization_id
 
507
  }.compact
508
  response = @client.request(
509
  method: :get,
 
15
  # @param after [String, nil] 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
16
  # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
17
  # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
18
+ # @param ownership [WorkOS::Types::PipesOwnership, nil] Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
19
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
20
  # @return [WorkOS::Types::ListStruct<WorkOS::DataIntegration>]
21
  def list_data_integrations(
 
23
  after: nil,
24
  limit: 10,
25
  order: "desc",
26
+ ownership: nil,
27
  request_options: {}
28
  )
29
  params = {
30
  "before" => before,
31
  "after" => after,
32
  "limit" => limit,
33
+ "order" => order,
34
+ "ownership" => ownership
35
  }.compact
36
  response = @client.request(
37
  method: :get,
 
46
  after: cursor,
47
  limit: limit,
48
  order: order,
49
+ ownership: ownership,
50
  request_options: request_options
51
  )
52
  }
53
  WorkOS::Types::ListStruct.from_response(
54
  response,
55
  model: WorkOS::DataIntegration,
56
+ filters: {before: before, limit: limit, order: order, ownership: ownership},
57
  fetch_next: fetch_next
58
  )
59
  end
60
 
61
  # Create a data integration
62
  # @param provider [String] The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
63
+ # @param ownership [WorkOS::Types::CreateDataIntegrationOwnership, nil] Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
64
  # @param description [String, nil] An optional description of the Data Integration.
65
  # @param enabled [Boolean, nil] Whether the Data Integration is enabled. Defaults to `false`.
66
  # @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
 
73
  # @return [WorkOS::DataIntegration]
74
  def create_data_integration(
75
  provider:,
76
+ ownership: nil,
77
  description: WorkOS::OMIT,
78
  enabled: nil,
79
  scopes: WorkOS::OMIT,
 
86
  )
87
  body = {
88
  "provider" => provider,
89
+ "ownership" => ownership,
90
  "enabled" => enabled,
91
  "auth_methods" => auth_methods,
92
  "config" => config,
 
187
  # Upsert an API key for a connected account
188
  # @param slug [String] The identifier of the integration.
189
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
190
+ # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
191
+ # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
192
+ # @param connection_owner [WorkOS::Types::DataIntegrationsUpsertApiKeyRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
193
  # @param secret [String] The API key secret to store for this integration.
194
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
195
  # @return [WorkOS::ConnectedAccount]
 
198
  user_id:,
199
  secret:,
200
  organization_id: nil,
201
+ connected_account_id: nil,
202
+ connection_owner: nil,
203
  request_options: {}
204
  )
205
  body = {
206
  "user_id" => user_id,
207
  "organization_id" => organization_id,
208
+ "connected_account_id" => connected_account_id,
209
+ "connection_owner" => connection_owner,
210
  "secret" => secret
211
  }.compact
212
  response = @client.request(
 
258
  # Upsert client credentials for a connected account
259
  # @param slug [String] The identifier of the integration.
260
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
261
+ # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
262
+ # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
263
+ # @param connection_owner [WorkOS::Types::DataIntegrationsUpsertClientCredentialsRequestConnectionOwner, nil] Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
264
  # @param client_id [String] The OAuth client ID to store for this integration.
265
  # @param client_secret [String] The OAuth client secret to store for this integration.
266
  # @param config [Hash{String => String}, nil] Provider-specific configuration values collected for this installation, keyed by the provider's config field descriptors.
 
272
  client_id:,
273
  client_secret:,
274
  organization_id: nil,
275
+ connected_account_id: nil,
276
+ connection_owner: nil,
277
  config: nil,
278
  request_options: {}
279
  )
280
  body = {
281
  "user_id" => user_id,
282
  "organization_id" => organization_id,
283
+ "connected_account_id" => connected_account_id,
284
+ "connection_owner" => connection_owner,
285
  "client_id" => client_id,
286
  "client_secret" => client_secret,
287
  "config" => config
 
300
 
301
  # Vend credentials for a connected account
302
  # @param slug [String] The identifier of the integration.
303
+ # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
304
+ # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
305
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
306
+ # @param connection_owner [WorkOS::Types::DataIntegrationsVendCredentialsRequestConnectionOwner, nil] Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
307
+ # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
308
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
309
  # @return [WorkOS::DataIntegrationCredentialsResponse]
310
  def create_data_integration_credential(
 
312
  user_id:,
313
  organization_id: nil,
314
  connected_account_id: nil,
315
+ connection_owner: nil,
316
+ supports_multiple_connections: nil,
317
  request_options: {}
318
  )
319
  body = {
320
  "user_id" => user_id,
321
  "organization_id" => organization_id,
322
+ "connected_account_id" => connected_account_id,
323
+ "connection_owner" => connection_owner,
324
+ "supports_multiple_connections" => supports_multiple_connections
325
  }.compact
326
  response = @client.request(
327
  method: :post,
 
335
  result
336
  end
337
 
338
+ # Get an organization-owned data integration
339
+ # @param slug [String] The slug identifier of the data integration.
340
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
341
+ # @return [WorkOS::DataIntegration]
342
+ def list_data_integration_organization(
343
+ slug:,
344
+ request_options: {}
345
+ )
346
+ response = @client.request(
347
+ method: :get,
348
+ path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/organization",
349
+ auth: true,
350
+ request_options: request_options
351
+ )
352
+ result = WorkOS::DataIntegration.new(response.body)
353
+ 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"])
354
+ result
355
+ end
356
+
357
+ # Update an organization-owned data integration
358
+ # @param slug [String] The slug identifier of the data integration.
359
+ # @param description [String, nil] An optional description of the Data Integration.
360
+ # @param enabled [Boolean, nil] Whether the Data Integration is enabled.
361
+ # @param scopes [Array<String>, nil] The OAuth scopes to request for the Data Integration. Pass `null` to reset to the provider's configured scopes.
362
+ # @param credentials [WorkOS::DataIntegrationCredentialsInput, nil] New OAuth credentials for the Data Integration. When provided, rotates the stored client secret. Mutually exclusive with `api_key`.
363
+ # @param api_key [WorkOS::ApiKeyInstallation, nil] An API key to install or rotate for a tenant on an `api_key` integration. Upserts the tenant installation identified by `user_id` (and optional `organization_id`).
364
+ # @param custom_provider [WorkOS::UpdateCustomProviderDefinition, nil] Updates to a custom provider's OAuth definition. Only valid for custom-provider integrations.
365
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
366
+ # @return [WorkOS::DataIntegration]
367
+ def update_data_integration_organization(
368
+ slug:,
369
+ description: WorkOS::OMIT,
370
+ enabled: nil,
371
+ scopes: WorkOS::OMIT,
372
+ credentials: nil,
373
+ api_key: nil,
374
+ custom_provider: nil,
375
+ request_options: {}
376
+ )
377
+ body = {
378
+ "enabled" => enabled,
379
+ "credentials" => credentials,
380
+ "api_key" => api_key,
381
+ "custom_provider" => custom_provider
382
+ }.compact
383
+ body["description"] = description unless description.equal?(WorkOS::OMIT)
384
+ body["scopes"] = scopes unless scopes.equal?(WorkOS::OMIT)
385
+ response = @client.request(
386
+ method: :put,
387
+ path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/organization",
388
+ auth: true,
389
+ body: body,
390
+ request_options: request_options
391
+ )
392
+ result = WorkOS::DataIntegration.new(response.body)
393
+ 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"])
394
+ result
395
+ end
396
+
397
+ # Delete an organization-owned data integration
398
+ # @param slug [String] The slug identifier of the data integration.
399
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
400
+ # @return [void]
401
+ def delete_data_integration_organization(
402
+ slug:,
403
+ request_options: {}
404
+ )
405
+ @client.request(
406
+ method: :delete,
407
+ path: "/data-integrations/#{WorkOS::Util.encode_path(slug)}/organization",
408
+ auth: true,
409
+ request_options: request_options
410
+ )
411
+ nil
412
+ end
413
+
414
  # Get an access token for a connected account
415
  # @param provider [String] The identifier of the integration.
416
+ # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
417
+ # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
418
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
419
+ # @param connection_owner [WorkOS::Types::DataIntegrationsGetUserTokenRequestConnectionOwner, nil] Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
420
+ # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
421
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
422
  # @return [WorkOS::DataIntegrationAccessTokenResponse]
423
  def get_access_token(
 
425
  user_id:,
426
  organization_id: WorkOS::OMIT,
427
  connected_account_id: nil,
428
+ connection_owner: nil,
429
+ supports_multiple_connections: nil,
430
  request_options: {}
431
  )
432
  body = {
433
  "user_id" => user_id,
434
+ "connected_account_id" => connected_account_id,
435
+ "connection_owner" => connection_owner,
436
+ "supports_multiple_connections" => supports_multiple_connections
437
  }.compact
438
  body["organization_id"] = organization_id unless organization_id.equal?(WorkOS::OMIT)
439
  response = @client.request(
 
452
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
453
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
454
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
455
+ # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
456
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
457
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
458
  # @return [WorkOS::ConnectedAccount]
 
460
  user_id:,
461
  slug:,
462
  organization_id: nil,
463
+ supports_multiple_connections: nil,
464
  connected_account_id: nil,
465
  request_options: {}
466
  )
467
  params = {
468
  "organization_id" => organization_id,
469
+ "supports_multiple_connections" => supports_multiple_connections,
470
  "connected_account_id" => connected_account_id
471
  }.compact
472
  response = @client.request(
 
535
  # @param scopes [Array<String>, nil] The OAuth scopes granted for this connection.
536
  # @param state [WorkOS::Types::ConnectedAccountInputState, nil] Explicitly set the state of the connected account. When omitted, the state is derived from the token combination provided.
537
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
538
+ # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
539
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
540
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
541
  # @return [WorkOS::ConnectedAccount]
 
548
  scopes: nil,
549
  state: nil,
550
  organization_id: nil,
551
+ supports_multiple_connections: nil,
552
  connected_account_id: nil,
553
  request_options: {}
554
  )
555
  params = {
556
  "organization_id" => organization_id,
557
+ "supports_multiple_connections" => supports_multiple_connections,
558
  "connected_account_id" => connected_account_id
559
  }.compact
560
  body = {
 
581
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier.
582
  # @param slug [String] The slug identifier of the provider (e.g., `github`, `slack`, `notion`).
583
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
584
+ # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
585
  # @param connected_account_id [String, nil] A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
586
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
587
  # @return [void]
 
589
  user_id:,
590
  slug:,
591
  organization_id: nil,
592
+ supports_multiple_connections: nil,
593
  connected_account_id: nil,
594
  request_options: {}
595
  )
596
  params = {
597
  "organization_id" => organization_id,
598
+ "supports_multiple_connections" => supports_multiple_connections,
599
  "connected_account_id" => connected_account_id
600
  }.compact
601
  @client.request(
 
611
  # List providers for a user
612
  # @param user_id [String] A [User](https://workos.com/docs/reference/authkit/user) identifier to list providers and connected accounts for.
613
  # @param organization_id [String, nil] An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
614
+ # @param supports_multiple_connections [Boolean, nil] Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
615
  # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
616
  # @return [WorkOS::DataIntegrationsListResponse]
617
  def list_user_data_providers(
618
  user_id:,
619
  organization_id: nil,
620
+ supports_multiple_connections: nil,
621
  request_options: {}
622
  )
623
  params = {
624
+ "organization_id" => organization_id,
625
+ "supports_multiple_connections" => supports_multiple_connections
626
  }.compact
627
  response = @client.request(
628
  method: :get,
ruby/lib/workos/pipes/create_data_integration.rb
ruby/lib/workos/pipes/create_data_integration.rb CHANGED
@@ -6,6 +6,7 @@ module WorkOS
6
  class CreateDataIntegration < WorkOS::Types::BaseModel
7
  HASH_ATTRS = {
8
  provider: :provider,
 
9
  description: :description,
10
  enabled: :enabled,
11
  scopes: :scopes,
@@ -18,6 +19,7 @@ module WorkOS
18
 
19
  attr_accessor \
20
  :provider,
 
21
  :description,
22
  :enabled,
23
  :scopes,
@@ -30,6 +32,7 @@ module WorkOS
30
  def initialize(json)
31
  hash = self.class.normalize(json)
32
  @provider = hash[:provider]
 
33
  @description = hash[:description]
34
  @enabled = hash[:enabled]
35
  @scopes = hash[:scopes] || []
 
6
  class CreateDataIntegration < WorkOS::Types::BaseModel
7
  HASH_ATTRS = {
8
  provider: :provider,
9
+ ownership: :ownership,
10
  description: :description,
11
  enabled: :enabled,
12
  scopes: :scopes,
 
19
 
20
  attr_accessor \
21
  :provider,
22
+ :ownership,
23
  :description,
24
  :enabled,
25
  :scopes,
 
32
  def initialize(json)
33
  hash = self.class.normalize(json)
34
  @provider = hash[:provider]
35
+ @ownership = hash[:ownership]
36
  @description = hash[:description]
37
  @enabled = hash[:enabled]
38
  @scopes = hash[:scopes] || []
ruby/lib/workos/pipes/data_integration.rb
ruby/lib/workos/pipes/data_integration.rb CHANGED
@@ -9,6 +9,7 @@ module WorkOS
9
  id: :id,
10
  slug: :slug,
11
  integration_type: :integration_type,
 
12
  description: :description,
13
  enabled: :enabled,
14
  state: :state,
@@ -28,6 +29,7 @@ module WorkOS
28
  :id,
29
  :slug,
30
  :integration_type,
 
31
  :description,
32
  :enabled,
33
  :state,
@@ -47,6 +49,7 @@ module WorkOS
47
  @id = hash[:id]
48
  @slug = hash[:slug]
49
  @integration_type = hash[:integration_type]
 
50
  @description = hash[:description]
51
  @enabled = hash[:enabled]
52
  @state = hash[:state]
 
9
  id: :id,
10
  slug: :slug,
11
  integration_type: :integration_type,
12
+ ownership: :ownership,
13
  description: :description,
14
  enabled: :enabled,
15
  state: :state,
 
29
  :id,
30
  :slug,
31
  :integration_type,
32
+ :ownership,
33
  :description,
34
  :enabled,
35
  :state,
 
49
  @id = hash[:id]
50
  @slug = hash[:slug]
51
  @integration_type = hash[:integration_type]
52
+ @ownership = hash[:ownership]
53
  @description = hash[:description]
54
  @enabled = hash[:enabled]
55
  @state = hash[:state]
ruby/lib/workos/pipes/data_integrations_get_user_token_request.rb
ruby/lib/workos/pipes/data_integrations_get_user_token_request.rb CHANGED
@@ -7,19 +7,25 @@ module WorkOS
7
  HASH_ATTRS = {
8
  user_id: :user_id,
9
  organization_id: :organization_id,
10
- connected_account_id: :connected_account_id
 
 
11
  }.freeze
12
 
13
  attr_accessor \
14
  :user_id,
15
  :organization_id,
16
- :connected_account_id
 
 
17
 
18
  def initialize(json)
19
  hash = self.class.normalize(json)
20
  @user_id = hash[:user_id]
21
  @organization_id = hash[:organization_id]
22
  @connected_account_id = hash[:connected_account_id]
 
 
23
  end
24
  end
25
  end
 
7
  HASH_ATTRS = {
8
  user_id: :user_id,
9
  organization_id: :organization_id,
10
+ connected_account_id: :connected_account_id,
11
+ connection_owner: :connection_owner,
12
+ supports_multiple_connections: :supports_multiple_connections
13
  }.freeze
14
 
15
  attr_accessor \
16
  :user_id,
17
  :organization_id,
18
+ :connected_account_id,
19
+ :connection_owner,
20
+ :supports_multiple_connections
21
 
22
  def initialize(json)
23
  hash = self.class.normalize(json)
24
  @user_id = hash[:user_id]
25
  @organization_id = hash[:organization_id]
26
  @connected_account_id = hash[:connected_account_id]
27
+ @connection_owner = hash[:connection_owner]
28
+ @supports_multiple_connections = hash[:supports_multiple_connections]
29
  end
30
  end
31
  end
ruby/lib/workos/pipes/data_integrations_upsert_api_key_request.rb
ruby/lib/workos/pipes/data_integrations_upsert_api_key_request.rb CHANGED
@@ -3,5 +3,29 @@
3
  # This file is auto-generated by oagen. Do not edit.
4
 
5
  module WorkOS
6
- DataIntegrationsUpsertApiKeyRequest = ApiKeyInstallation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  end
 
3
  # This file is auto-generated by oagen. Do not edit.
4
 
5
  module WorkOS
6
+ class DataIntegrationsUpsertApiKeyRequest < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ user_id: :user_id,
9
+ organization_id: :organization_id,
10
+ connected_account_id: :connected_account_id,
11
+ connection_owner: :connection_owner,
12
+ secret: :secret
13
+ }.freeze
14
+
15
+ attr_accessor \
16
+ :user_id,
17
+ :organization_id,
18
+ :connected_account_id,
19
+ :connection_owner,
20
+ :secret
21
+
22
+ def initialize(json)
23
+ hash = self.class.normalize(json)
24
+ @user_id = hash[:user_id]
25
+ @organization_id = hash[:organization_id]
26
+ @connected_account_id = hash[:connected_account_id]
27
+ @connection_owner = hash[:connection_owner]
28
+ @secret = hash[:secret]
29
+ end
30
+ end
31
  end
ruby/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb
ruby/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb CHANGED
@@ -7,6 +7,8 @@ module WorkOS
7
  HASH_ATTRS = {
8
  user_id: :user_id,
9
  organization_id: :organization_id,
 
 
10
  client_id: :client_id,
11
  client_secret: :client_secret,
12
  config: :config
@@ -15,6 +17,8 @@ module WorkOS
15
  attr_accessor \
16
  :user_id,
17
  :organization_id,
 
 
18
  :client_id,
19
  :client_secret,
20
  :config
@@ -23,6 +27,8 @@ module WorkOS
23
  hash = self.class.normalize(json)
24
  @user_id = hash[:user_id]
25
  @organization_id = hash[:organization_id]
 
 
26
  @client_id = hash[:client_id]
27
  @client_secret = hash[:client_secret]
28
  @config = hash[:config] || {}
 
7
  HASH_ATTRS = {
8
  user_id: :user_id,
9
  organization_id: :organization_id,
10
+ connected_account_id: :connected_account_id,
11
+ connection_owner: :connection_owner,
12
  client_id: :client_id,
13
  client_secret: :client_secret,
14
  config: :config
 
17
  attr_accessor \
18
  :user_id,
19
  :organization_id,
20
+ :connected_account_id,
21
+ :connection_owner,
22
  :client_id,
23
  :client_secret,
24
  :config
 
27
  hash = self.class.normalize(json)
28
  @user_id = hash[:user_id]
29
  @organization_id = hash[:organization_id]
30
+ @connected_account_id = hash[:connected_account_id]
31
+ @connection_owner = hash[:connection_owner]
32
  @client_id = hash[:client_id]
33
  @client_secret = hash[:client_secret]
34
  @config = hash[:config] || {}
ruby/lib/workos/pipes/data_integrations_vend_credentials_request.rb
ruby/lib/workos/pipes/data_integrations_vend_credentials_request.rb CHANGED
@@ -7,19 +7,25 @@ module WorkOS
7
  HASH_ATTRS = {
8
  user_id: :user_id,
9
  organization_id: :organization_id,
10
- connected_account_id: :connected_account_id
 
 
11
  }.freeze
12
 
13
  attr_accessor \
14
  :user_id,
15
  :organization_id,
16
- :connected_account_id
 
 
17
 
18
  def initialize(json)
19
  hash = self.class.normalize(json)
20
  @user_id = hash[:user_id]
21
  @organization_id = hash[:organization_id]
22
  @connected_account_id = hash[:connected_account_id]
 
 
23
  end
24
  end
25
  end
 
7
  HASH_ATTRS = {
8
  user_id: :user_id,
9
  organization_id: :organization_id,
10
+ connected_account_id: :connected_account_id,
11
+ connection_owner: :connection_owner,
12
+ supports_multiple_connections: :supports_multiple_connections
13
  }.freeze
14
 
15
  attr_accessor \
16
  :user_id,
17
  :organization_id,
18
+ :connected_account_id,
19
+ :connection_owner,
20
+ :supports_multiple_connections
21
 
22
  def initialize(json)
23
  hash = self.class.normalize(json)
24
  @user_id = hash[:user_id]
25
  @organization_id = hash[:organization_id]
26
  @connected_account_id = hash[:connected_account_id]
27
+ @connection_owner = hash[:connection_owner]
28
+ @supports_multiple_connections = hash[:supports_multiple_connections]
29
  end
30
  end
31
  end
ruby/lib/workos/shared/account_selection_required_error.rb
ruby/lib/workos/shared/account_selection_required_error.rb ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AccountSelectionRequiredError < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ code: :code,
9
+ message: :message
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :code,
14
+ :message
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @code = hash[:code]
19
+ @message = hash[:message]
20
+ end
21
+ end
22
+ end
ruby/lib/workos/types/create_data_integration_ownership.rb
ruby/lib/workos/types/create_data_integration_ownership.rb ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CreateDataIntegrationOwnership
8
+ USER = "user"
9
+ ORGANIZATION = "organization"
10
+ ALL = [USER, ORGANIZATION].freeze
11
+ end
12
+ end
13
+ end
ruby/lib/workos/types/data_integration_ownership.rb
ruby/lib/workos/types/data_integration_ownership.rb ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ DataIntegrationOwnership = CreateDataIntegrationOwnership
8
+ end
9
+ end
ruby/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb
ruby/lib/workos/types/data_integrations_get_user_token_request_connection_owner.rb ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ DataIntegrationsGetUserTokenRequestConnectionOwner = CreateDataIntegrationOwnership
8
+ end
9
+ end
ruby/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb
ruby/lib/workos/types/data_integrations_upsert_api_key_request_connection_owner.rb ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ DataIntegrationsUpsertApiKeyRequestConnectionOwner = CreateDataIntegrationOwnership
8
+ end
9
+ end
ruby/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb
ruby/lib/workos/types/data_integrations_upsert_client_credentials_request_connection_owner.rb ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ DataIntegrationsUpsertClientCredentialsRequestConnectionOwner = CreateDataIntegrationOwnership
8
+ end
9
+ end
ruby/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb
ruby/lib/workos/types/data_integrations_vend_credentials_request_connection_owner.rb ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ DataIntegrationsVendCredentialsRequestConnectionOwner = CreateDataIntegrationOwnership
8
+ end
9
+ end
ruby/lib/workos/types/pipes_ownership.rb
ruby/lib/workos/types/pipes_ownership.rb ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ PipesOwnership = CreateDataIntegrationOwnership
8
+ end
9
+ end
ruby/lib/workos/types/resource_export_completed_data_resource_type.rb
ruby/lib/workos/types/resource_export_completed_data_resource_type.rb CHANGED
@@ -10,7 +10,8 @@ module WorkOS
10
  EVENTS = "events"
11
  SESSIONS = "sessions"
12
  AUDIT_LOG_EVENTS = "auditLogEvents"
 
13
- ALL = [USERS, ORGANIZATIONS, EVENTS, SESSIONS, AUDIT_LOG_EVENTS].freeze
14
  end
15
  end
16
  end
 
10
  EVENTS = "events"
11
  SESSIONS = "sessions"
12
  AUDIT_LOG_EVENTS = "auditLogEvents"
13
+ CONNECTIONS = "connections"
14
+ ALL = [USERS, ORGANIZATIONS, EVENTS, SESSIONS, AUDIT_LOG_EVENTS, CONNECTIONS].freeze
15
  end
16
  end
17
  end
ruby/lib/workos/user_management.rb
ruby/lib/workos/user_management.rb CHANGED
@@ -705,6 +705,93 @@ module WorkOS
705
  nil
706
  end
707
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
708
  # List CORS origins
709
  # @param before [String, nil] 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"`.
710
  # @param after [String, nil] 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
 
705
  nil
706
  end
707
 
708
+ # List AuthKit OAuth resources
709
+ # @param before [String, nil] 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"`.
710
+ # @param after [String, nil] 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
711
+ # @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
712
+ # @param order [WorkOS::Types::PaginationOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
713
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
714
+ # @return [WorkOS::Types::ListStruct<WorkOS::AuthkitOAuthResource>]
715
+ def list_authkit_oauth_resources(
716
+ before: nil,
717
+ after: nil,
718
+ limit: 10,
719
+ order: "desc",
720
+ request_options: {}
721
+ )
722
+ params = {
723
+ "before" => before,
724
+ "after" => after,
725
+ "limit" => limit,
726
+ "order" => order
727
+ }.compact
728
+ response = @client.request(
729
+ method: :get,
730
+ path: "/user_management/authkit_oauth_resources",
731
+ auth: true,
732
+ params: params,
733
+ request_options: request_options
734
+ )
735
+ fetch_next = ->(cursor) {
736
+ list_authkit_oauth_resources(
737
+ before: before,
738
+ after: cursor,
739
+ limit: limit,
740
+ order: order,
741
+ request_options: request_options
742
+ )
743
+ }
744
+ WorkOS::Types::ListStruct.from_response(
745
+ response,
746
+ model: WorkOS::AuthkitOAuthResource,
747
+ filters: {before: before, limit: limit, order: order},
748
+ fetch_next: fetch_next
749
+ )
750
+ end
751
+
752
+ # Create an AuthKit OAuth resource
753
+ # @param uri [String] The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
754
+ # @param default [Boolean, nil] Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
755
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
756
+ # @return [WorkOS::AuthkitOAuthResource]
757
+ def create_authkit_oauth_resource(
758
+ uri:,
759
+ default: nil,
760
+ request_options: {}
761
+ )
762
+ body = {
763
+ "uri" => uri,
764
+ "default" => default
765
+ }.compact
766
+ response = @client.request(
767
+ method: :post,
768
+ path: "/user_management/authkit_oauth_resources",
769
+ auth: true,
770
+ body: body,
771
+ request_options: request_options
772
+ )
773
+ result = WorkOS::AuthkitOAuthResource.new(response.body)
774
+ 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"])
775
+ result
776
+ end
777
+
778
+ # Delete an AuthKit OAuth resource
779
+ # @param id [String] The ID of the AuthKit OAuth resource to delete.
780
+ # @param request_options [Hash] (see WorkOS::Types::RequestOptions)
781
+ # @return [void]
782
+ def delete_authkit_oauth_resource(
783
+ id:,
784
+ request_options: {}
785
+ )
786
+ @client.request(
787
+ method: :delete,
788
+ path: "/user_management/authkit_oauth_resources/#{WorkOS::Util.encode_path(id)}",
789
+ auth: true,
790
+ request_options: request_options
791
+ )
792
+ nil
793
+ end
794
+
795
  # List CORS origins
796
  # @param before [String, nil] 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"`.
797
  # @param after [String, nil] 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
ruby/lib/workos/user_management/authkit_oauth_resource.rb
ruby/lib/workos/user_management/authkit_oauth_resource.rb ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class AuthkitOAuthResource < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ object: :object,
9
+ id: :id,
10
+ uri: :uri,
11
+ default: :default,
12
+ created_at: :created_at,
13
+ updated_at: :updated_at
14
+ }.freeze
15
+
16
+ attr_accessor \
17
+ :object,
18
+ :id,
19
+ :uri,
20
+ :default,
21
+ :created_at,
22
+ :updated_at
23
+
24
+ def initialize(json)
25
+ hash = self.class.normalize(json)
26
+ @object = hash[:object]
27
+ @id = hash[:id]
28
+ @uri = hash[:uri]
29
+ @default = hash[:default]
30
+ @created_at = hash[:created_at]
31
+ @updated_at = hash[:updated_at]
32
+ end
33
+ end
34
+ end
ruby/lib/workos/user_management/create_authkit_oauth_resource.rb
ruby/lib/workos/user_management/create_authkit_oauth_resource.rb ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # frozen_string_literal: true
2
+
3
+ # This file is auto-generated by oagen. Do not edit.
4
+
5
+ module WorkOS
6
+ class CreateAuthkitOAuthResource < WorkOS::Types::BaseModel
7
+ HASH_ATTRS = {
8
+ uri: :uri,
9
+ default: :default
10
+ }.freeze
11
+
12
+ attr_accessor \
13
+ :uri,
14
+ :default
15
+
16
+ def initialize(json)
17
+ hash = self.class.normalize(json)
18
+ @uri = hash[:uri]
19
+ @default = hash[:default]
20
+ end
21
+ end
22
+ end
ruby/rbi/workos/account_selection_required_error.rbi
ruby/rbi/workos/account_selection_required_error.rbi ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 AccountSelectionRequiredError
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 code; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def code=(value); end
17
+
18
+ sig { returns(String) }
19
+ def message; end
20
+
21
+ sig { params(value: String).returns(String) }
22
+ def message=(value); end
23
+
24
+ sig { returns(T::Hash[Symbol, T.untyped]) }
25
+ def to_h; end
26
+
27
+ sig { params(args: T.untyped).returns(String) }
28
+ def to_json(*args); end
29
+ end
30
+ end
ruby/rbi/workos/authkit_oauth_resource.rbi
ruby/rbi/workos/authkit_oauth_resource.rbi ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 AuthkitOAuthResource
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 uri; end
26
+
27
+ sig { params(value: String).returns(String) }
28
+ def uri=(value); end
29
+
30
+ sig { returns(T::Boolean) }
31
+ def default; end
32
+
33
+ sig { params(value: T::Boolean).returns(T::Boolean) }
34
+ def default=(value); end
35
+
36
+ sig { returns(String) }
37
+ def created_at; end
38
+
39
+ sig { params(value: String).returns(String) }
40
+ def created_at=(value); end
41
+
42
+ sig { returns(String) }
43
+ def updated_at; end
44
+
45
+ sig { params(value: String).returns(String) }
46
+ def updated_at=(value); end
47
+
48
+ sig { returns(T::Hash[Symbol, T.untyped]) }
49
+ def to_h; end
50
+
51
+ sig { params(args: T.untyped).returns(String) }
52
+ def to_json(*args); end
53
+ end
54
+ end
ruby/rbi/workos/create_authkit_oauth_resource.rbi
ruby/rbi/workos/create_authkit_oauth_resource.rbi ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CreateAuthkitOAuthResource
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 uri; end
14
+
15
+ sig { params(value: String).returns(String) }
16
+ def uri=(value); end
17
+
18
+ sig { returns(T.nilable(T::Boolean)) }
19
+ def default; end
20
+
21
+ sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
22
+ def default=(value); end
23
+
24
+ sig { returns(T::Hash[Symbol, T.untyped]) }
25
+ def to_h; end
26
+
27
+ sig { params(args: T.untyped).returns(String) }
28
+ def to_json(*args); end
29
+ end
30
+ end
ruby/rbi/workos/create_data_integration.rbi
ruby/rbi/workos/create_data_integration.rbi CHANGED
@@ -15,6 +15,12 @@ module WorkOS
15
  sig { params(value: String).returns(String) }
16
  def provider=(value); end
17
 
 
 
 
 
 
 
18
  sig { returns(T.nilable(String)) }
19
  def description; end
20
 
 
15
  sig { params(value: String).returns(String) }
16
  def provider=(value); end
17
 
18
+ sig { returns(T.nilable(String)) }
19
+ def ownership; end
20
+
21
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
+ def ownership=(value); end
23
+
24
  sig { returns(T.nilable(String)) }
25
  def description; end
26
 
ruby/rbi/workos/data_integration.rbi
ruby/rbi/workos/data_integration.rbi CHANGED
@@ -33,6 +33,12 @@ module WorkOS
33
  sig { params(value: String).returns(String) }
34
  def integration_type=(value); end
35
 
 
 
 
 
 
 
36
  sig { returns(T.nilable(String)) }
37
  def description; end
38
 
 
33
  sig { params(value: String).returns(String) }
34
  def integration_type=(value); end
35
 
36
+ sig { returns(String) }
37
+ def ownership; end
38
+
39
+ sig { params(value: String).returns(String) }
40
+ def ownership=(value); end
41
+
42
  sig { returns(T.nilable(String)) }
43
  def description; end
44
 
ruby/rbi/workos/data_integration_installation.rbi
ruby/rbi/workos/data_integration_installation.rbi CHANGED
@@ -15,10 +15,10 @@ module WorkOS
15
  sig { params(value: String).returns(String) }
16
  def id=(value); end
17
 
18
- sig { returns(String) }
19
  def user_id; end
20
 
21
- sig { params(value: String).returns(String) }
22
  def user_id=(value); end
23
 
24
  sig { returns(T.nilable(String)) }
 
15
  sig { params(value: String).returns(String) }
16
  def id=(value); end
17
 
18
+ sig { returns(T.nilable(String)) }
19
  def user_id; end
20
 
21
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
  def user_id=(value); end
23
 
24
  sig { returns(T.nilable(String)) }
ruby/rbi/workos/data_integrations_get_user_token_request.rbi
ruby/rbi/workos/data_integrations_get_user_token_request.rbi CHANGED
@@ -27,6 +27,18 @@ module WorkOS
27
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
  def connected_account_id=(value); end
29
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  sig { returns(T::Hash[Symbol, T.untyped]) }
31
  def to_h; end
32
 
 
27
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
  def connected_account_id=(value); end
29
 
30
+ sig { returns(T.nilable(String)) }
31
+ def connection_owner; end
32
+
33
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
+ def connection_owner=(value); end
35
+
36
+ sig { returns(T.nilable(T::Boolean)) }
37
+ def supports_multiple_connections; end
38
+
39
+ sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
40
+ def supports_multiple_connections=(value); end
41
+
42
  sig { returns(T::Hash[Symbol, T.untyped]) }
43
  def to_h; end
44
 
ruby/rbi/workos/data_integrations_upsert_api_key_request.rbi
ruby/rbi/workos/data_integrations_upsert_api_key_request.rbi CHANGED
@@ -21,6 +21,18 @@ module WorkOS
21
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
  def organization_id=(value); end
23
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  sig { returns(String) }
25
  def secret; end
26
 
 
21
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
  def organization_id=(value); end
23
 
24
+ sig { returns(T.nilable(String)) }
25
+ def connected_account_id; end
26
+
27
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
+ def connected_account_id=(value); end
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ def connection_owner; end
32
+
33
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
+ def connection_owner=(value); end
35
+
36
  sig { returns(String) }
37
  def secret; end
38
 
ruby/rbi/workos/data_integrations_upsert_client_credentials_request.rbi
ruby/rbi/workos/data_integrations_upsert_client_credentials_request.rbi CHANGED
@@ -21,6 +21,18 @@ module WorkOS
21
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
  def organization_id=(value); end
23
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  sig { returns(String) }
25
  def client_id; end
26
 
 
21
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
22
  def organization_id=(value); end
23
 
24
+ sig { returns(T.nilable(String)) }
25
+ def connected_account_id; end
26
+
27
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
+ def connected_account_id=(value); end
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ def connection_owner; end
32
+
33
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
+ def connection_owner=(value); end
35
+
36
  sig { returns(String) }
37
  def client_id; end
38
 
ruby/rbi/workos/data_integrations_vend_credentials_request.rbi
ruby/rbi/workos/data_integrations_vend_credentials_request.rbi CHANGED
@@ -27,6 +27,18 @@ module WorkOS
27
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
  def connected_account_id=(value); end
29
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  sig { returns(T::Hash[Symbol, T.untyped]) }
31
  def to_h; end
32
 
 
27
  sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
28
  def connected_account_id=(value); end
29
 
30
+ sig { returns(T.nilable(String)) }
31
+ def connection_owner; end
32
+
33
+ sig { params(value: T.nilable(String)).returns(T.nilable(String)) }
34
+ def connection_owner=(value); end
35
+
36
+ sig { returns(T.nilable(T::Boolean)) }
37
+ def supports_multiple_connections; end
38
+
39
+ sig { params(value: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
40
+ def supports_multiple_connections=(value); end
41
+
42
  sig { returns(T::Hash[Symbol, T.untyped]) }
43
  def to_h; end
44
 
ruby/rbi/workos/pipes.rbi
ruby/rbi/workos/pipes.rbi CHANGED
@@ -15,14 +15,16 @@ module WorkOS
15
  after: T.nilable(String),
16
  limit: T.nilable(Integer),
17
  order: T.nilable(String),
 
18
  request_options: T::Hash[Symbol, T.untyped]
19
  ).returns(WorkOS::Types::ListStruct)
20
  end
21
- def list_data_integrations(before:, after:, limit:, order:, request_options:); end
22
 
23
  sig do
24
  params(
25
  provider: String,
 
26
  description: T.nilable(String),
27
  enabled: T.nilable(T::Boolean),
28
  scopes: T.nilable(T::Array[String]),
@@ -34,7 +36,7 @@ module WorkOS
34
  request_options: T::Hash[Symbol, T.untyped]
35
  ).returns(WorkOS::DataIntegration)
36
  end
37
- def create_data_integration(provider:, description:, enabled:, scopes:, auth_methods:, config:, credentials:, api_key:, custom_provider:, request_options:); end
38
 
39
  sig do
40
  params(
@@ -72,10 +74,12 @@ module WorkOS
72
  user_id: String,
73
  secret: String,
74
  organization_id: T.nilable(String),
 
 
75
  request_options: T::Hash[Symbol, T.untyped]
76
  ).returns(WorkOS::ConnectedAccount)
77
  end
78
- def update_data_integration_api_key(slug:, user_id:, secret:, organization_id:, request_options:); end
79
 
80
  sig do
81
  params(
@@ -96,11 +100,13 @@ module WorkOS
96
  client_id: String,
97
  client_secret: String,
98
  organization_id: T.nilable(String),
 
 
99
  config: T.nilable(T::Hash[String, String]),
100
  request_options: T::Hash[Symbol, T.untyped]
101
  ).returns(WorkOS::ConnectedAccount)
102
  end
103
- def update_data_integration_client_credentials(slug:, user_id:, client_id:, client_secret:, organization_id:, config:, request_options:); end
104
 
105
  sig do
106
  params(
@@ -108,10 +114,42 @@ module WorkOS
108
  user_id: String,
109
  organization_id: T.nilable(String),
110
  connected_account_id: T.nilable(String),
 
 
111
  request_options: T::Hash[Symbol, T.untyped]
112
  ).returns(WorkOS::DataIntegrationCredentialsResponse)
113
  end
114
- def create_data_integration_credential(slug:, user_id:, organization_id:, connected_account_id:, request_options:); end
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
  sig do
117
  params(
@@ -119,21 +157,24 @@ module WorkOS
119
  user_id: String,
120
  organization_id: T.nilable(String),
121
  connected_account_id: T.nilable(String),
 
 
122
  request_options: T::Hash[Symbol, T.untyped]
123
  ).returns(WorkOS::DataIntegrationAccessTokenResponse)
124
  end
125
- def get_access_token(provider:, user_id:, organization_id:, connected_account_id:, request_options:); end
126
 
127
  sig do
128
  params(
129
  user_id: String,
130
  slug: String,
131
  organization_id: T.nilable(String),
 
132
  connected_account_id: T.nilable(String),
133
  request_options: T::Hash[Symbol, T.untyped]
134
  ).returns(WorkOS::ConnectedAccount)
135
  end
136
- def get_user_connected_account(user_id:, slug:, organization_id:, connected_account_id:, request_options:); end
137
 
138
  sig do
139
  params(
@@ -160,31 +201,34 @@ module WorkOS
160
  scopes: T.nilable(T::Array[String]),
161
  state: T.nilable(String),
162
  organization_id: T.nilable(String),
 
163
  connected_account_id: T.nilable(String),
164
  request_options: T::Hash[Symbol, T.untyped]
165
  ).returns(WorkOS::ConnectedAccount)
166
  end
167
- def update_user_connected_account(user_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, connected_account_id:, request_options:); end
168
 
169
  sig do
170
  params(
171
  user_id: String,
172
  slug: String,
173
  organization_id: T.nilable(String),
 
174
  connected_account_id: T.nilable(String),
175
  request_options: T::Hash[Symbol, T.untyped]
176
  ).returns(NilClass)
177
  end
178
- def delete_user_connected_account(user_id:, slug:, organization_id:, connected_account_id:, request_options:); end
179
 
180
  sig do
181
  params(
182
  user_id: String,
183
  organization_id: T.nilable(String),
 
184
  request_options: T::Hash[Symbol, T.untyped]
185
  ).returns(WorkOS::DataIntegrationsListResponse)
186
  end
187
- def list_user_data_providers(user_id:, organization_id:, request_options:); end
188
 
189
  end
190
  end
 
15
  after: T.nilable(String),
16
  limit: T.nilable(Integer),
17
  order: T.nilable(String),
18
+ ownership: T.nilable(String),
19
  request_options: T::Hash[Symbol, T.untyped]
20
  ).returns(WorkOS::Types::ListStruct)
21
  end
22
+ def list_data_integrations(before:, after:, limit:, order:, ownership:, request_options:); end
23
 
24
  sig do
25
  params(
26
  provider: String,
27
+ ownership: T.nilable(String),
28
  description: T.nilable(String),
29
  enabled: T.nilable(T::Boolean),
30
  scopes: T.nilable(T::Array[String]),
 
36
  request_options: T::Hash[Symbol, T.untyped]
37
  ).returns(WorkOS::DataIntegration)
38
  end
39
+ def create_data_integration(provider:, ownership:, description:, enabled:, scopes:, auth_methods:, config:, credentials:, api_key:, custom_provider:, request_options:); end
40
 
41
  sig do
42
  params(
 
74
  user_id: String,
75
  secret: String,
76
  organization_id: T.nilable(String),
77
+ connected_account_id: T.nilable(String),
78
+ connection_owner: T.nilable(String),
79
  request_options: T::Hash[Symbol, T.untyped]
80
  ).returns(WorkOS::ConnectedAccount)
81
  end
82
+ def update_data_integration_api_key(slug:, user_id:, secret:, organization_id:, connected_account_id:, connection_owner:, request_options:); end
83
 
84
  sig do
85
  params(
 
100
  client_id: String,
101
  client_secret: String,
102
  organization_id: T.nilable(String),
103
+ connected_account_id: T.nilable(String),
104
+ connection_owner: T.nilable(String),
105
  config: T.nilable(T::Hash[String, String]),
106
  request_options: T::Hash[Symbol, T.untyped]
107
  ).returns(WorkOS::ConnectedAccount)
108
  end
109
+ def update_data_integration_client_credentials(slug:, user_id:, client_id:, client_secret:, organization_id:, connected_account_id:, connection_owner:, config:, request_options:); end
110
 
111
  sig do
112
  params(
 
114
  user_id: String,
115
  organization_id: T.nilable(String),
116
  connected_account_id: T.nilable(String),
117
+ connection_owner: T.nilable(String),
118
+ supports_multiple_connections: T.nilable(T::Boolean),
119
  request_options: T::Hash[Symbol, T.untyped]
120
  ).returns(WorkOS::DataIntegrationCredentialsResponse)
121
  end
122
+ def create_data_integration_credential(slug:, user_id:, organization_id:, connected_account_id:, connection_owner:, supports_multiple_connections:, request_options:); end
123
+
124
+ sig do
125
+ params(
126
+ slug: String,
127
+ request_options: T::Hash[Symbol, T.untyped]
128
+ ).returns(WorkOS::DataIntegration)
129
+ end
130
+ def list_data_integration_organization(slug:, request_options:); end
131
+
132
+ sig do
133
+ params(
134
+ slug: String,
135
+ description: T.nilable(String),
136
+ enabled: T.nilable(T::Boolean),
137
+ scopes: T.nilable(T::Array[String]),
138
+ credentials: T.nilable(WorkOS::DataIntegrationCredentialsInput),
139
+ api_key: T.nilable(WorkOS::ApiKeyInstallation),
140
+ custom_provider: T.nilable(WorkOS::UpdateCustomProviderDefinition),
141
+ request_options: T::Hash[Symbol, T.untyped]
142
+ ).returns(WorkOS::DataIntegration)
143
+ end
144
+ def update_data_integration_organization(slug:, description:, enabled:, scopes:, credentials:, api_key:, custom_provider:, request_options:); end
145
+
146
+ sig do
147
+ params(
148
+ slug: String,
149
+ request_options: T::Hash[Symbol, T.untyped]
150
+ ).returns(NilClass)
151
+ end
152
+ def delete_data_integration_organization(slug:, request_options:); end
153
 
154
  sig do
155
  params(
 
157
  user_id: String,
158
  organization_id: T.nilable(String),
159
  connected_account_id: T.nilable(String),
160
+ connection_owner: T.nilable(String),
161
+ supports_multiple_connections: T.nilable(T::Boolean),
162
  request_options: T::Hash[Symbol, T.untyped]
163
  ).returns(WorkOS::DataIntegrationAccessTokenResponse)
164
  end
165
+ def get_access_token(provider:, user_id:, organization_id:, connected_account_id:, connection_owner:, supports_multiple_connections:, request_options:); end
166
 
167
  sig do
168
  params(
169
  user_id: String,
170
  slug: String,
171
  organization_id: T.nilable(String),
172
+ supports_multiple_connections: T.nilable(T::Boolean),
173
  connected_account_id: T.nilable(String),
174
  request_options: T::Hash[Symbol, T.untyped]
175
  ).returns(WorkOS::ConnectedAccount)
176
  end
177
+ def get_user_connected_account(user_id:, slug:, organization_id:, supports_multiple_connections:, connected_account_id:, request_options:); end
178
 
179
  sig do
180
  params(
 
201
  scopes: T.nilable(T::Array[String]),
202
  state: T.nilable(String),
203
  organization_id: T.nilable(String),
204
+ supports_multiple_connections: T.nilable(T::Boolean),
205
  connected_account_id: T.nilable(String),
206
  request_options: T::Hash[Symbol, T.untyped]
207
  ).returns(WorkOS::ConnectedAccount)
208
  end
209
+ def update_user_connected_account(user_id:, slug:, access_token:, refresh_token:, expires_at:, scopes:, state:, organization_id:, supports_multiple_connections:, connected_account_id:, request_options:); end
210
 
211
  sig do
212
  params(
213
  user_id: String,
214
  slug: String,
215
  organization_id: T.nilable(String),
216
+ supports_multiple_connections: T.nilable(T::Boolean),
217
  connected_account_id: T.nilable(String),
218
  request_options: T::Hash[Symbol, T.untyped]
219
  ).returns(NilClass)
220
  end
221
+ def delete_user_connected_account(user_id:, slug:, organization_id:, supports_multiple_connections:, connected_account_id:, request_options:); end
222
 
223
  sig do
224
  params(
225
  user_id: String,
226
  organization_id: T.nilable(String),
227
+ supports_multiple_connections: T.nilable(T::Boolean),
228
  request_options: T::Hash[Symbol, T.untyped]
229
  ).returns(WorkOS::DataIntegrationsListResponse)
230
  end
231
+ def list_user_data_providers(user_id:, organization_id:, supports_multiple_connections:, request_options:); end
232
 
233
  end
234
  end
ruby/rbi/workos/user_management.rbi
ruby/rbi/workos/user_management.rbi CHANGED
@@ -132,6 +132,34 @@ module WorkOS
132
  end
133
  def revoke_session(session_id:, request_options:); end
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  sig do
136
  params(
137
  before: T.nilable(String),
 
132
  end
133
  def revoke_session(session_id:, request_options:); end
134
 
135
+ sig do
136
+ params(
137
+ before: T.nilable(String),
138
+ after: T.nilable(String),
139
+ limit: T.nilable(Integer),
140
+ order: T.nilable(String),
141
+ request_options: T::Hash[Symbol, T.untyped]
142
+ ).returns(T::Array[WorkOS::AuthkitOAuthResource])
143
+ end
144
+ def list_authkit_oauth_resources(before:, after:, limit:, order:, request_options:); end
145
+
146
+ sig do
147
+ params(
148
+ uri: String,
149
+ default: T.nilable(T::Boolean),
150
+ request_options: T::Hash[Symbol, T.untyped]
151
+ ).returns(WorkOS::AuthkitOAuthResource)
152
+ end
153
+ def create_authkit_oauth_resource(uri:, default:, request_options:); end
154
+
155
+ sig do
156
+ params(
157
+ id: String,
158
+ request_options: T::Hash[Symbol, T.untyped]
159
+ ).returns(NilClass)
160
+ end
161
+ def delete_authkit_oauth_resource(id:, request_options:); end
162
+
163
  sig do
164
  params(
165
  before: T.nilable(String),
ruby/test/workos/test_pipes.rb
ruby/test/workos/test_pipes.rb CHANGED
@@ -74,6 +74,27 @@ class PipesTest < Minitest::Test
74
  refute_nil result
75
  end
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  def test_get_access_token_returns_expected_result
78
  stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)})
79
  .to_return(body: "{}", status: 200)
@@ -127,6 +148,9 @@ class PipesTest < Minitest::Test
127
  {name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
128
  {name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}},
129
  {name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
 
 
 
130
  {name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}},
131
  {name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
132
  {name: :create_user_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
 
74
  refute_nil result
75
  end
76
 
77
+ def test_list_data_integration_organization_returns_expected_result
78
+ stub_request(:get, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
79
+ .to_return(body: "{}", status: 200)
80
+ result = @client.pipes.list_data_integration_organization(slug: "stub")
81
+ refute_nil result
82
+ end
83
+
84
+ def test_update_data_integration_organization_returns_expected_result
85
+ stub_request(:put, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
86
+ .to_return(body: "{}", status: 200)
87
+ result = @client.pipes.update_data_integration_organization(slug: "stub")
88
+ refute_nil result
89
+ end
90
+
91
+ def test_delete_data_integration_organization_returns_expected_result
92
+ stub_request(:delete, %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)})
93
+ .to_return(body: "{}", status: 200)
94
+ result = @client.pipes.delete_data_integration_organization(slug: "stub")
95
+ assert_nil result
96
+ end
97
+
98
  def test_get_access_token_returns_expected_result
99
  stub_request(:post, %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)})
100
  .to_return(body: "{}", status: 200)
 
148
  {name: :authorize_data_integration, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/authorize(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
149
  {name: :update_data_integration_client_credentials, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/client-credentials(\?|\z)}, args: {slug: "stub", user_id: "stub", client_id: "stub", client_secret: "stub"}},
150
  {name: :create_data_integration_credential, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/credentials(\?|\z)}, args: {slug: "stub", user_id: "stub"}},
151
+ {name: :list_data_integration_organization, verb: :get, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
152
+ {name: :update_data_integration_organization, verb: :put, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
153
+ {name: :delete_data_integration_organization, verb: :delete, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/organization(\?|\z)}, args: {slug: "stub"}},
154
  {name: :get_access_token, verb: :post, url: %r{\Ahttps://api\.workos\.com/data-integrations/stub/token(\?|\z)}, args: {provider: "stub", user_id: "stub"}},
155
  {name: :get_user_connected_account, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
156
  {name: :create_user_connected_account, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/users/stub/connected_accounts/stub(\?|\z)}, args: {user_id: "stub", slug: "stub"}},
ruby/test/workos/test_pipes_model_round_trip.rb
ruby/test/workos/test_pipes_model_round_trip.rb CHANGED
@@ -55,6 +55,7 @@ class PipesModelRoundTripTest < Minitest::Test
55
  def test_create_data_integration_round_trip
56
  fixture = {
57
  "provider" => "stub",
 
58
  "description" => nil,
59
  "enabled" => true,
60
  "scopes" => nil,
@@ -126,6 +127,7 @@ class PipesModelRoundTripTest < Minitest::Test
126
  "id" => "stub",
127
  "slug" => "stub",
128
  "integration_type" => "stub",
 
129
  "description" => nil,
130
  "enabled" => true,
131
  "state" => "stub",
@@ -307,7 +309,7 @@ class PipesModelRoundTripTest < Minitest::Test
307
  def test_data_integration_installation_round_trip
308
  fixture = {
309
  "id" => "stub",
310
- "user_id" => "stub",
311
  "organization_id" => nil,
312
  "api_key_last_4" => nil
313
  }
@@ -315,7 +317,7 @@ class PipesModelRoundTripTest < Minitest::Test
315
  json = model.to_h
316
  assert_kind_of Hash, json
317
  assert_equal fixture["id"], json[:id]
318
- assert_equal fixture["user_id"], json[:user_id]
319
  assert_nil json[:organization_id]
320
  assert_nil json[:api_key_last_4]
321
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
@@ -354,6 +356,8 @@ class PipesModelRoundTripTest < Minitest::Test
354
  fixture = {
355
  "user_id" => "stub",
356
  "organization_id" => "stub",
 
 
357
  "secret" => "stub"
358
  }
359
  model = WorkOS::DataIntegrationsUpsertApiKeyRequest.new(fixture.to_json)
@@ -382,6 +386,8 @@ class PipesModelRoundTripTest < Minitest::Test
382
  fixture = {
383
  "user_id" => "stub",
384
  "organization_id" => "stub",
 
 
385
  "client_id" => "stub",
386
  "client_secret" => "stub",
387
  "config" => {}
@@ -399,7 +405,9 @@ class PipesModelRoundTripTest < Minitest::Test
399
  fixture = {
400
  "user_id" => "stub",
401
  "organization_id" => "stub",
402
- "connected_account_id" => "stub"
 
 
403
  }
404
  model = WorkOS::DataIntegrationsVendCredentialsRequest.new(fixture.to_json)
405
  json = model.to_h
@@ -412,7 +420,9 @@ class PipesModelRoundTripTest < Minitest::Test
412
  fixture = {
413
  "user_id" => "stub",
414
  "organization_id" => nil,
415
- "connected_account_id" => "stub"
 
 
416
  }
417
  model = WorkOS::DataIntegrationsGetUserTokenRequest.new(fixture.to_json)
418
  json = model.to_h
 
55
  def test_create_data_integration_round_trip
56
  fixture = {
57
  "provider" => "stub",
58
+ "ownership" => "stub",
59
  "description" => nil,
60
  "enabled" => true,
61
  "scopes" => nil,
 
127
  "id" => "stub",
128
  "slug" => "stub",
129
  "integration_type" => "stub",
130
+ "ownership" => "stub",
131
  "description" => nil,
132
  "enabled" => true,
133
  "state" => "stub",
 
309
  def test_data_integration_installation_round_trip
310
  fixture = {
311
  "id" => "stub",
312
+ "user_id" => nil,
313
  "organization_id" => nil,
314
  "api_key_last_4" => nil
315
  }
 
317
  json = model.to_h
318
  assert_kind_of Hash, json
319
  assert_equal fixture["id"], json[:id]
320
+ assert_nil json[:user_id]
321
  assert_nil json[:organization_id]
322
  assert_nil json[:api_key_last_4]
323
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
 
356
  fixture = {
357
  "user_id" => "stub",
358
  "organization_id" => "stub",
359
+ "connected_account_id" => "stub",
360
+ "connection_owner" => "stub",
361
  "secret" => "stub"
362
  }
363
  model = WorkOS::DataIntegrationsUpsertApiKeyRequest.new(fixture.to_json)
 
386
  fixture = {
387
  "user_id" => "stub",
388
  "organization_id" => "stub",
389
+ "connected_account_id" => "stub",
390
+ "connection_owner" => "stub",
391
  "client_id" => "stub",
392
  "client_secret" => "stub",
393
  "config" => {}
 
405
  fixture = {
406
  "user_id" => "stub",
407
  "organization_id" => "stub",
408
+ "connected_account_id" => "stub",
409
+ "connection_owner" => "stub",
410
+ "supports_multiple_connections" => true
411
  }
412
  model = WorkOS::DataIntegrationsVendCredentialsRequest.new(fixture.to_json)
413
  json = model.to_h
 
420
  fixture = {
421
  "user_id" => "stub",
422
  "organization_id" => nil,
423
+ "connected_account_id" => "stub",
424
+ "connection_owner" => "stub",
425
+ "supports_multiple_connections" => true
426
  }
427
  model = WorkOS::DataIntegrationsGetUserTokenRequest.new(fixture.to_json)
428
  json = model.to_h
ruby/test/workos/test_shared_model_round_trip.rb
ruby/test/workos/test_shared_model_round_trip.rb CHANGED
@@ -16,6 +16,39 @@ class SharedModelRoundTripTest < Minitest::Test
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_connect_application_oauth_round_trip
20
  fixture = {
21
  "object" => "connect_application",
@@ -164,6 +197,24 @@ class SharedModelRoundTripTest < Minitest::Test
164
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
165
  end
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  def test_agent_blueprint_created_round_trip
168
  fixture = {
169
  "object" => "event",
@@ -1251,90 +1302,51 @@ class SharedModelRoundTripTest < Minitest::Test
1251
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1252
  end
1253
 
1254
- def test_auth_method_mismatch_error_round_trip
1255
  fixture = {
1256
- "code" => "auth_method_mismatch",
1257
  "message" => "stub"
1258
  }
1259
- model = WorkOS::AuthMethodMismatchError.new(fixture.to_json)
1260
  json = model.to_h
1261
  assert_kind_of Hash, json
1262
  assert_equal fixture["message"], json[:message]
1263
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1264
  end
1265
 
1266
- def test_event_context_google_analytics_session_round_trip
1267
- fixture = {
1268
- "containerId" => "stub",
1269
- "sessionId" => "stub",
1270
- "sessionNumber" => "stub"
1271
- }
1272
- model = WorkOS::EventContextGoogleAnalyticsSession.new(fixture.to_json)
1273
- json = model.to_h
1274
- assert_kind_of Hash, json
1275
- assert_equal fixture["containerId"], json[:containerId]
1276
- fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1277
- end
1278
-
1279
- def test_object_summary_round_trip
1280
- fixture = {
1281
- "id" => "stub",
1282
- "name" => "stub",
1283
- "updated_at" => nil
1284
- }
1285
- model = WorkOS::ObjectSummary.new(fixture.to_json)
1286
- json = model.to_h
1287
- assert_kind_of Hash, json
1288
- assert_equal fixture["id"], json[:id]
1289
- assert_equal fixture["name"], json[:name]
1290
- fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1291
- end
1292
-
1293
- def test_object_version_round_trip
1294
  fixture = {
1295
- "created_at" => "stub",
1296
- "current_version" => true,
1297
- "etag" => "stub",
1298
- "id" => "stub",
1299
- "size" => 1
1300
  }
1301
- model = WorkOS::ObjectVersion.new(fixture.to_json)
1302
  json = model.to_h
1303
  assert_kind_of Hash, json
1304
- assert_equal fixture["created_at"], json[:created_at]
1305
- assert_equal fixture["current_version"], json[:current_version]
1306
- assert_equal fixture["etag"], json[:etag]
1307
- assert_equal fixture["id"], json[:id]
1308
- assert_equal fixture["size"], json[:size]
1309
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1310
  end
1311
 
1312
- def test_event_schema_round_trip
1313
  fixture = {
1314
- "object" => "event",
1315
- "id" => "stub",
1316
- "event" => "stub",
1317
- "data" => {},
1318
- "created_at" => "stub",
1319
- "context" => {}
1320
  }
1321
- model = WorkOS::EventSchema.new(fixture.to_json)
1322
  json = model.to_h
1323
  assert_kind_of Hash, json
1324
- assert_equal fixture["id"], json[:id]
1325
- assert_equal fixture["event"], json[:event]
1326
- assert_equal fixture["created_at"], json[:created_at]
1327
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1328
  end
1329
 
1330
- def test_event_list_list_metadata_round_trip
1331
  fixture = {
1332
- "after" => nil
 
 
1333
  }
1334
- model = WorkOS::EventListListMetadata.new(fixture.to_json)
1335
  json = model.to_h
1336
  assert_kind_of Hash, json
1337
- assert_nil json[:after]
1338
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1339
  end
1340
 
 
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_object_summary_round_trip
20
+ fixture = {
21
+ "id" => "stub",
22
+ "name" => "stub",
23
+ "updated_at" => nil
24
+ }
25
+ model = WorkOS::ObjectSummary.new(fixture.to_json)
26
+ json = model.to_h
27
+ assert_kind_of Hash, json
28
+ assert_equal fixture["id"], json[:id]
29
+ assert_equal fixture["name"], json[:name]
30
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
31
+ end
32
+
33
+ def test_object_version_round_trip
34
+ fixture = {
35
+ "created_at" => "stub",
36
+ "current_version" => true,
37
+ "etag" => "stub",
38
+ "id" => "stub",
39
+ "size" => 1
40
+ }
41
+ model = WorkOS::ObjectVersion.new(fixture.to_json)
42
+ json = model.to_h
43
+ assert_kind_of Hash, json
44
+ assert_equal fixture["created_at"], json[:created_at]
45
+ assert_equal fixture["current_version"], json[:current_version]
46
+ assert_equal fixture["etag"], json[:etag]
47
+ assert_equal fixture["id"], json[:id]
48
+ assert_equal fixture["size"], json[:size]
49
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
50
+ end
51
+
52
  def test_connect_application_oauth_round_trip
53
  fixture = {
54
  "object" => "connect_application",
 
197
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
198
  end
199
 
200
+ def test_event_schema_round_trip
201
+ fixture = {
202
+ "object" => "event",
203
+ "id" => "stub",
204
+ "event" => "stub",
205
+ "data" => {},
206
+ "created_at" => "stub",
207
+ "context" => {}
208
+ }
209
+ model = WorkOS::EventSchema.new(fixture.to_json)
210
+ json = model.to_h
211
+ assert_kind_of Hash, json
212
+ assert_equal fixture["id"], json[:id]
213
+ assert_equal fixture["event"], json[:event]
214
+ assert_equal fixture["created_at"], json[:created_at]
215
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
216
+ end
217
+
218
  def test_agent_blueprint_created_round_trip
219
  fixture = {
220
  "object" => "event",
 
1302
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1303
  end
1304
 
1305
+ def test_account_selection_required_error_round_trip
1306
  fixture = {
1307
+ "code" => "account_selection_required",
1308
  "message" => "stub"
1309
  }
1310
+ model = WorkOS::AccountSelectionRequiredError.new(fixture.to_json)
1311
  json = model.to_h
1312
  assert_kind_of Hash, json
1313
  assert_equal fixture["message"], json[:message]
1314
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1315
  end
1316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1317
+ def test_auth_method_mismatch_error_round_trip
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1318
  fixture = {
1319
+ "code" => "auth_method_mismatch",
 
1320
+ "message" => "stub"
 
 
1321
  }
1322
+ model = WorkOS::AuthMethodMismatchError.new(fixture.to_json)
1323
  json = model.to_h
1324
  assert_kind_of Hash, json
 
 
1325
+ assert_equal fixture["message"], json[:message]
 
 
1326
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1327
  end
1328
 
1329
+ def test_event_list_list_metadata_round_trip
1330
  fixture = {
 
 
 
1331
+ "after" => nil
 
 
1332
  }
1333
+ model = WorkOS::EventListListMetadata.new(fixture.to_json)
1334
  json = model.to_h
1335
  assert_kind_of Hash, json
1336
+ assert_nil json[:after]
 
 
1337
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1338
  end
1339
 
1340
+ def test_event_context_google_analytics_session_round_trip
1341
  fixture = {
1342
+ "containerId" => "stub",
1343
+ "sessionId" => "stub",
1344
+ "sessionNumber" => "stub"
1345
  }
1346
+ model = WorkOS::EventContextGoogleAnalyticsSession.new(fixture.to_json)
1347
  json = model.to_h
1348
  assert_kind_of Hash, json
1349
+ assert_equal fixture["containerId"], json[:containerId]
1350
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1351
  end
1352
 
ruby/test/workos/test_user_management.rb
ruby/test/workos/test_user_management.rb CHANGED
@@ -203,6 +203,27 @@ class UserManagementTest < Minitest::Test
203
  assert_nil result
204
  end
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  def test_list_cors_origins_returns_expected_result
207
  stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/cors_origins(\?|\z)})
208
  .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
@@ -530,6 +551,9 @@ class UserManagementTest < Minitest::Test
530
  {name: :create_radar_challenge, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/radar_challenges(\?|\z)}, args: {user_id: "stub", pending_authentication_token: "stub", phone_number: "stub"}},
531
  {name: :get_radar_challenge, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/radar_challenges/stub(\?|\z)}, args: {id: "stub"}},
532
  {name: :revoke_session, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/sessions/revoke(\?|\z)}, args: {session_id: "stub"}},
 
 
 
533
  {name: :list_cors_origins, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/cors_origins(\?|\z)}},
534
  {name: :create_cors_origin, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/cors_origins(\?|\z)}, args: {origin: "stub"}},
535
  {name: :get_email_verification, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/email_verification/stub(\?|\z)}, args: {id: "stub"}},
 
203
  assert_nil result
204
  end
205
 
206
+ def test_list_authkit_oauth_resources_returns_expected_result
207
+ stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/authkit_oauth_resources(\?|\z)})
208
+ .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
209
+ result = @client.user_management.list_authkit_oauth_resources
210
+ assert_kind_of WorkOS::Types::ListStruct, result
211
+ end
212
+
213
+ def test_create_authkit_oauth_resource_returns_expected_result
214
+ stub_request(:post, %r{\Ahttps://api\.workos\.com/user_management/authkit_oauth_resources(\?|\z)})
215
+ .to_return(body: "{}", status: 200)
216
+ result = @client.user_management.create_authkit_oauth_resource(uri: "stub")
217
+ refute_nil result
218
+ end
219
+
220
+ def test_delete_authkit_oauth_resource_returns_expected_result
221
+ stub_request(:delete, %r{\Ahttps://api\.workos\.com/user_management/authkit_oauth_resources/stub(\?|\z)})
222
+ .to_return(body: "{}", status: 200)
223
+ result = @client.user_management.delete_authkit_oauth_resource(id: "stub")
224
+ assert_nil result
225
+ end
226
+
227
  def test_list_cors_origins_returns_expected_result
228
  stub_request(:get, %r{\Ahttps://api\.workos\.com/user_management/cors_origins(\?|\z)})
229
  .to_return(body: '{"data": [], "list_metadata": {}}', status: 200)
 
551
  {name: :create_radar_challenge, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/radar_challenges(\?|\z)}, args: {user_id: "stub", pending_authentication_token: "stub", phone_number: "stub"}},
552
  {name: :get_radar_challenge, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/radar_challenges/stub(\?|\z)}, args: {id: "stub"}},
553
  {name: :revoke_session, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/sessions/revoke(\?|\z)}, args: {session_id: "stub"}},
554
+ {name: :list_authkit_oauth_resources, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/authkit_oauth_resources(\?|\z)}},
555
+ {name: :create_authkit_oauth_resource, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/authkit_oauth_resources(\?|\z)}, args: {uri: "stub"}},
556
+ {name: :delete_authkit_oauth_resource, verb: :delete, url: %r{\Ahttps://api\.workos\.com/user_management/authkit_oauth_resources/stub(\?|\z)}, args: {id: "stub"}},
557
  {name: :list_cors_origins, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/cors_origins(\?|\z)}},
558
  {name: :create_cors_origin, verb: :post, url: %r{\Ahttps://api\.workos\.com/user_management/cors_origins(\?|\z)}, args: {origin: "stub"}},
559
  {name: :get_email_verification, verb: :get, url: %r{\Ahttps://api\.workos\.com/user_management/email_verification/stub(\?|\z)}, args: {id: "stub"}},
ruby/test/workos/test_user_management_model_round_trip.rb
ruby/test/workos/test_user_management_model_round_trip.rb CHANGED
@@ -44,6 +44,18 @@ class UserManagementModelRoundTripTest < Minitest::Test
44
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
45
  end
46
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  def test_create_redirect_uri_round_trip
48
  fixture = {
49
  "uri" => "stub"
@@ -1805,6 +1817,26 @@ class UserManagementModelRoundTripTest < Minitest::Test
1805
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1806
  end
1807
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1808
  def test_redirect_uri_round_trip
1809
  fixture = {
1810
  "object" => "redirect_uri",
 
44
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
45
  end
46
 
47
+ def test_create_authkit_oauth_resource_round_trip
48
+ fixture = {
49
+ "uri" => "stub",
50
+ "default" => true
51
+ }
52
+ model = WorkOS::CreateAuthkitOAuthResource.new(fixture.to_json)
53
+ json = model.to_h
54
+ assert_kind_of Hash, json
55
+ assert_equal fixture["uri"], json[:uri]
56
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
57
+ end
58
+
59
  def test_create_redirect_uri_round_trip
60
  fixture = {
61
  "uri" => "stub"
 
1817
  fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1818
  end
1819
 
1820
+ def test_authkit_oauth_resource_round_trip
1821
+ fixture = {
1822
+ "object" => "authkit_oauth_resource",
1823
+ "id" => "stub",
1824
+ "uri" => "stub",
1825
+ "default" => true,
1826
+ "created_at" => "stub",
1827
+ "updated_at" => "stub"
1828
+ }
1829
+ model = WorkOS::AuthkitOAuthResource.new(fixture.to_json)
1830
+ json = model.to_h
1831
+ assert_kind_of Hash, json
1832
+ assert_equal fixture["id"], json[:id]
1833
+ assert_equal fixture["uri"], json[:uri]
1834
+ assert_equal fixture["default"], json[:default]
1835
+ assert_equal fixture["created_at"], json[:created_at]
1836
+ assert_equal fixture["updated_at"], json[:updated_at]
1837
+ fixture.each_key { |k| assert json.key?(k.to_sym) || json.key?(k), "Expected to_h to include key #{k}" }
1838
+ end
1839
+
1840
  def test_redirect_uri_round_trip
1841
  fixture = {
1842
  "object" => "redirect_uri",

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

code: 35 · tests: 0 · manifest: 1

rust/.oagen-manifest.json
rust/.oagen-manifest.json CHANGED
@@ -45,6 +45,7 @@
45
  "src/enums/create_connection_oidc_options_id_token_signature_algorithm.rs",
46
  "src/enums/create_connection_oidc_options_token_authentication_method.rs",
47
  "src/enums/create_data_integration_auth_methods.rs",
 
48
  "src/enums/create_user_invite_options_locale.rs",
49
  "src/enums/create_user_password_hash_type.rs",
50
  "src/enums/create_user_password_salt_position.rs",
@@ -57,11 +58,16 @@
57
  "src/enums/data_integration_credentials_input_type.rs",
58
  "src/enums/data_integration_credentials_response_error.rs",
59
  "src/enums/data_integration_custom_provider_authenticate_via.rs",
 
60
  "src/enums/data_integration_state.rs",
 
61
  "src/enums/data_integrations_list_response_data_auth_methods.rs",
62
  "src/enums/data_integrations_list_response_data_connected_account_auth_method.rs",
63
  "src/enums/data_integrations_list_response_data_connected_account_state.rs",
64
  "src/enums/data_integrations_list_response_data_ownership.rs",
 
 
 
65
  "src/enums/directory_state.rs",
66
  "src/enums/directory_type.rs",
67
  "src/enums/directory_user_state.rs",
@@ -114,6 +120,7 @@
114
  "src/enums/patch_connection_oidc_options_id_token_signature_algorithm.rs",
115
  "src/enums/patch_connection_oidc_options_token_authentication_method.rs",
116
  "src/enums/pipe_connected_account_state.rs",
 
117
  "src/enums/profile_connection_type.rs",
118
  "src/enums/radar_list_action.rs",
119
  "src/enums/radar_list_type.rs",
@@ -171,6 +178,7 @@
171
  "src/enums/widget_session_token_scopes.rs",
172
  "src/models/_unions.rs",
173
  "src/models/access_token_agent_registration_credential_issued_data_detail.rs",
 
174
  "src/models/action_authentication_denied.rs",
175
  "src/models/action_authentication_denied_data.rs",
176
  "src/models/action_user_registration_denied.rs",
@@ -335,6 +343,7 @@
335
  "src/models/authentication_sso_timed_out_data.rs",
336
  "src/models/authentication_sso_timed_out_data_error.rs",
337
  "src/models/authentication_sso_timed_out_data_sso.rs",
 
338
  "src/models/authorization_check.rs",
339
  "src/models/authorization_code_session_authenticate_request.rs",
340
  "src/models/authorization_permission.rs",
@@ -385,6 +394,7 @@
385
  "src/models/connection_saml_certificate_renewed_data_connection.rs",
386
  "src/models/cors_origin_response.rs",
387
  "src/models/create_application_secret.rs",
 
388
  "src/models/create_authorization_permission.rs",
389
  "src/models/create_authorization_resource.rs",
390
  "src/models/create_connection.rs",
@@ -855,6 +865,7 @@
855
  "tests/events_test.rs",
856
  "tests/feature_flags_test.rs",
857
  "tests/fixtures/access_token_agent_registration_credential_issued_data_detail.json",
 
858
  "tests/fixtures/action_authentication_denied.json",
859
  "tests/fixtures/action_authentication_denied_data.json",
860
  "tests/fixtures/action_user_registration_denied.json",
@@ -1019,6 +1030,7 @@
1019
  "tests/fixtures/authentication_sso_timed_out_data.json",
1020
  "tests/fixtures/authentication_sso_timed_out_data_error.json",
1021
  "tests/fixtures/authentication_sso_timed_out_data_sso.json",
 
1022
  "tests/fixtures/authorization_check.json",
1023
  "tests/fixtures/authorization_code_session_authenticate_request.json",
1024
  "tests/fixtures/authorization_permission.json",
@@ -1067,6 +1079,7 @@
1067
  "tests/fixtures/connection_saml_certificate_renewed_data_certificate.json",
1068
  "tests/fixtures/connection_saml_certificate_renewed_data_connection.json",
1069
  "tests/fixtures/cors_origin_response.json",
 
1070
  "tests/fixtures/create_authorization_permission.json",
1071
  "tests/fixtures/create_authorization_resource.json",
1072
  "tests/fixtures/create_connection.json",
@@ -1514,6 +1527,34 @@
1514
  "tests/widgets_test.rs"
1515
  ],
1516
  "operations": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1517
  "PATCH /agents/claims/attempts": {
1518
  "sdkMethod": "update_attempts",
1519
  "service": "agents"
@@ -1526,6 +1567,30 @@
1526
  "sdkMethod": "get_registration",
1527
  "service": "agents"
1528
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1529
  "POST /auth/challenges/{id}/verify": {
1530
  "sdkMethod": "verify_challenge",
1531
  "service": "multi_factor_auth"
@@ -1778,10 +1843,54 @@
1778
  "sdkMethod": "list_connections",
1779
  "service": "sso"
1780
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1781
  "GET /connections/{id}": {
1782
  "sdkMethod": "get_connection",
1783
  "service": "sso"
1784
  },
 
 
 
 
1785
  "DELETE /connections/{id}": {
1786
  "sdkMethod": "delete_connection",
1787
  "service": "sso"
@@ -1834,10 +1943,26 @@
1834
  "sdkMethod": "authorize_data_integration",
1835
  "service": "pipes"
1836
  },
 
 
 
 
1837
  "POST /data-integrations/{slug}/credentials": {
1838
  "sdkMethod": "create_data_integration_credential",
1839
  "service": "pipes"
1840
  },
 
 
 
 
 
 
 
 
 
 
 
 
1841
  "POST /data-integrations/{provider}/token": {
1842
  "sdkMethod": "get_access_token",
1843
  "service": "pipes"
@@ -1974,6 +2099,26 @@
1974
  "sdkMethod": "list_authorized_applications",
1975
  "service": "organizations"
1976
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1977
  "GET /organizations/{id}/audit_logs_retention": {
1978
  "sdkMethod": "get_organization_audit_logs_retention",
1979
  "service": "audit_logs"
@@ -2066,6 +2211,14 @@
2066
  "sdkMethod": "delete_group_organization_membership",
2067
  "service": "groups"
2068
  },
 
 
 
 
 
 
 
 
2069
  "POST /portal/generate_link": {
2070
  "sdkMethod": "generate_link",
2071
  "service": "admin_portal"
@@ -2118,6 +2271,18 @@
2118
  "sdkMethod": "revoke_session",
2119
  "service": "user_management"
2120
  },
 
 
 
 
 
 
 
 
 
 
 
 
2121
  "GET /user_management/cors_origins": {
2122
  "sdkMethod": "list_cors_origins",
2123
  "service": "user_management"
@@ -2254,6 +2419,34 @@
2254
  "sdkMethod": "delete_user_authorized_application",
2255
  "service": "user_management"
2256
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2257
  "GET /user_management/users/{userId}/api_keys": {
2258
  "sdkMethod": "list_user_api_keys",
2259
  "service": "user_management"
@@ -2357,162 +2550,6 @@
2357
  "POST /widgets/token": {
2358
  "sdkMethod": "create_token",
2359
  "service": "widgets"
2360
- },
2361
- "PUT /data-integrations/{slug}/client-credentials": {
2362
- "sdkMethod": "update_data_integration_client_credentials",
2363
- "service": "pipes"
2364
- },
2365
- "GET /agents/blueprints": {
2366
- "sdkMethod": "list_blueprints",
2367
- "service": "agents"
2368
- },
2369
- "POST /agents/blueprints": {
2370
- "sdkMethod": "create_blueprint",
2371
- "service": "agents"
2372
- },
2373
- "GET /agents/blueprints/{agent_blueprint_id}": {
2374
- "sdkMethod": "get_blueprint",
2375
- "service": "agents"
2376
- },
2377
- "PATCH /agents/blueprints/{agent_blueprint_id}": {
2378
- "sdkMethod": "update_blueprint",
2379
- "service": "agents"
2380
- },
2381
- "DELETE /agents/blueprints/{agent_blueprint_id}": {
2382
- "sdkMethod": "delete_blueprint",
2383
- "service": "agents"
2384
- },
2385
- "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
2386
- "sdkMethod": "create_blueprint_token",
2387
- "service": "agents"
2388
- },
2389
- "GET /agents/instances": {
2390
- "sdkMethod": "list_instances",
2391
- "service": "agents"
2392
- },
2393
- "GET /agents/instances/{agent_instance_id}": {
2394
- "sdkMethod": "get_instance",
2395
- "service": "agents"
2396
- },
2397
- "DELETE /agents/instances/{agent_instance_id}": {
2398
- "sdkMethod": "delete_instance",
2399
- "service": "agents"
2400
- },
2401
- "GET /agents/sessions": {
2402
- "sdkMethod": "list_sessions",
2403
- "service": "agents"
2404
- },
2405
- "GET /agents/sessions/{agent_instance_session_id}": {
2406
- "sdkMethod": "get_session",
2407
- "service": "agents"
2408
- },
2409
- "POST /agents/sessions/{agent_instance_session_id}/revoke": {
2410
- "sdkMethod": "revoke_session",
2411
- "service": "agents"
2412
- },
2413
- "POST /connections": {
2414
- "sdkMethod": "create_connection",
2415
- "service": "sso"
2416
- },
2417
- "GET /connections/{connectionId}/saml_idp_signing_certs": {
2418
- "sdkMethod": "list_connection_saml_idp_signing_certs",
2419
- "service": "sso"
2420
- },
2421
- "POST /connections/{connectionId}/saml_idp_signing_certs": {
2422
- "sdkMethod": "create_connection_saml_idp_signing_cert",
2423
- "service": "sso"
2424
- },
2425
- "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
2426
- "sdkMethod": "delete_connection_saml_idp_signing_cert",
2427
- "service": "sso"
2428
- },
2429
- "GET /connections/{connectionId}/saml_sp_encryption_certs": {
2430
- "sdkMethod": "list_connection_saml_sp_encryption_certs",
2431
- "service": "sso"
2432
- },
2433
- "POST /connections/{connectionId}/saml_sp_encryption_certs": {
2434
- "sdkMethod": "create_connection_saml_sp_encryption_cert",
2435
- "service": "sso"
2436
- },
2437
- "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
2438
- "sdkMethod": "delete_connection_saml_sp_encryption_cert",
2439
- "service": "sso"
2440
- },
2441
- "GET /connections/{connectionId}/saml_sp_signing_cert": {
2442
- "sdkMethod": "list_connection_saml_sp_signing_cert",
2443
- "service": "sso"
2444
- },
2445
- "POST /connections/{connectionId}/saml_sp_signing_cert": {
2446
- "sdkMethod": "create_connection_saml_sp_signing_cert",
2447
- "service": "sso"
2448
- },
2449
- "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
2450
- "sdkMethod": "delete_connection_saml_sp_signing_cert",
2451
- "service": "sso"
2452
- },
2453
- "PATCH /connections/{id}": {
2454
- "sdkMethod": "update_connection",
2455
- "service": "sso"
2456
- },
2457
- "GET /organizations/{organization_id}/it_contacts": {
2458
- "sdkMethod": "list_it_contacts",
2459
- "service": "organizations"
2460
- },
2461
- "POST /organizations/{organization_id}/it_contacts": {
2462
- "sdkMethod": "create_it_contact",
2463
- "service": "organizations"
2464
- },
2465
- "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2466
- "sdkMethod": "delete_it_contact",
2467
- "service": "organizations"
2468
- },
2469
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2470
- "sdkMethod": "invite_it_contact",
2471
- "service": "organizations"
2472
- },
2473
- "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2474
- "sdkMethod": "revoke_it_contact",
2475
- "service": "organizations"
2476
- },
2477
- "POST /platform/teams": {
2478
- "sdkMethod": "create_team",
2479
- "service": "platform_teams"
2480
- },
2481
- "GET /platform/teams/{team_id}": {
2482
- "sdkMethod": "get_team",
2483
- "service": "platform_teams"
2484
- },
2485
- "DELETE /user_management/waitlist_entries/{id}": {
2486
- "sdkMethod": "delete_waitlist_entry",
2487
- "service": "user_management"
2488
- },
2489
- "POST /user_management/waitlist_entries/{id}/approve": {
2490
- "sdkMethod": "create_waitlist_entry_approve",
2491
- "service": "user_management"
2492
- },
2493
- "POST /user_management/waitlist_entries/{id}/deny": {
2494
- "sdkMethod": "create_waitlist_entry_deny",
2495
- "service": "user_management"
2496
- },
2497
- "GET /user_management/waitlists": {
2498
- "sdkMethod": "list_waitlists",
2499
- "service": "user_management"
2500
- },
2501
- "GET /user_management/waitlists/{id}": {
2502
- "sdkMethod": "get_waitlist",
2503
- "service": "user_management"
2504
- },
2505
- "GET /user_management/waitlists/{id}/entries": {
2506
- "sdkMethod": "list_waitlist_entries",
2507
- "service": "user_management"
2508
- },
2509
- "POST /user_management/waitlists/{id}/entries": {
2510
- "sdkMethod": "create_waitlist_entry",
2511
- "service": "user_management"
2512
- },
2513
- "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
2514
- "sdkMethod": "validate_blueprint_token",
2515
- "service": "agents"
2516
  }
2517
  }
2518
  }
 
45
  "src/enums/create_connection_oidc_options_id_token_signature_algorithm.rs",
46
  "src/enums/create_connection_oidc_options_token_authentication_method.rs",
47
  "src/enums/create_data_integration_auth_methods.rs",
48
+ "src/enums/create_data_integration_ownership.rs",
49
  "src/enums/create_user_invite_options_locale.rs",
50
  "src/enums/create_user_password_hash_type.rs",
51
  "src/enums/create_user_password_salt_position.rs",
 
58
  "src/enums/data_integration_credentials_input_type.rs",
59
  "src/enums/data_integration_credentials_response_error.rs",
60
  "src/enums/data_integration_custom_provider_authenticate_via.rs",
61
+ "src/enums/data_integration_ownership.rs",
62
  "src/enums/data_integration_state.rs",
63
+ "src/enums/data_integrations_get_user_token_request_connection_owner.rs",
64
  "src/enums/data_integrations_list_response_data_auth_methods.rs",
65
  "src/enums/data_integrations_list_response_data_connected_account_auth_method.rs",
66
  "src/enums/data_integrations_list_response_data_connected_account_state.rs",
67
  "src/enums/data_integrations_list_response_data_ownership.rs",
68
+ "src/enums/data_integrations_upsert_api_key_request_connection_owner.rs",
69
+ "src/enums/data_integrations_upsert_client_credentials_request_connection_owner.rs",
70
+ "src/enums/data_integrations_vend_credentials_request_connection_owner.rs",
71
  "src/enums/directory_state.rs",
72
  "src/enums/directory_type.rs",
73
  "src/enums/directory_user_state.rs",
 
120
  "src/enums/patch_connection_oidc_options_id_token_signature_algorithm.rs",
121
  "src/enums/patch_connection_oidc_options_token_authentication_method.rs",
122
  "src/enums/pipe_connected_account_state.rs",
123
+ "src/enums/pipes_ownership.rs",
124
  "src/enums/profile_connection_type.rs",
125
  "src/enums/radar_list_action.rs",
126
  "src/enums/radar_list_type.rs",
 
178
  "src/enums/widget_session_token_scopes.rs",
179
  "src/models/_unions.rs",
180
  "src/models/access_token_agent_registration_credential_issued_data_detail.rs",
181
+ "src/models/account_selection_required_error.rs",
182
  "src/models/action_authentication_denied.rs",
183
  "src/models/action_authentication_denied_data.rs",
184
  "src/models/action_user_registration_denied.rs",
 
343
  "src/models/authentication_sso_timed_out_data.rs",
344
  "src/models/authentication_sso_timed_out_data_error.rs",
345
  "src/models/authentication_sso_timed_out_data_sso.rs",
346
+ "src/models/authkit_oauth_resource.rs",
347
  "src/models/authorization_check.rs",
348
  "src/models/authorization_code_session_authenticate_request.rs",
349
  "src/models/authorization_permission.rs",
 
394
  "src/models/connection_saml_certificate_renewed_data_connection.rs",
395
  "src/models/cors_origin_response.rs",
396
  "src/models/create_application_secret.rs",
397
+ "src/models/create_authkit_oauth_resource.rs",
398
  "src/models/create_authorization_permission.rs",
399
  "src/models/create_authorization_resource.rs",
400
  "src/models/create_connection.rs",
 
865
  "tests/events_test.rs",
866
  "tests/feature_flags_test.rs",
867
  "tests/fixtures/access_token_agent_registration_credential_issued_data_detail.json",
868
+ "tests/fixtures/account_selection_required_error.json",
869
  "tests/fixtures/action_authentication_denied.json",
870
  "tests/fixtures/action_authentication_denied_data.json",
871
  "tests/fixtures/action_user_registration_denied.json",
 
1030
  "tests/fixtures/authentication_sso_timed_out_data.json",
1031
  "tests/fixtures/authentication_sso_timed_out_data_error.json",
1032
  "tests/fixtures/authentication_sso_timed_out_data_sso.json",
1033
+ "tests/fixtures/authkit_oauth_resource.json",
1034
  "tests/fixtures/authorization_check.json",
1035
  "tests/fixtures/authorization_code_session_authenticate_request.json",
1036
  "tests/fixtures/authorization_permission.json",
 
1079
  "tests/fixtures/connection_saml_certificate_renewed_data_certificate.json",
1080
  "tests/fixtures/connection_saml_certificate_renewed_data_connection.json",
1081
  "tests/fixtures/cors_origin_response.json",
1082
+ "tests/fixtures/create_authkit_oauth_resource.json",
1083
  "tests/fixtures/create_authorization_permission.json",
1084
  "tests/fixtures/create_authorization_resource.json",
1085
  "tests/fixtures/create_connection.json",
 
1527
  "tests/widgets_test.rs"
1528
  ],
1529
  "operations": {
1530
+ "GET /agents/blueprints": {
1531
+ "sdkMethod": "list_blueprints",
1532
+ "service": "agents"
1533
+ },
1534
+ "POST /agents/blueprints": {
1535
+ "sdkMethod": "create_blueprint",
1536
+ "service": "agents"
1537
+ },
1538
+ "GET /agents/blueprints/{agent_blueprint_id}": {
1539
+ "sdkMethod": "get_blueprint",
1540
+ "service": "agents"
1541
+ },
1542
+ "PATCH /agents/blueprints/{agent_blueprint_id}": {
1543
+ "sdkMethod": "update_blueprint",
1544
+ "service": "agents"
1545
+ },
1546
+ "DELETE /agents/blueprints/{agent_blueprint_id}": {
1547
+ "sdkMethod": "delete_blueprint",
1548
+ "service": "agents"
1549
+ },
1550
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens": {
1551
+ "sdkMethod": "create_blueprint_token",
1552
+ "service": "agents"
1553
+ },
1554
+ "POST /agents/blueprints/{agent_blueprint_id}/tokens/validate": {
1555
+ "sdkMethod": "validate_blueprint_token",
1556
+ "service": "agents"
1557
+ },
1558
  "PATCH /agents/claims/attempts": {
1559
  "sdkMethod": "update_attempts",
1560
  "service": "agents"
 
1567
  "sdkMethod": "get_registration",
1568
  "service": "agents"
1569
  },
1570
+ "GET /agents/instances": {
1571
+ "sdkMethod": "list_instances",
1572
+ "service": "agents"
1573
+ },
1574
+ "GET /agents/instances/{agent_instance_id}": {
1575
+ "sdkMethod": "get_instance",
1576
+ "service": "agents"
1577
+ },
1578
+ "DELETE /agents/instances/{agent_instance_id}": {
1579
+ "sdkMethod": "delete_instance",
1580
+ "service": "agents"
1581
+ },
1582
+ "GET /agents/sessions": {
1583
+ "sdkMethod": "list_sessions",
1584
+ "service": "agents"
1585
+ },
1586
+ "GET /agents/sessions/{agent_instance_session_id}": {
1587
+ "sdkMethod": "get_session",
1588
+ "service": "agents"
1589
+ },
1590
+ "POST /agents/sessions/{agent_instance_session_id}/revoke": {
1591
+ "sdkMethod": "revoke_session",
1592
+ "service": "agents"
1593
+ },
1594
  "POST /auth/challenges/{id}/verify": {
1595
  "sdkMethod": "verify_challenge",
1596
  "service": "multi_factor_auth"
 
1843
  "sdkMethod": "list_connections",
1844
  "service": "sso"
1845
  },
1846
+ "POST /connections": {
1847
+ "sdkMethod": "create_connection",
1848
+ "service": "sso"
1849
+ },
1850
+ "GET /connections/{connectionId}/saml_idp_signing_certs": {
1851
+ "sdkMethod": "list_connection_saml_idp_signing_certs",
1852
+ "service": "sso"
1853
+ },
1854
+ "POST /connections/{connectionId}/saml_idp_signing_certs": {
1855
+ "sdkMethod": "create_connection_saml_idp_signing_cert",
1856
+ "service": "sso"
1857
+ },
1858
+ "DELETE /connections/{connectionId}/saml_idp_signing_certs/{certificateId}": {
1859
+ "sdkMethod": "delete_connection_saml_idp_signing_cert",
1860
+ "service": "sso"
1861
+ },
1862
+ "GET /connections/{connectionId}/saml_sp_encryption_certs": {
1863
+ "sdkMethod": "list_connection_saml_sp_encryption_certs",
1864
+ "service": "sso"
1865
+ },
1866
+ "POST /connections/{connectionId}/saml_sp_encryption_certs": {
1867
+ "sdkMethod": "create_connection_saml_sp_encryption_cert",
1868
+ "service": "sso"
1869
+ },
1870
+ "DELETE /connections/{connectionId}/saml_sp_encryption_certs/{certificateId}": {
1871
+ "sdkMethod": "delete_connection_saml_sp_encryption_cert",
1872
+ "service": "sso"
1873
+ },
1874
+ "GET /connections/{connectionId}/saml_sp_signing_cert": {
1875
+ "sdkMethod": "list_connection_saml_sp_signing_cert",
1876
+ "service": "sso"
1877
+ },
1878
+ "POST /connections/{connectionId}/saml_sp_signing_cert": {
1879
+ "sdkMethod": "create_connection_saml_sp_signing_cert",
1880
+ "service": "sso"
1881
+ },
1882
+ "DELETE /connections/{connectionId}/saml_sp_signing_cert/{certificateId}": {
1883
+ "sdkMethod": "delete_connection_saml_sp_signing_cert",
1884
+ "service": "sso"
1885
+ },
1886
  "GET /connections/{id}": {
1887
  "sdkMethod": "get_connection",
1888
  "service": "sso"
1889
  },
1890
+ "PATCH /connections/{id}": {
1891
+ "sdkMethod": "update_connection",
1892
+ "service": "sso"
1893
+ },
1894
  "DELETE /connections/{id}": {
1895
  "sdkMethod": "delete_connection",
1896
  "service": "sso"
 
1943
  "sdkMethod": "authorize_data_integration",
1944
  "service": "pipes"
1945
  },
1946
+ "PUT /data-integrations/{slug}/client-credentials": {
1947
+ "sdkMethod": "update_data_integration_client_credentials",
1948
+ "service": "pipes"
1949
+ },
1950
  "POST /data-integrations/{slug}/credentials": {
1951
  "sdkMethod": "create_data_integration_credential",
1952
  "service": "pipes"
1953
  },
1954
+ "GET /data-integrations/{slug}/organization": {
1955
+ "sdkMethod": "list_data_integration_organization",
1956
+ "service": "pipes"
1957
+ },
1958
+ "PUT /data-integrations/{slug}/organization": {
1959
+ "sdkMethod": "update_data_integration_organization",
1960
+ "service": "pipes"
1961
+ },
1962
+ "DELETE /data-integrations/{slug}/organization": {
1963
+ "sdkMethod": "delete_data_integration_organization",
1964
+ "service": "pipes"
1965
+ },
1966
  "POST /data-integrations/{provider}/token": {
1967
  "sdkMethod": "get_access_token",
1968
  "service": "pipes"
 
2099
  "sdkMethod": "list_authorized_applications",
2100
  "service": "organizations"
2101
  },
2102
+ "GET /organizations/{organization_id}/it_contacts": {
2103
+ "sdkMethod": "list_it_contacts",
2104
+ "service": "organizations"
2105
+ },
2106
+ "POST /organizations/{organization_id}/it_contacts": {
2107
+ "sdkMethod": "create_it_contact",
2108
+ "service": "organizations"
2109
+ },
2110
+ "DELETE /organizations/{organization_id}/it_contacts/{contact_id}": {
2111
+ "sdkMethod": "delete_it_contact",
2112
+ "service": "organizations"
2113
+ },
2114
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/invite": {
2115
+ "sdkMethod": "invite_it_contact",
2116
+ "service": "organizations"
2117
+ },
2118
+ "POST /organizations/{organization_id}/it_contacts/{contact_id}/revoke": {
2119
+ "sdkMethod": "revoke_it_contact",
2120
+ "service": "organizations"
2121
+ },
2122
  "GET /organizations/{id}/audit_logs_retention": {
2123
  "sdkMethod": "get_organization_audit_logs_retention",
2124
  "service": "audit_logs"
 
2211
  "sdkMethod": "delete_group_organization_membership",
2212
  "service": "groups"
2213
  },
2214
+ "POST /platform/teams": {
2215
+ "sdkMethod": "create_team",
2216
+ "service": "platform_teams"
2217
+ },
2218
+ "GET /platform/teams/{team_id}": {
2219
+ "sdkMethod": "get_team",
2220
+ "service": "platform_teams"
2221
+ },
2222
  "POST /portal/generate_link": {
2223
  "sdkMethod": "generate_link",
2224
  "service": "admin_portal"
 
2271
  "sdkMethod": "revoke_session",
2272
  "service": "user_management"
2273
  },
2274
+ "GET /user_management/authkit_oauth_resources": {
2275
+ "sdkMethod": "list_authkit_oauth_resources",
2276
+ "service": "user_management"
2277
+ },
2278
+ "POST /user_management/authkit_oauth_resources": {
2279
+ "sdkMethod": "create_authkit_oauth_resource",
2280
+ "service": "user_management"
2281
+ },
2282
+ "DELETE /user_management/authkit_oauth_resources/{id}": {
2283
+ "sdkMethod": "delete_authkit_oauth_resource",
2284
+ "service": "user_management"
2285
+ },
2286
  "GET /user_management/cors_origins": {
2287
  "sdkMethod": "list_cors_origins",
2288
  "service": "user_management"
 
2419
  "sdkMethod": "delete_user_authorized_application",
2420
  "service": "user_management"
2421
  },
2422
+ "DELETE /user_management/waitlist_entries/{id}": {
2423
+ "sdkMethod": "delete_waitlist_entry",
2424
+ "service": "user_management"
2425
+ },
2426
+ "POST /user_management/waitlist_entries/{id}/approve": {
2427
+ "sdkMethod": "create_waitlist_entry_approve",
2428
+ "service": "user_management"
2429
+ },
2430
+ "POST /user_management/waitlist_entries/{id}/deny": {
2431
+ "sdkMethod": "create_waitlist_entry_deny",
2432
+ "service": "user_management"
2433
+ },
2434
+ "GET /user_management/waitlists": {
2435
+ "sdkMethod": "list_waitlists",
2436
+ "service": "user_management"
2437
+ },
2438
+ "GET /user_management/waitlists/{id}": {
2439
+ "sdkMethod": "get_waitlist",
2440
+ "service": "user_management"
2441
+ },
2442
+ "GET /user_management/waitlists/{id}/entries": {
2443
+ "sdkMethod": "list_waitlist_entries",
2444
+ "service": "user_management"
2445
+ },
2446
+ "POST /user_management/waitlists/{id}/entries": {
2447
+ "sdkMethod": "create_waitlist_entry",
2448
+ "service": "user_management"
2449
+ },
2450
  "GET /user_management/users/{userId}/api_keys": {
2451
  "sdkMethod": "list_user_api_keys",
2452
  "service": "user_management"
 
2550
  "POST /widgets/token": {
2551
  "sdkMethod": "create_token",
2552
  "service": "widgets"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2553
  }
2554
  }
2555
  }
rust/src/enums/create_data_integration_ownership.rs
rust/src/enums/create_data_integration_ownership.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CreateDataIntegrationOwnership {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl CreateDataIntegrationOwnership {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for CreateDataIntegrationOwnership {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for CreateDataIntegrationOwnership {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for CreateDataIntegrationOwnership {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for CreateDataIntegrationOwnership {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for CreateDataIntegrationOwnership {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for CreateDataIntegrationOwnership {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for CreateDataIntegrationOwnership {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/data_integration_ownership.rs
rust/src/enums/data_integration_ownership.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DataIntegrationOwnership {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl DataIntegrationOwnership {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for DataIntegrationOwnership {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for DataIntegrationOwnership {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for DataIntegrationOwnership {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for DataIntegrationOwnership {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for DataIntegrationOwnership {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for DataIntegrationOwnership {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for DataIntegrationOwnership {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/data_integrations_get_user_token_request_connection_owner.rs
rust/src/enums/data_integrations_get_user_token_request_connection_owner.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DataIntegrationsGetUserTokenRequestConnectionOwner {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl DataIntegrationsGetUserTokenRequestConnectionOwner {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for DataIntegrationsGetUserTokenRequestConnectionOwner {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for DataIntegrationsGetUserTokenRequestConnectionOwner {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for DataIntegrationsGetUserTokenRequestConnectionOwner {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for DataIntegrationsGetUserTokenRequestConnectionOwner {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for DataIntegrationsGetUserTokenRequestConnectionOwner {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for DataIntegrationsGetUserTokenRequestConnectionOwner {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for DataIntegrationsGetUserTokenRequestConnectionOwner {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/data_integrations_upsert_api_key_request_connection_owner.rs
rust/src/enums/data_integrations_upsert_api_key_request_connection_owner.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DataIntegrationsUpsertApiKeyRequestConnectionOwner {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl DataIntegrationsUpsertApiKeyRequestConnectionOwner {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for DataIntegrationsUpsertApiKeyRequestConnectionOwner {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/data_integrations_upsert_client_credentials_request_connection_owner.rs
rust/src/enums/data_integrations_upsert_client_credentials_request_connection_owner.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for DataIntegrationsUpsertClientCredentialsRequestConnectionOwner {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/data_integrations_vend_credentials_request_connection_owner.rs
rust/src/enums/data_integrations_vend_credentials_request_connection_owner.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DataIntegrationsVendCredentialsRequestConnectionOwner {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl DataIntegrationsVendCredentialsRequestConnectionOwner {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for DataIntegrationsVendCredentialsRequestConnectionOwner {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for DataIntegrationsVendCredentialsRequestConnectionOwner {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for DataIntegrationsVendCredentialsRequestConnectionOwner {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for DataIntegrationsVendCredentialsRequestConnectionOwner {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for DataIntegrationsVendCredentialsRequestConnectionOwner {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for DataIntegrationsVendCredentialsRequestConnectionOwner {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for DataIntegrationsVendCredentialsRequestConnectionOwner {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/mod.rs
rust/src/enums/mod.rs CHANGED
@@ -43,6 +43,7 @@ pub mod connections_connection_type;
43
  pub mod create_connection_oidc_options_id_token_signature_algorithm;
44
  pub mod create_connection_oidc_options_token_authentication_method;
45
  pub mod create_data_integration_auth_methods;
 
46
  pub mod create_user_invite_options_locale;
47
  pub mod create_user_password_hash_type;
48
  pub mod create_user_password_salt_position;
@@ -55,11 +56,16 @@ pub mod data_integration_credentials_credentials_type;
55
  pub mod data_integration_credentials_input_type;
56
  pub mod data_integration_credentials_response_error;
57
  pub mod data_integration_custom_provider_authenticate_via;
 
58
  pub mod data_integration_state;
 
59
  pub mod data_integrations_list_response_data_auth_methods;
60
  pub mod data_integrations_list_response_data_connected_account_auth_method;
61
  pub mod data_integrations_list_response_data_connected_account_state;
62
  pub mod data_integrations_list_response_data_ownership;
 
 
 
63
  pub mod directory_state;
64
  pub mod directory_type;
65
  pub mod directory_user_state;
@@ -111,6 +117,7 @@ pub mod pagination_order;
111
  pub mod patch_connection_oidc_options_id_token_signature_algorithm;
112
  pub mod patch_connection_oidc_options_token_authentication_method;
113
  pub mod pipe_connected_account_state;
 
114
  pub mod profile_connection_type;
115
  pub mod radar_list_action;
116
  pub mod radar_list_type;
@@ -210,6 +217,7 @@ pub use connections_connection_type::*;
210
  pub use create_connection_oidc_options_id_token_signature_algorithm::*;
211
  pub use create_connection_oidc_options_token_authentication_method::*;
212
  pub use create_data_integration_auth_methods::*;
 
213
  pub use create_user_invite_options_locale::*;
214
  pub use create_user_password_hash_type::*;
215
  pub use create_user_password_salt_position::*;
@@ -222,11 +230,16 @@ pub use data_integration_credentials_credentials_type::*;
222
  pub use data_integration_credentials_input_type::*;
223
  pub use data_integration_credentials_response_error::*;
224
  pub use data_integration_custom_provider_authenticate_via::*;
 
225
  pub use data_integration_state::*;
 
226
  pub use data_integrations_list_response_data_auth_methods::*;
227
  pub use data_integrations_list_response_data_connected_account_auth_method::*;
228
  pub use data_integrations_list_response_data_connected_account_state::*;
229
  pub use data_integrations_list_response_data_ownership::*;
 
 
 
230
  pub use directory_state::*;
231
  pub use directory_type::*;
232
  pub use directory_user_state::*;
@@ -278,6 +291,7 @@ pub use pagination_order::*;
278
  pub use patch_connection_oidc_options_id_token_signature_algorithm::*;
279
  pub use patch_connection_oidc_options_token_authentication_method::*;
280
  pub use pipe_connected_account_state::*;
 
281
  pub use profile_connection_type::*;
282
  pub use radar_list_action::*;
283
  pub use radar_list_type::*;
 
43
  pub mod create_connection_oidc_options_id_token_signature_algorithm;
44
  pub mod create_connection_oidc_options_token_authentication_method;
45
  pub mod create_data_integration_auth_methods;
46
+ pub mod create_data_integration_ownership;
47
  pub mod create_user_invite_options_locale;
48
  pub mod create_user_password_hash_type;
49
  pub mod create_user_password_salt_position;
 
56
  pub mod data_integration_credentials_input_type;
57
  pub mod data_integration_credentials_response_error;
58
  pub mod data_integration_custom_provider_authenticate_via;
59
+ pub mod data_integration_ownership;
60
  pub mod data_integration_state;
61
+ pub mod data_integrations_get_user_token_request_connection_owner;
62
  pub mod data_integrations_list_response_data_auth_methods;
63
  pub mod data_integrations_list_response_data_connected_account_auth_method;
64
  pub mod data_integrations_list_response_data_connected_account_state;
65
  pub mod data_integrations_list_response_data_ownership;
66
+ pub mod data_integrations_upsert_api_key_request_connection_owner;
67
+ pub mod data_integrations_upsert_client_credentials_request_connection_owner;
68
+ pub mod data_integrations_vend_credentials_request_connection_owner;
69
  pub mod directory_state;
70
  pub mod directory_type;
71
  pub mod directory_user_state;
 
117
  pub mod patch_connection_oidc_options_id_token_signature_algorithm;
118
  pub mod patch_connection_oidc_options_token_authentication_method;
119
  pub mod pipe_connected_account_state;
120
+ pub mod pipes_ownership;
121
  pub mod profile_connection_type;
122
  pub mod radar_list_action;
123
  pub mod radar_list_type;
 
217
  pub use create_connection_oidc_options_id_token_signature_algorithm::*;
218
  pub use create_connection_oidc_options_token_authentication_method::*;
219
  pub use create_data_integration_auth_methods::*;
220
+ pub use create_data_integration_ownership::*;
221
  pub use create_user_invite_options_locale::*;
222
  pub use create_user_password_hash_type::*;
223
  pub use create_user_password_salt_position::*;
 
230
  pub use data_integration_credentials_input_type::*;
231
  pub use data_integration_credentials_response_error::*;
232
  pub use data_integration_custom_provider_authenticate_via::*;
233
+ pub use data_integration_ownership::*;
234
  pub use data_integration_state::*;
235
+ pub use data_integrations_get_user_token_request_connection_owner::*;
236
  pub use data_integrations_list_response_data_auth_methods::*;
237
  pub use data_integrations_list_response_data_connected_account_auth_method::*;
238
  pub use data_integrations_list_response_data_connected_account_state::*;
239
  pub use data_integrations_list_response_data_ownership::*;
240
+ pub use data_integrations_upsert_api_key_request_connection_owner::*;
241
+ pub use data_integrations_upsert_client_credentials_request_connection_owner::*;
242
+ pub use data_integrations_vend_credentials_request_connection_owner::*;
243
  pub use directory_state::*;
244
  pub use directory_type::*;
245
  pub use directory_user_state::*;
 
291
  pub use patch_connection_oidc_options_id_token_signature_algorithm::*;
292
  pub use patch_connection_oidc_options_token_authentication_method::*;
293
  pub use pipe_connected_account_state::*;
294
+ pub use pipes_ownership::*;
295
  pub use profile_connection_type::*;
296
  pub use radar_list_action::*;
297
  pub use radar_list_type::*;
rust/src/enums/pipes_ownership.rs
rust/src/enums/pipes_ownership.rs ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 PipesOwnership {
10
+ User,
11
+ Organization,
12
+ /// Wire value not recognized by this SDK version. The original
13
+ /// string is preserved verbatim. WorkOS may add new enum values
14
+ /// server-side; matching on this variant lets callers handle
15
+ /// forward-compatible values without panicking.
16
+ Unknown(String),
17
+ }
18
+
19
+ impl PipesOwnership {
20
+ /// Canonical wire string for this value. For [`Self::Unknown`] returns the
21
+ /// original wire value as received from the API.
22
+ #[allow(deprecated)]
23
+ pub fn as_str(&self) -> &str {
24
+ match self {
25
+ Self::User => "user",
26
+ Self::Organization => "organization",
27
+ Self::Unknown(s) => s.as_str(),
28
+ }
29
+ }
30
+ }
31
+
32
+ impl fmt::Display for PipesOwnership {
33
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
34
+ f.write_str(self.as_str())
35
+ }
36
+ }
37
+
38
+ impl AsRef<str> for PipesOwnership {
39
+ fn as_ref(&self) -> &str {
40
+ self.as_str()
41
+ }
42
+ }
43
+
44
+ impl FromStr for PipesOwnership {
45
+ type Err = std::convert::Infallible;
46
+ #[allow(deprecated)]
47
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
48
+ Ok(match s {
49
+ "user" => Self::User,
50
+ "organization" => Self::Organization,
51
+ other => Self::Unknown(other.to_string()),
52
+ })
53
+ }
54
+ }
55
+
56
+ impl From<String> for PipesOwnership {
57
+ fn from(s: String) -> Self {
58
+ // Reuse the original `String` allocation in the fallback branch.
59
+ match Self::from_str(&s) {
60
+ Ok(Self::Unknown(_)) => Self::Unknown(s),
61
+ Ok(other) => other,
62
+ }
63
+ }
64
+ }
65
+
66
+ impl From<&str> for PipesOwnership {
67
+ fn from(s: &str) -> Self {
68
+ Self::from_str(s).unwrap_or_else(|_| Self::Unknown(s.to_string()))
69
+ }
70
+ }
71
+
72
+ impl Serialize for PipesOwnership {
73
+ fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
74
+ serializer.serialize_str(self.as_str())
75
+ }
76
+ }
77
+
78
+ impl<'de> Deserialize<'de> for PipesOwnership {
79
+ fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
80
+ let s = String::deserialize(deserializer)?;
81
+ Ok(Self::from(s))
82
+ }
83
+ }
rust/src/enums/resource_export_completed_data_resource_type.rs
rust/src/enums/resource_export_completed_data_resource_type.rs CHANGED
@@ -12,6 +12,7 @@ pub enum ResourceExportCompletedDataResourceType {
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
 
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
@@ -30,6 +31,7 @@ impl ResourceExportCompletedDataResourceType {
30
  Self::Events => "events",
31
  Self::Sessions => "sessions",
32
  Self::AuditLogEvents => "auditLogEvents",
 
33
  Self::Unknown(s) => s.as_str(),
34
  }
35
  }
@@ -57,6 +59,7 @@ impl FromStr for ResourceExportCompletedDataResourceType {
57
  "events" => Self::Events,
58
  "sessions" => Self::Sessions,
59
  "auditLogEvents" => Self::AuditLogEvents,
 
60
  other => Self::Unknown(other.to_string()),
61
  })
62
  }
 
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
15
+ Connections,
16
  /// Wire value not recognized by this SDK version. The original
17
  /// string is preserved verbatim. WorkOS may add new enum values
18
  /// server-side; matching on this variant lets callers handle
 
31
  Self::Events => "events",
32
  Self::Sessions => "sessions",
33
  Self::AuditLogEvents => "auditLogEvents",
34
+ Self::Connections => "connections",
35
  Self::Unknown(s) => s.as_str(),
36
  }
37
  }
 
59
  "events" => Self::Events,
60
  "sessions" => Self::Sessions,
61
  "auditLogEvents" => Self::AuditLogEvents,
62
+ "connections" => Self::Connections,
63
  other => Self::Unknown(other.to_string()),
64
  })
65
  }
rust/src/enums/resource_export_created_data_resource_type.rs
rust/src/enums/resource_export_created_data_resource_type.rs CHANGED
@@ -12,6 +12,7 @@ pub enum ResourceExportCreatedDataResourceType {
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
 
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
@@ -30,6 +31,7 @@ impl ResourceExportCreatedDataResourceType {
30
  Self::Events => "events",
31
  Self::Sessions => "sessions",
32
  Self::AuditLogEvents => "auditLogEvents",
 
33
  Self::Unknown(s) => s.as_str(),
34
  }
35
  }
@@ -57,6 +59,7 @@ impl FromStr for ResourceExportCreatedDataResourceType {
57
  "events" => Self::Events,
58
  "sessions" => Self::Sessions,
59
  "auditLogEvents" => Self::AuditLogEvents,
 
60
  other => Self::Unknown(other.to_string()),
61
  })
62
  }
 
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
15
+ Connections,
16
  /// Wire value not recognized by this SDK version. The original
17
  /// string is preserved verbatim. WorkOS may add new enum values
18
  /// server-side; matching on this variant lets callers handle
 
31
  Self::Events => "events",
32
  Self::Sessions => "sessions",
33
  Self::AuditLogEvents => "auditLogEvents",
34
+ Self::Connections => "connections",
35
  Self::Unknown(s) => s.as_str(),
36
  }
37
  }
 
59
  "events" => Self::Events,
60
  "sessions" => Self::Sessions,
61
  "auditLogEvents" => Self::AuditLogEvents,
62
+ "connections" => Self::Connections,
63
  other => Self::Unknown(other.to_string()),
64
  })
65
  }
rust/src/enums/resource_export_downloaded_data_resource_type.rs
rust/src/enums/resource_export_downloaded_data_resource_type.rs CHANGED
@@ -12,6 +12,7 @@ pub enum ResourceExportDownloadedDataResourceType {
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
 
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
@@ -30,6 +31,7 @@ impl ResourceExportDownloadedDataResourceType {
30
  Self::Events => "events",
31
  Self::Sessions => "sessions",
32
  Self::AuditLogEvents => "auditLogEvents",
 
33
  Self::Unknown(s) => s.as_str(),
34
  }
35
  }
@@ -57,6 +59,7 @@ impl FromStr for ResourceExportDownloadedDataResourceType {
57
  "events" => Self::Events,
58
  "sessions" => Self::Sessions,
59
  "auditLogEvents" => Self::AuditLogEvents,
 
60
  other => Self::Unknown(other.to_string()),
61
  })
62
  }
 
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
15
+ Connections,
16
  /// Wire value not recognized by this SDK version. The original
17
  /// string is preserved verbatim. WorkOS may add new enum values
18
  /// server-side; matching on this variant lets callers handle
 
31
  Self::Events => "events",
32
  Self::Sessions => "sessions",
33
  Self::AuditLogEvents => "auditLogEvents",
34
+ Self::Connections => "connections",
35
  Self::Unknown(s) => s.as_str(),
36
  }
37
  }
 
59
  "events" => Self::Events,
60
  "sessions" => Self::Sessions,
61
  "auditLogEvents" => Self::AuditLogEvents,
62
+ "connections" => Self::Connections,
63
  other => Self::Unknown(other.to_string()),
64
  })
65
  }
rust/src/enums/resource_export_failed_data_resource_type.rs
rust/src/enums/resource_export_failed_data_resource_type.rs CHANGED
@@ -12,6 +12,7 @@ pub enum ResourceExportFailedDataResourceType {
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
 
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
@@ -30,6 +31,7 @@ impl ResourceExportFailedDataResourceType {
30
  Self::Events => "events",
31
  Self::Sessions => "sessions",
32
  Self::AuditLogEvents => "auditLogEvents",
 
33
  Self::Unknown(s) => s.as_str(),
34
  }
35
  }
@@ -57,6 +59,7 @@ impl FromStr for ResourceExportFailedDataResourceType {
57
  "events" => Self::Events,
58
  "sessions" => Self::Sessions,
59
  "auditLogEvents" => Self::AuditLogEvents,
 
60
  other => Self::Unknown(other.to_string()),
61
  })
62
  }
 
12
  Events,
13
  Sessions,
14
  AuditLogEvents,
15
+ Connections,
16
  /// Wire value not recognized by this SDK version. The original
17
  /// string is preserved verbatim. WorkOS may add new enum values
18
  /// server-side; matching on this variant lets callers handle
 
31
  Self::Events => "events",
32
  Self::Sessions => "sessions",
33
  Self::AuditLogEvents => "auditLogEvents",
34
+ Self::Connections => "connections",
35
  Self::Unknown(s) => s.as_str(),
36
  }
37
  }
 
59
  "events" => Self::Events,
60
  "sessions" => Self::Sessions,
61
  "auditLogEvents" => Self::AuditLogEvents,
62
+ "connections" => Self::Connections,
63
  other => Self::Unknown(other.to_string()),
64
  })
65
  }
rust/src/models/account_selection_required_error.rs
rust/src/models/account_selection_required_error.rs ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 AccountSelectionRequiredError {
10
+ /// Indicates that several connected accounts match and the request must name one.
11
+ pub code: String,
12
+ /// A human-readable explanation of the ambiguity.
13
+ pub message: String,
14
+ }
rust/src/models/audit_logs_retention.rs
rust/src/models/audit_logs_retention.rs CHANGED
@@ -7,7 +7,7 @@ use crate::enums::*;
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct AuditLogsRetention {
10
- /// The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 and 365.
11
  #[serde(skip_serializing_if = "Option::is_none", default)]
12
  pub retention_period_in_days: Option<i64>,
13
  }
 
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct AuditLogsRetention {
10
+ /// The number of days Audit Log events will be retained before being permanently deleted. Valid values are 30 through 330 in 30-day increments and 365 through 3650 in 365-day increments.
11
  #[serde(skip_serializing_if = "Option::is_none", default)]
12
  pub retention_period_in_days: Option<i64>,
13
  }
rust/src/models/authkit_oauth_resource.rs
rust/src/models/authkit_oauth_resource.rs ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 AuthkitOAuthResource {
10
+ /// The object type.
11
+ pub object: String,
12
+ /// The ID of the AuthKit OAuth resource.
13
+ pub id: String,
14
+ /// The resource URI.
15
+ pub uri: String,
16
+ /// Whether this is the default AuthKit OAuth resource for the environment.
17
+ pub default: bool,
18
+ /// The timestamp when the AuthKit OAuth resource was created.
19
+ pub created_at: String,
20
+ /// The timestamp when the AuthKit OAuth resource was last updated.
21
+ pub updated_at: String,
22
+ }
rust/src/models/create_authkit_oauth_resource.rs
rust/src/models/create_authkit_oauth_resource.rs ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 CreateAuthkitOAuthResource {
10
+ /// The resource URI. May be a wildcard pattern with a single `*` in the leftmost hostname label, where enabled for the environment.
11
+ pub uri: String,
12
+ /// Whether the resource being created becomes the environment default, clearing any previous default. Applies at creation only — this API has no update endpoint yet, so changing the default on an existing resource is done from the dashboard. A wildcard pattern cannot be the default.
13
+ #[serde(skip_serializing_if = "Option::is_none", default)]
14
+ pub default: Option<bool>,
15
+ }
rust/src/models/create_data_integration.rs
rust/src/models/create_data_integration.rs CHANGED
@@ -9,6 +9,9 @@ use serde::{Deserialize, Serialize};
9
  pub struct CreateDataIntegration {
10
  /// The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
11
  pub provider: String,
 
 
 
12
  /// An optional description of the Data Integration.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub description: Option<String>,
 
9
  pub struct CreateDataIntegration {
10
  /// The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
11
  pub provider: String,
12
+ /// Who owns the Data Integration. `user` (the default) creates the integration users connect their own accounts to; `organization` creates the root organizations connect to. Ownership is fixed at creation, and one integration of each ownership may exist per provider. Independent of `credentials.type`.
13
+ #[serde(skip_serializing_if = "Option::is_none", default)]
14
+ pub ownership: Option<CreateDataIntegrationOwnership>,
15
  /// An optional description of the Data Integration.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
  pub description: Option<String>,
rust/src/models/data_integration.rs
rust/src/models/data_integration.rs CHANGED
@@ -15,6 +15,8 @@ pub struct DataIntegration {
15
  pub slug: String,
16
  /// The integration type derived from the provider.
17
  pub integration_type: String,
 
 
18
  /// An optional description of the Data Integration.
19
  #[serde(skip_serializing_if = "Option::is_none", default)]
20
  pub description: Option<String>,
 
15
  pub slug: String,
16
  /// The integration type derived from the provider.
17
  pub integration_type: String,
18
+ /// Who owns the Data Integration: `user` when users connect their own accounts, `organization` when organizations connect. Fixed at creation.
19
+ pub ownership: DataIntegrationOwnership,
20
  /// An optional description of the Data Integration.
21
  #[serde(skip_serializing_if = "Option::is_none", default)]
22
  pub description: Option<String>,
rust/src/models/data_integration_installation.rs
rust/src/models/data_integration_installation.rs CHANGED
@@ -9,9 +9,10 @@ use serde::{Deserialize, Serialize};
9
  pub struct DataIntegrationInstallation {
10
  /// Unique identifier of the installation.
11
  pub id: String,
12
- /// The User the API key was installed for.
 
13
- pub user_id: String,
14
- /// The Organization the installation is scoped to, or null when unscoped.
15
  #[serde(skip_serializing_if = "Option::is_none", default)]
16
  pub organization_id: Option<String>,
17
  /// The last four characters of the stored API key. The full key is never returned.
 
9
  pub struct DataIntegrationInstallation {
10
  /// Unique identifier of the installation.
11
  pub id: String,
12
+ /// The User the API key was installed for. Null on an `organization`-owned integration, whose installations belong to the organization.
13
+ #[serde(skip_serializing_if = "Option::is_none", default)]
14
+ pub user_id: Option<String>,
15
+ /// The Organization the installation is scoped to (or owned by, on an `organization`-owned integration), or null when unscoped.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
  pub organization_id: Option<String>,
18
  /// The last four characters of the stored API key. The full key is never returned.
rust/src/models/data_integrations_get_user_token_request.rs
rust/src/models/data_integrations_get_user_token_request.rs CHANGED
@@ -7,12 +7,18 @@ use crate::enums::*;
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct DataIntegrationsGetUserTokenRequest {
10
- /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
11
  pub user_id: String,
12
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
15
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
  pub connected_account_id: Option<String>,
 
 
 
 
 
 
18
  }
 
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct DataIntegrationsGetUserTokenRequest {
10
+ /// A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
11
  pub user_id: String,
12
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
15
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
  pub connected_account_id: Option<String>,
18
+ /// Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
19
+ #[serde(skip_serializing_if = "Option::is_none", default)]
20
+ pub connection_owner: Option<DataIntegrationsGetUserTokenRequestConnectionOwner>,
21
+ /// Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
22
+ #[serde(skip_serializing_if = "Option::is_none", default)]
23
+ pub supports_multiple_connections: Option<bool>,
24
  }
rust/src/models/data_integrations_list_response_data.rs
rust/src/models/data_integrations_list_response_data.rs CHANGED
@@ -50,9 +50,9 @@ pub struct DataIntegrationsListResponseData {
50
  #[serde(rename = "updatedAt")]
51
  #[deprecated]
52
  pub updated_at_2: String,
53
- /// The user's [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` if the user has not connected.
54
  #[serde(skip_serializing_if = "Option::is_none", default)]
55
  pub connected_account: Option<DataIntegrationsListResponseDataConnectedAccount>,
56
- /// The user's connected accounts for this provider in the requested ownership context.
57
  pub connected_accounts: Vec<DataIntegrationsListResponseDataConnectedAccount>,
58
  }
 
50
  #[serde(rename = "updatedAt")]
51
  #[deprecated]
52
  pub updated_at_2: String,
53
+ /// The user's compatibility [connected account](https://workos.com/docs/reference/pipes/connected-account) for this provider, or `null` when the compatibility slot is empty. This legacy field never selects a standard connection.
54
  #[serde(skip_serializing_if = "Option::is_none", default)]
55
  pub connected_account: Option<DataIntegrationsListResponseDataConnectedAccount>,
56
+ /// The user's connected accounts for this provider in the requested ownership context. This contains only the compatibility connection unless `supports_multiple_connections` is `true`.
57
  pub connected_accounts: Vec<DataIntegrationsListResponseDataConnectedAccount>,
58
  }
rust/src/models/data_integrations_upsert_api_key_request.rs
rust/src/models/data_integrations_upsert_api_key_request.rs CHANGED
@@ -9,9 +9,15 @@ use serde::{Deserialize, Serialize};
9
  pub struct DataIntegrationsUpsertApiKeyRequest {
10
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
11
  pub user_id: String,
12
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
 
 
 
 
 
 
15
  /// The API key secret to store for this integration.
16
  pub secret: crate::SecretString,
17
  }
 
9
  pub struct DataIntegrationsUpsertApiKeyRequest {
10
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
11
  pub user_id: String,
12
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
15
+ /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
16
+ #[serde(skip_serializing_if = "Option::is_none", default)]
17
+ pub connected_account_id: Option<String>,
18
+ /// Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
19
+ #[serde(skip_serializing_if = "Option::is_none", default)]
20
+ pub connection_owner: Option<DataIntegrationsUpsertApiKeyRequestConnectionOwner>,
21
  /// The API key secret to store for this integration.
22
  pub secret: crate::SecretString,
23
  }
rust/src/models/data_integrations_upsert_client_credentials_request.rs
rust/src/models/data_integrations_upsert_client_credentials_request.rs CHANGED
@@ -9,9 +9,15 @@ use serde::{Deserialize, Serialize};
9
  pub struct DataIntegrationsUpsertClientCredentialsRequest {
10
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
11
  pub user_id: String,
12
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
 
 
 
 
 
 
15
  /// The OAuth client ID to store for this integration.
16
  pub client_id: String,
17
  /// The OAuth client secret to store for this integration.
 
9
  pub struct DataIntegrationsUpsertClientCredentialsRequest {
10
  /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
11
  pub user_id: String,
12
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
15
+ /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to rotate a specific existing connection.
16
+ #[serde(skip_serializing_if = "Option::is_none", default)]
17
+ pub connected_account_id: Option<String>,
18
+ /// Whose connection to create or rotate. `user` (the default) addresses the connection owned by `user_id`. `organization` addresses the connection shared by every member of `organization_id`; `user_id` then identifies the member performing the request and must be an active member of the organization.
19
+ #[serde(skip_serializing_if = "Option::is_none", default)]
20
+ pub connection_owner: Option<DataIntegrationsUpsertClientCredentialsRequestConnectionOwner>,
21
  /// The OAuth client ID to store for this integration.
22
  pub client_id: String,
23
  /// The OAuth client secret to store for this integration.
rust/src/models/data_integrations_vend_credentials_request.rs
rust/src/models/data_integrations_vend_credentials_request.rs CHANGED
@@ -7,12 +7,18 @@ use crate::enums::*;
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct DataIntegrationsVendCredentialsRequest {
10
- /// A [User](https://workos.com/docs/reference/authkit/user) identifier.
11
  pub user_id: String,
12
- /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
15
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
  pub connected_account_id: Option<String>,
 
 
 
 
 
 
18
  }
 
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct DataIntegrationsVendCredentialsRequest {
10
+ /// A [User](https://workos.com/docs/reference/authkit/user) identifier. When `connection_owner` is `organization`, this is the user the credentials are vended on behalf of; they must be an active member of the organization.
11
  pub user_id: String,
12
+ /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to scope the connection to a specific organization. Required when `connection_owner` is `organization`.
13
  #[serde(skip_serializing_if = "Option::is_none", default)]
14
  pub organization_id: Option<String>,
15
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
16
  #[serde(skip_serializing_if = "Option::is_none", default)]
17
  pub connected_account_id: Option<String>,
18
+ /// Which connection to vend from. `user` (the default) vends the user's own connection and requires `user_id`. `organization` vends the organization's shared connection and requires `organization_id`.
19
+ #[serde(skip_serializing_if = "Option::is_none", default)]
20
+ pub connection_owner: Option<DataIntegrationsVendCredentialsRequestConnectionOwner>,
21
+ /// Set to `true` to use the plural connection contract. If no `connected_account_id` is supplied and several connections match, the request returns `account_selection_required`. When omitted or `false`, only the compatibility connection is considered.
22
+ #[serde(skip_serializing_if = "Option::is_none", default)]
23
+ pub supports_multiple_connections: Option<bool>,
24
  }
rust/src/models/generate_link.rs
rust/src/models/generate_link.rs CHANGED
@@ -7,10 +7,10 @@ use crate::enums::*;
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct GenerateLink {
10
- /// The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
11
  #[serde(skip_serializing_if = "Option::is_none", default)]
12
  pub return_url: Option<String>,
13
- /// The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Redirects](https://dashboard.workos.com/redirects) page will be used.
14
  #[serde(skip_serializing_if = "Option::is_none", default)]
15
  pub success_url: Option<String>,
16
  /// An [Organization](https://workos.com/docs/reference/organization) identifier.
 
7
  use serde::{Deserialize, Serialize};
8
  #[derive(Debug, Clone, Serialize, Deserialize)]
9
  pub struct GenerateLink {
10
+ /// The URL to go to when an admin clicks on your logo in the Admin Portal. If not specified, the return URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
11
  #[serde(skip_serializing_if = "Option::is_none", default)]
12
  pub return_url: Option<String>,
13
+ /// The URL to redirect the admin to when they finish setup. If not specified, the success URL configured on the [Admin Portal](https://dashboard.workos.com/admin-portal) page will be used.
14
  #[serde(skip_serializing_if = "Option::is_none", default)]
15
  pub success_url: Option<String>,
16
  /// An [Organization](https://workos.com/docs/reference/organization) identifier.
rust/src/models/mod.rs
rust/src/models/mod.rs CHANGED
@@ -2,6 +2,7 @@
2
 
3
  mod _unions;
4
  mod access_token_agent_registration_credential_issued_data_detail;
 
5
  mod action_authentication_denied;
6
  mod action_authentication_denied_data;
7
  mod action_user_registration_denied;
@@ -166,6 +167,7 @@ mod authentication_sso_timed_out;
166
  mod authentication_sso_timed_out_data;
167
  mod authentication_sso_timed_out_data_error;
168
  mod authentication_sso_timed_out_data_sso;
 
169
  mod authorization_check;
170
  mod authorization_code_session_authenticate_request;
171
  mod authorization_permission;
@@ -216,6 +218,7 @@ mod connection_saml_certificate_renewed_data_certificate;
216
  mod connection_saml_certificate_renewed_data_connection;
217
  mod cors_origin_response;
218
  mod create_application_secret;
 
219
  mod create_authorization_permission;
220
  mod create_authorization_resource;
221
  mod create_connection;
@@ -650,6 +653,7 @@ mod widget_session_token_response;
650
 
651
  pub use _unions::*;
652
  pub use access_token_agent_registration_credential_issued_data_detail::*;
 
653
  pub use action_authentication_denied::*;
654
  pub use action_authentication_denied_data::*;
655
  pub use action_user_registration_denied::*;
@@ -814,6 +818,7 @@ pub use authentication_sso_timed_out::*;
814
  pub use authentication_sso_timed_out_data::*;
815
  pub use authentication_sso_timed_out_data_error::*;
816
  pub use authentication_sso_timed_out_data_sso::*;
 
817
  pub use authorization_check::*;
818
  pub use authorization_code_session_authenticate_request::*;
819
  pub use authorization_permission::*;
@@ -864,6 +869,7 @@ pub use connection_saml_certificate_renewed_data_certificate::*;
864
  pub use connection_saml_certificate_renewed_data_connection::*;
865
  pub use cors_origin_response::*;
866
  pub use create_application_secret::*;
 
867
  pub use create_authorization_permission::*;
868
  pub use create_authorization_resource::*;
869
  pub use create_connection::*;
 
2
 
3
  mod _unions;
4
  mod access_token_agent_registration_credential_issued_data_detail;
5
+ mod account_selection_required_error;
6
  mod action_authentication_denied;
7
  mod action_authentication_denied_data;
8
  mod action_user_registration_denied;
 
167
  mod authentication_sso_timed_out_data;
168
  mod authentication_sso_timed_out_data_error;
169
  mod authentication_sso_timed_out_data_sso;
170
+ mod authkit_oauth_resource;
171
  mod authorization_check;
172
  mod authorization_code_session_authenticate_request;
173
  mod authorization_permission;
 
218
  mod connection_saml_certificate_renewed_data_connection;
219
  mod cors_origin_response;
220
  mod create_application_secret;
221
+ mod create_authkit_oauth_resource;
222
  mod create_authorization_permission;
223
  mod create_authorization_resource;
224
  mod create_connection;
 
653
 
654
  pub use _unions::*;
655
  pub use access_token_agent_registration_credential_issued_data_detail::*;
656
+ pub use account_selection_required_error::*;
657
  pub use action_authentication_denied::*;
658
  pub use action_authentication_denied_data::*;
659
  pub use action_user_registration_denied::*;
 
818
  pub use authentication_sso_timed_out_data::*;
819
  pub use authentication_sso_timed_out_data_error::*;
820
  pub use authentication_sso_timed_out_data_sso::*;
821
+ pub use authkit_oauth_resource::*;
822
  pub use authorization_check::*;
823
  pub use authorization_code_session_authenticate_request::*;
824
  pub use authorization_permission::*;
 
869
  pub use connection_saml_certificate_renewed_data_connection::*;
870
  pub use cors_origin_response::*;
871
  pub use create_application_secret::*;
872
+ pub use create_authkit_oauth_resource::*;
873
  pub use create_authorization_permission::*;
874
  pub use create_authorization_resource::*;
875
  pub use create_connection::*;
rust/src/resources/pipes.rs
rust/src/resources/pipes.rs CHANGED
@@ -30,6 +30,9 @@ pub struct ListDataIntegrationsParams {
30
  /// Defaults to `desc`.
31
  #[serde(skip_serializing_if = "Option::is_none")]
32
  pub order: Option<PaginationOrder>,
 
 
 
33
  }
34
 
35
  impl Default for ListDataIntegrationsParams {
@@ -40,6 +43,7 @@ impl Default for ListDataIntegrationsParams {
40
  after: Default::default(),
41
  limit: Some(10),
42
  order: Some(PaginationOrder::Desc),
 
43
  }
44
  }
45
  }
@@ -146,6 +150,23 @@ impl CreateDataIntegrationCredentialParams {
146
  }
147
  }
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  #[derive(Debug, Clone, Serialize)]
150
  pub struct GetAccessTokenParams {
151
  /// Request body sent with this call.
@@ -168,6 +189,9 @@ pub struct GetUserConnectedAccountParams {
168
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
169
  #[serde(skip_serializing_if = "Option::is_none")]
170
  pub organization_id: Option<String>,
 
 
 
171
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
172
  #[serde(skip_serializing_if = "Option::is_none")]
173
  pub connected_account_id: Option<String>,
@@ -201,6 +225,9 @@ pub struct UpdateUserConnectedAccountParams {
201
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
202
  #[serde(skip_serializing_if = "Option::is_none")]
203
  pub organization_id: Option<String>,
 
 
 
204
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
205
  #[serde(skip_serializing_if = "Option::is_none")]
206
  pub connected_account_id: Option<String>,
@@ -217,6 +244,7 @@ impl UpdateUserConnectedAccountParams {
217
  pub fn new(body: ConnectedAccountInput) -> Self {
218
  Self {
219
  organization_id: Default::default(),
 
220
  connected_account_id: Default::default(),
221
  body,
222
  }
@@ -228,6 +256,9 @@ pub struct DeleteUserConnectedAccountParams {
228
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
229
  #[serde(skip_serializing_if = "Option::is_none")]
230
  pub organization_id: Option<String>,
 
 
 
231
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
232
  #[serde(skip_serializing_if = "Option::is_none")]
233
  pub connected_account_id: Option<String>,
@@ -238,12 +269,15 @@ pub struct ListUserDataProvidersParams {
238
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
239
  #[serde(skip_serializing_if = "Option::is_none")]
240
  pub organization_id: Option<String>,
 
 
 
241
  }
242
 
243
  impl<'a> PipesApi<'a> {
244
  /// List data integrations
245
  ///
246
- /// Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations.
247
  pub async fn list_data_integrations(
248
  &self,
249
  params: ListDataIntegrationsParams,
@@ -290,7 +324,7 @@ impl<'a> PipesApi<'a> {
290
 
291
  /// Create a data integration
292
  ///
293
- /// Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition.
294
  pub async fn create_data_integration(
295
  &self,
296
  params: CreateDataIntegrationParams,
@@ -314,7 +348,7 @@ impl<'a> PipesApi<'a> {
314
 
315
  /// Get a data integration
316
  ///
317
- /// Retrieves a data integration by its slug.
318
  pub async fn get_data_integration(&self, slug: &str) -> Result<DataIntegration, Error> {
319
  self.get_data_integration_with_options(slug, None).await
320
  }
@@ -335,7 +369,7 @@ impl<'a> PipesApi<'a> {
335
 
336
  /// Update a data integration
337
  ///
338
- /// Updates the description, enabled state, or custom credentials of a data integration. For custom providers, `custom_provider` updates the OAuth definition.
339
  pub async fn update_data_integration(
340
  &self,
341
  slug: &str,
@@ -362,7 +396,7 @@ impl<'a> PipesApi<'a> {
362
 
363
  /// Delete a data integration
364
  ///
365
- /// Deletes a data integration and all of its connected installations. For a custom provider, also deletes the custom provider definition.
366
  pub async fn delete_data_integration(&self, slug: &str) -> Result<(), Error> {
367
  self.delete_data_integration_with_options(slug, None).await
368
  }
@@ -383,7 +417,7 @@ impl<'a> PipesApi<'a> {
383
 
384
  /// Upsert an API key for a connected account
385
  ///
386
- /// Creates or updates an API-key-based installation for the specified integration and user. If an installation already exists, the stored API key is rotated to the new value.
387
  pub async fn update_data_integration_api_key(
388
  &self,
389
  slug: &str,
@@ -437,7 +471,7 @@ impl<'a> PipesApi<'a> {
437
 
438
  /// Upsert client credentials for a connected account
439
  ///
440
- /// Creates or updates a client-credentials-based installation for the specified integration and user. If an installation already exists, the stored client credentials are rotated to the new values.
441
  pub async fn update_data_integration_client_credentials(
442
  &self,
443
  slug: &str,
@@ -489,6 +523,80 @@ impl<'a> PipesApi<'a> {
489
  .await
490
  }
491
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
  /// Get an access token for a connected account
493
  ///
494
  /// Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
 
30
  /// Defaults to `desc`.
31
  #[serde(skip_serializing_if = "Option::is_none")]
32
  pub order: Option<PaginationOrder>,
33
+ /// Only return Data Integrations with this ownership: `user` for the integrations users connect their own accounts to, or `organization` for the roots organizations connect to. Omit to return both.
34
+ #[serde(skip_serializing_if = "Option::is_none")]
35
+ pub ownership: Option<PipesOwnership>,
36
  }
37
 
38
  impl Default for ListDataIntegrationsParams {
 
43
  after: Default::default(),
44
  limit: Some(10),
45
  order: Some(PaginationOrder::Desc),
46
+ ownership: Default::default(),
47
  }
48
  }
49
  }
 
150
  }
151
  }
152
 
153
+ #[derive(Debug, Clone, Serialize)]
154
+ pub struct UpdateDataIntegrationOrganizationParams {
155
+ /// Request body sent with this call.
156
+ ///
157
+ /// Required.
158
+ #[serde(skip)]
159
+ pub body: UpdateDataIntegration,
160
+ }
161
+
162
+ impl UpdateDataIntegrationOrganizationParams {
163
+ /// Construct a new `UpdateDataIntegrationOrganizationParams` with the required fields set.
164
+ #[allow(deprecated)]
165
+ pub fn new(body: UpdateDataIntegration) -> Self {
166
+ Self { body }
167
+ }
168
+ }
169
+
170
  #[derive(Debug, Clone, Serialize)]
171
  pub struct GetAccessTokenParams {
172
  /// Request body sent with this call.
 
189
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
190
  #[serde(skip_serializing_if = "Option::is_none")]
191
  pub organization_id: Option<String>,
192
+ /// Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
193
+ #[serde(skip_serializing_if = "Option::is_none")]
194
+ pub supports_multiple_connections: Option<bool>,
195
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select a specific connection when the user has several for this provider.
196
  #[serde(skip_serializing_if = "Option::is_none")]
197
  pub connected_account_id: Option<String>,
 
225
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
226
  #[serde(skip_serializing_if = "Option::is_none")]
227
  pub organization_id: Option<String>,
228
+ /// Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
229
+ #[serde(skip_serializing_if = "Option::is_none")]
230
+ pub supports_multiple_connections: Option<bool>,
231
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to update.
232
  #[serde(skip_serializing_if = "Option::is_none")]
233
  pub connected_account_id: Option<String>,
 
244
  pub fn new(body: ConnectedAccountInput) -> Self {
245
  Self {
246
  organization_id: Default::default(),
247
+ supports_multiple_connections: Default::default(),
248
  connected_account_id: Default::default(),
249
  body,
250
  }
 
256
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter if the connection is scoped to an organization.
257
  #[serde(skip_serializing_if = "Option::is_none")]
258
  pub organization_id: Option<String>,
259
+ /// Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
260
+ #[serde(skip_serializing_if = "Option::is_none")]
261
+ pub supports_multiple_connections: Option<bool>,
262
  /// A [connected account](https://workos.com/docs/reference/pipes/connected-account) identifier. Use this to select the connection to delete.
263
  #[serde(skip_serializing_if = "Option::is_none")]
264
  pub connected_account_id: Option<String>,
 
269
  /// An [Organization](https://workos.com/docs/reference/organization) identifier. Optional parameter to filter connections for a specific organization.
270
  #[serde(skip_serializing_if = "Option::is_none")]
271
  pub organization_id: Option<String>,
272
+ /// Set to `true` to use the plural connection contract. When omitted or `false`, only the compatibility connection is considered.
273
+ #[serde(skip_serializing_if = "Option::is_none")]
274
+ pub supports_multiple_connections: Option<bool>,
275
  }
276
 
277
  impl<'a> PipesApi<'a> {
278
  /// List data integrations
279
  ///
280
+ /// Lists the environment's data integrations configured with `custom` or `organization` credentials, including custom providers and API key integrations. Both user-owned and organization-owned roots are returned, each as its own row with an `ownership`; filter with `ownership` to return only one kind.
281
  pub async fn list_data_integrations(
282
  &self,
283
  params: ListDataIntegrationsParams,
 
324
 
325
  /// Create a data integration
326
  ///
327
+ /// Creates a data integration for a provider. Set `credentials.type` to `custom` to use your own OAuth app credentials or `organization` to have each organization supply its own. Set `auth_methods` to `["api_key"]` to create an API key integration; you may optionally supply an `api_key` block to install a first tenant in the same call. Set `auth_methods` to `["client_credentials"]` to create a client-credentials integration; client credentials are installed per-tenant afterwards. Set `ownership` to `organization` to create the integration organizations connect to instead of the default user-owned one; a provider may have one of each. For a built-in provider, pass its slug as `provider`. For a custom provider, pass a new slug plus a `custom_provider` definition, or the slug of an existing custom provider (without `custom_provider`) to add the other ownership.
328
  pub async fn create_data_integration(
329
  &self,
330
  params: CreateDataIntegrationParams,
 
348
 
349
  /// Get a data integration
350
  ///
351
+ /// Retrieves the user-owned data integration by its slug.
352
  pub async fn get_data_integration(&self, slug: &str) -> Result<DataIntegration, Error> {
353
  self.get_data_integration_with_options(slug, None).await
354
  }
 
369
 
370
  /// Update a data integration
371
  ///
372
+ /// Updates the description, enabled state, or custom credentials of the user-owned data integration. For custom providers, `custom_provider` updates the OAuth definition.
373
  pub async fn update_data_integration(
374
  &self,
375
  slug: &str,
 
396
 
397
  /// Delete a data integration
398
  ///
399
+ /// Deletes the user-owned data integration and all of its connected installations. For a custom provider, the provider definition is deleted once no organization-owned root references it either.
400
  pub async fn delete_data_integration(&self, slug: &str) -> Result<(), Error> {
401
  self.delete_data_integration_with_options(slug, None).await
402
  }
 
417
 
418
  /// Upsert an API key for a connected account
419
  ///
420
+ /// Creates or updates an API-key-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored API key is rotated to the new value.
421
  pub async fn update_data_integration_api_key(
422
  &self,
423
  slug: &str,
 
471
 
472
  /// Upsert client credentials for a connected account
473
  ///
474
+ /// Creates or updates a client-credentials-based installation for the specified integration, owned by the user or, when `connection_owner` is `organization`, shared by the organization. If an installation already exists, the stored client credentials are rotated to the new values.
475
  pub async fn update_data_integration_client_credentials(
476
  &self,
477
  slug: &str,
 
523
  .await
524
  }
525
 
526
+ /// Get an organization-owned data integration
527
+ ///
528
+ /// Retrieves the organization-owned data integration for a provider by its slug. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
529
+ pub async fn list_data_integration_organization(
530
+ &self,
531
+ slug: &str,
532
+ ) -> Result<DataIntegration, Error> {
533
+ self.list_data_integration_organization_with_options(slug, None)
534
+ .await
535
+ }
536
+
537
+ /// Variant of [`Self::list_data_integration_organization`] that accepts per-request [`crate::RequestOptions`].
538
+ pub async fn list_data_integration_organization_with_options(
539
+ &self,
540
+ slug: &str,
541
+ options: Option<&crate::RequestOptions>,
542
+ ) -> Result<DataIntegration, Error> {
543
+ let slug = crate::client::path_segment(slug);
544
+ let path = format!("/data-integrations/{slug}/organization");
545
+ let method = http::Method::GET;
546
+ self.client
547
+ .request_with_query_opts(method, &path, &(), options)
548
+ .await
549
+ }
550
+
551
+ /// Update an organization-owned data integration
552
+ ///
553
+ /// Updates the description, enabled state, or custom credentials of the organization-owned data integration for a provider. For custom providers, `custom_provider` updates the OAuth definition, which is shared with the user-owned root. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
554
+ pub async fn update_data_integration_organization(
555
+ &self,
556
+ slug: &str,
557
+ params: UpdateDataIntegrationOrganizationParams,
558
+ ) -> Result<DataIntegration, Error> {
559
+ self.update_data_integration_organization_with_options(slug, params, None)
560
+ .await
561
+ }
562
+
563
+ /// Variant of [`Self::update_data_integration_organization`] that accepts per-request [`crate::RequestOptions`].
564
+ pub async fn update_data_integration_organization_with_options(
565
+ &self,
566
+ slug: &str,
567
+ params: UpdateDataIntegrationOrganizationParams,
568
+ options: Option<&crate::RequestOptions>,
569
+ ) -> Result<DataIntegration, Error> {
570
+ let slug = crate::client::path_segment(slug);
571
+ let path = format!("/data-integrations/{slug}/organization");
572
+ let method = http::Method::PUT;
573
+ self.client
574
+ .request_with_body_opts(method, &path, &params, Some(&params.body), options)
575
+ .await
576
+ }
577
+
578
+ /// Delete an organization-owned data integration
579
+ ///
580
+ /// Deletes the organization-owned data integration for a provider and all of its connected installations. For a custom provider, the provider definition is deleted once no user-owned root references it either. The `/organization` suffix selects the environment-level organization-owned root for the provider; it does not name a particular organization.
581
+ pub async fn delete_data_integration_organization(&self, slug: &str) -> Result<(), Error> {
582
+ self.delete_data_integration_organization_with_options(slug, None)
583
+ .await
584
+ }
585
+
586
+ /// Variant of [`Self::delete_data_integration_organization`] that accepts per-request [`crate::RequestOptions`].
587
+ pub async fn delete_data_integration_organization_with_options(
588
+ &self,
589
+ slug: &str,
590
+ options: Option<&crate::RequestOptions>,
591
+ ) -> Result<(), Error> {
592
+ let slug = crate::client::path_segment(slug);
593
+ let path = format!("/data-integrations/{slug}/organization");
594
+ let method = http::Method::DELETE;
595
+ self.client
596
+ .request_with_query_opts_empty(method, &path, &(), options)
597
+ .await
598
+ }
599
+
600
  /// Get an access token for a connected account
601
  ///
602
  /// Fetches a valid OAuth access token for a user's connected account. WorkOS automatically handles token refresh, ensuring you always receive a valid, non-expired token.
rust/src/resources/user_management.rs
rust/src/resources/user_management.rs CHANGED
@@ -668,6 +668,55 @@ impl RevokeSessionParams {
668
  }
669
  }
670
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
  #[derive(Debug, Clone, Serialize)]
672
  pub struct ListCorsOriginsParams {
673
  /// 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"`.
@@ -1771,6 +1820,100 @@ impl<'a> UserManagementApi<'a> {
1771
  .await
1772
  }
1773
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1774
  /// List CORS origins
1775
  ///
1776
  /// Lists the CORS origins for the current environment.
 
668
  }
669
  }
670
 
671
+ #[derive(Debug, Clone, Serialize)]
672
+ pub struct ListAuthkitOAuthResourcesParams {
673
+ /// 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"`.
674
+ #[serde(skip_serializing_if = "Option::is_none")]
675
+ pub before: Option<String>,
676
+ /// 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 `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
677
+ #[serde(skip_serializing_if = "Option::is_none")]
678
+ pub after: Option<String>,
679
+ /// Upper limit on the number of objects to return, between `1` and `100`.
680
+ ///
681
+ /// Defaults to `10`.
682
+ #[serde(skip_serializing_if = "Option::is_none")]
683
+ pub limit: Option<i64>,
684
+ /// Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records).
685
+ ///
686
+ /// Defaults to `desc`.
687
+ #[serde(skip_serializing_if = "Option::is_none")]
688
+ pub order: Option<PaginationOrder>,
689
+ }
690
+
691
+ impl Default for ListAuthkitOAuthResourcesParams {
692
+ #[allow(deprecated)]
693
+ fn default() -> Self {
694
+ Self {
695
+ before: Default::default(),
696
+ after: Default::default(),
697
+ limit: Some(10),
698
+ order: Some(PaginationOrder::Desc),
699
+ }
700
+ }
701
+ }
702
+
703
+ #[derive(Debug, Clone, Serialize)]
704
+ pub struct CreateAuthkitOAuthResourceParams {
705
+ /// Request body sent with this call.
706
+ ///
707
+ /// Required.
708
+ #[serde(skip)]
709
+ pub body: CreateAuthkitOAuthResource,
710
+ }
711
+
712
+ impl CreateAuthkitOAuthResourceParams {
713
+ /// Construct a new `CreateAuthkitOAuthResourceParams` with the required fields set.
714
+ #[allow(deprecated)]
715
+ pub fn new(body: CreateAuthkitOAuthResource) -> Self {
716
+ Self { body }
717
+ }
718
+ }
719
+
720
  #[derive(Debug, Clone, Serialize)]
721
  pub struct ListCorsOriginsParams {
722
  /// 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"`.
 
1820
  .await
1821
  }
1822
 
1823
+ /// List AuthKit OAuth resources
1824
+ ///
1825
+ /// Lists the AuthKit OAuth resources (resource indicators) configured for an environment.
1826
+ pub async fn list_authkit_oauth_resources(
1827
+ &self,
1828
+ params: ListAuthkitOAuthResourcesParams,
1829
+ ) -> Result<crate::pagination::Page<AuthkitOAuthResource>, Error> {
1830
+ self.list_authkit_oauth_resources_with_options(params, None)
1831
+ .await
1832
+ }
1833
+
1834
+ /// Variant of [`Self::list_authkit_oauth_resources`] that accepts per-request [`crate::RequestOptions`].
1835
+ pub async fn list_authkit_oauth_resources_with_options(
1836
+ &self,
1837
+ params: ListAuthkitOAuthResourcesParams,
1838
+ options: Option<&crate::RequestOptions>,
1839
+ ) -> Result<crate::pagination::Page<AuthkitOAuthResource>, Error> {
1840
+ let path = "/user_management/authkit_oauth_resources".to_string();
1841
+ let method = http::Method::GET;
1842
+ self.client
1843
+ .request_with_query_opts(method, &path, &params, options)
1844
+ .await
1845
+ }
1846
+
1847
+ /// Returns an async [`futures_util::Stream`] that yields every `AuthkitOAuthResource`
1848
+ /// across all pages, advancing the `after` cursor under the hood.
1849
+ ///
1850
+ /// ```ignore
1851
+ /// use futures_util::TryStreamExt;
1852
+ /// let all: Vec<AuthkitOAuthResource> = self
1853
+ /// .list_authkit_oauth_resources_auto_paging(params)
1854
+ /// .try_collect()
1855
+ /// .await?;
1856
+ /// ```
1857
+ pub fn list_authkit_oauth_resources_auto_paging(
1858
+ &self,
1859
+ params: ListAuthkitOAuthResourcesParams,
1860
+ ) -> impl futures_util::Stream<Item = Result<AuthkitOAuthResource, Error>> + '_ {
1861
+ crate::pagination::auto_paginate_pages(move |after| {
1862
+ let mut params = params.clone();
1863
+ params.after = after;
1864
+ async move {
1865
+ let page = self.list_authkit_oauth_resources(params).await?;
1866
+ Ok((page.data, page.list_metadata.after))
1867
+ }
1868
+ })
1869
+ }
1870
+
1871
+ /// Create an AuthKit OAuth resource
1872
+ ///
1873
+ /// Adds an AuthKit OAuth resource — a resource indicator, per RFC 8707 — to an environment, leaving any others in place.
1874
+ pub async fn create_authkit_oauth_resource(
1875
+ &self,
1876
+ params: CreateAuthkitOAuthResourceParams,
1877
+ ) -> Result<AuthkitOAuthResource, Error> {
1878
+ self.create_authkit_oauth_resource_with_options(params, None)
1879
+ .await
1880
+ }
1881
+
1882
+ /// Variant of [`Self::create_authkit_oauth_resource`] that accepts per-request [`crate::RequestOptions`].
1883
+ pub async fn create_authkit_oauth_resource_with_options(
1884
+ &self,
1885
+ params: CreateAuthkitOAuthResourceParams,
1886
+ options: Option<&crate::RequestOptions>,
1887
+ ) -> Result<AuthkitOAuthResource, Error> {
1888
+ let path = "/user_management/authkit_oauth_resources".to_string();
1889
+ let method = http::Method::POST;
1890
+ self.client
1891
+ .request_with_body_opts(method, &path, &params, Some(&params.body), options)
1892
+ .await
1893
+ }
1894
+
1895
+ /// Delete an AuthKit OAuth resource
1896
+ ///
1897
+ /// Removes an AuthKit OAuth resource from an environment. Any application consents granted against it are removed too.
1898
+ pub async fn delete_authkit_oauth_resource(&self, id: &str) -> Result<(), Error> {
1899
+ self.delete_authkit_oauth_resource_with_options(id, None)
1900
+ .await
1901
+ }
1902
+
1903
+ /// Variant of [`Self::delete_authkit_oauth_resource`] that accepts per-request [`crate::RequestOptions`].
1904
+ pub async fn delete_authkit_oauth_resource_with_options(
1905
+ &self,
1906
+ id: &str,
1907
+ options: Option<&crate::RequestOptions>,
1908
+ ) -> Result<(), Error> {
1909
+ let id = crate::client::path_segment(id);
1910
+ let path = format!("/user_management/authkit_oauth_resources/{id}");
1911
+ let method = http::Method::DELETE;
1912
+ self.client
1913
+ .request_with_query_opts_empty(method, &path, &(), options)
1914
+ .await
1915
+ }
1916
+
1917
  /// List CORS origins
1918
  ///
1919
  /// Lists the CORS origins for the current environment.
rust/tests/fixtures/account_selection_required_error.json
rust/tests/fixtures/account_selection_required_error.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "code": "account_selection_required",
3
+ "message": "Several connected accounts match this user for this provider. Name one with a connected account id."
4
+ }
rust/tests/fixtures/authkit_oauth_resource.json
rust/tests/fixtures/authkit_oauth_resource.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "object": "authkit_oauth_resource",
3
+ "id": "authkit_oauth_resource_01EHZNVPK3SFK441A1RGBFSHRT",
4
+ "uri": "https://api.example.com",
5
+ "default": false,
6
+ "created_at": "2026-01-15T12:00:00.000Z",
7
+ "updated_at": "2026-01-15T12:00:00.000Z"
8
+ }
rust/tests/fixtures/create_authkit_oauth_resource.json
rust/tests/fixtures/create_authkit_oauth_resource.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "uri": "https://api.example.com"
3
+ }
rust/tests/fixtures/data_integration.json
rust/tests/fixtures/data_integration.json CHANGED
@@ -3,6 +3,7 @@
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
 
6
  "description": "Production GitHub app",
7
  "enabled": true,
8
  "state": "valid",
 
3
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
4
  "slug": "github",
5
  "integration_type": "github",
6
+ "ownership": "user",
7
  "description": "Production GitHub app",
8
  "enabled": true,
9
  "state": "valid",
rust/tests/fixtures/data_integration_list.json
rust/tests/fixtures/data_integration_list.json CHANGED
@@ -6,6 +6,7 @@
6
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
7
  "slug": "github",
8
  "integration_type": "github",
 
9
  "description": "Production GitHub app",
10
  "enabled": true,
11
  "state": "valid",
 
6
  "id": "data_integration_01EHZNVPK3SFK441A1RGBFSHRT",
7
  "slug": "github",
8
  "integration_type": "github",
9
+ "ownership": "user",
10
  "description": "Production GitHub app",
11
  "enabled": true,
12
  "state": "valid",
rust/tests/pipes_test.rs
rust/tests/pipes_test.rs CHANGED
@@ -1669,6 +1669,476 @@ async fn pipes_create_data_integration_credential_unprocessable() {
1669
  assert_eq!(api.status, 422);
1670
  }
1671
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1672
  #[tokio::test]
1673
  async fn pipes_get_access_token_round_trip() {
1674
  let server = MockServer::start().await;
 
1669
  assert_eq!(api.status, 422);
1670
  }
1671
 
1672
+ #[tokio::test]
1673
+ async fn pipes_list_data_integration_organization_round_trip() {
1674
+ let server = MockServer::start().await;
1675
+ Mock::given(method("GET"))
1676
+ .and(path_matcher("/data-integrations/test_id/organization"))
1677
+ .respond_with(
1678
+ ResponseTemplate::new(200)
1679
+ .set_body_string(include_str!("fixtures/data_integration.json")),
1680
+ )
1681
+ .expect(1)
1682
+ .mount(&server)
1683
+ .await;
1684
+ let client = common::test_client(&server).await;
1685
+ let _ = client
1686
+ .pipes()
1687
+ .list_data_integration_organization("test_id")
1688
+ .await;
1689
+ }
1690
+
1691
+ #[tokio::test]
1692
+ async fn pipes_list_data_integration_organization_unauthorized() {
1693
+ let server = MockServer::start().await;
1694
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
1695
+ Mock::given(method("GET"))
1696
+ .and(path_matcher("/data-integrations/test_id/organization"))
1697
+ .respond_with(template)
1698
+ .expect(1)
1699
+ .mount(&server)
1700
+ .await;
1701
+ let client = common::test_client(&server).await;
1702
+ let err = client
1703
+ .pipes()
1704
+ .list_data_integration_organization("test_id")
1705
+ .await
1706
+ .expect_err("expected error");
1707
+ let api = match &err {
1708
+ Error::Api(api) => api.as_ref(),
1709
+ other => panic!("expected Error::Api, got {other:?}"),
1710
+ };
1711
+ assert_eq!(api.status, 401);
1712
+ }
1713
+
1714
+ #[tokio::test]
1715
+ async fn pipes_list_data_integration_organization_not_found() {
1716
+ let server = MockServer::start().await;
1717
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
1718
+ Mock::given(method("GET"))
1719
+ .and(path_matcher("/data-integrations/test_id/organization"))
1720
+ .respond_with(template)
1721
+ .expect(1)
1722
+ .mount(&server)
1723
+ .await;
1724
+ let client = common::test_client(&server).await;
1725
+ let err = client
1726
+ .pipes()
1727
+ .list_data_integration_organization("test_id")
1728
+ .await
1729
+ .expect_err("expected error");
1730
+ let api = match &err {
1731
+ Error::Api(api) => api.as_ref(),
1732
+ other => panic!("expected Error::Api, got {other:?}"),
1733
+ };
1734
+ assert_eq!(api.status, 404);
1735
+ }
1736
+
1737
+ #[tokio::test]
1738
+ async fn pipes_list_data_integration_organization_rate_limited() {
1739
+ let server = MockServer::start().await;
1740
+ let template = ResponseTemplate::new(429)
1741
+ .insert_header("retry-after", "1")
1742
+ .set_body_string("{\"message\":\"Slow down\"}");
1743
+ Mock::given(method("GET"))
1744
+ .and(path_matcher("/data-integrations/test_id/organization"))
1745
+ .respond_with(template)
1746
+ .expect(1)
1747
+ .mount(&server)
1748
+ .await;
1749
+ let client = common::test_client(&server).await;
1750
+ let err = client
1751
+ .pipes()
1752
+ .list_data_integration_organization("test_id")
1753
+ .await
1754
+ .expect_err("expected error");
1755
+ let api = match &err {
1756
+ Error::Api(api) => api.as_ref(),
1757
+ other => panic!("expected Error::Api, got {other:?}"),
1758
+ };
1759
+ assert_eq!(api.status, 429);
1760
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
1761
+ }
1762
+
1763
+ #[tokio::test]
1764
+ async fn pipes_list_data_integration_organization_server_error() {
1765
+ let server = MockServer::start().await;
1766
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
1767
+ Mock::given(method("GET"))
1768
+ .and(path_matcher("/data-integrations/test_id/organization"))
1769
+ .respond_with(template)
1770
+ .expect(1)
1771
+ .mount(&server)
1772
+ .await;
1773
+ let client = common::test_client(&server).await;
1774
+ let err = client
1775
+ .pipes()
1776
+ .list_data_integration_organization("test_id")
1777
+ .await
1778
+ .expect_err("expected error");
1779
+ let api = match &err {
1780
+ Error::Api(api) => api.as_ref(),
1781
+ other => panic!("expected Error::Api, got {other:?}"),
1782
+ };
1783
+ assert_eq!(api.status, 500);
1784
+ }
1785
+
1786
+ #[tokio::test]
1787
+ async fn pipes_update_data_integration_organization_round_trip() {
1788
+ let server = MockServer::start().await;
1789
+ Mock::given(method("PUT"))
1790
+ .and(path_matcher("/data-integrations/test_id/organization"))
1791
+ .respond_with(
1792
+ ResponseTemplate::new(200)
1793
+ .set_body_string(include_str!("fixtures/data_integration.json")),
1794
+ )
1795
+ .expect(1)
1796
+ .mount(&server)
1797
+ .await;
1798
+ let client = common::test_client(&server).await;
1799
+ let _ = client
1800
+ .pipes()
1801
+ .update_data_integration_organization(
1802
+ "test_id",
1803
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1804
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1805
+ ),
1806
+ )
1807
+ .await;
1808
+ }
1809
+
1810
+ #[tokio::test]
1811
+ async fn pipes_update_data_integration_organization_unauthorized() {
1812
+ let server = MockServer::start().await;
1813
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
1814
+ Mock::given(method("PUT"))
1815
+ .and(path_matcher("/data-integrations/test_id/organization"))
1816
+ .respond_with(template)
1817
+ .expect(1)
1818
+ .mount(&server)
1819
+ .await;
1820
+ let client = common::test_client(&server).await;
1821
+ let err = client
1822
+ .pipes()
1823
+ .update_data_integration_organization(
1824
+ "test_id",
1825
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1826
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1827
+ ),
1828
+ )
1829
+ .await
1830
+ .expect_err("expected error");
1831
+ let api = match &err {
1832
+ Error::Api(api) => api.as_ref(),
1833
+ other => panic!("expected Error::Api, got {other:?}"),
1834
+ };
1835
+ assert_eq!(api.status, 401);
1836
+ }
1837
+
1838
+ #[tokio::test]
1839
+ async fn pipes_update_data_integration_organization_not_found() {
1840
+ let server = MockServer::start().await;
1841
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
1842
+ Mock::given(method("PUT"))
1843
+ .and(path_matcher("/data-integrations/test_id/organization"))
1844
+ .respond_with(template)
1845
+ .expect(1)
1846
+ .mount(&server)
1847
+ .await;
1848
+ let client = common::test_client(&server).await;
1849
+ let err = client
1850
+ .pipes()
1851
+ .update_data_integration_organization(
1852
+ "test_id",
1853
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1854
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1855
+ ),
1856
+ )
1857
+ .await
1858
+ .expect_err("expected error");
1859
+ let api = match &err {
1860
+ Error::Api(api) => api.as_ref(),
1861
+ other => panic!("expected Error::Api, got {other:?}"),
1862
+ };
1863
+ assert_eq!(api.status, 404);
1864
+ }
1865
+
1866
+ #[tokio::test]
1867
+ async fn pipes_update_data_integration_organization_rate_limited() {
1868
+ let server = MockServer::start().await;
1869
+ let template = ResponseTemplate::new(429)
1870
+ .insert_header("retry-after", "1")
1871
+ .set_body_string("{\"message\":\"Slow down\"}");
1872
+ Mock::given(method("PUT"))
1873
+ .and(path_matcher("/data-integrations/test_id/organization"))
1874
+ .respond_with(template)
1875
+ .expect(1)
1876
+ .mount(&server)
1877
+ .await;
1878
+ let client = common::test_client(&server).await;
1879
+ let err = client
1880
+ .pipes()
1881
+ .update_data_integration_organization(
1882
+ "test_id",
1883
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1884
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1885
+ ),
1886
+ )
1887
+ .await
1888
+ .expect_err("expected error");
1889
+ let api = match &err {
1890
+ Error::Api(api) => api.as_ref(),
1891
+ other => panic!("expected Error::Api, got {other:?}"),
1892
+ };
1893
+ assert_eq!(api.status, 429);
1894
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
1895
+ }
1896
+
1897
+ #[tokio::test]
1898
+ async fn pipes_update_data_integration_organization_server_error() {
1899
+ let server = MockServer::start().await;
1900
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
1901
+ Mock::given(method("PUT"))
1902
+ .and(path_matcher("/data-integrations/test_id/organization"))
1903
+ .respond_with(template)
1904
+ .expect(1)
1905
+ .mount(&server)
1906
+ .await;
1907
+ let client = common::test_client(&server).await;
1908
+ let err = client
1909
+ .pipes()
1910
+ .update_data_integration_organization(
1911
+ "test_id",
1912
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1913
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1914
+ ),
1915
+ )
1916
+ .await
1917
+ .expect_err("expected error");
1918
+ let api = match &err {
1919
+ Error::Api(api) => api.as_ref(),
1920
+ other => panic!("expected Error::Api, got {other:?}"),
1921
+ };
1922
+ assert_eq!(api.status, 500);
1923
+ }
1924
+
1925
+ #[tokio::test]
1926
+ async fn pipes_update_data_integration_organization_bad_request() {
1927
+ let server = MockServer::start().await;
1928
+ let template = ResponseTemplate::new(400)
1929
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
1930
+ Mock::given(method("PUT"))
1931
+ .and(path_matcher("/data-integrations/test_id/organization"))
1932
+ .respond_with(template)
1933
+ .expect(1)
1934
+ .mount(&server)
1935
+ .await;
1936
+ let client = common::test_client(&server).await;
1937
+ let err = client
1938
+ .pipes()
1939
+ .update_data_integration_organization(
1940
+ "test_id",
1941
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1942
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1943
+ ),
1944
+ )
1945
+ .await
1946
+ .expect_err("expected error");
1947
+ let api = match &err {
1948
+ Error::Api(api) => api.as_ref(),
1949
+ other => panic!("expected Error::Api, got {other:?}"),
1950
+ };
1951
+ assert_eq!(api.status, 400);
1952
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
1953
+ }
1954
+
1955
+ #[tokio::test]
1956
+ async fn pipes_update_data_integration_organization_unprocessable() {
1957
+ let server = MockServer::start().await;
1958
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
1959
+ Mock::given(method("PUT"))
1960
+ .and(path_matcher("/data-integrations/test_id/organization"))
1961
+ .respond_with(template)
1962
+ .expect(1)
1963
+ .mount(&server)
1964
+ .await;
1965
+ let client = common::test_client(&server).await;
1966
+ let err = client
1967
+ .pipes()
1968
+ .update_data_integration_organization(
1969
+ "test_id",
1970
+ workos::pipes::UpdateDataIntegrationOrganizationParams::new(
1971
+ serde_json::from_str("{}").expect("parse stub for UpdateDataIntegration"),
1972
+ ),
1973
+ )
1974
+ .await
1975
+ .expect_err("expected error");
1976
+ let api = match &err {
1977
+ Error::Api(api) => api.as_ref(),
1978
+ other => panic!("expected Error::Api, got {other:?}"),
1979
+ };
1980
+ assert_eq!(api.status, 422);
1981
+ }
1982
+
1983
+ #[tokio::test]
1984
+ async fn pipes_delete_data_integration_organization_round_trip() {
1985
+ let server = MockServer::start().await;
1986
+ Mock::given(method("DELETE"))
1987
+ .and(path_matcher("/data-integrations/test_id/organization"))
1988
+ .respond_with(ResponseTemplate::new(200).set_body_string("{}"))
1989
+ .expect(1)
1990
+ .mount(&server)
1991
+ .await;
1992
+ let client = common::test_client(&server).await;
1993
+ let _ = client
1994
+ .pipes()
1995
+ .delete_data_integration_organization("test_id")
1996
+ .await;
1997
+ }
1998
+
1999
+ #[tokio::test]
2000
+ async fn pipes_delete_data_integration_organization_unauthorized() {
2001
+ let server = MockServer::start().await;
2002
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
2003
+ Mock::given(method("DELETE"))
2004
+ .and(path_matcher("/data-integrations/test_id/organization"))
2005
+ .respond_with(template)
2006
+ .expect(1)
2007
+ .mount(&server)
2008
+ .await;
2009
+ let client = common::test_client(&server).await;
2010
+ let err = client
2011
+ .pipes()
2012
+ .delete_data_integration_organization("test_id")
2013
+ .await
2014
+ .expect_err("expected error");
2015
+ let api = match &err {
2016
+ Error::Api(api) => api.as_ref(),
2017
+ other => panic!("expected Error::Api, got {other:?}"),
2018
+ };
2019
+ assert_eq!(api.status, 401);
2020
+ }
2021
+
2022
+ #[tokio::test]
2023
+ async fn pipes_delete_data_integration_organization_not_found() {
2024
+ let server = MockServer::start().await;
2025
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
2026
+ Mock::given(method("DELETE"))
2027
+ .and(path_matcher("/data-integrations/test_id/organization"))
2028
+ .respond_with(template)
2029
+ .expect(1)
2030
+ .mount(&server)
2031
+ .await;
2032
+ let client = common::test_client(&server).await;
2033
+ let err = client
2034
+ .pipes()
2035
+ .delete_data_integration_organization("test_id")
2036
+ .await
2037
+ .expect_err("expected error");
2038
+ let api = match &err {
2039
+ Error::Api(api) => api.as_ref(),
2040
+ other => panic!("expected Error::Api, got {other:?}"),
2041
+ };
2042
+ assert_eq!(api.status, 404);
2043
+ }
2044
+
2045
+ #[tokio::test]
2046
+ async fn pipes_delete_data_integration_organization_rate_limited() {
2047
+ let server = MockServer::start().await;
2048
+ let template = ResponseTemplate::new(429)
2049
+ .insert_header("retry-after", "1")
2050
+ .set_body_string("{\"message\":\"Slow down\"}");
2051
+ Mock::given(method("DELETE"))
2052
+ .and(path_matcher("/data-integrations/test_id/organization"))
2053
+ .respond_with(template)
2054
+ .expect(1)
2055
+ .mount(&server)
2056
+ .await;
2057
+ let client = common::test_client(&server).await;
2058
+ let err = client
2059
+ .pipes()
2060
+ .delete_data_integration_organization("test_id")
2061
+ .await
2062
+ .expect_err("expected error");
2063
+ let api = match &err {
2064
+ Error::Api(api) => api.as_ref(),
2065
+ other => panic!("expected Error::Api, got {other:?}"),
2066
+ };
2067
+ assert_eq!(api.status, 429);
2068
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
2069
+ }
2070
+
2071
+ #[tokio::test]
2072
+ async fn pipes_delete_data_integration_organization_server_error() {
2073
+ let server = MockServer::start().await;
2074
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
2075
+ Mock::given(method("DELETE"))
2076
+ .and(path_matcher("/data-integrations/test_id/organization"))
2077
+ .respond_with(template)
2078
+ .expect(1)
2079
+ .mount(&server)
2080
+ .await;
2081
+ let client = common::test_client(&server).await;
2082
+ let err = client
2083
+ .pipes()
2084
+ .delete_data_integration_organization("test_id")
2085
+ .await
2086
+ .expect_err("expected error");
2087
+ let api = match &err {
2088
+ Error::Api(api) => api.as_ref(),
2089
+ other => panic!("expected Error::Api, got {other:?}"),
2090
+ };
2091
+ assert_eq!(api.status, 500);
2092
+ }
2093
+
2094
+ #[tokio::test]
2095
+ async fn pipes_delete_data_integration_organization_bad_request() {
2096
+ let server = MockServer::start().await;
2097
+ let template = ResponseTemplate::new(400)
2098
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
2099
+ Mock::given(method("DELETE"))
2100
+ .and(path_matcher("/data-integrations/test_id/organization"))
2101
+ .respond_with(template)
2102
+ .expect(1)
2103
+ .mount(&server)
2104
+ .await;
2105
+ let client = common::test_client(&server).await;
2106
+ let err = client
2107
+ .pipes()
2108
+ .delete_data_integration_organization("test_id")
2109
+ .await
2110
+ .expect_err("expected error");
2111
+ let api = match &err {
2112
+ Error::Api(api) => api.as_ref(),
2113
+ other => panic!("expected Error::Api, got {other:?}"),
2114
+ };
2115
+ assert_eq!(api.status, 400);
2116
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
2117
+ }
2118
+
2119
+ #[tokio::test]
2120
+ async fn pipes_delete_data_integration_organization_unprocessable() {
2121
+ let server = MockServer::start().await;
2122
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
2123
+ Mock::given(method("DELETE"))
2124
+ .and(path_matcher("/data-integrations/test_id/organization"))
2125
+ .respond_with(template)
2126
+ .expect(1)
2127
+ .mount(&server)
2128
+ .await;
2129
+ let client = common::test_client(&server).await;
2130
+ let err = client
2131
+ .pipes()
2132
+ .delete_data_integration_organization("test_id")
2133
+ .await
2134
+ .expect_err("expected error");
2135
+ let api = match &err {
2136
+ Error::Api(api) => api.as_ref(),
2137
+ other => panic!("expected Error::Api, got {other:?}"),
2138
+ };
2139
+ assert_eq!(api.status, 422);
2140
+ }
2141
+
2142
  #[tokio::test]
2143
  async fn pipes_get_access_token_round_trip() {
2144
  let server = MockServer::start().await;
rust/tests/user_management_test.rs
rust/tests/user_management_test.rs CHANGED
@@ -2745,6 +2745,521 @@ async fn user_management_revoke_session_unprocessable() {
2745
  assert_eq!(api.status, 422);
2746
  }
2747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2748
  #[tokio::test]
2749
  async fn user_management_list_cors_origins_round_trip() {
2750
  let server = MockServer::start().await;
 
2745
  assert_eq!(api.status, 422);
2746
  }
2747
 
2748
+ #[tokio::test]
2749
+ async fn user_management_list_authkit_oauth_resources_round_trip() {
2750
+ let server = MockServer::start().await;
2751
+ Mock::given(method("GET"))
2752
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2753
+ .respond_with(ResponseTemplate::new(200).set_body_string(
2754
+ "{\"object\":\"list\",\"data\":[],\"list_metadata\":{\"before\":null,\"after\":null}}",
2755
+ ))
2756
+ .expect(1)
2757
+ .mount(&server)
2758
+ .await;
2759
+ let client = common::test_client(&server).await;
2760
+ let _ = client
2761
+ .user_management()
2762
+ .list_authkit_oauth_resources(
2763
+ workos::user_management::ListAuthkitOAuthResourcesParams::default(),
2764
+ )
2765
+ .await;
2766
+ }
2767
+
2768
+ #[tokio::test]
2769
+ async fn user_management_list_authkit_oauth_resources_unauthorized() {
2770
+ let server = MockServer::start().await;
2771
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
2772
+ Mock::given(method("GET"))
2773
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2774
+ .respond_with(template)
2775
+ .expect(1)
2776
+ .mount(&server)
2777
+ .await;
2778
+ let client = common::test_client(&server).await;
2779
+ let err = client
2780
+ .user_management()
2781
+ .list_authkit_oauth_resources(
2782
+ workos::user_management::ListAuthkitOAuthResourcesParams::default(),
2783
+ )
2784
+ .await
2785
+ .expect_err("expected error");
2786
+ let api = match &err {
2787
+ Error::Api(api) => api.as_ref(),
2788
+ other => panic!("expected Error::Api, got {other:?}"),
2789
+ };
2790
+ assert_eq!(api.status, 401);
2791
+ }
2792
+
2793
+ #[tokio::test]
2794
+ async fn user_management_list_authkit_oauth_resources_not_found() {
2795
+ let server = MockServer::start().await;
2796
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
2797
+ Mock::given(method("GET"))
2798
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2799
+ .respond_with(template)
2800
+ .expect(1)
2801
+ .mount(&server)
2802
+ .await;
2803
+ let client = common::test_client(&server).await;
2804
+ let err = client
2805
+ .user_management()
2806
+ .list_authkit_oauth_resources(
2807
+ workos::user_management::ListAuthkitOAuthResourcesParams::default(),
2808
+ )
2809
+ .await
2810
+ .expect_err("expected error");
2811
+ let api = match &err {
2812
+ Error::Api(api) => api.as_ref(),
2813
+ other => panic!("expected Error::Api, got {other:?}"),
2814
+ };
2815
+ assert_eq!(api.status, 404);
2816
+ }
2817
+
2818
+ #[tokio::test]
2819
+ async fn user_management_list_authkit_oauth_resources_rate_limited() {
2820
+ let server = MockServer::start().await;
2821
+ let template = ResponseTemplate::new(429)
2822
+ .insert_header("retry-after", "1")
2823
+ .set_body_string("{\"message\":\"Slow down\"}");
2824
+ Mock::given(method("GET"))
2825
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2826
+ .respond_with(template)
2827
+ .expect(1)
2828
+ .mount(&server)
2829
+ .await;
2830
+ let client = common::test_client(&server).await;
2831
+ let err = client
2832
+ .user_management()
2833
+ .list_authkit_oauth_resources(
2834
+ workos::user_management::ListAuthkitOAuthResourcesParams::default(),
2835
+ )
2836
+ .await
2837
+ .expect_err("expected error");
2838
+ let api = match &err {
2839
+ Error::Api(api) => api.as_ref(),
2840
+ other => panic!("expected Error::Api, got {other:?}"),
2841
+ };
2842
+ assert_eq!(api.status, 429);
2843
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
2844
+ }
2845
+
2846
+ #[tokio::test]
2847
+ async fn user_management_list_authkit_oauth_resources_server_error() {
2848
+ let server = MockServer::start().await;
2849
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
2850
+ Mock::given(method("GET"))
2851
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2852
+ .respond_with(template)
2853
+ .expect(1)
2854
+ .mount(&server)
2855
+ .await;
2856
+ let client = common::test_client(&server).await;
2857
+ let err = client
2858
+ .user_management()
2859
+ .list_authkit_oauth_resources(
2860
+ workos::user_management::ListAuthkitOAuthResourcesParams::default(),
2861
+ )
2862
+ .await
2863
+ .expect_err("expected error");
2864
+ let api = match &err {
2865
+ Error::Api(api) => api.as_ref(),
2866
+ other => panic!("expected Error::Api, got {other:?}"),
2867
+ };
2868
+ assert_eq!(api.status, 500);
2869
+ }
2870
+
2871
+ #[tokio::test]
2872
+ async fn user_management_list_authkit_oauth_resources_empty_page() {
2873
+ let server = MockServer::start().await;
2874
+ Mock::given(method("GET"))
2875
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2876
+ .respond_with(ResponseTemplate::new(200).set_body_string(
2877
+ "{\"object\":\"list\",\"data\":[],\"list_metadata\":{\"before\":null,\"after\":null}}",
2878
+ ))
2879
+ .expect(1)
2880
+ .mount(&server)
2881
+ .await;
2882
+ let client = common::test_client(&server).await;
2883
+ let resp = client
2884
+ .user_management()
2885
+ .list_authkit_oauth_resources(
2886
+ workos::user_management::ListAuthkitOAuthResourcesParams::default(),
2887
+ )
2888
+ .await
2889
+ .expect("expected success");
2890
+ assert!(resp.data.is_empty(), "expected empty data array");
2891
+ }
2892
+
2893
+ #[tokio::test]
2894
+ async fn user_management_create_authkit_oauth_resource_round_trip() {
2895
+ let server = MockServer::start().await;
2896
+ Mock::given(method("POST"))
2897
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2898
+ .respond_with(
2899
+ ResponseTemplate::new(200)
2900
+ .set_body_string(include_str!("fixtures/authkit_oauth_resource.json")),
2901
+ )
2902
+ .expect(1)
2903
+ .mount(&server)
2904
+ .await;
2905
+ let client = common::test_client(&server).await;
2906
+ let _ = client
2907
+ .user_management()
2908
+ .create_authkit_oauth_resource(
2909
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
2910
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
2911
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
2912
+ ),
2913
+ )
2914
+ .await;
2915
+ }
2916
+
2917
+ #[tokio::test]
2918
+ async fn user_management_create_authkit_oauth_resource_unauthorized() {
2919
+ let server = MockServer::start().await;
2920
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
2921
+ Mock::given(method("POST"))
2922
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2923
+ .respond_with(template)
2924
+ .expect(1)
2925
+ .mount(&server)
2926
+ .await;
2927
+ let client = common::test_client(&server).await;
2928
+ let err = client
2929
+ .user_management()
2930
+ .create_authkit_oauth_resource(
2931
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
2932
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
2933
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
2934
+ ),
2935
+ )
2936
+ .await
2937
+ .expect_err("expected error");
2938
+ let api = match &err {
2939
+ Error::Api(api) => api.as_ref(),
2940
+ other => panic!("expected Error::Api, got {other:?}"),
2941
+ };
2942
+ assert_eq!(api.status, 401);
2943
+ }
2944
+
2945
+ #[tokio::test]
2946
+ async fn user_management_create_authkit_oauth_resource_not_found() {
2947
+ let server = MockServer::start().await;
2948
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
2949
+ Mock::given(method("POST"))
2950
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2951
+ .respond_with(template)
2952
+ .expect(1)
2953
+ .mount(&server)
2954
+ .await;
2955
+ let client = common::test_client(&server).await;
2956
+ let err = client
2957
+ .user_management()
2958
+ .create_authkit_oauth_resource(
2959
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
2960
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
2961
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
2962
+ ),
2963
+ )
2964
+ .await
2965
+ .expect_err("expected error");
2966
+ let api = match &err {
2967
+ Error::Api(api) => api.as_ref(),
2968
+ other => panic!("expected Error::Api, got {other:?}"),
2969
+ };
2970
+ assert_eq!(api.status, 404);
2971
+ }
2972
+
2973
+ #[tokio::test]
2974
+ async fn user_management_create_authkit_oauth_resource_rate_limited() {
2975
+ let server = MockServer::start().await;
2976
+ let template = ResponseTemplate::new(429)
2977
+ .insert_header("retry-after", "1")
2978
+ .set_body_string("{\"message\":\"Slow down\"}");
2979
+ Mock::given(method("POST"))
2980
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
2981
+ .respond_with(template)
2982
+ .expect(1)
2983
+ .mount(&server)
2984
+ .await;
2985
+ let client = common::test_client(&server).await;
2986
+ let err = client
2987
+ .user_management()
2988
+ .create_authkit_oauth_resource(
2989
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
2990
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
2991
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
2992
+ ),
2993
+ )
2994
+ .await
2995
+ .expect_err("expected error");
2996
+ let api = match &err {
2997
+ Error::Api(api) => api.as_ref(),
2998
+ other => panic!("expected Error::Api, got {other:?}"),
2999
+ };
3000
+ assert_eq!(api.status, 429);
3001
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
3002
+ }
3003
+
3004
+ #[tokio::test]
3005
+ async fn user_management_create_authkit_oauth_resource_server_error() {
3006
+ let server = MockServer::start().await;
3007
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
3008
+ Mock::given(method("POST"))
3009
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
3010
+ .respond_with(template)
3011
+ .expect(1)
3012
+ .mount(&server)
3013
+ .await;
3014
+ let client = common::test_client(&server).await;
3015
+ let err = client
3016
+ .user_management()
3017
+ .create_authkit_oauth_resource(
3018
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
3019
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
3020
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
3021
+ ),
3022
+ )
3023
+ .await
3024
+ .expect_err("expected error");
3025
+ let api = match &err {
3026
+ Error::Api(api) => api.as_ref(),
3027
+ other => panic!("expected Error::Api, got {other:?}"),
3028
+ };
3029
+ assert_eq!(api.status, 500);
3030
+ }
3031
+
3032
+ #[tokio::test]
3033
+ async fn user_management_create_authkit_oauth_resource_bad_request() {
3034
+ let server = MockServer::start().await;
3035
+ let template = ResponseTemplate::new(400)
3036
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
3037
+ Mock::given(method("POST"))
3038
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
3039
+ .respond_with(template)
3040
+ .expect(1)
3041
+ .mount(&server)
3042
+ .await;
3043
+ let client = common::test_client(&server).await;
3044
+ let err = client
3045
+ .user_management()
3046
+ .create_authkit_oauth_resource(
3047
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
3048
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
3049
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
3050
+ ),
3051
+ )
3052
+ .await
3053
+ .expect_err("expected error");
3054
+ let api = match &err {
3055
+ Error::Api(api) => api.as_ref(),
3056
+ other => panic!("expected Error::Api, got {other:?}"),
3057
+ };
3058
+ assert_eq!(api.status, 400);
3059
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
3060
+ }
3061
+
3062
+ #[tokio::test]
3063
+ async fn user_management_create_authkit_oauth_resource_unprocessable() {
3064
+ let server = MockServer::start().await;
3065
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
3066
+ Mock::given(method("POST"))
3067
+ .and(path_matcher("/user_management/authkit_oauth_resources"))
3068
+ .respond_with(template)
3069
+ .expect(1)
3070
+ .mount(&server)
3071
+ .await;
3072
+ let client = common::test_client(&server).await;
3073
+ let err = client
3074
+ .user_management()
3075
+ .create_authkit_oauth_resource(
3076
+ workos::user_management::CreateAuthkitOAuthResourceParams::new(
3077
+ serde_json::from_str(include_str!("fixtures/create_authkit_oauth_resource.json"))
3078
+ .expect("parse fixture for CreateAuthkitOAuthResource"),
3079
+ ),
3080
+ )
3081
+ .await
3082
+ .expect_err("expected error");
3083
+ let api = match &err {
3084
+ Error::Api(api) => api.as_ref(),
3085
+ other => panic!("expected Error::Api, got {other:?}"),
3086
+ };
3087
+ assert_eq!(api.status, 422);
3088
+ }
3089
+
3090
+ #[tokio::test]
3091
+ async fn user_management_delete_authkit_oauth_resource_round_trip() {
3092
+ let server = MockServer::start().await;
3093
+ Mock::given(method("DELETE"))
3094
+ .and(path_matcher(
3095
+ "/user_management/authkit_oauth_resources/test_id",
3096
+ ))
3097
+ .respond_with(ResponseTemplate::new(200).set_body_string("{}"))
3098
+ .expect(1)
3099
+ .mount(&server)
3100
+ .await;
3101
+ let client = common::test_client(&server).await;
3102
+ let _ = client
3103
+ .user_management()
3104
+ .delete_authkit_oauth_resource("test_id")
3105
+ .await;
3106
+ }
3107
+
3108
+ #[tokio::test]
3109
+ async fn user_management_delete_authkit_oauth_resource_unauthorized() {
3110
+ let server = MockServer::start().await;
3111
+ let template = ResponseTemplate::new(401).set_body_string("{\"message\":\"Unauthorized\"}");
3112
+ Mock::given(method("DELETE"))
3113
+ .and(path_matcher(
3114
+ "/user_management/authkit_oauth_resources/test_id",
3115
+ ))
3116
+ .respond_with(template)
3117
+ .expect(1)
3118
+ .mount(&server)
3119
+ .await;
3120
+ let client = common::test_client(&server).await;
3121
+ let err = client
3122
+ .user_management()
3123
+ .delete_authkit_oauth_resource("test_id")
3124
+ .await
3125
+ .expect_err("expected error");
3126
+ let api = match &err {
3127
+ Error::Api(api) => api.as_ref(),
3128
+ other => panic!("expected Error::Api, got {other:?}"),
3129
+ };
3130
+ assert_eq!(api.status, 401);
3131
+ }
3132
+
3133
+ #[tokio::test]
3134
+ async fn user_management_delete_authkit_oauth_resource_not_found() {
3135
+ let server = MockServer::start().await;
3136
+ let template = ResponseTemplate::new(404).set_body_string("{\"message\":\"Not found\"}");
3137
+ Mock::given(method("DELETE"))
3138
+ .and(path_matcher(
3139
+ "/user_management/authkit_oauth_resources/test_id",
3140
+ ))
3141
+ .respond_with(template)
3142
+ .expect(1)
3143
+ .mount(&server)
3144
+ .await;
3145
+ let client = common::test_client(&server).await;
3146
+ let err = client
3147
+ .user_management()
3148
+ .delete_authkit_oauth_resource("test_id")
3149
+ .await
3150
+ .expect_err("expected error");
3151
+ let api = match &err {
3152
+ Error::Api(api) => api.as_ref(),
3153
+ other => panic!("expected Error::Api, got {other:?}"),
3154
+ };
3155
+ assert_eq!(api.status, 404);
3156
+ }
3157
+
3158
+ #[tokio::test]
3159
+ async fn user_management_delete_authkit_oauth_resource_rate_limited() {
3160
+ let server = MockServer::start().await;
3161
+ let template = ResponseTemplate::new(429)
3162
+ .insert_header("retry-after", "1")
3163
+ .set_body_string("{\"message\":\"Slow down\"}");
3164
+ Mock::given(method("DELETE"))
3165
+ .and(path_matcher(
3166
+ "/user_management/authkit_oauth_resources/test_id",
3167
+ ))
3168
+ .respond_with(template)
3169
+ .expect(1)
3170
+ .mount(&server)
3171
+ .await;
3172
+ let client = common::test_client(&server).await;
3173
+ let err = client
3174
+ .user_management()
3175
+ .delete_authkit_oauth_resource("test_id")
3176
+ .await
3177
+ .expect_err("expected error");
3178
+ let api = match &err {
3179
+ Error::Api(api) => api.as_ref(),
3180
+ other => panic!("expected Error::Api, got {other:?}"),
3181
+ };
3182
+ assert_eq!(api.status, 429);
3183
+ assert_eq!(api.retry_after, Some(std::time::Duration::from_secs(1)));
3184
+ }
3185
+
3186
+ #[tokio::test]
3187
+ async fn user_management_delete_authkit_oauth_resource_server_error() {
3188
+ let server = MockServer::start().await;
3189
+ let template = ResponseTemplate::new(500).set_body_string("{\"message\":\"Internal error\"}");
3190
+ Mock::given(method("DELETE"))
3191
+ .and(path_matcher(
3192
+ "/user_management/authkit_oauth_resources/test_id",
3193
+ ))
3194
+ .respond_with(template)
3195
+ .expect(1)
3196
+ .mount(&server)
3197
+ .await;
3198
+ let client = common::test_client(&server).await;
3199
+ let err = client
3200
+ .user_management()
3201
+ .delete_authkit_oauth_resource("test_id")
3202
+ .await
3203
+ .expect_err("expected error");
3204
+ let api = match &err {
3205
+ Error::Api(api) => api.as_ref(),
3206
+ other => panic!("expected Error::Api, got {other:?}"),
3207
+ };
3208
+ assert_eq!(api.status, 500);
3209
+ }
3210
+
3211
+ #[tokio::test]
3212
+ async fn user_management_delete_authkit_oauth_resource_bad_request() {
3213
+ let server = MockServer::start().await;
3214
+ let template = ResponseTemplate::new(400)
3215
+ .set_body_string("{\"code\":\"validation_error\",\"message\":\"Bad request\"}");
3216
+ Mock::given(method("DELETE"))
3217
+ .and(path_matcher(
3218
+ "/user_management/authkit_oauth_resources/test_id",
3219
+ ))
3220
+ .respond_with(template)
3221
+ .expect(1)
3222
+ .mount(&server)
3223
+ .await;
3224
+ let client = common::test_client(&server).await;
3225
+ let err = client
3226
+ .user_management()
3227
+ .delete_authkit_oauth_resource("test_id")
3228
+ .await
3229
+ .expect_err("expected error");
3230
+ let api = match &err {
3231
+ Error::Api(api) => api.as_ref(),
3232
+ other => panic!("expected Error::Api, got {other:?}"),
3233
+ };
3234
+ assert_eq!(api.status, 400);
3235
+ assert_eq!(api.code.as_deref(), Some("validation_error"));
3236
+ }
3237
+
3238
+ #[tokio::test]
3239
+ async fn user_management_delete_authkit_oauth_resource_unprocessable() {
3240
+ let server = MockServer::start().await;
3241
+ let template = ResponseTemplate::new(422).set_body_string("{\"message\":\"Unprocessable\"}");
3242
+ Mock::given(method("DELETE"))
3243
+ .and(path_matcher(
3244
+ "/user_management/authkit_oauth_resources/test_id",
3245
+ ))
3246
+ .respond_with(template)
3247
+ .expect(1)
3248
+ .mount(&server)
3249
+ .await;
3250
+ let client = common::test_client(&server).await;
3251
+ let err = client
3252
+ .user_management()
3253
+ .delete_authkit_oauth_resource("test_id")
3254
+ .await
3255
+ .expect_err("expected error");
3256
+ let api = match &err {
3257
+ Error::Api(api) => api.as_ref(),
3258
+ other => panic!("expected Error::Api, got {other:?}"),
3259
+ };
3260
+ assert_eq!(api.status, 422);
3261
+ }
3262
+
3263
  #[tokio::test]
3264
  async fn user_management_list_cors_origins_round_trip() {
3265
  let server = MockServer::start().await;

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