From 2b5e6e988d0fc86903e51ce380bc15d92844b615 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 03:24:35 +0000 Subject: [PATCH] SDK regeneration Unable to analyze changes with AI, incrementing PATCH version. --- changelog.md | 4 + package.json | 4 +- reference.md | 830 +-------- src/management/BaseClient.ts | 17 +- src/management/Client.ts | 6 - src/management/api/requests/requests.ts | 147 +- .../api/resources/actions/client/Client.ts | 35 +- .../resources/bindings/client/Client.ts | 11 +- .../resources/versions/client/Client.ts | 11 +- .../resources/providers/client/Client.ts | 8 +- .../resources/templates/client/Client.ts | 8 +- .../resources/clientGrants/client/Client.ts | 27 +- .../resources/organizations/client/Client.ts | 11 +- .../api/resources/clients/client/Client.ts | 52 +- .../resources/connections/client/Client.ts | 31 +- .../connectionProfiles/client/Client.ts | 11 +- .../resources/connections/client/Client.ts | 48 +- .../resources/clients/client/Client.ts | 11 +- .../resources/users/client/Client.ts | 5 +- .../resources/customDomains/client/Client.ts | 29 +- .../deviceCredentials/client/Client.ts | 35 +- .../resources/provider/client/Client.ts | 13 +- .../resources/eventStreams/client/Client.ts | 142 +- .../resources/deliveries/client/Client.ts | 33 +- .../api/resources/flows/client/Client.ts | 43 +- .../resources/executions/client/Client.ts | 23 +- .../resources/connections/client/Client.ts | 15 +- .../api/resources/forms/client/Client.ts | 39 +- .../api/resources/groups/client/Client.ts | 238 --- .../api/resources/groups/client/index.ts | 1 - src/management/api/resources/groups/index.ts | 2 - .../api/resources/groups/resources/index.ts | 1 - .../groups/resources/members/client/Client.ts | 138 -- .../groups/resources/members/client/index.ts | 1 - .../groups/resources/members/index.ts | 1 - .../pushNotification/client/Client.ts | 273 +-- .../api/resources/hooks/client/Client.ts | 35 +- src/management/api/resources/index.ts | 1 - .../resources/usersImports/client/Client.ts | 14 +- .../resources/encryption/client/Client.ts | 15 +- .../api/resources/logs/client/Client.ts | 31 +- .../resources/networkAcls/client/Client.ts | 15 +- .../resources/organizations/client/Client.ts | 15 +- .../resources/clientGrants/client/Client.ts | 31 +- .../discoveryDomains/client/Client.ts | 103 +- .../enabledConnections/client/Client.ts | 15 +- .../resources/invitations/client/Client.ts | 40 +- .../resources/members/client/Client.ts | 19 +- .../members/resources/roles/client/Client.ts | 15 +- .../resources/rendering/client/Client.ts | 42 +- .../resources/refreshTokens/client/Client.ts | 85 - .../resourceServers/client/Client.ts | 35 +- .../api/resources/roles/client/Client.ts | 19 +- .../resources/permissions/client/Client.ts | 15 +- .../roles/resources/users/client/Client.ts | 11 +- .../api/resources/rules/client/Client.ts | 40 +- .../selfServiceProfiles/client/Client.ts | 15 +- .../api/resources/stats/client/Client.ts | 13 +- .../resources/settings/client/Client.ts | 13 +- .../tokenExchangeProfiles/client/Client.ts | 11 +- .../userAttributeProfiles/client/Client.ts | 11 +- .../api/resources/userBlocks/client/Client.ts | 23 +- .../api/resources/userGrants/client/Client.ts | 32 +- .../api/resources/users/client/Client.ts | 77 +- .../authenticationMethods/client/Client.ts | 15 +- .../connectedAccounts/client/Client.ts | 11 +- .../users/resources/groups/client/Client.ts | 138 -- .../users/resources/groups/client/index.ts | 1 - .../resources/users/resources/groups/index.ts | 1 - .../api/resources/users/resources/index.ts | 1 - .../users/resources/logs/client/Client.ts | 19 +- .../resources/organizations/client/Client.ts | 15 +- .../resources/permissions/client/Client.ts | 15 +- .../resources/refreshToken/client/Client.ts | 11 +- .../users/resources/roles/client/Client.ts | 15 +- .../users/resources/sessions/client/Client.ts | 11 +- .../resources/templates/client/Client.ts | 11 +- src/management/api/types/types.ts | 1608 ++--------------- src/management/auth/BearerAuthProvider.ts | 38 +- .../core/fetcher/EndpointSupplier.ts | 4 +- src/management/core/fetcher/Fetcher.ts | 2 +- src/management/core/headers.ts | 14 +- src/management/core/pagination/CustomPager.ts | 174 +- src/management/core/pagination/exports.ts | 1 - src/management/core/pagination/index.ts | 2 +- .../tests/mock-server/mockEndpointBuilder.ts | 8 +- .../tests/mock-server/withFormUrlEncoded.ts | 23 +- src/management/tests/mock-server/withJson.ts | 19 +- .../tests/unit/fetcher/Fetcher.test.ts | 8 +- src/management/tests/wire/actions.test.ts | 72 - .../tests/wire/actions/versions.test.ts | 34 - .../tests/wire/clientGrants.test.ts | 24 +- .../wire/clientGrants/organizations.test.ts | 8 +- src/management/tests/wire/clients.test.ts | 28 - .../tests/wire/clients/connections.test.ts | 10 +- .../tests/wire/connectionProfiles.test.ts | 8 +- src/management/tests/wire/connections.test.ts | 32 +- .../tests/wire/connections/clients.test.ts | 10 +- .../tests/wire/customDomains.test.ts | 8 +- .../tests/wire/eventStreams.test.ts | 123 +- .../tests/wire/flows/executions.test.ts | 8 +- src/management/tests/wire/groups.test.ts | 236 --- .../tests/wire/groups/members.test.ts | 128 -- .../guardian/factors/pushNotification.test.ts | 274 +-- .../tests/wire/organizations.test.ts | 32 +- .../organizations/discoveryDomains.test.ts | 139 +- .../tests/wire/organizations/members.test.ts | 8 +- .../tests/wire/prompts/rendering.test.ts | 18 +- .../tests/wire/refreshTokens.test.ts | 164 -- src/management/tests/wire/roles/users.test.ts | 40 +- .../tests/wire/tenants/settings.test.ts | 4 - .../tests/wire/tokenExchangeProfiles.test.ts | 8 +- .../tests/wire/userAttributeProfiles.test.ts | 8 +- .../wire/users/connectedAccounts.test.ts | 8 +- .../tests/wire/users/groups.test.ts | 144 -- .../tests/wire/users/refreshToken.test.ts | 12 +- .../tests/wire/users/sessions.test.ts | 8 +- .../verification/templates.test.ts | 8 +- src/management/version.ts | 2 +- yarn.lock | 456 ++--- 120 files changed, 1223 insertions(+), 6099 deletions(-) create mode 100644 changelog.md delete mode 100644 src/management/api/resources/groups/client/Client.ts delete mode 100644 src/management/api/resources/groups/client/index.ts delete mode 100644 src/management/api/resources/groups/index.ts delete mode 100644 src/management/api/resources/groups/resources/index.ts delete mode 100644 src/management/api/resources/groups/resources/members/client/Client.ts delete mode 100644 src/management/api/resources/groups/resources/members/client/index.ts delete mode 100644 src/management/api/resources/groups/resources/members/index.ts delete mode 100644 src/management/api/resources/users/resources/groups/client/Client.ts delete mode 100644 src/management/api/resources/users/resources/groups/client/index.ts delete mode 100644 src/management/api/resources/users/resources/groups/index.ts delete mode 100644 src/management/tests/wire/groups.test.ts delete mode 100644 src/management/tests/wire/groups/members.test.ts delete mode 100644 src/management/tests/wire/users/groups.test.ts diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000000..eef38aa77f --- /dev/null +++ b/changelog.md @@ -0,0 +1,4 @@ +## 5.2.1 - 2026-01-22 +* SDK regeneration +* Unable to analyze changes with AI, incrementing PATCH version. + diff --git a/package.json b/package.json index e909a17c73..75a65ad6a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auth0", - "version": "5.2.0", + "version": "5.2.1", "private": false, "repository": { "type": "git", @@ -87,7 +87,7 @@ "msw": "2.11.2", "@types/node": "^18.19.70", "typescript": "~5.7.2", - "prettier": "3.4.2", + "prettier": "3.7.4", "typedoc": "^0.28.7", "typedoc-plugin-missing-exports": "^4.0.0", "nock": "^14.0.6", diff --git a/reference.md b/reference.md index 0b72536e9e..b6b2fe4e13 100644 --- a/reference.md +++ b/reference.md @@ -2,7 +2,7 @@ ## Actions -
client.actions.list({ ...params }) -> core.Page +
client.actions.list({ ...params }) -> core.Page<Management.Action, Management.ListActionsPaginatedResponseContent>
@@ -628,7 +628,7 @@ await client.branding.update(); ## ClientGrants -
client.clientGrants.list({ ...params }) -> core.Page +
client.clientGrants.list({ ...params }) -> core.Page<Management.ClientGrantResponseContent, Management.ListClientGrantPaginatedResponseContent>
@@ -919,7 +919,7 @@ await client.clientGrants.update("id"); ## Clients -
client.clients.list({ ...params }) -> core.Page +
client.clients.list({ ...params }) -> core.Page<Management.Client, Management.ListClientsOffsetPaginatedResponseContent>
@@ -1438,7 +1438,7 @@ await client.clients.rotateSecret("id"); ## ConnectionProfiles -
client.connectionProfiles.list({ ...params }) -> core.Page +
client.connectionProfiles.list({ ...params }) -> core.Page<Management.ConnectionProfile, Management.ListConnectionProfilesPaginatedResponseContent>
@@ -1901,7 +1901,7 @@ await client.connectionProfiles.update("id"); ## Connections -
client.connections.list({ ...params }) -> core.Page +
client.connections.list({ ...params }) -> core.Page<Management.ConnectionForList, Management.ListConnectionsCheckpointPaginatedResponseContent>
@@ -2378,6 +2378,8 @@ Retrieve details on custom domai ```typescript await client.customDomains.list({ + take: 1, + from: "from", q: "q", fields: "fields", include_fields: true, @@ -2846,7 +2848,7 @@ await client.customDomains.verify("id"); ## DeviceCredentials -
client.deviceCredentials.list({ ...params }) -> core.Page +
client.deviceCredentials.list({ ...params }) -> core.Page<Management.DeviceCredential, Management.ListDeviceCredentialsOffsetPaginatedResponseContent>
@@ -3347,7 +3349,7 @@ await client.emailTemplates.update("verify_email"); ## EventStreams -
client.eventStreams.list({ ...params }) -> core.Page +
client.eventStreams.list({ ...params }) -> Management.EventStreamResponseContent[]
@@ -3360,25 +3362,10 @@ await client.emailTemplates.update("verify_email");
```typescript -const pageableResponse = await client.eventStreams.list({ - from: "from", - take: 1, -}); -for await (const item of pageableResponse) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.eventStreams.list({ +await client.eventStreams.list({ from: "from", take: 1, }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; ```
@@ -3684,7 +3671,7 @@ await client.eventStreams.test("id", { ## Flows -
client.flows.list({ ...params }) -> core.Page +
client.flows.list({ ...params }) -> core.Page<Management.FlowSummary, Management.ListFlowsOffsetPaginatedResponseContent>
@@ -3966,7 +3953,7 @@ await client.flows.update("id"); ## Forms -
client.forms.list({ ...params }) -> core.Page +
client.forms.list({ ...params }) -> core.Page<Management.FormSummary, Management.ListFormsOffsetPaginatedResponseContent>
@@ -4246,7 +4233,7 @@ await client.forms.update("id"); ## UserGrants -
client.userGrants.list({ ...params }) -> core.Page +
client.userGrants.list({ ...params }) -> core.Page<Management.UserGrant, Management.ListUserGrantsOffsetPaginatedResponseContent>
@@ -4463,165 +4450,9 @@ await client.userGrants.delete("id");
-## Groups - -
client.groups.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -List all groups in your tenant. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const pageableResponse = await client.groups.list({ - connection_id: "connection_id", - name: "name", - external_id: "external_id", - fields: "fields", - include_fields: true, - from: "from", - take: 1, -}); -for await (const item of pageableResponse) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.groups.list({ - connection_id: "connection_id", - name: "name", - external_id: "external_id", - fields: "fields", - include_fields: true, - from: "from", - take: 1, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Management.ListGroupsRequestParameters` - -
-
- -
-
- -**requestOptions:** `GroupsClient.RequestOptions` - -
-
-
-
- -
-
-
- -
client.groups.get(id) -> Management.GetGroupResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve a group by its ID. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.groups.get("id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `string` — Unique identifier for the group (service-generated). - -
-
- -
-
- -**requestOptions:** `GroupsClient.RequestOptions` - -
-
-
-
- -
-
-
- ## Hooks -
client.hooks.list({ ...params }) -> core.Page +
client.hooks.list({ ...params }) -> core.Page<Management.Hook, Management.ListHooksOffsetPaginatedResponseContent>
@@ -5695,7 +5526,7 @@ await client.logStreams.update("id"); ## Logs -
client.logs.list({ ...params }) -> core.Page +
client.logs.list({ ...params }) -> core.Page<Management.Log, Management.ListLogOffsetPaginatedResponseContent>
@@ -5879,7 +5710,7 @@ await client.logs.get("id"); ## NetworkAcls -
client.networkAcls.list({ ...params }) -> core.Page +
client.networkAcls.list({ ...params }) -> core.Page<Management.NetworkAclsResponseContent, Management.ListNetworkAclsOffsetPaginatedResponseContent>
@@ -6311,7 +6142,7 @@ await client.networkAcls.update("id"); ## Organizations -
client.organizations.list({ ...params }) -> core.Page +
client.organizations.list({ ...params }) -> core.Page<Management.Organization, Management.ListOrganizationsPaginatedResponseContent>
@@ -6989,80 +6820,9 @@ await client.refreshTokens.delete("id");
-
client.refreshTokens.update(id, { ...params }) -> Management.UpdateRefreshTokenResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Update a refresh token by its ID. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.refreshTokens.update("id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `string` — ID of the refresh token to update. - -
-
- -
-
- -**request:** `Management.UpdateRefreshTokenRequestContent` - -
-
- -
-
- -**requestOptions:** `RefreshTokensClient.RequestOptions` - -
-
-
-
- -
-
-
- ## ResourceServers -
client.resourceServers.list({ ...params }) -> core.Page +
client.resourceServers.list({ ...params }) -> core.Page<Management.ResourceServer, Management.ListResourceServerOffsetPaginatedResponseContent>
@@ -7421,7 +7181,7 @@ await client.resourceServers.update("id"); ## Roles -
client.roles.list({ ...params }) -> core.Page +
client.roles.list({ ...params }) -> core.Page<Management.Role, Management.ListRolesOffsetPaginatedResponseContent>
@@ -7774,7 +7534,7 @@ await client.roles.update("id"); ## Rules -
client.rules.list({ ...params }) -> core.Page +
client.rules.list({ ...params }) -> core.Page<Management.Rule, Management.ListRulesOffsetPaginatedResponseContent>
@@ -8336,7 +8096,7 @@ await client.rulesConfigs.delete("key"); ## SelfServiceProfiles -
client.selfServiceProfiles.list({ ...params }) -> core.Page +
client.selfServiceProfiles.list({ ...params }) -> core.Page<Management.SelfServiceProfile, Management.ListSelfServiceProfilesPaginatedResponseContent>
@@ -9322,7 +9082,7 @@ await client.tickets.changePassword(); ## TokenExchangeProfiles -
client.tokenExchangeProfiles.list({ ...params }) -> core.Page +
client.tokenExchangeProfiles.list({ ...params }) -> core.Page<Management.TokenExchangeProfileResponseContent, Management.ListTokenExchangeProfileResponseContent>
@@ -9688,7 +9448,7 @@ await client.tokenExchangeProfiles.update("id"); ## UserAttributeProfiles -
client.userAttributeProfiles.list({ ...params }) -> core.Page +
client.userAttributeProfiles.list({ ...params }) -> core.Page<Management.UserAttributeProfile, Management.ListUserAttributeProfilesPaginatedResponseContent>
@@ -10432,7 +10192,7 @@ await client.userBlocks.delete("id"); ## Users -
client.users.list({ ...params }) -> core.Page +
client.users.list({ ...params }) -> core.Page<Management.UserResponseSchema, Management.ListUsersOffsetPaginatedResponseContent>
@@ -11095,7 +10855,7 @@ await client.users.revokeAccess("id"); ## Actions Versions -
client.actions.versions.list(actionId, { ...params }) -> core.Page +
client.actions.versions.list(actionId, { ...params }) -> core.Page<Management.ActionVersion, Management.ListActionVersionsPaginatedResponseContent>
@@ -11458,7 +11218,7 @@ await client.actions.triggers.list(); ## Actions Triggers Bindings -
client.actions.triggers.bindings.list(triggerId, { ...params }) -> core.Page +
client.actions.triggers.bindings.list(triggerId, { ...params }) -> core.Page<Management.ActionBinding, Management.ListActionBindingsPaginatedResponseContent>
@@ -13734,7 +13494,7 @@ await client.branding.phone.templates.test("id", { ## ClientGrants Organizations -
client.clientGrants.organizations.list(id, { ...params }) -> core.Page +
client.clientGrants.organizations.list(id, { ...params }) -> core.Page<Management.Organization, Management.ListClientGrantOrganizationsPaginatedResponseContent>
@@ -14206,7 +13966,7 @@ await client.clients.credentials.update("client_id", "credential_id"); ## Clients Connections -
client.clients.connections.get(id, { ...params }) -> core.Page +
client.clients.connections.get(id, { ...params }) -> core.Page<Management.ConnectionForList, Management.ListClientConnectionsResponseContent>
@@ -14309,7 +14069,7 @@ const response = page.response; ## Connections Clients -
client.connections.clients.get(id, { ...params }) -> core.Page +
client.connections.clients.get(id, { ...params }) -> core.Page<Management.ConnectionEnabledClient, Management.GetConnectionEnabledClientsResponseContent>
@@ -16184,7 +15944,7 @@ await client.eventStreams.redeliveries.createById("id", "event_id"); ## Flows Executions -
client.flows.executions.list(flow_id, { ...params }) -> core.Page +
client.flows.executions.list(flow_id, { ...params }) -> core.Page<Management.FlowExecutionSummary, Management.ListFlowExecutionsPaginatedResponseContent>
@@ -16380,7 +16140,7 @@ await client.flows.executions.delete("flow_id", "execution_id"); ## Flows Vault Connections -
client.flows.vault.connections.list({ ...params }) -> core.Page +
client.flows.vault.connections.list({ ...params }) -> core.Page<Management.FlowsVaultConnectionSummary, Management.ListFlowsVaultConnectionsOffsetPaginatedResponseContent>
@@ -16656,9 +16416,9 @@ await client.flows.vault.connections.update("id");
-## Groups Members +## Guardian Enrollments -
client.groups.members.get(id, { ...params }) -> core.Page +
client.guardian.enrollments.createTicket({ ...params }) -> Management.CreateGuardianEnrollmentTicketResponseContent
@@ -16670,7 +16430,10 @@ await client.flows.vault.connections.update("id");
-List all users that are a member of this group. +Create a multi-factor authentication (MFA) enrollment ticket, and optionally send an email with the created ticket, to a given user. +Create a multi-factor authentication (MFA) enrollment ticket, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.
+ +Note: Users cannot enroll in Email as a factor through custom enrollment tickets.
@@ -16686,29 +16449,9 @@ List all users that are a member of this group.
```typescript -const pageableResponse = await client.groups.members.get("id", { - fields: "fields", - include_fields: true, - from: "from", - take: 1, -}); -for await (const item of pageableResponse) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.groups.members.get("id", { - fields: "fields", - include_fields: true, - from: "from", - take: 1, +await client.guardian.enrollments.createTicket({ + user_id: "user_id", }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; ```
@@ -16724,7 +16467,7 @@ const response = page.response;
-**id:** `string` — Unique identifier for the group (service-generated). +**request:** `Management.CreateGuardianEnrollmentTicketRequestContent`
@@ -16732,88 +16475,10 @@ const response = page.response;
-**request:** `Management.GetGroupMembersRequestParameters` +**requestOptions:** `EnrollmentsClient.RequestOptions` -
-
- -
-
- -**requestOptions:** `MembersClient.RequestOptions` - -
-
-
-
- -
-
-
- -## Guardian Enrollments - -
client.guardian.enrollments.createTicket({ ...params }) -> Management.CreateGuardianEnrollmentTicketResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Create a multi-factor authentication (MFA) enrollment ticket, and optionally send an email with the created ticket, to a given user. -Create a multi-factor authentication (MFA) enrollment ticket, and optionally send an email with the created ticket to a given user. Enrollment tickets can specify which factor users must enroll with or allow existing MFA users to enroll in additional factors.
- -Note: Users cannot enroll in Email as a factor through custom enrollment tickets. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.guardian.enrollments.createTicket({ - user_id: "user_id", -}); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Management.CreateGuardianEnrollmentTicketRequestContent` - -
-
- -
-
- -**requestOptions:** `EnrollmentsClient.RequestOptions` - -
-
+
+
@@ -17750,69 +17415,6 @@ await client.guardian.factors.pushNotification.getApnsProvider();
-Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.guardian.factors.pushNotification.setApnsProvider(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent` - -
-
- -
-
- -**requestOptions:** `PushNotificationClient.RequestOptions` - -
-
-
-
- -
-
-
- -
client.guardian.factors.pushNotification.updateApnsProvider({ ...params }) -> Management.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- Modify configuration details of the multi-factor authentication APNS provider associated with your tenant.
@@ -17829,7 +17431,7 @@ Modify configuration details of the multi-factor authentication APNS provider as
```typescript -await client.guardian.factors.pushNotification.updateApnsProvider(); +await client.guardian.factors.pushNotification.setApnsProvider({}); ```
@@ -17845,7 +17447,7 @@ await client.guardian.factors.pushNotification.updateApnsProvider();
-**request:** `Management.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent` +**request:** `Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent`
@@ -17876,69 +17478,6 @@ await client.guardian.factors.pushNotification.updateApnsProvider();
-Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.guardian.factors.pushNotification.setFcmProvider(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent` - -
-
- -
-
- -**requestOptions:** `PushNotificationClient.RequestOptions` - -
-
-
-
- -
-
-
- -
client.guardian.factors.pushNotification.updateFcmProvider({ ...params }) -> Management.UpdateGuardianFactorsProviderPushNotificationFcmResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- Modify configuration details of the multi-factor authentication FCM provider associated with your tenant.
@@ -17955,7 +17494,7 @@ Modify configuration details of the multi-factor authentication FCM provider ass
```typescript -await client.guardian.factors.pushNotification.updateFcmProvider(); +await client.guardian.factors.pushNotification.setFcmProvider({}); ```
@@ -17971,7 +17510,7 @@ await client.guardian.factors.pushNotification.updateFcmProvider();
-**request:** `Management.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent` +**request:** `Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent`
@@ -18002,69 +17541,6 @@ await client.guardian.factors.pushNotification.updateFcmProvider();
-Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.guardian.factors.pushNotification.setFcmv1Provider(); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**request:** `Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent` - -
-
- -
-
- -**requestOptions:** `PushNotificationClient.RequestOptions` - -
-
-
-
- -
-
-
- -
client.guardian.factors.pushNotification.updateFcmv1Provider({ ...params }) -> Management.UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant.
@@ -18081,7 +17557,7 @@ Modify configuration details of the multi-factor authentication FCMV1 provider a
```typescript -await client.guardian.factors.pushNotification.updateFcmv1Provider(); +await client.guardian.factors.pushNotification.setFcmv1Provider({}); ```
@@ -18097,7 +17573,7 @@ await client.guardian.factors.pushNotification.updateFcmv1Provider();
-**request:** `Management.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent` +**request:** `Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent`
@@ -19690,7 +19166,7 @@ await client.keys.customSigning.delete(); ## Keys Encryption -
client.keys.encryption.list({ ...params }) -> core.Page +
client.keys.encryption.list({ ...params }) -> core.Page<Management.EncryptionKey, Management.ListEncryptionKeyOffsetPaginatedResponseContent>
@@ -20395,7 +19871,7 @@ await client.keys.signing.revoke("kid"); ## Organizations ClientGrants -
client.organizations.clientGrants.list(id, { ...params }) -> core.Page +
client.organizations.clientGrants.list(id, { ...params }) -> core.Page<Management.OrganizationClientGrant, Management.ListOrganizationClientGrantsOffsetPaginatedResponseContent>
@@ -20591,7 +20067,7 @@ await client.organizations.clientGrants.delete("id", "grant_id"); ## Organizations DiscoveryDomains -
client.organizations.discoveryDomains.list(id, { ...params }) -> core.Page +
client.organizations.discoveryDomains.list(id, { ...params }) -> core.Page<Management.OrganizationDiscoveryDomain, Management.ListOrganizationDiscoveryDomainsResponseContent>
@@ -20692,7 +20168,7 @@ const response = page.response;
-Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). +Update the verification status for an organization discovery domain. The status field must be either pending or verified.
@@ -20753,77 +20229,6 @@ await client.organizations.discoveryDomains.create("id", {
-
client.organizations.discoveryDomains.getByName(id, discovery_domain) -> Management.GetOrganizationDiscoveryDomainByNameResponseContent -
-
- -#### 📝 Description - -
-
- -
-
- -Retrieve details about a single organization discovery domain specified by domain name. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `string` — ID of the organization. - -
-
- -
-
- -**discovery_domain:** `string` — Domain name of the discovery domain. - -
-
- -
-
- -**requestOptions:** `DiscoveryDomainsClient.RequestOptions` - -
-
-
-
- -
-
-
-
client.organizations.discoveryDomains.get(id, discovery_domain_id) -> Management.GetOrganizationDiscoveryDomainResponseContent
@@ -20978,7 +20383,7 @@ await client.organizations.discoveryDomains.delete("id", "discovery_domain_id");
-Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). +Update the verification status for an organization discovery domain. The status field must be either pending or verified.
@@ -21047,7 +20452,7 @@ await client.organizations.discoveryDomains.update("id", "discovery_domain_id"); ## Organizations EnabledConnections -
client.organizations.enabledConnections.list(id, { ...params }) -> core.Page +
client.organizations.enabledConnections.list(id, { ...params }) -> core.Page<Management.OrganizationConnection, Management.ListOrganizationConnectionsOffsetPaginatedResponseContent>
@@ -21438,7 +20843,7 @@ await client.organizations.enabledConnections.update("id", "connectionId"); ## Organizations Invitations -
client.organizations.invitations.list(id, { ...params }) -> core.Page +
client.organizations.invitations.list(id, { ...params }) -> core.Page<Management.OrganizationInvitation, Management.ListOrganizationInvitationsOffsetPaginatedResponseContent>
@@ -21739,7 +21144,7 @@ await client.organizations.invitations.delete("id", "invitation_id"); ## Organizations Members -
client.organizations.members.list(id, { ...params }) -> core.Page +
client.organizations.members.list(id, { ...params }) -> core.Page<Management.OrganizationMember, Management.ListOrganizationMembersPaginatedResponseContent>
@@ -21988,7 +21393,7 @@ await client.organizations.members.delete("id", { ## Organizations Members Roles -
client.organizations.members.roles.list(id, user_id, { ...params }) -> core.Page +
client.organizations.members.roles.list(id, user_id, { ...params }) -> core.Page<Management.Role, Management.ListOrganizationMemberRolesOffsetPaginatedResponseContent>
@@ -22257,7 +21662,7 @@ await client.organizations.members.roles.delete("id", "user_id", { ## Prompts Rendering -
client.prompts.rendering.list({ ...params }) -> core.Page +
client.prompts.rendering.list({ ...params }) -> core.Page<Management.AculResponseContent, Management.ListAculsOffsetPaginatedResponseContent>
@@ -23108,7 +22513,7 @@ await client.riskAssessments.settings.newDevice.update({ ## Roles Permissions -
client.roles.permissions.list(id, { ...params }) -> core.Page +
client.roles.permissions.list(id, { ...params }) -> core.Page<Management.PermissionsResponsePayload, Management.ListRolePermissionsOffsetPaginatedResponseContent>
@@ -23357,7 +22762,7 @@ await client.roles.permissions.delete("id", { ## Roles Users -
client.roles.users.list(id, { ...params }) -> core.Page +
client.roles.users.list(id, { ...params }) -> core.Page<Management.RoleUser, Management.ListRoleUsersPaginatedResponseContent>
@@ -23989,7 +23394,7 @@ await client.tenants.settings.update(); ## Users AuthenticationMethods -
client.users.authenticationMethods.list(id, { ...params }) -> core.Page +
client.users.authenticationMethods.list(id, { ...params }) -> core.Page<Management.UserAuthenticationMethod, Management.ListUserAuthenticationMethodsOffsetPaginatedResponseContent>
@@ -24566,7 +23971,7 @@ await client.users.authenticators.deleteAll("id"); ## Users ConnectedAccounts -
client.users.connectedAccounts.list(id, { ...params }) -> core.Page +
client.users.connectedAccounts.list(id, { ...params }) -> core.Page<Management.ConnectedAccount, Management.ListUserConnectedAccountsResponseContent>
@@ -24841,101 +24246,6 @@ await client.users.federatedConnectionsTokensets.delete("id", "tokenset_id");
-## Users Groups - -
client.users.groups.get(id, { ...params }) -> core.Page -
-
- -#### 📝 Description - -
-
- -
-
- -List all groups to which this user belongs. - -
-
-
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -const pageableResponse = await client.users.groups.get("id", { - fields: "fields", - include_fields: true, - from: "from", - take: 1, -}); -for await (const item of pageableResponse) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.users.groups.get("id", { - fields: "fields", - include_fields: true, - from: "from", - take: 1, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `string` — ID of the user to list groups for. - -
-
- -
-
- -**request:** `Management.GetUserGroupsRequestParameters` - -
-
- -
-
- -**requestOptions:** `GroupsClient.RequestOptions` - -
-
-
-
- -
-
-
- ## Users Identities
client.users.identities.link(id, { ...params }) -> Management.UserIdentity[] @@ -25118,7 +24428,7 @@ await client.users.identities.delete("id", "ad", "user_id"); ## Users Logs -
client.users.logs.list(id, { ...params }) -> core.Page +
client.users.logs.list(id, { ...params }) -> core.Page<Management.Log, Management.UserListLogOffsetPaginatedResponseContent>
@@ -25355,7 +24665,7 @@ await client.users.multifactor.deleteProvider("id", "duo"); ## Users Organizations -
client.users.organizations.list(id, { ...params }) -> core.Page +
client.users.organizations.list(id, { ...params }) -> core.Page<Management.Organization, Management.ListUserOrganizationsOffsetPaginatedResponseContent>
@@ -25448,7 +24758,7 @@ const response = page.response; ## Users Permissions -
client.users.permissions.list(id, { ...params }) -> core.Page +
client.users.permissions.list(id, { ...params }) -> core.Page<Management.UserPermissionSchema, Management.ListUserPermissionsOffsetPaginatedResponseContent>
@@ -25773,7 +25083,7 @@ await client.users.riskAssessments.clear("id", { ## Users Roles -
client.users.roles.list(id, { ...params }) -> core.Page +
client.users.roles.list(id, { ...params }) -> core.Page<Management.Role, Management.ListUserRolesOffsetPaginatedResponseContent>
@@ -26018,7 +25328,7 @@ await client.users.roles.delete("id", { ## Users RefreshToken -
client.users.refreshToken.list(user_id, { ...params }) -> core.Page +
client.users.refreshToken.list(user_id, { ...params }) -> core.Page<Management.RefreshTokenResponseContent, Management.ListRefreshTokensPaginatedResponseContent>
@@ -26172,7 +25482,7 @@ await client.users.refreshToken.delete("user_id"); ## Users Sessions -
client.users.sessions.list(user_id, { ...params }) -> core.Page +
client.users.sessions.list(user_id, { ...params }) -> core.Page<Management.SessionResponseContent, Management.ListUserSessionsPaginatedResponseContent>
@@ -26326,7 +25636,7 @@ await client.users.sessions.delete("user_id"); ## VerifiableCredentials Verification Templates -
client.verifiableCredentials.verification.templates.list({ ...params }) -> core.Page +
client.verifiableCredentials.verification.templates.list({ ...params }) -> core.Page<Management.VerifiableCredentialTemplateResponse, Management.ListVerifiableCredentialTemplatesPaginatedResponseContent>
diff --git a/src/management/BaseClient.ts b/src/management/BaseClient.ts index 574822b144..47f6a609cd 100644 --- a/src/management/BaseClient.ts +++ b/src/management/BaseClient.ts @@ -35,23 +35,26 @@ export interface BaseRequestOptions { headers?: Record | null | undefined>; } -export type NormalizedClientOptions = T & { +export type NormalizedClientOptions = T & { logging: core.logging.Logger; authProvider?: core.AuthProvider; }; -export type NormalizedClientOptionsWithAuth = NormalizedClientOptions & { - authProvider: core.AuthProvider; -}; +export type NormalizedClientOptionsWithAuth = + NormalizedClientOptions & { + authProvider: core.AuthProvider; + }; -export function normalizeClientOptions(options: T): NormalizedClientOptions { +export function normalizeClientOptions( + options: T, +): NormalizedClientOptions { return { ...options, logging: core.logging.createLogger(options?.logging), } as NormalizedClientOptions; } -export function normalizeClientOptionsWithAuth( +export function normalizeClientOptionsWithAuth( options: T, ): NormalizedClientOptionsWithAuth { const normalized = normalizeClientOptions(options) as NormalizedClientOptionsWithAuth; @@ -60,7 +63,7 @@ export function normalizeClientOptionsWithAuth( return normalized; } -function withNoOpAuthProvider( +function withNoOpAuthProvider( options: NormalizedClientOptions, ): NormalizedClientOptionsWithAuth { return { diff --git a/src/management/Client.ts b/src/management/Client.ts index 4f58da9ea3..70f69c1a58 100644 --- a/src/management/Client.ts +++ b/src/management/Client.ts @@ -15,7 +15,6 @@ import { EmailTemplatesClient } from "./api/resources/emailTemplates/client/Clie import { EventStreamsClient } from "./api/resources/eventStreams/client/Client.js"; import { FlowsClient } from "./api/resources/flows/client/Client.js"; import { FormsClient } from "./api/resources/forms/client/Client.js"; -import { GroupsClient } from "./api/resources/groups/client/Client.js"; import { GuardianClient } from "./api/resources/guardian/client/Client.js"; import { HooksClient } from "./api/resources/hooks/client/Client.js"; import { JobsClient } from "./api/resources/jobs/client/Client.js"; @@ -69,7 +68,6 @@ export class ManagementClient { protected _flows: FlowsClient | undefined; protected _forms: FormsClient | undefined; protected _userGrants: UserGrantsClient | undefined; - protected _groups: GroupsClient | undefined; protected _hooks: HooksClient | undefined; protected _jobs: JobsClient | undefined; protected _logStreams: LogStreamsClient | undefined; @@ -156,10 +154,6 @@ export class ManagementClient { return (this._userGrants ??= new UserGrantsClient(this._options)); } - public get groups(): GroupsClient { - return (this._groups ??= new GroupsClient(this._options)); - } - public get hooks(): HooksClient { return (this._hooks ??= new HooksClient(this._options)); } diff --git a/src/management/api/requests/requests.ts b/src/management/api/requests/requests.ts index 7d269b1bbc..96a884f848 100644 --- a/src/management/api/requests/requests.ts +++ b/src/management/api/requests/requests.ts @@ -52,8 +52,6 @@ export interface CreateActionRequestContent { runtime?: string; /** The list of secrets that are included in an action or a version of an action. */ secrets?: Management.ActionSecretRequest[]; - /** The list of action modules and their versions used by this action. */ - modules?: Management.ActionModuleReference[]; /** True if the action should be deployed after creation. */ deploy?: boolean; } @@ -86,8 +84,6 @@ export interface UpdateActionRequestContent { runtime?: string; /** The list of secrets that are included in an action or a version of an action. */ secrets?: Management.ActionSecretRequest[]; - /** The list of action modules and their versions used by this action. */ - modules?: Management.ActionModuleReference[]; } /** @@ -537,6 +533,8 @@ export interface UpdateConnectionRequestContent { /** * @example * { + * take: 1, + * from: "from", * q: "q", * fields: "fields", * include_fields: true, @@ -544,6 +542,10 @@ export interface UpdateConnectionRequestContent { * } */ export interface ListCustomDomainsRequestParameters { + /** Number of results per page. Defaults to 50. */ + take?: number | null; + /** Optional Id from which to start selection. */ + from?: string | null; /** Query in Lucene query string syntax. */ q?: string | null; /** Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields. */ @@ -900,35 +902,6 @@ export interface DeleteUserGrantByUserIdRequestParameters { user_id: string; } -/** - * @example - * { - * connection_id: "connection_id", - * name: "name", - * external_id: "external_id", - * fields: "fields", - * include_fields: true, - * from: "from", - * take: 1 - * } - */ -export interface ListGroupsRequestParameters { - /** Filter groups by connection ID. */ - connection_id?: string | null; - /** Filter groups by name. */ - name?: string | null; - /** Filter groups by external ID. */ - external_id?: string | null; - /** A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - fields?: string | null; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean | null; - /** Optional Id from which to start selection. */ - from?: string | null; - /** Number of results per page. Defaults to 50. */ - take?: number | null; -} - /** * @example * { @@ -1181,14 +1154,6 @@ export interface UpdateSettingsRequestContent { webauthn_platform_first_factor?: boolean | null; } -/** - * @example - * {} - */ -export interface UpdateRefreshTokenRequestContent { - refresh_token_metadata?: (Management.RefreshTokenMetadata | undefined) | null; -} - /** * @example * { @@ -2503,26 +2468,6 @@ export interface UpdateFlowsVaultConnectionRequestContent { setup?: Management.UpdateFlowsVaultConnectionSetup; } -/** - * @example - * { - * fields: "fields", - * include_fields: true, - * from: "from", - * take: 1 - * } - */ -export interface GetGroupMembersRequestParameters { - /** A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - fields?: string | null; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean | null; - /** Optional Id from which to start selection. */ - from?: string | null; - /** Number of results per page. Defaults to 50. */ - take?: number | null; -} - /** * @example * { @@ -2604,58 +2549,6 @@ export interface SetGuardianFactorPhoneTemplatesRequestContent { verification_message: string; } -/** - * @example - * {} - */ -export interface SetGuardianFactorsProviderPushNotificationApnsRequestContent { - sandbox?: boolean; - bundle_id?: string | null; - p12?: string | null; -} - -/** - * @example - * {} - */ -export interface UpdateGuardianFactorsProviderPushNotificationApnsRequestContent { - sandbox?: boolean; - bundle_id?: string | null; - p12?: string | null; -} - -/** - * @example - * {} - */ -export interface SetGuardianFactorsProviderPushNotificationFcmRequestContent { - server_key?: string | null; -} - -/** - * @example - * {} - */ -export interface UpdateGuardianFactorsProviderPushNotificationFcmRequestContent { - server_key?: string | null; -} - -/** - * @example - * {} - */ -export interface SetGuardianFactorsProviderPushNotificationFcmv1RequestContent { - server_credentials?: string | null; -} - -/** - * @example - * {} - */ -export interface UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent { - server_credentials?: string | null; -} - /** * @example * {} @@ -2909,8 +2802,6 @@ export interface CreateOrganizationDiscoveryDomainRequestContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status?: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this discovery domain should be used for organization discovery. */ - use_for_organization_discovery?: boolean; } /** @@ -2919,8 +2810,6 @@ export interface CreateOrganizationDiscoveryDomainRequestContent { */ export interface UpdateOrganizationDiscoveryDomainRequestContent { status?: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this discovery domain should be used for organization discovery. */ - use_for_organization_discovery?: boolean; } /** @@ -3289,8 +3178,6 @@ export interface CreateSelfServiceProfileSsoTicketRequestContent { ttl_sec?: number; domain_aliases_config?: Management.SelfServiceProfileSsoTicketDomainAliasesConfig; provisioning_config?: Management.SelfServiceProfileSsoTicketProvisioningConfig; - /** Indicates whether a verified domain should be used for organization discovery during authentication. */ - use_for_organization_discovery?: boolean; } /** @@ -3369,8 +3256,6 @@ export interface UpdateTenantSettingsRequestContent { */ skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; resource_parameter_profile?: Management.TenantSettingsResourceParameterProfile; - /** Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. */ - enable_ai_guide?: boolean; } export namespace UpdateTenantSettingsRequestContent { @@ -3530,26 +3415,6 @@ export interface GetUserConnectedAccountsRequestParameters { take?: number | null; } -/** - * @example - * { - * fields: "fields", - * include_fields: true, - * from: "from", - * take: 1 - * } - */ -export interface GetUserGroupsRequestParameters { - /** A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - fields?: string | null; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean | null; - /** Optional Id from which to start selection. */ - from?: string | null; - /** Number of results per page. Defaults to 50. */ - take?: number | null; -} - /** * @example * {} diff --git a/src/management/api/resources/actions/client/Client.ts b/src/management/api/resources/actions/client/Client.ts index fa09980b72..3bbbc17645 100644 --- a/src/management/api/resources/actions/client/Client.ts +++ b/src/management/api/resources/actions/client/Client.ts @@ -70,25 +70,14 @@ export class ActionsClient { request: Management.ListActionsRequestParameters, ): Promise> => { const { triggerId, actionName, deployed, page = 0, per_page: perPage = 50, installed } = request; - const _queryParams: Record = {}; - if (triggerId !== undefined) { - _queryParams["triggerId"] = triggerId; - } - if (actionName !== undefined) { - _queryParams["actionName"] = actionName; - } - if (deployed !== undefined) { - _queryParams["deployed"] = deployed?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (installed !== undefined) { - _queryParams["installed"] = installed?.toString() ?? null; - } + const _queryParams: Record = { + triggerId, + actionName, + deployed, + page, + per_page: perPage, + installed, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -353,11 +342,9 @@ export class ActionsClient { requestOptions?: ActionsClient.RequestOptions, ): Promise> { const { force } = request; - const _queryParams: Record = {}; - if (force !== undefined) { - _queryParams["force"] = force?.toString() ?? null; - } - + const _queryParams: Record = { + force, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.ts b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.ts index be113469f4..375401eccf 100644 --- a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.ts +++ b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.ts @@ -53,13 +53,10 @@ export class BindingsClient { request: Management.ListActionTriggerBindingsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50 } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/actions/resources/versions/client/Client.ts b/src/management/api/resources/actions/resources/versions/client/Client.ts index 09ba9ace3d..3ac00b5fbb 100644 --- a/src/management/api/resources/actions/resources/versions/client/Client.ts +++ b/src/management/api/resources/actions/resources/versions/client/Client.ts @@ -50,13 +50,10 @@ export class VersionsClient { request: Management.ListActionVersionsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50 } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/Client.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/Client.ts index 105b568201..82add0fa4c 100644 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/Client.ts +++ b/src/management/api/resources/branding/resources/phone/resources/providers/client/Client.ts @@ -53,11 +53,9 @@ export class ProvidersClient { requestOptions?: ProvidersClient.RequestOptions, ): Promise> { const { disabled } = request; - const _queryParams: Record = {}; - if (disabled !== undefined) { - _queryParams["disabled"] = disabled?.toString() ?? null; - } - + const _queryParams: Record = { + disabled, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/Client.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/Client.ts index c21a97175c..4523e4e2ae 100644 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/Client.ts +++ b/src/management/api/resources/branding/resources/phone/resources/templates/client/Client.ts @@ -51,11 +51,9 @@ export class TemplatesClient { requestOptions?: TemplatesClient.RequestOptions, ): Promise> { const { disabled } = request; - const _queryParams: Record = {}; - if (disabled !== undefined) { - _queryParams["disabled"] = disabled?.toString() ?? null; - } - + const _queryParams: Record = { + disabled, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/clientGrants/client/Client.ts b/src/management/api/resources/clientGrants/client/Client.ts index b17cd7b2ea..751781ceef 100644 --- a/src/management/api/resources/clientGrants/client/Client.ts +++ b/src/management/api/resources/clientGrants/client/Client.ts @@ -64,25 +64,14 @@ export class ClientGrantsClient { allow_any_organization: allowAnyOrganization, subject_type: subjectType, } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - if (audience !== undefined) { - _queryParams["audience"] = audience; - } - if (clientId !== undefined) { - _queryParams["client_id"] = clientId; - } - if (allowAnyOrganization !== undefined) { - _queryParams["allow_any_organization"] = allowAnyOrganization?.toString() ?? null; - } - if (subjectType !== undefined) { - _queryParams["subject_type"] = subjectType; - } + const _queryParams: Record = { + from: from_, + take, + audience, + client_id: clientId, + allow_any_organization: allowAnyOrganization, + subject_type: subjectType !== undefined ? subjectType : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/clientGrants/resources/organizations/client/Client.ts b/src/management/api/resources/clientGrants/resources/organizations/client/Client.ts index 15f9f8f15a..955c4f8edd 100644 --- a/src/management/api/resources/clientGrants/resources/organizations/client/Client.ts +++ b/src/management/api/resources/clientGrants/resources/organizations/client/Client.ts @@ -48,13 +48,10 @@ export class OrganizationsClient { request: Management.ListClientGrantOrganizationsRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/clients/client/Client.ts b/src/management/api/resources/clients/client/Client.ts index f62f86d9c4..2f4c1e5549 100644 --- a/src/management/api/resources/clients/client/Client.ts +++ b/src/management/api/resources/clients/client/Client.ts @@ -109,34 +109,17 @@ export class ClientsClient { app_type: appType, q, } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (isGlobal !== undefined) { - _queryParams["is_global"] = isGlobal?.toString() ?? null; - } - if (isFirstParty !== undefined) { - _queryParams["is_first_party"] = isFirstParty?.toString() ?? null; - } - if (appType !== undefined) { - _queryParams["app_type"] = appType; - } - if (q !== undefined) { - _queryParams["q"] = q; - } + const _queryParams: Record = { + fields, + include_fields: includeFields, + page, + per_page: perPage, + include_totals: includeTotals, + is_global: isGlobal, + is_first_party: isFirstParty, + app_type: appType, + q, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -369,15 +352,10 @@ export class ClientsClient { requestOptions?: ClientsClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/clients/resources/connections/client/Client.ts b/src/management/api/resources/clients/resources/connections/client/Client.ts index 15c05ae6fb..14fad25963 100644 --- a/src/management/api/resources/clients/resources/connections/client/Client.ts +++ b/src/management/api/resources/clients/resources/connections/client/Client.ts @@ -61,26 +61,17 @@ export class ConnectionsClient { request: Management.ConnectionsGetRequest, ): Promise> => { const { strategy, from: from_, take = 50, fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (strategy !== undefined) { - if (Array.isArray(strategy)) { - _queryParams["strategy"] = strategy.map((item) => item); - } else { - _queryParams["strategy"] = strategy; - } - } - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } + const _queryParams: Record = { + strategy: Array.isArray(strategy) + ? strategy.map((item) => item) + : strategy !== undefined + ? strategy + : undefined, + from: from_, + take, + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/connectionProfiles/client/Client.ts b/src/management/api/resources/connectionProfiles/client/Client.ts index d581eda780..94fc6a137d 100644 --- a/src/management/api/resources/connectionProfiles/client/Client.ts +++ b/src/management/api/resources/connectionProfiles/client/Client.ts @@ -48,13 +48,10 @@ export class ConnectionProfilesClient { request: Management.ListConnectionProfileRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/connections/client/Client.ts b/src/management/api/resources/connections/client/Client.ts index 540fc581cb..87bc0f07ce 100644 --- a/src/management/api/resources/connections/client/Client.ts +++ b/src/management/api/resources/connections/client/Client.ts @@ -99,29 +99,18 @@ export class ConnectionsClient { request: Management.ListConnectionsQueryParameters, ): Promise> => { const { from: from_, take = 50, strategy, name, fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - if (strategy !== undefined) { - if (Array.isArray(strategy)) { - _queryParams["strategy"] = strategy.map((item) => item); - } else { - _queryParams["strategy"] = strategy; - } - } - if (name !== undefined) { - _queryParams["name"] = name; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + strategy: Array.isArray(strategy) + ? strategy.map((item) => item) + : strategy !== undefined + ? strategy + : undefined, + name, + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -314,15 +303,10 @@ export class ConnectionsClient { requestOptions?: ConnectionsClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/connections/resources/clients/client/Client.ts b/src/management/api/resources/connections/resources/clients/client/Client.ts index dd30894980..67c7c2b2f3 100644 --- a/src/management/api/resources/connections/resources/clients/client/Client.ts +++ b/src/management/api/resources/connections/resources/clients/client/Client.ts @@ -53,13 +53,10 @@ export class ClientsClient { request: Management.GetConnectionEnabledClientsRequestParameters, ): Promise> => { const { take = 50, from: from_ } = request; - const _queryParams: Record = {}; - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - if (from_ !== undefined) { - _queryParams["from"] = from_; - } + const _queryParams: Record = { + take, + from: from_, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/connections/resources/users/client/Client.ts b/src/management/api/resources/connections/resources/users/client/Client.ts index 405ff7e133..c1d9d255ae 100644 --- a/src/management/api/resources/connections/resources/users/client/Client.ts +++ b/src/management/api/resources/connections/resources/users/client/Client.ts @@ -53,8 +53,9 @@ export class UsersClient { requestOptions?: UsersClient.RequestOptions, ): Promise> { const { email } = request; - const _queryParams: Record = {}; - _queryParams["email"] = email; + const _queryParams: Record = { + email, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/customDomains/client/Client.ts b/src/management/api/resources/customDomains/client/Client.ts index b23fd130c6..6a5c8a8f53 100644 --- a/src/management/api/resources/customDomains/client/Client.ts +++ b/src/management/api/resources/customDomains/client/Client.ts @@ -34,6 +34,8 @@ export class CustomDomainsClient { * * @example * await client.customDomains.list({ + * take: 1, + * from: "from", * q: "q", * fields: "fields", * include_fields: true, @@ -51,24 +53,15 @@ export class CustomDomainsClient { request: Management.ListCustomDomainsRequestParameters = {}, requestOptions?: CustomDomainsClient.RequestOptions, ): Promise> { - const { q, fields, include_fields: includeFields, sort } = request; - const _queryParams: Record = {}; - if (q !== undefined) { - _queryParams["q"] = q; - } - - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - - if (sort !== undefined) { - _queryParams["sort"] = sort; - } - + const { take = 50, from: from_, q, fields, include_fields: includeFields, sort } = request; + const _queryParams: Record = { + take, + from: from_, + q, + fields, + include_fields: includeFields, + sort, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/deviceCredentials/client/Client.ts b/src/management/api/resources/deviceCredentials/client/Client.ts index 600174de9a..b4fe27c750 100644 --- a/src/management/api/resources/deviceCredentials/client/Client.ts +++ b/src/management/api/resources/deviceCredentials/client/Client.ts @@ -63,31 +63,16 @@ export class DeviceCredentialsClient { client_id: clientId, type: type_, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (userId !== undefined) { - _queryParams["user_id"] = userId; - } - if (clientId !== undefined) { - _queryParams["client_id"] = clientId; - } - if (type_ !== undefined) { - _queryParams["type"] = type_; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + fields, + include_fields: includeFields, + user_id: userId, + client_id: clientId, + type: type_ !== undefined ? type_ : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/emails/resources/provider/client/Client.ts b/src/management/api/resources/emails/resources/provider/client/Client.ts index e63f0b42cd..5793717c3f 100644 --- a/src/management/api/resources/emails/resources/provider/client/Client.ts +++ b/src/management/api/resources/emails/resources/provider/client/Client.ts @@ -52,15 +52,10 @@ export class ProviderClient { requestOptions?: ProviderClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/eventStreams/client/Client.ts b/src/management/api/resources/eventStreams/client/Client.ts index 3b7f06bd2f..8a1fa8af42 100644 --- a/src/management/api/resources/eventStreams/client/Client.ts +++ b/src/management/api/resources/eventStreams/client/Client.ts @@ -49,91 +49,71 @@ export class EventStreamsClient { * take: 1 * }) */ - public async list( + public list( request: Management.ListEventStreamsRequestParameters = {}, requestOptions?: EventStreamsClient.RequestOptions, - ): Promise> { - const list = core.HttpResponsePromise.interceptFunction( - async ( - request: Management.ListEventStreamsRequestParameters, - ): Promise> => { - const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - "event-streams", - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.ListEventStreamsResponseContent, - rawResponse: _response.rawResponse, - }; - } - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 401: - throw new Management.UnauthorizedError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError( - _response.error.body as unknown, - _response.rawResponse, - ); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/event-streams"); - }, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Management.ListEventStreamsRequestParameters = {}, + requestOptions?: EventStreamsClient.RequestOptions, + ): Promise> { + const { from: from_, take = 50 } = request; + const _queryParams: Record = { + from: from_, + take, + }; + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, ); - const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Page({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => - response?.next != null && !(typeof response?.next === "string" && response?.next === ""), - getItems: (response) => response?.eventStreams ?? [], - loadPage: (response) => { - return list(core.setObjectProperty(request, "from", response?.next)); - }, + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "event-streams", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, }); + if (_response.ok) { + return { + data: _response.body as Management.EventStreamResponseContent[], + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/event-streams"); } /** diff --git a/src/management/api/resources/eventStreams/resources/deliveries/client/Client.ts b/src/management/api/resources/eventStreams/resources/deliveries/client/Client.ts index 16979b20cf..84c74f3117 100644 --- a/src/management/api/resources/eventStreams/resources/deliveries/client/Client.ts +++ b/src/management/api/resources/eventStreams/resources/deliveries/client/Client.ts @@ -64,31 +64,14 @@ export class DeliveriesClient { from: from_, take = 50, } = request; - const _queryParams: Record = {}; - if (statuses !== undefined) { - _queryParams["statuses"] = statuses; - } - - if (eventTypes !== undefined) { - _queryParams["event_types"] = eventTypes; - } - - if (dateFrom !== undefined) { - _queryParams["date_from"] = dateFrom; - } - - if (dateTo !== undefined) { - _queryParams["date_to"] = dateTo; - } - - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - + const _queryParams: Record = { + statuses, + event_types: eventTypes, + date_from: dateFrom, + date_to: dateTo, + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/flows/client/Client.ts b/src/management/api/resources/flows/client/Client.ts index 77e4b65c27..3080382583 100644 --- a/src/management/api/resources/flows/client/Client.ts +++ b/src/management/api/resources/flows/client/Client.ts @@ -66,26 +66,17 @@ export class FlowsClient { hydrate, synchronous, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (hydrate !== undefined) { - if (Array.isArray(hydrate)) { - _queryParams["hydrate"] = hydrate.map((item) => item); - } else { - _queryParams["hydrate"] = hydrate; - } - } - if (synchronous !== undefined) { - _queryParams["synchronous"] = synchronous?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + hydrate: Array.isArray(hydrate) + ? hydrate.map((item) => item) + : hydrate !== undefined + ? hydrate + : undefined, + synchronous, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -262,15 +253,9 @@ export class FlowsClient { requestOptions?: FlowsClient.RequestOptions, ): Promise> { const { hydrate } = request; - const _queryParams: Record = {}; - if (hydrate !== undefined) { - if (Array.isArray(hydrate)) { - _queryParams["hydrate"] = hydrate.map((item) => item); - } else { - _queryParams["hydrate"] = hydrate; - } - } - + const _queryParams: Record = { + hydrate: Array.isArray(hydrate) ? hydrate.map((item) => item) : hydrate !== undefined ? hydrate : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/flows/resources/executions/client/Client.ts b/src/management/api/resources/flows/resources/executions/client/Client.ts index 53e333a14e..340569c669 100644 --- a/src/management/api/resources/flows/resources/executions/client/Client.ts +++ b/src/management/api/resources/flows/resources/executions/client/Client.ts @@ -48,13 +48,10 @@ export class ExecutionsClient { request: Management.ExecutionsListRequest, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -161,15 +158,9 @@ export class ExecutionsClient { requestOptions?: ExecutionsClient.RequestOptions, ): Promise> { const { hydrate } = request; - const _queryParams: Record = {}; - if (hydrate !== undefined) { - if (Array.isArray(hydrate)) { - _queryParams["hydrate"] = hydrate.map((item) => item); - } else { - _queryParams["hydrate"] = hydrate; - } - } - + const _queryParams: Record = { + hydrate: Array.isArray(hydrate) ? hydrate.map((item) => item) : hydrate !== undefined ? hydrate : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/flows/resources/vault/resources/connections/client/Client.ts b/src/management/api/resources/flows/resources/vault/resources/connections/client/Client.ts index a824e3c8c8..5607cb33bc 100644 --- a/src/management/api/resources/flows/resources/vault/resources/connections/client/Client.ts +++ b/src/management/api/resources/flows/resources/vault/resources/connections/client/Client.ts @@ -55,16 +55,11 @@ export class ConnectionsClient { request: Management.ListFlowsVaultConnectionsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/forms/client/Client.ts b/src/management/api/resources/forms/client/Client.ts index a173bd93dd..f57a3c5cad 100644 --- a/src/management/api/resources/forms/client/Client.ts +++ b/src/management/api/resources/forms/client/Client.ts @@ -47,23 +47,16 @@ export class FormsClient { request: Management.ListFormsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, hydrate } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (hydrate !== undefined) { - if (Array.isArray(hydrate)) { - _queryParams["hydrate"] = hydrate.map((item) => item); - } else { - _queryParams["hydrate"] = hydrate; - } - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + hydrate: Array.isArray(hydrate) + ? hydrate.map((item) => item) + : hydrate !== undefined + ? hydrate + : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -240,15 +233,9 @@ export class FormsClient { requestOptions?: FormsClient.RequestOptions, ): Promise> { const { hydrate } = request; - const _queryParams: Record = {}; - if (hydrate !== undefined) { - if (Array.isArray(hydrate)) { - _queryParams["hydrate"] = hydrate.map((item) => item); - } else { - _queryParams["hydrate"] = hydrate; - } - } - + const _queryParams: Record = { + hydrate: Array.isArray(hydrate) ? hydrate.map((item) => item) : hydrate !== undefined ? hydrate : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/groups/client/Client.ts b/src/management/api/resources/groups/client/Client.ts deleted file mode 100644 index 0dbc18c892..0000000000 --- a/src/management/api/resources/groups/client/Client.ts +++ /dev/null @@ -1,238 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; -import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; -import * as core from "../../../../core/index.js"; -import { mergeHeaders } from "../../../../core/headers.js"; -import * as environments from "../../../../environments.js"; -import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js"; -import * as errors from "../../../../errors/index.js"; -import * as Management from "../../../index.js"; -import { MembersClient } from "../resources/members/client/Client.js"; - -export declare namespace GroupsClient { - export type Options = BaseClientOptions; - - export interface RequestOptions extends BaseRequestOptions {} -} - -export class GroupsClient { - protected readonly _options: NormalizedClientOptionsWithAuth; - protected _members: MembersClient | undefined; - - constructor(options: GroupsClient.Options) { - this._options = normalizeClientOptionsWithAuth(options); - } - - public get members(): MembersClient { - return (this._members ??= new MembersClient(this._options)); - } - - /** - * List all groups in your tenant. - * - * @param {Management.ListGroupsRequestParameters} request - * @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * @throws {@link Management.TooManyRequestsError} - * - * @example - * await client.groups.list({ - * connection_id: "connection_id", - * name: "name", - * external_id: "external_id", - * fields: "fields", - * include_fields: true, - * from: "from", - * take: 1 - * }) - */ - public async list( - request: Management.ListGroupsRequestParameters = {}, - requestOptions?: GroupsClient.RequestOptions, - ): Promise> { - const list = core.HttpResponsePromise.interceptFunction( - async ( - request: Management.ListGroupsRequestParameters, - ): Promise> => { - const { - connection_id: connectionId, - name, - external_id: externalId, - fields, - include_fields: includeFields, - from: from_, - take = 50, - } = request; - const _queryParams: Record = {}; - if (connectionId !== undefined) { - _queryParams["connection_id"] = connectionId; - } - if (name !== undefined) { - _queryParams["name"] = name; - } - if (externalId !== undefined) { - _queryParams["external_id"] = externalId; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - "groups", - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.ListGroupsPaginatedResponseContent, - rawResponse: _response.rawResponse, - }; - } - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 401: - throw new Management.UnauthorizedError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError( - _response.error.body as unknown, - _response.rawResponse, - ); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/groups"); - }, - ); - const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Page({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => - response?.next != null && !(typeof response?.next === "string" && response?.next === ""), - getItems: (response) => response?.groups ?? [], - loadPage: (response) => { - return list(core.setObjectProperty(request, "from", response?.next)); - }, - }); - } - - /** - * Retrieve a group by its ID. - * - * @param {string} id - Unique identifier for the group (service-generated). - * @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * @throws {@link Management.NotFoundError} - * @throws {@link Management.TooManyRequestsError} - * - * @example - * await client.groups.get("id") - */ - public get( - id: string, - requestOptions?: GroupsClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); - } - - private async __get( - id: string, - requestOptions?: GroupsClient.RequestOptions, - ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - `groups/${core.url.encodePathParam(id)}`, - ), - method: "GET", - headers: _headers, - queryParameters: requestOptions?.queryParams, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { data: _response.body as Management.GetGroupResponseContent, rawResponse: _response.rawResponse }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 401: - throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 404: - throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/groups/{id}"); - } -} diff --git a/src/management/api/resources/groups/client/index.ts b/src/management/api/resources/groups/client/index.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/src/management/api/resources/groups/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/management/api/resources/groups/index.ts b/src/management/api/resources/groups/index.ts deleted file mode 100644 index 9eb1192dcc..0000000000 --- a/src/management/api/resources/groups/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./client/index.js"; -export * from "./resources/index.js"; diff --git a/src/management/api/resources/groups/resources/index.ts b/src/management/api/resources/groups/resources/index.ts deleted file mode 100644 index 88a930fad1..0000000000 --- a/src/management/api/resources/groups/resources/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as members from "./members/index.js"; diff --git a/src/management/api/resources/groups/resources/members/client/Client.ts b/src/management/api/resources/groups/resources/members/client/Client.ts deleted file mode 100644 index 41fff22594..0000000000 --- a/src/management/api/resources/groups/resources/members/client/Client.ts +++ /dev/null @@ -1,138 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; -import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js"; -import * as core from "../../../../../../core/index.js"; -import { mergeHeaders } from "../../../../../../core/headers.js"; -import * as environments from "../../../../../../environments.js"; -import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.js"; -import * as errors from "../../../../../../errors/index.js"; -import * as Management from "../../../../../index.js"; - -export declare namespace MembersClient { - export type Options = BaseClientOptions; - - export interface RequestOptions extends BaseRequestOptions {} -} - -export class MembersClient { - protected readonly _options: NormalizedClientOptionsWithAuth; - - constructor(options: MembersClient.Options) { - this._options = normalizeClientOptionsWithAuth(options); - } - - /** - * List all users that are a member of this group. - * - * @param {string} id - Unique identifier for the group (service-generated). - * @param {Management.GetGroupMembersRequestParameters} request - * @param {MembersClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * @throws {@link Management.TooManyRequestsError} - * - * @example - * await client.groups.members.get("id", { - * fields: "fields", - * include_fields: true, - * from: "from", - * take: 1 - * }) - */ - public async get( - id: string, - request: Management.GetGroupMembersRequestParameters = {}, - requestOptions?: MembersClient.RequestOptions, - ): Promise> { - const list = core.HttpResponsePromise.interceptFunction( - async ( - request: Management.GetGroupMembersRequestParameters, - ): Promise> => { - const { fields, include_fields: includeFields, from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - `groups/${core.url.encodePathParam(id)}/members`, - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.GetGroupMembersResponseContent, - rawResponse: _response.rawResponse, - }; - } - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 401: - throw new Management.UnauthorizedError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError( - _response.error.body as unknown, - _response.rawResponse, - ); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/groups/{id}/members"); - }, - ); - const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Page({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => - response?.next != null && !(typeof response?.next === "string" && response?.next === ""), - getItems: (response) => response?.members ?? [], - loadPage: (response) => { - return list(core.setObjectProperty(request, "from", response?.next)); - }, - }); - } -} diff --git a/src/management/api/resources/groups/resources/members/client/index.ts b/src/management/api/resources/groups/resources/members/client/index.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/src/management/api/resources/groups/resources/members/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/management/api/resources/groups/resources/members/index.ts b/src/management/api/resources/groups/resources/members/index.ts deleted file mode 100644 index 914b8c3c72..0000000000 --- a/src/management/api/resources/groups/resources/members/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.ts b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.ts index 61934a05ed..f5451c2ef0 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.ts @@ -101,7 +101,7 @@ export class PushNotificationClient { } /** - * Overwrite all configuration details of the multi-factor authentication APNS provider associated with your tenant. + * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. * * @param {Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent} request * @param {PushNotificationClient.RequestOptions} requestOptions - Request-specific configuration. @@ -111,100 +111,19 @@ export class PushNotificationClient { * @throws {@link Management.ForbiddenError} * * @example - * await client.guardian.factors.pushNotification.setApnsProvider() + * await client.guardian.factors.pushNotification.setApnsProvider({}) */ public setApnsProvider( - request: Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent = {}, + request: Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent, requestOptions?: PushNotificationClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__setApnsProvider(request, requestOptions)); } private async __setApnsProvider( - request: Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent = {}, + request: Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent, requestOptions?: PushNotificationClient.RequestOptions, ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - "guardian/factors/push-notification/providers/apns", - ), - method: "PUT", - headers: _headers, - contentType: "application/json", - queryParameters: requestOptions?.queryParams, - requestType: "json", - body: request, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.SetGuardianFactorsProviderPushNotificationApnsResponseContent, - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 401: - throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError( - _response.error, - _response.rawResponse, - "PUT", - "/guardian/factors/push-notification/providers/apns", - ); - } - - /** - * Modify configuration details of the multi-factor authentication APNS provider associated with your tenant. - * - * @param {Management.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent} request - * @param {PushNotificationClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * - * @example - * await client.guardian.factors.pushNotification.updateApnsProvider() - */ - public updateApnsProvider( - request: Management.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent = {}, - requestOptions?: PushNotificationClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__updateApnsProvider(request, requestOptions)); - } - - private async __updateApnsProvider( - request: Management.UpdateGuardianFactorsProviderPushNotificationApnsRequestContent = {}, - requestOptions?: PushNotificationClient.RequestOptions, - ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -232,7 +151,7 @@ export class PushNotificationClient { }); if (_response.ok) { return { - data: _response.body as Management.UpdateGuardianFactorsProviderPushNotificationApnsResponseContent, + data: _response.body as Management.SetGuardianFactorsProviderPushNotificationApnsResponseContent, rawResponse: _response.rawResponse, }; } @@ -263,7 +182,7 @@ export class PushNotificationClient { } /** - * Overwrite all configuration details of the multi-factor authentication FCM provider associated with your tenant. + * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. * * @param {Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent} request * @param {PushNotificationClient.RequestOptions} requestOptions - Request-specific configuration. @@ -273,100 +192,19 @@ export class PushNotificationClient { * @throws {@link Management.ForbiddenError} * * @example - * await client.guardian.factors.pushNotification.setFcmProvider() + * await client.guardian.factors.pushNotification.setFcmProvider({}) */ public setFcmProvider( - request: Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent = {}, + request: Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent, requestOptions?: PushNotificationClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__setFcmProvider(request, requestOptions)); } private async __setFcmProvider( - request: Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent = {}, + request: Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent, requestOptions?: PushNotificationClient.RequestOptions, ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - "guardian/factors/push-notification/providers/fcm", - ), - method: "PUT", - headers: _headers, - contentType: "application/json", - queryParameters: requestOptions?.queryParams, - requestType: "json", - body: request, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.SetGuardianFactorsProviderPushNotificationFcmResponseContent, - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 401: - throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError( - _response.error, - _response.rawResponse, - "PUT", - "/guardian/factors/push-notification/providers/fcm", - ); - } - - /** - * Modify configuration details of the multi-factor authentication FCM provider associated with your tenant. - * - * @param {Management.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent} request - * @param {PushNotificationClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * - * @example - * await client.guardian.factors.pushNotification.updateFcmProvider() - */ - public updateFcmProvider( - request: Management.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent = {}, - requestOptions?: PushNotificationClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__updateFcmProvider(request, requestOptions)); - } - - private async __updateFcmProvider( - request: Management.UpdateGuardianFactorsProviderPushNotificationFcmRequestContent = {}, - requestOptions?: PushNotificationClient.RequestOptions, - ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -394,7 +232,7 @@ export class PushNotificationClient { }); if (_response.ok) { return { - data: _response.body as Management.UpdateGuardianFactorsProviderPushNotificationFcmResponseContent, + data: _response.body as Management.SetGuardianFactorsProviderPushNotificationFcmResponseContent, rawResponse: _response.rawResponse, }; } @@ -425,7 +263,7 @@ export class PushNotificationClient { } /** - * Overwrite all configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. + * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. * * @param {Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent} request * @param {PushNotificationClient.RequestOptions} requestOptions - Request-specific configuration. @@ -435,100 +273,19 @@ export class PushNotificationClient { * @throws {@link Management.ForbiddenError} * * @example - * await client.guardian.factors.pushNotification.setFcmv1Provider() + * await client.guardian.factors.pushNotification.setFcmv1Provider({}) */ public setFcmv1Provider( - request: Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent = {}, + request: Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent, requestOptions?: PushNotificationClient.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__setFcmv1Provider(request, requestOptions)); } private async __setFcmv1Provider( - request: Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent = {}, + request: Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent, requestOptions?: PushNotificationClient.RequestOptions, ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - "guardian/factors/push-notification/providers/fcmv1", - ), - method: "PUT", - headers: _headers, - contentType: "application/json", - queryParameters: requestOptions?.queryParams, - requestType: "json", - body: request, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent, - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 401: - throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError( - _response.error, - _response.rawResponse, - "PUT", - "/guardian/factors/push-notification/providers/fcmv1", - ); - } - - /** - * Modify configuration details of the multi-factor authentication FCMV1 provider associated with your tenant. - * - * @param {Management.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent} request - * @param {PushNotificationClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * - * @example - * await client.guardian.factors.pushNotification.updateFcmv1Provider() - */ - public updateFcmv1Provider( - request: Management.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent = {}, - requestOptions?: PushNotificationClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__updateFcmv1Provider(request, requestOptions)); - } - - private async __updateFcmv1Provider( - request: Management.UpdateGuardianFactorsProviderPushNotificationFcmv1RequestContent = {}, - requestOptions?: PushNotificationClient.RequestOptions, - ): Promise> { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -556,7 +313,7 @@ export class PushNotificationClient { }); if (_response.ok) { return { - data: _response.body as Management.UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent, + data: _response.body as Management.SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent, rawResponse: _response.rawResponse, }; } diff --git a/src/management/api/resources/hooks/client/Client.ts b/src/management/api/resources/hooks/client/Client.ts index c03c986df7..b386dde24b 100644 --- a/src/management/api/resources/hooks/client/Client.ts +++ b/src/management/api/resources/hooks/client/Client.ts @@ -66,25 +66,14 @@ export class HooksClient { fields, triggerId, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (enabled !== undefined) { - _queryParams["enabled"] = enabled?.toString() ?? null; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (triggerId !== undefined) { - _queryParams["triggerId"] = triggerId; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + enabled, + fields, + triggerId: triggerId !== undefined ? triggerId : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -274,11 +263,9 @@ export class HooksClient { requestOptions?: HooksClient.RequestOptions, ): Promise> { const { fields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - + const _queryParams: Record = { + fields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/index.ts b/src/management/api/resources/index.ts index e63df53f01..36311803af 100644 --- a/src/management/api/resources/index.ts +++ b/src/management/api/resources/index.ts @@ -14,7 +14,6 @@ export * as eventStreams from "./eventStreams/index.js"; export * from "./eventStreams/types/index.js"; export * as flows from "./flows/index.js"; export * as forms from "./forms/index.js"; -export * as groups from "./groups/index.js"; export * as guardian from "./guardian/index.js"; export * as hooks from "./hooks/index.js"; export * as jobs from "./jobs/index.js"; diff --git a/src/management/api/resources/jobs/resources/usersImports/client/Client.ts b/src/management/api/resources/jobs/resources/usersImports/client/Client.ts index e995d257dd..e30164a2d1 100644 --- a/src/management/api/resources/jobs/resources/usersImports/client/Client.ts +++ b/src/management/api/resources/jobs/resources/usersImports/client/Client.ts @@ -54,22 +54,22 @@ export class UsersImportsClient { request: Management.CreateImportUsersRequestContent, requestOptions?: UsersImportsClient.RequestOptions, ): Promise> { - const _request = await core.newFormData(); - await _request.appendFile("users", request.users); - _request.append("connection_id", request.connection_id); + const _body = await core.newFormData(); + await _body.appendFile("users", request.users); + _body.append("connection_id", request.connection_id); if (request.upsert != null) { - _request.append("upsert", request.upsert.toString()); + _body.append("upsert", request.upsert?.toString()); } if (request.external_id != null) { - _request.append("external_id", request.external_id); + _body.append("external_id", request.external_id); } if (request.send_completion_email != null) { - _request.append("send_completion_email", request.send_completion_email.toString()); + _body.append("send_completion_email", request.send_completion_email?.toString()); } - const _maybeEncodedRequest = await _request.getRequest(); + const _maybeEncodedRequest = await _body.getRequest(); const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/keys/resources/encryption/client/Client.ts b/src/management/api/resources/keys/resources/encryption/client/Client.ts index 8629a824ee..f85b946984 100644 --- a/src/management/api/resources/keys/resources/encryption/client/Client.ts +++ b/src/management/api/resources/keys/resources/encryption/client/Client.ts @@ -49,16 +49,11 @@ export class EncryptionClient { request: Management.ListEncryptionKeysRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/logs/client/Client.ts b/src/management/api/resources/logs/client/Client.ts index e04f7e3150..59d3eaab10 100644 --- a/src/management/api/resources/logs/client/Client.ts +++ b/src/management/api/resources/logs/client/Client.ts @@ -89,28 +89,15 @@ export class LogsClient { include_totals: includeTotals = true, search, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (sort !== undefined) { - _queryParams["sort"] = sort; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (search !== undefined) { - _queryParams["search"] = search; - } + const _queryParams: Record = { + page, + per_page: perPage, + sort, + fields, + include_fields: includeFields, + include_totals: includeTotals, + search, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/networkAcls/client/Client.ts b/src/management/api/resources/networkAcls/client/Client.ts index f8714af763..6001c4bd56 100644 --- a/src/management/api/resources/networkAcls/client/Client.ts +++ b/src/management/api/resources/networkAcls/client/Client.ts @@ -51,16 +51,11 @@ export class NetworkAclsClient { request: Management.ListNetworkAclsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/organizations/client/Client.ts b/src/management/api/resources/organizations/client/Client.ts index e7bda8ba4f..8eb5bbdc6a 100644 --- a/src/management/api/resources/organizations/client/Client.ts +++ b/src/management/api/resources/organizations/client/Client.ts @@ -97,16 +97,11 @@ export class OrganizationsClient { request: Management.ListOrganizationsRequestParameters, ): Promise> => { const { from: from_, take = 50, sort } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - if (sort !== undefined) { - _queryParams["sort"] = sort; - } + const _queryParams: Record = { + from: from_, + take, + sort, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/organizations/resources/clientGrants/client/Client.ts b/src/management/api/resources/organizations/resources/clientGrants/client/Client.ts index 638e67513a..adc3cad8ee 100644 --- a/src/management/api/resources/organizations/resources/clientGrants/client/Client.ts +++ b/src/management/api/resources/organizations/resources/clientGrants/client/Client.ts @@ -63,29 +63,14 @@ export class ClientGrantsClient { per_page: perPage = 50, include_totals: includeTotals = true, } = request; - const _queryParams: Record = {}; - if (audience !== undefined) { - _queryParams["audience"] = audience; - } - if (clientId !== undefined) { - _queryParams["client_id"] = clientId; - } - if (grantIds !== undefined) { - if (Array.isArray(grantIds)) { - _queryParams["grant_ids"] = grantIds.map((item) => item); - } else { - _queryParams["grant_ids"] = grantIds; - } - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + audience, + client_id: clientId, + grant_ids: grantIds, + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts b/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts index d37d704e77..7122b9ba1f 100644 --- a/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts +++ b/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts @@ -53,13 +53,10 @@ export class DiscoveryDomainsClient { request: Management.ListOrganizationDiscoveryDomainsRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -142,7 +139,7 @@ export class DiscoveryDomainsClient { } /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). + * Update the verification status for an organization discovery domain. The status field must be either pending or verified. * * @param {string} id - ID of the organization. * @param {Management.CreateOrganizationDiscoveryDomainRequestContent} request @@ -236,94 +233,6 @@ export class DiscoveryDomainsClient { ); } - /** - * Retrieve details about a single organization discovery domain specified by domain name. - * - * - * @param {string} id - ID of the organization. - * @param {string} discovery_domain - Domain name of the discovery domain. - * @param {DiscoveryDomainsClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * @throws {@link Management.NotFoundError} - * @throws {@link Management.TooManyRequestsError} - * - * @example - * await client.organizations.discoveryDomains.getByName("id", "discovery_domain") - */ - public getByName( - id: string, - discovery_domain: string, - requestOptions?: DiscoveryDomainsClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__getByName(id, discovery_domain, requestOptions)); - } - - private async __getByName( - id: string, - discovery_domain: string, - requestOptions?: DiscoveryDomainsClient.RequestOptions, - ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - `organizations/${core.url.encodePathParam(id)}/discovery-domains/name/${core.url.encodePathParam(discovery_domain)}`, - ), - method: "GET", - headers: _headers, - queryParameters: requestOptions?.queryParams, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.GetOrganizationDiscoveryDomainByNameResponseContent, - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 401: - throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 404: - throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError( - _response.error, - _response.rawResponse, - "GET", - "/organizations/{id}/discovery-domains/name/{discovery_domain}", - ); - } - /** * Retrieve details about a single organization discovery domain specified by ID. * @@ -493,7 +402,7 @@ export class DiscoveryDomainsClient { } /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). + * Update the verification status for an organization discovery domain. The status field must be either pending or verified. * * @param {string} id - ID of the organization. * @param {string} discovery_domain_id - ID of the discovery domain to update. diff --git a/src/management/api/resources/organizations/resources/enabledConnections/client/Client.ts b/src/management/api/resources/organizations/resources/enabledConnections/client/Client.ts index 2328cdacf0..c5eb68b431 100644 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/Client.ts +++ b/src/management/api/resources/organizations/resources/enabledConnections/client/Client.ts @@ -56,16 +56,11 @@ export class EnabledConnectionsClient { request: Management.ListOrganizationConnectionsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/organizations/resources/invitations/client/Client.ts b/src/management/api/resources/organizations/resources/invitations/client/Client.ts index 6fc1df020e..78559d1fa0 100644 --- a/src/management/api/resources/organizations/resources/invitations/client/Client.ts +++ b/src/management/api/resources/organizations/resources/invitations/client/Client.ts @@ -67,25 +67,14 @@ export class InvitationsClient { include_fields: includeFields, sort, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (sort !== undefined) { - _queryParams["sort"] = sort; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + fields, + include_fields: includeFields, + sort, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -300,15 +289,10 @@ export class InvitationsClient { requestOptions?: InvitationsClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/organizations/resources/members/client/Client.ts b/src/management/api/resources/organizations/resources/members/client/Client.ts index e2678be41f..7670139611 100644 --- a/src/management/api/resources/organizations/resources/members/client/Client.ts +++ b/src/management/api/resources/organizations/resources/members/client/Client.ts @@ -79,19 +79,12 @@ export class MembersClient { request: Management.ListOrganizationMembersRequestParameters, ): Promise> => { const { from: from_, take = 50, fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/organizations/resources/members/resources/roles/client/Client.ts b/src/management/api/resources/organizations/resources/members/resources/roles/client/Client.ts index 38693bb372..c9898824fa 100644 --- a/src/management/api/resources/organizations/resources/members/resources/roles/client/Client.ts +++ b/src/management/api/resources/organizations/resources/members/resources/roles/client/Client.ts @@ -58,16 +58,11 @@ export class RolesClient { request: Management.ListOrganizationMemberRolesRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/prompts/resources/rendering/client/Client.ts b/src/management/api/resources/prompts/resources/rendering/client/Client.ts index f8e42d942f..465221dfdd 100644 --- a/src/management/api/resources/prompts/resources/rendering/client/Client.ts +++ b/src/management/api/resources/prompts/resources/rendering/client/Client.ts @@ -49,7 +49,7 @@ export class RenderingClient { public async list( request: Management.ListAculsRequestParameters = {}, requestOptions?: RenderingClient.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListAculsRequestParameters, @@ -64,31 +64,16 @@ export class RenderingClient { screen, rendering_mode: renderingMode, } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (prompt !== undefined) { - _queryParams["prompt"] = prompt; - } - if (screen !== undefined) { - _queryParams["screen"] = screen; - } - if (renderingMode !== undefined) { - _queryParams["rendering_mode"] = renderingMode; - } + const _queryParams: Record = { + fields, + include_fields: includeFields, + page, + per_page: perPage, + include_totals: includeTotals, + prompt, + screen, + rendering_mode: renderingMode !== undefined ? renderingMode : undefined, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -154,10 +139,7 @@ export class RenderingClient { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Page< - Management.ListAculsResponseContentItem, - Management.ListAculsOffsetPaginatedResponseContent - >({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.configs ?? []).length >= Math.floor(request?.per_page ?? 50), diff --git a/src/management/api/resources/refreshTokens/client/Client.ts b/src/management/api/resources/refreshTokens/client/Client.ts index 77403d0ee1..d2a3577188 100644 --- a/src/management/api/resources/refreshTokens/client/Client.ts +++ b/src/management/api/resources/refreshTokens/client/Client.ts @@ -167,89 +167,4 @@ export class RefreshTokensClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/refresh-tokens/{id}"); } - - /** - * Update a refresh token by its ID. - * - * @param {string} id - ID of the refresh token to update. - * @param {Management.UpdateRefreshTokenRequestContent} request - * @param {RefreshTokensClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * @throws {@link Management.NotFoundError} - * @throws {@link Management.TooManyRequestsError} - * - * @example - * await client.refreshTokens.update("id") - */ - public update( - id: string, - request: Management.UpdateRefreshTokenRequestContent = {}, - requestOptions?: RefreshTokensClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); - } - - private async __update( - id: string, - request: Management.UpdateRefreshTokenRequestContent = {}, - requestOptions?: RefreshTokensClient.RequestOptions, - ): Promise> { - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - `refresh-tokens/${core.url.encodePathParam(id)}`, - ), - method: "PATCH", - headers: _headers, - contentType: "application/json", - queryParameters: requestOptions?.queryParams, - requestType: "json", - body: request, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.UpdateRefreshTokenResponseContent, - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); - case 401: - throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 404: - throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - - return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/refresh-tokens/{id}"); - } } diff --git a/src/management/api/resources/resourceServers/client/Client.ts b/src/management/api/resources/resourceServers/client/Client.ts index 5f4541b343..8bd116244f 100644 --- a/src/management/api/resources/resourceServers/client/Client.ts +++ b/src/management/api/resources/resourceServers/client/Client.ts @@ -56,26 +56,13 @@ export class ResourceServersClient { include_totals: includeTotals = true, include_fields: includeFields, } = request; - const _queryParams: Record = {}; - if (identifiers !== undefined) { - if (Array.isArray(identifiers)) { - _queryParams["identifiers"] = identifiers.map((item) => item); - } else { - _queryParams["identifiers"] = identifiers; - } - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } + const _queryParams: Record = { + identifiers, + page, + per_page: perPage, + include_totals: includeTotals, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -264,11 +251,9 @@ export class ResourceServersClient { requestOptions?: ResourceServersClient.RequestOptions, ): Promise> { const { include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/roles/client/Client.ts b/src/management/api/resources/roles/client/Client.ts index 2f1ffea80d..873900161a 100644 --- a/src/management/api/resources/roles/client/Client.ts +++ b/src/management/api/resources/roles/client/Client.ts @@ -69,19 +69,12 @@ export class RolesClient { include_totals: includeTotals = true, name_filter: nameFilter, } = request; - const _queryParams: Record = {}; - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (nameFilter !== undefined) { - _queryParams["name_filter"] = nameFilter; - } + const _queryParams: Record = { + per_page: perPage, + page, + include_totals: includeTotals, + name_filter: nameFilter, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/roles/resources/permissions/client/Client.ts b/src/management/api/resources/roles/resources/permissions/client/Client.ts index bd72a40588..1fe9d52800 100644 --- a/src/management/api/resources/roles/resources/permissions/client/Client.ts +++ b/src/management/api/resources/roles/resources/permissions/client/Client.ts @@ -54,16 +54,11 @@ export class PermissionsClient { request: Management.ListRolePermissionsRequestParameters, ): Promise> => { const { per_page: perPage = 50, page = 0, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + per_page: perPage, + page, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/roles/resources/users/client/Client.ts b/src/management/api/resources/roles/resources/users/client/Client.ts index d218e089a5..efafa44320 100644 --- a/src/management/api/resources/roles/resources/users/client/Client.ts +++ b/src/management/api/resources/roles/resources/users/client/Client.ts @@ -69,13 +69,10 @@ export class UsersClient { request: Management.ListRoleUsersRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/rules/client/Client.ts b/src/management/api/resources/rules/client/Client.ts index 9dc76a7354..d5cf2b6cf2 100644 --- a/src/management/api/resources/rules/client/Client.ts +++ b/src/management/api/resources/rules/client/Client.ts @@ -60,25 +60,14 @@ export class RulesClient { fields, include_fields: includeFields, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (enabled !== undefined) { - _queryParams["enabled"] = enabled?.toString() ?? null; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + enabled, + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -270,15 +259,10 @@ export class RulesClient { requestOptions?: RulesClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/selfServiceProfiles/client/Client.ts b/src/management/api/resources/selfServiceProfiles/client/Client.ts index cd314eced2..a9b814e861 100644 --- a/src/management/api/resources/selfServiceProfiles/client/Client.ts +++ b/src/management/api/resources/selfServiceProfiles/client/Client.ts @@ -61,16 +61,11 @@ export class SelfServiceProfilesClient { request: Management.ListSelfServiceProfilesRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/stats/client/Client.ts b/src/management/api/resources/stats/client/Client.ts index 09375344ff..357afdffd8 100644 --- a/src/management/api/resources/stats/client/Client.ts +++ b/src/management/api/resources/stats/client/Client.ts @@ -121,15 +121,10 @@ export class StatsClient { requestOptions?: StatsClient.RequestOptions, ): Promise> { const { from: from_, to } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - - if (to !== undefined) { - _queryParams["to"] = to; - } - + const _queryParams: Record = { + from: from_, + to, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/tenants/resources/settings/client/Client.ts b/src/management/api/resources/tenants/resources/settings/client/Client.ts index df7a3a7560..2e0fc64c83 100644 --- a/src/management/api/resources/tenants/resources/settings/client/Client.ts +++ b/src/management/api/resources/tenants/resources/settings/client/Client.ts @@ -51,15 +51,10 @@ export class SettingsClient { requestOptions?: SettingsClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/tokenExchangeProfiles/client/Client.ts b/src/management/api/resources/tokenExchangeProfiles/client/Client.ts index 5706552859..e9d1182f1f 100644 --- a/src/management/api/resources/tokenExchangeProfiles/client/Client.ts +++ b/src/management/api/resources/tokenExchangeProfiles/client/Client.ts @@ -60,13 +60,10 @@ export class TokenExchangeProfilesClient { request: Management.TokenExchangeProfilesListRequest, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/userAttributeProfiles/client/Client.ts b/src/management/api/resources/userAttributeProfiles/client/Client.ts index de13e7fcf8..6e0f4362c4 100644 --- a/src/management/api/resources/userAttributeProfiles/client/Client.ts +++ b/src/management/api/resources/userAttributeProfiles/client/Client.ts @@ -50,13 +50,10 @@ export class UserAttributeProfilesClient { request: Management.ListUserAttributeProfileRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/userBlocks/client/Client.ts b/src/management/api/resources/userBlocks/client/Client.ts index d2725fc4e4..daefe2013d 100644 --- a/src/management/api/resources/userBlocks/client/Client.ts +++ b/src/management/api/resources/userBlocks/client/Client.ts @@ -51,12 +51,10 @@ export class UserBlocksClient { requestOptions?: UserBlocksClient.RequestOptions, ): Promise> { const { identifier, consider_brute_force_enablement: considerBruteForceEnablement } = request; - const _queryParams: Record = {}; - _queryParams["identifier"] = identifier; - if (considerBruteForceEnablement !== undefined) { - _queryParams["consider_brute_force_enablement"] = considerBruteForceEnablement?.toString() ?? null; - } - + const _queryParams: Record = { + identifier, + consider_brute_force_enablement: considerBruteForceEnablement, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -138,8 +136,9 @@ export class UserBlocksClient { requestOptions?: UserBlocksClient.RequestOptions, ): Promise> { const { identifier } = request; - const _queryParams: Record = {}; - _queryParams["identifier"] = identifier; + const _queryParams: Record = { + identifier, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -220,11 +219,9 @@ export class UserBlocksClient { requestOptions?: UserBlocksClient.RequestOptions, ): Promise> { const { consider_brute_force_enablement: considerBruteForceEnablement } = request; - const _queryParams: Record = {}; - if (considerBruteForceEnablement !== undefined) { - _queryParams["consider_brute_force_enablement"] = considerBruteForceEnablement?.toString() ?? null; - } - + const _queryParams: Record = { + consider_brute_force_enablement: considerBruteForceEnablement, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/userGrants/client/Client.ts b/src/management/api/resources/userGrants/client/Client.ts index 6ebf013fa5..c1829327ad 100644 --- a/src/management/api/resources/userGrants/client/Client.ts +++ b/src/management/api/resources/userGrants/client/Client.ts @@ -58,25 +58,14 @@ export class UserGrantsClient { client_id: clientId, audience, } = request; - const _queryParams: Record = {}; - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (userId !== undefined) { - _queryParams["user_id"] = userId; - } - if (clientId !== undefined) { - _queryParams["client_id"] = clientId; - } - if (audience !== undefined) { - _queryParams["audience"] = audience; - } + const _queryParams: Record = { + per_page: perPage, + page, + include_totals: includeTotals, + user_id: userId, + client_id: clientId, + audience, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -171,8 +160,9 @@ export class UserGrantsClient { requestOptions?: UserGrantsClient.RequestOptions, ): Promise> { const { user_id: userId } = request; - const _queryParams: Record = {}; - _queryParams["user_id"] = userId; + const _queryParams: Record = { + user_id: userId, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/client/Client.ts b/src/management/api/resources/users/client/Client.ts index 0ca97dc13f..b3ec18f3a2 100644 --- a/src/management/api/resources/users/client/Client.ts +++ b/src/management/api/resources/users/client/Client.ts @@ -13,7 +13,6 @@ import { AuthenticatorsClient } from "../resources/authenticators/client/Client. import { ConnectedAccountsClient } from "../resources/connectedAccounts/client/Client.js"; import { EnrollmentsClient } from "../resources/enrollments/client/Client.js"; import { FederatedConnectionsTokensetsClient } from "../resources/federatedConnectionsTokensets/client/Client.js"; -import { GroupsClient } from "../resources/groups/client/Client.js"; import { IdentitiesClient } from "../resources/identities/client/Client.js"; import { LogsClient } from "../resources/logs/client/Client.js"; import { MultifactorClient } from "../resources/multifactor/client/Client.js"; @@ -37,7 +36,6 @@ export class UsersClient { protected _connectedAccounts: ConnectedAccountsClient | undefined; protected _enrollments: EnrollmentsClient | undefined; protected _federatedConnectionsTokensets: FederatedConnectionsTokensetsClient | undefined; - protected _groups: GroupsClient | undefined; protected _identities: IdentitiesClient | undefined; protected _logs: LogsClient | undefined; protected _multifactor: MultifactorClient | undefined; @@ -72,10 +70,6 @@ export class UsersClient { return (this._federatedConnectionsTokensets ??= new FederatedConnectionsTokensetsClient(this._options)); } - public get groups(): GroupsClient { - return (this._groups ??= new GroupsClient(this._options)); - } - public get identities(): IdentitiesClient { return (this._identities ??= new IdentitiesClient(this._options)); } @@ -171,37 +165,18 @@ export class UsersClient { search_engine: searchEngine, primary_order: primaryOrder, } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } - if (sort !== undefined) { - _queryParams["sort"] = sort; - } - if (connection !== undefined) { - _queryParams["connection"] = connection; - } - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (q !== undefined) { - _queryParams["q"] = q; - } - if (searchEngine !== undefined) { - _queryParams["search_engine"] = searchEngine; - } - if (primaryOrder !== undefined) { - _queryParams["primary_order"] = primaryOrder?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + sort, + connection, + fields, + include_fields: includeFields, + q, + search_engine: searchEngine !== undefined ? searchEngine : undefined, + primary_order: primaryOrder, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -396,16 +371,11 @@ export class UsersClient { requestOptions?: UsersClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields, email } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - - _queryParams["email"] = email; + const _queryParams: Record = { + fields, + include_fields: includeFields, + email, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, @@ -487,15 +457,10 @@ export class UsersClient { requestOptions?: UsersClient.RequestOptions, ): Promise> { const { fields, include_fields: includeFields } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - + const _queryParams: Record = { + fields, + include_fields: includeFields, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/authenticationMethods/client/Client.ts b/src/management/api/resources/users/resources/authenticationMethods/client/Client.ts index ec368233af..83fba64d2d 100644 --- a/src/management/api/resources/users/resources/authenticationMethods/client/Client.ts +++ b/src/management/api/resources/users/resources/authenticationMethods/client/Client.ts @@ -59,16 +59,11 @@ export class AuthenticationMethodsClient { core.WithRawResponse > => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/connectedAccounts/client/Client.ts b/src/management/api/resources/users/resources/connectedAccounts/client/Client.ts index a0189be708..51c579ccc8 100644 --- a/src/management/api/resources/users/resources/connectedAccounts/client/Client.ts +++ b/src/management/api/resources/users/resources/connectedAccounts/client/Client.ts @@ -50,13 +50,10 @@ export class ConnectedAccountsClient { request: Management.GetUserConnectedAccountsRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/groups/client/Client.ts b/src/management/api/resources/users/resources/groups/client/Client.ts deleted file mode 100644 index 5ae5d67540..0000000000 --- a/src/management/api/resources/users/resources/groups/client/Client.ts +++ /dev/null @@ -1,138 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; -import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js"; -import * as core from "../../../../../../core/index.js"; -import { mergeHeaders } from "../../../../../../core/headers.js"; -import * as environments from "../../../../../../environments.js"; -import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.js"; -import * as errors from "../../../../../../errors/index.js"; -import * as Management from "../../../../../index.js"; - -export declare namespace GroupsClient { - export type Options = BaseClientOptions; - - export interface RequestOptions extends BaseRequestOptions {} -} - -export class GroupsClient { - protected readonly _options: NormalizedClientOptionsWithAuth; - - constructor(options: GroupsClient.Options) { - this._options = normalizeClientOptionsWithAuth(options); - } - - /** - * List all groups to which this user belongs. - * - * @param {string} id - ID of the user to list groups for. - * @param {Management.GetUserGroupsRequestParameters} request - * @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @throws {@link Management.BadRequestError} - * @throws {@link Management.UnauthorizedError} - * @throws {@link Management.ForbiddenError} - * @throws {@link Management.TooManyRequestsError} - * - * @example - * await client.users.groups.get("id", { - * fields: "fields", - * include_fields: true, - * from: "from", - * take: 1 - * }) - */ - public async get( - id: string, - request: Management.GetUserGroupsRequestParameters = {}, - requestOptions?: GroupsClient.RequestOptions, - ): Promise> { - const list = core.HttpResponsePromise.interceptFunction( - async ( - request: Management.GetUserGroupsRequestParameters, - ): Promise> => { - const { fields, include_fields: includeFields, from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (fields !== undefined) { - _queryParams["fields"] = fields; - } - if (includeFields !== undefined) { - _queryParams["include_fields"] = includeFields?.toString() ?? null; - } - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.ManagementEnvironment.Default, - `users/${core.url.encodePathParam(id)}/groups`, - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: _response.body as Management.GetUserGroupsPaginatedResponseContent, - rawResponse: _response.rawResponse, - }; - } - if (_response.error.reason === "status-code") { - switch (_response.error.statusCode) { - case 400: - throw new Management.BadRequestError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 401: - throw new Management.UnauthorizedError( - _response.error.body as unknown, - _response.rawResponse, - ); - case 403: - throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); - case 429: - throw new Management.TooManyRequestsError( - _response.error.body as unknown, - _response.rawResponse, - ); - default: - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - } - return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/users/{id}/groups"); - }, - ); - const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Page({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => - response?.next != null && !(typeof response?.next === "string" && response?.next === ""), - getItems: (response) => response?.groups ?? [], - loadPage: (response) => { - return list(core.setObjectProperty(request, "from", response?.next)); - }, - }); - } -} diff --git a/src/management/api/resources/users/resources/groups/client/index.ts b/src/management/api/resources/users/resources/groups/client/index.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/src/management/api/resources/users/resources/groups/client/index.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/management/api/resources/users/resources/groups/index.ts b/src/management/api/resources/users/resources/groups/index.ts deleted file mode 100644 index 914b8c3c72..0000000000 --- a/src/management/api/resources/users/resources/groups/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./client/index.js"; diff --git a/src/management/api/resources/users/resources/index.ts b/src/management/api/resources/users/resources/index.ts index b9845025b5..3e20e5442f 100644 --- a/src/management/api/resources/users/resources/index.ts +++ b/src/management/api/resources/users/resources/index.ts @@ -3,7 +3,6 @@ export * as authenticators from "./authenticators/index.js"; export * as connectedAccounts from "./connectedAccounts/index.js"; export * as enrollments from "./enrollments/index.js"; export * as federatedConnectionsTokensets from "./federatedConnectionsTokensets/index.js"; -export * as groups from "./groups/index.js"; export * as identities from "./identities/index.js"; export * as logs from "./logs/index.js"; export * as multifactor from "./multifactor/index.js"; diff --git a/src/management/api/resources/users/resources/logs/client/Client.ts b/src/management/api/resources/users/resources/logs/client/Client.ts index aeba5d6206..0cfaedf6a9 100644 --- a/src/management/api/resources/users/resources/logs/client/Client.ts +++ b/src/management/api/resources/users/resources/logs/client/Client.ts @@ -58,19 +58,12 @@ export class LogsClient { request: Management.ListUserLogsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, sort, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (sort !== undefined) { - _queryParams["sort"] = sort; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + sort, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/organizations/client/Client.ts b/src/management/api/resources/users/resources/organizations/client/Client.ts index 2c87573b56..32e1795aba 100644 --- a/src/management/api/resources/users/resources/organizations/client/Client.ts +++ b/src/management/api/resources/users/resources/organizations/client/Client.ts @@ -50,16 +50,11 @@ export class OrganizationsClient { request: Management.ListUserOrganizationsRequestParameters, ): Promise> => { const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + page, + per_page: perPage, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/permissions/client/Client.ts b/src/management/api/resources/users/resources/permissions/client/Client.ts index faf53192f8..e712a12704 100644 --- a/src/management/api/resources/users/resources/permissions/client/Client.ts +++ b/src/management/api/resources/users/resources/permissions/client/Client.ts @@ -54,16 +54,11 @@ export class PermissionsClient { request: Management.ListUserPermissionsRequestParameters, ): Promise> => { const { per_page: perPage = 50, page = 0, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + per_page: perPage, + page, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/refreshToken/client/Client.ts b/src/management/api/resources/users/resources/refreshToken/client/Client.ts index 91c5cb1f8b..0a2bfb8fcf 100644 --- a/src/management/api/resources/users/resources/refreshToken/client/Client.ts +++ b/src/management/api/resources/users/resources/refreshToken/client/Client.ts @@ -52,13 +52,10 @@ export class RefreshTokenClient { request: Management.ListRefreshTokensRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/roles/client/Client.ts b/src/management/api/resources/users/resources/roles/client/Client.ts index fcd9d3dc37..0792728ffb 100644 --- a/src/management/api/resources/users/resources/roles/client/Client.ts +++ b/src/management/api/resources/users/resources/roles/client/Client.ts @@ -52,16 +52,11 @@ export class RolesClient { request: Management.ListUserRolesRequestParameters, ): Promise> => { const { per_page: perPage = 50, page = 0, include_totals: includeTotals = true } = request; - const _queryParams: Record = {}; - if (perPage !== undefined) { - _queryParams["per_page"] = perPage?.toString() ?? null; - } - if (page !== undefined) { - _queryParams["page"] = page?.toString() ?? null; - } - if (includeTotals !== undefined) { - _queryParams["include_totals"] = includeTotals?.toString() ?? null; - } + const _queryParams: Record = { + per_page: perPage, + page, + include_totals: includeTotals, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/users/resources/sessions/client/Client.ts b/src/management/api/resources/users/resources/sessions/client/Client.ts index 3bf2b72176..09f8dce396 100644 --- a/src/management/api/resources/users/resources/sessions/client/Client.ts +++ b/src/management/api/resources/users/resources/sessions/client/Client.ts @@ -50,13 +50,10 @@ export class SessionsClient { request: Management.ListUserSessionsRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.ts index 57d97af3e7..1a6d09893a 100644 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.ts +++ b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.ts @@ -56,13 +56,10 @@ export class TemplatesClient { request: Management.ListVerifiableCredentialTemplatesRequestParameters, ): Promise> => { const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ !== undefined) { - _queryParams["from"] = from_; - } - if (take !== undefined) { - _queryParams["take"] = take?.toString() ?? null; - } + const _queryParams: Record = { + from: from_, + take, + }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, diff --git a/src/management/api/types/types.ts b/src/management/api/types/types.ts index 77c022d8a8..670d8b8752 100644 --- a/src/management/api/types/types.ts +++ b/src/management/api/types/types.ts @@ -327,12 +327,6 @@ export const OauthScope = { /** * Read Group Members */ ReadGroupMembers: "read:group_members", - /** - * Create Group Roles */ - CreateGroupRoles: "create:group_roles", - /** - * Delete Group Roles */ - DeleteGroupRoles: "delete:group_roles", /** * Create Guardian Enrollment Tickets */ CreateGuardianEnrollmentTickets: "create:guardian_enrollment_tickets", @@ -546,9 +540,6 @@ export const OauthScope = { /** * Read Refresh Tokens */ ReadRefreshTokens: "read:refresh_tokens", - /** - * Update Refresh Tokens */ - UpdateRefreshTokens: "update:refresh_tokens", /** * Delete Refresh Tokens */ DeleteRefreshTokens: "delete:refresh_tokens", @@ -795,8 +786,6 @@ export interface Action { built_at?: string; /** True if the action should be deployed after creation. */ deploy?: boolean; - /** The list of action modules and their versions used by this action. */ - modules?: Management.ActionModuleReference[]; } /** @@ -910,8 +899,6 @@ export interface ActionDeployedVersion { updated_at?: string; /** The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. */ supported_triggers?: Management.ActionTrigger[]; - /** The list of action modules and their versions used by this action version. */ - modules?: Management.ActionModuleReference[]; } /** @@ -947,20 +934,6 @@ export const ActionExecutionStatusEnum = { } as const; export type ActionExecutionStatusEnum = (typeof ActionExecutionStatusEnum)[keyof typeof ActionExecutionStatusEnum]; -/** - * Reference to a module and its version used by an action. - */ -export interface ActionModuleReference { - /** The unique ID of the module. */ - module_id?: string; - /** The name of the module. */ - module_name?: string; - /** The ID of the specific module version. */ - module_version_id?: string; - /** The version number of the module. */ - module_version_number?: number; -} - export interface ActionSecretRequest { /** The name of the particular secret, e.g. API_KEY. */ name?: string; @@ -1036,8 +1009,6 @@ export interface ActionVersion { updated_at?: string; /** The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. */ supported_triggers?: Management.ActionTrigger[]; - /** The list of action modules and their versions used by this action version. */ - modules?: Management.ActionModuleReference[]; } /** The build status of this specific version. */ @@ -1088,12 +1059,9 @@ export interface AculConfigsItem { screen: Management.ScreenGroupNameEnum; rendering_mode?: Management.AculRenderingModeEnum; context_configuration?: Management.AculContextConfiguration; - /** Override Universal Login default head tags */ - default_head_tags_disabled?: boolean | null; - /** Use page template with ACUL */ - use_page_template?: boolean | null; - /** An array of head tags */ - head_tags?: Management.AculHeadTag[]; + default_head_tags_disabled?: (Management.AculDefaultHeadTagsDisabled | undefined) | null; + use_page_template?: (Management.AculUsePageTemplate | undefined) | null; + head_tags?: Management.AculHeadTags; filters?: Management.AculFilters | null; } @@ -1135,6 +1103,11 @@ export const AculContextEnum = { } as const; export type AculContextEnum = (typeof AculContextEnum)[keyof typeof AculContextEnum]; +/** + * Override Universal Login default head tags + */ +export type AculDefaultHeadTagsDisabled = (boolean | null) | undefined; + /** * Domains array filter items */ @@ -1187,6 +1160,11 @@ export type AculHeadTagAttributes = Record; */ export type AculHeadTagContent = string; +/** + * An array of head tags + */ +export type AculHeadTags = Management.AculHeadTag[]; + /** Type of match to apply */ export const AculMatchTypeEnum = { IncludesAny: "includes_any", @@ -1222,6 +1200,26 @@ export const AculRenderingModeEnum = { } as const; export type AculRenderingModeEnum = (typeof AculRenderingModeEnum)[keyof typeof AculRenderingModeEnum]; +export interface AculResponseContent { + rendering_mode?: Management.AculRenderingModeEnum; + /** Context values to make available */ + context_configuration?: string[]; + /** Override Universal Login default head tags */ + default_head_tags_disabled?: boolean | null; + /** Use page template with ACUL */ + use_page_template?: boolean | null; + /** An array of head tags */ + head_tags?: Management.AculHeadTag[]; + filters?: Management.AculFilters | null; + /** Accepts any additional properties */ + [key: string]: any; +} + +/** + * Use page template with ACUL + */ +export type AculUsePageTemplate = (boolean | null) | undefined; + export interface AddOrganizationConnectionResponseContent { /** ID of the connection. */ connection_id?: string; @@ -1798,18 +1796,6 @@ export interface BulkUpdateAculResponseContent { [key: string]: any; } -export interface CertificateSubjectDnCredential { - credential_type: Management.CertificateSubjectDnCredentialTypeEnum; - /** Friendly name for a credential. */ - name?: string; - /** Subject Distinguished Name. Mutually exclusive with `pem` property. Applies to `cert_subject_dn` credential type. */ - subject_dn?: string; - /** PEM-formatted X509 certificate. Must be JSON escaped. Mutually exclusive with `subject_dn` property. */ - pem?: string; -} - -export type CertificateSubjectDnCredentialTypeEnum = "cert_subject_dn"; - /** * The user's identity. If you set this value, you must also send the user_id parameter. */ @@ -2373,47 +2359,27 @@ export type ClientAsyncApprovalNotificationsChannelsApiPostConfiguration = * Defines client authentication methods. */ export interface ClientAuthenticationMethod { - private_key_jwt?: Management.ClientAuthenticationMethodPrivateKeyJwt; + private_key_jwt?: Management.PrivateKeyJwt; tls_client_auth?: Management.ClientAuthenticationMethodTlsClientAuth; self_signed_tls_client_auth?: Management.ClientAuthenticationMethodSelfSignedTlsClientAuth; } -/** - * Defines `private_key_jwt` client authentication method. If this property is defined, the client is enabled to use the Private Key JWT authentication method. - */ -export interface ClientAuthenticationMethodPrivateKeyJwt { - credentials: Management.ClientAuthenticationMethodPrivateKeyJwtCredentials; -} - -/** - * A list of unique and previously created credential IDs enabled on the client for Private Key JWT authentication. - */ -export type ClientAuthenticationMethodPrivateKeyJwtCredentials = Management.CredentialId[]; - /** * Defines `self_signed_tls_client_auth` client authentication method. If the property is defined, the client is configured to use mTLS authentication method utilizing self-signed certificate. */ export interface ClientAuthenticationMethodSelfSignedTlsClientAuth { - credentials: Management.ClientAuthenticationMethodSelfSignedTlsClientAuthCredentials; + /** A list of unique and previously created credential IDs enabled on the client for mTLS authentication utilizing self-signed certificate. */ + credentials: Management.CredentialId[]; } -/** - * A list of unique and previously created credential IDs enabled on the client for mTLS authentication utilizing self-signed certificate. - */ -export type ClientAuthenticationMethodSelfSignedTlsClientAuthCredentials = Management.CredentialId[]; - /** * Defines `tls_client_auth` client authentication method. If the property is defined, the client is configured to use CA-based mTLS authentication method. */ export interface ClientAuthenticationMethodTlsClientAuth { - credentials: Management.ClientAuthenticationMethodTlsClientAuthCredentials; + /** A list of unique and previously created credential IDs enabled on the client for CA-based mTLS authentication. */ + credentials: Management.CredentialId[]; } -/** - * A list of unique and previously created credential IDs enabled on the client for CA-based mTLS authentication. - */ -export type ClientAuthenticationMethodTlsClientAuthCredentials = Management.CredentialId[]; - /** Defines the compliance level for this client, which may restrict it's capabilities */ export const ClientComplianceLevelEnum = { None: "none", @@ -2428,35 +2394,11 @@ export type ClientComplianceLevelEnum = (typeof ClientComplianceLevelEnum)[keyof * Defines client authentication methods. */ export interface ClientCreateAuthenticationMethod { - private_key_jwt?: Management.ClientCreateAuthenticationMethodPrivateKeyJwt; - tls_client_auth?: Management.ClientCreateAuthenticationMethodTlsClientAuth; - self_signed_tls_client_auth?: Management.CreateClientAuthenticationMethodSelfSignedTlsClientAuth; -} - -/** - * Defines `private_key_jwt` client authentication method. If this property is defined, the client is enabled to use the Private Key JWT authentication method. - */ -export interface ClientCreateAuthenticationMethodPrivateKeyJwt { - credentials: Management.ClientCreateAuthenticationMethodPrivateKeyJwtCredentials; -} - -/** - * Fully defined credentials that will be enabled on the client for Private Key JWT authentication. - */ -export type ClientCreateAuthenticationMethodPrivateKeyJwtCredentials = Management.PublicKeyCredential[]; - -/** - * Defines `tls_client_auth` client authentication method. If the property is defined, the client is configured to use CA-based mTLS authentication method. - */ -export interface ClientCreateAuthenticationMethodTlsClientAuth { - credentials: Management.ClientCreateAuthenticationMethodTlsClientAuthCredentials; + private_key_jwt?: Management.PrivateKeyJwt; + tls_client_auth?: Management.ClientAuthenticationMethodTlsClientAuth; + self_signed_tls_client_auth?: Management.ClientAuthenticationMethodSelfSignedTlsClientAuth; } -/** - * Fully defined credentials that will be enabled on the client for CA-based mTLS authentication. - */ -export type ClientCreateAuthenticationMethodTlsClientAuthCredentials = Management.CertificateSubjectDnCredential[]; - export interface ClientCredential { /** ID of the credential. Generated on creation. */ id?: string; @@ -2745,15 +2687,6 @@ export interface ClientRefreshTokenConfiguration { idle_token_lifetime?: number; /** Prevents tokens from expiring without use when `true` (takes precedence over `idle_token_lifetime` values) */ infinite_idle_token_lifetime?: boolean; - /** A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers */ - policies?: Management.ClientRefreshTokenPolicy[]; -} - -export interface ClientRefreshTokenPolicy { - /** The identifier of the resource server to which the Multi Resource Refresh Token Policy applies */ - audience: string; - /** The resource server permissions granted under the Multi Resource Refresh Token Policy, defining the context in which an access token can be used */ - scope: string[]; } export const ClientSessionTransferAllowedAuthenticationMethodsEnum = { @@ -2767,20 +2700,20 @@ export type ClientSessionTransferAllowedAuthenticationMethodsEnum = * Native to Web SSO Configuration */ export interface ClientSessionTransferConfiguration { - /** Indicates whether an app can issue a Session Transfer Token through Token Exchange. If set to 'false', the app will not be able to issue a Session Transfer Token. Usually configured in the native application. Default value is `false`. */ + /** Indicates whether an app can issue a Session Transfer Token through Token Exchange. If set to 'false', the app will not be able to issue a Session Transfer Token. Usually configured in the native application. */ can_create_session_transfer_token?: boolean; - /** Indicates whether revoking the parent Refresh Token that initiated a Native to Web flow and was used to issue a Session Transfer Token should trigger a cascade revocation affecting its dependent child entities. Usually configured in the native application. Default value is `true`, applicable only in Native to Web SSO context. */ + /** Indicates whether revoking the parent Refresh Token that initiated a Native to Web flow and was used to issue a Session Transfer Token should trigger a cascade revocation affecting its dependent child entities. Usually configured in the native application. */ enforce_cascade_revocation?: boolean; - /** Indicates whether an app can create a session from a Session Transfer Token received via indicated methods. Can include `cookie` and/or `query`. Usually configured in the web application. Default value is an empty array []. */ + /** Indicates whether an app can create a session from a Session Transfer Token received via indicated methods. Can include `cookie` and/or `query`. Usually configured in the web application. */ allowed_authentication_methods?: Management.ClientSessionTransferAllowedAuthenticationMethodsEnum[]; enforce_device_binding?: Management.ClientSessionTransferDeviceBindingEnum; - /** Indicates whether Refresh Tokens are allowed to be issued when authenticating with a Session Transfer Token. Usually configured in the web application. Default value is `false`. */ + /** Indicates whether Refresh Tokens are allowed to be issued when authenticating with a Session Transfer Token. Usually configured in the web application. */ allow_refresh_token?: boolean; - /** Indicates whether Refresh Tokens created during a Native to Web session are tied to that session's lifetime. This determines if such refresh tokens should be automatically revoked when their corresponding sessions are. Usually configured in the web application. Default value is `true`, applicable only in Native to Web SSO context. */ + /** Indicates whether Refresh Tokens created during a native-to-web session are tied to that session's lifetime. This determines if such refresh tokens should be automatically revoked when their corresponding sessions are. Usually configured in the web application. */ enforce_online_refresh_tokens?: boolean; } -/** Indicates whether device binding security should be enforced for the app. If set to 'ip', the app will enforce device binding by IP, meaning that consumption of Session Transfer Token must be done from the same IP of the issuer. Likewise, if set to 'asn', device binding is enforced by ASN, meaning consumption of Session Transfer Token must be done from the same ASN as the issuer. If set to 'none', device binding is not enforced. Usually configured in the web application. Default value is `ip`. */ +/** Indicates whether device binding security should be enforced for the app. If set to 'ip', the app will enforce device binding by IP, meaning that consumption of Session Transfer Token must be done from the same IP of the issuer. Likewise, if set to 'asn', device binding is enforced by ASN, meaning consumption of Session Transfer Token must be done from the same ASN as the issuer. If set to 'null', device binding is not enforced. Usually configured in the web application. */ export const ClientSessionTransferDeviceBindingEnum = { Ip: "ip", Asn: "asn", @@ -2887,33 +2820,11 @@ export type ConnectedAccountAccessTypeEnum = "offline"; */ export type ConnectionAcrValuesSupported = string[]; -/** - * Expiration timestamp for the `admin_access_token` in ISO 8601 format. Auth0 uses this value to determine when to refresh the token. - */ -export type ConnectionAdminAccessTokenExpiresInGoogleApps = string; - -/** - * Google Workspace admin access token used to retrieve extended user attributes (such as group memberships, admin status, and suspension state) from the [Google Directory API](https://developers.google.com/admin-sdk/directory). This token is automatically managed by Auth0. - */ -export type ConnectionAdminAccessTokenGoogleApps = string; - -/** - * Google Workspace admin refresh token used to obtain new access tokens for the [Google Directory API](https://developers.google.com/admin-sdk/directory). This token is granted when a Google Workspace admin authorizes Auth0 to access directory data. - */ -export type ConnectionAdminRefreshTokenGoogleApps = string; - /** * List of allowed audiences in the ID token for Google Native Social Login */ export type ConnectionAllowedAudiencesGoogleOAuth2 = string[]; -export type ConnectionApiEnableUsers = boolean; - -/** - * Enables integration with the Google Workspace Admin SDK Directory API. When true, Auth0 can retrieve extended user attributes (admin status, suspension status, group memberships) and supports inbound directory provisioning (SCIM). Defaults to true. - */ -export type ConnectionApiEnableUsersGoogleApps = Management.ConnectionApiEnableUsers; - /** * The Azure AD application domain (e.g., 'contoso.onmicrosoft.com'). Used primarily with WS-Federation protocol and Azure AD v1 endpoints. */ @@ -2922,7 +2833,6 @@ export type ConnectionAppDomainAzureAd = string; export interface ConnectionAttributeIdentifier { /** Determines if the attribute is used for identification */ active?: boolean; - default_method?: Management.DefaultMethodEmailIdentifierEnum; } /** @@ -2967,11 +2877,6 @@ export interface ConnectionAttributes { */ export type ConnectionAuthParamsAdditionalPropertiesOAuth2 = string; -/** - * Authentication Parameters (must be valid JSON string) - */ -export type ConnectionAuthParamsEmail = string; - /** * Maps parameter names from Auth0's /authorize endpoint to the identity provider's authorization endpoint parameters. For example, mapping 'audience' to 'resource' transforms the parameter name during authorization requests. Applied after authParams merging. See https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2#pass-dynamic-parameters */ @@ -2988,8 +2893,6 @@ export type ConnectionAuthParamsOAuth2 = Record; -/** - * Maps SAML assertion attributes from the identity provider to Auth0 user profile attributes. Format: { 'auth0_field': 'saml_attribute' } or { 'auth0_field': ['saml_attr1', 'saml_attr2'] } for fallback options. Merged with default mappings for email, name, given_name, family_name, and groups. - */ -export type ConnectionFieldsMapSaml = Record; - -export namespace ConnectionFieldsMapSaml { - export type Value = string | string[]; -} - export interface ConnectionForList { /** The name of the connection */ name?: string; @@ -3403,21 +3173,11 @@ export interface ConnectionForOrganization { is_signup_enabled?: boolean; } -/** - * When set to true, the gateway receives HTTP request details including IP address and User Agent from the client. - */ -export type ConnectionForwardReqInfoSms = boolean; - /** * Array of custom OAuth 2.0 scopes to request from Google during authentication. Use this to request scopes not covered by the predefined scope options. */ export type ConnectionFreeformScopesGoogleOAuth2 = Management.ConnectionScopeArray; -/** - * The sender phone number or alphanumeric sender ID for outgoing SMS messages - */ -export type ConnectionFromSms = string; - /** * Token-based authentication settings to be applied when connection is using an sms strategy. */ @@ -3436,88 +3196,25 @@ export interface ConnectionGatewayAuthentication { [key: string]: any; } -/** - * `aud` claim value in the JWT sent to the SMS gateway. Identifies the gateway service (e.g., 'urn:MySmsGateway'). - */ -export type ConnectionGatewayAuthenticationAudienceSms = string; - -/** - * The Authorization header type when calling the SMS gateway. Set to 'bearer' for JWT token authentication. - */ -export type ConnectionGatewayAuthenticationMethodSms = string; - -/** - * Optional token-based authentication configuration for the SMS gateway - */ -export interface ConnectionGatewayAuthenticationSms { - audience: Management.ConnectionGatewayAuthenticationAudienceSms; - method: Management.ConnectionGatewayAuthenticationMethodSms; - /** The secret used to sign the JSON Web Token sent to the SMS gateway */ - secret: string; - /** Set to true if the secret is base64-url-encoded */ - secret_base64_encoded?: boolean; - subject?: Management.ConnectionGatewayAuthenticationSubjectSms; - /** Accepts any additional properties */ - [key: string]: any; -} - -/** - * `sub` claim value in the JWT sent to the SMS gateway. Identifies the requester (e.g., 'urn:Auth0'). - */ -export type ConnectionGatewayAuthenticationSubjectSms = string; - -/** - * The URL of your SMS gateway. Auth0 must be able to reach this URL for it to use your gateway to send messages on your behalf. - */ -export type ConnectionGatewayUrlSms = Management.ConnectionHttpsUrlWithHttpFallback255; - -/** - * Expected 'iss' (Issuer) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT issuer matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_sub. - */ -export type ConnectionGlobalTokenRevocationJwtIssSaml = string; - -/** - * Expected 'sub' (Subject) claim value for JWT tokens in Global Token Revocation requests from the identity provider. When configured, Auth0 validates the JWT subject matches this value before processing token revocation. Must be used together with global_token_revocation_jwt_iss. - */ -export type ConnectionGlobalTokenRevocationJwtSubSaml = string; - /** * A list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. */ export type ConnectionGrantTypesSupported = string[]; -/** - * When enabled, users who sign in with their Google account through a social login will be automatically routed to this Google Workspace connection if their email domain matches the configured tenant_domain or domain_aliases. This ensures enterprise users authenticate through their organization's Google Workspace identity provider rather than through a generic Google social login, enabling access to directory-based attributes and enforcing organizational security policies. Defaults to true for new connections. - */ -export type ConnectionHandleLoginFromSocialGoogleApps = boolean; - export type ConnectionHttpsUrlWithHttpFallback = string; -export type ConnectionHttpsUrlWithHttpFallback2048 = Management.ConnectionHttpsUrlWithHttpFallback; - -export type ConnectionHttpsUrlWithHttpFallback255 = Management.ConnectionHttpsUrlWithHttpFallback; - /** * https url of the icon to be shown */ export type ConnectionIconUrl = string; -export type ConnectionIconUrlAdfs = Management.ConnectionIconUrl; - /** * URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. */ export type ConnectionIconUrlAzureAd = Management.ConnectionIconUrl; -export type ConnectionIconUrlGoogleApps = Management.ConnectionIconUrl; - export type ConnectionIconUrlGoogleOAuth2 = Management.ConnectionIconUrl; -/** - * URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. - */ -export type ConnectionIconUrlSaml = Management.ConnectionIconUrl; - /** * The connection's identifier */ @@ -3660,9 +3357,9 @@ export type ConnectionImportMode = boolean; */ export type ConnectionIsDomainConnection = boolean; -export type ConnectionIssuer = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionIssuer = Management.ConnectionHttpsUrlWithHttpFallback; -export type ConnectionJwksUri = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionJwksUri = Management.ConnectionHttpsUrlWithHttpFallback; export interface ConnectionKey { /** The key id of the signing key */ @@ -3719,31 +3416,6 @@ export type ConnectionMappingModeEnumOkta = */ export type ConnectionMaxGroupsToRetrieve = string; -/** - * Twilio Messaging Service SID - */ -export type ConnectionMessagingServiceSidSms = string; - -/** - * HTTPS URL to the identity provider's SAML metadata document. When provided, Auth0 automatically fetches and parses the metadata to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Use metadataUrl OR metadataXml, not both. - */ -export type ConnectionMetadataUrlSaml = Management.ConnectionHttpsUrlWithHttpFallback2048; - -/** - * Standard IdP metadata XML payload used across SAML-compatible strategies. - */ -export type ConnectionMetadataXml = string; - -/** - * Inline XML alternative to 'adfs_server'. Cannot be set together with 'adfs_server'. - */ -export type ConnectionMetadataXmlAdfs = Management.ConnectionMetadataXml; - -/** - * SAML metadata XML document from the identity provider. When provided, automatically parsed to extract signInEndpoint, signOutEndpoint, signingCert, signSAMLRequest, and protocolBinding. Deleted after parsing to avoid persisting large documents. Not persisted to database - deleted after parsing metadata. Use metadataUrl OR metadataXml, not both. - */ -export type ConnectionMetadataXmlSaml = Management.ConnectionMetadataXml; - /** * Multi-factor authentication configuration */ @@ -3769,9 +3441,9 @@ export type ConnectionNamePrefixTemplate = string; */ export type ConnectionNonPersistentAttrs = string[]; -export type ConnectionOpPolicyUri = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionOpPolicyUri = Management.ConnectionHttpsUrlWithHttpFallback; -export type ConnectionOpTosUri = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionOpTosUri = Management.ConnectionHttpsUrlWithHttpFallback; /** * In order to return options in the response, the `read:connections_options` scope must be present @@ -3786,27 +3458,7 @@ export type ConnectionOptionsAd = Record; /** * Options for the 'adfs' connection */ -export interface ConnectionOptionsAdfs extends Management.ConnectionOptionsCommon { - /** ADFS federation metadata host or XML URL used to discover WS-Fed endpoints and certificates. Errors if adfs_server and fedMetadataXml are both absent. */ - adfs_server?: string; - domain_aliases?: Management.ConnectionDomainAliases; - /** The entity identifier (Issuer) for the ADFS Service Provider. When not provided, defaults to 'urn:auth0:{tenant}:{connection}'. */ - entityId?: string; - fedMetadataXml?: Management.ConnectionMetadataXmlAdfs; - icon_url?: Management.ConnectionIconUrlAdfs; - /** Previous certificate thumbprints kept for rollover compatibility. */ - prev_thumbprints?: Management.ConnectionThumbprints; - set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; - should_trust_email_verified_connection?: Management.ConnectionShouldTrustEmailVerifiedConnectionEnum; - signInEndpoint?: Management.ConnectionSignInEndpointAdfs; - tenant_domain?: Management.ConnectionTenantDomain; - thumbprints?: Management.ConnectionThumbprints; - upstream_params?: (Management.ConnectionUpstreamParamsAdfs | undefined) | null; - /** Custom ADFS claim to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single ADFS claim name). */ - user_id_attribute?: string; - /** Accepts any additional properties */ - [key: string]: any; -} +export type ConnectionOptionsAdfs = Record; export type ConnectionOptionsAol = Management.ConnectionOptionsOAuth2Common; @@ -3834,8 +3486,6 @@ export interface ConnectionOptionsApple extends Management.ConnectionOptionsComm /** Apple Team ID */ team_id?: string | null; upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; - /** Accepts any additional properties */ - [key: string]: any; } /** @@ -3863,8 +3513,6 @@ export interface ConnectionOptionsAuth0 extends Management.ConnectionOptionsComm realm_fallback?: Management.ConnectionRealmFallback; requires_username?: Management.ConnectionRequiresUsername; validation?: Management.ConnectionValidationOptions | null; - /** Accepts any additional properties */ - [key: string]: any; } /** @@ -3917,7 +3565,7 @@ export interface ConnectionOptionsAzureAd extends Management.ConnectionOptionsCo ext_given_name?: boolean; /** When false, prevents storing the list of Azure AD group IDs the user is a member of. When true (default), group membership IDs are persisted. See ext_groups for retrieving group details. */ ext_group_ids?: boolean; - ext_groups?: Management.ConnectionExtGroupsAzureAd; + ext_groups?: Management.ConnectionExtGroups; ext_is_suspended?: Management.ConnectionExtIsSuspended; /** When false, prevents storing the user's job title from Azure AD. When true (default), job title information is persisted in the user profile. */ ext_job_title?: boolean; @@ -3980,14 +3628,12 @@ export interface ConnectionOptionsAzureAd extends Management.ConnectionOptionsCo tenant_domain?: Management.ConnectionTenantDomainAzureAdOne; tenantId?: Management.ConnectionTenantIdAzureAd; thumbprints?: Management.ConnectionThumbprints; - upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; + upstream_params?: Management.ConnectionUpstreamParamsAzureAd | undefined; /** Indicates WS-Federation protocol usage. When true, uses WS-Federation; when false, uses OpenID Connect. */ use_wsfed?: boolean; useCommonEndpoint?: Management.ConnectionUseCommonEndpointAzureAd; userid_attribute?: Management.ConnectionUseridAttributeAzureAd; waad_protocol?: Management.ConnectionWaadProtocol; - /** Accepts any additional properties */ - [key: string]: any; } export type ConnectionOptionsBaidu = Management.ConnectionOptionsOAuth2Common; @@ -3999,7 +3645,7 @@ export type ConnectionOptionsBitly = Management.ConnectionOptionsOAuth2Common; export type ConnectionOptionsBox = Management.ConnectionOptionsOAuth2Common; /** - * Common attributes for connection options including non-persistent attributes and Cross App Access + * Common attributes for connection options including non-persistent attributes and cross-app access */ export interface ConnectionOptionsCommon { non_persistent_attrs?: Management.ConnectionNonPersistentAttrs; @@ -4014,7 +3660,7 @@ export interface ConnectionOptionsCommonOidc { client_secret?: Management.ConnectionClientSecretOidc; connection_settings?: Management.ConnectionConnectionSettings; federated_connections_access_tokens?: Management.ConnectionFederatedConnectionsAccessTokens | null; - domain_aliases?: Management.ConnectionDomainAliases; + domain_aliases?: Management.ConnectionDomainAliasesOne; icon_url?: Management.ConnectionIconUrl; id_token_signed_response_algs?: (Management.ConnectionIdTokenSignedResponseAlgs | undefined) | null; issuer?: Management.ConnectionIssuer; @@ -4023,38 +3669,16 @@ export interface ConnectionOptionsCommonOidc { scope?: Management.ConnectionScopeOidc; send_back_channel_nonce?: Management.ConnectionSendBackChannelNonce; set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; - tenant_domain?: Management.ConnectionTenantDomain; + tenant_domain?: (Management.ConnectionTenantDomain | undefined) | null; token_endpoint?: Management.ConnectionTokenEndpointOidc; token_endpoint_auth_method?: Management.ConnectionTokenEndpointAuthMethodEnum | null; token_endpoint_auth_signing_alg?: Management.ConnectionTokenEndpointAuthSigningAlgEnum | null; - upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; + upstream_params?: Management.ConnectionUpstreamParamsOidc | undefined; userinfo_endpoint?: Management.ConnectionUserinfoEndpointOidc; /** Accepts any additional properties */ [key: string]: any; } -/** - * Common options for SAML-based enterprise connections (shared by samlp and pingfederate). - */ -export interface ConnectionOptionsCommonSaml { - cert?: Management.ConnectionSigningCertificateDerSaml; - decryptionKey?: Management.ConnectionDecryptionKeySaml; - digestAlgorithm?: Management.ConnectionDigestAlgorithmSaml; - domain_aliases?: Management.ConnectionDomainAliasesSaml; - entityId?: Management.ConnectionEntityIdSaml; - icon_url?: Management.ConnectionIconUrlSaml; - idpinitiated?: Management.ConnectionOptionsIdpinitiatedSaml; - protocolBinding?: Management.ConnectionProtocolBindingSaml; - set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; - signInEndpoint?: Management.ConnectionSignInEndpointSaml; - signSAMLRequest?: Management.ConnectionSignSamlRequestSaml; - signatureAlgorithm?: Management.ConnectionSignatureAlgorithmSaml; - tenant_domain?: Management.ConnectionTenantDomainSaml; - /** SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. */ - thumbprints?: Management.ConnectionSha1ThumbprintRelaxedValidationSaml[]; - upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; -} - /** * Options for the 'custom' connection */ @@ -4062,11 +3686,6 @@ export type ConnectionOptionsCustom = Record; export type ConnectionOptionsDaccount = Management.ConnectionOptionsOAuth2Common; -/** - * When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. - */ -export type ConnectionOptionsDeflateSaml = boolean; - export type ConnectionOptionsDropbox = Management.ConnectionOptionsOAuth2Common; export type ConnectionOptionsDwolla = Management.ConnectionOptionsOAuth2Common; @@ -4074,17 +3693,7 @@ export type ConnectionOptionsDwolla = Management.ConnectionOptionsOAuth2Common; /** * Options for the 'email' connection */ -export interface ConnectionOptionsEmail extends Management.ConnectionOptionsCommon { - authParams?: Management.ConnectionAuthParamsEmail; - brute_force_protection: Management.ConnectionBruteForceProtection; - disable_signup?: Management.ConnectionDisableSignup; - email: Management.ConnectionEmailEmail; - /** Connection name */ - name: string; - totp?: Management.ConnectionTotpEmail; - /** Accepts any additional properties */ - [key: string]: any; -} +export type ConnectionOptionsEmail = Record; export type ConnectionOptionsEvernote = Management.ConnectionOptionsEvernoteCommon; @@ -4117,39 +3726,7 @@ export type ConnectionOptionsGitHub = Record; /** * Options for the 'google-apps' connection */ -export interface ConnectionOptionsGoogleApps extends Management.ConnectionOptionsCommon { - admin_access_token?: Management.ConnectionAdminAccessTokenGoogleApps; - admin_access_token_expiresin?: Management.ConnectionAdminAccessTokenExpiresInGoogleApps; - admin_refresh_token?: Management.ConnectionAdminRefreshTokenGoogleApps; - /** When true, allows customization of OAuth scopes requested during user login. Custom scopes are appended to the mandatory email and profile scopes. When false or omitted, only the default email and profile scopes are used. This property is automatically enabled when Token Vault or Connected Accounts features are activated. */ - allow_setting_login_scopes?: boolean; - api_enable_users?: Management.ConnectionApiEnableUsersGoogleApps; - client_id: Management.ConnectionClientIdGoogleApps; - client_secret?: Management.ConnectionClientSecretGoogleApps; - domain?: Management.ConnectionDomainGoogleApps; - domain_aliases?: Management.ConnectionDomainAliases; - /** Whether the OAuth flow requests the `email` scope. */ - email?: boolean; - ext_agreed_terms?: Management.ConnectionExtAgreedTermsGoogleApps; - ext_groups?: Management.ConnectionExtGroupsGoogleApps; - /** Controls whether enriched group entries include `id`, `email`, `name` (true) or only the group name (false); can only be set when `ext_groups` is true. */ - ext_groups_extended?: boolean; - ext_is_admin?: Management.ConnectionExtIsAdminGoogleApps; - ext_is_suspended?: Management.ConnectionExtIsSuspendedGoogleApps; - federated_connections_access_tokens?: Management.ConnectionFederatedConnectionsAccessTokens | null; - handle_login_from_social?: Management.ConnectionHandleLoginFromSocialGoogleApps; - icon_url?: Management.ConnectionIconUrlGoogleApps; - /** Determines how Auth0 generates the user_id for Google Workspace users. When false (default), the user's email address is used. When true, Google's stable numeric user ID is used instead, which persists even if the user's email changes. This setting can only be configured when creating the connection and cannot be changed afterward. */ - map_user_id_to_id?: boolean; - /** Whether the OAuth flow requests the `profile` scope. */ - profile?: boolean; - scope?: Management.ConnectionScopeGoogleApps; - set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; - tenant_domain?: Management.ConnectionTenantDomainGoogleApps; - upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; - /** Accepts any additional properties */ - [key: string]: any; -} +export type ConnectionOptionsGoogleApps = Record; /** * Options for the 'google-oauth2' connection @@ -4293,8 +3870,6 @@ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOpti youtube_upload?: boolean; /** View and manage your assets and associated content on YouTube */ youtubepartner?: boolean; - /** Accepts any additional properties */ - [key: string]: any; } /** @@ -4302,28 +3877,6 @@ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOpti */ export type ConnectionOptionsIp = Record; -/** The response protocol used to communicate with the default application. */ -export const ConnectionOptionsIdpInitiatedClientProtocolEnumSaml = { - Oidc: "oidc", - Samlp: "samlp", - Wsfed: "wsfed", -} as const; -export type ConnectionOptionsIdpInitiatedClientProtocolEnumSaml = - (typeof ConnectionOptionsIdpInitiatedClientProtocolEnumSaml)[keyof typeof ConnectionOptionsIdpInitiatedClientProtocolEnumSaml]; - -/** - * Configuration for IdP-Initiated SAML Single Sign-On. When enabled, allows users to initiate login directly from their SAML identity provider without first visiting Auth0. The IdP must include the connection parameter in the post-back URL (Assertion Consumer Service URL). - */ -export interface ConnectionOptionsIdpinitiatedSaml { - /** The query string sent to the default application */ - client_authorizequery?: string; - /** The client ID to use for IdP-initiated login requests. */ - client_id?: string; - client_protocol?: Management.ConnectionClientProtocolSaml; - /** When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0. */ - enabled?: boolean; -} - export type ConnectionOptionsInstagram = Management.ConnectionOptionsOAuth2Common; export type ConnectionOptionsLine = Management.ConnectionOptionsOAuth2Common; @@ -4362,8 +3915,6 @@ export interface ConnectionOptionsOAuth2 extends Management.ConnectionOptionsCom upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; /** When true, uses space-delimited scopes (per OAuth 2.0 spec) instead of comma-delimited when calling the identity provider's authorization endpoint. Only relevant when using the connection_scope parameter. See https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp#pass-scopes-to-authorize-endpoint */ useOauthSpecScope?: boolean; - /** Accepts any additional properties */ - [key: string]: any; } export interface ConnectionOptionsOAuth2Common extends Management.ConnectionOptionsCommon { @@ -4377,13 +3928,10 @@ export interface ConnectionOptionsOAuth2Common extends Management.ConnectionOpti * Options for the 'oidc' connection */ export interface ConnectionOptionsOidc - extends Management.ConnectionOptionsCommonOidc, - Management.ConnectionOptionsCommon { + extends Management.ConnectionOptionsCommonOidc, Management.ConnectionOptionsCommon { attribute_map?: Management.ConnectionAttributeMapOidc; discovery_url?: Management.ConnectionDiscoveryUrl; type?: Management.ConnectionTypeEnumOidc; - /** Accepts any additional properties */ - [key: string]: any; } /** @@ -4439,13 +3987,10 @@ export type ConnectionOptionsOffice365 = Record; * Options for the 'okta' connection */ export interface ConnectionOptionsOkta - extends Management.ConnectionOptionsCommonOidc, - Management.ConnectionOptionsCommon { + extends Management.ConnectionOptionsCommonOidc, Management.ConnectionOptionsCommon { attribute_map?: Management.ConnectionAttributeMapOkta; domain?: Management.ConnectionDomainOkta; type?: Management.ConnectionTypeEnumOkta; - /** Accepts any additional properties */ - [key: string]: any; } export type ConnectionOptionsPaypal = Management.ConnectionOptionsOAuth2Common; @@ -4455,14 +4000,7 @@ export type ConnectionOptionsPaypalSandbox = Management.ConnectionOptionsOAuth2C /** * Options for the 'pingfederate' connection */ -export interface ConnectionOptionsPingFederate - extends Management.ConnectionOptionsCommonSaml, - Management.ConnectionOptionsCommon { - pingFederateBaseUrl: Management.ConnectionPingFederateBaseUrl; - signingCert?: Management.ConnectionSigningCertificatePemPingFederate; - /** Accepts any additional properties */ - [key: string]: any; -} +export type ConnectionOptionsPingFederate = Record; /** * Options for the 'planningcenter' connection @@ -4474,52 +4012,12 @@ export type ConnectionOptionsRenren = Management.ConnectionOptionsOAuth2Common; /** * Options for the 'samlp' connection */ -export interface ConnectionOptionsSaml - extends Management.ConnectionOptionsCommonSaml, - Management.ConnectionOptionsCommon { - debug?: Management.ConnectionDebugSaml; - deflate?: Management.ConnectionOptionsDeflateSaml; - destinationUrl?: Management.ConnectionDestinationUrlSaml; - /** When true, disables sending SAML logout requests (SingleLogoutService) to the identity provider during user sign-out. The user will be logged out of Auth0 but will remain logged into the identity provider. Defaults to false (federated logout enabled). */ - disableSignout?: boolean; - fieldsMap?: Management.ConnectionFieldsMapSaml; - global_token_revocation_jwt_iss?: Management.ConnectionGlobalTokenRevocationJwtIssSaml; - global_token_revocation_jwt_sub?: Management.ConnectionGlobalTokenRevocationJwtSubSaml; - metadataUrl?: Management.ConnectionMetadataUrlSaml; - metadataXml?: Management.ConnectionMetadataXmlSaml; - recipientUrl?: Management.ConnectionRecipientUrlSaml; - requestTemplate?: Management.ConnectionRequestTemplateSaml; - signingCert?: Management.ConnectionSigningCertSaml; - signing_key?: Management.ConnectionSigningKeySaml; - signOutEndpoint?: Management.ConnectionSignOutEndpointSaml; - user_id_attribute?: Management.ConnectionUserIdAttributeSaml; - /** Accepts any additional properties */ - [key: string]: any; -} +export type ConnectionOptionsSaml = Record; /** * Options for the 'sms' connection */ -export interface ConnectionOptionsSms extends Management.ConnectionOptionsCommon { - /** Whether brute force protection is enabled */ - brute_force_protection?: boolean; - disable_signup?: Management.ConnectionDisableSignupSms; - forward_req_info?: Management.ConnectionForwardReqInfoSms; - from?: Management.ConnectionFromSms; - gateway_authentication?: Management.ConnectionGatewayAuthenticationSms | null; - gateway_url?: Management.ConnectionGatewayUrlSms; - messaging_service_sid?: Management.ConnectionMessagingServiceSidSms; - /** Connection name */ - name?: string; - provider?: Management.ConnectionProviderSms; - syntax?: Management.ConnectionTemplateSyntaxEnumSms; - template?: Management.ConnectionTemplateSms; - totp?: Management.ConnectionTotpSms; - twilio_sid?: Management.ConnectionTwilioSidSms; - twilio_token?: Management.ConnectionTwilioTokenSms; - /** Accepts any additional properties */ - [key: string]: any; -} +export type ConnectionOptionsSms = Record; export type ConnectionOptionsSalesforce = Management.ConnectionOptionsSalesforceCommon; @@ -4649,24 +4147,6 @@ export const ConnectionPasswordPolicyEnum = { export type ConnectionPasswordPolicyEnum = (typeof ConnectionPasswordPolicyEnum)[keyof typeof ConnectionPasswordPolicyEnum]; -/** - * Phone OTP authentication enablement - */ -export interface ConnectionPhoneOtpAuthenticationMethod { - /** Determines whether phone OTP is enabled */ - enabled?: boolean; -} - -/** - * URL provided by PingFederate which returns information used for creating the connection - */ -export type ConnectionPingFederateBaseUrl = Management.ConnectionPingFederateBaseUrlPingFederate; - -/** - * PingFederate base URL constrained to HTTP/HTTPS with length bounds - */ -export type ConnectionPingFederateBaseUrlPingFederate = Management.ConnectionHttpsUrlWithHttpFallback; - export interface ConnectionProfile { id?: Management.ConnectionProfileId; name?: Management.ConnectionProfileName; @@ -4816,31 +4296,6 @@ export interface ConnectionPropertiesOptions { [key: string]: any; } -/** Valid SAML protocol bindings */ -export const ConnectionProtocolBindingEnumSaml = { - UrnOasisNamesTcSaml20BindingsHttpPost: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST", - UrnOasisNamesTcSaml20BindingsHttpRedirect: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect", -} as const; -export type ConnectionProtocolBindingEnumSaml = - (typeof ConnectionProtocolBindingEnumSaml)[keyof typeof ConnectionProtocolBindingEnumSaml]; - -/** - * SAML protocol binding mechanism for sending authentication requests to the identity provider. - */ -export type ConnectionProtocolBindingSaml = Management.ConnectionProtocolBindingEnumSaml; - -/** SMS provider values. Use 'sms_gateway' to use a custom SMS gateway instead of Twilio. */ -export const ConnectionProviderEnumSms = { - SmsGateway: "sms_gateway", - Twilio: "twilio", -} as const; -export type ConnectionProviderEnumSms = (typeof ConnectionProviderEnumSms)[keyof typeof ConnectionProviderEnumSms]; - -/** - * SMS provider. Set to 'sms_gateway' to use a custom SMS gateway instead of Twilio. - */ -export type ConnectionProviderSms = Management.ConnectionProviderEnumSms; - /** * A ticket used for provisioning the connection */ @@ -4859,14 +4314,9 @@ export type ConnectionRealmFallback = boolean; /** * Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. */ -export type ConnectionRealmsAuth0 = string[]; - -/** - * The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. - */ -export type ConnectionRecipientUrlSaml = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionRealms = string[]; -export type ConnectionRegistrationEndpoint = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionRegistrationEndpoint = Management.ConnectionHttpsUrlWithHttpFallback; /** * JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. @@ -4888,11 +4338,6 @@ export type ConnectionRequestObjectSigningAlgValuesSupported = string[]; */ export type ConnectionRequestParameterSupported = boolean; -/** - * Custom XML template for SAML authentication requests. Supports variable substitution using @@variableName@@ syntax. When not provided, uses default SAML AuthnRequest template. See https://auth0.com/docs/authenticate/protocols/saml/saml-sso-integrations/configure-auth0-saml-service-provider#customize-the-request-template - */ -export type ConnectionRequestTemplateSaml = string; - /** * Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is false. */ @@ -4926,7 +4371,6 @@ export interface ConnectionResponseContentAd extends Management.ConnectionRespon export interface ConnectionResponseContentAdfs extends Management.ConnectionResponseCommon { strategy: "adfs"; options?: Management.ConnectionOptionsAdfs; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -4959,7 +4403,6 @@ export interface ConnectionResponseContentApple extends Management.ConnectionRes export interface ConnectionResponseContentAuth0 extends Management.ConnectionResponseCommon { strategy: "auth0"; options?: Management.ConnectionOptionsAuth0; - realms?: Management.ConnectionRealmsAuth0; } /** @@ -4978,7 +4421,6 @@ export interface ConnectionResponseContentAzureAd extends Management.ConnectionR options?: Management.ConnectionOptionsAzureAd; provisioning_ticket?: Management.ConnectionProvisioningTicket; provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; - show_as_button?: Management.ConnectionShowAsButton; strategy_version?: Management.ConnectionStrategyVersionEnumAzureAd; } @@ -5116,7 +4558,6 @@ export interface ConnectionResponseContentGitHub extends Management.ConnectionRe export interface ConnectionResponseContentGoogleApps extends Management.ConnectionResponseCommon { strategy: "google-apps"; options?: Management.ConnectionOptionsGoogleApps; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5133,7 +4574,6 @@ export interface ConnectionResponseContentGoogleOAuth2 extends Management.Connec export interface ConnectionResponseContentIp extends Management.ConnectionResponseCommon { strategy: "ip"; options?: Management.ConnectionOptionsIp; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5190,7 +4630,6 @@ export interface ConnectionResponseContentOAuth2 extends Management.ConnectionRe export interface ConnectionResponseContentOidc extends Management.ConnectionResponseCommon { strategy: "oidc"; options?: Management.ConnectionOptionsOidc; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5199,7 +4638,6 @@ export interface ConnectionResponseContentOidc extends Management.ConnectionResp export interface ConnectionResponseContentOffice365 extends Management.ConnectionResponseCommon { strategy: "office365"; options?: Management.ConnectionOptionsOffice365; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5208,7 +4646,6 @@ export interface ConnectionResponseContentOffice365 extends Management.Connectio export interface ConnectionResponseContentOkta extends Management.ConnectionResponseCommon { strategy: "okta"; options?: Management.ConnectionOptionsOkta; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5233,8 +4670,6 @@ export interface ConnectionResponseContentPaypalSandbox extends Management.Conne export interface ConnectionResponseContentPingFederate extends Management.ConnectionResponseCommon { strategy: "pingfederate"; options?: Management.ConnectionOptionsPingFederate; - provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5259,7 +4694,6 @@ export interface ConnectionResponseContentRenren extends Management.ConnectionRe export interface ConnectionResponseContentSaml extends Management.ConnectionResponseCommon { strategy: "samlp"; options?: Management.ConnectionOptionsSaml; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5300,7 +4734,6 @@ export interface ConnectionResponseContentSalesforceSandbox extends Management.C export interface ConnectionResponseContentSharepoint extends Management.ConnectionResponseCommon { strategy: "sharepoint"; options?: Management.ConnectionOptionsSharepoint; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -5443,11 +4876,6 @@ export type ConnectionScopeArray = Management.ConnectionScopeItem[]; */ export type ConnectionScopeAzureAd = string[]; -/** - * Additional OAuth scopes requested beyond the default `email profile` scopes; ignored unless `allow_setting_login_scopes` is true. - */ -export type ConnectionScopeGoogleApps = Management.ConnectionScopeItemGoogleApps[]; - /** * Array of OAuth 2.0 scopes requested during Google authentication. */ @@ -5458,11 +4886,6 @@ export type ConnectionScopeGoogleOAuth2 = Management.ConnectionScopeArray; */ export type ConnectionScopeItem = string; -/** - * An OAuth scope string. - */ -export type ConnectionScopeItemGoogleApps = string; - /** * OAuth 2.0 scopes requested from the identity provider during authorization. Determines what user information and permissions Auth0 can access. Can be specified as a space-delimited string (e.g., 'openid profile email') or array of scope values. The 'useOauthSpecScope' setting controls delimiter behavior when using connection_scope parameter. */ @@ -5493,7 +4916,7 @@ export interface ConnectionScriptsOAuth2 { */ export type ConnectionSendBackChannelNonce = boolean; -export type ConnectionServiceDocumentation = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionServiceDocumentation = Management.ConnectionHttpsUrlWithHttpFallback; /** When using an external IdP, this flag determines whether 'name', 'given_name', 'family_name', 'nickname', and 'picture' attributes are updated. In addition, it also determines whether the user is created when user doesnt exist previously. Possible values are 'on_each_login' (default value, it configures the connection to automatically create the user if necessary and update the root attributes from the external IdP with each user login. When this setting is used, root attributes cannot be independently updated), 'on_first_login' (configures the connection to create the user and set the root attributes on first login only, allowing them to be independently updated thereafter), and 'never_on_login' (configures the connection not to create the user and not to set the root attributes from the external IdP, allowing them to be independently updated). */ export const ConnectionSetUserRootAttributesEnum = { @@ -5504,16 +4927,6 @@ export const ConnectionSetUserRootAttributesEnum = { export type ConnectionSetUserRootAttributesEnum = (typeof ConnectionSetUserRootAttributesEnum)[keyof typeof ConnectionSetUserRootAttributesEnum]; -/** - * SHA-1 thumbprint allowing standard format or relaxed legacy hex string. - */ -export type ConnectionSha1ThumbprintRelaxedValidationSaml = Management.ConnectionSha1ThumbprintSaml; - -/** - * SHA-1 thumbprint of the certificate - */ -export type ConnectionSha1ThumbprintSaml = string; - /** Choose how Auth0 sets the email_verified field in the user profile. */ export const ConnectionShouldTrustEmailVerifiedConnectionEnum = { NeverSetEmailsAsVerified: "never_set_emails_as_verified", @@ -5523,73 +4936,10 @@ export type ConnectionShouldTrustEmailVerifiedConnectionEnum = (typeof ConnectionShouldTrustEmailVerifiedConnectionEnum)[keyof typeof ConnectionShouldTrustEmailVerifiedConnectionEnum]; /** - * Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. Defaults to `false`. + * Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. (Defaults to false.) */ export type ConnectionShowAsButton = boolean; -/** - * Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. - */ -export type ConnectionSignInEndpointAdfs = Management.ConnectionHttpsUrlWithHttpFallback2048; - -/** - * Identity provider's SAML SingleSignOnService endpoint URL where Auth0 sends SAML authentication requests. This is the primary login URL for the SAML connection. Required unless using metadataUrl or metadataXml. - */ -export type ConnectionSignInEndpointSaml = Management.ConnectionHttpsUrlWithHttpFallback2048; - -/** - * Identity provider's SAML SingleLogoutService endpoint URL where Auth0 sends logout requests for federated sign-out. When not provided, defaults to signInEndpoint. Only used if disableSignout is false. - */ -export type ConnectionSignOutEndpointSaml = Management.ConnectionHttpsUrlWithHttpFallback2048; - -/** - * When true, Auth0 signs SAML authentication requests using the connection's signing key. The signature includes the request's digest and is validated by the identity provider. Defaults to false (unsigned requests). - */ -export type ConnectionSignSamlRequestSaml = boolean; - -/** Valid SAML signature algorithms */ -export const ConnectionSignatureAlgorithmEnumSaml = { - RsaSha1: "rsa-sha1", - RsaSha256: "rsa-sha256", -} as const; -export type ConnectionSignatureAlgorithmEnumSaml = - (typeof ConnectionSignatureAlgorithmEnumSaml)[keyof typeof ConnectionSignatureAlgorithmEnumSaml]; - -/** - * Algorithm used to sign SAML authentication requests and logout requests using the connection's signing key. Common values: 'rsa-sha256' (RSA signature with SHA-256 digest) or 'rsa-sha1'. Defaults to 'rsa-sha256'. - */ -export type ConnectionSignatureAlgorithmSaml = Management.ConnectionSignatureAlgorithmEnumSaml; - -/** - * Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. - */ -export type ConnectionSigningCertSaml = Management.ConnectionSigningCertificatePemSaml; - -/** - * X.509 signing certificate from the identity provider in .der format. Used to validate signatures in SAML Responses and Assertions. This is an alternative to signingCert and is kept for backward compatibility. Prefer using signingCert instead. - */ -export type ConnectionSigningCertificateDerSaml = string; - -/** - * Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. - */ -export type ConnectionSigningCertificatePemPingFederate = string; - -/** - * Base64-encoded X.509 certificate from the identity provider used to validate signatures in SAML responses and assertions. The certificate is decoded and used for cryptographic signature verification. - */ -export type ConnectionSigningCertificatePemSaml = string; - -/** - * Key pair with 'key' and 'cert' properties for signing SAML messages - */ -export interface ConnectionSigningKeySaml { - /** Base64-encoded X.509 certificate in PEM format used by Auth0 to sign SAML requests and logout messages. */ - cert?: string; - /** Private key in PEM format used by Auth0 to sign SAML requests and logout messages. */ - key?: string; -} - export const ConnectionStrategyEnum = { Ad: "ad", Adfs: "adfs", @@ -5667,33 +5017,13 @@ export type ConnectionStrategyVersionEnumAzureAd = number; */ export type ConnectionSubjectTypesSupported = string[]; -/** - * SMS message template. Use `@@password@@` as a placeholder for the verification code. - */ -export type ConnectionTemplateSms = string; - -/** SMS template syntax type. Set to 'md_with_macros' to enable macro processing in templates. */ -export const ConnectionTemplateSyntaxEnumSms = { - Liquid: "liquid", - MdWithMacros: "md_with_macros", -} as const; -export type ConnectionTemplateSyntaxEnumSms = - (typeof ConnectionTemplateSyntaxEnumSms)[keyof typeof ConnectionTemplateSyntaxEnumSms]; - /** * Tenant domain */ -export type ConnectionTenantDomain = string; +export type ConnectionTenantDomain = (string | null) | undefined; export type ConnectionTenantDomainAzureAdOne = string; -/** - * The Google Workspace primary domain used to identify the organization during authentication. - */ -export type ConnectionTenantDomainGoogleApps = Management.ConnectionTenantDomain; - -export type ConnectionTenantDomainSaml = Management.ConnectionTenantDomain; - /** * The Azure AD tenant ID as a UUID. The unique identifier for your Azure AD organization. Must be a valid 36-character UUID. */ @@ -5704,7 +5034,10 @@ export type ConnectionTenantIdAzureAd = string; */ export type ConnectionThumbprints = string[]; -export type ConnectionTokenEndpoint = Management.ConnectionHttpsUrlWithHttpFallback255; +/** + * URL of the identity provider's OAuth 2.0 token endpoint where authorization codes are exchanged for access tokens. Must be a valid HTTPS URL. Required for authorization code flow but optional for implicit flow. + */ +export type ConnectionTokenEndpoint = Management.ConnectionHttpsUrlWithHttpFallback; /** Requested Client Authentication method for the Token Endpoint. */ export const ConnectionTokenEndpointAuthMethodEnum = { @@ -5738,59 +5071,6 @@ export type ConnectionTokenEndpointOAuth2 = Management.ConnectionTokenEndpoint; export type ConnectionTokenEndpointOidc = Management.ConnectionTokenEndpoint; -export interface ConnectionTotpEmail { - length?: Management.ConnectionTotpLengthEmail; - time_step?: Management.ConnectionTotpTimeStepEmail; -} - -/** - * Length of the TOTP code - */ -export type ConnectionTotpLengthEmail = Management.ConnectionTotpLengthPasswordless; - -/** - * Length of the TOTP code - */ -export type ConnectionTotpLengthPasswordless = number; - -/** - * Number of digits in the verification code - */ -export type ConnectionTotpLengthSms = Management.ConnectionTotpLengthPasswordless; - -/** - * Time-based One-Time Password (TOTP) options - */ -export interface ConnectionTotpSms { - length?: Management.ConnectionTotpLengthSms; - time_step?: Management.ConnectionTotpTimeStepSms; -} - -/** - * Time step for TOTP in seconds - */ -export type ConnectionTotpTimeStepEmail = Management.ConnectionTotpTimeStepPasswordless; - -/** - * Time step for TOTP in seconds - */ -export type ConnectionTotpTimeStepPasswordless = number; - -/** - * Code validity duration in seconds - */ -export type ConnectionTotpTimeStepSms = Management.ConnectionTotpTimeStepPasswordless; - -/** - * Twilio Account SID - */ -export type ConnectionTwilioSidSms = string; - -/** - * Twilio Auth Token - */ -export type ConnectionTwilioTokenSms = string; - /** Connection type */ export const ConnectionTypeEnumOidc = { BackChannel: "back_channel", @@ -5840,7 +5120,12 @@ export type ConnectionUpstreamParams = | (Record | null) | undefined; -export type ConnectionUpstreamParamsAdfs = ((Management.ConnectionUpstreamParams | undefined) | null) | undefined; +/** + * Custom parameters to include in authentication requests to Azure AD. Accepts up to 10 key-value pairs for passing additional parameters like domain hints or tenant hints to the identity provider. + */ +export type ConnectionUpstreamParamsAzureAd = ((Management.ConnectionUpstreamParams | undefined) | null) | undefined; + +export type ConnectionUpstreamParamsOidc = ((Management.ConnectionUpstreamParams | undefined) | null) | undefined; export interface ConnectionUpstreamValue { value?: string; @@ -5851,11 +5136,6 @@ export interface ConnectionUpstreamValue { */ export type ConnectionUseCommonEndpointAzureAd = boolean; -/** - * Custom SAML assertion attribute to use as the unique user identifier. When provided, this attribute is prepended to the default user_id mapping list with highest priority. Accepts a string (single SAML attribute name). - */ -export type ConnectionUserIdAttributeSaml = string; - /** * The Azure AD claim to use as the unique user identifier. 'oid' (Object ID) is recommended for single-tenant connections and required for SCIM. 'sub' (Subject) is required for multi-tenant/common endpoint. Only applies with OpenID Connect protocol. */ @@ -5879,7 +5159,7 @@ export type ConnectionUserinfoEncryptionAlgValuesSupported = string[]; */ export type ConnectionUserinfoEncryptionEncValuesSupported = string[]; -export type ConnectionUserinfoEndpoint = Management.ConnectionHttpsUrlWithHttpFallback255; +export type ConnectionUserinfoEndpoint = Management.ConnectionHttpsUrlWithHttpFallback; export type ConnectionUserinfoEndpointOidc = Management.ConnectionUserinfoEndpoint; @@ -5948,8 +5228,6 @@ export interface CreateActionResponseContent { built_at?: string; /** True if the action should be deployed after creation. */ deploy?: boolean; - /** The list of action modules and their versions used by this action. */ - modules?: Management.ActionModuleReference[]; } /** @@ -5982,18 +5260,6 @@ export interface CreateBrandingThemeResponseContent { widget: Management.BrandingThemeWidget; } -/** - * Defines `self_signed_tls_client_auth` client authentication method. If the property is defined, the client is configured to use mTLS authentication method utilizing self-signed certificate. - */ -export interface CreateClientAuthenticationMethodSelfSignedTlsClientAuth { - credentials: Management.CreateClientAuthenticationMethodSelfSignedTlsClientAuthCredentials; -} - -/** - * Fully defined credentials that will be enabled on the client for mTLS authentication utilizing self-signed certificate. - */ -export type CreateClientAuthenticationMethodSelfSignedTlsClientAuthCredentials = Management.X509CertificateCredential[]; - export interface CreateClientGrantResponseContent { /** ID of the client grant. */ id?: string; @@ -6135,7 +5401,6 @@ export interface CreateConnectionRequestContentAd extends Management.CreateConne export interface CreateConnectionRequestContentAdfs extends Management.CreateConnectionCommon { strategy: "adfs"; options?: Management.ConnectionOptionsAdfs; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6168,7 +5433,6 @@ export interface CreateConnectionRequestContentApple extends Management.CreateCo export interface CreateConnectionRequestContentAuth0 extends Management.CreateConnectionCommon { strategy: "auth0"; options?: Management.ConnectionOptionsAuth0; - realms?: Management.ConnectionRealmsAuth0; } /** @@ -6187,7 +5451,6 @@ export interface CreateConnectionRequestContentAzureAd extends Management.Create options?: Management.ConnectionOptionsAzureAd; provisioning_ticket?: Management.ConnectionProvisioningTicket; provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6324,7 +5587,6 @@ export interface CreateConnectionRequestContentGitHub extends Management.CreateC export interface CreateConnectionRequestContentGoogleApps extends Management.CreateConnectionCommon { strategy: "google-apps"; options?: Management.ConnectionOptionsGoogleApps; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6341,7 +5603,6 @@ export interface CreateConnectionRequestContentGoogleOAuth2 extends Management.C export interface CreateConnectionRequestContentIp extends Management.CreateConnectionCommon { strategy: "ip"; options?: Management.ConnectionOptionsIp; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6398,7 +5659,6 @@ export interface CreateConnectionRequestContentOAuth2 extends Management.CreateC export interface CreateConnectionRequestContentOidc extends Management.CreateConnectionCommon { strategy: "oidc"; options?: Management.ConnectionOptionsOidc; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6407,7 +5667,6 @@ export interface CreateConnectionRequestContentOidc extends Management.CreateCon export interface CreateConnectionRequestContentOffice365 extends Management.CreateConnectionCommon { strategy: "office365"; options?: Management.ConnectionOptionsOffice365; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6416,7 +5675,6 @@ export interface CreateConnectionRequestContentOffice365 extends Management.Crea export interface CreateConnectionRequestContentOkta extends Management.CreateConnectionCommon { strategy: "okta"; options?: Management.ConnectionOptionsOkta; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6441,7 +5699,6 @@ export interface CreateConnectionRequestContentPaypalSandbox extends Management. export interface CreateConnectionRequestContentPingFederate extends Management.CreateConnectionCommon { strategy: "pingfederate"; options?: Management.ConnectionOptionsPingFederate; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6466,7 +5723,6 @@ export interface CreateConnectionRequestContentRenren extends Management.CreateC export interface CreateConnectionRequestContentSaml extends Management.CreateConnectionCommon { strategy: "samlp"; options?: Management.ConnectionOptionsSaml; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -6507,7 +5763,6 @@ export interface CreateConnectionRequestContentSalesforceSandbox extends Managem export interface CreateConnectionRequestContentSharepoint extends Management.CreateConnectionCommon { strategy: "sharepoint"; options?: Management.ConnectionOptionsSharepoint; - show_as_button?: Management.ConnectionShowAsButton; } /** @@ -7509,8 +6764,6 @@ export interface CreateOrganizationDiscoveryDomainResponseContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ - use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; /** The full domain where the TXT record should be added. */ @@ -7876,8 +7129,6 @@ export interface CustomDomain { domain: string; /** Whether this is a primary domain (true) or not (false). */ primary: boolean; - /** Whether this is the default custom domain (true) or not (false). */ - is_default?: boolean; status: Management.CustomDomainStatusFilterEnum; type: Management.CustomDomainTypeEnum; /** Intermediate address. */ @@ -8035,14 +7286,6 @@ export interface DailyStats { [key: string]: any; } -/** Default authentication method for email identifier */ -export const DefaultMethodEmailIdentifierEnum = { - Password: "password", - EmailOtp: "email_otp", -} as const; -export type DefaultMethodEmailIdentifierEnum = - (typeof DefaultMethodEmailIdentifierEnum)[keyof typeof DefaultMethodEmailIdentifierEnum]; - /** * Token Quota configuration, to configure quotas for token issuance for clients and organizations. Applied to all clients and organizations unless overridden in individual client or organization settings. */ @@ -8108,8 +7351,6 @@ export interface DeployActionResponseContent { updated_at?: string; /** The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. */ supported_triggers?: Management.ActionTrigger[]; - /** The list of action modules and their versions used by this action version. */ - modules?: Management.ActionModuleReference[]; } export interface DeployActionVersionRequestBodyParams { @@ -8148,8 +7389,6 @@ export interface DeployActionVersionResponseContent { updated_at?: string; /** The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. */ supported_triggers?: Management.ActionTrigger[]; - /** The list of action modules and their versions used by this action version. */ - modules?: Management.ActionModuleReference[]; } export interface DeviceCredential { @@ -11298,8 +10537,6 @@ export interface GetActionResponseContent { built_at?: string; /** True if the action should be deployed after creation. */ deploy?: boolean; - /** The list of action modules and their versions used by this action. */ - modules?: Management.ActionModuleReference[]; } export interface GetActionVersionResponseContent { @@ -11331,8 +10568,6 @@ export interface GetActionVersionResponseContent { updated_at?: string; /** The list of triggers that this version supports. At this time, a version can only target a single trigger at a time. */ supported_triggers?: Management.ActionTrigger[]; - /** The list of action modules and their versions used by this action version. */ - modules?: Management.ActionModuleReference[]; } /** @@ -11348,9 +10583,10 @@ export interface GetAculResponseContent { /** Name of the screen */ screen?: string; rendering_mode?: Management.AculRenderingModeEnum; - context_configuration?: Management.AculContextConfiguration; + /** Context values to make available */ + context_configuration?: string[]; /** Override Universal Login default head tags */ - default_head_tags_disabled?: boolean | null; + default_head_tags_disabled?: boolean; /** Use page template with ACUL */ use_page_template?: boolean | null; /** An array of head tags */ @@ -11667,8 +10903,6 @@ export interface GetCustomDomainResponseContent { domain: string; /** Whether this is a primary domain (true) or not (false). */ primary: boolean; - /** Whether this is the default custom domain (true) or not (false). */ - is_default?: boolean; status: Management.CustomDomainStatusFilterEnum; type: Management.CustomDomainTypeEnum; /** Intermediate address. */ @@ -11866,37 +11100,6 @@ export interface GetFormResponseContent { submitted_at?: string; } -export interface GetGroupMembersResponseContent { - members: Management.GroupMember[]; - /** A cursor to be used as the "from" query parameter for the next page of results. */ - next?: string; -} - -/** - * Represents the metadata of a group. Member lists are retrieved via a separate endpoint. - */ -export interface GetGroupResponseContent { - /** Unique identifier for the group (service-generated). */ - id: string; - /** Name of the group. Must be unique within its scope (connection, organization, or tenant). Must contain between 1 and 128 printable ASCII characters. */ - name: string; - /** External identifier for the group, often used for SCIM synchronization. Max length of 256 characters. */ - external_id?: string; - /** Identifier for the connection this group belongs to (if a connection group). */ - connection_id?: string; - /** Identifier for the organization this group belongs to (if an organization group). */ - organization_id?: string | null; - /** Identifier for the tenant this group belongs to. */ - tenant_name: string; - description?: string | null; - /** Timestamp of when the group was created. */ - created_at: string; - /** Timestamp of when the group was last updated. */ - updated_at: string; - /** Accepts any additional properties */ - [key: string]: any; -} - export interface GetGuardianEnrollmentResponseContent { /** ID for this enrollment. */ id: string; @@ -12159,28 +11362,12 @@ export interface GetOrganizationConnectionResponseContent { connection?: Management.OrganizationConnectionInformation; } -export interface GetOrganizationDiscoveryDomainByNameResponseContent { - /** Organization discovery domain identifier. */ - id: string; - /** The domain name to associate with the organization e.g. acme.com. */ - domain: string; - status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ - use_for_organization_discovery?: boolean; - /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ - verification_txt: string; - /** The full domain where the TXT record should be added. */ - verification_host: string; -} - export interface GetOrganizationDiscoveryDomainResponseContent { /** Organization discovery domain identifier. */ id: string; /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ - use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; /** The full domain where the TXT record should be added. */ @@ -12258,7 +11445,6 @@ export interface GetRefreshTokenResponseContent { rotating?: boolean; /** A list of the resource server IDs associated to this refresh-token and their granted scopes */ resource_servers?: Management.RefreshTokenResourceServer[]; - refresh_token_metadata?: (Management.RefreshTokenMetadata | undefined) | null; last_exchanged_at?: Management.RefreshTokenDate; /** Accepts any additional properties */ [key: string]: any; @@ -12515,8 +11701,6 @@ export interface GetTenantSettingsResponseContent { */ skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; resource_parameter_profile?: Management.TenantSettingsResourceParameterProfile; - /** Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. */ - enable_ai_guide?: boolean; } export interface GetTokenExchangeProfileResponseContent { @@ -12603,15 +11787,6 @@ export interface GetUserAuthenticationMethodResponseContent { relying_party_identifier?: string; } -export interface GetUserGroupsPaginatedResponseContent { - groups: Management.UserGroupsResponseSchema[]; - /** A cursor to be used as the "from" query parameter for the next page of results. */ - next?: string; - start?: number; - limit?: number; - total?: number; -} - export interface GetUserResponseContent { /** ID of the user which can be used when interacting with other APIs. */ user_id?: string; @@ -12702,40 +11877,9 @@ export interface Group { } /** - * Represents the metadata of a group membership. + * Enrollment date and time. */ -export interface GroupMember { - /** Unique identifier for the member. */ - id?: string; - member_type?: Management.GroupMemberTypeEnum; - type?: Management.GroupTypeEnum; - /** Identifier for the connection this group belongs to (if a connection group). */ - connection_id?: string; - /** Timestamp of when the membership was created. */ - created_at?: string; - /** Accepts any additional properties */ - [key: string]: any; -} - -/** Type of the member. */ -export const GroupMemberTypeEnum = { - User: "user", - Group: "group", -} as const; -export type GroupMemberTypeEnum = (typeof GroupMemberTypeEnum)[keyof typeof GroupMemberTypeEnum]; - -/** Type of the group. */ -export const GroupTypeEnum = { - Connection: "connection", - Organization: "organization", - Tenant: "tenant", -} as const; -export type GroupTypeEnum = (typeof GroupTypeEnum)[keyof typeof GroupTypeEnum]; - -/** - * Enrollment date and time. - */ -export type GuardianEnrollmentDate = string; +export type GuardianEnrollmentDate = string; /** Optional. Specifies which factor the user must enroll with.
Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages. */ export const GuardianEnrollmentFactorEnum = { @@ -13114,7 +12258,7 @@ export interface ListActionsPaginatedResponseContent { } export interface ListAculsOffsetPaginatedResponseContent { - configs?: Management.ListAculsResponseContentItem[]; + configs?: Management.AculResponseContent[]; /** the index of the first configuration in the response (before filtering) */ start?: number; /** the maximum number of configurations shown per page (before filtering) */ @@ -13123,26 +12267,6 @@ export interface ListAculsOffsetPaginatedResponseContent { total?: number; } -export interface ListAculsResponseContentItem { - /** Tenant ID */ - tenant?: string; - /** Name of the prompt */ - prompt?: string; - /** Name of the screen */ - screen?: string; - rendering_mode?: Management.AculRenderingModeEnum; - context_configuration?: Management.AculContextConfiguration; - /** Override Universal Login default head tags */ - default_head_tags_disabled?: boolean | null; - /** Use page template with ACUL */ - use_page_template?: boolean | null; - /** An array of head tags */ - head_tags?: Management.AculHeadTag[]; - filters?: Management.AculFilters | null; - /** Accepts any additional properties */ - [key: string]: any; -} - export interface ListBrandingPhoneProvidersResponseContent { providers?: Management.PhoneProviderSchemaMasked[]; } @@ -13210,14 +12334,6 @@ export interface ListEncryptionKeyOffsetPaginatedResponseContent { keys?: Management.EncryptionKey[]; } -export interface ListEventStreamsResponseContent { - eventStreams?: Management.EventStreamResponseContent[]; - /** Opaque identifier for use with the from query parameter for the next page of results. */ - next?: string; - /** Accepts any additional properties */ - [key: string]: any; -} - export interface ListFlowExecutionsPaginatedResponseContent { /** Opaque identifier for use with the from query parameter for the next page of results.
This identifier is valid for 24 hours. */ next?: string; @@ -13245,15 +12361,6 @@ export interface ListFormsOffsetPaginatedResponseContent { forms?: Management.FormSummary[]; } -export interface ListGroupsPaginatedResponseContent { - groups: Management.Group[]; - /** A cursor to be used as the "from" query parameter for the next page of results. */ - next?: string; - start?: number; - limit?: number; - total?: number; -} - export type ListGuardianPoliciesResponseContent = Management.MfaPolicyEnum[]; export interface ListHooksOffsetPaginatedResponseContent { @@ -14242,8 +13349,6 @@ export interface OrganizationDiscoveryDomain { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ - use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; /** The full domain where the TXT record should be added. */ @@ -14529,6 +13634,18 @@ export const PreferredAuthenticationMethodEnum = { export type PreferredAuthenticationMethodEnum = (typeof PreferredAuthenticationMethodEnum)[keyof typeof PreferredAuthenticationMethodEnum]; +/** + * Defines `private_key_jwt` client authentication method. If this property is defined, the client is enabled to use the Private Key JWT authentication method. + */ +export interface PrivateKeyJwt { + credentials: Management.PrivateKeyJwtCredentials; +} + +/** + * A list of unique and previously created credential IDs enabled on the client for Private Key JWT authentication. + */ +export type PrivateKeyJwtCredentials = Management.CredentialId[]; + /** Name of the prompt */ export const PromptGroupNameEnum = { Login: "login", @@ -14721,11 +13838,6 @@ export const RefreshTokenExpirationTypeEnum = { export type RefreshTokenExpirationTypeEnum = (typeof RefreshTokenExpirationTypeEnum)[keyof typeof RefreshTokenExpirationTypeEnum]; -/** - * Metadata associated with the refresh token, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed. - */ -export type RefreshTokenMetadata = (Record | null) | undefined; - export interface RefreshTokenResourceServer { /** Resource server ID */ audience?: string; @@ -14751,7 +13863,6 @@ export interface RefreshTokenResponseContent { rotating?: boolean; /** A list of the resource server IDs associated to this refresh-token and their granted scopes */ resource_servers?: Management.RefreshTokenResourceServer[]; - refresh_token_metadata?: (Management.RefreshTokenMetadata | undefined) | null; last_exchanged_at?: Management.RefreshTokenDate; /** Accepts any additional properties */ [key: string]: any; @@ -15636,13 +14747,27 @@ export interface SetGuardianFactorsProviderPhoneTwilioResponseContent { sid?: string | null; } +export interface SetGuardianFactorsProviderPushNotificationApnsRequestContent { + sandbox?: boolean; + bundle_id?: string | null; + p12?: string | null; +} + export interface SetGuardianFactorsProviderPushNotificationApnsResponseContent { sandbox?: boolean; bundle_id?: string | null; } +export interface SetGuardianFactorsProviderPushNotificationFcmRequestContent { + server_key?: string | null; +} + export type SetGuardianFactorsProviderPushNotificationFcmResponseContent = Record; +export interface SetGuardianFactorsProviderPushNotificationFcmv1RequestContent { + server_credentials?: string | null; +} + export type SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent = Record; export interface SetGuardianFactorsProviderPushNotificationResponseContent { @@ -16227,13 +15352,12 @@ export interface UpdateActionResponseContent { built_at?: string; /** True if the action should be deployed after creation. */ deploy?: boolean; - /** The list of action modules and their versions used by this action. */ - modules?: Management.ActionModuleReference[]; } export interface UpdateAculResponseContent { rendering_mode?: Management.AculRenderingModeEnum; - context_configuration?: Management.AculContextConfiguration; + /** Context values to make available */ + context_configuration?: string[]; /** Override Universal Login default head tags */ default_head_tags_disabled?: boolean | null; /** Use page template with ACUL */ @@ -16562,451 +15686,6 @@ export interface UpdateConnectionProfileResponseContent { strategy_overrides?: Management.ConnectionProfileStrategyOverrides; } -/** - * Update a connection with strategy=ad - */ -export interface UpdateConnectionRequestContentAd extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAd; -} - -/** - * Update a connection with strategy=adfs - */ -export interface UpdateConnectionRequestContentAdfs extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAdfs; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=aol - */ -export interface UpdateConnectionRequestContentAol extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAol; -} - -/** - * Update a connection with strategy=amazon - */ -export interface UpdateConnectionRequestContentAmazon extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAmazon; -} - -/** - * Update a connection with strategy=apple - */ -export interface UpdateConnectionRequestContentApple extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsApple; -} - -/** - * Update a connection with strategy=auth0 - */ -export interface UpdateConnectionRequestContentAuth0 extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAuth0; - realms?: Management.ConnectionRealmsAuth0; -} - -/** - * Update a connection with strategy=auth0-oidc - */ -export interface UpdateConnectionRequestContentAuth0Oidc extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAuth0Oidc; -} - -/** - * Update a connection with strategy=waad - */ -export interface UpdateConnectionRequestContentAzureAd extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsAzureAd; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=baidu - */ -export interface UpdateConnectionRequestContentBaidu extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsBaidu; -} - -/** - * Update a connection with strategy=bitbucket - */ -export interface UpdateConnectionRequestContentBitbucket extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsBitbucket; -} - -/** - * Update a connection with strategy=bitly - */ -export interface UpdateConnectionRequestContentBitly extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsBitly; -} - -/** - * Update a connection with strategy=box - */ -export interface UpdateConnectionRequestContentBox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsBox; -} - -/** - * Update a connection with strategy=custom - */ -export interface UpdateConnectionRequestContentCustom extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsCustom; -} - -/** - * Update a connection with strategy=daccount - */ -export interface UpdateConnectionRequestContentDaccount extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsDaccount; -} - -/** - * Update a connection with strategy=dropbox - */ -export interface UpdateConnectionRequestContentDropbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsDropbox; -} - -/** - * Update a connection with strategy=dwolla - */ -export interface UpdateConnectionRequestContentDwolla extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsDwolla; -} - -/** - * Update a connection with strategy=email - */ -export interface UpdateConnectionRequestContentEmail extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsEmail; -} - -/** - * Update a connection with strategy=evernote - */ -export interface UpdateConnectionRequestContentEvernote extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsEvernote; -} - -/** - * Update a connection with strategy=evernote-sandbox - */ -export interface UpdateConnectionRequestContentEvernoteSandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsEvernoteSandbox; -} - -/** - * Update a connection with strategy=exact - */ -export interface UpdateConnectionRequestContentExact extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsExact; -} - -/** - * Update a connection with strategy=facebook - */ -export interface UpdateConnectionRequestContentFacebook extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsFacebook; -} - -/** - * Update a connection with strategy=fitbit - */ -export interface UpdateConnectionRequestContentFitbit extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsFitbit; -} - -/** - * Update a connection with strategy=flickr - */ -export interface UpdateConnectionRequestContentFlickr extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsFlickr; -} - -/** - * Update a connection with strategy=github - */ -export interface UpdateConnectionRequestContentGitHub extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsGitHub; -} - -/** - * Update a connection with strategy=google-apps - */ -export interface UpdateConnectionRequestContentGoogleApps extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsGoogleApps; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=google-oauth2 - */ -export interface UpdateConnectionRequestContentGoogleOAuth2 extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsGoogleOAuth2; -} - -/** - * Update a connection with strategy=ip - */ -export interface UpdateConnectionRequestContentIp extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsIp; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=instagram - */ -export interface UpdateConnectionRequestContentInstagram extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsInstagram; -} - -/** - * Update a connection with strategy=line - */ -export interface UpdateConnectionRequestContentLine extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsLine; -} - -/** - * Update a connection with strategy=linkedin - */ -export interface UpdateConnectionRequestContentLinkedin extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsLinkedin; -} - -/** - * Update a connection with strategy=miicard - */ -export interface UpdateConnectionRequestContentMiicard extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsMiicard; -} - -/** - * Update a connection with strategy=oauth1 - */ -export interface UpdateConnectionRequestContentOAuth1 extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsOAuth1; -} - -/** - * Update a connection with strategy=oauth2 - */ -export interface UpdateConnectionRequestContentOAuth2 extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsOAuth2; -} - -/** - * Update a connection with strategy=oidc - */ -export interface UpdateConnectionRequestContentOidc extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsOidc; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=office365 - */ -export interface UpdateConnectionRequestContentOffice365 extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsOffice365; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=okta - */ -export interface UpdateConnectionRequestContentOkta extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsOkta; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=paypal - */ -export interface UpdateConnectionRequestContentPaypal extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsPaypal; -} - -/** - * Update a connection with strategy=paypal-sandbox - */ -export interface UpdateConnectionRequestContentPaypalSandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsPaypalSandbox; -} - -/** - * Update a connection with strategy=pingfederate - */ -export interface UpdateConnectionRequestContentPingFederate extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsPingFederate; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=planningcenter - */ -export interface UpdateConnectionRequestContentPlanningCenter extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsPlanningCenter; -} - -/** - * Update a connection with strategy=renren - */ -export interface UpdateConnectionRequestContentRenren extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsRenren; -} - -/** - * Update a connection with strategy=samlp - */ -export interface UpdateConnectionRequestContentSaml extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSaml; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=sms - */ -export interface UpdateConnectionRequestContentSms extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSms; -} - -/** - * Update a connection with strategy=salesforce - */ -export interface UpdateConnectionRequestContentSalesforce extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSalesforce; -} - -/** - * Update a connection with strategy=salesforce-community - */ -export interface UpdateConnectionRequestContentSalesforceCommunity extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSalesforceCommunity; -} - -/** - * Update a connection with strategy=salesforce-sandbox - */ -export interface UpdateConnectionRequestContentSalesforceSandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSalesforceSandbox; -} - -/** - * Update a connection with strategy=sharepoint - */ -export interface UpdateConnectionRequestContentSharepoint extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSharepoint; - show_as_button?: Management.ConnectionShowAsButton; -} - -/** - * Update a connection with strategy=shop - */ -export interface UpdateConnectionRequestContentShop extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsShop; -} - -/** - * Update a connection with strategy=shopify - */ -export interface UpdateConnectionRequestContentShopify extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsShopify; -} - -/** - * Update a connection with strategy=soundcloud - */ -export interface UpdateConnectionRequestContentSoundcloud extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSoundcloud; -} - -/** - * Update a connection with strategy=thecity - */ -export interface UpdateConnectionRequestContentTheCity extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsTheCity; -} - -/** - * Update a connection with strategy=thecity-sandbox - */ -export interface UpdateConnectionRequestContentTheCitySandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsTheCitySandbox; -} - -/** - * Update a connection with strategy=thirtysevensignals - */ -export interface UpdateConnectionRequestContentThirtySevenSignals extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsThirtySevenSignals; -} - -/** - * Update a connection with strategy=twitter - */ -export interface UpdateConnectionRequestContentTwitter extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsTwitter; -} - -/** - * Update a connection with strategy=untappd - */ -export interface UpdateConnectionRequestContentUntappd extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsUntappd; -} - -/** - * Update a connection with strategy=vkontakte - */ -export interface UpdateConnectionRequestContentVkontakte extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsVkontakte; -} - -/** - * Update a connection with strategy=weibo - */ -export interface UpdateConnectionRequestContentWeibo extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsWeibo; -} - -/** - * Update a connection with strategy=windowslive - */ -export interface UpdateConnectionRequestContentWindowsLive extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsWindowsLive; -} - -/** - * Update a connection with strategy=wordpress - */ -export interface UpdateConnectionRequestContentWordpress extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsWordpress; -} - -/** - * Update a connection with strategy=yahoo - */ -export interface UpdateConnectionRequestContentYahoo extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsYahoo; -} - -/** - * Update a connection with strategy=yammer - */ -export interface UpdateConnectionRequestContentYammer extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsYammer; -} - -/** - * Update a connection with strategy=yandex - */ -export interface UpdateConnectionRequestContentYandex extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsYandex; -} - export interface UpdateConnectionResponseContent { /** The name of the connection */ name?: string; @@ -17037,8 +15716,6 @@ export interface UpdateCustomDomainResponseContent { domain: string; /** Whether this is a primary domain (true) or not (false). */ primary: boolean; - /** Whether this is the default custom domain (true) or not (false). */ - is_default?: boolean; status: Management.CustomDomainStatusFilterEnum; type: Management.CustomDomainTypeEnum; verification: Management.DomainVerification; @@ -17197,15 +15874,6 @@ export interface UpdateGuardianFactorDuoSettingsResponseContent { host?: string; } -export interface UpdateGuardianFactorsProviderPushNotificationApnsResponseContent { - sandbox?: boolean; - bundle_id?: string | null; -} - -export type UpdateGuardianFactorsProviderPushNotificationFcmResponseContent = Record; - -export type UpdateGuardianFactorsProviderPushNotificationFcmv1ResponseContent = Record; - export interface UpdateGuardianFactorsProviderPushNotificationSnsResponseContent { aws_access_key_id?: string | null; aws_secret_access_key?: string | null; @@ -17275,8 +15943,6 @@ export interface UpdateOrganizationDiscoveryDomainResponseContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ - use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; /** The full domain where the TXT record should be added. */ @@ -17308,28 +15974,6 @@ export interface UpdatePhoneTemplateResponseContent { disabled: boolean; } -export interface UpdateRefreshTokenResponseContent { - /** The ID of the refresh token */ - id?: string; - /** ID of the user which can be used when interacting with other APIs. */ - user_id?: string; - created_at?: Management.RefreshTokenDate; - idle_expires_at?: Management.RefreshTokenDate; - expires_at?: Management.RefreshTokenDate; - device?: Management.RefreshTokenDevice; - /** ID of the client application granted with this refresh token */ - client_id?: string; - session_id?: (Management.RefreshTokenSessionId | undefined) | null; - /** True if the token is a rotating refresh token */ - rotating?: boolean; - /** A list of the resource server IDs associated to this refresh-token and their granted scopes */ - resource_servers?: Management.RefreshTokenResourceServer[]; - refresh_token_metadata?: (Management.RefreshTokenMetadata | undefined) | null; - last_exchanged_at?: Management.RefreshTokenDate; - /** Accepts any additional properties */ - [key: string]: any; -} - export interface UpdateResourceServerResponseContent { /** ID of the API (resource server). */ id?: string; @@ -17540,8 +16184,6 @@ export interface UpdateTenantSettingsResponseContent { */ skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; resource_parameter_profile?: Management.TenantSettingsResourceParameterProfile; - /** Whether Auth0 Guide (AI-powered assistance) is enabled for this tenant. */ - enable_ai_guide?: boolean; } export interface UpdateTokenQuota { @@ -18224,13 +16866,3 @@ export interface VerifyEmailTicketResponseContent { /** Accepts any additional properties */ [key: string]: any; } - -export interface X509CertificateCredential { - credential_type: Management.X509CertificateCredentialTypeEnum; - /** Friendly name for a credential. */ - name?: string; - /** PEM-formatted X509 certificate. Must be JSON escaped. */ - pem: string; -} - -export type X509CertificateCredentialTypeEnum = "x509_cert"; diff --git a/src/management/auth/BearerAuthProvider.ts b/src/management/auth/BearerAuthProvider.ts index a1c3cc9bb2..a374d6f5a6 100644 --- a/src/management/auth/BearerAuthProvider.ts +++ b/src/management/auth/BearerAuthProvider.ts @@ -3,30 +3,28 @@ import * as core from "../core/index.js"; import * as errors from "../errors/index.js"; -export namespace BearerAuthProvider { - export interface AuthOptions { - token: core.Supplier; - } - - export interface Options extends AuthOptions {} -} +const TOKEN_PARAM = "token" as const; export class BearerAuthProvider implements core.AuthProvider { - private readonly token: core.Supplier; + private readonly options: BearerAuthProvider.Options; constructor(options: BearerAuthProvider.Options) { - this.token = options.token; + this.options = options; } - public static canCreate(options: BearerAuthProvider.Options): boolean { - return options.token != null; + public static canCreate(options: Partial): boolean { + return options?.[TOKEN_PARAM] != null; } - public async getAuthRequest(arg?: { endpointMetadata?: core.EndpointMetadata }): Promise { - const token = await core.Supplier.get(this.token); + public async getAuthRequest({ + endpointMetadata, + }: { + endpointMetadata?: core.EndpointMetadata; + } = {}): Promise { + const token = await core.Supplier.get(this.options[TOKEN_PARAM]); if (token == null) { throw new errors.ManagementError({ - message: "Please specify a token by passing it in to the constructor", + message: BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE, }); } @@ -35,3 +33,15 @@ export class BearerAuthProvider implements core.AuthProvider { }; } } + +export namespace BearerAuthProvider { + export const AUTH_SCHEME = "bearerAuth" as const; + export const AUTH_CONFIG_ERROR_MESSAGE: string = + `Please provide '${TOKEN_PARAM}' when initializing the client` as const; + export type Options = AuthOptions; + export type AuthOptions = { [TOKEN_PARAM]: core.Supplier }; + + export function createInstance(options: Options): core.AuthProvider { + return new BearerAuthProvider(options); + } +} diff --git a/src/management/core/fetcher/EndpointSupplier.ts b/src/management/core/fetcher/EndpointSupplier.ts index 8079841c40..aad81f0d90 100644 --- a/src/management/core/fetcher/EndpointSupplier.ts +++ b/src/management/core/fetcher/EndpointSupplier.ts @@ -1,10 +1,10 @@ import type { EndpointMetadata } from "./EndpointMetadata.js"; import type { Supplier } from "./Supplier.js"; -type EndpointSupplierFn = (arg: { endpointMetadata: EndpointMetadata }) => T | Promise; +type EndpointSupplierFn = (arg: { endpointMetadata?: EndpointMetadata }) => T | Promise; export type EndpointSupplier = Supplier | EndpointSupplierFn; export const EndpointSupplier = { - get: async (supplier: EndpointSupplier, arg: { endpointMetadata: EndpointMetadata }): Promise => { + get: async (supplier: EndpointSupplier, arg: { endpointMetadata?: EndpointMetadata }): Promise => { if (typeof supplier === "function") { return (supplier as EndpointSupplierFn)(arg); } else { diff --git a/src/management/core/fetcher/Fetcher.ts b/src/management/core/fetcher/Fetcher.ts index 58bb0e3ef7..45cae32b23 100644 --- a/src/management/core/fetcher/Fetcher.ts +++ b/src/management/core/fetcher/Fetcher.ts @@ -20,7 +20,7 @@ export declare namespace Fetcher { url: string; method: string; contentType?: string; - headers?: Record | null | undefined>; + headers?: Record; queryParameters?: Record; body?: unknown; timeoutMs?: number; diff --git a/src/management/core/headers.ts b/src/management/core/headers.ts index 78ed8b500c..be45c4552a 100644 --- a/src/management/core/headers.ts +++ b/src/management/core/headers.ts @@ -1,7 +1,5 @@ -export function mergeHeaders( - ...headersArray: (Record | null | undefined)[] -): Record { - const result: Record = {}; +export function mergeHeaders(...headersArray: (Record | null | undefined)[]): Record { + const result: Record = {}; for (const [key, value] of headersArray .filter((headers) => headers != null) @@ -17,10 +15,10 @@ export function mergeHeaders( return result; } -export function mergeOnlyDefinedHeaders( - ...headersArray: (Record | null | undefined)[] -): Record { - const result: Record = {}; +export function mergeOnlyDefinedHeaders( + ...headersArray: (Record | null | undefined)[] +): Record { + const result: Record = {}; for (const [key, value] of headersArray .filter((headers) => headers != null) diff --git a/src/management/core/pagination/CustomPager.ts b/src/management/core/pagination/CustomPager.ts index 69cad4816d..9317831207 100644 --- a/src/management/core/pagination/CustomPager.ts +++ b/src/management/core/pagination/CustomPager.ts @@ -1,41 +1,14 @@ -import { HttpResponsePromise, type RawResponse, type WithRawResponse } from "../fetcher/index.js"; +import type { BaseRequestOptions, NormalizedClientOptions } from "../../BaseClient.js"; +import type { APIResponse } from "../fetcher/APIResponse.js"; +import type { Fetcher } from "../fetcher/Fetcher.js"; +import type { RawResponse } from "../fetcher/index.js"; /** - * Parser function type for custom pagination. - * SDK authors implement this to define how to extract items and determine pagination state. - * - * @template TItem The type of items in the paginated response. - * @template TRequest The type of the request object. - * @template TResponse The type of the API response. - */ -export type CustomPagerParser = ( - request: TRequest, - response: WithRawResponse, -) => Promise<{ - /** The request to use for fetching the next page, if any */ - nextRequest?: TRequest; - /** Whether there is a next page available */ - hasNextPage: boolean; - /** The request to use for fetching the previous page, if any */ - previousRequest?: TRequest; - /** Whether there is a previous page available */ - hasPreviousPage: boolean; - /** The items extracted from the current response */ - items: TItem[]; -}>; - -/** - * A custom pager for paginated API responses where the pagination logic - * must be implemented by the SDK author. - * - * SDK authors provide a parser callback to extract items and determine - * pagination state from responses. * * @template TItem The type of the items in the page. - * @template TRequest The type of the request object. * @template TResponse The type of the API response. */ -export class CustomPager implements AsyncIterable { +export class CustomPager implements AsyncIterable { /** The items from the current page */ public data: TItem[]; /** The raw HTTP response */ @@ -43,29 +16,21 @@ export class CustomPager implements AsyncIterable HttpResponsePromise; - currentRequest: TRequest; - }; - private parser: CustomPagerParser; - private nextRequest?: TRequest; - private previousRequest?: TRequest; + private sendRequest: (request: Fetcher.Args) => Promise>; + private nextRequest?: Fetcher.Args; + private previousRequest?: Fetcher.Args; private _hasNextPage: boolean; private _hasPreviousPage: boolean; - private constructor(args: { + constructor(args: { response: TResponse; rawResponse: RawResponse; items: TItem[]; hasNextPage: boolean; hasPreviousPage: boolean; - nextRequest?: TRequest; - previousRequest?: TRequest; - context: { - sendRequest: (request: TRequest) => HttpResponsePromise; - currentRequest: TRequest; - }; - parser: CustomPagerParser; + nextRequest?: Fetcher.Args; + previousRequest?: Fetcher.Args; + sendRequest: (request: Fetcher.Args) => Promise>; }) { this.response = args.response; this.rawResponse = args.rawResponse; @@ -74,8 +39,7 @@ export class CustomPager implements AsyncIterable implements AsyncIterable implements AsyncIterable({ request: this.nextRequest, data, rawResponse }); this.response = data; this.rawResponse = rawResponse; this.data = parsed.items; this._hasNextPage = parsed.hasNextPage; this._hasPreviousPage = parsed.hasPreviousPage; - this.context.currentRequest = this.nextRequest; this.nextRequest = parsed.nextRequest; this.previousRequest = parsed.previousRequest; return this; @@ -123,14 +103,20 @@ export class CustomPager implements AsyncIterable({ request: this.previousRequest, data, rawResponse }); this.response = data; this.rawResponse = rawResponse; this.data = parsed.items; this._hasNextPage = parsed.hasNextPage; this._hasPreviousPage = parsed.hasPreviousPage; - this.context.currentRequest = this.previousRequest; this.nextRequest = parsed.nextRequest; this.previousRequest = parsed.previousRequest; return this; @@ -154,35 +140,55 @@ export class CustomPager implements AsyncIterable(args: { - sendRequest: (request: TRequest) => HttpResponsePromise; - initialRequest: TRequest; - parse: CustomPagerParser; - }): Promise> { - const { data, rawResponse } = await args.sendRequest(args.initialRequest).withRawResponse(); - const parsed = await args.parse(args.initialRequest, { data, rawResponse }); - return new CustomPager({ - response: data, - rawResponse, - items: parsed.items, - hasNextPage: parsed.hasNextPage, - hasPreviousPage: parsed.hasPreviousPage, - nextRequest: parsed.nextRequest, - previousRequest: parsed.previousRequest, - context: { - sendRequest: args.sendRequest, - currentRequest: args.initialRequest, - }, - parser: args.parse, - }); +export async function createCustomPager({ + sendRequest, + initialHttpRequest, + clientOptions, +}: { + sendRequest: (request: Fetcher.Args) => Promise>; + initialHttpRequest: Fetcher.Args; + clientOptions: NormalizedClientOptions; + requestOptions?: BaseRequestOptions; +}): Promise> { + const response = await sendRequest(initialHttpRequest); + if (!response.ok) { + const reason = + response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason; + throw new Error(`Failed to fetch initial page: ${reason}`); } + const data = response.body; + const rawResponse = response.rawResponse; + const parsed = await parse({ request: initialHttpRequest, data, rawResponse }); + return new CustomPager({ + response: data, + rawResponse, + items: parsed.items, + hasNextPage: parsed.hasNextPage, + hasPreviousPage: parsed.hasPreviousPage, + nextRequest: parsed.nextRequest, + previousRequest: parsed.previousRequest, + sendRequest: sendRequest, + }); +} + +async function parse(args: { + request: Fetcher.Args; + data: TResponse; + rawResponse: RawResponse; +}): Promise<{ + nextRequest?: Fetcher.Args; + hasNextPage: boolean; + previousRequest?: Fetcher.Args; + hasPreviousPage: boolean; + items: TItem[]; +}> { + // Placeholder implementation. + // TODO: Replace this with actual parsing logic. + return { + items: [], + hasNextPage: false, + hasPreviousPage: false, + }; } diff --git a/src/management/core/pagination/exports.ts b/src/management/core/pagination/exports.ts index c386a05bdd..d3acc60b07 100644 --- a/src/management/core/pagination/exports.ts +++ b/src/management/core/pagination/exports.ts @@ -1,2 +1 @@ -export { CustomPager, type CustomPagerParser } from "./CustomPager.js"; export type { Page } from "./Page.js"; diff --git a/src/management/core/pagination/index.ts b/src/management/core/pagination/index.ts index 97d348c1bf..fe9dc949ab 100644 --- a/src/management/core/pagination/index.ts +++ b/src/management/core/pagination/index.ts @@ -1,2 +1,2 @@ -export { CustomPager, type CustomPagerParser } from "./CustomPager.js"; +export { CustomPager, createCustomPager } from "./CustomPager.js"; export { Page } from "./Page.js"; diff --git a/src/management/tests/mock-server/mockEndpointBuilder.ts b/src/management/tests/mock-server/mockEndpointBuilder.ts index fb8389a226..703c945ba1 100644 --- a/src/management/tests/mock-server/mockEndpointBuilder.ts +++ b/src/management/tests/mock-server/mockEndpointBuilder.ts @@ -4,7 +4,7 @@ import { url } from "../../core"; import { toJson } from "../../core/json"; import { withFormUrlEncoded } from "./withFormUrlEncoded"; import { withHeaders } from "./withHeaders"; -import { withJson } from "./withJson"; +import { withJson, type WithJsonOptions } from "./withJson"; type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head"; @@ -26,7 +26,7 @@ interface RequestHeadersStage extends RequestBodyStage, ResponseStage { } interface RequestBodyStage extends ResponseStage { - jsonBody(body: unknown): ResponseStage; + jsonBody(body: unknown, options?: WithJsonOptions): ResponseStage; formUrlEncodedBody(body: unknown): ResponseStage; } @@ -129,11 +129,11 @@ class RequestBuilder implements MethodStage, RequestHeadersStage, RequestBodySta return this; } - jsonBody(body: unknown): ResponseStage { + jsonBody(body: unknown, options?: WithJsonOptions): ResponseStage { if (body === undefined) { throw new Error("Undefined is not valid JSON. Do not call jsonBody if you want an empty body."); } - this.predicates.push((resolver) => withJson(body, resolver)); + this.predicates.push((resolver) => withJson(body, resolver, options)); return this; } diff --git a/src/management/tests/mock-server/withFormUrlEncoded.ts b/src/management/tests/mock-server/withFormUrlEncoded.ts index a5467577c2..dfae7e5062 100644 --- a/src/management/tests/mock-server/withFormUrlEncoded.ts +++ b/src/management/tests/mock-server/withFormUrlEncoded.ts @@ -18,13 +18,22 @@ export function withFormUrlEncoded(expectedBody: unknown, resolver: HttpResponse clonedRequest = request.clone(); bodyText = await clonedRequest.text(); if (bodyText === "") { - console.error("Request body is empty, expected a form-urlencoded body."); - return passthrough(); - } - const params = new URLSearchParams(bodyText); - actualBody = {}; - for (const [key, value] of params.entries()) { - actualBody[key] = value; + // Empty body is valid if expected body is also empty + const isExpectedEmpty = + expectedBody != null && + typeof expectedBody === "object" && + Object.keys(expectedBody as Record).length === 0; + if (!isExpectedEmpty) { + console.error("Request body is empty, expected a form-urlencoded body."); + return passthrough(); + } + actualBody = {}; + } else { + const params = new URLSearchParams(bodyText); + actualBody = {}; + for (const [key, value] of params.entries()) { + actualBody[key] = value; + } } } catch (error) { console.error(`Error processing form-urlencoded request body:\n\tError: ${error}\n\tBody: ${bodyText}`); diff --git a/src/management/tests/mock-server/withJson.ts b/src/management/tests/mock-server/withJson.ts index e8b30a0224..9047b87e94 100644 --- a/src/management/tests/mock-server/withJson.ts +++ b/src/management/tests/mock-server/withJson.ts @@ -2,12 +2,26 @@ import { type HttpResponseResolver, passthrough } from "msw"; import { fromJson, toJson } from "../../core/json"; +export interface WithJsonOptions { + /** + * List of field names to ignore when comparing request bodies. + * This is useful for pagination cursor fields that change between requests. + */ + ignoredFields?: string[]; +} + /** * Creates a request matcher that validates if the request JSON body exactly matches the expected object * @param expectedBody - The exact body object to match against * @param resolver - Response resolver to execute if body matches + * @param options - Optional configuration including fields to ignore */ -export function withJson(expectedBody: unknown, resolver: HttpResponseResolver): HttpResponseResolver { +export function withJson( + expectedBody: unknown, + resolver: HttpResponseResolver, + options?: WithJsonOptions, +): HttpResponseResolver { + const ignoredFields = options?.ignoredFields ?? []; return async (args) => { const { request } = args; @@ -28,7 +42,8 @@ export function withJson(expectedBody: unknown, resolver: HttpResponseResolver): } const mismatches = findMismatches(actualBody, expectedBody); - if (Object.keys(mismatches).filter((key) => !key.startsWith("pagination.")).length > 0) { + const filteredMismatches = Object.keys(mismatches).filter((key) => !ignoredFields.includes(key)); + if (filteredMismatches.length > 0) { console.error("JSON body mismatch:", toJson(mismatches, undefined, 2)); return passthrough(); } diff --git a/src/management/tests/unit/fetcher/Fetcher.test.ts b/src/management/tests/unit/fetcher/Fetcher.test.ts index 21034975cb..ac3285d1a6 100644 --- a/src/management/tests/unit/fetcher/Fetcher.test.ts +++ b/src/management/tests/unit/fetcher/Fetcher.test.ts @@ -118,7 +118,7 @@ describe("Test fetcherImpl", () => { const { value } = await reader.read(); const decoder = new TextDecoder(); const streamContent = decoder.decode(value); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); @@ -164,7 +164,7 @@ describe("Test fetcherImpl", () => { const { value } = await reader.read(); const decoder = new TextDecoder(); const streamContent = decoder.decode(value); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); @@ -208,7 +208,7 @@ describe("Test fetcherImpl", () => { expect(arrayBuffer).toBeInstanceOf(ArrayBuffer); const decoder = new TextDecoder(); const streamContent = decoder.decode(new Uint8Array(arrayBuffer)); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); @@ -255,7 +255,7 @@ describe("Test fetcherImpl", () => { expect(bytes).toBeInstanceOf(Uint8Array); const decoder = new TextDecoder(); const streamContent = decoder.decode(bytes); - expect(streamContent).toBe("This is a test file!\n"); + expect(streamContent.trim()).toBe("This is a test file!"); expect(body.bodyUsed).toBe(true); } }); diff --git a/src/management/tests/wire/actions.test.ts b/src/management/tests/wire/actions.test.ts index f7c48732ae..ee769e3527 100644 --- a/src/management/tests/wire/actions.test.ts +++ b/src/management/tests/wire/actions.test.ts @@ -29,7 +29,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [{}], }, ], }; @@ -65,7 +64,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [{}], }, ], }; @@ -204,7 +202,6 @@ describe("ActionsClient", () => { created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", supported_triggers: [{ id: "id" }], - modules: [{}], }, installed_integration_id: "installed_integration_id", integration: { @@ -232,14 +229,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }; server .mockEndpoint() @@ -326,7 +315,6 @@ describe("ActionsClient", () => { id: "id", }, ], - modules: [{}], }, installed_integration_id: "installed_integration_id", integration: { @@ -356,14 +344,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }); }); @@ -531,7 +511,6 @@ describe("ActionsClient", () => { created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", supported_triggers: [{ id: "id" }], - modules: [{}], }, installed_integration_id: "installed_integration_id", integration: { @@ -559,14 +538,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }; server .mockEndpoint() @@ -645,7 +616,6 @@ describe("ActionsClient", () => { id: "id", }, ], - modules: [{}], }, installed_integration_id: "installed_integration_id", integration: { @@ -675,14 +645,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }); }); @@ -926,7 +888,6 @@ describe("ActionsClient", () => { created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", supported_triggers: [{ id: "id" }], - modules: [{}], }, installed_integration_id: "installed_integration_id", integration: { @@ -954,14 +915,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }; server .mockEndpoint() @@ -1041,7 +994,6 @@ describe("ActionsClient", () => { id: "id", }, ], - modules: [{}], }, installed_integration_id: "installed_integration_id", integration: { @@ -1071,14 +1023,6 @@ describe("ActionsClient", () => { status: "pending", built_at: "2024-01-15T09:30:00Z", deploy: true, - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }); }); @@ -1214,14 +1158,6 @@ describe("ActionsClient", () => { binding_policy: "trigger-bound", }, ], - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }; server .mockEndpoint() @@ -1291,14 +1227,6 @@ describe("ActionsClient", () => { binding_policy: "trigger-bound", }, ], - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }); }); diff --git a/src/management/tests/wire/actions/versions.test.ts b/src/management/tests/wire/actions/versions.test.ts index f9075face2..56dcaafd40 100644 --- a/src/management/tests/wire/actions/versions.test.ts +++ b/src/management/tests/wire/actions/versions.test.ts @@ -29,7 +29,6 @@ describe("VersionsClient", () => { created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", supported_triggers: [{ id: "id" }], - modules: [{}], }, ], }; @@ -65,7 +64,6 @@ describe("VersionsClient", () => { id: "id", }, ], - modules: [{}], }, ], }; @@ -189,14 +187,6 @@ describe("VersionsClient", () => { binding_policy: "trigger-bound", }, ], - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }; server .mockEndpoint() @@ -266,14 +256,6 @@ describe("VersionsClient", () => { binding_policy: "trigger-bound", }, ], - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }); }); @@ -404,14 +386,6 @@ describe("VersionsClient", () => { binding_policy: "trigger-bound", }, ], - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }; server .mockEndpoint() @@ -481,14 +455,6 @@ describe("VersionsClient", () => { binding_policy: "trigger-bound", }, ], - modules: [ - { - module_id: "module_id", - module_name: "module_name", - module_version_id: "module_version_id", - module_version_number: 1, - }, - ], }); }); diff --git a/src/management/tests/wire/clientGrants.test.ts b/src/management/tests/wire/clientGrants.test.ts index 846c2f5957..bb7f47a7a3 100644 --- a/src/management/tests/wire/clientGrants.test.ts +++ b/src/management/tests/wire/clientGrants.test.ts @@ -69,13 +69,7 @@ describe("ClientGrantsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/client-grants") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/client-grants").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.clientGrants.list(); @@ -87,13 +81,7 @@ describe("ClientGrantsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/client-grants") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/client-grants").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.clientGrants.list(); @@ -105,13 +93,7 @@ describe("ClientGrantsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/client-grants") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/client-grants").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.clientGrants.list(); diff --git a/src/management/tests/wire/clientGrants/organizations.test.ts b/src/management/tests/wire/clientGrants/organizations.test.ts index 6f49f8f770..8cd2d47ee5 100644 --- a/src/management/tests/wire/clientGrants/organizations.test.ts +++ b/src/management/tests/wire/clientGrants/organizations.test.ts @@ -53,7 +53,7 @@ describe("OrganizationsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/client-grants/id/organizations") .respondWith() .statusCode(400) @@ -71,7 +71,7 @@ describe("OrganizationsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/client-grants/id/organizations") .respondWith() .statusCode(401) @@ -89,7 +89,7 @@ describe("OrganizationsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/client-grants/id/organizations") .respondWith() .statusCode(403) @@ -107,7 +107,7 @@ describe("OrganizationsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/client-grants/id/organizations") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/clients.test.ts b/src/management/tests/wire/clients.test.ts index a39572e646..8927f0556f 100644 --- a/src/management/tests/wire/clients.test.ts +++ b/src/management/tests/wire/clients.test.ts @@ -401,7 +401,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [{ audience: "audience", scope: ["scope"] }], }, default_organization: { organization_id: "organization_id", flows: ["client_credentials"] }, organization_usage: "deny", @@ -681,12 +680,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [ - { - audience: "audience", - scope: ["scope"], - }, - ], }, default_organization: { organization_id: "organization_id", @@ -1028,7 +1021,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [{ audience: "audience", scope: ["scope"] }], }, default_organization: { organization_id: "organization_id", flows: ["client_credentials"] }, organization_usage: "deny", @@ -1302,12 +1294,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [ - { - audience: "audience", - scope: ["scope"], - }, - ], }, default_organization: { organization_id: "organization_id", @@ -1662,7 +1648,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [{ audience: "audience", scope: ["scope"] }], }, default_organization: { organization_id: "organization_id", flows: ["client_credentials"] }, organization_usage: "deny", @@ -1940,12 +1925,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [ - { - audience: "audience", - scope: ["scope"], - }, - ], }, default_organization: { organization_id: "organization_id", @@ -2277,7 +2256,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [{ audience: "audience", scope: ["scope"] }], }, default_organization: { organization_id: "organization_id", flows: ["client_credentials"] }, organization_usage: "deny", @@ -2554,12 +2532,6 @@ describe("ClientsClient", () => { infinite_token_lifetime: true, idle_token_lifetime: 1, infinite_idle_token_lifetime: true, - policies: [ - { - audience: "audience", - scope: ["scope"], - }, - ], }, default_organization: { organization_id: "organization_id", diff --git a/src/management/tests/wire/clients/connections.test.ts b/src/management/tests/wire/clients/connections.test.ts index 2b28f092bb..4dbc07fe93 100644 --- a/src/management/tests/wire/clients/connections.test.ts +++ b/src/management/tests/wire/clients/connections.test.ts @@ -76,7 +76,7 @@ describe("ConnectionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/clients/id/connections") .respondWith() .statusCode(400) @@ -94,7 +94,7 @@ describe("ConnectionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/clients/id/connections") .respondWith() .statusCode(401) @@ -112,7 +112,7 @@ describe("ConnectionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/clients/id/connections") .respondWith() .statusCode(403) @@ -130,7 +130,7 @@ describe("ConnectionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/clients/id/connections") .respondWith() .statusCode(404) @@ -148,7 +148,7 @@ describe("ConnectionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/clients/id/connections") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/connectionProfiles.test.ts b/src/management/tests/wire/connectionProfiles.test.ts index 766af9a6cb..cc0fe8af86 100644 --- a/src/management/tests/wire/connectionProfiles.test.ts +++ b/src/management/tests/wire/connectionProfiles.test.ts @@ -56,7 +56,7 @@ describe("ConnectionProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connection-profiles") .respondWith() .statusCode(400) @@ -74,7 +74,7 @@ describe("ConnectionProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connection-profiles") .respondWith() .statusCode(401) @@ -92,7 +92,7 @@ describe("ConnectionProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connection-profiles") .respondWith() .statusCode(403) @@ -110,7 +110,7 @@ describe("ConnectionProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connection-profiles") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/connections.test.ts b/src/management/tests/wire/connections.test.ts index 1c9cb72c62..66cab1f9e7 100644 --- a/src/management/tests/wire/connections.test.ts +++ b/src/management/tests/wire/connections.test.ts @@ -76,13 +76,7 @@ describe("ConnectionsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/connections") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/connections").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.connections.list(); @@ -94,13 +88,7 @@ describe("ConnectionsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/connections") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/connections").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.connections.list(); @@ -112,13 +100,7 @@ describe("ConnectionsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/connections") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/connections").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.connections.list(); @@ -130,13 +112,7 @@ describe("ConnectionsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/connections") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/connections").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.connections.list(); diff --git a/src/management/tests/wire/connections/clients.test.ts b/src/management/tests/wire/connections/clients.test.ts index 103221caf2..8e5eb76582 100644 --- a/src/management/tests/wire/connections/clients.test.ts +++ b/src/management/tests/wire/connections/clients.test.ts @@ -43,7 +43,7 @@ describe("ClientsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connections/id/clients") .respondWith() .statusCode(400) @@ -61,7 +61,7 @@ describe("ClientsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connections/id/clients") .respondWith() .statusCode(401) @@ -79,7 +79,7 @@ describe("ClientsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connections/id/clients") .respondWith() .statusCode(403) @@ -97,7 +97,7 @@ describe("ClientsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connections/id/clients") .respondWith() .statusCode(404) @@ -115,7 +115,7 @@ describe("ClientsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/connections/id/clients") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/customDomains.test.ts b/src/management/tests/wire/customDomains.test.ts index fedc85b8c2..3973e0ae87 100644 --- a/src/management/tests/wire/customDomains.test.ts +++ b/src/management/tests/wire/customDomains.test.ts @@ -14,7 +14,6 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, - is_default: true, status: "pending_verification", type: "auth0_managed_certs", origin_domain_name: "origin_domain_name", @@ -38,6 +37,8 @@ describe("CustomDomainsClient", () => { server.mockEndpoint().get("/custom-domains").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.customDomains.list({ + take: 1, + from: "from", q: "q", fields: "fields", include_fields: true, @@ -48,7 +49,6 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, - is_default: true, status: "pending_verification", type: "auth0_managed_certs", origin_domain_name: "origin_domain_name", @@ -302,7 +302,6 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, - is_default: true, status: "pending_verification", type: "auth0_managed_certs", origin_domain_name: "origin_domain_name", @@ -329,7 +328,6 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, - is_default: true, status: "pending_verification", type: "auth0_managed_certs", origin_domain_name: "origin_domain_name", @@ -508,7 +506,6 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, - is_default: true, status: "pending_verification", type: "auth0_managed_certs", verification: { @@ -541,7 +538,6 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, - is_default: true, status: "pending_verification", type: "auth0_managed_certs", verification: { diff --git a/src/management/tests/wire/eventStreams.test.ts b/src/management/tests/wire/eventStreams.test.ts index 917ec616a4..214fd2d83c 100644 --- a/src/management/tests/wire/eventStreams.test.ts +++ b/src/management/tests/wire/eventStreams.test.ts @@ -9,66 +9,49 @@ describe("EventStreamsClient", () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawResponseBody = { - eventStreams: [ - { - id: "id", - name: "name", - subscriptions: [{}], - destination: { - type: "webhook", - configuration: { - webhook_endpoint: "webhook_endpoint", - webhook_authorization: { method: "basic", username: "username" }, - }, + const rawResponseBody = [ + { + id: "id", + name: "name", + subscriptions: [{}], + destination: { + type: "webhook", + configuration: { + webhook_endpoint: "webhook_endpoint", + webhook_authorization: { method: "basic", username: "username" }, }, - status: "enabled", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", }, - ], - next: "next", - }; - server - .mockEndpoint({ once: false }) - .get("/event-streams") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); + status: "enabled", + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + }, + ]; + server.mockEndpoint().get("/event-streams").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const expected = { - eventStreams: [ - { - id: "id", - name: "name", - subscriptions: [{}], - destination: { - type: "webhook", - configuration: { - webhook_endpoint: "webhook_endpoint", - webhook_authorization: { - method: "basic", - username: "username", - }, - }, - }, - status: "enabled", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - }; - const page = await client.eventStreams.list({ + const response = await client.eventStreams.list({ from: "from", take: 1, }); - - expect(expected.eventStreams).toEqual(page.data); - expect(page.hasNextPage()).toBe(true); - const nextPage = await page.getNextPage(); - expect(expected.eventStreams).toEqual(nextPage.data); + expect(response).toEqual([ + { + id: "id", + name: "name", + subscriptions: [{}], + destination: { + type: "webhook", + configuration: { + webhook_endpoint: "webhook_endpoint", + webhook_authorization: { + method: "basic", + username: "username", + }, + }, + }, + status: "enabled", + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + }, + ]); }); test("list (2)", async () => { @@ -76,13 +59,7 @@ describe("EventStreamsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/event-streams") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/event-streams").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.eventStreams.list(); @@ -94,13 +71,7 @@ describe("EventStreamsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/event-streams") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/event-streams").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.eventStreams.list(); @@ -112,13 +83,7 @@ describe("EventStreamsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/event-streams") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/event-streams").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.eventStreams.list(); @@ -130,13 +95,7 @@ describe("EventStreamsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/event-streams") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/event-streams").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.eventStreams.list(); diff --git a/src/management/tests/wire/flows/executions.test.ts b/src/management/tests/wire/flows/executions.test.ts index 6920753155..09ce671c7f 100644 --- a/src/management/tests/wire/flows/executions.test.ts +++ b/src/management/tests/wire/flows/executions.test.ts @@ -64,7 +64,7 @@ describe("ExecutionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/flows/flow_id/executions") .respondWith() .statusCode(400) @@ -82,7 +82,7 @@ describe("ExecutionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/flows/flow_id/executions") .respondWith() .statusCode(401) @@ -100,7 +100,7 @@ describe("ExecutionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/flows/flow_id/executions") .respondWith() .statusCode(403) @@ -118,7 +118,7 @@ describe("ExecutionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/flows/flow_id/executions") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/groups.test.ts b/src/management/tests/wire/groups.test.ts deleted file mode 100644 index 0ece34f33b..0000000000 --- a/src/management/tests/wire/groups.test.ts +++ /dev/null @@ -1,236 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import * as Management from "../../api/index"; -import { ManagementClient } from "../../Client"; -import { mockServerPool } from "../mock-server/MockServerPool"; - -describe("GroupsClient", () => { - test("list (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - groups: [ - { - id: "id", - name: "name", - external_id: "external_id", - connection_id: "connection_id", - organization_id: "organization_id", - tenant_name: "tenant_name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - start: 1.1, - limit: 1.1, - total: 1.1, - }; - server - .mockEndpoint({ once: false }) - .get("/groups") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const expected = { - groups: [ - { - id: "id", - name: "name", - external_id: "external_id", - connection_id: "connection_id", - organization_id: "organization_id", - tenant_name: "tenant_name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - start: 1.1, - limit: 1.1, - total: 1.1, - }; - const page = await client.groups.list({ - connection_id: "connection_id", - name: "name", - external_id: "external_id", - fields: "fields", - include_fields: true, - from: "from", - take: 1, - }); - - expect(expected.groups).toEqual(page.data); - expect(page.hasNextPage()).toBe(true); - const nextPage = await page.getNextPage(); - expect(expected.groups).toEqual(nextPage.data); - }); - - test("list (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.list(); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("list (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.list(); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("list (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.list(); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("list (5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.list(); - }).rejects.toThrow(Management.TooManyRequestsError); - }); - - test("get (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - id: "id", - name: "name", - external_id: "external_id", - connection_id: "connection_id", - organization_id: "organization_id", - tenant_name: "tenant_name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - }; - server.mockEndpoint().get("/groups/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - - const response = await client.groups.get("id"); - expect(response).toEqual({ - id: "id", - name: "name", - external_id: "external_id", - connection_id: "connection_id", - organization_id: "organization_id", - tenant_name: "tenant_name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - }); - }); - - test("get (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.get("id"); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("get (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.get("id"); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("get (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.get("id"); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("get (5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.get("id"); - }).rejects.toThrow(Management.NotFoundError); - }); - - test("get (6)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.get("id"); - }).rejects.toThrow(Management.TooManyRequestsError); - }); -}); diff --git a/src/management/tests/wire/groups/members.test.ts b/src/management/tests/wire/groups/members.test.ts deleted file mode 100644 index 6933b87a2d..0000000000 --- a/src/management/tests/wire/groups/members.test.ts +++ /dev/null @@ -1,128 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import * as Management from "../../../api/index"; -import { ManagementClient } from "../../../Client"; -import { mockServerPool } from "../../mock-server/MockServerPool"; - -describe("MembersClient", () => { - test("get (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - members: [ - { - id: "id", - member_type: "user", - type: "connection", - connection_id: "connection_id", - created_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - }; - server - .mockEndpoint({ once: false }) - .get("/groups/id/members") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const expected = { - members: [ - { - id: "id", - member_type: "user", - type: "connection", - connection_id: "connection_id", - created_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - }; - const page = await client.groups.members.get("id", { - fields: "fields", - include_fields: true, - from: "from", - take: 1, - }); - - expect(expected.members).toEqual(page.data); - expect(page.hasNextPage()).toBe(true); - const nextPage = await page.getNextPage(); - expect(expected.members).toEqual(nextPage.data); - }); - - test("get (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups/id/members") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("get (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups/id/members") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("get (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups/id/members") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("get (5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/groups/id/members") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow(Management.TooManyRequestsError); - }); -}); diff --git a/src/management/tests/wire/guardian/factors/pushNotification.test.ts b/src/management/tests/wire/guardian/factors/pushNotification.test.ts index e25fd885ff..db64d5ff4b 100644 --- a/src/management/tests/wire/guardian/factors/pushNotification.test.ts +++ b/src/management/tests/wire/guardian/factors/pushNotification.test.ts @@ -81,84 +81,6 @@ describe("PushNotificationClient", () => { }); test("setApnsProvider (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { sandbox: true, bundle_id: "bundle_id" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/apns") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.guardian.factors.pushNotification.setApnsProvider(); - expect(response).toEqual({ - sandbox: true, - bundle_id: "bundle_id", - }); - }); - - test("setApnsProvider (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/apns") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setApnsProvider(); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("setApnsProvider (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/apns") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setApnsProvider(); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("setApnsProvider (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/apns") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setApnsProvider(); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("updateApnsProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -172,14 +94,14 @@ describe("PushNotificationClient", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.guardian.factors.pushNotification.updateApnsProvider(); + const response = await client.guardian.factors.pushNotification.setApnsProvider({}); expect(response).toEqual({ sandbox: true, bundle_id: "bundle_id", }); }); - test("updateApnsProvider (2)", async () => { + test("setApnsProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -194,11 +116,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateApnsProvider(); + return await client.guardian.factors.pushNotification.setApnsProvider({}); }).rejects.toThrow(Management.BadRequestError); }); - test("updateApnsProvider (3)", async () => { + test("setApnsProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -213,11 +135,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateApnsProvider(); + return await client.guardian.factors.pushNotification.setApnsProvider({}); }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateApnsProvider (4)", async () => { + test("setApnsProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -232,88 +154,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateApnsProvider(); + return await client.guardian.factors.pushNotification.setApnsProvider({}); }).rejects.toThrow(Management.ForbiddenError); }); test("setFcmProvider (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcm") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.guardian.factors.pushNotification.setFcmProvider(); - expect(response).toEqual({ - key: "value", - }); - }); - - test("setFcmProvider (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcm") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmProvider(); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("setFcmProvider (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcm") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmProvider(); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("setFcmProvider (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcm") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmProvider(); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("updateFcmProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -327,13 +172,13 @@ describe("PushNotificationClient", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.guardian.factors.pushNotification.updateFcmProvider(); + const response = await client.guardian.factors.pushNotification.setFcmProvider({}); expect(response).toEqual({ key: "value", }); }); - test("updateFcmProvider (2)", async () => { + test("setFcmProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -348,11 +193,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateFcmProvider(); + return await client.guardian.factors.pushNotification.setFcmProvider({}); }).rejects.toThrow(Management.BadRequestError); }); - test("updateFcmProvider (3)", async () => { + test("setFcmProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -367,11 +212,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateFcmProvider(); + return await client.guardian.factors.pushNotification.setFcmProvider({}); }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateFcmProvider (4)", async () => { + test("setFcmProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -386,88 +231,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateFcmProvider(); + return await client.guardian.factors.pushNotification.setFcmProvider({}); }).rejects.toThrow(Management.ForbiddenError); }); test("setFcmv1Provider (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcmv1") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.guardian.factors.pushNotification.setFcmv1Provider(); - expect(response).toEqual({ - key: "value", - }); - }); - - test("setFcmv1Provider (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcmv1") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmv1Provider(); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("setFcmv1Provider (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcmv1") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmv1Provider(); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("setFcmv1Provider (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .put("/guardian/factors/push-notification/providers/fcmv1") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmv1Provider(); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("updateFcmv1Provider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -481,13 +249,13 @@ describe("PushNotificationClient", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.guardian.factors.pushNotification.updateFcmv1Provider(); + const response = await client.guardian.factors.pushNotification.setFcmv1Provider({}); expect(response).toEqual({ key: "value", }); }); - test("updateFcmv1Provider (2)", async () => { + test("setFcmv1Provider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -502,11 +270,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateFcmv1Provider(); + return await client.guardian.factors.pushNotification.setFcmv1Provider({}); }).rejects.toThrow(Management.BadRequestError); }); - test("updateFcmv1Provider (3)", async () => { + test("setFcmv1Provider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -521,11 +289,11 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateFcmv1Provider(); + return await client.guardian.factors.pushNotification.setFcmv1Provider({}); }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateFcmv1Provider (4)", async () => { + test("setFcmv1Provider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -540,7 +308,7 @@ describe("PushNotificationClient", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateFcmv1Provider(); + return await client.guardian.factors.pushNotification.setFcmv1Provider({}); }).rejects.toThrow(Management.ForbiddenError); }); diff --git a/src/management/tests/wire/organizations.test.ts b/src/management/tests/wire/organizations.test.ts index 8b5ec96b70..425c1074ec 100644 --- a/src/management/tests/wire/organizations.test.ts +++ b/src/management/tests/wire/organizations.test.ts @@ -53,13 +53,7 @@ describe("OrganizationsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/organizations") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/organizations").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.organizations.list(); @@ -71,13 +65,7 @@ describe("OrganizationsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/organizations") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/organizations").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.organizations.list(); @@ -89,13 +77,7 @@ describe("OrganizationsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/organizations") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/organizations").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.organizations.list(); @@ -107,13 +89,7 @@ describe("OrganizationsClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/organizations") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/organizations").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.organizations.list(); diff --git a/src/management/tests/wire/organizations/discoveryDomains.test.ts b/src/management/tests/wire/organizations/discoveryDomains.test.ts index 22aacc3783..fa9187c74d 100644 --- a/src/management/tests/wire/organizations/discoveryDomains.test.ts +++ b/src/management/tests/wire/organizations/discoveryDomains.test.ts @@ -16,7 +16,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }, @@ -37,7 +36,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }, @@ -60,7 +58,7 @@ describe("DiscoveryDomainsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/discovery-domains") .respondWith() .statusCode(400) @@ -78,7 +76,7 @@ describe("DiscoveryDomainsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/discovery-domains") .respondWith() .statusCode(401) @@ -96,7 +94,7 @@ describe("DiscoveryDomainsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/discovery-domains") .respondWith() .statusCode(403) @@ -114,7 +112,7 @@ describe("DiscoveryDomainsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/discovery-domains") .respondWith() .statusCode(404) @@ -132,7 +130,7 @@ describe("DiscoveryDomainsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/discovery-domains") .respondWith() .statusCode(429) @@ -152,7 +150,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }; @@ -172,7 +169,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }); @@ -304,127 +300,6 @@ describe("DiscoveryDomainsClient", () => { }).rejects.toThrow(Management.TooManyRequestsError); }); - test("getByName (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - id: "id", - domain: "domain", - status: "pending", - use_for_organization_discovery: true, - verification_txt: "verification_txt", - verification_host: "verification_host", - }; - server - .mockEndpoint() - .get("/organizations/id/discovery-domains/name/discovery_domain") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); - expect(response).toEqual({ - id: "id", - domain: "domain", - status: "pending", - use_for_organization_discovery: true, - verification_txt: "verification_txt", - verification_host: "verification_host", - }); - }); - - test("getByName (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/organizations/id/discovery-domains/name/discovery_domain") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("getByName (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/organizations/id/discovery-domains/name/discovery_domain") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("getByName (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/organizations/id/discovery-domains/name/discovery_domain") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("getByName (5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/organizations/id/discovery-domains/name/discovery_domain") - .respondWith() - .statusCode(404) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); - }).rejects.toThrow(Management.NotFoundError); - }); - - test("getByName (6)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .get("/organizations/id/discovery-domains/name/discovery_domain") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.organizations.discoveryDomains.getByName("id", "discovery_domain"); - }).rejects.toThrow(Management.TooManyRequestsError); - }); - test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); @@ -433,7 +308,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }; @@ -450,7 +324,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }); @@ -641,7 +514,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }; @@ -659,7 +531,6 @@ describe("DiscoveryDomainsClient", () => { id: "id", domain: "domain", status: "pending", - use_for_organization_discovery: true, verification_txt: "verification_txt", verification_host: "verification_host", }); diff --git a/src/management/tests/wire/organizations/members.test.ts b/src/management/tests/wire/organizations/members.test.ts index 6cf8ea82cb..787ad54856 100644 --- a/src/management/tests/wire/organizations/members.test.ts +++ b/src/management/tests/wire/organizations/members.test.ts @@ -52,7 +52,7 @@ describe("MembersClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/members") .respondWith() .statusCode(400) @@ -70,7 +70,7 @@ describe("MembersClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/members") .respondWith() .statusCode(401) @@ -88,7 +88,7 @@ describe("MembersClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/members") .respondWith() .statusCode(403) @@ -106,7 +106,7 @@ describe("MembersClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/organizations/id/members") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/prompts/rendering.test.ts b/src/management/tests/wire/prompts/rendering.test.ts index 373015fe3b..c9c96c7828 100644 --- a/src/management/tests/wire/prompts/rendering.test.ts +++ b/src/management/tests/wire/prompts/rendering.test.ts @@ -12,11 +12,8 @@ describe("RenderingClient", () => { const rawResponseBody = { configs: [ { - tenant: "tenant", - prompt: "prompt", - screen: "screen", rendering_mode: "advanced", - context_configuration: ["branding.settings"], + context_configuration: ["context_configuration"], default_head_tags_disabled: true, use_page_template: true, head_tags: [{}], @@ -37,11 +34,8 @@ describe("RenderingClient", () => { const expected = { configs: [ { - tenant: "tenant", - prompt: "prompt", - screen: "screen", rendering_mode: "advanced", - context_configuration: ["branding.settings"], + context_configuration: ["context_configuration"], default_head_tags_disabled: true, use_page_template: true, head_tags: [{}], @@ -391,7 +385,7 @@ describe("RenderingClient", () => { prompt: "prompt", screen: "screen", rendering_mode: "advanced", - context_configuration: ["branding.settings"], + context_configuration: ["context_configuration"], default_head_tags_disabled: true, use_page_template: true, head_tags: [{ tag: "tag", attributes: { key: "value" }, content: "content" }], @@ -416,7 +410,7 @@ describe("RenderingClient", () => { prompt: "prompt", screen: "screen", rendering_mode: "advanced", - context_configuration: ["branding.settings"], + context_configuration: ["context_configuration"], default_head_tags_disabled: true, use_page_template: true, head_tags: [ @@ -563,7 +557,7 @@ describe("RenderingClient", () => { const rawRequestBody = {}; const rawResponseBody = { rendering_mode: "advanced", - context_configuration: ["branding.settings"], + context_configuration: ["context_configuration"], default_head_tags_disabled: true, use_page_template: true, head_tags: [{ tag: "tag", attributes: { key: "value" }, content: "content" }], @@ -586,7 +580,7 @@ describe("RenderingClient", () => { const response = await client.prompts.rendering.update("login", "login"); expect(response).toEqual({ rendering_mode: "advanced", - context_configuration: ["branding.settings"], + context_configuration: ["context_configuration"], default_head_tags_disabled: true, use_page_template: true, head_tags: [ diff --git a/src/management/tests/wire/refreshTokens.test.ts b/src/management/tests/wire/refreshTokens.test.ts index b80d99f673..83e1ff5f58 100644 --- a/src/management/tests/wire/refreshTokens.test.ts +++ b/src/management/tests/wire/refreshTokens.test.ts @@ -27,7 +27,6 @@ describe("RefreshTokensClient", () => { session_id: "session_id", rotating: true, resource_servers: [{ audience: "audience", scopes: "scopes" }], - refresh_token_metadata: { key: "value" }, last_exchanged_at: "2024-01-15T09:30:00Z", }; server.mockEndpoint().get("/refresh-tokens/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -56,9 +55,6 @@ describe("RefreshTokensClient", () => { scopes: "scopes", }, ], - refresh_token_metadata: { - key: "value", - }, last_exchanged_at: "2024-01-15T09:30:00Z", }); }); @@ -192,164 +188,4 @@ describe("RefreshTokensClient", () => { return await client.refreshTokens.delete("id"); }).rejects.toThrow(Management.TooManyRequestsError); }); - - test("update (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { - id: "id", - user_id: "user_id", - created_at: "2024-01-15T09:30:00Z", - idle_expires_at: "2024-01-15T09:30:00Z", - expires_at: "2024-01-15T09:30:00Z", - device: { - initial_ip: "initial_ip", - initial_asn: "initial_asn", - initial_user_agent: "initial_user_agent", - last_ip: "last_ip", - last_asn: "last_asn", - last_user_agent: "last_user_agent", - }, - client_id: "client_id", - session_id: "session_id", - rotating: true, - resource_servers: [{ audience: "audience", scopes: "scopes" }], - refresh_token_metadata: { key: "value" }, - last_exchanged_at: "2024-01-15T09:30:00Z", - }; - server - .mockEndpoint() - .patch("/refresh-tokens/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.refreshTokens.update("id"); - expect(response).toEqual({ - id: "id", - user_id: "user_id", - created_at: "2024-01-15T09:30:00Z", - idle_expires_at: "2024-01-15T09:30:00Z", - expires_at: "2024-01-15T09:30:00Z", - device: { - initial_ip: "initial_ip", - initial_asn: "initial_asn", - initial_user_agent: "initial_user_agent", - last_ip: "last_ip", - last_asn: "last_asn", - last_user_agent: "last_user_agent", - }, - client_id: "client_id", - session_id: "session_id", - rotating: true, - resource_servers: [ - { - audience: "audience", - scopes: "scopes", - }, - ], - refresh_token_metadata: { - key: "value", - }, - last_exchanged_at: "2024-01-15T09:30:00Z", - }); - }); - - test("update (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .patch("/refresh-tokens/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.refreshTokens.update("id"); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("update (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .patch("/refresh-tokens/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.refreshTokens.update("id"); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("update (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .patch("/refresh-tokens/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.refreshTokens.update("id"); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("update (5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .patch("/refresh-tokens/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(404) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.refreshTokens.update("id"); - }).rejects.toThrow(Management.NotFoundError); - }); - - test("update (6)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; - const rawResponseBody = { key: "value" }; - server - .mockEndpoint() - .patch("/refresh-tokens/id") - .jsonBody(rawRequestBody) - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.refreshTokens.update("id"); - }).rejects.toThrow(Management.TooManyRequestsError); - }); }); diff --git a/src/management/tests/wire/roles/users.test.ts b/src/management/tests/wire/roles/users.test.ts index 1d4174db41..4e185627b5 100644 --- a/src/management/tests/wire/roles/users.test.ts +++ b/src/management/tests/wire/roles/users.test.ts @@ -48,13 +48,7 @@ describe("UsersClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/roles/id/users") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/roles/id/users").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.roles.users.list("id"); @@ -66,13 +60,7 @@ describe("UsersClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/roles/id/users") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/roles/id/users").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.roles.users.list("id"); @@ -84,13 +72,7 @@ describe("UsersClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/roles/id/users") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/roles/id/users").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.roles.users.list("id"); @@ -102,13 +84,7 @@ describe("UsersClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/roles/id/users") - .respondWith() - .statusCode(404) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/roles/id/users").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.roles.users.list("id"); @@ -120,13 +96,7 @@ describe("UsersClient", () => { const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/roles/id/users") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); + server.mockEndpoint().get("/roles/id/users").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); await expect(async () => { return await client.roles.users.list("id"); diff --git a/src/management/tests/wire/tenants/settings.test.ts b/src/management/tests/wire/tenants/settings.test.ts index 5ee64b3ceb..7353958edd 100644 --- a/src/management/tests/wire/tenants/settings.test.ts +++ b/src/management/tests/wire/tenants/settings.test.ts @@ -73,7 +73,6 @@ describe("SettingsClient", () => { authorization_response_iss_parameter_supported: true, skip_non_verifiable_callback_uri_confirmation_prompt: true, resource_parameter_profile: "audience", - enable_ai_guide: true, }; server.mockEndpoint().get("/tenants/settings").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -173,7 +172,6 @@ describe("SettingsClient", () => { authorization_response_iss_parameter_supported: true, skip_non_verifiable_callback_uri_confirmation_prompt: true, resource_parameter_profile: "audience", - enable_ai_guide: true, }); }); @@ -293,7 +291,6 @@ describe("SettingsClient", () => { authorization_response_iss_parameter_supported: true, skip_non_verifiable_callback_uri_confirmation_prompt: true, resource_parameter_profile: "audience", - enable_ai_guide: true, }; server .mockEndpoint() @@ -397,7 +394,6 @@ describe("SettingsClient", () => { authorization_response_iss_parameter_supported: true, skip_non_verifiable_callback_uri_confirmation_prompt: true, resource_parameter_profile: "audience", - enable_ai_guide: true, }); }); diff --git a/src/management/tests/wire/tokenExchangeProfiles.test.ts b/src/management/tests/wire/tokenExchangeProfiles.test.ts index ad4952c6d9..f7583f0494 100644 --- a/src/management/tests/wire/tokenExchangeProfiles.test.ts +++ b/src/management/tests/wire/tokenExchangeProfiles.test.ts @@ -62,7 +62,7 @@ describe("TokenExchangeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/token-exchange-profiles") .respondWith() .statusCode(400) @@ -80,7 +80,7 @@ describe("TokenExchangeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/token-exchange-profiles") .respondWith() .statusCode(401) @@ -98,7 +98,7 @@ describe("TokenExchangeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/token-exchange-profiles") .respondWith() .statusCode(403) @@ -116,7 +116,7 @@ describe("TokenExchangeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/token-exchange-profiles") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/userAttributeProfiles.test.ts b/src/management/tests/wire/userAttributeProfiles.test.ts index 2a73c41805..d0c71ed1a3 100644 --- a/src/management/tests/wire/userAttributeProfiles.test.ts +++ b/src/management/tests/wire/userAttributeProfiles.test.ts @@ -68,7 +68,7 @@ describe("UserAttributeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/user-attribute-profiles") .respondWith() .statusCode(400) @@ -86,7 +86,7 @@ describe("UserAttributeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/user-attribute-profiles") .respondWith() .statusCode(401) @@ -104,7 +104,7 @@ describe("UserAttributeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/user-attribute-profiles") .respondWith() .statusCode(403) @@ -122,7 +122,7 @@ describe("UserAttributeProfilesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/user-attribute-profiles") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/users/connectedAccounts.test.ts b/src/management/tests/wire/users/connectedAccounts.test.ts index 8e32ec0c77..4209ecc8ba 100644 --- a/src/management/tests/wire/users/connectedAccounts.test.ts +++ b/src/management/tests/wire/users/connectedAccounts.test.ts @@ -64,7 +64,7 @@ describe("ConnectedAccountsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/id/connected-accounts") .respondWith() .statusCode(400) @@ -82,7 +82,7 @@ describe("ConnectedAccountsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/id/connected-accounts") .respondWith() .statusCode(401) @@ -100,7 +100,7 @@ describe("ConnectedAccountsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/id/connected-accounts") .respondWith() .statusCode(403) @@ -118,7 +118,7 @@ describe("ConnectedAccountsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/id/connected-accounts") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/users/groups.test.ts b/src/management/tests/wire/users/groups.test.ts deleted file mode 100644 index 88a685c4cc..0000000000 --- a/src/management/tests/wire/users/groups.test.ts +++ /dev/null @@ -1,144 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import * as Management from "../../../api/index"; -import { ManagementClient } from "../../../Client"; -import { mockServerPool } from "../../mock-server/MockServerPool"; - -describe("GroupsClient", () => { - test("get (1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - groups: [ - { - id: "id", - name: "name", - external_id: "external_id", - connection_id: "connection_id", - organization_id: "organization_id", - tenant_name: "tenant_name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - membership_created_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - start: 1.1, - limit: 1.1, - total: 1.1, - }; - server - .mockEndpoint({ once: false }) - .get("/users/id/groups") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const expected = { - groups: [ - { - id: "id", - name: "name", - external_id: "external_id", - connection_id: "connection_id", - organization_id: "organization_id", - tenant_name: "tenant_name", - description: "description", - created_at: "2024-01-15T09:30:00Z", - updated_at: "2024-01-15T09:30:00Z", - membership_created_at: "2024-01-15T09:30:00Z", - }, - ], - next: "next", - start: 1.1, - limit: 1.1, - total: 1.1, - }; - const page = await client.users.groups.get("id", { - fields: "fields", - include_fields: true, - from: "from", - take: 1, - }); - - expect(expected.groups).toEqual(page.data); - expect(page.hasNextPage()).toBe(true); - const nextPage = await page.getNextPage(); - expect(expected.groups).toEqual(nextPage.data); - }); - - test("get (2)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/users/id/groups") - .respondWith() - .statusCode(400) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow(Management.BadRequestError); - }); - - test("get (3)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/users/id/groups") - .respondWith() - .statusCode(401) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow(Management.UnauthorizedError); - }); - - test("get (4)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/users/id/groups") - .respondWith() - .statusCode(403) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow(Management.ForbiddenError); - }); - - test("get (5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server - .mockEndpoint({ once: false }) - .get("/users/id/groups") - .respondWith() - .statusCode(429) - .jsonBody(rawResponseBody) - .build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow(Management.TooManyRequestsError); - }); -}); diff --git a/src/management/tests/wire/users/refreshToken.test.ts b/src/management/tests/wire/users/refreshToken.test.ts index 852a532542..47f9993ba1 100644 --- a/src/management/tests/wire/users/refreshToken.test.ts +++ b/src/management/tests/wire/users/refreshToken.test.ts @@ -21,7 +21,6 @@ describe("RefreshTokenClient", () => { session_id: "session_id", rotating: true, resource_servers: [{}], - refresh_token_metadata: { key: "value" }, last_exchanged_at: "2024-01-15T09:30:00Z", }, ], @@ -47,9 +46,6 @@ describe("RefreshTokenClient", () => { session_id: "session_id", rotating: true, resource_servers: [{}], - refresh_token_metadata: { - key: "value", - }, last_exchanged_at: "2024-01-15T09:30:00Z", }, ], @@ -72,7 +68,7 @@ describe("RefreshTokenClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/refresh-tokens") .respondWith() .statusCode(401) @@ -90,7 +86,7 @@ describe("RefreshTokenClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/refresh-tokens") .respondWith() .statusCode(403) @@ -108,7 +104,7 @@ describe("RefreshTokenClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/refresh-tokens") .respondWith() .statusCode(404) @@ -126,7 +122,7 @@ describe("RefreshTokenClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/refresh-tokens") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/users/sessions.test.ts b/src/management/tests/wire/users/sessions.test.ts index 7ff1898069..2f7bc49beb 100644 --- a/src/management/tests/wire/users/sessions.test.ts +++ b/src/management/tests/wire/users/sessions.test.ts @@ -70,7 +70,7 @@ describe("SessionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/sessions") .respondWith() .statusCode(401) @@ -88,7 +88,7 @@ describe("SessionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/sessions") .respondWith() .statusCode(403) @@ -106,7 +106,7 @@ describe("SessionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/sessions") .respondWith() .statusCode(404) @@ -124,7 +124,7 @@ describe("SessionsClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/users/user_id/sessions") .respondWith() .statusCode(429) diff --git a/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts b/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts index 89d625838a..a33d0f2582 100644 --- a/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts +++ b/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts @@ -70,7 +70,7 @@ describe("TemplatesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/verifiable-credentials/verification/templates") .respondWith() .statusCode(400) @@ -88,7 +88,7 @@ describe("TemplatesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/verifiable-credentials/verification/templates") .respondWith() .statusCode(401) @@ -106,7 +106,7 @@ describe("TemplatesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/verifiable-credentials/verification/templates") .respondWith() .statusCode(403) @@ -124,7 +124,7 @@ describe("TemplatesClient", () => { const rawResponseBody = { key: "value" }; server - .mockEndpoint({ once: false }) + .mockEndpoint() .get("/verifiable-credentials/verification/templates") .respondWith() .statusCode(429) diff --git a/src/management/version.ts b/src/management/version.ts index 426f2b820c..10fd770240 100644 --- a/src/management/version.ts +++ b/src/management/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "5.2.0"; +export const SDK_VERSION = "5.2.1"; diff --git a/yarn.lock b/yarn.lock index c49f722a3c..b6853ffc31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,34 +2,34 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" - integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.28.6.tgz#72499312ec58b1e2245ba4a4f550c132be4982f7" + integrity sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q== dependencies: - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" js-tokens "^4.0.0" picocolors "^1.1.1" -"@babel/compat-data@^7.27.2": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" - integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== +"@babel/compat-data@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.6.tgz#103f466803fa0f059e82ccac271475470570d74c" + integrity sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" - integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.5" - "@babel/helper-compilation-targets" "^7.27.2" - "@babel/helper-module-transforms" "^7.28.3" - "@babel/helpers" "^7.28.4" - "@babel/parser" "^7.28.5" - "@babel/template" "^7.27.2" - "@babel/traverse" "^7.28.5" - "@babel/types" "^7.28.5" + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.6.tgz#531bf883a1126e53501ba46eb3bb414047af507f" + integrity sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" @@ -37,23 +37,23 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.28.5", "@babel/generator@^7.7.2": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" - integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== +"@babel/generator@^7.28.6", "@babel/generator@^7.7.2": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.6.tgz#48dcc65d98fcc8626a48f72b62e263d25fc3c3f1" + integrity sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw== dependencies: - "@babel/parser" "^7.28.5" - "@babel/types" "^7.28.5" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" "@jridgewell/gen-mapping" "^0.3.12" "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.27.2": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" - integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== +"@babel/helper-compilation-targets@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" + integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== dependencies: - "@babel/compat-data" "^7.27.2" + "@babel/compat-data" "^7.28.6" "@babel/helper-validator-option" "^7.27.1" browserslist "^4.24.0" lru-cache "^5.1.1" @@ -64,34 +64,34 @@ resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== -"@babel/helper-module-imports@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" - integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== +"@babel/helper-module-imports@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" + integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== dependencies: - "@babel/traverse" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" -"@babel/helper-module-transforms@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" - integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== +"@babel/helper-module-transforms@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" + integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== dependencies: - "@babel/helper-module-imports" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" - "@babel/traverse" "^7.28.3" + "@babel/helper-module-imports" "^7.28.6" + "@babel/helper-validator-identifier" "^7.28.5" + "@babel/traverse" "^7.28.6" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c" - integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.28.6", "@babel/helper-plugin-utils@^7.8.0": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" + integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== "@babel/helper-string-parser@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== -"@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": +"@babel/helper-validator-identifier@^7.28.5": version "7.28.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== @@ -101,20 +101,20 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.28.4": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" - integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== +"@babel/helpers@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.6.tgz#fca903a313ae675617936e8998b814c415cbf5d7" + integrity sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw== dependencies: - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.4" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" - integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.6.tgz#f01a8885b7fa1e56dd8a155130226cd698ef13fd" + integrity sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ== dependencies: - "@babel/types" "^7.28.5" + "@babel/types" "^7.28.6" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -145,11 +145,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-import-attributes@^7.24.7": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz#34c017d54496f9b11b61474e7ea3dfd5563ffe07" - integrity sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz#b71d5914665f60124e133696f17cd7669062c503" + integrity sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw== dependencies: - "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-plugin-utils" "^7.28.6" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" @@ -166,11 +166,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz#2f9beb5eff30fa507c5532d107daac7b888fa34c" - integrity sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee" + integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w== dependencies: - "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-plugin-utils" "^7.28.6" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" @@ -229,38 +229,38 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz#5147d29066a793450f220c63fa3a9431b7e6dd18" - integrity sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz#c7b2ddf1d0a811145b1de800d1abd146af92e3a2" + integrity sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A== dependencies: - "@babel/helper-plugin-utils" "^7.27.1" + "@babel/helper-plugin-utils" "^7.28.6" -"@babel/template@^7.27.2", "@babel/template@^7.3.3": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" - integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== +"@babel/template@^7.28.6", "@babel/template@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/parser" "^7.27.2" - "@babel/types" "^7.27.1" + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" -"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.5": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" - integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== +"@babel/traverse@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.6.tgz#871ddc79a80599a5030c53b1cc48cbe3a5583c2e" + integrity sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg== dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.5" + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.5" - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.5" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" debug "^4.3.1" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.28.5", "@babel/types@^7.3.3": - version "7.28.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" - integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.2", "@babel/types@^7.28.6", "@babel/types@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.6.tgz#c3e9377f1b155005bcc4c46020e7e394e13089df" + integrity sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg== dependencies: "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.28.5" @@ -708,10 +708,10 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA== -"@publint/pack@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@publint/pack/-/pack-0.1.2.tgz#1b9a9567423262093e4a73e77697b65bf622f8c9" - integrity sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw== +"@publint/pack@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@publint/pack/-/pack-0.1.3.tgz#624ee3963e43596e8442c7b86cdfe0b1faf6e674" + integrity sha512-dHDWeutAerz+Z2wFYAce7Y51vd4rbLBfUh0BNnyul4xKoVsPUVJBrOAFsJvtvYBwGFJSqKsxyyHf/7evZ8+Q5Q== "@shikijs/engine-oniguruma@^3.21.0": version "3.21.0" @@ -887,9 +887,9 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "24.10.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.2.tgz#82a57476a19647d8f2c7750d0924788245e39b26" - integrity sha512-WOhQTZ4G8xZ1tjJTvKOpyEVSGgOTvJAfDK3FNFgELyaTpzhdgHVHeqW8V+UJvzF5BT+/B54T/1S2K6gd9c7bbA== + version "25.0.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.0.10.tgz#4864459c3c9459376b8b75fd051315071c8213e7" + integrity sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg== dependencies: undici-types "~7.16.0" @@ -933,99 +933,99 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^8.38.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.0.tgz#afb966c66a2fdc6158cf81118204a971a36d0fc5" - integrity sha512-eEXsVvLPu8Z4PkFibtuFJLJOTAV/nPdgtSjkGoPpddpFk3/ym2oy97jynY6ic2m6+nc5M8SE1e9v/mHKsulcJg== + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.1.tgz#f6640f6f8749b71d9ab457263939e8932a3c6b46" + integrity sha512-cFYYFZ+oQFi6hUnBTbLRXfTJiaQtYE3t4O692agbBl+2Zy+eqSKWtPjhPXJu1G7j4RLjKgeJPDdq3EqOwmX5Ag== dependencies: "@eslint-community/regexpp" "^4.12.2" - "@typescript-eslint/scope-manager" "8.53.0" - "@typescript-eslint/type-utils" "8.53.0" - "@typescript-eslint/utils" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + "@typescript-eslint/scope-manager" "8.53.1" + "@typescript-eslint/type-utils" "8.53.1" + "@typescript-eslint/utils" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" ignore "^7.0.5" natural-compare "^1.4.0" ts-api-utils "^2.4.0" "@typescript-eslint/parser@^8.38.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.53.0.tgz#d8bed6f12dc74e03751e5f947510ff2b165990c6" - integrity sha512-npiaib8XzbjtzS2N4HlqPvlpxpmZ14FjSJrteZpPxGUaYPlvhzlzUZ4mZyABo0EFrOWnvyd0Xxroq//hKhtAWg== - dependencies: - "@typescript-eslint/scope-manager" "8.53.0" - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/typescript-estree" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.53.1.tgz#58d4a70cc2daee2becf7d4521d65ea1782d6ec68" + integrity sha512-nm3cvFN9SqZGXjmw5bZ6cGmvJSyJPn0wU9gHAZZHDnZl2wF9PhHv78Xf06E0MaNk4zLVHL8hb2/c32XvyJOLQg== + dependencies: + "@typescript-eslint/scope-manager" "8.53.1" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/typescript-estree" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" debug "^4.4.3" -"@typescript-eslint/project-service@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.53.0.tgz#327c67c61c16a1c8b12a440b0779b41eb77cc7df" - integrity sha512-Bl6Gdr7NqkqIP5yP9z1JU///Nmes4Eose6L1HwpuVHwScgDPPuEWbUVhvlZmb8hy0vX9syLk5EGNL700WcBlbg== +"@typescript-eslint/project-service@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.53.1.tgz#4e47856a0b14a1ceb28b0294b4badef3be1e9734" + integrity sha512-WYC4FB5Ra0xidsmlPb+1SsnaSKPmS3gsjIARwbEkHkoWloQmuzcfypljaJcR78uyLA1h8sHdWWPHSLDI+MtNog== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.53.0" - "@typescript-eslint/types" "^8.53.0" + "@typescript-eslint/tsconfig-utils" "^8.53.1" + "@typescript-eslint/types" "^8.53.1" debug "^4.4.3" -"@typescript-eslint/scope-manager@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.53.0.tgz#f922fcbf0d42e72f065297af31779ccf19de9a97" - integrity sha512-kWNj3l01eOGSdVBnfAF2K1BTh06WS0Yet6JUgb9Cmkqaz3Jlu0fdVUjj9UI8gPidBWSMqDIglmEXifSgDT/D0g== +"@typescript-eslint/scope-manager@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.53.1.tgz#6c4b8c82cd45ae3b365afc2373636e166743a8fa" + integrity sha512-Lu23yw1uJMFY8cUeq7JlrizAgeQvWugNQzJp8C3x8Eo5Jw5Q2ykMdiiTB9vBVOOUBysMzmRRmUfwFrZuI2C4SQ== dependencies: - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" -"@typescript-eslint/tsconfig-utils@8.53.0", "@typescript-eslint/tsconfig-utils@^8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.0.tgz#105279d7969a7abdc8345cc9c57cff83cf910f8f" - integrity sha512-K6Sc0R5GIG6dNoPdOooQ+KtvT5KCKAvTcY8h2rIuul19vxH5OTQk7ArKkd4yTzkw66WnNY0kPPzzcmWA+XRmiA== +"@typescript-eslint/tsconfig-utils@8.53.1", "@typescript-eslint/tsconfig-utils@^8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.1.tgz#efe80b8d019cd49e5a1cf46c2eb0cd2733076424" + integrity sha512-qfvLXS6F6b1y43pnf0pPbXJ+YoXIC7HKg0UGZ27uMIemKMKA6XH2DTxsEDdpdN29D+vHV07x/pnlPNVLhdhWiA== -"@typescript-eslint/type-utils@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.53.0.tgz#81a0de5c01fc68f6df0591d03cd8226bda01c91f" - integrity sha512-BBAUhlx7g4SmcLhn8cnbxoxtmS7hcq39xKCgiutL3oNx1TaIp+cny51s8ewnKMpVUKQUGb41RAUWZ9kxYdovuw== +"@typescript-eslint/type-utils@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.53.1.tgz#95de2651a96d580bf5c6c6089ddd694284d558ad" + integrity sha512-MOrdtNvyhy0rHyv0ENzub1d4wQYKb2NmIqG7qEqPWFW7Mpy2jzFC3pQ2yKDvirZB7jypm5uGjF2Qqs6OIqu47w== dependencies: - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/typescript-estree" "8.53.0" - "@typescript-eslint/utils" "8.53.0" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/typescript-estree" "8.53.1" + "@typescript-eslint/utils" "8.53.1" debug "^4.4.3" ts-api-utils "^2.4.0" -"@typescript-eslint/types@8.53.0", "@typescript-eslint/types@^8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.53.0.tgz#1adcad3fa32bc2c4cbf3785ba07a5e3151819efb" - integrity sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ== +"@typescript-eslint/types@8.53.1", "@typescript-eslint/types@^8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.53.1.tgz#101f203f0807a63216cceceedb815fabe21d5793" + integrity sha512-jr/swrr2aRmUAUjW5/zQHbMaui//vQlsZcJKijZf3M26bnmLj8LyZUpj8/Rd6uzaek06OWsqdofN/Thenm5O8A== -"@typescript-eslint/typescript-estree@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.0.tgz#7805b46b7a8ce97e91b7bb56fc8b1ba26ca8ef52" - integrity sha512-pw0c0Gdo7Z4xOG987u3nJ8akL9093yEEKv8QTJ+Bhkghj1xyj8cgPaavlr9rq8h7+s6plUJ4QJYw2gCZodqmGw== +"@typescript-eslint/typescript-estree@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.1.tgz#b6dce2303c9e27e95b8dcd8c325868fff53e488f" + integrity sha512-RGlVipGhQAG4GxV1s34O91cxQ/vWiHJTDHbXRr0li2q/BGg3RR/7NM8QDWgkEgrwQYCvmJV9ichIwyoKCQ+DTg== dependencies: - "@typescript-eslint/project-service" "8.53.0" - "@typescript-eslint/tsconfig-utils" "8.53.0" - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + "@typescript-eslint/project-service" "8.53.1" + "@typescript-eslint/tsconfig-utils" "8.53.1" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" debug "^4.4.3" minimatch "^9.0.5" semver "^7.7.3" tinyglobby "^0.2.15" ts-api-utils "^2.4.0" -"@typescript-eslint/utils@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.53.0.tgz#bf0a4e2edaf1afc9abce209fc02f8cab0b74af13" - integrity sha512-XDY4mXTez3Z1iRDI5mbRhH4DFSt46oaIFsLg+Zn97+sYrXACziXSQcSelMybnVZ5pa1P6xYkPr5cMJyunM1ZDA== +"@typescript-eslint/utils@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.53.1.tgz#81fe6c343de288701b774f4d078382f567e6edaa" + integrity sha512-c4bMvGVWW4hv6JmDUEG7fSYlWOl3II2I4ylt0NM+seinYQlZMQIaKaXIIVJWt9Ofh6whrpM+EdDQXKXjNovvrg== dependencies: "@eslint-community/eslint-utils" "^4.9.1" - "@typescript-eslint/scope-manager" "8.53.0" - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/typescript-estree" "8.53.0" + "@typescript-eslint/scope-manager" "8.53.1" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/typescript-estree" "8.53.1" -"@typescript-eslint/visitor-keys@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.0.tgz#9a785664ddae7e3f7e570ad8166e48dbc9c6cf02" - integrity sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw== +"@typescript-eslint/visitor-keys@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.1.tgz#405f04959be22b9be364939af8ac19c3649b6eb7" + integrity sha512-oy+wV7xDKFPRyNggmXuZQSBzvoLnpmJs+GhzRhPjrxl2b/jIlyjVokzm47CZCDUdXKr2zd7ZLodPfOBpOPyPlg== dependencies: - "@typescript-eslint/types" "8.53.0" + "@typescript-eslint/types" "8.53.1" eslint-visitor-keys "^4.2.1" "@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": @@ -1379,9 +1379,9 @@ balanced-match@^1.0.0: integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== baseline-browser-mapping@^2.9.0: - version "2.9.5" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.5.tgz#47f9549e0be1a84cd16651ac4c3b7d87a71408e6" - integrity sha512-D5vIoztZOq1XM54LUdttJVc96ggEsIfju2JBvht06pSzpckp3C7HReun67Bghzrtdsq9XdMGbSSB3v3GhMNmAA== + version "2.9.17" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.17.tgz#9d6019766cd7eba738cb5f32c84b9f937cc87780" + integrity sha512-agD0MgJFUP/4nvjqzIB29zRPUuCF7Ge6mEv9s8dHrtYD7QWXRcx75rOADE/d5ah1NI+0vkDl0yorDd5U852IQQ== brace-expansion@^1.1.7: version "1.1.12" @@ -1405,7 +1405,7 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" -browserslist@^4.24.0, browserslist@^4.26.3: +browserslist@^4.24.0, browserslist@^4.28.1: version "4.28.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== @@ -1459,9 +1459,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001759: - version "1.0.30001760" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001760.tgz#bdd1960fafedf8d5f04ff16e81460506ff9b798f" - integrity sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw== + version "1.0.30001765" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001765.tgz#4a78d8a797fd4124ebaab2043df942eb091648ee" + integrity sha512-LWcNtSyZrakjECqmpP4qdg0MMGdN368D7X8XvvAqOcqMv0RxnlqVKZl2V6/mBR68oYMxOZPLw/gO7DuisMHUvQ== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1640,9 +1640,9 @@ decimal.js@^10.4.2: integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== dedent@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.0.tgz#c1f9445335f0175a96587be245a282ff451446ca" - integrity sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ== + version "1.7.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.1.tgz#364661eea3d73f3faba7089214420ec2f8f13e15" + integrity sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg== deep-is@^0.1.3: version "0.1.4" @@ -1705,10 +1705,10 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.3: - version "5.18.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz#9b5f4c5c076b8787c78fe540392ce76a88855b44" - integrity sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww== +enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.4: + version "5.18.4" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz#c22d33055f3952035ce6a144ce092447c525f828" + integrity sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -1745,10 +1745,10 @@ es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-module-lexer@^1.2.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz#9159601561880a85f2734560a9099b2c31e5372a" - integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA== +es-module-lexer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.0.0.tgz#f657cd7a9448dcdda9c070a3cb75e5dc1e85f5b1" + integrity sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: version "1.1.1" @@ -1799,12 +1799,12 @@ eslint-config-prettier@^10.1.8: integrity sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w== eslint-plugin-prettier@^5.5.3: - version "5.5.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz#9d61c4ea11de5af704d4edf108c82ccfa7f2e61c" - integrity sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg== + version "5.5.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.5.tgz#9eae11593faa108859c26f9a9c367d619a0769c0" + integrity sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw== dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" + prettier-linter-helpers "^1.0.1" + synckit "^0.11.12" eslint-scope@5.1.1: version "5.1.1" @@ -1916,9 +1916,9 @@ esutils@^2.0.2: integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== eventemitter3@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" - integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + version "5.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.4.tgz#a86d66170433712dde814707ac52b5271ceb1feb" + integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw== events@^3.2.0: version "3.3.0" @@ -3345,17 +3345,17 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: +prettier-linter-helpers@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.1.tgz#6a31f88a4bad6c7adda253de12ba4edaea80ebcd" integrity sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg== dependencies: fast-diff "^1.1.2" -prettier@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.4.2.tgz#a5ce1fb522a588bf2b78ca44c6e6fe5aa5a2b13f" - integrity sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ== +prettier@3.7.4: + version "3.7.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.7.4.tgz#d2f8335d4b1cec47e1c8098645411b0c9dff9c0f" + integrity sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -3387,11 +3387,11 @@ psl@^1.1.33: punycode "^2.3.1" publint@^0.3.12: - version "0.3.16" - resolved "https://registry.yarnpkg.com/publint/-/publint-0.3.16.tgz#f35af34c0a94c284568de65b09de44fbec651d2a" - integrity sha512-MFqyfRLAExPVZdTQFwkAQELzA8idyXzROVOytg6nEJ/GEypXBUmMGrVaID8cTuzRS1U5L8yTOdOJtMXgFUJAeA== + version "0.3.17" + resolved "https://registry.yarnpkg.com/publint/-/publint-0.3.17.tgz#01d10fa930a168b898c1cf4e8fd4e0fcdbd38f80" + integrity sha512-Q3NLegA9XM6usW+dYQRG1g9uEHiYUzcCVBJDJ7yMcWRqVU9LYZUWdqbwMZfmTCFC5PZLQpLAmhvRcQRl3exqkw== dependencies: - "@publint/pack" "^0.1.2" + "@publint/pack" "^0.1.3" package-manager-detector "^1.6.0" picocolors "^1.1.1" sade "^1.8.1" @@ -3723,10 +3723,10 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.11.7: - version "0.11.11" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.11.tgz#c0b619cf258a97faa209155d9cd1699b5c998cb0" - integrity sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw== +synckit@^0.11.12: + version "0.11.12" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.12.tgz#abe74124264fbc00a48011b0d98bdc1cffb64a7b" + integrity sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ== dependencies: "@pkgr/core" "^0.2.9" @@ -3735,10 +3735,10 @@ tapable@^2.2.0, tapable@^2.3.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6" integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg== -terser-webpack-plugin@^5.3.11: - version "5.3.15" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.15.tgz#0a26860b765eaffa8e840170aabc5b3a3f6f6bb9" - integrity sha512-PGkOdpRFK+rb1TzVz+msVhw4YMRT9txLF4kRqvJhGhCM324xuR3REBSHALN+l+sAhKUmz0aotnjp5D+P83mLhQ== +terser-webpack-plugin@^5.3.16: + version "5.3.16" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz#741e448cc3f93d8026ebe4f7ef9e4afacfd56330" + integrity sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q== dependencies: "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" @@ -3747,9 +3747,9 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.44.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.1.tgz#e391e92175c299b8c284ad6ded609e37303b0a9c" - integrity sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw== + version "5.46.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.46.0.tgz#1b81e560d584bbdd74a8ede87b4d9477b0ff9695" + integrity sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" @@ -3921,9 +3921,9 @@ undici-types@~7.16.0: integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== undici@^7.12.0: - version "7.18.2" - resolved "https://registry.yarnpkg.com/undici/-/undici-7.18.2.tgz#6cf724ef799a67d94fd55adf66b1e184176efcdf" - integrity sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw== + version "7.19.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-7.19.0.tgz#fd9a3c101c0b084bdcd0a7bbd4d7d7c20e9ea0bf" + integrity sha512-Heho1hJD81YChi+uS2RkSjcVO+EQLmLSyUlHyp7Y/wFbxQaGb4WXVKD073JytrjXJVkSZVzoE2MCSOKugFGtOQ== universalify@^0.2.0: version "0.2.0" @@ -3931,9 +3931,9 @@ universalify@^0.2.0: integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== update-browserslist-db@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.2.tgz#cfb4358afa08b3d5731a2ecd95eebf4ddef8033e" - integrity sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" + integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== dependencies: escalade "^3.2.0" picocolors "^1.1.1" @@ -3987,9 +3987,9 @@ walker@^1.0.8: makeerror "1.0.12" watchpack@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.4.tgz#473bda72f0850453da6425081ea46fc0d7602947" - integrity sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA== + version "2.5.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.1.tgz#dd38b601f669e0cbf567cb802e75cead82cde102" + integrity sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -4005,9 +4005,9 @@ webpack-sources@^3.3.3: integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== webpack@^5.97.1: - version "5.103.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.103.0.tgz#17a7c5a5020d5a3a37c118d002eade5ee2c6f3da" - integrity sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw== + version "5.104.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.104.1.tgz#94bd41eb5dbf06e93be165ba8be41b8260d4fb1a" + integrity sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.8" @@ -4017,10 +4017,10 @@ webpack@^5.97.1: "@webassemblyjs/wasm-parser" "^1.14.1" acorn "^8.15.0" acorn-import-phases "^1.0.3" - browserslist "^4.26.3" + browserslist "^4.28.1" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.3" - es-module-lexer "^1.2.1" + enhanced-resolve "^5.17.4" + es-module-lexer "^2.0.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" @@ -4031,7 +4031,7 @@ webpack@^5.97.1: neo-async "^2.6.2" schema-utils "^4.3.3" tapable "^2.3.0" - terser-webpack-plugin "^5.3.11" + terser-webpack-plugin "^5.3.16" watchpack "^2.4.4" webpack-sources "^3.3.3" @@ -4113,9 +4113,9 @@ write-file-atomic@^4.0.2: signal-exit "^3.0.7" ws@^8.11.0: - version "8.18.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472" - integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg== + version "8.19.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.19.0.tgz#ddc2bdfa5b9ad860204f5a72a4863a8895fd8c8b" + integrity sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg== xml-name-validator@^4.0.0: version "4.0.0"