diff --git a/.npmignore b/.npmignore index 4c6f57baef..30a92cfa32 100644 --- a/.npmignore +++ b/.npmignore @@ -5,6 +5,7 @@ tests .github .fernignore .prettierrc.yml +biome.json tsconfig.json yarn.lock pnpm-lock.yaml \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..487ab22913 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,136 @@ +# Contributing + +Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project. + +## Getting Started + +### Prerequisites + +- Node.js 20 or higher +- yarn package manager + +### Installation + +Install the project dependencies: + +```bash +yarn install +``` + +### Building + +Build the project: + +```bash +yarn build +``` + +### Testing + +Run the test suite: + +```bash +yarn test +``` + +Run specific test types: + +- `yarn test:unit` - Run unit tests +- `yarn test:wire` - Run wire/integration tests + +### Linting and Formatting + +Check code style: + +```bash +yarn run lint +yarn run format:check +``` + +Fix code style issues: + +```bash +yarn run lint:fix +yarn run format:fix +``` + +Or use the combined check command: + +```bash +yarn run check:fix +``` + +## About Generated Code + +**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated. + +### Generated Files + +The following directories contain generated code: + +- `src/api/` - API client classes and types +- `src/serialization/` - Serialization/deserialization logic +- Most TypeScript files in `src/` + +### How to Customize + +If you need to customize the SDK, you have two options: + +#### Option 1: Use `.fernignore` + +For custom code that should persist across SDK regenerations: + +1. Create a `.fernignore` file in the project root +2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax) +3. Add your custom code to those files + +Files listed in `.fernignore` will not be overwritten when the SDK is regenerated. + +For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code). + +#### Option 2: Contribute to the Generator + +If you want to change how code is generated for all users of this SDK: + +1. The TypeScript SDK generator lives in the [Fern repository](https://github.com/fern-api/fern) +2. Generator code is located at `generators/typescript/sdk/` +3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md) +4. Submit a pull request with your changes to the generator + +This approach is best for: + +- Bug fixes in generated code +- New features that would benefit all users +- Improvements to code generation patterns + +## Making Changes + +### Workflow + +1. Create a new branch for your changes +2. Make your modifications +3. Run tests to ensure nothing breaks: `yarn test` +4. Run linting and formatting: `yarn run check:fix` +5. Build the project: `yarn build` +6. Commit your changes with a clear commit message +7. Push your branch and create a pull request + +### Commit Messages + +Write clear, descriptive commit messages that explain what changed and why. + +### Code Style + +This project uses automated code formatting and linting. Run `yarn run check:fix` before committing to ensure your code meets the project's style guidelines. + +## Questions or Issues? + +If you have questions or run into issues: + +1. Check the [Fern documentation](https://buildwithfern.com) +2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues) +3. Open a new issue if your question hasn't been addressed + +## License + +By contributing to this project, you agree that your contributions will be licensed under the same license as the project. diff --git a/package.json b/package.json index c331b07a62..8a673e7fb4 100644 --- a/package.json +++ b/package.json @@ -47,16 +47,18 @@ ], "scripts": { "format": "prettier . --write --ignore-unknown", + "format:check": "prettier . --check --ignore-unknown", + "lint": "eslint . --ext .js,.ts,.tsx", + "lint:fix": "eslint . --ext .js,.ts,.tsx --fix", + "check": "yarn format:check && yarn lint", + "check:fix": "yarn format && yarn lint:fix", "build": "yarn build:cjs && yarn build:esm", "build:cjs": "tsc --project ./tsconfig.cjs.json", "build:esm": "tsc --project ./tsconfig.esm.json && node scripts/rename-to-esm-files.js dist/esm", "test": "jest --config jest.config.mjs", "test:unit": "jest --selectProjects unit", - "test:browser": "jest --selectProjects browser", "test:wire": "jest --selectProjects wire", "prepare": "husky", - "lint": "eslint . --ext .js,.ts,.tsx", - "lint:fix": "eslint . --ext .js,.ts,.tsx --fix", "lint:check": "eslint . --ext .js,.ts,.tsx", "lint:package": "publint --pack npm", "test:coverage": "jest --config jest.config.mjs --coverage", @@ -77,10 +79,10 @@ "@types/jest": "^29.5.14", "ts-jest": "^29.3.4", "jest-environment-jsdom": "^29.7.0", - "msw": "^2.8.4", + "msw": "2.11.2", "@types/node": "^18.19.70", - "prettier": "^3.4.2", "typescript": "~5.7.2", + "prettier": "3.4.2", "typedoc": "^0.28.7", "typedoc-plugin-missing-exports": "^4.0.0", "nock": "^14.0.6", diff --git a/reference.md b/reference.md index 0348461d3e..15f6d84356 100644 --- a/reference.md +++ b/reference.md @@ -2,7 +2,7 @@ ## Actions -
client.actions.list({ ...params }) -> core.Page +
client.actions.list({ ...params }) -> core.Page
@@ -30,16 +30,33 @@ Retrieve all actions.
```typescript -const response = await client.actions.list(); -for await (const item of response) { +const pageableResponse = await client.actions.list({ + triggerId: "triggerId", + actionName: "actionName", + deployed: true, + page: 1, + per_page: 1, + installed: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.actions.list(); +let page = await client.actions.list({ + triggerId: "triggerId", + actionName: "actionName", + deployed: true, + page: 1, + per_page: 1, + installed: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -235,7 +252,9 @@ Deletes an action and all of its associated versions. An action must be unbound
```typescript -await client.actions.delete("id"); +await client.actions.delete("id", { + force: true, +}); ```
@@ -609,7 +628,7 @@ await client.branding.update(); ## ClientGrants -
client.clientGrants.list({ ...params }) -> core.Page +
client.clientGrants.list({ ...params }) -> core.Page
@@ -621,7 +640,7 @@ await client.branding.update();
-Retrieve a list of client grants, including the scopes associated with the application/API pair. +Retrieve a list of client grants, including the scopes associated with the application/API pair.
@@ -637,16 +656,33 @@ Retrieve a list of @@ -712,7 +748,6 @@ Create a client grant for a machine-to-machine login flow. To learn more, read < await client.clientGrants.create({ client_id: "client_id", audience: "audience", - scope: ["scope"], }); ``` @@ -884,7 +919,7 @@ await client.clientGrants.update("id"); ## Clients -
client.clients.list({ ...params }) -> core.Page +
client.clients.list({ ...params }) -> core.Page
@@ -943,16 +978,39 @@ For more information, read @@ -1123,7 +1181,10 @@ For more information, read @@ -1377,7 +1438,7 @@ await client.clients.rotateSecret("id"); ## Connections -
client.connections.list({ ...params }) -> core.Page +
client.connections.list({ ...params }) -> core.Page
@@ -1425,16 +1486,31 @@ To search by checkpoint, use the following parameters:
```typescript -const response = await client.connections.list(); -for await (const item of response) { +const pageableResponse = await client.connections.list({ + from: "from", + take: 1, + name: "name", + fields: "fields", + include_fields: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.connections.list(); +let page = await client.connections.list({ + from: "from", + take: 1, + name: "name", + fields: "fields", + include_fields: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -1563,7 +1639,10 @@ Retrieve details for a specified @@ -2291,7 +2370,7 @@ await client.customDomains.verify("id"); ## DeviceCredentials -
client.deviceCredentials.list({ ...params }) -> core.Page +
client.deviceCredentials.list({ ...params }) -> core.Page
@@ -2319,16 +2398,37 @@ Retrieve device credential information (public_key, refresh_t
```typescript -const response = await client.deviceCredentials.list(); -for await (const item of response) { +const pageableResponse = await client.deviceCredentials.list({ + page: 1, + per_page: 1, + include_totals: true, + fields: "fields", + include_fields: true, + user_id: "user_id", + client_id: "client_id", + type: "public_key", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.deviceCredentials.list(); +let page = await client.deviceCredentials.list({ + page: 1, + per_page: 1, + include_totals: true, + fields: "fields", + include_fields: true, + user_id: "user_id", + client_id: "client_id", + type: "public_key", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -2784,7 +2884,10 @@ await client.emailTemplates.update("verify_email");
```typescript -await client.eventStreams.list(); +await client.eventStreams.list({ + from: "from", + take: 1, +}); ```
@@ -3090,7 +3193,7 @@ await client.eventStreams.test("id", { ## Flows -
client.flows.list({ ...params }) -> core.Page +
client.flows.list({ ...params }) -> core.Page
@@ -3103,16 +3206,29 @@ await client.eventStreams.test("id", {
```typescript -const response = await client.flows.list(); -for await (const item of response) { +const pageableResponse = await client.flows.list({ + page: 1, + per_page: 1, + include_totals: true, + synchronous: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.flows.list(); +let page = await client.flows.list({ + page: 1, + per_page: 1, + include_totals: true, + synchronous: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -3359,7 +3475,7 @@ await client.flows.update("id"); ## Forms -
client.forms.list({ ...params }) -> core.Page +
client.forms.list({ ...params }) -> core.Page
@@ -3372,16 +3488,27 @@ await client.flows.update("id");
```typescript -const response = await client.forms.list(); -for await (const item of response) { +const pageableResponse = await client.forms.list({ + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.forms.list(); +let page = await client.forms.list({ + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -3628,7 +3755,7 @@ await client.forms.update("id"); ## UserGrants -
client.userGrants.list({ ...params }) -> core.Page +
client.userGrants.list({ ...params }) -> core.Page
@@ -3656,16 +3783,33 @@ Retrieve the g
```typescript -const response = await client.userGrants.list(); -for await (const item of response) { +const pageableResponse = await client.userGrants.list({ + per_page: 1, + page: 1, + include_totals: true, + user_id: "user_id", + client_id: "client_id", + audience: "audience", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.userGrants.list(); +let page = await client.userGrants.list({ + per_page: 1, + page: 1, + include_totals: true, + user_id: "user_id", + client_id: "client_id", + audience: "audience", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -3830,7 +3974,7 @@ await client.userGrants.delete("id"); ## Hooks -
client.hooks.list({ ...params }) -> core.Page +
client.hooks.list({ ...params }) -> core.Page
@@ -3858,16 +4002,33 @@ Retrieve all hooks. Accepts a list of
```typescript -const response = await client.hooks.list(); -for await (const item of response) { +const pageableResponse = await client.hooks.list({ + page: 1, + per_page: 1, + include_totals: true, + enabled: true, + fields: "fields", + triggerId: "credentials-exchange", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.hooks.list(); +let page = await client.hooks.list({ + page: 1, + per_page: 1, + include_totals: true, + enabled: true, + fields: "fields", + triggerId: "credentials-exchange", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -3997,7 +4158,9 @@ Retrieve a hook by its ID. Accepts a
```typescript -await client.hooks.get("id"); +await client.hooks.get("id", { + fields: "fields", +}); ```
@@ -4885,7 +5048,7 @@ await client.logStreams.update("id"); ## Logs -
client.logs.list({ ...params }) -> core.Page +
client.logs.list({ ...params }) -> core.Page
@@ -4941,16 +5104,35 @@ Auth0 @@ -5050,7 +5232,7 @@ await client.logs.get("id"); ## NetworkAcls -
client.networkAcls.list({ ...params }) -> core.Page +
client.networkAcls.list({ ...params }) -> core.Page
@@ -5078,16 +5260,27 @@ Get all access control list entries for your client.
```typescript -const response = await client.networkAcls.list(); -for await (const item of response) { +const pageableResponse = await client.networkAcls.list({ + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.networkAcls.list(); +let page = await client.networkAcls.list({ + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -5471,7 +5664,7 @@ await client.networkAcls.update("id"); ## Organizations -
client.organizations.list({ ...params }) -> core.Page +
client.organizations.list({ ...params }) -> core.Page
@@ -5519,16 +5712,27 @@ To search by checkpoint, use the following parameters:
```typescript -const response = await client.organizations.list(); -for await (const item of response) { +const pageableResponse = await client.organizations.list({ + from: "from", + take: 1, + sort: "sort", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.organizations.list(); +let page = await client.organizations.list({ + from: "from", + take: 1, + sort: "sort", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -6140,7 +6344,7 @@ await client.refreshTokens.delete("id"); ## ResourceServers -
client.resourceServers.list({ ...params }) -> core.Page +
client.resourceServers.list({ ...params }) -> core.Page
@@ -6168,16 +6372,29 @@ Retrieve details of all APIs associated with your tenant.
```typescript -const response = await client.resourceServers.list(); -for await (const item of response) { +const pageableResponse = await client.resourceServers.list({ + page: 1, + per_page: 1, + include_totals: true, + include_fields: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.resourceServers.list(); +let page = await client.resourceServers.list({ + page: 1, + per_page: 1, + include_totals: true, + include_fields: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -6305,7 +6522,9 @@ Retrieve API details with the given ID
```typescript -await client.resourceServers.get("id"); +await client.resourceServers.get("id", { + include_fields: true, +}); ```
@@ -6484,7 +6703,7 @@ await client.resourceServers.update("id"); ## Roles -
client.roles.list({ ...params }) -> core.Page +
client.roles.list({ ...params }) -> core.Page
@@ -6514,16 +6733,29 @@ Retrieve detailed list of user roles created in your tenant.
```typescript -const response = await client.roles.list(); -for await (const item of response) { +const pageableResponse = await client.roles.list({ + per_page: 1, + page: 1, + include_totals: true, + name_filter: "name_filter", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.roles.list(); +let page = await client.roles.list({ + per_page: 1, + page: 1, + include_totals: true, + name_filter: "name_filter", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -6824,7 +7056,7 @@ await client.roles.update("id"); ## Rules -
client.rules.list({ ...params }) -> core.Page +
client.rules.list({ ...params }) -> core.Page
@@ -6852,16 +7084,33 @@ Retrieve a filtered list of rules. Ac
```typescript -const response = await client.rules.list(); -for await (const item of response) { +const pageableResponse = await client.rules.list({ + page: 1, + per_page: 1, + include_totals: true, + enabled: true, + fields: "fields", + include_fields: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.rules.list(); +let page = await client.rules.list({ + page: 1, + per_page: 1, + include_totals: true, + enabled: true, + fields: "fields", + include_fields: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -6992,7 +7241,10 @@ Retrieve rule details. Accepts a list
```typescript -await client.rules.get("id"); +await client.rules.get("id", { + fields: "fields", + include_fields: true, +}); ```
@@ -7366,7 +7618,7 @@ await client.rulesConfigs.delete("key"); ## SelfServiceProfiles -
client.selfServiceProfiles.list({ ...params }) -> core.Page +
client.selfServiceProfiles.list({ ...params }) -> core.Page
@@ -7394,16 +7646,27 @@ Retrieves self-service profiles.
```typescript -const response = await client.selfServiceProfiles.list(); -for await (const item of response) { +const pageableResponse = await client.selfServiceProfiles.list({ + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.selfServiceProfiles.list(); +let page = await client.selfServiceProfiles.list({ + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -7828,6 +8091,77 @@ await client.sessions.delete("id");
+
client.sessions.update(id, { ...params }) -> Management.UpdateSessionResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update session information. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.sessions.update("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — ID of the session to update. + +
+
+ +
+
+ +**request:** `Management.UpdateSessionRequestContent` + +
+
+ +
+
+ +**requestOptions:** `Sessions.RequestOptions` + +
+
+
+
+ +
+
+
+
client.sessions.revoke(id) -> void
@@ -7976,7 +8310,10 @@ Retrieve the number of logins, signups and breached-password detections (subscri
```typescript -await client.stats.getDaily(); +await client.stats.getDaily({ + from: "from", + to: "to", +}); ```
@@ -8267,7 +8604,7 @@ await client.tickets.changePassword(); ## TokenExchangeProfiles -
client.tokenExchangeProfiles.list({ ...params }) -> core.Page +
client.tokenExchangeProfiles.list({ ...params }) -> core.Page
@@ -8304,16 +8641,25 @@ This endpoint supports Checkpoint pagination. To search by checkpoint, use the f
```typescript -const response = await client.tokenExchangeProfiles.list(); -for await (const item of response) { +const pageableResponse = await client.tokenExchangeProfiles.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.tokenExchangeProfiles.list(); +let page = await client.tokenExchangeProfiles.list({ + from: "from", + take: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -8612,9 +8958,9 @@ await client.tokenExchangeProfiles.update("id");
-## UserBlocks +## UserAttributeProfiles -
client.userBlocks.listByIdentifier({ ...params }) -> Management.ListUserBlocksByIdentifierResponseContent +
client.userAttributeProfiles.list({ ...params }) -> core.Page
@@ -8626,7 +8972,7 @@ await client.tokenExchangeProfiles.update("id");
-Retrieve details of all Brute-force Protection blocks for a user with the given identifier (username, phone number, or email). +Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination.
@@ -8642,9 +8988,25 @@ Retrieve details of all @@ -8660,7 +9022,7 @@ await client.userBlocks.listByIdentifier({
-**request:** `Management.ListUserBlocksByIdentifierRequestParameters` +**request:** `Management.ListUserAttributeProfileRequestParameters`
@@ -8668,7 +9030,7 @@ await client.userBlocks.listByIdentifier({
-**requestOptions:** `UserBlocks.RequestOptions` +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -8679,7 +9041,7 @@ await client.userBlocks.listByIdentifier({
-
client.userBlocks.deleteByIdentifier({ ...params }) -> void +
client.userAttributeProfiles.create({ ...params }) -> Management.CreateUserAttributeProfileResponseContent
@@ -8691,9 +9053,7 @@ await client.userBlocks.listByIdentifier({
-Remove all Brute-force Protection blocks for the user with the given identifier (username, phone number, or email). - -Note: This endpoint does not unblock users that were blocked by a tenant administrator. +Retrieve details about a single User Attribute Profile specified by ID.
@@ -8709,8 +9069,16 @@ Note: This endpoint does not unblock users that were
-**request:** `Management.DeleteUserBlocksByIdentifierRequestParameters` +**request:** `Management.CreateUserAttributeProfileRequestContent`
@@ -8735,7 +9103,7 @@ await client.userBlocks.deleteByIdentifier({
-**requestOptions:** `UserBlocks.RequestOptions` +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -8746,7 +9114,7 @@ await client.userBlocks.deleteByIdentifier({
-
client.userBlocks.list(id, { ...params }) -> Management.ListUserBlocksResponseContent +
client.userAttributeProfiles.listTemplates() -> Management.ListUserAttributeProfileTemplateResponseContent
@@ -8758,7 +9126,7 @@ await client.userBlocks.deleteByIdentifier({
-Retrieve details of all Brute-force Protection blocks for the user with the given ID. +Retrieve a list of User Attribute Profile Templates.
@@ -8774,7 +9142,7 @@ Retrieve details of all @@ -8790,23 +9158,7 @@ await client.userBlocks.list("id");
-**id:** `string` — user_id of the user blocks to retrieve. - -
-
- -
-
- -**request:** `Management.ListUserBlocksRequestParameters` - -
-
- -
-
- -**requestOptions:** `UserBlocks.RequestOptions` +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -8817,7 +9169,7 @@ await client.userBlocks.list("id");
-
client.userBlocks.delete(id) -> void +
client.userAttributeProfiles.getTemplate(id) -> Management.GetUserAttributeProfileTemplateResponseContent
@@ -8829,9 +9181,7 @@ await client.userBlocks.list("id");
-Remove all Brute-force Protection blocks for the user with the given ID. - -Note: This endpoint does not unblock users that were blocked by a tenant administrator. +Retrieve a User Attribute Profile Template.
@@ -8847,7 +9197,7 @@ Note: This endpoint does not unblock users that were @@ -8863,7 +9213,7 @@ await client.userBlocks.delete("id");
-**id:** `string` — The user_id of the user to update. +**id:** `string` — ID of the user-attribute-profile-template to retrieve.
@@ -8871,7 +9221,7 @@ await client.userBlocks.delete("id");
-**requestOptions:** `UserBlocks.RequestOptions` +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -8882,9 +9232,7 @@ await client.userBlocks.delete("id");
-## Users - -
client.users.list({ ...params }) -> core.Page +
client.userAttributeProfiles.get(id) -> Management.GetUserAttributeProfileResponseContent
@@ -8896,20 +9244,7 @@ await client.userBlocks.delete("id");
-Retrieve details of users. It is possible to: - -- Specify a search criteria for users -- Sort the users to be returned -- Select the fields to be returned -- Specify the number of users to retrieve per page and the page index - - The q query parameter can be used to get users that match the specified criteria using query string syntax. - -Learn more about searching for users. - -Read about best practices when working with the API endpoints for retrieving users. - -Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension. +Retrieve details about a single User Attribute Profile specified by ID.
@@ -8925,16 +9260,7 @@ Auth0 limits the number of users you can return. If you exceed this threshold, p
```typescript -const response = await client.users.list(); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.users.list(); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.userAttributeProfiles.get("id"); ```
@@ -8950,7 +9276,7 @@ while (page.hasNextPage()) {
-**request:** `Management.ListUsersRequestParameters` +**id:** `string` — ID of the user-attribute-profile to retrieve.
@@ -8958,7 +9284,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -8969,7 +9295,7 @@ while (page.hasNextPage()) {
-
client.users.create({ ...params }) -> Management.CreateUserResponseContent +
client.userAttributeProfiles.delete(id) -> void
@@ -8981,9 +9307,7 @@ while (page.hasNextPage()) {
-Create a new user for a given database or passwordless connection. - -Note: connection is required but other parameters such as email and password are dependent upon the type of connection. +Delete a single User Attribute Profile specified by ID.
@@ -8999,9 +9323,7 @@ Note: connection is required but other parameters such as ema
```typescript -await client.users.create({ - connection: "connection", -}); +await client.userAttributeProfiles.delete("id"); ```
@@ -9017,7 +9339,7 @@ await client.users.create({
-**request:** `Management.CreateUserRequestContent` +**id:** `string` — ID of the user-attribute-profile to delete.
@@ -9025,7 +9347,7 @@ await client.users.create({
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -9036,7 +9358,7 @@ await client.users.create({
-
client.users.listUsersByEmail({ ...params }) -> Management.UserResponseSchema[] +
client.userAttributeProfiles.update(id, { ...params }) -> Management.UpdateUserAttributeProfileResponseContent
@@ -9048,11 +9370,7 @@ await client.users.create({
-Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. - -For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com. - -Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case. +Update the details of a specific User attribute profile, such as name, user_id and user_attributes.
@@ -9068,9 +9386,7 @@ Therefore, when using this endpoint, make sure that you are searching for users
```typescript -await client.users.listUsersByEmail({ - email: "email", -}); +await client.userAttributeProfiles.update("id"); ```
@@ -9086,7 +9402,7 @@ await client.users.listUsersByEmail({
-**request:** `Management.ListUsersByEmailRequestParameters` +**id:** `string` — ID of the user attribute profile to update.
@@ -9094,7 +9410,15 @@ await client.users.listUsersByEmail({
-**requestOptions:** `Users.RequestOptions` +**request:** `Management.UpdateUserAttributeProfileRequestContent` + +
+
+ +
+
+ +**requestOptions:** `UserAttributeProfiles.RequestOptions`
@@ -9105,9 +9429,532 @@ await client.users.listUsersByEmail({
-
client.users.get(id, { ...params }) -> Management.GetUserResponseContent -
-
+## UserBlocks + +
client.userBlocks.listByIdentifier({ ...params }) -> Management.ListUserBlocksByIdentifierResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve details of all Brute-force Protection blocks for a user with the given identifier (username, phone number, or email). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.userBlocks.listByIdentifier({ + identifier: "identifier", + consider_brute_force_enablement: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.ListUserBlocksByIdentifierRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `UserBlocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.userBlocks.deleteByIdentifier({ ...params }) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove all Brute-force Protection blocks for the user with the given identifier (username, phone number, or email). + +Note: This endpoint does not unblock users that were blocked by a tenant administrator. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.userBlocks.deleteByIdentifier({ + identifier: "identifier", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.DeleteUserBlocksByIdentifierRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `UserBlocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.userBlocks.list(id, { ...params }) -> Management.ListUserBlocksResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve details of all Brute-force Protection blocks for the user with the given ID. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.userBlocks.list("id", { + consider_brute_force_enablement: true, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — user_id of the user blocks to retrieve. + +
+
+ +
+
+ +**request:** `Management.ListUserBlocksRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `UserBlocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.userBlocks.delete(id) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove all Brute-force Protection blocks for the user with the given ID. + +Note: This endpoint does not unblock users that were blocked by a tenant administrator. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.userBlocks.delete("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — The user_id of the user to update. + +
+
+ +
+
+ +**requestOptions:** `UserBlocks.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Users + +
client.users.list({ ...params }) -> core.Page +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve details of users. It is possible to: + +- Specify a search criteria for users +- Sort the users to be returned +- Select the fields to be returned +- Specify the number of users to retrieve per page and the page index + + The q query parameter can be used to get users that match the specified criteria using query string syntax. + +Learn more about searching for users. + +Read about best practices when working with the API endpoints for retrieving users. + +Auth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +const pageableResponse = await client.users.list({ + page: 1, + per_page: 1, + include_totals: true, + sort: "sort", + connection: "connection", + fields: "fields", + include_fields: true, + q: "q", + search_engine: "v1", + primary_order: true, +}); +for await (const item of pageableResponse) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.users.list({ + page: 1, + per_page: 1, + include_totals: true, + sort: "sort", + connection: "connection", + fields: "fields", + include_fields: true, + q: "q", + search_engine: "v1", + primary_order: true, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.ListUsersRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.users.create({ ...params }) -> Management.CreateUserResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new user for a given database or passwordless connection. + +Note: connection is required but other parameters such as email and password are dependent upon the type of connection. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.users.create({ + connection: "connection", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.CreateUserRequestContent` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.users.listUsersByEmail({ ...params }) -> Management.UserResponseSchema[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Find users by email. If Auth0 is the identity provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. + +For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com. + +Therefore, when using this endpoint, make sure that you are searching for users via email addresses using the correct case. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.users.listUsersByEmail({ + fields: "fields", + include_fields: true, + email: "email", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.ListUsersByEmailRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.users.get(id, { ...params }) -> Management.GetUserResponseContent +
+
#### 📝 Description @@ -9133,7 +9980,10 @@ Retrieve user details. A list of fields to include or exclude may also be specif
```typescript -await client.users.get("id"); +await client.users.get("id", { + fields: "fields", + include_fields: true, +}); ```
@@ -9517,7 +10367,7 @@ await client.users.revokeAccess("id"); ## Actions Versions -
client.actions.versions.list(actionId, { ...params }) -> core.Page +
client.actions.versions.list(actionId, { ...params }) -> core.Page
@@ -9545,16 +10395,25 @@ Retrieve all of an action's versions. An action version is created whenever an a
```typescript -const response = await client.actions.versions.list("actionId"); -for await (const item of response) { +const pageableResponse = await client.actions.versions.list("actionId", { + page: 1, + per_page: 1, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.actions.versions.list("actionId"); +let page = await client.actions.versions.list("actionId", { + page: 1, + per_page: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -9668,7 +10527,7 @@ await client.actions.versions.get("actionId", "id");
-
client.actions.versions.deploy(id, actionId, { ...params }) -> Management.DeployActionVersionResponseContent +
client.actions.versions.deploy(actionId, id, { ...params }) -> Management.DeployActionVersionResponseContent
@@ -9696,7 +10555,7 @@ Performs the equivalent of a roll-back of an action to an earlier, specified ver
```typescript -await client.actions.versions.deploy("id", "actionId", undefined); +await client.actions.versions.deploy("actionId", "id"); ```
@@ -9712,7 +10571,7 @@ await client.actions.versions.deploy("id", "actionId", undefined);
-**id:** `string` — The ID of an action version. +**actionId:** `string` — The ID of an action.
@@ -9720,7 +10579,7 @@ await client.actions.versions.deploy("id", "actionId", undefined);
-**actionId:** `string` — The ID of an action. +**id:** `string` — The ID of an action version.
@@ -9871,7 +10730,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
@@ -9899,16 +10758,25 @@ Retrieve the actions that are bound to a trigger. Once an action is created and
```typescript -const response = await client.actions.triggers.bindings.list("triggerId"); -for await (const item of response) { +const pageableResponse = await client.actions.triggers.bindings.list("triggerId", { + page: 1, + per_page: 1, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.actions.triggers.bindings.list("triggerId"); +let page = await client.actions.triggers.bindings.list("triggerId", { + page: 1, + per_page: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -10566,28 +11434,27 @@ await client.branding.templates.getUniversalLogin(); Update the Universal Login branding template. -

When content-type header is set to application/json, the expected body must be JSON:

+

When content-type header is set to application/json:

 {
-  "template": "<!DOCTYPE html><html><head>{%- auth0:head -%}</head><body>{%- auth0:widget -%}</body></html>"
+  "template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: "auto" %}<html lang="{{locale}}" dir="{{resolved_dir}}"><head>{%- auth0:head -%}</head><body class="_widget-auto-layout">{%- auth0:widget -%}</body></html>"
 }
 

- When content-type header is set to text/html, the expected body must be the HTML template: + When content-type header is set to text/html:

 <!DOCTYPE html>
-<code>
-  <html>
-    <head>
-     {%- auth0:head -%}
-    </head>
-    <body>
-      {%- auth0:widget -%}
-    </body>
-  </html>
-</code>
+{% assign resolved_dir = dir | default: "auto" %}
+<html lang="{{locale}}" dir="{{resolved_dir}}">
+  <head>
+    {%- auth0:head -%}
+  </head>
+  <body class="_widget-auto-layout">
+    {%- auth0:widget -%}
+  </body>
+</html>
 
@@ -11167,7 +12034,9 @@ Retrieve a list of ```typescript -await client.branding.phone.templates.list(); +await client.branding.phone.templates.list({ + disabled: true, +}); ```
@@ -11895,7 +12766,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
@@ -11908,16 +12779,25 @@ await client.branding.phone.templates.test("id", {
```typescript -const response = await client.clientGrants.organizations.list("id"); -for await (const item of response) { +const pageableResponse = await client.clientGrants.organizations.list("id", { + 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.clientGrants.organizations.list("id"); +let page = await client.clientGrants.organizations.list("id", { + from: "from", + take: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -12358,7 +13238,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
@@ -12394,16 +13274,29 @@ Retrieve all connections that are enabled for the specified @@ -12448,7 +13341,7 @@ while (page.hasNextPage()) { ## Connections Clients -
client.connections.clients.get(id, { ...params }) -> core.Page +
client.connections.clients.get(id, { ...params }) -> core.Page
@@ -12478,16 +13371,25 @@ Retrieve all clients that have the specified @@ -12684,7 +13586,7 @@ Rotates the connection keys for the Okta or OIDC connection strategies.
```typescript -await client.connections.keys.rotate("id", undefined); +await client.connections.keys.rotate("id"); ```
@@ -12708,7 +13610,7 @@ await client.connections.keys.rotate("id", undefined);
-**request:** `Management.RotateConnectionKeysRequestContent` +**request:** `Management.RotateConnectionKeysRequestContent | null`
@@ -12820,7 +13722,7 @@ Create a scim configuration for a connection.
```typescript -await client.connections.scimConfiguration.create("id", undefined); +await client.connections.scimConfiguration.create("id"); ```
@@ -12844,7 +13746,7 @@ await client.connections.scimConfiguration.create("id", undefined);
-**request:** `Management.CreateScimConfigurationRequestContent` +**request:** `Management.CreateScimConfigurationRequestContent | null`
@@ -13375,7 +14277,10 @@ Retrieve details of the
@@ -13691,7 +14596,14 @@ await client.emails.provider.update();
```typescript -await client.eventStreams.deliveries.list("id"); +await client.eventStreams.deliveries.list("id", { + statuses: "statuses", + event_types: "event_types", + date_from: "date_from", + date_to: "date_to", + from: "from", + take: 1, +}); ```
@@ -13906,7 +14818,7 @@ await client.eventStreams.redeliveries.createById("id", "event_id"); ## Flows Executions -
client.flows.executions.list(flowId, { ...params }) -> core.Page +
client.flows.executions.list(flowId, { ...params }) -> core.Page
@@ -13919,16 +14831,25 @@ await client.eventStreams.redeliveries.createById("id", "event_id");
```typescript -const response = await client.flows.executions.list("flow_id"); -for await (const item of response) { +const pageableResponse = await client.flows.executions.list("flow_id", { + 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.flows.executions.list("flow_id"); +let page = await client.flows.executions.list("flow_id", { + from: "from", + take: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -14093,7 +15014,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
@@ -14106,16 +15027,27 @@ await client.flows.executions.delete("flow_id", "execution_id");
```typescript -const response = await client.flows.vault.connections.list(); -for await (const item of response) { +const pageableResponse = await client.flows.vault.connections.list({ + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.flows.vault.connections.list(); +let page = await client.flows.vault.connections.list({ + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -14169,6 +15101,7 @@ await client.flows.vault.connections.create({ setup: { type: "API_KEY", api_key: "api_key", + base_url: "base_url", }, }); ``` @@ -14276,69 +15209,13 @@ await client.flows.vault.connections.delete("id"); #### ⚙️ Parameters -
-
- -
-
- -**id:** `string` — Vault connection id - -
-
- -
-
- -**requestOptions:** `Connections.RequestOptions` - -
-
-
-
- -
-
-
- -
client.flows.vault.connections.update(id, { ...params }) -> Management.UpdateFlowsVaultConnectionResponseContent -
-
- -#### 🔌 Usage - -
-
- -
-
- -```typescript -await client.flows.vault.connections.update("id"); -``` - -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**id:** `string` — Flows Vault connection ID - -
-
+
+
-**request:** `Management.UpdateFlowsVaultConnectionRequestContent` +**id:** `string` — Vault connection id
@@ -14357,9 +15234,7 @@ await client.flows.vault.connections.update("id");
-## Groups Members - -
client.groups.members.get(id, { ...params }) -> core.Page +
client.flows.vault.connections.update(id, { ...params }) -> Management.UpdateFlowsVaultConnectionResponseContent
@@ -14372,16 +15247,7 @@ await client.flows.vault.connections.update("id");
```typescript -const response = await client.groups.members.get("id"); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.groups.members.get("id"); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.flows.vault.connections.update("id"); ```
@@ -14397,7 +15263,7 @@ while (page.hasNextPage()) {
-**id:** `string` — Unique identifier for the group (service-generated). +**id:** `string` — Flows Vault connection ID
@@ -14405,7 +15271,7 @@ while (page.hasNextPage()) {
-**request:** `Management.GetGroupMembersRequestParameters` +**request:** `Management.UpdateFlowsVaultConnectionRequestContent`
@@ -14413,7 +15279,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Members.RequestOptions` +**requestOptions:** `Connections.RequestOptions`
@@ -17174,7 +18040,7 @@ await client.keys.customSigning.delete(); ## Keys Encryption -
client.keys.encryption.list({ ...params }) -> core.Page +
client.keys.encryption.list({ ...params }) -> core.Page
@@ -17202,16 +18068,27 @@ Retrieve details of all the encryption keys associated with your tenant.
```typescript -const response = await client.keys.encryption.list(); -for await (const item of response) { +const pageableResponse = await client.keys.encryption.list({ + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.keys.encryption.list(); +let page = await client.keys.encryption.list({ + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -17868,7 +18745,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
@@ -17881,16 +18758,31 @@ await client.keys.signing.revoke("kid");
```typescript -const response = await client.organizations.clientGrants.list("id"); -for await (const item of response) { +const pageableResponse = await client.organizations.clientGrants.list("id", { + audience: "audience", + client_id: "client_id", + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.organizations.clientGrants.list("id"); +let page = await client.organizations.clientGrants.list("id", { + audience: "audience", + client_id: "client_id", + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -18049,7 +18941,7 @@ await client.organizations.clientGrants.delete("id", "grant_id"); ## Organizations EnabledConnections -
client.organizations.enabledConnections.list(id, { ...params }) -> core.Page +
client.organizations.enabledConnections.list(id, { ...params }) -> core.Page
@@ -18077,16 +18969,27 @@ Retrieve details about a specific connection currently enabled for an Organizati
```typescript -const response = await client.organizations.enabledConnections.list("id"); -for await (const item of response) { +const pageableResponse = await client.organizations.enabledConnections.list("id", { + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.organizations.enabledConnections.list("id"); +let page = await client.organizations.enabledConnections.list("id", { + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -18429,7 +19332,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
@@ -18457,16 +19360,33 @@ Retrieve a detailed list of invitations sent to users for a specific Organizatio
```typescript -const response = await client.organizations.invitations.list("id"); -for await (const item of response) { +const pageableResponse = await client.organizations.invitations.list("id", { + page: 1, + per_page: 1, + include_totals: true, + fields: "fields", + include_fields: true, + sort: "sort", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.organizations.invitations.list("id"); +let page = await client.organizations.invitations.list("id", { + page: 1, + per_page: 1, + include_totals: true, + fields: "fields", + include_fields: true, + sort: "sort", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -18601,7 +19521,10 @@ await client.organizations.invitations.create("id", {
```typescript -await client.organizations.invitations.get("id", "invitation_id"); +await client.organizations.invitations.get("id", "invitation_id", { + fields: "fields", + include_fields: true, +}); ```
@@ -18710,7 +19633,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
@@ -18759,16 +19682,29 @@ To search by checkpoint, use the following parameters: - from: Optional id from
```typescript -const response = await client.organizations.members.list("id"); -for await (const item of response) { +const pageableResponse = await client.organizations.members.list("id", { + from: "from", + take: 1, + fields: "fields", + include_fields: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.organizations.members.list("id"); +let page = await client.organizations.members.list("id", { + from: "from", + take: 1, + fields: "fields", + include_fields: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -18946,7 +19882,7 @@ await client.organizations.members.delete("id", { ## Organizations Members Roles -
client.organizations.members.roles.list(id, userId, { ...params }) -> core.Page +
client.organizations.members.roles.list(id, userId, { ...params }) -> core.Page
@@ -18976,16 +19912,27 @@ Users can be members of multiple Organizations with unique roles assigned for ea
```typescript -const response = await client.organizations.members.roles.list("id", "user_id"); -for await (const item of response) { +const pageableResponse = await client.organizations.members.roles.list("id", "user_id", { + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.organizations.members.roles.list("id", "user_id"); +let page = await client.organizations.members.roles.list("id", "user_id", { + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -19204,7 +20151,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
@@ -19232,16 +20179,37 @@ Get render setting configurations for all screens.
```typescript -const response = await client.prompts.rendering.list(); -for await (const item of response) { +const pageableResponse = await client.prompts.rendering.list({ + fields: "fields", + include_fields: true, + page: 1, + per_page: 1, + include_totals: true, + prompt: "prompt", + screen: "screen", + rendering_mode: "advanced", +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.prompts.rendering.list(); +let page = await client.prompts.rendering.list({ + fields: "fields", + include_fields: true, + page: 1, + per_page: 1, + include_totals: true, + prompt: "prompt", + screen: "screen", + rendering_mode: "advanced", +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -19276,6 +20244,104 @@ while (page.hasNextPage()) {
+
client.prompts.rendering.bulkUpdate({ ...params }) -> Management.BulkUpdateAculResponseContent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Learn more about configuring render settings for advanced customization. + +

+ Example head_tags array. See our documentation on using Liquid variables within head tags. +

+
{
+  "head_tags": [
+    {
+      "tag": "script",
+      "attributes": {
+        "defer": true,
+        "src": "URL_TO_ASSET",
+        "async": true,
+        "integrity": [
+          "ASSET_SHA"
+        ]
+      }
+    },
+    {
+      "tag": "link",
+      "attributes": {
+        "href": "URL_TO_ASSET",
+        "rel": "stylesheet"
+      }
+    }
+  ]
+}
+
+
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}], + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Management.BulkUpdateAculRequestContent` + +
+
+ +
+
+ +**requestOptions:** `Rendering.RequestOptions` + +
+
+
+
+ +
+
+
+
client.prompts.rendering.get(prompt, screen) -> Management.GetAculResponseContent
@@ -19401,7 +20467,10 @@ Learn more about ```typescript -const response = await client.users.organizations.list("id"); -for await (const item of response) { +const pageableResponse = await client.users.organizations.list("id", { + page: 1, + per_page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.users.organizations.list("id"); +let page = await client.users.organizations.list("id", { + page: 1, + per_page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -22168,7 +23304,7 @@ while (page.hasNextPage()) { ## Users Permissions -
client.users.permissions.list(id, { ...params }) -> core.Page +
client.users.permissions.list(id, { ...params }) -> core.Page
@@ -22196,16 +23332,27 @@ Retrieve all permissions associated with the user.
```typescript -const response = await client.users.permissions.list("id"); -for await (const item of response) { +const pageableResponse = await client.users.permissions.list("id", { + per_page: 1, + page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.users.permissions.list("id"); +let page = await client.users.permissions.list("id", { + per_page: 1, + page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -22482,7 +23629,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
@@ -22512,16 +23659,27 @@ Retrieve detailed list of all user roles currently assigned to a user.
```typescript -const response = await client.users.roles.list("id"); -for await (const item of response) { +const pageableResponse = await client.users.roles.list("id", { + per_page: 1, + page: 1, + include_totals: true, +}); +for await (const item of pageableResponse) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.users.roles.list("id"); +let page = await client.users.roles.list("id", { + per_page: 1, + page: 1, + include_totals: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -22716,7 +23874,7 @@ await client.users.roles.delete("id", { ## Users RefreshToken -
client.users.refreshToken.list(userId, { ...params }) -> core.Page +
client.users.refreshToken.list(userId, { ...params }) -> core.Page
@@ -22744,16 +23902,25 @@ Retrieve details for a user's refresh tokens.
```typescript -const response = await client.users.refreshToken.list("user_id"); -for await (const item of response) { +const pageableResponse = await client.users.refreshToken.list("user_id", { + 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.refreshToken.list("user_id"); +let page = await client.users.refreshToken.list("user_id", { + from: "from", + take: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -22861,7 +24028,7 @@ await client.users.refreshToken.delete("user_id"); ## Users Sessions -
client.users.sessions.list(userId, { ...params }) -> core.Page +
client.users.sessions.list(userId, { ...params }) -> core.Page
@@ -22889,16 +24056,25 @@ Retrieve details for a user's sessions.
```typescript -const response = await client.users.sessions.list("user_id"); -for await (const item of response) { +const pageableResponse = await client.users.sessions.list("user_id", { + 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.sessions.list("user_id"); +let page = await client.users.sessions.list("user_id", { + from: "from", + take: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
@@ -23006,7 +24182,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
@@ -23034,16 +24210,25 @@ List a verifiable credential templates.
```typescript -const response = await client.verifiableCredentials.verification.templates.list(); -for await (const item of response) { +const pageableResponse = await client.verifiableCredentials.verification.templates.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.verifiableCredentials.verification.templates.list(); +let page = await client.verifiableCredentials.verification.templates.list({ + from: "from", + take: 1, +}); while (page.hasNextPage()) { page = page.getNextPage(); } + +// You can also access the underlying response +const response = page.response; ```
diff --git a/src/management/BaseClient.ts b/src/management/BaseClient.ts new file mode 100644 index 0000000000..b70af9b55f --- /dev/null +++ b/src/management/BaseClient.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as environments from "./environments.js"; +import * as core from "./core/index.js"; + +export interface BaseClientOptions { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + token: core.EndpointSupplier; + /** Additional headers to include in requests. */ + headers?: Record | null | undefined>; + /** The default maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The default number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + fetcher?: core.FetchFunction; +} + +export interface BaseRequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | null | undefined>; +} diff --git a/src/management/Client.ts b/src/management/Client.ts index 912ffd898a..27d27c180d 100644 --- a/src/management/Client.ts +++ b/src/management/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js"; import * as environments from "./environments.js"; import * as core from "./core/index.js"; import { Actions } from "./api/resources/actions/client/Client.js"; @@ -34,12 +33,12 @@ import { Stats } from "./api/resources/stats/client/Client.js"; import { SupplementalSignals } from "./api/resources/supplementalSignals/client/Client.js"; import { Tickets } from "./api/resources/tickets/client/Client.js"; import { TokenExchangeProfiles } from "./api/resources/tokenExchangeProfiles/client/Client.js"; +import { UserAttributeProfiles } from "./api/resources/userAttributeProfiles/client/Client.js"; import { UserBlocks } from "./api/resources/userBlocks/client/Client.js"; import { Users } from "./api/resources/users/client/Client.js"; import { Anomaly } from "./api/resources/anomaly/client/Client.js"; import { AttackProtection } from "./api/resources/attackProtection/client/Client.js"; import { Emails } from "./api/resources/emails/client/Client.js"; -import { Groups } from "./api/resources/groups/client/Client.js"; import { Guardian } from "./api/resources/guardian/client/Client.js"; import { Keys } from "./api/resources/keys/client/Client.js"; import { RiskAssessments } from "./api/resources/riskAssessments/client/Client.js"; @@ -47,28 +46,9 @@ import { Tenants } from "./api/resources/tenants/client/Client.js"; import { VerifiableCredentials } from "./api/resources/verifiableCredentials/client/Client.js"; export declare namespace ManagementClient { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } - - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} } export class ManagementClient { @@ -103,12 +83,12 @@ export class ManagementClient { protected _supplementalSignals: SupplementalSignals | undefined; protected _tickets: Tickets | undefined; protected _tokenExchangeProfiles: TokenExchangeProfiles | undefined; + protected _userAttributeProfiles: UserAttributeProfiles | undefined; protected _userBlocks: UserBlocks | undefined; protected _users: Users | undefined; protected _anomaly: Anomaly | undefined; protected _attackProtection: AttackProtection | undefined; protected _emails: Emails | undefined; - protected _groups: Groups | undefined; protected _guardian: Guardian | undefined; protected _keys: Keys | undefined; protected _riskAssessments: RiskAssessments | undefined; @@ -239,6 +219,10 @@ export class ManagementClient { return (this._tokenExchangeProfiles ??= new TokenExchangeProfiles(this._options)); } + public get userAttributeProfiles(): UserAttributeProfiles { + return (this._userAttributeProfiles ??= new UserAttributeProfiles(this._options)); + } + public get userBlocks(): UserBlocks { return (this._userBlocks ??= new UserBlocks(this._options)); } @@ -259,10 +243,6 @@ export class ManagementClient { return (this._emails ??= new Emails(this._options)); } - public get groups(): Groups { - return (this._groups ??= new Groups(this._options)); - } - public get guardian(): Guardian { return (this._guardian ??= new Guardian(this._options)); } diff --git a/src/management/api/errors/BadRequestError.ts b/src/management/api/errors/BadRequestError.ts index 7aa9c309fe..79fe19853b 100644 --- a/src/management/api/errors/BadRequestError.ts +++ b/src/management/api/errors/BadRequestError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/ConflictError.ts b/src/management/api/errors/ConflictError.ts index 263f0885f4..92267320d9 100644 --- a/src/management/api/errors/ConflictError.ts +++ b/src/management/api/errors/ConflictError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/ContentTooLargeError.ts b/src/management/api/errors/ContentTooLargeError.ts index f9e3654840..d93249c9c9 100644 --- a/src/management/api/errors/ContentTooLargeError.ts +++ b/src/management/api/errors/ContentTooLargeError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/ForbiddenError.ts b/src/management/api/errors/ForbiddenError.ts index 4765b298b3..79c69a14d7 100644 --- a/src/management/api/errors/ForbiddenError.ts +++ b/src/management/api/errors/ForbiddenError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/InternalServerError.ts b/src/management/api/errors/InternalServerError.ts index 96822c74c5..cba6978e3c 100644 --- a/src/management/api/errors/InternalServerError.ts +++ b/src/management/api/errors/InternalServerError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/NotFoundError.ts b/src/management/api/errors/NotFoundError.ts index 5d1d3aa55f..0eeb7776b3 100644 --- a/src/management/api/errors/NotFoundError.ts +++ b/src/management/api/errors/NotFoundError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/PaymentRequiredError.ts b/src/management/api/errors/PaymentRequiredError.ts index 46fffce5e0..66a8906795 100644 --- a/src/management/api/errors/PaymentRequiredError.ts +++ b/src/management/api/errors/PaymentRequiredError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/ServiceUnavailableError.ts b/src/management/api/errors/ServiceUnavailableError.ts index 79779ade95..899fcc9aa4 100644 --- a/src/management/api/errors/ServiceUnavailableError.ts +++ b/src/management/api/errors/ServiceUnavailableError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/TooManyRequestsError.ts b/src/management/api/errors/TooManyRequestsError.ts index 5bbb87a95f..2eae718162 100644 --- a/src/management/api/errors/TooManyRequestsError.ts +++ b/src/management/api/errors/TooManyRequestsError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/errors/UnauthorizedError.ts b/src/management/api/errors/UnauthorizedError.ts index 1e6541207e..9b0b1ae0cc 100644 --- a/src/management/api/errors/UnauthorizedError.ts +++ b/src/management/api/errors/UnauthorizedError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as errors from "../../errors/index.js"; import * as core from "../../core/index.js"; diff --git a/src/management/api/index.ts b/src/management/api/index.ts index 72cddbe7f0..f779e48e8d 100644 --- a/src/management/api/index.ts +++ b/src/management/api/index.ts @@ -1,3 +1,4 @@ export * from "./resources/index.js"; export * from "./types/index.js"; export * from "./errors/index.js"; +export * from "./requests/index.js"; diff --git a/src/management/api/requests/index.ts b/src/management/api/requests/index.ts new file mode 100644 index 0000000000..d98abd7d01 --- /dev/null +++ b/src/management/api/requests/index.ts @@ -0,0 +1 @@ +export * from "./requests.js"; diff --git a/src/management/api/requests/requests.ts b/src/management/api/requests/requests.ts new file mode 100644 index 0000000000..f94979fa72 --- /dev/null +++ b/src/management/api/requests/requests.ts @@ -0,0 +1,3510 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; +import * as fs from "fs"; +import * as core from "../../core/index.js"; + +/** + * @example + * { + * triggerId: "triggerId", + * actionName: "actionName", + * deployed: true, + * page: 1, + * per_page: 1, + * installed: true + * } + */ +export interface ListActionsRequestParameters { + /** An actions extensibility point. */ + triggerId?: Management.ActionTriggerTypeEnum | null; + /** The name of the action to retrieve. */ + actionName?: string | null; + /** Optional filter to only retrieve actions that are deployed. */ + deployed?: boolean | null; + /** Use this field to request a specific page of the list results. */ + page?: number | null; + /** The maximum number of results to be returned by the server in single response. 20 by default */ + per_page?: number | null; + /** Optional. When true, return only installed actions. When false, return only custom actions. Returns all actions by default. */ + installed?: boolean | null; +} + +/** + * @example + * { + * name: "name", + * supported_triggers: [{ + * id: "id" + * }] + * } + */ +export interface CreateActionRequestContent { + /** The name of an action. */ + name: string; + /** The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. */ + supported_triggers: Management.ActionTrigger[]; + /** The source code of the action. */ + code?: string; + /** The list of third party npm modules, and their versions, that this action depends on. */ + dependencies?: Management.ActionVersionDependency[]; + /** The Node runtime. For example: `node22`, defaults to `node22` */ + runtime?: string; + /** The list of secrets that are included in an action or a version of an action. */ + secrets?: Management.ActionSecretRequest[]; + /** True if the action should be deployed after creation. */ + deploy?: boolean; +} + +/** + * @example + * { + * force: true + * } + */ +export interface DeleteActionRequestParameters { + /** Force action deletion detaching bindings */ + force?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateActionRequestContent { + /** The name of an action. */ + name?: string; + /** The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. */ + supported_triggers?: Management.ActionTrigger[]; + /** The source code of the action. */ + code?: string; + /** The list of third party npm modules, and their versions, that this action depends on. */ + dependencies?: Management.ActionVersionDependency[]; + /** The Node runtime. For example: `node22`, defaults to `node22` */ + runtime?: string; + /** The list of secrets that are included in an action or a version of an action. */ + secrets?: Management.ActionSecretRequest[]; +} + +/** + * @example + * { + * payload: { + * "key": "value" + * } + * } + */ +export interface TestActionRequestContent { + payload: Management.TestActionPayload; +} + +/** + * @example + * {} + */ +export interface UpdateBrandingRequestContent { + colors?: Management.UpdateBrandingColors | null; + /** URL for the favicon. Must use HTTPS. */ + favicon_url?: string | null; + /** URL for the logo. Must use HTTPS. */ + logo_url?: string | null; + font?: Management.UpdateBrandingFont | null; +} + +/** + * @example + * { + * from: "from", + * take: 1, + * audience: "audience", + * client_id: "client_id", + * allow_any_organization: true, + * subject_type: "client" + * } + */ +export interface ListClientGrantsRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; + /** Optional filter on audience. */ + audience?: string | null; + /** Optional filter on client_id. */ + client_id?: string | null; + /** Optional filter on allow_any_organization. */ + allow_any_organization?: Management.ClientGrantAllowAnyOrganizationEnum | null; + /** The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ + subject_type?: Management.ClientGrantSubjectTypeEnum | null; +} + +/** + * @example + * { + * client_id: "client_id", + * audience: "audience" + * } + */ +export interface CreateClientGrantRequestContent { + /** ID of the client. */ + client_id: string; + /** The audience (API identifier) of this client grant */ + audience: string; + organization_usage?: Management.ClientGrantOrganizationUsageEnum; + /** If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. */ + allow_any_organization?: boolean; + /** Scopes allowed for this client grant. */ + scope?: string[]; + subject_type?: Management.ClientGrantSubjectTypeEnum; + /** Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ + authorization_details_types?: string[]; +} + +/** + * @example + * {} + */ +export interface UpdateClientGrantRequestContent { + /** Scopes allowed for this client grant. */ + scope?: string[]; + organization_usage?: Management.ClientGrantOrganizationNullableUsageEnum | null; + /** Controls allowing any organization to be used with this grant */ + allow_any_organization?: boolean | null; + /** Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ + authorization_details_types?: string[]; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true, + * page: 1, + * per_page: 1, + * include_totals: true, + * is_global: true, + * is_first_party: true, + * app_type: "app_type", + * q: "q" + * } + */ +export interface ListClientsRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Default value is 50, maximum value is 100 */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Optional filter on the global client parameter. */ + is_global?: boolean | null; + /** Optional filter on whether or not a client is a first-party client. */ + is_first_party?: boolean | null; + /** Optional filter by a comma-separated list of application types. */ + app_type?: string | null; + /** Advanced Query in Lucene syntax.
Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results */ + q?: string | null; +} + +/** + * @example + * { + * name: "name" + * } + */ +export interface CreateClientRequestContent { + /** Name of this client (min length: 1 character, does not allow `<` or `>`). */ + name: string; + /** Free text description of this client (max length: 140 characters). */ + description?: string; + /** URL of the logo to display for this client. Recommended size is 150x150 pixels. */ + logo_uri?: string; + /** Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication. */ + callbacks?: string[]; + oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; + oidc_backchannel_logout?: Management.ClientOidcBackchannelLogoutSettings; + session_transfer?: Management.ClientSessionTransferConfiguration | null; + /** Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs. */ + allowed_origins?: string[]; + /** Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode. */ + web_origins?: string[]; + /** List of audiences/realms for SAML protocol. Used by the wsfed addon. */ + client_aliases?: string[]; + /** List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed. */ + allowed_clients?: string[]; + /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ + allowed_logout_urls?: string[]; + /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ + grant_types?: string[]; + token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; + app_type?: Management.ClientAppTypeEnum; + /** Whether this client a first party client or not */ + is_first_party?: boolean; + /** Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false). */ + oidc_conformant?: boolean; + jwt_configuration?: Management.ClientJwtConfiguration; + encryption_key?: Management.ClientEncryptionKey | null; + /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ + sso?: boolean; + /** Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). */ + cross_origin_authentication?: boolean; + /** URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page. */ + cross_origin_loc?: string; + /** true to disable Single Sign On, false otherwise (default: false) */ + sso_disabled?: boolean; + /** true if the custom login page is to be used, false otherwise. Defaults to true */ + custom_login_page_on?: boolean; + /** The content (HTML, CSS, JS) of the custom login page. */ + custom_login_page?: string; + /** The content (HTML, CSS, JS) of the custom login page. (Used on Previews) */ + custom_login_page_preview?: string; + /** HTML form template to be used for WS-Federation. */ + form_template?: string; + addons?: Management.ClientAddons; + client_metadata?: Management.ClientMetadata; + mobile?: Management.ClientMobile; + /** Initiate login uri, must be https */ + initiate_login_uri?: string; + native_social_login?: Management.NativeSocialLogin; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; + organization_usage?: Management.ClientOrganizationUsageEnum; + organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; + /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ + organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; + client_authentication_methods?: Management.ClientCreateAuthenticationMethod; + /** Makes the use of Pushed Authorization Requests mandatory for this client */ + require_pushed_authorization_requests?: boolean; + /** Makes the use of Proof-of-Possession mandatory for this client */ + require_proof_of_possession?: boolean; + signed_request_object?: Management.ClientSignedRequestObjectWithPublicKey; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean; + /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ + par_request_expiry?: number | null; + token_quota?: Management.CreateTokenQuota; + /** The identifier of the resource server that this client is linked to. */ + resource_server_identifier?: string; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPostConfiguration; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetClientRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateClientRequestContent { + /** The name of the client. Must contain at least one character. Does not allow '<' or '>'. */ + name?: string; + /** Free text description of the purpose of the Client. (Max character length: 140) */ + description?: string; + /** The secret used to sign tokens for the client */ + client_secret?: string; + /** The URL of the client logo (recommended size: 150x150) */ + logo_uri?: string; + /** A set of URLs that are valid to call back from Auth0 when authenticating users */ + callbacks?: string[]; + oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; + oidc_backchannel_logout?: Management.ClientOidcBackchannelLogoutSettings; + session_transfer?: Management.ClientSessionTransferConfiguration | null; + /** A set of URLs that represents valid origins for CORS */ + allowed_origins?: string[]; + /** A set of URLs that represents valid web origins for use with web message response mode */ + web_origins?: string[]; + /** A set of grant types that the client is authorized to use. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ + grant_types?: string[]; + /** List of audiences for SAML protocol */ + client_aliases?: string[]; + /** Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients */ + allowed_clients?: string[]; + /** URLs that are valid to redirect to after logout from Auth0. */ + allowed_logout_urls?: string[]; + jwt_configuration?: Management.ClientJwtConfiguration; + encryption_key?: Management.ClientEncryptionKey | null; + /** true to use Auth0 instead of the IdP to do Single Sign On, false otherwise (default: false) */ + sso?: boolean; + /** true if this client can be used to make cross-origin authentication requests, false otherwise if cross origin is disabled */ + cross_origin_authentication?: boolean; + /** URL for the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page. */ + cross_origin_loc?: string | null; + /** true to disable Single Sign On, false otherwise (default: false) */ + sso_disabled?: boolean; + /** true if the custom login page is to be used, false otherwise. */ + custom_login_page_on?: boolean; + token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodOrNullEnum | null; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; + app_type?: Management.ClientAppTypeEnum; + /** Whether this client a first party client or not */ + is_first_party?: boolean; + /** Whether this client will conform to strict OIDC specifications */ + oidc_conformant?: boolean; + /** The content (HTML, CSS, JS) of the custom login page */ + custom_login_page?: string; + custom_login_page_preview?: string; + token_quota?: Management.UpdateTokenQuota | null; + /** Form template for WS-Federation protocol */ + form_template?: string; + addons?: Management.ClientAddons; + client_metadata?: Management.ClientMetadata; + mobile?: Management.ClientMobile; + /** Initiate login uri, must be https */ + initiate_login_uri?: string; + native_social_login?: Management.NativeSocialLogin; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; + organization_usage?: Management.ClientOrganizationUsagePatchEnum | null; + organization_require_behavior?: Management.ClientOrganizationRequireBehaviorPatchEnum | null; + /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ + organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; + client_authentication_methods?: Management.ClientAuthenticationMethod | null; + /** Makes the use of Pushed Authorization Requests mandatory for this client */ + require_pushed_authorization_requests?: boolean; + /** Makes the use of Proof-of-Possession mandatory for this client */ + require_proof_of_possession?: boolean; + signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; + /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ + par_request_expiry?: number | null; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration; +} + +/** + * @example + * { + * from: "from", + * take: 1, + * name: "name", + * fields: "fields", + * include_fields: true + * } + */ +export interface ListConnectionsQueryParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; + /** Provide strategies to only retrieve connections with such strategies */ + strategy?: (Management.ConnectionStrategyEnum | null) | (Management.ConnectionStrategyEnum | null)[]; + /** Provide the name of the connection to retrieve */ + name?: 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; + /** true if the fields specified are to be included in the result, false otherwise (defaults to true) */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * name: "name", + * strategy: "ad" + * } + */ +export interface CreateConnectionRequestContent { + /** The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 */ + name: string; + /** Connection name used in the new universal login experience */ + display_name?: string; + strategy: Management.ConnectionIdentityProviderEnum; + options?: Management.ConnectionPropertiesOptions; + /** DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. */ + enabled_clients?: string[]; + /** true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) */ + is_domain_connection?: boolean; + /** 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.) */ + show_as_button?: 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. */ + realms?: string[]; + metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetConnectionRequestParameters { + /** 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; + /** true if the fields specified are to be included in the result, false otherwise (defaults to true) */ + include_fields?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateConnectionRequestContent { + /** The connection name used in the new universal login experience. If display_name is not included in the request, the field will be overwritten with the name value. */ + display_name?: string; + options?: Management.UpdateConnectionOptions | null; + /** DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients. */ + enabled_clients?: string[]; + /** true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) */ + is_domain_connection?: boolean; + /** 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.) */ + show_as_button?: 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. */ + realms?: string[]; + metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; +} + +/** + * @example + * { + * domain: "domain", + * type: "auth0_managed_certs" + * } + */ +export interface CreateCustomDomainRequestContent { + /** Domain name. */ + domain: string; + type: Management.CustomDomainProvisioningTypeEnum; + verification_method?: Management.CustomDomainVerificationMethodEnum; + tls_policy?: Management.CustomDomainTlsPolicyEnum; + custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined; +} + +/** + * @example + * {} + */ +export interface UpdateCustomDomainRequestContent { + tls_policy?: Management.CustomDomainTlsPolicyEnum; + custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * fields: "fields", + * include_fields: true, + * user_id: "user_id", + * client_id: "client_id", + * type: "public_key" + * } + */ +export interface ListDeviceCredentialsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. There is a maximum of 1000 results allowed from this endpoint. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; + /** user_id of the devices to retrieve. */ + user_id?: string | null; + /** client_id of the devices to retrieve. */ + client_id?: string | null; + /** Type of credentials to retrieve. Must be `public_key`, `refresh_token` or `rotating_refresh_token`. The property will default to `refresh_token` when paging is requested */ + type?: Management.DeviceCredentialTypeEnum | null; +} + +/** + * @example + * { + * device_name: "device_name", + * value: "value", + * device_id: "device_id" + * } + */ +export interface CreatePublicKeyDeviceCredentialRequestContent { + /** Name for this device easily recognized by owner. */ + device_name: string; + /** Base64 encoded string containing the credential. */ + value: string; + /** Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor. */ + device_id: string; + /** client_id of the client (application) this credential is for. */ + client_id?: string; +} + +/** + * @example + * { + * template: "verify_email" + * } + */ +export interface CreateEmailTemplateRequestContent { + template: Management.EmailTemplateNameEnum; + /** Body of the email template. */ + body?: string | null; + /** Senders `from` email address. */ + from?: string | null; + /** URL to redirect the user to after a successful action. */ + resultUrl?: string | null; + /** Subject line of the email. */ + subject?: string | null; + /** Syntax of the template body. */ + syntax?: string | null; + /** Lifetime in seconds that the link within the email will be valid for. */ + urlLifetimeInSeconds?: number | null; + /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ + includeEmailInRedirect?: boolean; + /** Whether the template is enabled (true) or disabled (false). */ + enabled?: boolean | null; +} + +/** + * @example + * { + * template: "verify_email" + * } + */ +export interface SetEmailTemplateRequestContent { + template: Management.EmailTemplateNameEnum; + /** Body of the email template. */ + body?: string | null; + /** Senders `from` email address. */ + from?: string | null; + /** URL to redirect the user to after a successful action. */ + resultUrl?: string | null; + /** Subject line of the email. */ + subject?: string | null; + /** Syntax of the template body. */ + syntax?: string | null; + /** Lifetime in seconds that the link within the email will be valid for. */ + urlLifetimeInSeconds?: number | null; + /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ + includeEmailInRedirect?: boolean; + /** Whether the template is enabled (true) or disabled (false). */ + enabled?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateEmailTemplateRequestContent { + template?: Management.EmailTemplateNameEnum; + /** Body of the email template. */ + body?: string | null; + /** Senders `from` email address. */ + from?: string | null; + /** URL to redirect the user to after a successful action. */ + resultUrl?: string | null; + /** Subject line of the email. */ + subject?: string | null; + /** Syntax of the template body. */ + syntax?: string | null; + /** Lifetime in seconds that the link within the email will be valid for. */ + urlLifetimeInSeconds?: number | null; + /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ + includeEmailInRedirect?: boolean; + /** Whether the template is enabled (true) or disabled (false). */ + enabled?: boolean | null; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListEventStreamsRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * {} + */ +export interface UpdateEventStreamRequestContent { + /** Name of the event stream. */ + name?: string; + /** List of event types subscribed to in this stream. */ + subscriptions?: Management.EventStreamSubscription[]; + destination?: Management.EventStreamDestinationPatch; + status?: Management.EventStreamStatusEnum; +} + +/** + * @example + * { + * event_type: "user.created" + * } + */ +export interface CreateEventStreamTestEventRequestContent { + event_type: Management.EventStreamTestEventTypeEnum; + data?: Management.TestEventDataContent; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * synchronous: true + * } + */ +export interface FlowsListRequest { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** hydration param */ + hydrate?: ("form_count" | null) | ("form_count" | null)[]; + /** flag to filter by sync/async flows */ + synchronous?: boolean | null; +} + +/** + * @example + * { + * name: "name" + * } + */ +export interface CreateFlowRequestContent { + name: string; + actions?: Management.FlowAction[]; +} + +/** + * @example + * {} + */ +export interface GetFlowRequestParameters { + /** hydration param */ + hydrate?: + | (Management.GetFlowRequestParametersHydrateEnum | null) + | (Management.GetFlowRequestParametersHydrateEnum | null)[]; +} + +/** + * @example + * {} + */ +export interface UpdateFlowRequestContent { + name?: string; + actions?: Management.FlowAction[]; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListFormsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Query parameter to hydrate the response with additional data */ + hydrate?: + | (Management.FormsRequestParametersHydrateEnum | null) + | (Management.FormsRequestParametersHydrateEnum | null)[]; +} + +/** + * @example + * { + * name: "name" + * } + */ +export interface CreateFormRequestContent { + name: string; + messages?: Management.FormMessages; + languages?: Management.FormLanguages; + translations?: Management.FormTranslations; + nodes?: Management.FormNodeList; + start?: Management.FormStartNode; + ending?: Management.FormEndingNode; + style?: Management.FormStyle; +} + +/** + * @example + * {} + */ +export interface GetFormRequestParameters { + /** Query parameter to hydrate the response with additional data */ + hydrate?: + | (Management.FormsRequestParametersHydrateEnum | null) + | (Management.FormsRequestParametersHydrateEnum | null)[]; +} + +/** + * @example + * {} + */ +export interface UpdateFormRequestContent { + name?: string; + messages?: Management.FormMessagesNullable | undefined; + languages?: Management.FormLanguagesNullable | undefined; + translations?: Management.FormTranslationsNullable | undefined; + nodes?: Management.FormNodeListNullable | undefined; + start?: Management.FormStartNodeNullable | undefined; + ending?: Management.FormEndingNodeNullable | undefined; + style?: Management.FormStyleNullable | undefined; +} + +/** + * @example + * { + * per_page: 1, + * page: 1, + * include_totals: true, + * user_id: "user_id", + * client_id: "client_id", + * audience: "audience" + * } + */ +export interface ListUserGrantsRequestParameters { + /** Number of results per page. */ + per_page?: number | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** user_id of the grants to retrieve. */ + user_id?: string | null; + /** client_id of the grants to retrieve. */ + client_id?: string | null; + /** audience of the grants to retrieve. */ + audience?: string | null; +} + +/** + * @example + * { + * user_id: "user_id" + * } + */ +export interface DeleteUserGrantByUserIdRequestParameters { + /** user_id of the grant to delete. */ + user_id: string; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * enabled: true, + * fields: "fields", + * triggerId: "credentials-exchange" + * } + */ +export interface ListHooksRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Optional filter on whether a hook is enabled (true) or disabled (false). */ + enabled?: boolean | null; + /** Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. */ + fields?: string | null; + /** Retrieves hooks that match the trigger */ + triggerId?: Management.HookTriggerIdEnum | null; +} + +/** + * @example + * { + * name: "name", + * script: "script", + * triggerId: "credentials-exchange" + * } + */ +export interface CreateHookRequestContent { + /** Name of this hook. */ + name: string; + /** Code to be executed when this hook runs. */ + script: string; + /** Whether this hook will be executed (true) or ignored (false). */ + enabled?: boolean; + dependencies?: Management.HookDependencies; + triggerId: Management.HookTriggerIdEnum; +} + +/** + * @example + * { + * fields: "fields" + * } + */ +export interface GetHookRequestParameters { + /** Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. */ + fields?: string | null; +} + +/** + * @example + * {} + */ +export interface UpdateHookRequestContent { + /** Name of this hook. */ + name?: string; + /** Code to be executed when this hook runs. */ + script?: string; + /** Whether this hook will be executed (true) or ignored (false). */ + enabled?: boolean; + dependencies?: Management.HookDependencies; +} + +/** + * @example + * {} + */ +export interface UpdateLogStreamRequestContent { + /** log stream name */ + name?: string; + status?: Management.LogStreamStatusEnum; + /** True for priority log streams, false for non-priority */ + isPriority?: boolean; + /** Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. */ + filters?: Management.LogStreamFilter[]; + pii_config?: Management.LogStreamPiiConfig; + sink?: Management.LogStreamSinkPatch; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * sort: "sort", + * fields: "fields", + * include_fields: true, + * include_totals: true, + * search: "search" + * } + */ +export interface ListLogsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Paging is disabled if parameter not sent. Default: 50. Max value: 100 */ + per_page?: number | null; + /** Field to use for sorting appended with :1 for ascending and :-1 for descending. e.g. date:-1 */ + sort?: 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false) */ + include_fields?: boolean | null; + /** Return results as an array when false (default). Return results inside an object that also contains a total result count when true. */ + include_totals?: boolean | null; + /** + * Retrieves logs that match the specified search criteria. This parameter can be combined with all the others in the /api/logs endpoint but is specified separately for clarity. + * If no fields are provided a case insensitive 'starts with' search is performed on all of the following fields: client_name, connection, user_name. Otherwise, you can specify multiple fields and specify the search using the %field%:%search%, for example: application:node user:"John@contoso.com". + * Values specified without quotes are matched using a case insensitive 'starts with' search. If quotes are used a case insensitve exact search is used. If multiple fields are used, the AND operator is used to join the clauses. + */ + search?: string | null; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListNetworkAclsRequestParameters { + /** Use this field to request a specific page of the list results. */ + page?: number | null; + /** The amount of results per page. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * description: "description", + * active: true, + * priority: 1.1, + * rule: { + * action: {}, + * scope: "management" + * } + * } + */ +export interface CreateNetworkAclRequestContent { + description: string; + /** Indicates whether or not this access control list is actively being used */ + active: boolean; + /** Indicates the order in which the ACL will be evaluated relative to other ACL rules. */ + priority: number; + rule: Management.NetworkAclRule; +} + +/** + * @example + * { + * description: "description", + * active: true, + * priority: 1.1, + * rule: { + * action: {}, + * scope: "management" + * } + * } + */ +export interface SetNetworkAclRequestContent { + description: string; + /** Indicates whether or not this access control list is actively being used */ + active: boolean; + /** Indicates the order in which the ACL will be evaluated relative to other ACL rules. */ + priority: number; + rule: Management.NetworkAclRule; +} + +/** + * @example + * {} + */ +export interface UpdateNetworkAclRequestContent { + description?: string; + /** Indicates whether or not this access control list is actively being used */ + active?: boolean; + /** Indicates the order in which the ACL will be evaluated relative to other ACL rules. */ + priority?: number; + rule?: Management.NetworkAclRule; +} + +/** + * @example + * { + * from: "from", + * take: 1, + * sort: "sort" + * } + */ +export interface ListOrganizationsRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; + /** Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1. We currently support sorting by the following fields: name, display_name and created_at. */ + sort?: string | null; +} + +/** + * @example + * { + * name: "name" + * } + */ +export interface CreateOrganizationRequestContent { + /** The name of this organization. */ + name: string; + /** Friendly name of this organization. */ + display_name?: string; + branding?: Management.OrganizationBranding; + metadata?: Management.OrganizationMetadata; + /** Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed) */ + enabled_connections?: Management.ConnectionForOrganization[]; + token_quota?: Management.CreateTokenQuota; +} + +/** + * @example + * {} + */ +export interface UpdateOrganizationRequestContent { + /** Friendly name of this organization. */ + display_name?: string; + /** The name of this organization. */ + name?: string; + branding?: Management.OrganizationBranding; + metadata?: Management.OrganizationMetadata; + token_quota?: Management.UpdateTokenQuota | null; +} + +/** + * @example + * {} + */ +export interface UpdateSettingsRequestContent { + universal_login_experience?: Management.UniversalLoginExperienceEnum; + /** Whether identifier first is enabled or not */ + identifier_first?: boolean | null; + /** Use WebAuthn with Device Biometrics as the first authentication factor */ + webauthn_platform_first_factor?: boolean | null; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * include_fields: true + * } + */ +export interface ListResourceServerRequestParameters { + /** An optional filter on the resource server identifier. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../resource-servers?identifiers=id1&identifiers=id2 */ + identifiers?: (string | null) | (string | null)[]; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * identifier: "identifier" + * } + */ +export interface CreateResourceServerRequestContent { + /** Friendly name for this resource server. Can not contain `<` or `>` characters. */ + name?: string; + /** Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set. */ + identifier: string; + /** List of permissions (scopes) that this API uses. */ + scopes?: Management.ResourceServerScope[]; + signing_alg?: Management.SigningAlgorithmEnum; + /** Secret used to sign tokens when using symmetric algorithms (HS256). */ + signing_secret?: string; + /** Whether refresh tokens can be issued for this API (true) or not (false). */ + allow_offline_access?: boolean; + /** Expiration value (in seconds) for access tokens issued for this API from the token endpoint. */ + token_lifetime?: number; + token_dialect?: Management.ResourceServerTokenDialectSchemaEnum; + /** Whether to skip user consent for applications flagged as first party (true) or not (false). */ + skip_consent_for_verifiable_first_party_clients?: boolean; + /** Whether to enforce authorization policies (true) or to ignore them (false). */ + enforce_policies?: boolean; + token_encryption?: Management.ResourceServerTokenEncryption | null; + consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + authorization_details?: unknown[]; + proof_of_possession?: Management.ResourceServerProofOfPossession | null; + subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; +} + +/** + * @example + * { + * include_fields: true + * } + */ +export interface GetResourceServerRequestParameters { + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateResourceServerRequestContent { + /** Friendly name for this resource server. Can not contain `<` or `>` characters. */ + name?: string; + /** List of permissions (scopes) that this API uses. */ + scopes?: Management.ResourceServerScope[]; + signing_alg?: Management.SigningAlgorithmEnum; + /** Secret used to sign tokens when using symmetric algorithms (HS256). */ + signing_secret?: string; + /** Whether to skip user consent for applications flagged as first party (true) or not (false). */ + skip_consent_for_verifiable_first_party_clients?: boolean; + /** Whether refresh tokens can be issued for this API (true) or not (false). */ + allow_offline_access?: boolean; + /** Expiration value (in seconds) for access tokens issued for this API from the token endpoint. */ + token_lifetime?: number; + token_dialect?: Management.ResourceServerTokenDialectSchemaEnum; + /** Whether authorization policies are enforced (true) or not enforced (false). */ + enforce_policies?: boolean; + token_encryption?: Management.ResourceServerTokenEncryption | null; + consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + authorization_details?: unknown[]; + proof_of_possession?: Management.ResourceServerProofOfPossession | null; + subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; +} + +/** + * @example + * { + * per_page: 1, + * page: 1, + * include_totals: true, + * name_filter: "name_filter" + * } + */ +export interface ListRolesRequestParameters { + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Optional filter on name (case-insensitive). */ + name_filter?: string | null; +} + +/** + * @example + * { + * name: "name" + * } + */ +export interface CreateRoleRequestContent { + /** Name of the role. */ + name: string; + /** Description of the role. */ + description?: string; +} + +/** + * @example + * {} + */ +export interface UpdateRoleRequestContent { + /** Name of this role. */ + name?: string; + /** Description of this role. */ + description?: string; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * enabled: true, + * fields: "fields", + * include_fields: true + * } + */ +export interface ListRulesRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Optional filter on whether a rule is enabled (true) or disabled (false). */ + enabled?: boolean | 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * name: "name", + * script: "script" + * } + */ +export interface CreateRuleRequestContent { + /** Name of this rule. */ + name: string; + /** Code to be executed when this rule runs. */ + script: string; + /** Order that this rule should execute in relative to other rules. Lower-valued rules execute first. */ + order?: number; + /** Whether the rule is enabled (true), or disabled (false). */ + enabled?: boolean; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetRuleRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateRuleRequestContent { + /** Code to be executed when this rule runs. */ + script?: string; + /** Name of this rule. */ + name?: string; + /** Order that this rule should execute in relative to other rules. Lower-valued rules execute first. */ + order?: number; + /** Whether the rule is enabled (true), or disabled (false). */ + enabled?: boolean; +} + +/** + * @example + * { + * value: "value" + * } + */ +export interface SetRulesConfigRequestContent { + /** Value for a rules config variable. */ + value: string; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListSelfServiceProfilesRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * name: "name" + * } + */ +export interface CreateSelfServiceProfileRequestContent { + /** The name of the self-service Profile. */ + name: string; + /** The description of the self-service Profile. */ + description?: string; + branding?: Management.SelfServiceProfileBrandingProperties; + /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ + allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; + /** List of attributes to be mapped that will be shown to the user during the SS-SSO flow. */ + user_attributes?: Management.SelfServiceProfileUserAttribute[]; + /** ID of the user-attribute-profile to associate with this self-service profile. */ + user_attribute_profile_id?: string; +} + +/** + * @example + * {} + */ +export interface UpdateSelfServiceProfileRequestContent { + /** The name of the self-service Profile. */ + name?: string; + description?: (Management.SelfServiceProfileDescription | undefined) | null; + branding?: Management.SelfServiceProfileBranding | undefined; + /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ + allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; + user_attributes?: (Management.SelfServiceProfileUserAttributes | undefined) | null; + /** ID of the user-attribute-profile to associate with this self-service profile. */ + user_attribute_profile_id?: string | null; +} + +/** + * @example + * {} + */ +export interface UpdateSessionRequestContent { + session_metadata?: (Management.SessionMetadata | undefined) | null; +} + +/** + * @example + * { + * from: "from", + * to: "to" + * } + */ +export interface GetDailyStatsRequestParameters { + /** Optional first day of the date range (inclusive) in YYYYMMDD format. */ + from?: string | null; + /** Optional last day of the date range (inclusive) in YYYYMMDD format. */ + to?: string | null; +} + +/** + * @example + * { + * akamai_enabled: true + * } + */ +export interface UpdateSupplementalSignalsRequestContent { + /** Indicates if incoming Akamai Headers should be processed */ + akamai_enabled: boolean; +} + +/** + * @example + * { + * user_id: "user_id" + * } + */ +export interface VerifyEmailTicketRequestContent { + /** URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. */ + result_url?: string; + /** user_id of for whom the ticket should be created. */ + user_id: string; + /** ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's default login route after the ticket is used. client_id is required to use the Password Reset Post Challenge trigger. */ + client_id?: string; + /** (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. */ + organization_id?: string; + /** Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). */ + ttl_sec?: number; + /** Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). */ + includeEmailInRedirect?: boolean; + identity?: Management.Identity; +} + +/** + * @example + * {} + */ +export interface ChangePasswordTicketRequestContent { + /** URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. */ + result_url?: string; + /** user_id of for whom the ticket should be created. */ + user_id?: string; + /** ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's default login route after the ticket is used. client_id is required to use the Password Reset Post Challenge trigger. */ + client_id?: string; + /** (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. */ + organization_id?: string; + /** ID of the connection. If provided, allows the user to be specified using email instead of user_id. If you set this value, you must also send the email parameter. You cannot send user_id when specifying a connection_id. */ + connection_id?: string; + /** Email address of the user for whom the tickets should be created. Requires the connection_id parameter. Cannot be specified when using user_id. */ + email?: string; + /** Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). */ + ttl_sec?: number; + /** Whether to set the email_verified attribute to true (true) or whether it should not be updated (false). */ + mark_email_as_verified?: boolean; + /** Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). */ + includeEmailInRedirect?: boolean; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface TokenExchangeProfilesListRequest { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * { + * name: "name", + * subject_token_type: "subject_token_type", + * action_id: "action_id" + * } + */ +export interface CreateTokenExchangeProfileRequestContent { + /** Friendly name of this profile. */ + name: string; + /** Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI. */ + subject_token_type: string; + /** The ID of the Custom Token Exchange action to execute for this profile, in order to validate the subject_token. The action must use the custom-token-exchange trigger. */ + action_id: string; +} + +/** + * @example + * {} + */ +export interface UpdateTokenExchangeProfileRequestContent { + /** Friendly name of this profile. */ + name?: string; + /** Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI. */ + subject_token_type?: string; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListUserAttributeProfileRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 5. */ + take?: number | null; +} + +/** + * @example + * { + * name: "name", + * user_attributes: { + * "key": { + * description: "description", + * label: "label", + * profile_required: true, + * auth0_mapping: "auth0_mapping" + * } + * } + * } + */ +export interface CreateUserAttributeProfileRequestContent { + name: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfileUserId; + user_attributes: Management.UserAttributeProfileUserAttributes; +} + +/** + * @example + * {} + */ +export interface UpdateUserAttributeProfileRequestContent { + name?: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfilePatchUserId | undefined; + user_attributes?: Management.UserAttributeProfileUserAttributes; +} + +/** + * @example + * { + * identifier: "identifier", + * consider_brute_force_enablement: true + * } + */ +export interface ListUserBlocksByIdentifierRequestParameters { + /** Should be any of a username, phone number, or email. */ + identifier: string; + /** + * If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. + * If true and Brute Force Protection is disabled, will return an empty list. + * + */ + consider_brute_force_enablement?: boolean | null; +} + +/** + * @example + * { + * identifier: "identifier" + * } + */ +export interface DeleteUserBlocksByIdentifierRequestParameters { + /** Should be any of a username, phone number, or email. */ + identifier: string; +} + +/** + * @example + * { + * consider_brute_force_enablement: true + * } + */ +export interface ListUserBlocksRequestParameters { + /** + * If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. + * If true and Brute Force Protection is disabled, will return an empty list. + * + */ + consider_brute_force_enablement?: boolean | null; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * sort: "sort", + * connection: "connection", + * fields: "fields", + * include_fields: true, + * q: "q", + * search_engine: "v1", + * primary_order: true + * } + */ +export interface ListUsersRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1 */ + sort?: string | null; + /** Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name" */ + connection?: 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; + /** Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. */ + q?: string | null; + /** The version of the search engine */ + search_engine?: Management.SearchEngineVersionsEnum | null; + /** If true (default), results are returned in a deterministic order. If false, results may be returned in a non-deterministic order, which can enhance performance for complex queries targeting a small number of users. Set to false only when consistent ordering and pagination is not required. */ + primary_order?: boolean | null; +} + +/** + * @example + * { + * connection: "connection" + * } + */ +export interface CreateUserRequestContent { + /** The user's email. */ + email?: string; + /** The user's phone number (following the E.164 recommendation). */ + phone_number?: string; + user_metadata?: Management.UserMetadata; + /** Whether this user was blocked by an administrator (true) or not (false). */ + blocked?: boolean; + /** Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if `email_verified` is false or not specified */ + email_verified?: boolean; + /** Whether this phone number has been verified (true) or not (false). */ + phone_verified?: boolean; + app_metadata?: Management.AppMetadata; + /** The user's given name(s). */ + given_name?: string; + /** The user's family name(s). */ + family_name?: string; + /** The user's full name. */ + name?: string; + /** The user's nickname. */ + nickname?: string; + /** A URI pointing to the user's picture. */ + picture?: string; + /** The external user's id provided by the identity provider. */ + user_id?: string; + /** Name of the connection this user should be created in. */ + connection: string; + /** Initial password for this user. Only valid for auth0 connection strategy. */ + password?: string; + /** Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of `email_verified` parameter. */ + verify_email?: boolean; + /** The user's username. Only valid if the connection requires a username. */ + username?: string; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true, + * email: "email" + * } + */ +export interface ListUsersByEmailRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ + include_fields?: boolean | null; + /** Email address to search for (case-sensitive). */ + email: string; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetUserRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateUserRequestContent { + /** Whether this user was blocked by an administrator (true) or not (false). */ + blocked?: boolean; + /** Whether this email address is verified (true) or unverified (false). If set to false the user will not receive a verification email unless `verify_email` is set to true. */ + email_verified?: boolean; + /** Email address of this user. */ + email?: string | null; + /** The user's phone number (following the E.164 recommendation). */ + phone_number?: string | null; + /** Whether this phone number has been verified (true) or not (false). */ + phone_verified?: boolean; + user_metadata?: Management.UserMetadata; + app_metadata?: Management.AppMetadata; + /** Given name/first name/forename of this user. */ + given_name?: string | null; + /** Family name/last name/surname of this user. */ + family_name?: string | null; + /** Name of this user. */ + name?: string | null; + /** Preferred nickname or alias of this user. */ + nickname?: string | null; + /** URL to picture, photo, or avatar of this user. */ + picture?: string | null; + /** Whether this user will receive a verification email after creation (true) or no email (false). Overrides behavior of `email_verified` parameter. */ + verify_email?: boolean; + /** Whether this user will receive a text after changing the phone number (true) or no text (false). Only valid when changing phone number for SMS connections. */ + verify_phone_number?: boolean; + /** New password for this user. Only valid for database connections. */ + password?: string | null; + /** Name of the connection to target for this user update. */ + connection?: string; + /** Auth0 client ID. Only valid when updating email address. */ + client_id?: string; + /** The user's username. Only valid if the connection requires a username. */ + username?: string | null; +} + +/** + * @example + * {} + */ +export interface RevokeUserAccessRequestContent { + /** ID of the session to revoke. */ + session_id?: string; + /** Whether to preserve the refresh tokens associated with the session. */ + preserve_refresh_tokens?: boolean; +} + +/** + * @example + * { + * page: 1, + * per_page: 1 + * } + */ +export interface ListActionVersionsRequestParameters { + /** Use this field to request a specific page of the list results. */ + page?: number | null; + /** This field specify the maximum number of results to be returned by the server. 20 by default */ + per_page?: number | null; +} + +/** + * @example + * { + * page: 1, + * per_page: 1 + * } + */ +export interface ListActionTriggerBindingsRequestParameters { + /** Use this field to request a specific page of the list results. */ + page?: number | null; + /** The maximum number of results to be returned in a single request. 20 by default */ + per_page?: number | null; +} + +/** + * @example + * {} + */ +export interface UpdateActionBindingsRequestContent { + /** The actions that will be bound to this trigger. The order in which they are included will be the order in which they are executed. */ + bindings?: Management.ActionBindingWithRef[]; +} + +/** + * @example + * {} + */ +export interface UpdateBreachedPasswordDetectionSettingsRequestContent { + /** Whether or not breached password detection is active. */ + enabled?: boolean; + /** + * Action to take when a breached password is detected during a login. + * Possible values: block, user_notification, admin_notification. + */ + shields?: Management.BreachedPasswordDetectionShieldsEnum[]; + /** + * When "admin_notification" is enabled, determines how often email notifications are sent. + * Possible values: immediately, daily, weekly, monthly. + */ + admin_notification_frequency?: Management.BreachedPasswordDetectionAdminNotificationFrequencyEnum[]; + method?: Management.BreachedPasswordDetectionMethodEnum; + stage?: Management.BreachedPasswordDetectionStage; +} + +/** + * @example + * {} + */ +export interface UpdateBruteForceSettingsRequestContent { + /** Whether or not brute force attack protections are active. */ + enabled?: boolean; + /** + * Action to take when a brute force protection threshold is violated. + * Possible values: block, user_notification. + */ + shields?: UpdateBruteForceSettingsRequestContent.Shields.Item[]; + /** List of trusted IP addresses that will not have attack protection enforced against them. */ + allowlist?: string[]; + /** + * Account Lockout: Determines whether or not IP address is used when counting failed attempts. + * Possible values: count_per_identifier_and_ip, count_per_identifier. + */ + mode?: UpdateBruteForceSettingsRequestContent.Mode; + /** Maximum number of unsuccessful attempts. */ + max_attempts?: number; +} + +export namespace UpdateBruteForceSettingsRequestContent { + export type Shields = Shields.Item[]; + + export namespace Shields { + export const Item = { + Block: "block", + UserNotification: "user_notification", + } as const; + export type Item = (typeof Item)[keyof typeof Item]; + } + + /** + * Account Lockout: Determines whether or not IP address is used when counting failed attempts. + * Possible values: count_per_identifier_and_ip, count_per_identifier. + */ + export const Mode = { + CountPerIdentifierAndIp: "count_per_identifier_and_ip", + CountPerIdentifier: "count_per_identifier", + } as const; + export type Mode = (typeof Mode)[keyof typeof Mode]; +} + +/** + * @example + * {} + */ +export interface UpdateSuspiciousIpThrottlingSettingsRequestContent { + /** Whether or not suspicious IP throttling attack protections are active. */ + enabled?: boolean; + /** + * Action to take when a suspicious IP throttling threshold is violated. + * Possible values: block, admin_notification. + */ + shields?: Management.SuspiciousIpThrottlingShieldsEnum[]; + allowlist?: Management.SuspiciousIpThrottlingAllowlist; + stage?: Management.SuspiciousIpThrottlingStage; +} + +/** + * @example + * { + * borders: { + * button_border_radius: 1.1, + * button_border_weight: 1.1, + * buttons_style: "pill", + * input_border_radius: 1.1, + * input_border_weight: 1.1, + * inputs_style: "pill", + * show_widget_shadow: true, + * widget_border_weight: 1.1, + * widget_corner_radius: 1.1 + * }, + * colors: { + * body_text: "body_text", + * error: "error", + * header: "header", + * icons: "icons", + * input_background: "input_background", + * input_border: "input_border", + * input_filled_text: "input_filled_text", + * input_labels_placeholders: "input_labels_placeholders", + * links_focused_components: "links_focused_components", + * primary_button: "primary_button", + * primary_button_label: "primary_button_label", + * secondary_button_border: "secondary_button_border", + * secondary_button_label: "secondary_button_label", + * success: "success", + * widget_background: "widget_background", + * widget_border: "widget_border" + * }, + * fonts: { + * body_text: { + * bold: true, + * size: 1.1 + * }, + * buttons_text: { + * bold: true, + * size: 1.1 + * }, + * font_url: "font_url", + * input_labels: { + * bold: true, + * size: 1.1 + * }, + * links: { + * bold: true, + * size: 1.1 + * }, + * links_style: "normal", + * reference_text_size: 1.1, + * subtitle: { + * bold: true, + * size: 1.1 + * }, + * title: { + * bold: true, + * size: 1.1 + * } + * }, + * page_background: { + * background_color: "background_color", + * background_image_url: "background_image_url", + * page_layout: "center" + * }, + * widget: { + * header_text_alignment: "center", + * logo_height: 1.1, + * logo_position: "center", + * logo_url: "logo_url", + * social_buttons_layout: "bottom" + * } + * } + */ +export interface CreateBrandingThemeRequestContent { + borders: Management.BrandingThemeBorders; + colors: Management.BrandingThemeColors; + /** Display Name */ + displayName?: string; + fonts: Management.BrandingThemeFonts; + page_background: Management.BrandingThemePageBackground; + widget: Management.BrandingThemeWidget; +} + +/** + * @example + * { + * borders: { + * button_border_radius: 1.1, + * button_border_weight: 1.1, + * buttons_style: "pill", + * input_border_radius: 1.1, + * input_border_weight: 1.1, + * inputs_style: "pill", + * show_widget_shadow: true, + * widget_border_weight: 1.1, + * widget_corner_radius: 1.1 + * }, + * colors: { + * body_text: "body_text", + * error: "error", + * header: "header", + * icons: "icons", + * input_background: "input_background", + * input_border: "input_border", + * input_filled_text: "input_filled_text", + * input_labels_placeholders: "input_labels_placeholders", + * links_focused_components: "links_focused_components", + * primary_button: "primary_button", + * primary_button_label: "primary_button_label", + * secondary_button_border: "secondary_button_border", + * secondary_button_label: "secondary_button_label", + * success: "success", + * widget_background: "widget_background", + * widget_border: "widget_border" + * }, + * fonts: { + * body_text: { + * bold: true, + * size: 1.1 + * }, + * buttons_text: { + * bold: true, + * size: 1.1 + * }, + * font_url: "font_url", + * input_labels: { + * bold: true, + * size: 1.1 + * }, + * links: { + * bold: true, + * size: 1.1 + * }, + * links_style: "normal", + * reference_text_size: 1.1, + * subtitle: { + * bold: true, + * size: 1.1 + * }, + * title: { + * bold: true, + * size: 1.1 + * } + * }, + * page_background: { + * background_color: "background_color", + * background_image_url: "background_image_url", + * page_layout: "center" + * }, + * widget: { + * header_text_alignment: "center", + * logo_height: 1.1, + * logo_position: "center", + * logo_url: "logo_url", + * social_buttons_layout: "bottom" + * } + * } + */ +export interface UpdateBrandingThemeRequestContent { + borders: Management.BrandingThemeBorders; + colors: Management.BrandingThemeColors; + /** Display Name */ + displayName?: string; + fonts: Management.BrandingThemeFonts; + page_background: Management.BrandingThemePageBackground; + widget: Management.BrandingThemeWidget; +} + +/** + * @example + * { + * disabled: true + * } + */ +export interface ListBrandingPhoneProvidersRequestParameters { + /** Whether the provider is enabled (false) or disabled (true). */ + disabled?: boolean | null; +} + +/** + * @example + * { + * name: "twilio", + * credentials: { + * auth_token: "auth_token" + * } + * } + */ +export interface CreateBrandingPhoneProviderRequestContent { + name: Management.PhoneProviderNameEnum; + /** Whether the provider is enabled (false) or disabled (true). */ + disabled?: boolean; + configuration?: Management.PhoneProviderConfiguration; + credentials: Management.PhoneProviderCredentials; +} + +/** + * @example + * {} + */ +export interface UpdateBrandingPhoneProviderRequestContent { + name?: Management.PhoneProviderNameEnum; + /** Whether the provider is enabled (false) or disabled (true). */ + disabled?: boolean; + credentials?: Management.PhoneProviderCredentials; + configuration?: Management.PhoneProviderConfiguration; +} + +/** + * @example + * { + * to: "to" + * } + */ +export interface CreatePhoneProviderSendTestRequestContent { + /** The recipient phone number to receive a given notification. */ + to: string; + delivery_method?: Management.PhoneProviderDeliveryMethodEnum; +} + +/** + * @example + * { + * disabled: true + * } + */ +export interface ListPhoneTemplatesRequestParameters { + /** Whether the template is enabled (false) or disabled (true). */ + disabled?: boolean | null; +} + +/** + * @example + * {} + */ +export interface CreatePhoneTemplateRequestContent { + type?: Management.PhoneTemplateNotificationTypeEnum; + /** Whether the template is enabled (false) or disabled (true). */ + disabled?: boolean; + content?: Management.PhoneTemplateContent; +} + +/** + * @example + * {} + */ +export interface UpdatePhoneTemplateRequestContent { + content?: Management.PartialPhoneTemplateContent; + /** Whether the template is enabled (false) or disabled (true). */ + disabled?: boolean; +} + +/** + * @example + * { + * to: "to" + * } + */ +export interface CreatePhoneTemplateTestNotificationRequestContent { + /** Destination of the testing phone notification */ + to: string; + delivery_method?: Management.PhoneProviderDeliveryMethodEnum; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListClientGrantOrganizationsRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * { + * credential_type: "public_key" + * } + */ +export interface PostClientCredentialRequestContent { + credential_type: Management.ClientCredentialTypeEnum; + /** 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 public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped. */ + pem?: string; + alg?: Management.PublicKeyCredentialAlgorithmEnum; + /** Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to `public_key` credential type. */ + parse_expiry_from_cert?: boolean; + /** The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to `public_key` credential type. */ + expires_at?: string; +} + +/** + * @example + * {} + */ +export interface PatchClientCredentialRequestContent { + /** The ISO 8601 formatted date representing the expiration of the credential. */ + expires_at?: string | null; +} + +/** + * @example + * { + * from: "from", + * take: 1, + * fields: "fields", + * include_fields: true + * } + */ +export interface ConnectionsGetRequest { + /** Provide strategies to only retrieve connections with such strategies */ + strategy?: (Management.ConnectionStrategyEnum | null) | (Management.ConnectionStrategyEnum | null)[]; + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | 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; + /** true if the fields specified are to be included in the result, false otherwise (defaults to true) */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * take: 1, + * from: "from" + * } + */ +export interface GetConnectionEnabledClientsRequestParameters { + /** Number of results per page. Defaults to 50. */ + take?: number | null; + /** Optional Id from which to start selection. */ + from?: string | null; +} + +/** + * @example + * { + * user_id_attribute: "user_id_attribute", + * mapping: [{}] + * } + */ +export interface UpdateScimConfigurationRequestContent { + /** User ID attribute for generating unique user ids */ + user_id_attribute: string; + /** The mapping between auth0 and SCIM */ + mapping: Management.ScimMappingItem[]; +} + +/** + * @example + * { + * email: "email" + * } + */ +export interface DeleteConnectionUsersByEmailQueryParameters { + /** The email of the user to delete */ + email: string; +} + +/** + * @example + * {} + */ +export interface CreateScimTokenRequestContent { + /** The scopes of the scim token */ + scopes?: string[]; + /** Lifetime of the token in seconds. Must be greater than 900 */ + token_lifetime?: number | null; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetEmailProviderRequestParameters { + /** Comma-separated list of fields to include or exclude (dependent upon include_fields) from the result. Leave empty to retrieve `name` and `enabled`. Additional fields available include `credentials`, `default_from_address`, and `settings`. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * name: "mailgun", + * credentials: { + * api_key: "api_key" + * } + * } + */ +export interface CreateEmailProviderRequestContent { + name: Management.EmailProviderNameEnum; + /** Whether the provider is enabled (true) or disabled (false). */ + enabled?: boolean; + /** Email address to use as "from" when no other address specified. */ + default_from_address?: string; + credentials: Management.EmailProviderCredentialsSchema; + settings?: (Management.EmailSpecificProviderSettingsWithAdditionalProperties | undefined) | null; +} + +/** + * @example + * {} + */ +export interface UpdateEmailProviderRequestContent { + name?: Management.EmailProviderNameEnum; + /** Whether the provider is enabled (true) or disabled (false). */ + enabled?: boolean; + /** Email address to use as "from" when no other address specified. */ + default_from_address?: string; + credentials?: Management.EmailProviderCredentialsSchema; + settings?: (Management.EmailSpecificProviderSettingsWithAdditionalProperties | undefined) | null; +} + +/** + * @example + * { + * statuses: "statuses", + * event_types: "event_types", + * date_from: "date_from", + * date_to: "date_to", + * from: "from", + * take: 1 + * } + */ +export interface ListEventStreamDeliveriesRequestParameters { + /** Comma-separated list of statuses by which to filter */ + statuses?: string | null; + /** Comma-separated list of event types by which to filter */ + event_types?: string | null; + /** An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. */ + date_from?: string | null; + /** An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. */ + date_to?: string | null; + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * {} + */ +export interface CreateEventStreamRedeliveryRequestContent { + /** An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. */ + date_from?: string; + /** An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. */ + date_to?: string; + /** Filter by status */ + statuses?: Management.EventStreamDeliveryStatusEnum[]; + /** Filter by event type */ + event_types?: Management.EventStreamEventTypeEnum[]; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ExecutionsListRequest { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * {} + */ +export interface ExecutionsGetRequest { + /** Hydration param */ + hydrate?: ("debug" | null) | ("debug" | null)[]; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListFlowsVaultConnectionsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateFlowsVaultConnectionRequestContent { + /** Flows Vault Connection name. */ + name?: string; + setup?: Management.UpdateFlowsVaultConnectionSetup; +} + +/** + * @example + * { + * user_id: "user_id" + * } + */ +export interface CreateGuardianEnrollmentTicketRequestContent { + /** user_id for the enrollment ticket */ + user_id: string; + /** alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address */ + email?: string; + /** Send an email to the user to start the enrollment */ + send_mail?: boolean; + /** Optional. Specify the locale of the enrollment email. Used with send_email. */ + email_locale?: string; + factor?: Management.GuardianEnrollmentFactorEnum; + /** Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.
Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages. */ + allow_multiple_enrollments?: boolean; +} + +/** + * @example + * { + * enabled: true + * } + */ +export interface SetGuardianFactorRequestContent { + /** Whether this factor is enabled (true) or disabled (false). */ + enabled: boolean; +} + +/** + * @example + * { + * message_types: ["sms"] + * } + */ +export interface SetGuardianFactorPhoneMessageTypesRequestContent { + /** The list of phone factors to enable on the tenant. Can include `sms` and `voice`. */ + message_types: Management.GuardianFactorPhoneFactorMessageTypeEnum[]; +} + +/** + * @example + * {} + */ +export interface SetGuardianFactorsProviderPhoneTwilioRequestContent { + /** From number */ + from?: string | null; + /** Copilot SID */ + messaging_service_sid?: string | null; + /** Twilio Authentication token */ + auth_token?: string | null; + /** Twilio SID */ + sid?: string | null; +} + +/** + * @example + * { + * provider: "auth0" + * } + */ +export interface SetGuardianFactorsProviderPhoneRequestContent { + provider: Management.GuardianFactorsProviderSmsProviderEnum; +} + +/** + * @example + * { + * enrollment_message: "enrollment_message", + * verification_message: "verification_message" + * } + */ +export interface SetGuardianFactorPhoneTemplatesRequestContent { + /** Message sent to the user when they are invited to enroll with a phone number. */ + enrollment_message: string; + /** Message sent to the user when they are prompted to verify their account. */ + verification_message: string; +} + +/** + * @example + * {} + */ +export interface SetGuardianFactorsProviderPushNotificationSnsRequestContent { + aws_access_key_id?: string | null; + aws_secret_access_key?: string | null; + aws_region?: string | null; + sns_apns_platform_application_arn?: string | null; + sns_gcm_platform_application_arn?: string | null; +} + +/** + * @example + * {} + */ +export interface UpdateGuardianFactorsProviderPushNotificationSnsRequestContent { + aws_access_key_id?: string | null; + aws_secret_access_key?: string | null; + aws_region?: string | null; + sns_apns_platform_application_arn?: string | null; + sns_gcm_platform_application_arn?: string | null; +} + +/** + * @example + * { + * provider: "guardian" + * } + */ +export interface SetGuardianFactorsProviderPushNotificationRequestContent { + provider: Management.GuardianFactorsProviderPushNotificationProviderDataEnum; +} + +/** + * @example + * {} + */ +export interface SetGuardianFactorsProviderSmsTwilioRequestContent { + /** From number */ + from?: string | null; + /** Copilot SID */ + messaging_service_sid?: string | null; + /** Twilio Authentication token */ + auth_token?: string | null; + /** Twilio SID */ + sid?: string | null; +} + +/** + * @example + * { + * provider: "auth0" + * } + */ +export interface SetGuardianFactorsProviderSmsRequestContent { + provider: Management.GuardianFactorsProviderSmsProviderEnum; +} + +/** + * @example + * { + * enrollment_message: "enrollment_message", + * verification_message: "verification_message" + * } + */ +export interface SetGuardianFactorSmsTemplatesRequestContent { + /** Message sent to the user when they are invited to enroll with a phone number. */ + enrollment_message: string; + /** Message sent to the user when they are prompted to verify their account. */ + verification_message: string; +} + +/** + * @example + * {} + */ +export interface SetGuardianFactorDuoSettingsRequestContent { + ikey?: string; + skey?: string; + host?: string; +} + +/** + * @example + * {} + */ +export interface UpdateGuardianFactorDuoSettingsRequestContent { + ikey?: string; + skey?: string; + host?: string; +} + +/** + * @example + * {} + */ +export interface CreateExportUsersRequestContent { + /** connection_id of the connection from which users will be exported. */ + connection_id?: string; + format?: Management.JobFileFormatEnum; + /** Limit the number of records. */ + limit?: number; + /** List of fields to be included in the CSV. Defaults to a predefined set of fields. */ + fields?: Management.CreateExportUsersFields[]; +} + +/** + * @example + * { + * users: fs.createReadStream("/path/to/your/file"), + * connection_id: "connection_id" + * } + */ +export interface CreateImportUsersRequestContent { + users: core.file.Uploadable; + /** connection_id of the connection to which users will be imported. */ + connection_id: string; + /** Whether to update users if they already exist (true) or to ignore them (false). */ + upsert?: boolean; + /** Customer-defined ID. */ + external_id?: string; + /** Whether to send a completion email to all tenant owners when the job is finished (true) or not (false). */ + send_completion_email?: boolean; +} + +/** + * @example + * { + * user_id: "user_id" + * } + */ +export interface CreateVerificationEmailRequestContent { + /** user_id of the user to send the verification email to. */ + user_id: string; + /** client_id of the client (application). If no value provided, the global Client ID will be used. */ + client_id?: string; + identity?: Management.Identity; + /** (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. */ + organization_id?: string; +} + +/** + * @example + * { + * keys: [{ + * kty: "EC" + * }] + * } + */ +export interface SetCustomSigningKeysRequestContent { + /** An array of custom public signing keys. */ + keys: Management.CustomSigningKeyJwk[]; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListEncryptionKeysRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Default value is 50, maximum value is 100. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * type: "customer-provided-root-key" + * } + */ +export interface CreateEncryptionKeyRequestContent { + type: Management.CreateEncryptionKeyType; +} + +/** + * @example + * { + * wrapped_key: "wrapped_key" + * } + */ +export interface ImportEncryptionKeyRequestContent { + /** Base64 encoded ciphertext of key material wrapped by public wrapping key. */ + wrapped_key: string; +} + +/** + * @example + * { + * audience: "audience", + * client_id: "client_id", + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListOrganizationClientGrantsRequestParameters { + /** Optional filter on audience of the client grant. */ + audience?: string | null; + /** Optional filter on client_id of the client grant. */ + client_id?: string | null; + /** Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../client-grants?grant_ids=id1&grant_ids=id2 */ + grant_ids?: (string | null) | (string | null)[]; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * grant_id: "grant_id" + * } + */ +export interface AssociateOrganizationClientGrantRequestContent { + /** A Client Grant ID to add to the organization. */ + grant_id: string; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListOrganizationConnectionsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * connection_id: "connection_id" + * } + */ +export interface AddOrganizationConnectionRequestContent { + /** Single connection ID to add to the organization. */ + connection_id: string; + /** When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection. */ + assign_membership_on_login?: boolean; + /** Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. */ + is_signup_enabled?: boolean; + /** Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. */ + show_as_button?: boolean; +} + +/** + * @example + * {} + */ +export interface UpdateOrganizationConnectionRequestContent { + /** When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection. */ + assign_membership_on_login?: boolean; + /** Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. */ + is_signup_enabled?: boolean; + /** Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. */ + show_as_button?: boolean; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true, + * fields: "fields", + * include_fields: true, + * sort: "sort" + * } + */ +export interface ListOrganizationInvitationsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** When true, return results inside an object that also contains the start and limit. When false (default), a direct array of results is returned. We do not yet support returning the total invitations count. */ + include_totals?: boolean | 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ + include_fields?: boolean | null; + /** Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1. */ + sort?: string | null; +} + +/** + * @example + * { + * inviter: { + * name: "name" + * }, + * invitee: { + * email: "email" + * }, + * client_id: "client_id" + * } + */ +export interface CreateOrganizationInvitationRequestContent { + inviter: Management.OrganizationInvitationInviter; + invitee: Management.OrganizationInvitationInvitee; + /** Auth0 client ID. Used to resolve the application's login initiation endpoint. */ + client_id: string; + /** The id of the connection to force invitee to authenticate with. */ + connection_id?: string; + app_metadata?: Management.AppMetadata; + user_metadata?: Management.UserMetadata; + /** Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days). */ + ttl_sec?: number; + /** List of roles IDs to associated with the user. */ + roles?: string[]; + /** Whether the user will receive an invitation email (true) or no email (false), true by default */ + send_invitation_email?: boolean; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetOrganizationInvitationRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * from: "from", + * take: 1, + * fields: "fields", + * include_fields: true + * } + */ +export interface ListOrganizationMembersRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * { + * members: ["members"] + * } + */ +export interface CreateOrganizationMemberRequestContent { + /** List of user IDs to add to the organization as members. */ + members: string[]; +} + +/** + * @example + * { + * members: ["members"] + * } + */ +export interface DeleteOrganizationMembersRequestContent { + /** List of user IDs to remove from the organization. */ + members: string[]; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListOrganizationMemberRolesRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * roles: ["roles"] + * } + */ +export interface AssignOrganizationMemberRolesRequestContent { + /** List of roles IDs to associated with the user. */ + roles: string[]; +} + +/** + * @example + * { + * roles: ["roles"] + * } + */ +export interface DeleteOrganizationMemberRolesRequestContent { + /** List of roles IDs associated with the organization member to remove. */ + roles: string[]; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true, + * page: 1, + * per_page: 1, + * include_totals: true, + * prompt: "prompt", + * screen: "screen", + * rendering_mode: "advanced" + * } + */ +export interface ListAculsRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (default: true) or excluded (false). */ + include_fields?: boolean | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Maximum value is 100, default value is 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total configuration count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; + /** Name of the prompt to filter by */ + prompt?: string | null; + /** Name of the screen to filter by */ + screen?: string | null; + /** Rendering mode to filter by */ + rendering_mode?: Management.AculRenderingModeEnum | null; +} + +/** + * @example + * { + * configs: [{ + * prompt: "login", + * screen: "login", + * rendering_mode: "advanced", + * head_tags: [{}] + * }] + * } + */ +export interface BulkUpdateAculRequestContent { + configs: Management.AculConfigs; +} + +/** + * @example + * { + * rendering_mode: "advanced", + * head_tags: [{}] + * } + */ +export interface UpdateAculRequestContent { + rendering_mode: Management.AculRenderingModeEnum; + /** Context values to make available */ + context_configuration?: string[]; + /** Override Universal Login default head tags */ + default_head_tags_disabled?: boolean | null; + /** An array of head tags */ + head_tags: Management.AculHeadTag[]; + filters?: Management.AculFilters | null; + /** Use page template with ACUL */ + use_page_template?: boolean | null; +} + +/** + * @example + * { + * enabled: true + * } + */ +export interface UpdateRiskAssessmentsSettingsRequestContent { + /** Whether or not risk assessment is enabled. */ + enabled: boolean; +} + +/** + * @example + * { + * remember_for: 1 + * } + */ +export interface UpdateRiskAssessmentsSettingsNewDeviceRequestContent { + /** Length of time to remember devices for, in days. */ + remember_for: number; +} + +/** + * @example + * { + * per_page: 1, + * page: 1, + * include_totals: true + * } + */ +export interface ListRolePermissionsRequestParameters { + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * permissions: [{ + * resource_server_identifier: "resource_server_identifier", + * permission_name: "permission_name" + * }] + * } + */ +export interface AddRolePermissionsRequestContent { + /** array of resource_server_identifier, permission_name pairs. */ + permissions: Management.PermissionRequestPayload[]; +} + +/** + * @example + * { + * permissions: [{ + * resource_server_identifier: "resource_server_identifier", + * permission_name: "permission_name" + * }] + * } + */ +export interface DeleteRolePermissionsRequestContent { + /** array of resource_server_identifier, permission_name pairs. */ + permissions: Management.PermissionRequestPayload[]; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListRoleUsersRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * { + * users: ["users"] + * } + */ +export interface AssignRoleUsersRequestContent { + /** user_id's of the users to assign the role to. */ + users: string[]; +} + +/** + * @example + * {} + */ +export interface CreateSelfServiceProfileSsoTicketRequestContent { + /** If provided, this will allow editing of the provided connection during the SSO Flow */ + connection_id?: string; + connection_config?: Management.SelfServiceProfileSsoTicketConnectionConfig; + /** List of client_ids that the connection will be enabled for. */ + enabled_clients?: string[]; + /** List of organizations that the connection will be enabled for. */ + enabled_organizations?: Management.SelfServiceProfileSsoTicketEnabledOrganization[]; + /** Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). */ + ttl_sec?: number; + domain_aliases_config?: Management.SelfServiceProfileSsoTicketDomainAliasesConfig; + provisioning_config?: Management.SelfServiceProfileSsoTicketProvisioningConfig; +} + +/** + * @example + * { + * fields: "fields", + * include_fields: true + * } + */ +export interface GetTenantSettingsRequestParameters { + /** 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. */ + fields?: string | null; + /** Whether specified fields are to be included (true) or excluded (false). */ + include_fields?: boolean | null; +} + +/** + * @example + * {} + */ +export interface UpdateTenantSettingsRequestContent { + change_password?: Management.TenantSettingsPasswordPage | null; + device_flow?: Management.TenantSettingsDeviceFlow | null; + guardian_mfa_page?: Management.TenantSettingsGuardianPage | null; + /** Default audience for API Authorization. */ + default_audience?: string; + /** Name of connection used for password grants at the `/token` endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. */ + default_directory?: string; + error_page?: Management.TenantSettingsErrorPage | null; + default_token_quota?: Management.DefaultTokenQuota | null; + flags?: Management.TenantSettingsFlags; + /** Friendly name for this tenant. */ + friendly_name?: string; + /** URL of logo to be shown for this tenant (recommended size: 150x150) */ + picture_url?: string; + /** End-user support email. */ + support_email?: string; + /** End-user support url. */ + support_url?: string; + /** URLs that are valid to redirect to after logout from Auth0. */ + allowed_logout_urls?: string[]; + /** Number of hours a session will stay valid. */ + session_lifetime?: number; + /** Number of hours for which a session can be inactive before the user must log in again. */ + idle_session_lifetime?: number; + /** Number of hours an ephemeral (non-persistent) session will stay valid. */ + ephemeral_session_lifetime?: number; + /** Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. */ + idle_ephemeral_session_lifetime?: number; + /** Selected sandbox version for the extensibility environment */ + sandbox_version?: string; + /** Selected legacy sandbox version for the extensibility environment */ + legacy_sandbox_version?: string; + /** The default absolute redirection uri, must be https */ + default_redirection_uri?: string; + /** Supported locales for the user interface */ + enabled_locales?: UpdateTenantSettingsRequestContent.EnabledLocales.Item[]; + session_cookie?: Management.SessionCookieSchema | null; + sessions?: Management.TenantSettingsSessions | null; + oidc_logout?: Management.TenantOidcLogoutSettings; + /** Whether to enable flexible factors for MFA in the PostLogin action */ + customize_mfa_in_postlogin_action?: boolean | null; + /** Whether to accept an organization name instead of an ID on auth endpoints */ + allow_organization_name_in_authentication_api?: boolean | null; + /** Supported ACR values */ + acr_values_supported?: string[]; + mtls?: Management.TenantSettingsMtls | null; + /** Enables the use of Pushed Authorization Requests */ + pushed_authorization_requests_supported?: boolean | null; + /** Supports iss parameter in authorization responses */ + authorization_response_iss_parameter_supported?: boolean | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; +} + +export namespace UpdateTenantSettingsRequestContent { + export type EnabledLocales = EnabledLocales.Item[]; + + export namespace EnabledLocales { + export const Item = { + Am: "am", + Ar: "ar", + ArEg: "ar-EG", + ArSa: "ar-SA", + Az: "az", + Bg: "bg", + Bn: "bn", + Bs: "bs", + CaEs: "ca-ES", + Cnr: "cnr", + Cs: "cs", + Cy: "cy", + Da: "da", + De: "de", + El: "el", + En: "en", + EnCa: "en-CA", + Es: "es", + Es419: "es-419", + EsAr: "es-AR", + EsMx: "es-MX", + Et: "et", + EuEs: "eu-ES", + Fa: "fa", + Fi: "fi", + Fr: "fr", + FrCa: "fr-CA", + FrFr: "fr-FR", + GlEs: "gl-ES", + Gu: "gu", + He: "he", + Hi: "hi", + Hr: "hr", + Hu: "hu", + Hy: "hy", + Id: "id", + Is: "is", + It: "it", + Ja: "ja", + Ka: "ka", + Kk: "kk", + Kn: "kn", + Ko: "ko", + Lt: "lt", + Lv: "lv", + Mk: "mk", + Ml: "ml", + Mn: "mn", + Mr: "mr", + Ms: "ms", + My: "my", + Nb: "nb", + Nl: "nl", + Nn: "nn", + No: "no", + Pa: "pa", + Pl: "pl", + Pt: "pt", + PtBr: "pt-BR", + PtPt: "pt-PT", + Ro: "ro", + Ru: "ru", + Sk: "sk", + Sl: "sl", + So: "so", + Sq: "sq", + Sr: "sr", + Sv: "sv", + Sw: "sw", + Ta: "ta", + Te: "te", + Th: "th", + Tl: "tl", + Tr: "tr", + Uk: "uk", + Ur: "ur", + Vi: "vi", + Zgh: "zgh", + ZhCn: "zh-CN", + ZhHk: "zh-HK", + ZhTw: "zh-TW", + } as const; + export type Item = (typeof Item)[keyof typeof Item]; + } +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListUserAuthenticationMethodsRequestParameters { + /** Page index of the results to return. First page is 0. Default is 0. */ + page?: number | null; + /** Number of results per page. Default is 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * type: "phone" + * } + */ +export interface CreateUserAuthenticationMethodRequestContent { + type: Management.CreatedUserAuthenticationMethodTypeEnum; + /** A human-readable label to identify the authentication method. */ + name?: string; + /** Base32 encoded secret for TOTP generation. */ + totp_secret?: string; + /** Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. */ + phone_number?: string; + /** Applies to email authentication methods only. The email address used to send verification messages. */ + email?: string; + preferred_authentication_method?: Management.PreferredAuthenticationMethodEnum; + /** Applies to webauthn authentication methods only. The id of the credential. */ + key_id?: string; + /** Applies to webauthn authentication methods only. The public key, which is encoded as base64. */ + public_key?: string; + /** Applies to webauthn authentication methods only. The relying party identifier. */ + relying_party_identifier?: string; +} + +/** + * @example + * {} + */ +export interface UpdateUserAuthenticationMethodRequestContent { + /** A human-readable label to identify the authentication method. */ + name?: string; + preferred_authentication_method?: Management.PreferredAuthenticationMethodEnum; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface GetUserConnectedAccountsRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results to return. Defaults to 10 with a maximum of 20 */ + take?: number | null; +} + +/** + * @example + * {} + */ +export interface LinkUserIdentityRequestContent { + provider?: Management.UserIdentityProviderEnum; + /** connection_id of the secondary user account being linked when more than one `auth0` database provider exists. */ + connection_id?: string; + user_id?: Management.UserId; + /** JWT for the secondary account being linked. If sending this parameter, `provider`, `user_id`, and `connection_id` must not be sent. */ + link_with?: string; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * sort: "sort", + * include_totals: true + * } + */ +export interface ListUserLogsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Paging is disabled if parameter not sent. */ + per_page?: number | null; + /** Field to sort by. Use `fieldname:1` for ascending order and `fieldname:-1` for descending. */ + sort?: string | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * page: 1, + * per_page: 1, + * include_totals: true + * } + */ +export interface ListUserOrganizationsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. Defaults to 50. */ + per_page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * per_page: 1, + * page: 1, + * include_totals: true + * } + */ +export interface ListUserPermissionsRequestParameters { + /** Number of results per page. */ + per_page?: number | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * permissions: [{ + * resource_server_identifier: "resource_server_identifier", + * permission_name: "permission_name" + * }] + * } + */ +export interface CreateUserPermissionsRequestContent { + /** List of permissions to add to this user. */ + permissions: Management.PermissionRequestPayload[]; +} + +/** + * @example + * { + * permissions: [{ + * resource_server_identifier: "resource_server_identifier", + * permission_name: "permission_name" + * }] + * } + */ +export interface DeleteUserPermissionsRequestContent { + /** List of permissions to remove from this user. */ + permissions: Management.PermissionRequestPayload[]; +} + +/** + * @example + * { + * connection: "connection", + * assessors: ["new-device"] + * } + */ +export interface ClearAssessorsRequestContent { + /** The name of the connection containing the user whose assessors should be cleared. */ + connection: string; + /** List of assessors to clear. */ + assessors: Management.AssessorsTypeEnum[]; +} + +/** + * @example + * { + * per_page: 1, + * page: 1, + * include_totals: true + * } + */ +export interface ListUserRolesRequestParameters { + /** Number of results per page. */ + per_page?: number | null; + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ + include_totals?: boolean | null; +} + +/** + * @example + * { + * roles: ["roles"] + * } + */ +export interface AssignUserRolesRequestContent { + /** List of roles IDs to associated with the user. */ + roles: string[]; +} + +/** + * @example + * { + * roles: ["roles"] + * } + */ +export interface DeleteUserRolesRequestContent { + /** List of roles IDs to remove from the user. */ + roles: string[]; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListRefreshTokensRequestParameters { + /** An optional cursor from which to start the selection (exclusive). */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListUserSessionsRequestParameters { + /** An optional cursor from which to start the selection (exclusive). */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListVerifiableCredentialTemplatesRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + +/** + * @example + * { + * name: "name", + * type: "type", + * dialect: "dialect", + * presentation: { + * "org.iso.18013.5.1.mDL": { + * "org.iso.18013.5.1": {} + * } + * }, + * well_known_trusted_issuers: "well_known_trusted_issuers" + * } + */ +export interface CreateVerifiableCredentialTemplateRequestContent { + name: string; + type: string; + dialect: string; + presentation: Management.MdlPresentationRequest; + custom_certificate_authority?: string; + well_known_trusted_issuers: string; +} + +/** + * @example + * {} + */ +export interface UpdateVerifiableCredentialTemplateRequestContent { + name?: string; + type?: string; + dialect?: string; + presentation?: Management.MdlPresentationRequest; + well_known_trusted_issuers?: string; + version?: number; +} diff --git a/src/management/api/resources/actions/client/Client.ts b/src/management/api/resources/actions/client/Client.ts index 347c237aaa..4e8cd947bc 100644 --- a/src/management/api/resources/actions/client/Client.ts +++ b/src/management/api/resources/actions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -12,28 +11,9 @@ import { Executions } from "../resources/executions/client/Client.js"; import { Triggers } from "../resources/triggers/client/Client.js"; export declare namespace Actions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Actions { @@ -70,39 +50,49 @@ export class Actions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.actions.list() + * await client.actions.list({ + * triggerId: "triggerId", + * actionName: "actionName", + * deployed: true, + * page: 1, + * per_page: 1, + * installed: true + * }) */ public async list( request: Management.ListActionsRequestParameters = {}, requestOptions?: Actions.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListActionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; const { triggerId, actionName, deployed, page = 0, per_page: perPage = 50, installed } = request; const _queryParams: Record = {}; - if (triggerId != null) { + if (triggerId !== undefined) { _queryParams["triggerId"] = triggerId; } - if (actionName != null) { + if (actionName !== undefined) { _queryParams["actionName"] = actionName; } - if (deployed != null) { - _queryParams["deployed"] = deployed.toString(); + if (deployed !== undefined) { + _queryParams["deployed"] = deployed?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (installed != null) { - _queryParams["installed"] = installed.toString(); + if (installed !== undefined) { + _queryParams["installed"] = installed?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -115,10 +105,10 @@ export class Actions { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -172,7 +162,7 @@ export class Actions { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.actions ?? []).length > 0, @@ -214,9 +204,12 @@ export class Actions { request: Management.CreateActionRequestContent, requestOptions?: Actions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -232,9 +225,10 @@ export class Actions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -305,9 +299,12 @@ export class Actions { id: string, requestOptions?: Actions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -315,14 +312,15 @@ export class Actions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(id)}`, + `actions/actions/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetActionResponseContent, rawResponse: _response.rawResponse }; @@ -380,7 +378,9 @@ export class Actions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.actions.delete("id") + * await client.actions.delete("id", { + * force: true + * }) */ public delete( id: string, @@ -395,15 +395,18 @@ export class Actions { request: Management.DeleteActionRequestParameters = {}, requestOptions?: Actions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:actions"] }], + }; const { force } = request; const _queryParams: Record = {}; - if (force != null) { - _queryParams["force"] = force.toString(); + if (force !== undefined) { + _queryParams["force"] = force?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -411,14 +414,15 @@ export class Actions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(id)}`, + `actions/actions/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -491,9 +495,12 @@ export class Actions { request: Management.UpdateActionRequestContent = {}, requestOptions?: Actions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -501,7 +508,7 @@ export class Actions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(id)}`, + `actions/actions/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -509,9 +516,10 @@ export class Actions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -583,9 +591,12 @@ export class Actions { id: string, requestOptions?: Actions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -593,14 +604,15 @@ export class Actions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(id)}/deploy`, + `actions/actions/${core.url.encodePathParam(id)}/deploy`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -679,9 +691,12 @@ export class Actions { request: Management.TestActionRequestContent, requestOptions?: Actions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -689,7 +704,7 @@ export class Actions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(id)}/test`, + `actions/actions/${core.url.encodePathParam(id)}/test`, ), method: "POST", headers: _headers, @@ -697,9 +712,10 @@ export class Actions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.TestActionResponseContent, rawResponse: _response.rawResponse }; @@ -743,7 +759,7 @@ export class Actions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/actions/client/index.ts b/src/management/api/resources/actions/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/actions/client/index.ts +++ b/src/management/api/resources/actions/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/actions/client/requests/CreateActionRequestContent.ts b/src/management/api/resources/actions/client/requests/CreateActionRequestContent.ts deleted file mode 100644 index 6339f6d3b8..0000000000 --- a/src/management/api/resources/actions/client/requests/CreateActionRequestContent.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name", - * supported_triggers: [{ - * id: "id" - * }] - * } - */ -export interface CreateActionRequestContent { - /** The name of an action. */ - name: string; - /** The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. */ - supported_triggers: Management.ActionTrigger[]; - /** The source code of the action. */ - code?: string; - /** The list of third party npm modules, and their versions, that this action depends on. */ - dependencies?: Management.ActionVersionDependency[]; - /** The Node runtime. For example: `node22`, defaults to `node22` */ - runtime?: string; - /** The list of secrets that are included in an action or a version of an action. */ - secrets?: Management.ActionSecretRequest[]; - /** True if the action should be deployed after creation. */ - deploy?: boolean; -} diff --git a/src/management/api/resources/actions/client/requests/DeleteActionRequestParameters.ts b/src/management/api/resources/actions/client/requests/DeleteActionRequestParameters.ts deleted file mode 100644 index 818a93bfe2..0000000000 --- a/src/management/api/resources/actions/client/requests/DeleteActionRequestParameters.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface DeleteActionRequestParameters { - /** Force action deletion detaching bindings */ - force?: boolean; -} diff --git a/src/management/api/resources/actions/client/requests/ListActionsRequestParameters.ts b/src/management/api/resources/actions/client/requests/ListActionsRequestParameters.ts deleted file mode 100644 index edffbe65ba..0000000000 --- a/src/management/api/resources/actions/client/requests/ListActionsRequestParameters.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListActionsRequestParameters { - /** An actions extensibility point. */ - triggerId?: Management.ActionTriggerTypeEnum; - /** The name of the action to retrieve. */ - actionName?: string; - /** Optional filter to only retrieve actions that are deployed. */ - deployed?: boolean; - /** Use this field to request a specific page of the list results. */ - page?: number; - /** The maximum number of results to be returned by the server in single response. 20 by default */ - per_page?: number; - /** Optional. When true, return only installed actions. When false, return only custom actions. Returns all actions by default. */ - installed?: boolean; -} diff --git a/src/management/api/resources/actions/client/requests/TestActionRequestContent.ts b/src/management/api/resources/actions/client/requests/TestActionRequestContent.ts deleted file mode 100644 index c4f4a206e3..0000000000 --- a/src/management/api/resources/actions/client/requests/TestActionRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * payload: { - * "key": "value" - * } - * } - */ -export interface TestActionRequestContent { - payload: Management.TestActionPayload; -} diff --git a/src/management/api/resources/actions/client/requests/UpdateActionRequestContent.ts b/src/management/api/resources/actions/client/requests/UpdateActionRequestContent.ts deleted file mode 100644 index 98216dbd37..0000000000 --- a/src/management/api/resources/actions/client/requests/UpdateActionRequestContent.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateActionRequestContent { - /** The name of an action. */ - name?: string; - /** The list of triggers that this action supports. At this time, an action can only target a single trigger at a time. */ - supported_triggers?: Management.ActionTrigger[]; - /** The source code of the action. */ - code?: string; - /** The list of third party npm modules, and their versions, that this action depends on. */ - dependencies?: Management.ActionVersionDependency[]; - /** The Node runtime. For example: `node22`, defaults to `node22` */ - runtime?: string; - /** The list of secrets that are included in an action or a version of an action. */ - secrets?: Management.ActionSecretRequest[]; -} diff --git a/src/management/api/resources/actions/client/requests/index.ts b/src/management/api/resources/actions/client/requests/index.ts deleted file mode 100644 index 11be0efeb2..0000000000 --- a/src/management/api/resources/actions/client/requests/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { type ListActionsRequestParameters } from "./ListActionsRequestParameters.js"; -export { type CreateActionRequestContent } from "./CreateActionRequestContent.js"; -export { type DeleteActionRequestParameters } from "./DeleteActionRequestParameters.js"; -export { type UpdateActionRequestContent } from "./UpdateActionRequestContent.js"; -export { type TestActionRequestContent } from "./TestActionRequestContent.js"; diff --git a/src/management/api/resources/actions/resources/executions/client/Client.ts b/src/management/api/resources/actions/resources/executions/client/Client.ts index bdd6824949..56dea48e19 100644 --- a/src/management/api/resources/actions/resources/executions/client/Client.ts +++ b/src/management/api/resources/actions/resources/executions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Executions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Executions { @@ -66,9 +46,12 @@ export class Executions { id: string, requestOptions?: Executions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,14 +59,15 @@ export class Executions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/executions/${encodeURIComponent(id)}`, + `actions/executions/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -130,7 +114,7 @@ export class Executions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/actions/resources/index.ts b/src/management/api/resources/actions/resources/index.ts index 49940ac26a..68bafa983f 100644 --- a/src/management/api/resources/actions/resources/index.ts +++ b/src/management/api/resources/actions/resources/index.ts @@ -1,4 +1,3 @@ export * as versions from "./versions/index.js"; export * as executions from "./executions/index.js"; export * as triggers from "./triggers/index.js"; -export * from "./versions/client/requests/index.js"; diff --git a/src/management/api/resources/actions/resources/triggers/client/Client.ts b/src/management/api/resources/actions/resources/triggers/client/Client.ts index 34c200e1b4..568fc47d3b 100644 --- a/src/management/api/resources/actions/resources/triggers/client/Client.ts +++ b/src/management/api/resources/actions/resources/triggers/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -10,28 +9,9 @@ import * as errors from "../../../../../../errors/index.js"; import { Bindings } from "../resources/bindings/client/Client.js"; export declare namespace Triggers { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Triggers { @@ -68,9 +48,12 @@ export class Triggers { private async __list( requestOptions?: Triggers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -83,9 +66,10 @@ export class Triggers { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -130,7 +114,7 @@ export class Triggers { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } 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 fa9a3a946c..5fbf0e2ac4 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Bindings { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Bindings { @@ -53,28 +33,34 @@ export class Bindings { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.actions.triggers.bindings.list("triggerId") + * await client.actions.triggers.bindings.list("triggerId", { + * page: 1, + * per_page: 1 + * }) */ public async list( triggerId: Management.ActionTriggerTypeEnum, request: Management.ListActionTriggerBindingsRequestParameters = {}, requestOptions?: Bindings.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.actions.triggers.ListActionTriggerBindingsRequestParameters, + request: Management.ListActionTriggerBindingsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; const { page = 0, per_page: perPage = 50 } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -82,15 +68,15 @@ export class Bindings { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/triggers/${encodeURIComponent(triggerId)}/bindings`, + `actions/triggers/${core.url.encodePathParam(triggerId)}/bindings`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -146,7 +132,7 @@ export class Bindings { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.bindings ?? []).length > 0, @@ -186,9 +172,12 @@ export class Bindings { request: Management.UpdateActionBindingsRequestContent = {}, requestOptions?: Bindings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -196,7 +185,7 @@ export class Bindings { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/triggers/${encodeURIComponent(triggerId)}/bindings`, + `actions/triggers/${core.url.encodePathParam(triggerId)}/bindings`, ), method: "PATCH", headers: _headers, @@ -204,9 +193,10 @@ export class Bindings { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -253,7 +243,7 @@ export class Bindings { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/index.ts b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/index.ts +++ b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/ListActionTriggerBindingsRequestParameters.ts b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/ListActionTriggerBindingsRequestParameters.ts deleted file mode 100644 index 8b6acb3184..0000000000 --- a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/ListActionTriggerBindingsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListActionTriggerBindingsRequestParameters { - /** Use this field to request a specific page of the list results. */ - page?: number; - /** The maximum number of results to be returned in a single request. 20 by default */ - per_page?: number; -} diff --git a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/UpdateActionBindingsRequestContent.ts b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/UpdateActionBindingsRequestContent.ts deleted file mode 100644 index 206b795a5d..0000000000 --- a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/UpdateActionBindingsRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateActionBindingsRequestContent { - /** The actions that will be bound to this trigger. The order in which they are included will be the order in which they are executed. */ - bindings?: Management.ActionBindingWithRef[]; -} diff --git a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/index.ts b/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/index.ts deleted file mode 100644 index 5006333ff4..0000000000 --- a/src/management/api/resources/actions/resources/triggers/resources/bindings/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListActionTriggerBindingsRequestParameters } from "./ListActionTriggerBindingsRequestParameters.js"; -export { type UpdateActionBindingsRequestContent } from "./UpdateActionBindingsRequestContent.js"; diff --git a/src/management/api/resources/actions/resources/triggers/resources/index.ts b/src/management/api/resources/actions/resources/triggers/resources/index.ts index 0e3a0067ec..087a66c784 100644 --- a/src/management/api/resources/actions/resources/triggers/resources/index.ts +++ b/src/management/api/resources/actions/resources/triggers/resources/index.ts @@ -1,2 +1 @@ export * as bindings from "./bindings/index.js"; -export * from "./bindings/client/requests/index.js"; 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 1b6108acc0..7b0874a142 100644 --- a/src/management/api/resources/actions/resources/versions/client/Client.ts +++ b/src/management/api/resources/actions/resources/versions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Versions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Versions { @@ -53,28 +33,34 @@ export class Versions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.actions.versions.list("actionId") + * await client.actions.versions.list("actionId", { + * page: 1, + * per_page: 1 + * }) */ public async list( actionId: string, request: Management.ListActionVersionsRequestParameters = {}, requestOptions?: Versions.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.actions.ListActionVersionsRequestParameters, + request: Management.ListActionVersionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; const { page = 0, per_page: perPage = 50 } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -82,15 +68,15 @@ export class Versions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(actionId)}/versions`, + `actions/actions/${core.url.encodePathParam(actionId)}/versions`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -146,7 +132,7 @@ export class Versions { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.versions ?? []).length > 0, @@ -187,9 +173,12 @@ export class Versions { id: string, requestOptions?: Versions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -197,14 +186,15 @@ export class Versions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(actionId)}/versions/${encodeURIComponent(id)}`, + `actions/actions/${core.url.encodePathParam(actionId)}/versions/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -256,8 +246,8 @@ export class Versions { /** * Performs the equivalent of a roll-back of an action to an earlier, specified version. Creates a new, deployed action version that is identical to the specified version. If this action is currently bound to a trigger, the system will begin executing the newly-created version immediately. * - * @param {string} id - The ID of an action version. * @param {string} actionId - The ID of an action. + * @param {string} id - The ID of an action version. * @param {Management.DeployActionVersionRequestContent | undefined} request * @param {Versions.RequestOptions} requestOptions - Request-specific configuration. * @@ -267,26 +257,29 @@ export class Versions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.actions.versions.deploy("id", "actionId", undefined) + * await client.actions.versions.deploy("actionId", "id") */ public deploy( - id: string, actionId: string, + id: string, request?: Management.DeployActionVersionRequestContent | undefined, requestOptions?: Versions.RequestOptions, ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__deploy(id, actionId, request, requestOptions)); + return core.HttpResponsePromise.fromPromise(this.__deploy(actionId, id, request, requestOptions)); } private async __deploy( - id: string, actionId: string, + id: string, request?: Management.DeployActionVersionRequestContent | undefined, requestOptions?: Versions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:actions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -294,7 +287,7 @@ export class Versions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `actions/actions/${encodeURIComponent(actionId)}/versions/${encodeURIComponent(id)}/deploy`, + `actions/actions/${core.url.encodePathParam(actionId)}/versions/${core.url.encodePathParam(id)}/deploy`, ), method: "POST", headers: _headers, @@ -302,9 +295,10 @@ export class Versions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request != null ? request : undefined, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -351,7 +345,7 @@ export class Versions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/actions/resources/versions/client/index.ts b/src/management/api/resources/actions/resources/versions/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/actions/resources/versions/client/index.ts +++ b/src/management/api/resources/actions/resources/versions/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/actions/resources/versions/client/requests/ListActionVersionsRequestParameters.ts b/src/management/api/resources/actions/resources/versions/client/requests/ListActionVersionsRequestParameters.ts deleted file mode 100644 index 89ad1a005b..0000000000 --- a/src/management/api/resources/actions/resources/versions/client/requests/ListActionVersionsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListActionVersionsRequestParameters { - /** Use this field to request a specific page of the list results. */ - page?: number; - /** This field specify the maximum number of results to be returned by the server. 20 by default */ - per_page?: number; -} diff --git a/src/management/api/resources/actions/resources/versions/client/requests/index.ts b/src/management/api/resources/actions/resources/versions/client/requests/index.ts deleted file mode 100644 index 05f0262390..0000000000 --- a/src/management/api/resources/actions/resources/versions/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListActionVersionsRequestParameters } from "./ListActionVersionsRequestParameters.js"; diff --git a/src/management/api/resources/anomaly/client/Client.ts b/src/management/api/resources/anomaly/client/Client.ts index bf06c30741..0e7c7fe3b8 100644 --- a/src/management/api/resources/anomaly/client/Client.ts +++ b/src/management/api/resources/anomaly/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { Blocks } from "../resources/blocks/client/Client.js"; export declare namespace Anomaly { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Anomaly { diff --git a/src/management/api/resources/anomaly/resources/blocks/client/Client.ts b/src/management/api/resources/anomaly/resources/blocks/client/Client.ts index 423395e67a..f3c382f95e 100644 --- a/src/management/api/resources/anomaly/resources/blocks/client/Client.ts +++ b/src/management/api/resources/anomaly/resources/blocks/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Blocks { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Blocks { @@ -66,9 +46,12 @@ export class Blocks { id: Management.AnomalyIpFormat, requestOptions?: Blocks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:anomaly_blocks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,14 +59,15 @@ export class Blocks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `anomaly/blocks/ips/${encodeURIComponent(id)}`, + `anomaly/blocks/ips/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -152,9 +136,12 @@ export class Blocks { id: Management.AnomalyIpFormat, requestOptions?: Blocks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:anomaly_blocks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -162,14 +149,15 @@ export class Blocks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `anomaly/blocks/ips/${encodeURIComponent(id)}`, + `anomaly/blocks/ips/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -213,7 +201,7 @@ export class Blocks { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/attackProtection/client/Client.ts b/src/management/api/resources/attackProtection/client/Client.ts index 0a923d1f08..7f6ff0cc46 100644 --- a/src/management/api/resources/attackProtection/client/Client.ts +++ b/src/management/api/resources/attackProtection/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { BreachedPasswordDetection } from "../resources/breachedPasswordDetection/client/Client.js"; @@ -9,15 +8,7 @@ import { BruteForceProtection } from "../resources/bruteForceProtection/client/C import { SuspiciousIpThrottling } from "../resources/suspiciousIpThrottling/client/Client.js"; export declare namespace AttackProtection { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class AttackProtection { diff --git a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/Client.ts b/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/Client.ts index 559ce1b8a2..105a969a5e 100644 --- a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/Client.ts +++ b/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace BreachedPasswordDetection { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class BreachedPasswordDetection { @@ -61,9 +41,12 @@ export class BreachedPasswordDetection { private async __get( requestOptions?: BreachedPasswordDetection.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class BreachedPasswordDetection { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -148,9 +132,12 @@ export class BreachedPasswordDetection { request: Management.UpdateBreachedPasswordDetectionSettingsRequestContent = {}, requestOptions?: BreachedPasswordDetection.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -166,9 +153,10 @@ export class BreachedPasswordDetection { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -215,7 +203,7 @@ export class BreachedPasswordDetection { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/index.ts b/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/index.ts +++ b/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/requests/UpdateBreachedPasswordDetectionSettingsRequestContent.ts b/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/requests/UpdateBreachedPasswordDetectionSettingsRequestContent.ts deleted file mode 100644 index a3b5e09300..0000000000 --- a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/requests/UpdateBreachedPasswordDetectionSettingsRequestContent.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateBreachedPasswordDetectionSettingsRequestContent { - /** Whether or not breached password detection is active. */ - enabled?: boolean; - /** - * Action to take when a breached password is detected during a login. - * Possible values: block, user_notification, admin_notification. - */ - shields?: Management.BreachedPasswordDetectionShieldsEnum[]; - /** - * When "admin_notification" is enabled, determines how often email notifications are sent. - * Possible values: immediately, daily, weekly, monthly. - */ - admin_notification_frequency?: Management.BreachedPasswordDetectionAdminNotificationFrequencyEnum[]; - method?: Management.BreachedPasswordDetectionMethodEnum; - stage?: Management.BreachedPasswordDetectionStage; -} diff --git a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/requests/index.ts b/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/requests/index.ts deleted file mode 100644 index e9d6ea8ef9..0000000000 --- a/src/management/api/resources/attackProtection/resources/breachedPasswordDetection/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateBreachedPasswordDetectionSettingsRequestContent } from "./UpdateBreachedPasswordDetectionSettingsRequestContent.js"; diff --git a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/Client.ts b/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/Client.ts index 6966ba1af4..be9dcbc43a 100644 --- a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/Client.ts +++ b/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace BruteForceProtection { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class BruteForceProtection { @@ -61,9 +41,12 @@ export class BruteForceProtection { private async __get( requestOptions?: BruteForceProtection.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class BruteForceProtection { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -148,9 +132,12 @@ export class BruteForceProtection { request: Management.UpdateBruteForceSettingsRequestContent = {}, requestOptions?: BruteForceProtection.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -166,9 +153,10 @@ export class BruteForceProtection { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -215,7 +203,7 @@ export class BruteForceProtection { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/index.ts b/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/index.ts +++ b/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/requests/UpdateBruteForceSettingsRequestContent.ts b/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/requests/UpdateBruteForceSettingsRequestContent.ts deleted file mode 100644 index 03197cc8d9..0000000000 --- a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/requests/UpdateBruteForceSettingsRequestContent.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateBruteForceSettingsRequestContent { - /** Whether or not brute force attack protections are active. */ - enabled?: boolean; - /** - * Action to take when a brute force protection threshold is violated. - * Possible values: block, user_notification. - */ - shields?: UpdateBruteForceSettingsRequestContent.Shields.Item[]; - /** List of trusted IP addresses that will not have attack protection enforced against them. */ - allowlist?: string[]; - /** - * Account Lockout: Determines whether or not IP address is used when counting failed attempts. - * Possible values: count_per_identifier_and_ip, count_per_identifier. - */ - mode?: UpdateBruteForceSettingsRequestContent.Mode; - /** Maximum number of unsuccessful attempts. */ - max_attempts?: number; -} - -export namespace UpdateBruteForceSettingsRequestContent { - export type Shields = Shields.Item[]; - - export namespace Shields { - export type Item = "block" | "user_notification"; - export const Item = { - Block: "block", - UserNotification: "user_notification", - } as const; - } - - /** - * Account Lockout: Determines whether or not IP address is used when counting failed attempts. - * Possible values: count_per_identifier_and_ip, count_per_identifier. - */ - export type Mode = "count_per_identifier_and_ip" | "count_per_identifier"; - export const Mode = { - CountPerIdentifierAndIp: "count_per_identifier_and_ip", - CountPerIdentifier: "count_per_identifier", - } as const; -} diff --git a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/requests/index.ts b/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/requests/index.ts deleted file mode 100644 index 60349f455f..0000000000 --- a/src/management/api/resources/attackProtection/resources/bruteForceProtection/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateBruteForceSettingsRequestContent } from "./UpdateBruteForceSettingsRequestContent.js"; diff --git a/src/management/api/resources/attackProtection/resources/index.ts b/src/management/api/resources/attackProtection/resources/index.ts index da33498950..5948aa78d3 100644 --- a/src/management/api/resources/attackProtection/resources/index.ts +++ b/src/management/api/resources/attackProtection/resources/index.ts @@ -1,6 +1,3 @@ export * as breachedPasswordDetection from "./breachedPasswordDetection/index.js"; export * as bruteForceProtection from "./bruteForceProtection/index.js"; export * as suspiciousIpThrottling from "./suspiciousIpThrottling/index.js"; -export * from "./breachedPasswordDetection/client/requests/index.js"; -export * from "./bruteForceProtection/client/requests/index.js"; -export * from "./suspiciousIpThrottling/client/requests/index.js"; diff --git a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/Client.ts b/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/Client.ts index 1fcb2d165a..0fa15a46c7 100644 --- a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/Client.ts +++ b/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace SuspiciousIpThrottling { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class SuspiciousIpThrottling { @@ -61,9 +41,12 @@ export class SuspiciousIpThrottling { private async __get( requestOptions?: SuspiciousIpThrottling.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class SuspiciousIpThrottling { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -148,9 +132,12 @@ export class SuspiciousIpThrottling { request: Management.UpdateSuspiciousIpThrottlingSettingsRequestContent = {}, requestOptions?: SuspiciousIpThrottling.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -166,9 +153,10 @@ export class SuspiciousIpThrottling { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -215,7 +203,7 @@ export class SuspiciousIpThrottling { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/index.ts b/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/index.ts +++ b/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/requests/UpdateSuspiciousIpThrottlingSettingsRequestContent.ts b/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/requests/UpdateSuspiciousIpThrottlingSettingsRequestContent.ts deleted file mode 100644 index 738db1336c..0000000000 --- a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/requests/UpdateSuspiciousIpThrottlingSettingsRequestContent.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateSuspiciousIpThrottlingSettingsRequestContent { - /** Whether or not suspicious IP throttling attack protections are active. */ - enabled?: boolean; - /** - * Action to take when a suspicious IP throttling threshold is violated. - * Possible values: block, admin_notification. - */ - shields?: Management.SuspiciousIpThrottlingShieldsEnum[]; - allowlist?: Management.SuspiciousIpThrottlingAllowlist; - stage?: Management.SuspiciousIpThrottlingStage; -} diff --git a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/requests/index.ts b/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/requests/index.ts deleted file mode 100644 index 7f9dacee0c..0000000000 --- a/src/management/api/resources/attackProtection/resources/suspiciousIpThrottling/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateSuspiciousIpThrottlingSettingsRequestContent } from "./UpdateSuspiciousIpThrottlingSettingsRequestContent.js"; diff --git a/src/management/api/resources/branding/client/Client.ts b/src/management/api/resources/branding/client/Client.ts index ea477459eb..5d47c19d81 100644 --- a/src/management/api/resources/branding/client/Client.ts +++ b/src/management/api/resources/branding/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -12,28 +11,9 @@ import { Themes } from "../resources/themes/client/Client.js"; import { Phone } from "../resources/phone/client/Client.js"; export declare namespace Branding { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Branding { @@ -79,9 +59,12 @@ export class Branding { private async __get( requestOptions?: Branding.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -94,9 +77,10 @@ export class Branding { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -164,9 +148,12 @@ export class Branding { request: Management.UpdateBrandingRequestContent = {}, requestOptions?: Branding.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -182,9 +169,10 @@ export class Branding { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -229,7 +217,7 @@ export class Branding { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/branding/client/index.ts b/src/management/api/resources/branding/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/branding/client/index.ts +++ b/src/management/api/resources/branding/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/branding/client/requests/UpdateBrandingRequestContent.ts b/src/management/api/resources/branding/client/requests/UpdateBrandingRequestContent.ts deleted file mode 100644 index f4da145ebf..0000000000 --- a/src/management/api/resources/branding/client/requests/UpdateBrandingRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateBrandingRequestContent { - colors?: Management.UpdateBrandingColors; - /** URL for the favicon. Must use HTTPS. */ - favicon_url?: string; - /** URL for the logo. Must use HTTPS. */ - logo_url?: string; - font?: Management.UpdateBrandingFont; -} diff --git a/src/management/api/resources/branding/client/requests/index.ts b/src/management/api/resources/branding/client/requests/index.ts deleted file mode 100644 index 7627d4ad34..0000000000 --- a/src/management/api/resources/branding/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateBrandingRequestContent } from "./UpdateBrandingRequestContent.js"; diff --git a/src/management/api/resources/branding/resources/index.ts b/src/management/api/resources/branding/resources/index.ts index a6e1d4d85b..119ab270ef 100644 --- a/src/management/api/resources/branding/resources/index.ts +++ b/src/management/api/resources/branding/resources/index.ts @@ -1,4 +1,3 @@ export * as templates from "./templates/index.js"; export * as themes from "./themes/index.js"; export * as phone from "./phone/index.js"; -export * from "./themes/client/requests/index.js"; diff --git a/src/management/api/resources/branding/resources/phone/client/Client.ts b/src/management/api/resources/branding/resources/phone/client/Client.ts index 93fa3c1aa9..2945c66e79 100644 --- a/src/management/api/resources/branding/resources/phone/client/Client.ts +++ b/src/management/api/resources/branding/resources/phone/client/Client.ts @@ -1,22 +1,13 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import { Providers } from "../resources/providers/client/Client.js"; import { Templates } from "../resources/templates/client/Client.js"; export declare namespace Phone { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Phone { diff --git a/src/management/api/resources/branding/resources/phone/resources/index.ts b/src/management/api/resources/branding/resources/phone/resources/index.ts index 8f600b9a7a..c64a8860b4 100644 --- a/src/management/api/resources/branding/resources/phone/resources/index.ts +++ b/src/management/api/resources/branding/resources/phone/resources/index.ts @@ -1,4 +1,2 @@ export * as providers from "./providers/index.js"; export * as templates from "./templates/index.js"; -export * from "./providers/client/requests/index.js"; -export * from "./templates/client/requests/index.js"; 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 3c0435f13e..729ce8eb93 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Providers { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Providers { @@ -52,7 +32,9 @@ export class Providers { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.branding.phone.providers.list() + * await client.branding.phone.providers.list({ + * disabled: true + * }) */ public list( request: Management.ListBrandingPhoneProvidersRequestParameters = {}, @@ -65,15 +47,18 @@ export class Providers { request: Management.ListBrandingPhoneProvidersRequestParameters = {}, requestOptions?: Providers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:phone_providers"] }], + }; const { disabled } = request; const _queryParams: Record = {}; - if (disabled != null) { - _queryParams["disabled"] = disabled.toString(); + if (disabled !== undefined) { + _queryParams["disabled"] = disabled?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,9 +71,10 @@ export class Providers { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -165,9 +151,12 @@ export class Providers { request: Management.CreateBrandingPhoneProviderRequestContent, requestOptions?: Providers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:phone_providers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -183,9 +172,10 @@ export class Providers { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -260,9 +250,12 @@ export class Providers { id: string, requestOptions?: Providers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:phone_providers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -270,14 +263,15 @@ export class Providers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/providers/${encodeURIComponent(id)}`, + `branding/phone/providers/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -345,9 +339,12 @@ export class Providers { } private async __delete(id: string, requestOptions?: Providers.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:phone_providers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -355,14 +352,15 @@ export class Providers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/providers/${encodeURIComponent(id)}`, + `branding/phone/providers/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -437,9 +435,12 @@ export class Providers { request: Management.UpdateBrandingPhoneProviderRequestContent = {}, requestOptions?: Providers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:phone_providers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -447,7 +448,7 @@ export class Providers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/providers/${encodeURIComponent(id)}`, + `branding/phone/providers/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -455,9 +456,10 @@ export class Providers { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -538,9 +540,12 @@ export class Providers { request: Management.CreatePhoneProviderSendTestRequestContent, requestOptions?: Providers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:phone_providers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -548,7 +553,7 @@ export class Providers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/providers/${encodeURIComponent(id)}/try`, + `branding/phone/providers/${core.url.encodePathParam(id)}/try`, ), method: "POST", headers: _headers, @@ -556,9 +561,10 @@ export class Providers { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -609,7 +615,7 @@ export class Providers { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/index.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/index.ts +++ b/src/management/api/resources/branding/resources/phone/resources/providers/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/CreateBrandingPhoneProviderRequestContent.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/CreateBrandingPhoneProviderRequestContent.ts deleted file mode 100644 index 45c9590b03..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/CreateBrandingPhoneProviderRequestContent.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * name: "twilio", - * credentials: { - * auth_token: "auth_token" - * } - * } - */ -export interface CreateBrandingPhoneProviderRequestContent { - name: Management.PhoneProviderNameEnum; - /** Whether the provider is enabled (false) or disabled (true). */ - disabled?: boolean; - configuration?: Management.PhoneProviderConfiguration; - credentials: Management.PhoneProviderCredentials; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/CreatePhoneProviderSendTestRequestContent.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/CreatePhoneProviderSendTestRequestContent.ts deleted file mode 100644 index 3813759d2a..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/CreatePhoneProviderSendTestRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * to: "to" - * } - */ -export interface CreatePhoneProviderSendTestRequestContent { - /** The recipient phone number to receive a given notification. */ - to: string; - delivery_method?: Management.PhoneProviderDeliveryMethodEnum; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/ListBrandingPhoneProvidersRequestParameters.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/ListBrandingPhoneProvidersRequestParameters.ts deleted file mode 100644 index e01aad7999..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/ListBrandingPhoneProvidersRequestParameters.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListBrandingPhoneProvidersRequestParameters { - /** Whether the provider is enabled (false) or disabled (true). */ - disabled?: boolean; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/UpdateBrandingPhoneProviderRequestContent.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/UpdateBrandingPhoneProviderRequestContent.ts deleted file mode 100644 index 47de93e269..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/UpdateBrandingPhoneProviderRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateBrandingPhoneProviderRequestContent { - name?: Management.PhoneProviderNameEnum; - /** Whether the provider is enabled (false) or disabled (true). */ - disabled?: boolean; - credentials?: Management.PhoneProviderCredentials; - configuration?: Management.PhoneProviderConfiguration; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/index.ts b/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/index.ts deleted file mode 100644 index 6c540cc80c..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/providers/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListBrandingPhoneProvidersRequestParameters } from "./ListBrandingPhoneProvidersRequestParameters.js"; -export { type CreateBrandingPhoneProviderRequestContent } from "./CreateBrandingPhoneProviderRequestContent.js"; -export { type UpdateBrandingPhoneProviderRequestContent } from "./UpdateBrandingPhoneProviderRequestContent.js"; -export { type CreatePhoneProviderSendTestRequestContent } from "./CreatePhoneProviderSendTestRequestContent.js"; 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 cd70ad068b..1945062fcf 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Templates { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Templates { @@ -50,7 +30,9 @@ export class Templates { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.branding.phone.templates.list() + * await client.branding.phone.templates.list({ + * disabled: true + * }) */ public list( request: Management.ListPhoneTemplatesRequestParameters = {}, @@ -63,15 +45,18 @@ export class Templates { request: Management.ListPhoneTemplatesRequestParameters = {}, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:phone_templates"] }], + }; const { disabled } = request; const _queryParams: Record = {}; - if (disabled != null) { - _queryParams["disabled"] = disabled.toString(); + if (disabled !== undefined) { + _queryParams["disabled"] = disabled?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -84,9 +69,10 @@ export class Templates { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -155,9 +141,12 @@ export class Templates { request: Management.CreatePhoneTemplateRequestContent = {}, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:phone_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -173,9 +162,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -248,9 +238,12 @@ export class Templates { id: string, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:phone_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -258,14 +251,15 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/templates/${encodeURIComponent(id)}`, + `branding/phone/templates/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -332,9 +326,12 @@ export class Templates { } private async __delete(id: string, requestOptions?: Templates.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:phone_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -342,14 +339,15 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/templates/${encodeURIComponent(id)}`, + `branding/phone/templates/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -422,9 +420,12 @@ export class Templates { request: Management.UpdatePhoneTemplateRequestContent = {}, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:phone_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -432,7 +433,7 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/templates/${encodeURIComponent(id)}`, + `branding/phone/templates/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -440,9 +441,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -519,9 +521,12 @@ export class Templates { request?: Management.ResetPhoneTemplateRequestContent, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:phone_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -529,7 +534,7 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/templates/${encodeURIComponent(id)}/reset`, + `branding/phone/templates/${core.url.encodePathParam(id)}/reset`, ), method: "PATCH", headers: _headers, @@ -537,9 +542,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -615,9 +621,12 @@ export class Templates { request: Management.CreatePhoneTemplateTestNotificationRequestContent, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:phone_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -625,7 +634,7 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/phone/templates/${encodeURIComponent(id)}/try`, + `branding/phone/templates/${core.url.encodePathParam(id)}/try`, ), method: "POST", headers: _headers, @@ -633,9 +642,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -684,7 +694,7 @@ export class Templates { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/index.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/index.ts +++ b/src/management/api/resources/branding/resources/phone/resources/templates/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/CreatePhoneTemplateRequestContent.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/CreatePhoneTemplateRequestContent.ts deleted file mode 100644 index b9f676fb23..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/CreatePhoneTemplateRequestContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface CreatePhoneTemplateRequestContent { - type?: Management.PhoneTemplateNotificationTypeEnum; - /** Whether the template is enabled (false) or disabled (true). */ - disabled?: boolean; - content?: Management.PhoneTemplateContent; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/CreatePhoneTemplateTestNotificationRequestContent.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/CreatePhoneTemplateTestNotificationRequestContent.ts deleted file mode 100644 index e7624dc27b..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/CreatePhoneTemplateTestNotificationRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * to: "to" - * } - */ -export interface CreatePhoneTemplateTestNotificationRequestContent { - /** Destination of the testing phone notification */ - to: string; - delivery_method?: Management.PhoneProviderDeliveryMethodEnum; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/ListPhoneTemplatesRequestParameters.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/ListPhoneTemplatesRequestParameters.ts deleted file mode 100644 index df770a5c1b..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/ListPhoneTemplatesRequestParameters.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListPhoneTemplatesRequestParameters { - /** Whether the template is enabled (false) or disabled (true). */ - disabled?: boolean; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/UpdatePhoneTemplateRequestContent.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/UpdatePhoneTemplateRequestContent.ts deleted file mode 100644 index 15ed633f95..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/UpdatePhoneTemplateRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdatePhoneTemplateRequestContent { - content?: Management.PartialPhoneTemplateContent; - /** Whether the template is enabled (false) or disabled (true). */ - disabled?: boolean; -} diff --git a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/index.ts b/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/index.ts deleted file mode 100644 index 0274fdba3f..0000000000 --- a/src/management/api/resources/branding/resources/phone/resources/templates/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListPhoneTemplatesRequestParameters } from "./ListPhoneTemplatesRequestParameters.js"; -export { type CreatePhoneTemplateRequestContent } from "./CreatePhoneTemplateRequestContent.js"; -export { type UpdatePhoneTemplateRequestContent } from "./UpdatePhoneTemplateRequestContent.js"; -export { type CreatePhoneTemplateTestNotificationRequestContent } from "./CreatePhoneTemplateTestNotificationRequestContent.js"; diff --git a/src/management/api/resources/branding/resources/templates/client/Client.ts b/src/management/api/resources/branding/resources/templates/client/Client.ts index 1875198019..67ce93269d 100644 --- a/src/management/api/resources/branding/resources/templates/client/Client.ts +++ b/src/management/api/resources/branding/resources/templates/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Templates { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Templates { @@ -61,9 +41,12 @@ export class Templates { private async __getUniversalLogin( requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class Templates { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -130,28 +114,27 @@ export class Templates { /** * Update the Universal Login branding template. * - *

When content-type header is set to application/json, the expected body must be JSON:

+ *

When content-type header is set to application/json:

*
      * {
-     *   "template": "<!DOCTYPE html><html><head>{%- auth0:head -%}</head><body>{%- auth0:widget -%}</body></html>"
+     *   "template": "<!DOCTYPE html>{% assign resolved_dir = dir | default: "auto" %}<html lang="{{locale}}" dir="{{resolved_dir}}"><head>{%- auth0:head -%}</head><body class="_widget-auto-layout">{%- auth0:widget -%}</body></html>"
      * }
      * 
* *

- * When content-type header is set to text/html, the expected body must be the HTML template: + * When content-type header is set to text/html: *

*
      * <!DOCTYPE html>
-     * <code>
-     *   <html>
-     *     <head>
-     *      {%- auth0:head -%}
-     *     </head>
-     *     <body>
-     *       {%- auth0:widget -%}
-     *     </body>
-     *   </html>
-     * </code>
+     * {% assign resolved_dir = dir | default: "auto" %}
+     * <html lang="{{locale}}" dir="{{resolved_dir}}">
+     *   <head>
+     *     {%- auth0:head -%}
+     *   </head>
+     *   <body class="_widget-auto-layout">
+     *     {%- auth0:widget -%}
+     *   </body>
+     * </html>
      * 
* * @param {Management.UpdateUniversalLoginTemplateRequestContent} request @@ -178,9 +161,12 @@ export class Templates { request: Management.UpdateUniversalLoginTemplateRequestContent, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -196,9 +182,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -264,9 +251,12 @@ export class Templates { private async __deleteUniversalLogin( requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -279,9 +269,10 @@ export class Templates { method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -325,7 +316,7 @@ export class Templates { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/branding/resources/themes/client/Client.ts b/src/management/api/resources/branding/resources/themes/client/Client.ts index 9fe11ec4b1..e12d5c5ef7 100644 --- a/src/management/api/resources/branding/resources/themes/client/Client.ts +++ b/src/management/api/resources/branding/resources/themes/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Themes { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Themes { @@ -137,9 +117,12 @@ export class Themes { request: Management.CreateBrandingThemeRequestContent, requestOptions?: Themes.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -155,9 +138,10 @@ export class Themes { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -226,9 +210,12 @@ export class Themes { private async __getDefault( requestOptions?: Themes.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -241,9 +228,10 @@ export class Themes { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -313,9 +301,12 @@ export class Themes { themeId: string, requestOptions?: Themes.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -323,14 +314,15 @@ export class Themes { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/themes/${encodeURIComponent(themeId)}`, + `branding/themes/${core.url.encodePathParam(themeId)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -399,9 +391,12 @@ export class Themes { themeId: string, requestOptions?: Themes.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -409,14 +404,15 @@ export class Themes { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/themes/${encodeURIComponent(themeId)}`, + `branding/themes/${core.url.encodePathParam(themeId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -560,9 +556,12 @@ export class Themes { request: Management.UpdateBrandingThemeRequestContent, requestOptions?: Themes.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:branding"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -570,7 +569,7 @@ export class Themes { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `branding/themes/${encodeURIComponent(themeId)}`, + `branding/themes/${core.url.encodePathParam(themeId)}`, ), method: "PATCH", headers: _headers, @@ -578,9 +577,10 @@ export class Themes { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -629,7 +629,7 @@ export class Themes { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/branding/resources/themes/client/index.ts b/src/management/api/resources/branding/resources/themes/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/branding/resources/themes/client/index.ts +++ b/src/management/api/resources/branding/resources/themes/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/branding/resources/themes/client/requests/CreateBrandingThemeRequestContent.ts b/src/management/api/resources/branding/resources/themes/client/requests/CreateBrandingThemeRequestContent.ts deleted file mode 100644 index 1da64f40ec..0000000000 --- a/src/management/api/resources/branding/resources/themes/client/requests/CreateBrandingThemeRequestContent.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * borders: { - * button_border_radius: 1.1, - * button_border_weight: 1.1, - * buttons_style: "pill", - * input_border_radius: 1.1, - * input_border_weight: 1.1, - * inputs_style: "pill", - * show_widget_shadow: true, - * widget_border_weight: 1.1, - * widget_corner_radius: 1.1 - * }, - * colors: { - * body_text: "body_text", - * error: "error", - * header: "header", - * icons: "icons", - * input_background: "input_background", - * input_border: "input_border", - * input_filled_text: "input_filled_text", - * input_labels_placeholders: "input_labels_placeholders", - * links_focused_components: "links_focused_components", - * primary_button: "primary_button", - * primary_button_label: "primary_button_label", - * secondary_button_border: "secondary_button_border", - * secondary_button_label: "secondary_button_label", - * success: "success", - * widget_background: "widget_background", - * widget_border: "widget_border" - * }, - * fonts: { - * body_text: { - * bold: true, - * size: 1.1 - * }, - * buttons_text: { - * bold: true, - * size: 1.1 - * }, - * font_url: "font_url", - * input_labels: { - * bold: true, - * size: 1.1 - * }, - * links: { - * bold: true, - * size: 1.1 - * }, - * links_style: "normal", - * reference_text_size: 1.1, - * subtitle: { - * bold: true, - * size: 1.1 - * }, - * title: { - * bold: true, - * size: 1.1 - * } - * }, - * page_background: { - * background_color: "background_color", - * background_image_url: "background_image_url", - * page_layout: "center" - * }, - * widget: { - * header_text_alignment: "center", - * logo_height: 1.1, - * logo_position: "center", - * logo_url: "logo_url", - * social_buttons_layout: "bottom" - * } - * } - */ -export interface CreateBrandingThemeRequestContent { - borders: Management.BrandingThemeBorders; - colors: Management.BrandingThemeColors; - /** Display Name */ - displayName?: string; - fonts: Management.BrandingThemeFonts; - page_background: Management.BrandingThemePageBackground; - widget: Management.BrandingThemeWidget; -} diff --git a/src/management/api/resources/branding/resources/themes/client/requests/UpdateBrandingThemeRequestContent.ts b/src/management/api/resources/branding/resources/themes/client/requests/UpdateBrandingThemeRequestContent.ts deleted file mode 100644 index 78fb0ce0b3..0000000000 --- a/src/management/api/resources/branding/resources/themes/client/requests/UpdateBrandingThemeRequestContent.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * borders: { - * button_border_radius: 1.1, - * button_border_weight: 1.1, - * buttons_style: "pill", - * input_border_radius: 1.1, - * input_border_weight: 1.1, - * inputs_style: "pill", - * show_widget_shadow: true, - * widget_border_weight: 1.1, - * widget_corner_radius: 1.1 - * }, - * colors: { - * body_text: "body_text", - * error: "error", - * header: "header", - * icons: "icons", - * input_background: "input_background", - * input_border: "input_border", - * input_filled_text: "input_filled_text", - * input_labels_placeholders: "input_labels_placeholders", - * links_focused_components: "links_focused_components", - * primary_button: "primary_button", - * primary_button_label: "primary_button_label", - * secondary_button_border: "secondary_button_border", - * secondary_button_label: "secondary_button_label", - * success: "success", - * widget_background: "widget_background", - * widget_border: "widget_border" - * }, - * fonts: { - * body_text: { - * bold: true, - * size: 1.1 - * }, - * buttons_text: { - * bold: true, - * size: 1.1 - * }, - * font_url: "font_url", - * input_labels: { - * bold: true, - * size: 1.1 - * }, - * links: { - * bold: true, - * size: 1.1 - * }, - * links_style: "normal", - * reference_text_size: 1.1, - * subtitle: { - * bold: true, - * size: 1.1 - * }, - * title: { - * bold: true, - * size: 1.1 - * } - * }, - * page_background: { - * background_color: "background_color", - * background_image_url: "background_image_url", - * page_layout: "center" - * }, - * widget: { - * header_text_alignment: "center", - * logo_height: 1.1, - * logo_position: "center", - * logo_url: "logo_url", - * social_buttons_layout: "bottom" - * } - * } - */ -export interface UpdateBrandingThemeRequestContent { - borders: Management.BrandingThemeBorders; - colors: Management.BrandingThemeColors; - /** Display Name */ - displayName?: string; - fonts: Management.BrandingThemeFonts; - page_background: Management.BrandingThemePageBackground; - widget: Management.BrandingThemeWidget; -} diff --git a/src/management/api/resources/branding/resources/themes/client/requests/index.ts b/src/management/api/resources/branding/resources/themes/client/requests/index.ts deleted file mode 100644 index a32b15467a..0000000000 --- a/src/management/api/resources/branding/resources/themes/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type CreateBrandingThemeRequestContent } from "./CreateBrandingThemeRequestContent.js"; -export { type UpdateBrandingThemeRequestContent } from "./UpdateBrandingThemeRequestContent.js"; diff --git a/src/management/api/resources/clientGrants/client/Client.ts b/src/management/api/resources/clientGrants/client/Client.ts index 6b61827c76..026b1e9f51 100644 --- a/src/management/api/resources/clientGrants/client/Client.ts +++ b/src/management/api/resources/clientGrants/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -10,28 +9,9 @@ import * as errors from "../../../../errors/index.js"; import { Organizations } from "../resources/organizations/client/Client.js"; export declare namespace ClientGrants { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class ClientGrants { @@ -47,7 +27,7 @@ export class ClientGrants { } /** - * Retrieve a list of client grants, including the scopes associated with the application/API pair. + * Retrieve a list of client grants, including the scopes associated with the application/API pair. * * @param {Management.ListClientGrantsRequestParameters} request * @param {ClientGrants.RequestOptions} requestOptions - Request-specific configuration. @@ -57,16 +37,26 @@ export class ClientGrants { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.clientGrants.list() + * await client.clientGrants.list({ + * from: "from", + * take: 1, + * audience: "audience", + * client_id: "client_id", + * allow_any_organization: true, + * subject_type: "client" + * }) */ public async list( request: Management.ListClientGrantsRequestParameters = {}, requestOptions?: ClientGrants.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListClientGrantsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:client_grants"] }], + }; const { from: from_, take = 50, @@ -76,27 +66,27 @@ export class ClientGrants { subject_type: subjectType, } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } - if (audience != null) { + if (audience !== undefined) { _queryParams["audience"] = audience; } - if (clientId != null) { + if (clientId !== undefined) { _queryParams["client_id"] = clientId; } - if (allowAnyOrganization != null) { - _queryParams["allow_any_organization"] = allowAnyOrganization.toString(); + if (allowAnyOrganization !== undefined) { + _queryParams["allow_any_organization"] = allowAnyOrganization?.toString() ?? null; } - if (subjectType != null) { + if (subjectType !== undefined) { _queryParams["subject_type"] = subjectType; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -109,10 +99,10 @@ export class ClientGrants { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -160,19 +150,18 @@ export class ClientGrants { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListClientGrantPaginatedResponseContent, - Management.ClientGrantResponseContent - >({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => - response?.next != null && !(typeof response?.next === "string" && response?.next === ""), - getItems: (response) => response?.client_grants ?? [], - loadPage: (response) => { - return list(core.setObjectProperty(request, "from", response?.next)); + return new core.Page( + { + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => + response?.next != null && !(typeof response?.next === "string" && response?.next === ""), + getItems: (response) => response?.client_grants ?? [], + loadPage: (response) => { + return list(core.setObjectProperty(request, "from", response?.next)); + }, }, - }); + ); } /** @@ -191,8 +180,7 @@ export class ClientGrants { * @example * await client.clientGrants.create({ * client_id: "client_id", - * audience: "audience", - * scope: ["scope"] + * audience: "audience" * }) */ public create( @@ -206,9 +194,12 @@ export class ClientGrants { request: Management.CreateClientGrantRequestContent, requestOptions?: ClientGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:client_grants"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -224,9 +215,10 @@ export class ClientGrants { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -297,9 +289,12 @@ export class ClientGrants { id: string, requestOptions?: ClientGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:client_grants"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -307,14 +302,15 @@ export class ClientGrants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `client-grants/${encodeURIComponent(id)}`, + `client-grants/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -385,9 +381,12 @@ export class ClientGrants { request: Management.UpdateClientGrantRequestContent = {}, requestOptions?: ClientGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:client_grants"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -395,7 +394,7 @@ export class ClientGrants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `client-grants/${encodeURIComponent(id)}`, + `client-grants/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -403,9 +402,10 @@ export class ClientGrants { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -452,7 +452,7 @@ export class ClientGrants { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/clientGrants/client/index.ts b/src/management/api/resources/clientGrants/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/clientGrants/client/index.ts +++ b/src/management/api/resources/clientGrants/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/clientGrants/client/requests/CreateClientGrantRequestContent.ts b/src/management/api/resources/clientGrants/client/requests/CreateClientGrantRequestContent.ts deleted file mode 100644 index 3237038cb7..0000000000 --- a/src/management/api/resources/clientGrants/client/requests/CreateClientGrantRequestContent.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * client_id: "client_id", - * audience: "audience", - * scope: ["scope"] - * } - */ -export interface CreateClientGrantRequestContent { - /** ID of the client. */ - client_id: string; - /** The audience (API identifier) of this client grant */ - audience: string; - organization_usage?: Management.ClientGrantOrganizationUsageEnum; - /** If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations. */ - allow_any_organization?: boolean; - /** Scopes allowed for this client grant. */ - scope: string[]; - subject_type?: Management.ClientGrantSubjectTypeEnum; - /** Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ - authorization_details_types?: string[]; -} diff --git a/src/management/api/resources/clientGrants/client/requests/ListClientGrantsRequestParameters.ts b/src/management/api/resources/clientGrants/client/requests/ListClientGrantsRequestParameters.ts deleted file mode 100644 index b3abb9b47f..0000000000 --- a/src/management/api/resources/clientGrants/client/requests/ListClientGrantsRequestParameters.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListClientGrantsRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; - /** Optional filter on audience. */ - audience?: string; - /** Optional filter on client_id. */ - client_id?: string; - /** Optional filter on allow_any_organization. */ - allow_any_organization?: Management.ClientGrantAllowAnyOrganizationEnum; - /** The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ - subject_type?: Management.ClientGrantSubjectTypeEnum; -} diff --git a/src/management/api/resources/clientGrants/client/requests/UpdateClientGrantRequestContent.ts b/src/management/api/resources/clientGrants/client/requests/UpdateClientGrantRequestContent.ts deleted file mode 100644 index 4416f6a07a..0000000000 --- a/src/management/api/resources/clientGrants/client/requests/UpdateClientGrantRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateClientGrantRequestContent { - /** Scopes allowed for this client grant. */ - scope?: string[]; - organization_usage?: Management.ClientGrantOrganizationNullableUsageEnum | undefined; - /** Controls allowing any organization to be used with this grant */ - allow_any_organization?: boolean; - /** Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ - authorization_details_types?: string[]; -} diff --git a/src/management/api/resources/clientGrants/client/requests/index.ts b/src/management/api/resources/clientGrants/client/requests/index.ts deleted file mode 100644 index cf3f21b344..0000000000 --- a/src/management/api/resources/clientGrants/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListClientGrantsRequestParameters } from "./ListClientGrantsRequestParameters.js"; -export { type CreateClientGrantRequestContent } from "./CreateClientGrantRequestContent.js"; -export { type UpdateClientGrantRequestContent } from "./UpdateClientGrantRequestContent.js"; diff --git a/src/management/api/resources/clientGrants/resources/index.ts b/src/management/api/resources/clientGrants/resources/index.ts index 007653ca91..420b9d8284 100644 --- a/src/management/api/resources/clientGrants/resources/index.ts +++ b/src/management/api/resources/clientGrants/resources/index.ts @@ -1,2 +1 @@ export * as organizations from "./organizations/index.js"; -export * from "./organizations/client/requests/index.js"; 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 fec954e7cd..a27933508f 100644 --- a/src/management/api/resources/clientGrants/resources/organizations/client/Client.ts +++ b/src/management/api/resources/clientGrants/resources/organizations/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Organizations { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Organizations { @@ -51,28 +31,34 @@ export class Organizations { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.clientGrants.organizations.list("id") + * await client.clientGrants.organizations.list("id", { + * from: "from", + * take: 1 + * }) */ public async list( id: string, request: Management.ListClientGrantOrganizationsRequestParameters = {}, requestOptions?: Organizations.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.clientGrants.ListClientGrantOrganizationsRequestParameters, + request: Management.ListClientGrantOrganizationsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_client_grants"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -80,15 +66,15 @@ export class Organizations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `client-grants/${encodeURIComponent(id)}/organizations`, + `client-grants/${core.url.encodePathParam(id)}/organizations`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -143,10 +129,7 @@ export class Organizations { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListClientGrantOrganizationsPaginatedResponseContent, - Management.Organization - >({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => @@ -158,7 +141,7 @@ export class Organizations { }); } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/clientGrants/resources/organizations/client/index.ts b/src/management/api/resources/clientGrants/resources/organizations/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/clientGrants/resources/organizations/client/index.ts +++ b/src/management/api/resources/clientGrants/resources/organizations/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/clientGrants/resources/organizations/client/requests/ListClientGrantOrganizationsRequestParameters.ts b/src/management/api/resources/clientGrants/resources/organizations/client/requests/ListClientGrantOrganizationsRequestParameters.ts deleted file mode 100644 index c1fdb4bd19..0000000000 --- a/src/management/api/resources/clientGrants/resources/organizations/client/requests/ListClientGrantOrganizationsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListClientGrantOrganizationsRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/clientGrants/resources/organizations/client/requests/index.ts b/src/management/api/resources/clientGrants/resources/organizations/client/requests/index.ts deleted file mode 100644 index fab6c5da71..0000000000 --- a/src/management/api/resources/clientGrants/resources/organizations/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListClientGrantOrganizationsRequestParameters } from "./ListClientGrantOrganizationsRequestParameters.js"; diff --git a/src/management/api/resources/clients/client/Client.ts b/src/management/api/resources/clients/client/Client.ts index 6a1f6b9316..2b1eece3b9 100644 --- a/src/management/api/resources/clients/client/Client.ts +++ b/src/management/api/resources/clients/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -11,28 +10,9 @@ import { Credentials } from "../resources/credentials/client/Client.js"; import { Connections } from "../resources/connections/client/Client.js"; export declare namespace Clients { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Clients { @@ -96,16 +76,39 @@ export class Clients { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.clients.list() + * await client.clients.list({ + * fields: "fields", + * include_fields: true, + * page: 1, + * per_page: 1, + * include_totals: true, + * is_global: true, + * is_first_party: true, + * app_type: "app_type", + * q: "q" + * }) */ public async list( request: Management.ListClientsRequestParameters = {}, requestOptions?: Clients.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListClientsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { + oAuth2ClientCredentials: [ + "read:clients", + "read:client_keys", + "read:client_credentials", + "read:client_summary", + ], + }, + ], + }; const { fields, include_fields: includeFields, @@ -118,36 +121,36 @@ export class Clients { q, } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (isGlobal != null) { - _queryParams["is_global"] = isGlobal.toString(); + if (isGlobal !== undefined) { + _queryParams["is_global"] = isGlobal?.toString() ?? null; } - if (isFirstParty != null) { - _queryParams["is_first_party"] = isFirstParty.toString(); + if (isFirstParty !== undefined) { + _queryParams["is_first_party"] = isFirstParty?.toString() ?? null; } - if (appType != null) { + if (appType !== undefined) { _queryParams["app_type"] = appType; } - if (q != null) { + if (q !== undefined) { _queryParams["q"] = q; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -160,10 +163,10 @@ export class Clients { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -217,7 +220,7 @@ export class Clients { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.clients ?? []).length > 0, @@ -270,9 +273,12 @@ export class Clients { request: Management.CreateClientRequestContent, requestOptions?: Clients.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:clients"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -288,9 +294,10 @@ export class Clients { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -381,7 +388,10 @@ export class Clients { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.clients.get("id") + * await client.clients.get("id", { + * fields: "fields", + * include_fields: true + * }) */ public get( id: string, @@ -396,19 +406,32 @@ export class Clients { request: Management.GetClientRequestParameters = {}, requestOptions?: Clients.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { + oAuth2ClientCredentials: [ + "read:clients", + "read:client_keys", + "read:client_credentials", + "read:client_summary", + ], + }, + ], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -416,14 +439,15 @@ export class Clients { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(id)}`, + `clients/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetClientResponseContent, rawResponse: _response.rawResponse }; @@ -486,9 +510,12 @@ export class Clients { } private async __delete(id: string, requestOptions?: Clients.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:clients"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -496,14 +523,15 @@ export class Clients { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(id)}`, + `clients/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -582,9 +610,15 @@ export class Clients { request: Management.UpdateClientRequestContent = {}, requestOptions?: Clients.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["update:clients", "update:client_keys", "update:client_credentials"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -592,7 +626,7 @@ export class Clients { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(id)}`, + `clients/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -600,9 +634,10 @@ export class Clients { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -679,9 +714,12 @@ export class Clients { id: string, requestOptions?: Clients.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:client_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -689,14 +727,15 @@ export class Clients { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(id)}/rotate-secret`, + `clients/${core.url.encodePathParam(id)}/rotate-secret`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -745,7 +784,7 @@ export class Clients { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/clients/client/index.ts b/src/management/api/resources/clients/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/clients/client/index.ts +++ b/src/management/api/resources/clients/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/clients/client/requests/CreateClientRequestContent.ts b/src/management/api/resources/clients/client/requests/CreateClientRequestContent.ts deleted file mode 100644 index 18ecc3da1d..0000000000 --- a/src/management/api/resources/clients/client/requests/CreateClientRequestContent.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name" - * } - */ -export interface CreateClientRequestContent { - /** Name of this client (min length: 1 character, does not allow `<` or `>`). */ - name: string; - /** Free text description of this client (max length: 140 characters). */ - description?: string; - /** URL of the logo to display for this client. Recommended size is 150x150 pixels. */ - logo_uri?: string; - /** Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication. */ - callbacks?: string[]; - oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; - oidc_backchannel_logout?: Management.ClientOidcBackchannelLogoutSettings; - session_transfer?: Management.ClientSessionTransferConfiguration; - /** Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs. */ - allowed_origins?: string[]; - /** Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode. */ - web_origins?: string[]; - /** List of audiences/realms for SAML protocol. Used by the wsfed addon. */ - client_aliases?: string[]; - /** List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed. */ - allowed_clients?: string[]; - /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ - allowed_logout_urls?: string[]; - /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ - grant_types?: string[]; - token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; - app_type?: Management.ClientAppTypeEnum; - /** Whether this client a first party client or not */ - is_first_party?: boolean; - /** Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false). */ - oidc_conformant?: boolean; - jwt_configuration?: Management.ClientJwtConfiguration; - encryption_key?: Management.ClientEncryptionKey; - /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ - sso?: boolean; - /** Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false). */ - cross_origin_authentication?: boolean; - /** URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page. */ - cross_origin_loc?: string; - /** true to disable Single Sign On, false otherwise (default: false) */ - sso_disabled?: boolean; - /** true if the custom login page is to be used, false otherwise. Defaults to true */ - custom_login_page_on?: boolean; - /** The content (HTML, CSS, JS) of the custom login page. */ - custom_login_page?: string; - /** The content (HTML, CSS, JS) of the custom login page. (Used on Previews) */ - custom_login_page_preview?: string; - /** HTML form template to be used for WS-Federation. */ - form_template?: string; - addons?: Management.ClientAddons; - client_metadata?: Management.ClientMetadata; - mobile?: Management.ClientMobile; - /** Initiate login uri, must be https */ - initiate_login_uri?: string; - native_social_login?: Management.NativeSocialLogin; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; - organization_usage?: Management.ClientOrganizationUsageEnum; - organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; - /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ - organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientCreateAuthenticationMethod; - /** Makes the use of Pushed Authorization Requests mandatory for this client */ - require_pushed_authorization_requests?: boolean; - /** Makes the use of Proof-of-Possession mandatory for this client */ - require_proof_of_possession?: boolean; - signed_request_object?: Management.ClientSignedRequestObjectWithPublicKey; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; - /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; - token_quota?: Management.CreateTokenQuota; - /** The identifier of the resource server that this client is linked to. */ - resource_server_identifier?: string; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; -} diff --git a/src/management/api/resources/clients/client/requests/GetClientRequestParameters.ts b/src/management/api/resources/clients/client/requests/GetClientRequestParameters.ts deleted file mode 100644 index caab2a7c31..0000000000 --- a/src/management/api/resources/clients/client/requests/GetClientRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetClientRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/clients/client/requests/ListClientsRequestParameters.ts b/src/management/api/resources/clients/client/requests/ListClientsRequestParameters.ts deleted file mode 100644 index b66a36d172..0000000000 --- a/src/management/api/resources/clients/client/requests/ListClientsRequestParameters.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListClientsRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Default value is 50, maximum value is 100 */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Optional filter on the global client parameter. */ - is_global?: boolean; - /** Optional filter on whether or not a client is a first-party client. */ - is_first_party?: boolean; - /** Optional filter by a comma-separated list of application types. */ - app_type?: string; - /** Advanced Query in Lucene syntax.
Permitted Queries:
  • client_grant.organization_id:{organization_id}
  • client_grant.allow_any_organization:true
Additional Restrictions:
  • Cannot be used in combination with other filters
  • Requires use of the from and take paging parameters (checkpoint paginatinon)
  • Reduced rate limits apply. See Rate Limit Configurations
Note: Recent updates may not be immediately reflected in query results */ - q?: string; -} diff --git a/src/management/api/resources/clients/client/requests/UpdateClientRequestContent.ts b/src/management/api/resources/clients/client/requests/UpdateClientRequestContent.ts deleted file mode 100644 index 6399cfb4cf..0000000000 --- a/src/management/api/resources/clients/client/requests/UpdateClientRequestContent.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateClientRequestContent { - /** The name of the client. Must contain at least one character. Does not allow '<' or '>'. */ - name?: string; - /** Free text description of the purpose of the Client. (Max character length: 140) */ - description?: string; - /** The secret used to sign tokens for the client */ - client_secret?: string; - /** The URL of the client logo (recommended size: 150x150) */ - logo_uri?: string; - /** A set of URLs that are valid to call back from Auth0 when authenticating users */ - callbacks?: string[]; - oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; - oidc_backchannel_logout?: Management.ClientOidcBackchannelLogoutSettings; - session_transfer?: Management.ClientSessionTransferConfiguration; - /** A set of URLs that represents valid origins for CORS */ - allowed_origins?: string[]; - /** A set of URLs that represents valid web origins for use with web message response mode */ - web_origins?: string[]; - /** A set of grant types that the client is authorized to use. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ - grant_types?: string[]; - /** List of audiences for SAML protocol */ - client_aliases?: string[]; - /** Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients */ - allowed_clients?: string[]; - /** URLs that are valid to redirect to after logout from Auth0. */ - allowed_logout_urls?: string[]; - jwt_configuration?: Management.ClientJwtConfiguration; - encryption_key?: Management.ClientEncryptionKey; - /** true to use Auth0 instead of the IdP to do Single Sign On, false otherwise (default: false) */ - sso?: boolean; - /** true if this client can be used to make cross-origin authentication requests, false otherwise if cross origin is disabled */ - cross_origin_authentication?: boolean; - /** URL for the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page. */ - cross_origin_loc?: string; - /** true to disable Single Sign On, false otherwise (default: false) */ - sso_disabled?: boolean; - /** true if the custom login page is to be used, false otherwise. */ - custom_login_page_on?: boolean; - token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodOrNullEnum | undefined; - app_type?: Management.ClientAppTypeEnum; - /** Whether this client a first party client or not */ - is_first_party?: boolean; - /** Whether this client will conform to strict OIDC specifications */ - oidc_conformant?: boolean; - /** The content (HTML, CSS, JS) of the custom login page */ - custom_login_page?: string; - custom_login_page_preview?: string; - token_quota?: Management.UpdateTokenQuota; - /** Form template for WS-Federation protocol */ - form_template?: string; - addons?: Management.ClientAddons; - client_metadata?: Management.ClientMetadata; - mobile?: Management.ClientMobile; - /** Initiate login uri, must be https */ - initiate_login_uri?: string; - native_social_login?: Management.NativeSocialLogin; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; - organization_usage?: Management.ClientOrganizationUsagePatchEnum | undefined; - organization_require_behavior?: Management.ClientOrganizationRequireBehaviorPatchEnum | undefined; - /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ - organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientAuthenticationMethod; - /** Makes the use of Pushed Authorization Requests mandatory for this client */ - require_pushed_authorization_requests?: boolean; - /** Makes the use of Proof-of-Possession mandatory for this client */ - require_proof_of_possession?: boolean; - signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; - /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; -} diff --git a/src/management/api/resources/clients/client/requests/index.ts b/src/management/api/resources/clients/client/requests/index.ts deleted file mode 100644 index ccaacfea6a..0000000000 --- a/src/management/api/resources/clients/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListClientsRequestParameters } from "./ListClientsRequestParameters.js"; -export { type CreateClientRequestContent } from "./CreateClientRequestContent.js"; -export { type GetClientRequestParameters } from "./GetClientRequestParameters.js"; -export { type UpdateClientRequestContent } from "./UpdateClientRequestContent.js"; 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 b46f1234e9..90bb83a7d0 100644 --- a/src/management/api/resources/clients/resources/connections/client/Client.ts +++ b/src/management/api/resources/clients/resources/connections/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Connections { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Connections { @@ -62,41 +42,52 @@ export class Connections { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.clients.connections.get("id") + * await client.clients.connections.get("id", { + * from: "from", + * take: 1, + * fields: "fields", + * include_fields: true + * }) */ public async get( id: string, request: Management.ConnectionsGetRequest = {}, requestOptions?: Connections.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.clients.ConnectionsGetRequest, + request: Management.ConnectionsGetRequest, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:connections", "read:clients", "read:client_summary"] }, + ], + }; const { strategy, from: from_, take = 50, fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (strategy != null) { + if (strategy !== undefined) { if (Array.isArray(strategy)) { _queryParams["strategy"] = strategy.map((item) => item); } else { _queryParams["strategy"] = strategy; } } - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -104,15 +95,15 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(id)}/connections`, + `clients/${core.url.encodePathParam(id)}/connections`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -169,7 +160,7 @@ export class Connections { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => @@ -181,7 +172,7 @@ export class Connections { }); } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/clients/resources/connections/client/index.ts b/src/management/api/resources/clients/resources/connections/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/clients/resources/connections/client/index.ts +++ b/src/management/api/resources/clients/resources/connections/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/clients/resources/connections/client/requests/ConnectionsGetRequest.ts b/src/management/api/resources/clients/resources/connections/client/requests/ConnectionsGetRequest.ts deleted file mode 100644 index 54abbd4264..0000000000 --- a/src/management/api/resources/clients/resources/connections/client/requests/ConnectionsGetRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface ConnectionsGetRequest { - /** Provide strategies to only retrieve connections with such strategies */ - strategy?: Management.ConnectionStrategyEnum | Management.ConnectionStrategyEnum[]; - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; - /** A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - fields?: string; - /** true if the fields specified are to be included in the result, false otherwise (defaults to true) */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/clients/resources/connections/client/requests/index.ts b/src/management/api/resources/clients/resources/connections/client/requests/index.ts deleted file mode 100644 index 1c17a20df0..0000000000 --- a/src/management/api/resources/clients/resources/connections/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ConnectionsGetRequest } from "./ConnectionsGetRequest.js"; diff --git a/src/management/api/resources/clients/resources/credentials/client/Client.ts b/src/management/api/resources/clients/resources/credentials/client/Client.ts index c655495bd7..59deda1bbf 100644 --- a/src/management/api/resources/clients/resources/credentials/client/Client.ts +++ b/src/management/api/resources/clients/resources/credentials/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Credentials { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Credentials { @@ -67,9 +47,12 @@ export class Credentials { clientId: string, requestOptions?: Credentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:client_credentials"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -77,14 +60,15 @@ export class Credentials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(clientId)}/credentials`, + `clients/${core.url.encodePathParam(clientId)}/credentials`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.ClientCredential[], rawResponse: _response.rawResponse }; @@ -191,9 +175,12 @@ export class Credentials { request: Management.PostClientCredentialRequestContent, requestOptions?: Credentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:client_credentials"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -201,7 +188,7 @@ export class Credentials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(clientId)}/credentials`, + `clients/${core.url.encodePathParam(clientId)}/credentials`, ), method: "POST", headers: _headers, @@ -209,9 +196,10 @@ export class Credentials { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -290,9 +278,12 @@ export class Credentials { credentialId: string, requestOptions?: Credentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:client_credentials"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -300,14 +291,15 @@ export class Credentials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(clientId)}/credentials/${encodeURIComponent(credentialId)}`, + `clients/${core.url.encodePathParam(clientId)}/credentials/${core.url.encodePathParam(credentialId)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -382,9 +374,12 @@ export class Credentials { credentialId: string, requestOptions?: Credentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:client_credentials"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -392,14 +387,15 @@ export class Credentials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(clientId)}/credentials/${encodeURIComponent(credentialId)}`, + `clients/${core.url.encodePathParam(clientId)}/credentials/${core.url.encodePathParam(credentialId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -475,9 +471,12 @@ export class Credentials { request: Management.PatchClientCredentialRequestContent = {}, requestOptions?: Credentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:client_credentials"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -485,7 +484,7 @@ export class Credentials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `clients/${encodeURIComponent(clientId)}/credentials/${encodeURIComponent(credentialId)}`, + `clients/${core.url.encodePathParam(clientId)}/credentials/${core.url.encodePathParam(credentialId)}`, ), method: "PATCH", headers: _headers, @@ -493,9 +492,10 @@ export class Credentials { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -544,7 +544,7 @@ export class Credentials { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/clients/resources/credentials/client/index.ts b/src/management/api/resources/clients/resources/credentials/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/clients/resources/credentials/client/index.ts +++ b/src/management/api/resources/clients/resources/credentials/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/clients/resources/credentials/client/requests/PatchClientCredentialRequestContent.ts b/src/management/api/resources/clients/resources/credentials/client/requests/PatchClientCredentialRequestContent.ts deleted file mode 100644 index a36835a9ef..0000000000 --- a/src/management/api/resources/clients/resources/credentials/client/requests/PatchClientCredentialRequestContent.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface PatchClientCredentialRequestContent { - /** The ISO 8601 formatted date representing the expiration of the credential. */ - expires_at?: string; -} diff --git a/src/management/api/resources/clients/resources/credentials/client/requests/PostClientCredentialRequestContent.ts b/src/management/api/resources/clients/resources/credentials/client/requests/PostClientCredentialRequestContent.ts deleted file mode 100644 index 391125cf15..0000000000 --- a/src/management/api/resources/clients/resources/credentials/client/requests/PostClientCredentialRequestContent.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * credential_type: "public_key" - * } - */ -export interface PostClientCredentialRequestContent { - credential_type: Management.ClientCredentialTypeEnum; - /** 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 public key (SPKI and PKCS1) or X509 certificate. Must be JSON escaped. */ - pem?: string; - alg?: Management.PublicKeyCredentialAlgorithmEnum; - /** Parse expiry from x509 certificate. If true, attempts to parse the expiry date from the provided PEM. Applies to `public_key` credential type. */ - parse_expiry_from_cert?: boolean; - /** The ISO 8601 formatted date representing the expiration of the credential. If not specified (not recommended), the credential never expires. Applies to `public_key` credential type. */ - expires_at?: string; -} diff --git a/src/management/api/resources/clients/resources/credentials/client/requests/index.ts b/src/management/api/resources/clients/resources/credentials/client/requests/index.ts deleted file mode 100644 index e7195eef50..0000000000 --- a/src/management/api/resources/clients/resources/credentials/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type PostClientCredentialRequestContent } from "./PostClientCredentialRequestContent.js"; -export { type PatchClientCredentialRequestContent } from "./PatchClientCredentialRequestContent.js"; diff --git a/src/management/api/resources/clients/resources/index.ts b/src/management/api/resources/clients/resources/index.ts index 1c500d50b3..2bb5f853f3 100644 --- a/src/management/api/resources/clients/resources/index.ts +++ b/src/management/api/resources/clients/resources/index.ts @@ -1,4 +1,2 @@ export * as credentials from "./credentials/index.js"; export * as connections from "./connections/index.js"; -export * from "./credentials/client/requests/index.js"; -export * from "./connections/client/requests/index.js"; diff --git a/src/management/api/resources/connections/client/Client.ts b/src/management/api/resources/connections/client/Client.ts index 5008acfcfb..311fb41ffb 100644 --- a/src/management/api/resources/connections/client/Client.ts +++ b/src/management/api/resources/connections/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -13,28 +12,9 @@ import { ScimConfiguration } from "../resources/scimConfiguration/client/Client. import { Users } from "../resources/users/client/Client.js"; export declare namespace Connections { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Connections { @@ -94,43 +74,52 @@ export class Connections { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.connections.list() + * await client.connections.list({ + * from: "from", + * take: 1, + * name: "name", + * fields: "fields", + * include_fields: true + * }) */ public async list( request: Management.ListConnectionsQueryParameters = {}, requestOptions?: Connections.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListConnectionsQueryParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:connections"] }], + }; const { from: from_, take = 50, strategy, name, fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } - if (strategy != null) { + if (strategy !== undefined) { if (Array.isArray(strategy)) { _queryParams["strategy"] = strategy.map((item) => item); } else { _queryParams["strategy"] = strategy; } } - if (name != null) { + if (name !== undefined) { _queryParams["name"] = name; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -143,10 +132,10 @@ export class Connections { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -199,9 +188,9 @@ export class Connections { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListConnectionsCheckpointPaginatedResponseContent, - Management.ConnectionForList + return new core.Page< + Management.ConnectionForList, + Management.ListConnectionsCheckpointPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -243,9 +232,12 @@ export class Connections { request: Management.CreateConnectionRequestContent, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -261,9 +253,10 @@ export class Connections { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -324,7 +317,10 @@ export class Connections { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.connections.get("id") + * await client.connections.get("id", { + * fields: "fields", + * include_fields: true + * }) */ public get( id: string, @@ -339,19 +335,22 @@ export class Connections { request: Management.GetConnectionRequestParameters = {}, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:connections"] }], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -359,14 +358,15 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}`, + `connections/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -435,9 +435,12 @@ export class Connections { id: string, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -445,14 +448,15 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}`, + `connections/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -526,9 +530,12 @@ export class Connections { request: Management.UpdateConnectionRequestContent = {}, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -536,7 +543,7 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}`, + `connections/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -544,9 +551,10 @@ export class Connections { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -618,9 +626,12 @@ export class Connections { id: string, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -628,14 +639,15 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/status`, + `connections/${core.url.encodePathParam(id)}/status`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -679,7 +691,7 @@ export class Connections { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/connections/client/index.ts b/src/management/api/resources/connections/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/connections/client/index.ts +++ b/src/management/api/resources/connections/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/connections/client/requests/CreateConnectionRequestContent.ts b/src/management/api/resources/connections/client/requests/CreateConnectionRequestContent.ts deleted file mode 100644 index d5a7a2bded..0000000000 --- a/src/management/api/resources/connections/client/requests/CreateConnectionRequestContent.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name", - * strategy: "ad" - * } - */ -export interface CreateConnectionRequestContent { - /** The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 */ - name: string; - /** Connection name used in the new universal login experience */ - display_name?: string; - strategy: Management.ConnectionIdentityProviderEnum; - options?: Management.ConnectionPropertiesOptions; - /** DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. */ - enabled_clients?: string[]; - /** true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) */ - is_domain_connection?: boolean; - /** 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.) */ - show_as_button?: 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. */ - realms?: string[]; - metadata?: Management.ConnectionsMetadata; -} diff --git a/src/management/api/resources/connections/client/requests/GetConnectionRequestParameters.ts b/src/management/api/resources/connections/client/requests/GetConnectionRequestParameters.ts deleted file mode 100644 index 0f48f8379f..0000000000 --- a/src/management/api/resources/connections/client/requests/GetConnectionRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetConnectionRequestParameters { - /** A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - fields?: string; - /** true if the fields specified are to be included in the result, false otherwise (defaults to true) */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/connections/client/requests/ListConnectionsQueryParameters.ts b/src/management/api/resources/connections/client/requests/ListConnectionsQueryParameters.ts deleted file mode 100644 index 82f2260dc7..0000000000 --- a/src/management/api/resources/connections/client/requests/ListConnectionsQueryParameters.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListConnectionsQueryParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; - /** Provide strategies to only retrieve connections with such strategies */ - strategy?: Management.ConnectionStrategyEnum | Management.ConnectionStrategyEnum[]; - /** Provide the name of the connection to retrieve */ - name?: string; - /** A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields */ - fields?: string; - /** true if the fields specified are to be included in the result, false otherwise (defaults to true) */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/connections/client/requests/UpdateConnectionRequestContent.ts b/src/management/api/resources/connections/client/requests/UpdateConnectionRequestContent.ts deleted file mode 100644 index ad4a43f39a..0000000000 --- a/src/management/api/resources/connections/client/requests/UpdateConnectionRequestContent.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateConnectionRequestContent { - /** The connection name used in the new universal login experience. If display_name is not included in the request, the field will be overwritten with the name value. */ - display_name?: string; - options?: Management.UpdateConnectionOptions; - /** DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable or disable the connection for any clients. */ - enabled_clients?: string[]; - /** true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) */ - is_domain_connection?: boolean; - /** 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.) */ - show_as_button?: 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. */ - realms?: string[]; - metadata?: Management.ConnectionsMetadata; -} diff --git a/src/management/api/resources/connections/client/requests/index.ts b/src/management/api/resources/connections/client/requests/index.ts deleted file mode 100644 index 17cc7ae241..0000000000 --- a/src/management/api/resources/connections/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListConnectionsQueryParameters } from "./ListConnectionsQueryParameters.js"; -export { type CreateConnectionRequestContent } from "./CreateConnectionRequestContent.js"; -export { type GetConnectionRequestParameters } from "./GetConnectionRequestParameters.js"; -export { type UpdateConnectionRequestContent } from "./UpdateConnectionRequestContent.js"; 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 8a1d3510db..3b3eb04542 100644 --- a/src/management/api/resources/connections/resources/clients/client/Client.ts +++ b/src/management/api/resources/connections/resources/clients/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Clients { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Clients { @@ -56,28 +36,34 @@ export class Clients { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.connections.clients.get("id") + * await client.connections.clients.get("id", { + * take: 1, + * from: "from" + * }) */ public async get( id: string, request: Management.GetConnectionEnabledClientsRequestParameters = {}, requestOptions?: Clients.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.connections.GetConnectionEnabledClientsRequestParameters, + request: Management.GetConnectionEnabledClientsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:connections"] }], + }; const { take = 50, from: from_ } = request; const _queryParams: Record = {}; - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -85,15 +71,15 @@ export class Clients { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/clients`, + `connections/${core.url.encodePathParam(id)}/clients`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -150,19 +136,18 @@ export class Clients { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.GetConnectionEnabledClientsResponseContent, - Management.ConnectionEnabledClient - >({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => - response?.next != null && !(typeof response?.next === "string" && response?.next === ""), - getItems: (response) => response?.clients ?? [], - loadPage: (response) => { - return list(core.setObjectProperty(request, "from", response?.next)); + return new core.Page( + { + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => + response?.next != null && !(typeof response?.next === "string" && response?.next === ""), + getItems: (response) => response?.clients ?? [], + loadPage: (response) => { + return list(core.setObjectProperty(request, "from", response?.next)); + }, }, - }); + ); } /** @@ -195,9 +180,12 @@ export class Clients { request: Management.UpdateEnabledClientConnectionsRequestContent, requestOptions?: Clients.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -205,7 +193,7 @@ export class Clients { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/clients`, + `connections/${core.url.encodePathParam(id)}/clients`, ), method: "PATCH", headers: _headers, @@ -213,9 +201,10 @@ export class Clients { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -261,7 +250,7 @@ export class Clients { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/connections/resources/clients/client/index.ts b/src/management/api/resources/connections/resources/clients/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/connections/resources/clients/client/index.ts +++ b/src/management/api/resources/connections/resources/clients/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/connections/resources/clients/client/requests/GetConnectionEnabledClientsRequestParameters.ts b/src/management/api/resources/connections/resources/clients/client/requests/GetConnectionEnabledClientsRequestParameters.ts deleted file mode 100644 index 24476b24ce..0000000000 --- a/src/management/api/resources/connections/resources/clients/client/requests/GetConnectionEnabledClientsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetConnectionEnabledClientsRequestParameters { - /** Number of results per page. Defaults to 50. */ - take?: number; - /** Optional Id from which to start selection. */ - from?: string; -} diff --git a/src/management/api/resources/connections/resources/clients/client/requests/index.ts b/src/management/api/resources/connections/resources/clients/client/requests/index.ts deleted file mode 100644 index b64476fc73..0000000000 --- a/src/management/api/resources/connections/resources/clients/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type GetConnectionEnabledClientsRequestParameters } from "./GetConnectionEnabledClientsRequestParameters.js"; diff --git a/src/management/api/resources/connections/resources/index.ts b/src/management/api/resources/connections/resources/index.ts index 101a3cfc47..3e7c6770fa 100644 --- a/src/management/api/resources/connections/resources/index.ts +++ b/src/management/api/resources/connections/resources/index.ts @@ -2,6 +2,3 @@ export * as clients from "./clients/index.js"; export * as keys from "./keys/index.js"; export * as scimConfiguration from "./scimConfiguration/index.js"; export * as users from "./users/index.js"; -export * from "./clients/client/requests/index.js"; -export * from "./scimConfiguration/client/requests/index.js"; -export * from "./users/client/requests/index.js"; diff --git a/src/management/api/resources/connections/resources/keys/client/Client.ts b/src/management/api/resources/connections/resources/keys/client/Client.ts index e4f895d436..7c12912ee6 100644 --- a/src/management/api/resources/connections/resources/keys/client/Client.ts +++ b/src/management/api/resources/connections/resources/keys/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Keys { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Keys { @@ -63,9 +43,12 @@ export class Keys { id: string, requestOptions?: Keys.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:connections_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -73,14 +56,15 @@ export class Keys { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/keys`, + `connections/${core.url.encodePathParam(id)}/keys`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.ConnectionKey[], rawResponse: _response.rawResponse }; @@ -128,7 +112,7 @@ export class Keys { * Rotates the connection keys for the Okta or OIDC connection strategies. * * @param {string} id - ID of the connection - * @param {Management.RotateConnectionKeysRequestContent} request + * @param {Management.RotateConnectionKeysRequestContent | null} request * @param {Keys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} @@ -138,11 +122,11 @@ export class Keys { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.connections.keys.rotate("id", undefined) + * await client.connections.keys.rotate("id") */ public rotate( id: string, - request?: Management.RotateConnectionKeysRequestContent, + request?: Management.RotateConnectionKeysRequestContent | null, requestOptions?: Keys.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__rotate(id, request, requestOptions)); @@ -150,12 +134,18 @@ export class Keys { private async __rotate( id: string, - request?: Management.RotateConnectionKeysRequestContent, + request?: Management.RotateConnectionKeysRequestContent | null, requestOptions?: Keys.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["create:connections_keys", "update:connections_keys"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -163,7 +153,7 @@ export class Keys { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/keys/rotate`, + `connections/${core.url.encodePathParam(id)}/keys/rotate`, ), method: "POST", headers: _headers, @@ -171,9 +161,10 @@ export class Keys { queryParameters: requestOptions?.queryParams, requestType: "json", body: request != null ? request : undefined, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -222,7 +213,7 @@ export class Keys { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/connections/resources/scimConfiguration/client/Client.ts b/src/management/api/resources/connections/resources/scimConfiguration/client/Client.ts index 152b05d184..100b8cde50 100644 --- a/src/management/api/resources/connections/resources/scimConfiguration/client/Client.ts +++ b/src/management/api/resources/connections/resources/scimConfiguration/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -10,28 +9,9 @@ import * as errors from "../../../../../../errors/index.js"; import { Tokens } from "../resources/tokens/client/Client.js"; export declare namespace ScimConfiguration { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class ScimConfiguration { @@ -69,9 +49,12 @@ export class ScimConfiguration { id: string, requestOptions?: ScimConfiguration.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:scim_config"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -79,14 +62,15 @@ export class ScimConfiguration { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration`, + `connections/${core.url.encodePathParam(id)}/scim-configuration`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -133,18 +117,18 @@ export class ScimConfiguration { * Create a scim configuration for a connection. * * @param {string} id - The id of the connection to create its SCIM configuration - * @param {Management.CreateScimConfigurationRequestContent} request + * @param {Management.CreateScimConfigurationRequestContent | null} request * @param {ScimConfiguration.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} * @throws {@link Management.NotFoundError} * * @example - * await client.connections.scimConfiguration.create("id", undefined) + * await client.connections.scimConfiguration.create("id") */ public create( id: string, - request?: Management.CreateScimConfigurationRequestContent, + request?: Management.CreateScimConfigurationRequestContent | null, requestOptions?: ScimConfiguration.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__create(id, request, requestOptions)); @@ -152,12 +136,15 @@ export class ScimConfiguration { private async __create( id: string, - request?: Management.CreateScimConfigurationRequestContent, + request?: Management.CreateScimConfigurationRequestContent | null, requestOptions?: ScimConfiguration.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:scim_config"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -165,7 +152,7 @@ export class ScimConfiguration { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration`, + `connections/${core.url.encodePathParam(id)}/scim-configuration`, ), method: "POST", headers: _headers, @@ -173,9 +160,10 @@ export class ScimConfiguration { queryParameters: requestOptions?.queryParams, requestType: "json", body: request != null ? request : undefined, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -238,9 +226,12 @@ export class ScimConfiguration { id: string, requestOptions?: ScimConfiguration.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:scim_config"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -248,14 +239,15 @@ export class ScimConfiguration { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration`, + `connections/${core.url.encodePathParam(id)}/scim-configuration`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -324,9 +316,12 @@ export class ScimConfiguration { request: Management.UpdateScimConfigurationRequestContent, requestOptions?: ScimConfiguration.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:scim_config"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -334,7 +329,7 @@ export class ScimConfiguration { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration`, + `connections/${core.url.encodePathParam(id)}/scim-configuration`, ), method: "PATCH", headers: _headers, @@ -342,9 +337,10 @@ export class ScimConfiguration { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -410,9 +406,12 @@ export class ScimConfiguration { id: string, requestOptions?: ScimConfiguration.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:scim_config"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -420,14 +419,15 @@ export class ScimConfiguration { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration/default-mapping`, + `connections/${core.url.encodePathParam(id)}/scim-configuration/default-mapping`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -470,7 +470,7 @@ export class ScimConfiguration { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/connections/resources/scimConfiguration/client/index.ts b/src/management/api/resources/connections/resources/scimConfiguration/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/connections/resources/scimConfiguration/client/index.ts +++ b/src/management/api/resources/connections/resources/scimConfiguration/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/connections/resources/scimConfiguration/client/requests/UpdateScimConfigurationRequestContent.ts b/src/management/api/resources/connections/resources/scimConfiguration/client/requests/UpdateScimConfigurationRequestContent.ts deleted file mode 100644 index f28f140e11..0000000000 --- a/src/management/api/resources/connections/resources/scimConfiguration/client/requests/UpdateScimConfigurationRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * user_id_attribute: "user_id_attribute", - * mapping: [{}] - * } - */ -export interface UpdateScimConfigurationRequestContent { - /** User ID attribute for generating unique user ids */ - user_id_attribute: string; - /** The mapping between auth0 and SCIM */ - mapping: Management.ScimMappingItem[]; -} diff --git a/src/management/api/resources/connections/resources/scimConfiguration/client/requests/index.ts b/src/management/api/resources/connections/resources/scimConfiguration/client/requests/index.ts deleted file mode 100644 index 5f0f532734..0000000000 --- a/src/management/api/resources/connections/resources/scimConfiguration/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateScimConfigurationRequestContent } from "./UpdateScimConfigurationRequestContent.js"; diff --git a/src/management/api/resources/connections/resources/scimConfiguration/resources/index.ts b/src/management/api/resources/connections/resources/scimConfiguration/resources/index.ts index 258b1f1b2e..cc89966bbd 100644 --- a/src/management/api/resources/connections/resources/scimConfiguration/resources/index.ts +++ b/src/management/api/resources/connections/resources/scimConfiguration/resources/index.ts @@ -1,2 +1 @@ export * as tokens from "./tokens/index.js"; -export * from "./tokens/client/requests/index.js"; diff --git a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.ts b/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.ts index 21caf61364..a2e133ee16 100644 --- a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.ts +++ b/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Tokens { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Tokens { @@ -63,9 +43,12 @@ export class Tokens { id: string, requestOptions?: Tokens.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:scim_token"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -73,14 +56,15 @@ export class Tokens { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration/tokens`, + `connections/${core.url.encodePathParam(id)}/scim-configuration/tokens`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -150,9 +134,12 @@ export class Tokens { request: Management.CreateScimTokenRequestContent = {}, requestOptions?: Tokens.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:scim_token"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -160,7 +147,7 @@ export class Tokens { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration/tokens`, + `connections/${core.url.encodePathParam(id)}/scim-configuration/tokens`, ), method: "POST", headers: _headers, @@ -168,9 +155,10 @@ export class Tokens { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -237,9 +225,12 @@ export class Tokens { tokenId: string, requestOptions?: Tokens.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:scim_token"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -247,14 +238,15 @@ export class Tokens { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/scim-configuration/tokens/${encodeURIComponent(tokenId)}`, + `connections/${core.url.encodePathParam(id)}/scim-configuration/tokens/${core.url.encodePathParam(tokenId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -294,7 +286,7 @@ export class Tokens { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/index.ts b/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/index.ts +++ b/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/requests/CreateScimTokenRequestContent.ts b/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/requests/CreateScimTokenRequestContent.ts deleted file mode 100644 index 6db2eaf2fd..0000000000 --- a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/requests/CreateScimTokenRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface CreateScimTokenRequestContent { - /** The scopes of the scim token */ - scopes?: string[]; - /** Lifetime of the token in seconds. Must be greater than 900 */ - token_lifetime?: number; -} diff --git a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/requests/index.ts b/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/requests/index.ts deleted file mode 100644 index 992500f316..0000000000 --- a/src/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateScimTokenRequestContent } from "./CreateScimTokenRequestContent.js"; 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 a59a4614b1..41e1ae6ce3 100644 --- a/src/management/api/resources/connections/resources/users/client/Client.ts +++ b/src/management/api/resources/connections/resources/users/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Users { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Users { @@ -70,12 +50,15 @@ export class Users { request: Management.DeleteConnectionUsersByEmailQueryParameters, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:users"] }], + }; const { email } = request; const _queryParams: Record = {}; _queryParams["email"] = email; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -83,14 +66,15 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `connections/${encodeURIComponent(id)}/users`, + `connections/${core.url.encodePathParam(id)}/users`, ), method: "DELETE", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -134,7 +118,7 @@ export class Users { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/connections/resources/users/client/index.ts b/src/management/api/resources/connections/resources/users/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/connections/resources/users/client/index.ts +++ b/src/management/api/resources/connections/resources/users/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/connections/resources/users/client/requests/DeleteConnectionUsersByEmailQueryParameters.ts b/src/management/api/resources/connections/resources/users/client/requests/DeleteConnectionUsersByEmailQueryParameters.ts deleted file mode 100644 index a5accd1b93..0000000000 --- a/src/management/api/resources/connections/resources/users/client/requests/DeleteConnectionUsersByEmailQueryParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * email: "email" - * } - */ -export interface DeleteConnectionUsersByEmailQueryParameters { - /** The email of the user to delete */ - email: string; -} diff --git a/src/management/api/resources/connections/resources/users/client/requests/index.ts b/src/management/api/resources/connections/resources/users/client/requests/index.ts deleted file mode 100644 index c621f7d6d6..0000000000 --- a/src/management/api/resources/connections/resources/users/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type DeleteConnectionUsersByEmailQueryParameters } from "./DeleteConnectionUsersByEmailQueryParameters.js"; diff --git a/src/management/api/resources/customDomains/client/Client.ts b/src/management/api/resources/customDomains/client/Client.ts index 4df37680ec..b26d4d3c11 100644 --- a/src/management/api/resources/customDomains/client/Client.ts +++ b/src/management/api/resources/customDomains/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace CustomDomains { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class CustomDomains { @@ -61,9 +41,12 @@ export class CustomDomains { private async __list( requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class CustomDomains { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -163,9 +147,12 @@ export class CustomDomains { request: Management.CreateCustomDomainRequestContent, requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -181,9 +168,10 @@ export class CustomDomains { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -256,9 +244,12 @@ export class CustomDomains { id: string, requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -266,14 +257,15 @@ export class CustomDomains { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `custom-domains/${encodeURIComponent(id)}`, + `custom-domains/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -342,9 +334,12 @@ export class CustomDomains { id: string, requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -352,14 +347,15 @@ export class CustomDomains { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `custom-domains/${encodeURIComponent(id)}`, + `custom-domains/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -452,9 +448,12 @@ export class CustomDomains { request: Management.UpdateCustomDomainRequestContent = {}, requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -462,7 +461,7 @@ export class CustomDomains { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `custom-domains/${encodeURIComponent(id)}`, + `custom-domains/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -470,9 +469,10 @@ export class CustomDomains { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -543,9 +543,12 @@ export class CustomDomains { id: string, requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -553,14 +556,15 @@ export class CustomDomains { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `custom-domains/${encodeURIComponent(id)}/test`, + `custom-domains/${core.url.encodePathParam(id)}/test`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -642,9 +646,12 @@ export class CustomDomains { id: string, requestOptions?: CustomDomains.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:custom_domains"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -652,14 +659,15 @@ export class CustomDomains { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `custom-domains/${encodeURIComponent(id)}/verify`, + `custom-domains/${core.url.encodePathParam(id)}/verify`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -708,7 +716,7 @@ export class CustomDomains { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/customDomains/client/index.ts b/src/management/api/resources/customDomains/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/customDomains/client/index.ts +++ b/src/management/api/resources/customDomains/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/customDomains/client/requests/CreateCustomDomainRequestContent.ts b/src/management/api/resources/customDomains/client/requests/CreateCustomDomainRequestContent.ts deleted file mode 100644 index 5e88a3bfc4..0000000000 --- a/src/management/api/resources/customDomains/client/requests/CreateCustomDomainRequestContent.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * domain: "domain", - * type: "auth0_managed_certs" - * } - */ -export interface CreateCustomDomainRequestContent { - /** Domain name. */ - domain: string; - type: Management.CustomDomainProvisioningTypeEnum; - verification_method?: Management.CustomDomainVerificationMethodEnum; - tls_policy?: Management.CustomDomainTlsPolicyEnum; - custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined; -} diff --git a/src/management/api/resources/customDomains/client/requests/UpdateCustomDomainRequestContent.ts b/src/management/api/resources/customDomains/client/requests/UpdateCustomDomainRequestContent.ts deleted file mode 100644 index 891f3a3b99..0000000000 --- a/src/management/api/resources/customDomains/client/requests/UpdateCustomDomainRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateCustomDomainRequestContent { - tls_policy?: Management.CustomDomainTlsPolicyEnum; - custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined; -} diff --git a/src/management/api/resources/customDomains/client/requests/index.ts b/src/management/api/resources/customDomains/client/requests/index.ts deleted file mode 100644 index 95decabd30..0000000000 --- a/src/management/api/resources/customDomains/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type CreateCustomDomainRequestContent } from "./CreateCustomDomainRequestContent.js"; -export { type UpdateCustomDomainRequestContent } from "./UpdateCustomDomainRequestContent.js"; diff --git a/src/management/api/resources/deviceCredentials/client/Client.ts b/src/management/api/resources/deviceCredentials/client/Client.ts index cc5046bf76..cf41da2d8d 100644 --- a/src/management/api/resources/deviceCredentials/client/Client.ts +++ b/src/management/api/resources/deviceCredentials/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace DeviceCredentials { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class DeviceCredentials { @@ -52,16 +32,28 @@ export class DeviceCredentials { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.deviceCredentials.list() + * await client.deviceCredentials.list({ + * page: 1, + * per_page: 1, + * include_totals: true, + * fields: "fields", + * include_fields: true, + * user_id: "user_id", + * client_id: "client_id", + * type: "public_key" + * }) */ public async list( request: Management.ListDeviceCredentialsRequestParameters = {}, requestOptions?: DeviceCredentials.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListDeviceCredentialsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:device_credentials"] }], + }; const { page = 0, per_page: perPage = 50, @@ -73,33 +65,33 @@ export class DeviceCredentials { type: type_, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } - if (userId != null) { + if (userId !== undefined) { _queryParams["user_id"] = userId; } - if (clientId != null) { + if (clientId !== undefined) { _queryParams["client_id"] = clientId; } - if (type_ != null) { + if (type_ !== undefined) { _queryParams["type"] = type_; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -112,10 +104,10 @@ export class DeviceCredentials { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -171,9 +163,9 @@ export class DeviceCredentials { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListDeviceCredentialsOffsetPaginatedResponseContent, - Management.DeviceCredential + return new core.Page< + Management.DeviceCredential, + Management.ListDeviceCredentialsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -218,9 +210,12 @@ export class DeviceCredentials { request: Management.CreatePublicKeyDeviceCredentialRequestContent, requestOptions?: DeviceCredentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:current_user_device_credentials"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -236,9 +231,10 @@ export class DeviceCredentials { queryParameters: requestOptions?.queryParams, requestType: "json", body: { ...request, type: "public_key" }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -307,9 +303,15 @@ export class DeviceCredentials { id: string, requestOptions?: DeviceCredentials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["delete:device_credentials", "delete:current_user_device_credentials"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -317,14 +319,15 @@ export class DeviceCredentials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `device-credentials/${encodeURIComponent(id)}`, + `device-credentials/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -368,7 +371,7 @@ export class DeviceCredentials { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/deviceCredentials/client/index.ts b/src/management/api/resources/deviceCredentials/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/deviceCredentials/client/index.ts +++ b/src/management/api/resources/deviceCredentials/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/deviceCredentials/client/requests/CreatePublicKeyDeviceCredentialRequestContent.ts b/src/management/api/resources/deviceCredentials/client/requests/CreatePublicKeyDeviceCredentialRequestContent.ts deleted file mode 100644 index 6545d352db..0000000000 --- a/src/management/api/resources/deviceCredentials/client/requests/CreatePublicKeyDeviceCredentialRequestContent.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * device_name: "device_name", - * value: "value", - * device_id: "device_id" - * } - */ -export interface CreatePublicKeyDeviceCredentialRequestContent { - /** Name for this device easily recognized by owner. */ - device_name: string; - /** Base64 encoded string containing the credential. */ - value: string; - /** Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor. */ - device_id: string; - /** client_id of the client (application) this credential is for. */ - client_id?: string; -} diff --git a/src/management/api/resources/deviceCredentials/client/requests/ListDeviceCredentialsRequestParameters.ts b/src/management/api/resources/deviceCredentials/client/requests/ListDeviceCredentialsRequestParameters.ts deleted file mode 100644 index 92fe296ae6..0000000000 --- a/src/management/api/resources/deviceCredentials/client/requests/ListDeviceCredentialsRequestParameters.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListDeviceCredentialsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. There is a maximum of 1000 results allowed from this endpoint. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; - /** user_id of the devices to retrieve. */ - user_id?: string; - /** client_id of the devices to retrieve. */ - client_id?: string; - /** Type of credentials to retrieve. Must be `public_key`, `refresh_token` or `rotating_refresh_token`. The property will default to `refresh_token` when paging is requested */ - type?: Management.DeviceCredentialTypeEnum; -} diff --git a/src/management/api/resources/deviceCredentials/client/requests/index.ts b/src/management/api/resources/deviceCredentials/client/requests/index.ts deleted file mode 100644 index f1a2d42373..0000000000 --- a/src/management/api/resources/deviceCredentials/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListDeviceCredentialsRequestParameters } from "./ListDeviceCredentialsRequestParameters.js"; -export { type CreatePublicKeyDeviceCredentialRequestContent } from "./CreatePublicKeyDeviceCredentialRequestContent.js"; diff --git a/src/management/api/resources/emailTemplates/client/Client.ts b/src/management/api/resources/emailTemplates/client/Client.ts index 87ab6dd429..2094717857 100644 --- a/src/management/api/resources/emailTemplates/client/Client.ts +++ b/src/management/api/resources/emailTemplates/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace EmailTemplates { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class EmailTemplates { @@ -68,9 +48,12 @@ export class EmailTemplates { request: Management.CreateEmailTemplateRequestContent, requestOptions?: EmailTemplates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:email_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,9 +69,10 @@ export class EmailTemplates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -160,9 +144,12 @@ export class EmailTemplates { templateName: Management.EmailTemplateNameEnum, requestOptions?: EmailTemplates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:email_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -170,14 +157,15 @@ export class EmailTemplates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `email-templates/${encodeURIComponent(templateName)}`, + `email-templates/${core.url.encodePathParam(templateName)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -255,9 +243,12 @@ export class EmailTemplates { request: Management.SetEmailTemplateRequestContent, requestOptions?: EmailTemplates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:email_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -265,7 +256,7 @@ export class EmailTemplates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `email-templates/${encodeURIComponent(templateName)}`, + `email-templates/${core.url.encodePathParam(templateName)}`, ), method: "PUT", headers: _headers, @@ -273,9 +264,10 @@ export class EmailTemplates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -353,9 +345,12 @@ export class EmailTemplates { request: Management.UpdateEmailTemplateRequestContent = {}, requestOptions?: EmailTemplates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:email_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -363,7 +358,7 @@ export class EmailTemplates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `email-templates/${encodeURIComponent(templateName)}`, + `email-templates/${core.url.encodePathParam(templateName)}`, ), method: "PATCH", headers: _headers, @@ -371,9 +366,10 @@ export class EmailTemplates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -422,7 +418,7 @@ export class EmailTemplates { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/emailTemplates/client/index.ts b/src/management/api/resources/emailTemplates/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/emailTemplates/client/index.ts +++ b/src/management/api/resources/emailTemplates/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/emailTemplates/client/requests/CreateEmailTemplateRequestContent.ts b/src/management/api/resources/emailTemplates/client/requests/CreateEmailTemplateRequestContent.ts deleted file mode 100644 index b2a1a53647..0000000000 --- a/src/management/api/resources/emailTemplates/client/requests/CreateEmailTemplateRequestContent.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * template: "verify_email" - * } - */ -export interface CreateEmailTemplateRequestContent { - template: Management.EmailTemplateNameEnum; - /** Body of the email template. */ - body?: string; - /** Senders `from` email address. */ - from?: string; - /** URL to redirect the user to after a successful action. */ - resultUrl?: string; - /** Subject line of the email. */ - subject?: string; - /** Syntax of the template body. */ - syntax?: string; - /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; - /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ - includeEmailInRedirect?: boolean; - /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; -} diff --git a/src/management/api/resources/emailTemplates/client/requests/SetEmailTemplateRequestContent.ts b/src/management/api/resources/emailTemplates/client/requests/SetEmailTemplateRequestContent.ts deleted file mode 100644 index f0f4ac08b9..0000000000 --- a/src/management/api/resources/emailTemplates/client/requests/SetEmailTemplateRequestContent.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * template: "verify_email" - * } - */ -export interface SetEmailTemplateRequestContent { - template: Management.EmailTemplateNameEnum; - /** Body of the email template. */ - body?: string; - /** Senders `from` email address. */ - from?: string; - /** URL to redirect the user to after a successful action. */ - resultUrl?: string; - /** Subject line of the email. */ - subject?: string; - /** Syntax of the template body. */ - syntax?: string; - /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; - /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ - includeEmailInRedirect?: boolean; - /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; -} diff --git a/src/management/api/resources/emailTemplates/client/requests/UpdateEmailTemplateRequestContent.ts b/src/management/api/resources/emailTemplates/client/requests/UpdateEmailTemplateRequestContent.ts deleted file mode 100644 index 6614b6c738..0000000000 --- a/src/management/api/resources/emailTemplates/client/requests/UpdateEmailTemplateRequestContent.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateEmailTemplateRequestContent { - template?: Management.EmailTemplateNameEnum; - /** Body of the email template. */ - body?: string; - /** Senders `from` email address. */ - from?: string; - /** URL to redirect the user to after a successful action. */ - resultUrl?: string; - /** Subject line of the email. */ - subject?: string; - /** Syntax of the template body. */ - syntax?: string; - /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; - /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ - includeEmailInRedirect?: boolean; - /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; -} diff --git a/src/management/api/resources/emailTemplates/client/requests/index.ts b/src/management/api/resources/emailTemplates/client/requests/index.ts deleted file mode 100644 index 9190944e38..0000000000 --- a/src/management/api/resources/emailTemplates/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type CreateEmailTemplateRequestContent } from "./CreateEmailTemplateRequestContent.js"; -export { type SetEmailTemplateRequestContent } from "./SetEmailTemplateRequestContent.js"; -export { type UpdateEmailTemplateRequestContent } from "./UpdateEmailTemplateRequestContent.js"; diff --git a/src/management/api/resources/emails/client/Client.ts b/src/management/api/resources/emails/client/Client.ts index 7211bb0ec8..7d152d1e1c 100644 --- a/src/management/api/resources/emails/client/Client.ts +++ b/src/management/api/resources/emails/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { Provider } from "../resources/provider/client/Client.js"; export declare namespace Emails { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Emails { diff --git a/src/management/api/resources/emails/resources/index.ts b/src/management/api/resources/emails/resources/index.ts index 6e47bb30e1..2abe486639 100644 --- a/src/management/api/resources/emails/resources/index.ts +++ b/src/management/api/resources/emails/resources/index.ts @@ -1,2 +1 @@ export * as provider from "./provider/index.js"; -export * from "./provider/client/requests/index.js"; 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 ea2607086c..00ae8b0b9e 100644 --- a/src/management/api/resources/emails/resources/provider/client/Client.ts +++ b/src/management/api/resources/emails/resources/provider/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Provider { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Provider { @@ -53,7 +33,10 @@ export class Provider { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.emails.provider.get() + * await client.emails.provider.get({ + * fields: "fields", + * include_fields: true + * }) */ public get( request: Management.GetEmailProviderRequestParameters = {}, @@ -66,19 +49,22 @@ export class Provider { request: Management.GetEmailProviderRequestParameters = {}, requestOptions?: Provider.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:email_provider"] }], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -91,9 +77,10 @@ export class Provider { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -212,9 +199,12 @@ export class Provider { request: Management.CreateEmailProviderRequestContent, requestOptions?: Provider.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:email_provider"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -230,9 +220,10 @@ export class Provider { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -298,9 +289,12 @@ export class Provider { } private async __delete(requestOptions?: Provider.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:email_provider"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -313,9 +307,10 @@ export class Provider { method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -425,9 +420,12 @@ export class Provider { request: Management.UpdateEmailProviderRequestContent = {}, requestOptions?: Provider.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:email_provider"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -443,9 +441,10 @@ export class Provider { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -494,7 +493,7 @@ export class Provider { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/emails/resources/provider/client/index.ts b/src/management/api/resources/emails/resources/provider/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/emails/resources/provider/client/index.ts +++ b/src/management/api/resources/emails/resources/provider/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/emails/resources/provider/client/requests/CreateEmailProviderRequestContent.ts b/src/management/api/resources/emails/resources/provider/client/requests/CreateEmailProviderRequestContent.ts deleted file mode 100644 index 9ab168561e..0000000000 --- a/src/management/api/resources/emails/resources/provider/client/requests/CreateEmailProviderRequestContent.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * name: "mailgun", - * credentials: { - * api_key: "api_key" - * } - * } - */ -export interface CreateEmailProviderRequestContent { - name: Management.EmailProviderNameEnum; - /** Whether the provider is enabled (true) or disabled (false). */ - enabled?: boolean; - /** Email address to use as "from" when no other address specified. */ - default_from_address?: string; - credentials: Management.EmailProviderCredentialsSchema; - settings?: Management.EmailSpecificProviderSettingsWithAdditionalProperties | undefined; -} diff --git a/src/management/api/resources/emails/resources/provider/client/requests/GetEmailProviderRequestParameters.ts b/src/management/api/resources/emails/resources/provider/client/requests/GetEmailProviderRequestParameters.ts deleted file mode 100644 index 804e035345..0000000000 --- a/src/management/api/resources/emails/resources/provider/client/requests/GetEmailProviderRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetEmailProviderRequestParameters { - /** Comma-separated list of fields to include or exclude (dependent upon include_fields) from the result. Leave empty to retrieve `name` and `enabled`. Additional fields available include `credentials`, `default_from_address`, and `settings`. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/emails/resources/provider/client/requests/UpdateEmailProviderRequestContent.ts b/src/management/api/resources/emails/resources/provider/client/requests/UpdateEmailProviderRequestContent.ts deleted file mode 100644 index 7a3af2cf85..0000000000 --- a/src/management/api/resources/emails/resources/provider/client/requests/UpdateEmailProviderRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateEmailProviderRequestContent { - name?: Management.EmailProviderNameEnum; - /** Whether the provider is enabled (true) or disabled (false). */ - enabled?: boolean; - /** Email address to use as "from" when no other address specified. */ - default_from_address?: string; - credentials?: Management.EmailProviderCredentialsSchema; - settings?: Management.EmailSpecificProviderSettingsWithAdditionalProperties | undefined; -} diff --git a/src/management/api/resources/emails/resources/provider/client/requests/index.ts b/src/management/api/resources/emails/resources/provider/client/requests/index.ts deleted file mode 100644 index 508e4dd291..0000000000 --- a/src/management/api/resources/emails/resources/provider/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type GetEmailProviderRequestParameters } from "./GetEmailProviderRequestParameters.js"; -export { type CreateEmailProviderRequestContent } from "./CreateEmailProviderRequestContent.js"; -export { type UpdateEmailProviderRequestContent } from "./UpdateEmailProviderRequestContent.js"; diff --git a/src/management/api/resources/eventStreams/client/Client.ts b/src/management/api/resources/eventStreams/client/Client.ts index 469e83ee09..c4fcb28a3a 100644 --- a/src/management/api/resources/eventStreams/client/Client.ts +++ b/src/management/api/resources/eventStreams/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -11,28 +10,9 @@ import { Deliveries } from "../resources/deliveries/client/Client.js"; import { Redeliveries } from "../resources/redeliveries/client/Client.js"; export declare namespace EventStreams { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class EventStreams { @@ -62,7 +42,10 @@ export class EventStreams { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.eventStreams.list() + * await client.eventStreams.list({ + * from: "from", + * take: 1 + * }) */ public list( request: Management.ListEventStreamsRequestParameters = {}, @@ -75,19 +58,22 @@ export class EventStreams { request: Management.ListEventStreamsRequestParameters = {}, requestOptions?: EventStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:event_streams"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -100,9 +86,10 @@ export class EventStreams { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -182,9 +169,12 @@ export class EventStreams { request: Management.EventStreamsCreateRequest, requestOptions?: EventStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:event_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -200,9 +190,10 @@ export class EventStreams { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -272,9 +263,12 @@ export class EventStreams { id: string, requestOptions?: EventStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:event_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -282,14 +276,15 @@ export class EventStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}`, + `event-streams/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -354,9 +349,12 @@ export class EventStreams { id: string, requestOptions?: EventStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:event_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -364,14 +362,15 @@ export class EventStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}`, + `event-streams/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -439,9 +438,12 @@ export class EventStreams { request: Management.UpdateEventStreamRequestContent = {}, requestOptions?: EventStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:event_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -449,7 +451,7 @@ export class EventStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}`, + `event-streams/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -457,9 +459,10 @@ export class EventStreams { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -531,9 +534,12 @@ export class EventStreams { request: Management.CreateEventStreamTestEventRequestContent, requestOptions?: EventStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:event_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -541,7 +547,7 @@ export class EventStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}/test`, + `event-streams/${core.url.encodePathParam(id)}/test`, ), method: "POST", headers: _headers, @@ -549,9 +555,10 @@ export class EventStreams { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -594,7 +601,7 @@ export class EventStreams { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/eventStreams/client/index.ts b/src/management/api/resources/eventStreams/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/eventStreams/client/index.ts +++ b/src/management/api/resources/eventStreams/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/eventStreams/client/requests/CreateEventStreamTestEventRequestContent.ts b/src/management/api/resources/eventStreams/client/requests/CreateEventStreamTestEventRequestContent.ts deleted file mode 100644 index a3d81d6697..0000000000 --- a/src/management/api/resources/eventStreams/client/requests/CreateEventStreamTestEventRequestContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * event_type: "user.created" - * } - */ -export interface CreateEventStreamTestEventRequestContent { - event_type: Management.EventStreamTestEventTypeEnum; - data?: Management.TestEventDataContent; -} diff --git a/src/management/api/resources/eventStreams/client/requests/ListEventStreamsRequestParameters.ts b/src/management/api/resources/eventStreams/client/requests/ListEventStreamsRequestParameters.ts deleted file mode 100644 index 3fa9ea36be..0000000000 --- a/src/management/api/resources/eventStreams/client/requests/ListEventStreamsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListEventStreamsRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/eventStreams/client/requests/UpdateEventStreamRequestContent.ts b/src/management/api/resources/eventStreams/client/requests/UpdateEventStreamRequestContent.ts deleted file mode 100644 index 071452ca59..0000000000 --- a/src/management/api/resources/eventStreams/client/requests/UpdateEventStreamRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateEventStreamRequestContent { - /** Name of the event stream. */ - name?: string; - /** List of event types subscribed to in this stream. */ - subscriptions?: Management.EventStreamSubscription[]; - destination?: Management.EventStreamDestinationPatch; - status?: Management.EventStreamStatusEnum; -} diff --git a/src/management/api/resources/eventStreams/client/requests/index.ts b/src/management/api/resources/eventStreams/client/requests/index.ts deleted file mode 100644 index 049f0fea99..0000000000 --- a/src/management/api/resources/eventStreams/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListEventStreamsRequestParameters } from "./ListEventStreamsRequestParameters.js"; -export { type UpdateEventStreamRequestContent } from "./UpdateEventStreamRequestContent.js"; -export { type CreateEventStreamTestEventRequestContent } from "./CreateEventStreamTestEventRequestContent.js"; 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 a8a99d7b7a..ee5041bccd 100644 --- a/src/management/api/resources/eventStreams/resources/deliveries/client/Client.ts +++ b/src/management/api/resources/eventStreams/resources/deliveries/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Deliveries { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Deliveries { @@ -52,7 +32,14 @@ export class Deliveries { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.eventStreams.deliveries.list("id") + * await client.eventStreams.deliveries.list("id", { + * statuses: "statuses", + * event_types: "event_types", + * date_from: "date_from", + * date_to: "date_to", + * from: "from", + * take: 1 + * }) */ public list( id: string, @@ -67,6 +54,12 @@ export class Deliveries { request: Management.ListEventStreamDeliveriesRequestParameters = {}, requestOptions?: Deliveries.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:event_streams", "read:event_deliveries"] }, + ], + }; const { statuses, event_types: eventTypes, @@ -76,33 +69,33 @@ export class Deliveries { take = 50, } = request; const _queryParams: Record = {}; - if (statuses != null) { + if (statuses !== undefined) { _queryParams["statuses"] = statuses; } - if (eventTypes != null) { + if (eventTypes !== undefined) { _queryParams["event_types"] = eventTypes; } - if (dateFrom != null) { + if (dateFrom !== undefined) { _queryParams["date_from"] = dateFrom; } - if (dateTo != null) { + if (dateTo !== undefined) { _queryParams["date_to"] = dateTo; } - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -110,14 +103,15 @@ export class Deliveries { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}/deliveries`, + `event-streams/${core.url.encodePathParam(id)}/deliveries`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.EventStreamDelivery[], rawResponse: _response.rawResponse }; @@ -189,9 +183,12 @@ export class Deliveries { eventId: string, requestOptions?: Deliveries.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:event_deliveries"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -199,14 +196,15 @@ export class Deliveries { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}/deliveries/${encodeURIComponent(eventId)}`, + `event-streams/${core.url.encodePathParam(id)}/deliveries/${core.url.encodePathParam(eventId)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -253,7 +251,7 @@ export class Deliveries { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/eventStreams/resources/deliveries/client/index.ts b/src/management/api/resources/eventStreams/resources/deliveries/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/eventStreams/resources/deliveries/client/index.ts +++ b/src/management/api/resources/eventStreams/resources/deliveries/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/eventStreams/resources/deliveries/client/requests/ListEventStreamDeliveriesRequestParameters.ts b/src/management/api/resources/eventStreams/resources/deliveries/client/requests/ListEventStreamDeliveriesRequestParameters.ts deleted file mode 100644 index 1dcaf94e24..0000000000 --- a/src/management/api/resources/eventStreams/resources/deliveries/client/requests/ListEventStreamDeliveriesRequestParameters.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListEventStreamDeliveriesRequestParameters { - /** Comma-separated list of statuses by which to filter */ - statuses?: string; - /** Comma-separated list of event types by which to filter */ - event_types?: string; - /** An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. */ - date_from?: string; - /** An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. */ - date_to?: string; - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/eventStreams/resources/deliveries/client/requests/index.ts b/src/management/api/resources/eventStreams/resources/deliveries/client/requests/index.ts deleted file mode 100644 index 4d48b8c5b9..0000000000 --- a/src/management/api/resources/eventStreams/resources/deliveries/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListEventStreamDeliveriesRequestParameters } from "./ListEventStreamDeliveriesRequestParameters.js"; diff --git a/src/management/api/resources/eventStreams/resources/index.ts b/src/management/api/resources/eventStreams/resources/index.ts index e50d7d65db..2e92b9b01b 100644 --- a/src/management/api/resources/eventStreams/resources/index.ts +++ b/src/management/api/resources/eventStreams/resources/index.ts @@ -1,4 +1,2 @@ export * as deliveries from "./deliveries/index.js"; export * as redeliveries from "./redeliveries/index.js"; -export * from "./deliveries/client/requests/index.js"; -export * from "./redeliveries/client/requests/index.js"; diff --git a/src/management/api/resources/eventStreams/resources/redeliveries/client/Client.ts b/src/management/api/resources/eventStreams/resources/redeliveries/client/Client.ts index e923618d00..e7d0de455a 100644 --- a/src/management/api/resources/eventStreams/resources/redeliveries/client/Client.ts +++ b/src/management/api/resources/eventStreams/resources/redeliveries/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Redeliveries { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Redeliveries { @@ -67,9 +47,12 @@ export class Redeliveries { request: Management.CreateEventStreamRedeliveryRequestContent = {}, requestOptions?: Redeliveries.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:event_deliveries"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -77,7 +60,7 @@ export class Redeliveries { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}/redeliver`, + `event-streams/${core.url.encodePathParam(id)}/redeliver`, ), method: "POST", headers: _headers, @@ -85,9 +68,10 @@ export class Redeliveries { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -163,9 +147,12 @@ export class Redeliveries { eventId: string, requestOptions?: Redeliveries.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:event_deliveries"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -173,14 +160,15 @@ export class Redeliveries { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `event-streams/${encodeURIComponent(id)}/redeliver/${encodeURIComponent(eventId)}`, + `event-streams/${core.url.encodePathParam(id)}/redeliver/${core.url.encodePathParam(eventId)}`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -226,7 +214,7 @@ export class Redeliveries { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/eventStreams/resources/redeliveries/client/index.ts b/src/management/api/resources/eventStreams/resources/redeliveries/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/eventStreams/resources/redeliveries/client/index.ts +++ b/src/management/api/resources/eventStreams/resources/redeliveries/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/eventStreams/resources/redeliveries/client/requests/CreateEventStreamRedeliveryRequestContent.ts b/src/management/api/resources/eventStreams/resources/redeliveries/client/requests/CreateEventStreamRedeliveryRequestContent.ts deleted file mode 100644 index 2836f7e897..0000000000 --- a/src/management/api/resources/eventStreams/resources/redeliveries/client/requests/CreateEventStreamRedeliveryRequestContent.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface CreateEventStreamRedeliveryRequestContent { - /** An RFC-3339 date-time for redelivery start, inclusive. Does not allow sub-second precision. */ - date_from?: string; - /** An RFC-3339 date-time for redelivery end, exclusive. Does not allow sub-second precision. */ - date_to?: string; - /** Filter by status */ - statuses?: Management.EventStreamDeliveryStatusEnum[]; - /** Filter by event type */ - event_types?: Management.EventStreamEventTypeEnum[]; -} diff --git a/src/management/api/resources/eventStreams/resources/redeliveries/client/requests/index.ts b/src/management/api/resources/eventStreams/resources/redeliveries/client/requests/index.ts deleted file mode 100644 index d3841ef640..0000000000 --- a/src/management/api/resources/eventStreams/resources/redeliveries/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateEventStreamRedeliveryRequestContent } from "./CreateEventStreamRedeliveryRequestContent.js"; diff --git a/src/management/api/resources/eventStreams/types/EventStreamsCreateRequest.ts b/src/management/api/resources/eventStreams/types/EventStreamsCreateRequest.ts index 485f4b9d77..bbd8d22d7c 100644 --- a/src/management/api/resources/eventStreams/types/EventStreamsCreateRequest.ts +++ b/src/management/api/resources/eventStreams/types/EventStreamsCreateRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../../../index.js"; diff --git a/src/management/api/resources/flows/client/Client.ts b/src/management/api/resources/flows/client/Client.ts index 9c5d872419..af3247fd86 100644 --- a/src/management/api/resources/flows/client/Client.ts +++ b/src/management/api/resources/flows/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -11,28 +10,9 @@ import { Executions } from "../resources/executions/client/Client.js"; import { Vault } from "../resources/vault/client/Client.js"; export declare namespace Flows { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Flows { @@ -62,16 +42,24 @@ export class Flows { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.flows.list() + * await client.flows.list({ + * page: 1, + * per_page: 1, + * include_totals: true, + * synchronous: true + * }) */ public async list( request: Management.FlowsListRequest = {}, requestOptions?: Flows.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.FlowsListRequest, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:flows"] }], + }; const { page = 0, per_page: perPage = 50, @@ -80,28 +68,28 @@ export class Flows { synchronous, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (hydrate != null) { + if (hydrate !== undefined) { if (Array.isArray(hydrate)) { _queryParams["hydrate"] = hydrate.map((item) => item); } else { _queryParams["hydrate"] = hydrate; } } - if (synchronous != null) { - _queryParams["synchronous"] = synchronous.toString(); + if (synchronous !== undefined) { + _queryParams["synchronous"] = synchronous?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -114,10 +102,10 @@ export class Flows { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -171,7 +159,7 @@ export class Flows { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.flows ?? []).length > 0, @@ -208,9 +196,12 @@ export class Flows { request: Management.CreateFlowRequestContent, requestOptions?: Flows.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:flows"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -226,9 +217,10 @@ export class Flows { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.CreateFlowResponseContent, rawResponse: _response.rawResponse }; @@ -297,9 +289,12 @@ export class Flows { request: Management.GetFlowRequestParameters = {}, requestOptions?: Flows.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:flows"] }], + }; const { hydrate } = request; const _queryParams: Record = {}; - if (hydrate != null) { + if (hydrate !== undefined) { if (Array.isArray(hydrate)) { _queryParams["hydrate"] = hydrate.map((item) => item); } else { @@ -309,7 +304,7 @@ export class Flows { let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -317,14 +312,15 @@ export class Flows { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/${encodeURIComponent(id)}`, + `flows/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetFlowResponseContent, rawResponse: _response.rawResponse }; @@ -386,9 +382,12 @@ export class Flows { } private async __delete(id: string, requestOptions?: Flows.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:flows"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -396,14 +395,15 @@ export class Flows { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/${encodeURIComponent(id)}`, + `flows/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -473,9 +473,12 @@ export class Flows { request: Management.UpdateFlowRequestContent = {}, requestOptions?: Flows.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:flows"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -483,7 +486,7 @@ export class Flows { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/${encodeURIComponent(id)}`, + `flows/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -491,9 +494,10 @@ export class Flows { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateFlowResponseContent, rawResponse: _response.rawResponse }; @@ -535,7 +539,7 @@ export class Flows { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/flows/client/index.ts b/src/management/api/resources/flows/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/flows/client/index.ts +++ b/src/management/api/resources/flows/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/flows/client/requests/CreateFlowRequestContent.ts b/src/management/api/resources/flows/client/requests/CreateFlowRequestContent.ts deleted file mode 100644 index 575ad74c84..0000000000 --- a/src/management/api/resources/flows/client/requests/CreateFlowRequestContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name" - * } - */ -export interface CreateFlowRequestContent { - name: string; - actions?: Management.FlowAction[]; -} diff --git a/src/management/api/resources/flows/client/requests/FlowsListRequest.ts b/src/management/api/resources/flows/client/requests/FlowsListRequest.ts deleted file mode 100644 index cc9fe7729c..0000000000 --- a/src/management/api/resources/flows/client/requests/FlowsListRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface FlowsListRequest { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** hydration param */ - hydrate?: "form_count" | "form_count"[]; - /** flag to filter by sync/async flows */ - synchronous?: boolean; -} diff --git a/src/management/api/resources/flows/client/requests/GetFlowRequestParameters.ts b/src/management/api/resources/flows/client/requests/GetFlowRequestParameters.ts deleted file mode 100644 index d185e533fa..0000000000 --- a/src/management/api/resources/flows/client/requests/GetFlowRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface GetFlowRequestParameters { - /** hydration param */ - hydrate?: Management.GetFlowRequestParametersHydrateEnum | Management.GetFlowRequestParametersHydrateEnum[]; -} diff --git a/src/management/api/resources/flows/client/requests/UpdateFlowRequestContent.ts b/src/management/api/resources/flows/client/requests/UpdateFlowRequestContent.ts deleted file mode 100644 index db7c12481e..0000000000 --- a/src/management/api/resources/flows/client/requests/UpdateFlowRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateFlowRequestContent { - name?: string; - actions?: Management.FlowAction[]; -} diff --git a/src/management/api/resources/flows/client/requests/index.ts b/src/management/api/resources/flows/client/requests/index.ts deleted file mode 100644 index c7fa258e7c..0000000000 --- a/src/management/api/resources/flows/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type FlowsListRequest } from "./FlowsListRequest.js"; -export { type CreateFlowRequestContent } from "./CreateFlowRequestContent.js"; -export { type GetFlowRequestParameters } from "./GetFlowRequestParameters.js"; -export { type UpdateFlowRequestContent } from "./UpdateFlowRequestContent.js"; 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 ecc92d9ed8..eea4a1a927 100644 --- a/src/management/api/resources/flows/resources/executions/client/Client.ts +++ b/src/management/api/resources/flows/resources/executions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Executions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Executions { @@ -51,28 +31,34 @@ export class Executions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.flows.executions.list("flow_id") + * await client.flows.executions.list("flow_id", { + * from: "from", + * take: 1 + * }) */ public async list( flowId: string, request: Management.ExecutionsListRequest = {}, requestOptions?: Executions.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.flows.ExecutionsListRequest, + request: Management.ExecutionsListRequest, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:flows_executions"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -80,15 +66,15 @@ export class Executions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/${encodeURIComponent(flowId)}/executions`, + `flows/${core.url.encodePathParam(flowId)}/executions`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -143,10 +129,7 @@ export class Executions { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListFlowExecutionsPaginatedResponseContent, - Management.FlowExecutionSummary - >({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => @@ -187,9 +170,12 @@ export class Executions { request: Management.ExecutionsGetRequest = {}, requestOptions?: Executions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:flows_executions"] }], + }; const { hydrate } = request; const _queryParams: Record = {}; - if (hydrate != null) { + if (hydrate !== undefined) { if (Array.isArray(hydrate)) { _queryParams["hydrate"] = hydrate.map((item) => item); } else { @@ -199,7 +185,7 @@ export class Executions { let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -207,14 +193,15 @@ export class Executions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/${encodeURIComponent(flowId)}/executions/${encodeURIComponent(executionId)}`, + `flows/${core.url.encodePathParam(flowId)}/executions/${core.url.encodePathParam(executionId)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -287,9 +274,12 @@ export class Executions { executionId: string, requestOptions?: Executions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:flows_executions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -297,14 +287,15 @@ export class Executions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/${encodeURIComponent(flowId)}/executions/${encodeURIComponent(executionId)}`, + `flows/${core.url.encodePathParam(flowId)}/executions/${core.url.encodePathParam(executionId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -348,7 +339,7 @@ export class Executions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/flows/resources/executions/client/index.ts b/src/management/api/resources/flows/resources/executions/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/flows/resources/executions/client/index.ts +++ b/src/management/api/resources/flows/resources/executions/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/flows/resources/executions/client/requests/ExecutionsGetRequest.ts b/src/management/api/resources/flows/resources/executions/client/requests/ExecutionsGetRequest.ts deleted file mode 100644 index 6e7082ffc4..0000000000 --- a/src/management/api/resources/flows/resources/executions/client/requests/ExecutionsGetRequest.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ExecutionsGetRequest { - /** Hydration param */ - hydrate?: "debug" | "debug"[]; -} diff --git a/src/management/api/resources/flows/resources/executions/client/requests/ExecutionsListRequest.ts b/src/management/api/resources/flows/resources/executions/client/requests/ExecutionsListRequest.ts deleted file mode 100644 index b09291734b..0000000000 --- a/src/management/api/resources/flows/resources/executions/client/requests/ExecutionsListRequest.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ExecutionsListRequest { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/flows/resources/executions/client/requests/index.ts b/src/management/api/resources/flows/resources/executions/client/requests/index.ts deleted file mode 100644 index 918fbacbaf..0000000000 --- a/src/management/api/resources/flows/resources/executions/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ExecutionsListRequest } from "./ExecutionsListRequest.js"; -export { type ExecutionsGetRequest } from "./ExecutionsGetRequest.js"; diff --git a/src/management/api/resources/flows/resources/index.ts b/src/management/api/resources/flows/resources/index.ts index 29b0913838..be9a7f2919 100644 --- a/src/management/api/resources/flows/resources/index.ts +++ b/src/management/api/resources/flows/resources/index.ts @@ -1,3 +1,2 @@ export * as executions from "./executions/index.js"; export * as vault from "./vault/index.js"; -export * from "./executions/client/requests/index.js"; diff --git a/src/management/api/resources/flows/resources/vault/client/Client.ts b/src/management/api/resources/flows/resources/vault/client/Client.ts index 4c86ca2b4f..1ed872a336 100644 --- a/src/management/api/resources/flows/resources/vault/client/Client.ts +++ b/src/management/api/resources/flows/resources/vault/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import { Connections } from "../resources/connections/client/Client.js"; export declare namespace Vault { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Vault { 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 5fc6fcba8e..bc25282eac 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Connections { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Connections { @@ -50,30 +30,42 @@ export class Connections { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.flows.vault.connections.list() + * await client.flows.vault.connections.list({ + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( request: Management.ListFlowsVaultConnectionsRequestParameters = {}, requestOptions?: Connections.RequestOptions, - ): Promise> { + ): Promise< + core.Page< + Management.FlowsVaultConnectionSummary, + Management.ListFlowsVaultConnectionsOffsetPaginatedResponseContent + > + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.flows.vault.ListFlowsVaultConnectionsRequestParameters, + request: Management.ListFlowsVaultConnectionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:flows_vault_connections"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,10 +78,10 @@ export class Connections { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -145,9 +137,9 @@ export class Connections { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListFlowsVaultConnectionsOffsetPaginatedResponseContent, - Management.FlowsVaultConnectionSummary + return new core.Page< + Management.FlowsVaultConnectionSummary, + Management.ListFlowsVaultConnectionsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -175,7 +167,8 @@ export class Connections { * app_id: "ACTIVECAMPAIGN", * setup: { * type: "API_KEY", - * api_key: "api_key" + * api_key: "api_key", + * base_url: "base_url" * } * }) */ @@ -190,9 +183,12 @@ export class Connections { request: Management.CreateFlowsVaultConnectionRequestContent, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:flows_vault_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -208,9 +204,10 @@ export class Connections { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -279,9 +276,12 @@ export class Connections { id: string, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:flows_vault_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -289,14 +289,15 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/vault/connections/${encodeURIComponent(id)}`, + `flows/vault/connections/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -365,9 +366,12 @@ export class Connections { id: string, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:flows_vault_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -375,14 +379,15 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/vault/connections/${encodeURIComponent(id)}`, + `flows/vault/connections/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -453,9 +458,12 @@ export class Connections { request: Management.UpdateFlowsVaultConnectionRequestContent = {}, requestOptions?: Connections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:flows_vault_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -463,7 +471,7 @@ export class Connections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `flows/vault/connections/${encodeURIComponent(id)}`, + `flows/vault/connections/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -471,9 +479,10 @@ export class Connections { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -522,7 +531,7 @@ export class Connections { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/flows/resources/vault/resources/connections/client/index.ts b/src/management/api/resources/flows/resources/vault/resources/connections/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/flows/resources/vault/resources/connections/client/index.ts +++ b/src/management/api/resources/flows/resources/vault/resources/connections/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/ListFlowsVaultConnectionsRequestParameters.ts b/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/ListFlowsVaultConnectionsRequestParameters.ts deleted file mode 100644 index f152750a60..0000000000 --- a/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/ListFlowsVaultConnectionsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListFlowsVaultConnectionsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/UpdateFlowsVaultConnectionRequestContent.ts b/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/UpdateFlowsVaultConnectionRequestContent.ts deleted file mode 100644 index 69effe3360..0000000000 --- a/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/UpdateFlowsVaultConnectionRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateFlowsVaultConnectionRequestContent { - /** Flows Vault Connection name. */ - name?: string; - setup?: Management.UpdateFlowsVaultConnectionSetup; -} diff --git a/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/index.ts b/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/index.ts deleted file mode 100644 index 603375d232..0000000000 --- a/src/management/api/resources/flows/resources/vault/resources/connections/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListFlowsVaultConnectionsRequestParameters } from "./ListFlowsVaultConnectionsRequestParameters.js"; -export { type UpdateFlowsVaultConnectionRequestContent } from "./UpdateFlowsVaultConnectionRequestContent.js"; diff --git a/src/management/api/resources/flows/resources/vault/resources/index.ts b/src/management/api/resources/flows/resources/vault/resources/index.ts index c9552975dc..bc3ce213c8 100644 --- a/src/management/api/resources/flows/resources/vault/resources/index.ts +++ b/src/management/api/resources/flows/resources/vault/resources/index.ts @@ -1,2 +1 @@ export * as connections from "./connections/index.js"; -export * from "./connections/client/requests/index.js"; diff --git a/src/management/api/resources/forms/client/Client.ts b/src/management/api/resources/forms/client/Client.ts index 962073126d..71aee4ac87 100644 --- a/src/management/api/resources/forms/client/Client.ts +++ b/src/management/api/resources/forms/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace Forms { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Forms { @@ -50,28 +30,35 @@ export class Forms { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.forms.list() + * await client.forms.list({ + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( request: Management.ListFormsRequestParameters = {}, requestOptions?: Forms.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListFormsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:forms"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, hydrate } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (hydrate != null) { + if (hydrate !== undefined) { if (Array.isArray(hydrate)) { _queryParams["hydrate"] = hydrate.map((item) => item); } else { @@ -80,7 +67,7 @@ export class Forms { } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -93,10 +80,10 @@ export class Forms { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -150,7 +137,7 @@ export class Forms { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.forms ?? []).length > 0, @@ -187,9 +174,12 @@ export class Forms { request: Management.CreateFormRequestContent, requestOptions?: Forms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:forms"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -205,9 +195,10 @@ export class Forms { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.CreateFormResponseContent, rawResponse: _response.rawResponse }; @@ -276,9 +267,12 @@ export class Forms { request: Management.GetFormRequestParameters = {}, requestOptions?: Forms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:forms"] }], + }; const { hydrate } = request; const _queryParams: Record = {}; - if (hydrate != null) { + if (hydrate !== undefined) { if (Array.isArray(hydrate)) { _queryParams["hydrate"] = hydrate.map((item) => item); } else { @@ -288,7 +282,7 @@ export class Forms { let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -296,14 +290,15 @@ export class Forms { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `forms/${encodeURIComponent(id)}`, + `forms/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetFormResponseContent, rawResponse: _response.rawResponse }; @@ -364,9 +359,12 @@ export class Forms { } private async __delete(id: string, requestOptions?: Forms.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:forms"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -374,14 +372,15 @@ export class Forms { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `forms/${encodeURIComponent(id)}`, + `forms/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -448,9 +447,12 @@ export class Forms { request: Management.UpdateFormRequestContent = {}, requestOptions?: Forms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:forms"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -458,7 +460,7 @@ export class Forms { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `forms/${encodeURIComponent(id)}`, + `forms/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -466,9 +468,10 @@ export class Forms { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateFormResponseContent, rawResponse: _response.rawResponse }; @@ -508,7 +511,7 @@ export class Forms { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/forms/client/index.ts b/src/management/api/resources/forms/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/forms/client/index.ts +++ b/src/management/api/resources/forms/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/forms/client/requests/CreateFormRequestContent.ts b/src/management/api/resources/forms/client/requests/CreateFormRequestContent.ts deleted file mode 100644 index f68752f85c..0000000000 --- a/src/management/api/resources/forms/client/requests/CreateFormRequestContent.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name" - * } - */ -export interface CreateFormRequestContent { - name: string; - messages?: Management.FormMessages; - languages?: Management.FormLanguages; - translations?: Management.FormTranslations; - nodes?: Management.FormNodeList; - start?: Management.FormStartNode; - ending?: Management.FormEndingNode; - style?: Management.FormStyle; -} diff --git a/src/management/api/resources/forms/client/requests/GetFormRequestParameters.ts b/src/management/api/resources/forms/client/requests/GetFormRequestParameters.ts deleted file mode 100644 index be9448f585..0000000000 --- a/src/management/api/resources/forms/client/requests/GetFormRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface GetFormRequestParameters { - /** Query parameter to hydrate the response with additional data */ - hydrate?: Management.FormsRequestParametersHydrateEnum | Management.FormsRequestParametersHydrateEnum[]; -} diff --git a/src/management/api/resources/forms/client/requests/ListFormsRequestParameters.ts b/src/management/api/resources/forms/client/requests/ListFormsRequestParameters.ts deleted file mode 100644 index ba92be5197..0000000000 --- a/src/management/api/resources/forms/client/requests/ListFormsRequestParameters.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListFormsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Query parameter to hydrate the response with additional data */ - hydrate?: Management.FormsRequestParametersHydrateEnum | Management.FormsRequestParametersHydrateEnum[]; -} diff --git a/src/management/api/resources/forms/client/requests/UpdateFormRequestContent.ts b/src/management/api/resources/forms/client/requests/UpdateFormRequestContent.ts deleted file mode 100644 index f8547297e3..0000000000 --- a/src/management/api/resources/forms/client/requests/UpdateFormRequestContent.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateFormRequestContent { - name?: string; - messages?: Management.FormMessagesNullable | undefined; - languages?: Management.FormLanguagesNullable | undefined; - translations?: Management.FormTranslationsNullable | undefined; - nodes?: Management.FormNodeListNullable | undefined; - start?: Management.FormStartNodeNullable | undefined; - ending?: Management.FormEndingNodeNullable | undefined; - style?: Management.FormStyleNullable | undefined; -} diff --git a/src/management/api/resources/forms/client/requests/index.ts b/src/management/api/resources/forms/client/requests/index.ts deleted file mode 100644 index 76b355742d..0000000000 --- a/src/management/api/resources/forms/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListFormsRequestParameters } from "./ListFormsRequestParameters.js"; -export { type CreateFormRequestContent } from "./CreateFormRequestContent.js"; -export { type GetFormRequestParameters } from "./GetFormRequestParameters.js"; -export { type UpdateFormRequestContent } from "./UpdateFormRequestContent.js"; 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 dfd21f58fa..0000000000 --- a/src/management/api/resources/groups/client/Client.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../environments.js"; -import * as core from "../../../../core/index.js"; -import { Members } from "../resources/members/client/Client.js"; - -export declare namespace Groups { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } -} - -export class Groups { - protected readonly _options: Groups.Options; - protected _members: Members | undefined; - - constructor(_options: Groups.Options) { - this._options = _options; - } - - public get members(): Members { - return (this._members ??= new Members(this._options)); - } -} 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 4cb5528113..0000000000 --- a/src/management/api/resources/groups/resources/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as members from "./members/index.js"; -export * from "./members/client/requests/index.js"; 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 82648c6ff8..0000000000 --- a/src/management/api/resources/groups/resources/members/client/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/groups/resources/members/client/requests/GetGroupMembersRequestParameters.ts b/src/management/api/resources/groups/resources/members/client/requests/GetGroupMembersRequestParameters.ts deleted file mode 100644 index 03c38cbe80..0000000000 --- a/src/management/api/resources/groups/resources/members/client/requests/GetGroupMembersRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetGroupMembersRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 25. */ - take?: number; -} diff --git a/src/management/api/resources/groups/resources/members/client/requests/index.ts b/src/management/api/resources/groups/resources/members/client/requests/index.ts deleted file mode 100644 index 67c74ba551..0000000000 --- a/src/management/api/resources/groups/resources/members/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type GetGroupMembersRequestParameters } from "./GetGroupMembersRequestParameters.js"; diff --git a/src/management/api/resources/guardian/client/Client.ts b/src/management/api/resources/guardian/client/Client.ts index 865781b37a..e274f4255b 100644 --- a/src/management/api/resources/guardian/client/Client.ts +++ b/src/management/api/resources/guardian/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { Enrollments } from "../resources/enrollments/client/Client.js"; @@ -9,15 +8,7 @@ import { Factors } from "../resources/factors/client/Client.js"; import { Policies } from "../resources/policies/client/Client.js"; export declare namespace Guardian { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Guardian { diff --git a/src/management/api/resources/guardian/resources/enrollments/client/Client.ts b/src/management/api/resources/guardian/resources/enrollments/client/Client.ts index c3b3d96f99..f3ca4e6ed4 100644 --- a/src/management/api/resources/guardian/resources/enrollments/client/Client.ts +++ b/src/management/api/resources/guardian/resources/enrollments/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Enrollments { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Enrollments { @@ -70,9 +50,12 @@ export class Enrollments { request: Management.CreateGuardianEnrollmentTicketRequestContent, requestOptions?: Enrollments.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:guardian_enrollment_tickets"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -88,9 +71,10 @@ export class Enrollments { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -161,9 +145,12 @@ export class Enrollments { id: string, requestOptions?: Enrollments.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_enrollments"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -171,14 +158,15 @@ export class Enrollments { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `guardian/enrollments/${encodeURIComponent(id)}`, + `guardian/enrollments/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -244,9 +232,12 @@ export class Enrollments { id: string, requestOptions?: Enrollments.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:guardian_enrollments"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -254,14 +245,15 @@ export class Enrollments { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `guardian/enrollments/${encodeURIComponent(id)}`, + `guardian/enrollments/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -303,7 +295,7 @@ export class Enrollments { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/guardian/resources/enrollments/client/index.ts b/src/management/api/resources/guardian/resources/enrollments/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/guardian/resources/enrollments/client/index.ts +++ b/src/management/api/resources/guardian/resources/enrollments/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/enrollments/client/requests/CreateGuardianEnrollmentTicketRequestContent.ts b/src/management/api/resources/guardian/resources/enrollments/client/requests/CreateGuardianEnrollmentTicketRequestContent.ts deleted file mode 100644 index e79838b882..0000000000 --- a/src/management/api/resources/guardian/resources/enrollments/client/requests/CreateGuardianEnrollmentTicketRequestContent.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * user_id: "user_id" - * } - */ -export interface CreateGuardianEnrollmentTicketRequestContent { - /** user_id for the enrollment ticket */ - user_id: string; - /** alternate email to which the enrollment email will be sent. Optional - by default, the email will be sent to the user's default address */ - email?: string; - /** Send an email to the user to start the enrollment */ - send_mail?: boolean; - /** Optional. Specify the locale of the enrollment email. Used with send_email. */ - email_locale?: string; - factor?: Management.GuardianEnrollmentFactorEnum; - /** Optional. Allows a user who has previously enrolled in MFA to enroll with additional factors.
Note: Parameter can only be used with Universal Login; it cannot be used with Classic Login or custom MFA pages. */ - allow_multiple_enrollments?: boolean; -} diff --git a/src/management/api/resources/guardian/resources/enrollments/client/requests/index.ts b/src/management/api/resources/guardian/resources/enrollments/client/requests/index.ts deleted file mode 100644 index c9026871c3..0000000000 --- a/src/management/api/resources/guardian/resources/enrollments/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateGuardianEnrollmentTicketRequestContent } from "./CreateGuardianEnrollmentTicketRequestContent.js"; diff --git a/src/management/api/resources/guardian/resources/factors/client/Client.ts b/src/management/api/resources/guardian/resources/factors/client/Client.ts index 4880307c37..faf61a5c3b 100644 --- a/src/management/api/resources/guardian/resources/factors/client/Client.ts +++ b/src/management/api/resources/guardian/resources/factors/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -13,28 +12,9 @@ import { Sms } from "../resources/sms/client/Client.js"; import { Duo } from "../resources/duo/client/Client.js"; export declare namespace Factors { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Factors { @@ -83,9 +63,12 @@ export class Factors { private async __list( requestOptions?: Factors.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -98,9 +81,10 @@ export class Factors { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GuardianFactor[], rawResponse: _response.rawResponse }; @@ -169,9 +153,12 @@ export class Factors { request: Management.SetGuardianFactorRequestContent, requestOptions?: Factors.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -179,7 +166,7 @@ export class Factors { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `guardian/factors/${encodeURIComponent(name)}`, + `guardian/factors/${core.url.encodePathParam(name)}`, ), method: "PUT", headers: _headers, @@ -187,9 +174,10 @@ export class Factors { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -232,7 +220,7 @@ export class Factors { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/guardian/resources/factors/client/index.ts b/src/management/api/resources/guardian/resources/factors/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/guardian/resources/factors/client/index.ts +++ b/src/management/api/resources/guardian/resources/factors/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/client/requests/SetGuardianFactorRequestContent.ts b/src/management/api/resources/guardian/resources/factors/client/requests/SetGuardianFactorRequestContent.ts deleted file mode 100644 index a632c0e6dc..0000000000 --- a/src/management/api/resources/guardian/resources/factors/client/requests/SetGuardianFactorRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * enabled: true - * } - */ -export interface SetGuardianFactorRequestContent { - /** Whether this factor is enabled (true) or disabled (false). */ - enabled: boolean; -} diff --git a/src/management/api/resources/guardian/resources/factors/client/requests/index.ts b/src/management/api/resources/guardian/resources/factors/client/requests/index.ts deleted file mode 100644 index af7edd6b06..0000000000 --- a/src/management/api/resources/guardian/resources/factors/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type SetGuardianFactorRequestContent } from "./SetGuardianFactorRequestContent.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/client/Client.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/client/Client.ts index 39f5e683fa..374f9e8d23 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/client/Client.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/duo/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import { Settings } from "../resources/settings/client/Client.js"; export declare namespace Duo { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Duo { diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/index.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/index.ts index 46ab3e0a99..5d08c46378 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/index.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/index.ts @@ -1,2 +1 @@ export * as settings from "./settings/index.js"; -export * from "./settings/client/requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/Client.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/Client.ts index fa72cce43f..d997b1158a 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/Client.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../../../environments.js"; import * as core from "../../../../../../../../../../core/index.js"; import * as Management from "../../../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../. import * as errors from "../../../../../../../../../../errors/index.js"; export declare namespace Settings { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Settings { @@ -61,9 +41,12 @@ export class Settings { private async __get( requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class Settings { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -147,9 +131,12 @@ export class Settings { request: Management.SetGuardianFactorDuoSettingsRequestContent = {}, requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -165,9 +152,10 @@ export class Settings { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -234,9 +222,12 @@ export class Settings { request: Management.UpdateGuardianFactorDuoSettingsRequestContent = {}, requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -252,9 +243,10 @@ export class Settings { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -299,7 +291,7 @@ export class Settings { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/index.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/index.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/SetGuardianFactorDuoSettingsRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/SetGuardianFactorDuoSettingsRequestContent.ts deleted file mode 100644 index fa69adefa2..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/SetGuardianFactorDuoSettingsRequestContent.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface SetGuardianFactorDuoSettingsRequestContent { - ikey?: string; - skey?: string; - host?: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/UpdateGuardianFactorDuoSettingsRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/UpdateGuardianFactorDuoSettingsRequestContent.ts deleted file mode 100644 index b6bc6461b8..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/UpdateGuardianFactorDuoSettingsRequestContent.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateGuardianFactorDuoSettingsRequestContent { - ikey?: string; - skey?: string; - host?: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/index.ts b/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/index.ts deleted file mode 100644 index 30ae6666c8..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/duo/resources/settings/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type SetGuardianFactorDuoSettingsRequestContent } from "./SetGuardianFactorDuoSettingsRequestContent.js"; -export { type UpdateGuardianFactorDuoSettingsRequestContent } from "./UpdateGuardianFactorDuoSettingsRequestContent.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/index.ts b/src/management/api/resources/guardian/resources/factors/resources/index.ts index a3a395c523..a903082c42 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/index.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/index.ts @@ -2,6 +2,3 @@ export * as phone from "./phone/index.js"; export * as pushNotification from "./pushNotification/index.js"; export * as sms from "./sms/index.js"; export * as duo from "./duo/index.js"; -export * from "./phone/client/requests/index.js"; -export * from "./pushNotification/client/requests/index.js"; -export * from "./sms/client/requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/Client.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/Client.ts index ba9763b7e6..5fdbe5dbba 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/Client.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/phone/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Phone { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Phone { @@ -61,9 +41,12 @@ export class Phone { private async __getMessageTypes( requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class Phone { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -150,9 +134,12 @@ export class Phone { request: Management.SetGuardianFactorPhoneMessageTypesRequestContent, requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -168,9 +155,10 @@ export class Phone { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -238,9 +226,12 @@ export class Phone { private async __getTwilioProvider( requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -253,9 +244,10 @@ export class Phone { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -324,9 +316,12 @@ export class Phone { request: Management.SetGuardianFactorsProviderPhoneTwilioRequestContent = {}, requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -342,9 +337,10 @@ export class Phone { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -410,9 +406,12 @@ export class Phone { private async __getSelectedProvider( requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -425,9 +424,10 @@ export class Phone { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -496,9 +496,12 @@ export class Phone { request: Management.SetGuardianFactorsProviderPhoneRequestContent, requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -514,9 +517,10 @@ export class Phone { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -582,9 +586,12 @@ export class Phone { private async __getTemplates( requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -597,9 +604,10 @@ export class Phone { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -671,9 +679,12 @@ export class Phone { request: Management.SetGuardianFactorPhoneTemplatesRequestContent, requestOptions?: Phone.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -689,9 +700,10 @@ export class Phone { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -736,7 +748,7 @@ export class Phone { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/index.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/index.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/phone/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorPhoneMessageTypesRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorPhoneMessageTypesRequestContent.ts deleted file mode 100644 index ea1e401992..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorPhoneMessageTypesRequestContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * message_types: ["sms"] - * } - */ -export interface SetGuardianFactorPhoneMessageTypesRequestContent { - /** The list of phone factors to enable on the tenant. Can include `sms` and `voice`. */ - message_types: Management.GuardianFactorPhoneFactorMessageTypeEnum[]; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorPhoneTemplatesRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorPhoneTemplatesRequestContent.ts deleted file mode 100644 index 132bb60d6d..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorPhoneTemplatesRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * enrollment_message: "enrollment_message", - * verification_message: "verification_message" - * } - */ -export interface SetGuardianFactorPhoneTemplatesRequestContent { - /** Message sent to the user when they are invited to enroll with a phone number. */ - enrollment_message: string; - /** Message sent to the user when they are prompted to verify their account. */ - verification_message: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorsProviderPhoneRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorsProviderPhoneRequestContent.ts deleted file mode 100644 index 642330fde1..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorsProviderPhoneRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * provider: "auth0" - * } - */ -export interface SetGuardianFactorsProviderPhoneRequestContent { - provider: Management.GuardianFactorsProviderSmsProviderEnum; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorsProviderPhoneTwilioRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorsProviderPhoneTwilioRequestContent.ts deleted file mode 100644 index 3d88dc6fd9..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/SetGuardianFactorsProviderPhoneTwilioRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface SetGuardianFactorsProviderPhoneTwilioRequestContent { - /** From number */ - from?: string; - /** Copilot SID */ - messaging_service_sid?: string; - /** Twilio Authentication token */ - auth_token?: string; - /** Twilio SID */ - sid?: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/index.ts b/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/index.ts deleted file mode 100644 index e2613c3781..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/phone/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type SetGuardianFactorPhoneMessageTypesRequestContent } from "./SetGuardianFactorPhoneMessageTypesRequestContent.js"; -export { type SetGuardianFactorsProviderPhoneTwilioRequestContent } from "./SetGuardianFactorsProviderPhoneTwilioRequestContent.js"; -export { type SetGuardianFactorsProviderPhoneRequestContent } from "./SetGuardianFactorsProviderPhoneRequestContent.js"; -export { type SetGuardianFactorPhoneTemplatesRequestContent } from "./SetGuardianFactorPhoneTemplatesRequestContent.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 576901ea79..a816bda0bf 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace PushNotification { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class PushNotification { @@ -61,9 +41,12 @@ export class PushNotification { private async __getApnsProvider( requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class PushNotification { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -147,9 +131,12 @@ export class PushNotification { request: Management.SetGuardianFactorsProviderPushNotificationApnsRequestContent, requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -165,9 +152,10 @@ export class PushNotification { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -236,9 +224,12 @@ export class PushNotification { request: Management.SetGuardianFactorsProviderPushNotificationFcmRequestContent, requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -254,9 +245,10 @@ export class PushNotification { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -325,9 +317,12 @@ export class PushNotification { request: Management.SetGuardianFactorsProviderPushNotificationFcmv1RequestContent, requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -343,9 +338,10 @@ export class PushNotification { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -411,9 +407,12 @@ export class PushNotification { private async __getSnsProvider( requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -426,9 +425,10 @@ export class PushNotification { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -497,9 +497,12 @@ export class PushNotification { request: Management.SetGuardianFactorsProviderPushNotificationSnsRequestContent = {}, requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -515,9 +518,10 @@ export class PushNotification { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -586,9 +590,12 @@ export class PushNotification { request: Management.UpdateGuardianFactorsProviderPushNotificationSnsRequestContent = {}, requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -604,9 +611,10 @@ export class PushNotification { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -672,9 +680,12 @@ export class PushNotification { private async __getSelectedProvider( requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -687,9 +698,10 @@ export class PushNotification { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -760,9 +772,12 @@ export class PushNotification { request: Management.SetGuardianFactorsProviderPushNotificationRequestContent, requestOptions?: PushNotification.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -778,9 +793,10 @@ export class PushNotification { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -825,7 +841,7 @@ export class PushNotification { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/index.ts b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/index.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/SetGuardianFactorsProviderPushNotificationRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/SetGuardianFactorsProviderPushNotificationRequestContent.ts deleted file mode 100644 index ce03d03459..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/SetGuardianFactorsProviderPushNotificationRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * provider: "guardian" - * } - */ -export interface SetGuardianFactorsProviderPushNotificationRequestContent { - provider: Management.GuardianFactorsProviderPushNotificationProviderDataEnum; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/SetGuardianFactorsProviderPushNotificationSnsRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/SetGuardianFactorsProviderPushNotificationSnsRequestContent.ts deleted file mode 100644 index d770a28d74..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/SetGuardianFactorsProviderPushNotificationSnsRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface SetGuardianFactorsProviderPushNotificationSnsRequestContent { - aws_access_key_id?: string; - aws_secret_access_key?: string; - aws_region?: string; - sns_apns_platform_application_arn?: string; - sns_gcm_platform_application_arn?: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.ts deleted file mode 100644 index 02a489870d..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateGuardianFactorsProviderPushNotificationSnsRequestContent { - aws_access_key_id?: string; - aws_secret_access_key?: string; - aws_region?: string; - sns_apns_platform_application_arn?: string; - sns_gcm_platform_application_arn?: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/index.ts b/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/index.ts deleted file mode 100644 index 75576c1180..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/pushNotification/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type SetGuardianFactorsProviderPushNotificationSnsRequestContent } from "./SetGuardianFactorsProviderPushNotificationSnsRequestContent.js"; -export { type UpdateGuardianFactorsProviderPushNotificationSnsRequestContent } from "./UpdateGuardianFactorsProviderPushNotificationSnsRequestContent.js"; -export { type SetGuardianFactorsProviderPushNotificationRequestContent } from "./SetGuardianFactorsProviderPushNotificationRequestContent.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/sms/client/Client.ts b/src/management/api/resources/guardian/resources/factors/resources/sms/client/Client.ts index 7dc13c5be4..1fa91a7df6 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/sms/client/Client.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/sms/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Sms { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Sms { @@ -63,9 +43,12 @@ export class Sms { private async __getTwilioProvider( requestOptions?: Sms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -78,9 +61,10 @@ export class Sms { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -151,9 +135,12 @@ export class Sms { request: Management.SetGuardianFactorsProviderSmsTwilioRequestContent = {}, requestOptions?: Sms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -169,9 +156,10 @@ export class Sms { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -239,9 +227,12 @@ export class Sms { private async __getSelectedProvider( requestOptions?: Sms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -254,9 +245,10 @@ export class Sms { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -329,9 +321,12 @@ export class Sms { request: Management.SetGuardianFactorsProviderSmsRequestContent, requestOptions?: Sms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -347,9 +342,10 @@ export class Sms { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -417,9 +413,12 @@ export class Sms { private async __getTemplates( requestOptions?: Sms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -432,9 +431,10 @@ export class Sms { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -508,9 +508,12 @@ export class Sms { request: Management.SetGuardianFactorSmsTemplatesRequestContent, requestOptions?: Sms.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:guardian_factors"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -526,9 +529,10 @@ export class Sms { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -573,7 +577,7 @@ export class Sms { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/guardian/resources/factors/resources/sms/client/index.ts b/src/management/api/resources/guardian/resources/factors/resources/sms/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/guardian/resources/factors/resources/sms/client/index.ts +++ b/src/management/api/resources/guardian/resources/factors/resources/sms/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorSmsTemplatesRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorSmsTemplatesRequestContent.ts deleted file mode 100644 index d031ce97de..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorSmsTemplatesRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * enrollment_message: "enrollment_message", - * verification_message: "verification_message" - * } - */ -export interface SetGuardianFactorSmsTemplatesRequestContent { - /** Message sent to the user when they are invited to enroll with a phone number. */ - enrollment_message: string; - /** Message sent to the user when they are prompted to verify their account. */ - verification_message: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorsProviderSmsRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorsProviderSmsRequestContent.ts deleted file mode 100644 index 275c5911a3..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorsProviderSmsRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * provider: "auth0" - * } - */ -export interface SetGuardianFactorsProviderSmsRequestContent { - provider: Management.GuardianFactorsProviderSmsProviderEnum; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorsProviderSmsTwilioRequestContent.ts b/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorsProviderSmsTwilioRequestContent.ts deleted file mode 100644 index 6bc510e914..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/SetGuardianFactorsProviderSmsTwilioRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface SetGuardianFactorsProviderSmsTwilioRequestContent { - /** From number */ - from?: string; - /** Copilot SID */ - messaging_service_sid?: string; - /** Twilio Authentication token */ - auth_token?: string; - /** Twilio SID */ - sid?: string; -} diff --git a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/index.ts b/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/index.ts deleted file mode 100644 index e11d0417e4..0000000000 --- a/src/management/api/resources/guardian/resources/factors/resources/sms/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type SetGuardianFactorsProviderSmsTwilioRequestContent } from "./SetGuardianFactorsProviderSmsTwilioRequestContent.js"; -export { type SetGuardianFactorsProviderSmsRequestContent } from "./SetGuardianFactorsProviderSmsRequestContent.js"; -export { type SetGuardianFactorSmsTemplatesRequestContent } from "./SetGuardianFactorSmsTemplatesRequestContent.js"; diff --git a/src/management/api/resources/guardian/resources/index.ts b/src/management/api/resources/guardian/resources/index.ts index cd5b8fff84..a409010748 100644 --- a/src/management/api/resources/guardian/resources/index.ts +++ b/src/management/api/resources/guardian/resources/index.ts @@ -1,5 +1,3 @@ export * as enrollments from "./enrollments/index.js"; export * as factors from "./factors/index.js"; export * as policies from "./policies/index.js"; -export * from "./enrollments/client/requests/index.js"; -export * from "./factors/client/requests/index.js"; diff --git a/src/management/api/resources/guardian/resources/policies/client/Client.ts b/src/management/api/resources/guardian/resources/policies/client/Client.ts index 0662ebda66..3e7f429a7c 100644 --- a/src/management/api/resources/guardian/resources/policies/client/Client.ts +++ b/src/management/api/resources/guardian/resources/policies/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Policies { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Policies { @@ -69,9 +49,12 @@ export class Policies { private async __list( requestOptions?: Policies.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:mfa_policies"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -84,9 +67,10 @@ export class Policies { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -161,9 +145,12 @@ export class Policies { request: Management.SetGuardianPoliciesRequestContent, requestOptions?: Policies.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:mfa_policies"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -179,9 +166,10 @@ export class Policies { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -224,7 +212,7 @@ export class Policies { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/hooks/client/Client.ts b/src/management/api/resources/hooks/client/Client.ts index f61eda2ad6..8f27b240ff 100644 --- a/src/management/api/resources/hooks/client/Client.ts +++ b/src/management/api/resources/hooks/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -10,28 +9,9 @@ import * as errors from "../../../../errors/index.js"; import { Secrets } from "../resources/secrets/client/Client.js"; export declare namespace Hooks { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Hooks { @@ -59,16 +39,26 @@ export class Hooks { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.hooks.list() + * await client.hooks.list({ + * page: 1, + * per_page: 1, + * include_totals: true, + * enabled: true, + * fields: "fields", + * triggerId: "credentials-exchange" + * }) */ public async list( request: Management.ListHooksRequestParameters = {}, requestOptions?: Hooks.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListHooksRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:hooks"] }], + }; const { page = 0, per_page: perPage = 50, @@ -78,27 +68,27 @@ export class Hooks { triggerId, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (enabled != null) { - _queryParams["enabled"] = enabled.toString(); + if (enabled !== undefined) { + _queryParams["enabled"] = enabled?.toString() ?? null; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (triggerId != null) { + if (triggerId !== undefined) { _queryParams["triggerId"] = triggerId; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -111,10 +101,10 @@ export class Hooks { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -170,7 +160,7 @@ export class Hooks { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.hooks ?? []).length > 0, @@ -212,9 +202,12 @@ export class Hooks { request: Management.CreateHookRequestContent, requestOptions?: Hooks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -230,9 +223,10 @@ export class Hooks { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.CreateHookResponseContent, rawResponse: _response.rawResponse }; @@ -290,7 +284,9 @@ export class Hooks { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.hooks.get("id") + * await client.hooks.get("id", { + * fields: "fields" + * }) */ public get( id: string, @@ -305,15 +301,18 @@ export class Hooks { request: Management.GetHookRequestParameters = {}, requestOptions?: Hooks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:hooks"] }], + }; const { fields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -321,14 +320,15 @@ export class Hooks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}`, + `hooks/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetHookResponseContent, rawResponse: _response.rawResponse }; @@ -391,9 +391,12 @@ export class Hooks { } private async __delete(id: string, requestOptions?: Hooks.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -401,14 +404,15 @@ export class Hooks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}`, + `hooks/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -480,9 +484,12 @@ export class Hooks { request: Management.UpdateHookRequestContent = {}, requestOptions?: Hooks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -490,7 +497,7 @@ export class Hooks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}`, + `hooks/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -498,9 +505,10 @@ export class Hooks { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateHookResponseContent, rawResponse: _response.rawResponse }; @@ -546,7 +554,7 @@ export class Hooks { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/hooks/client/index.ts b/src/management/api/resources/hooks/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/hooks/client/index.ts +++ b/src/management/api/resources/hooks/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/hooks/client/requests/CreateHookRequestContent.ts b/src/management/api/resources/hooks/client/requests/CreateHookRequestContent.ts deleted file mode 100644 index c0325bb686..0000000000 --- a/src/management/api/resources/hooks/client/requests/CreateHookRequestContent.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name", - * script: "script", - * triggerId: "credentials-exchange" - * } - */ -export interface CreateHookRequestContent { - /** Name of this hook. */ - name: string; - /** Code to be executed when this hook runs. */ - script: string; - /** Whether this hook will be executed (true) or ignored (false). */ - enabled?: boolean; - dependencies?: Management.HookDependencies; - triggerId: Management.HookTriggerIdEnum; -} diff --git a/src/management/api/resources/hooks/client/requests/GetHookRequestParameters.ts b/src/management/api/resources/hooks/client/requests/GetHookRequestParameters.ts deleted file mode 100644 index 54b4e046cc..0000000000 --- a/src/management/api/resources/hooks/client/requests/GetHookRequestParameters.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetHookRequestParameters { - /** Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. */ - fields?: string; -} diff --git a/src/management/api/resources/hooks/client/requests/ListHooksRequestParameters.ts b/src/management/api/resources/hooks/client/requests/ListHooksRequestParameters.ts deleted file mode 100644 index b5203c5369..0000000000 --- a/src/management/api/resources/hooks/client/requests/ListHooksRequestParameters.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListHooksRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Optional filter on whether a hook is enabled (true) or disabled (false). */ - enabled?: boolean; - /** Comma-separated list of fields to include in the result. Leave empty to retrieve all fields. */ - fields?: string; - /** Retrieves hooks that match the trigger */ - triggerId?: Management.HookTriggerIdEnum; -} diff --git a/src/management/api/resources/hooks/client/requests/UpdateHookRequestContent.ts b/src/management/api/resources/hooks/client/requests/UpdateHookRequestContent.ts deleted file mode 100644 index a031baf0c5..0000000000 --- a/src/management/api/resources/hooks/client/requests/UpdateHookRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateHookRequestContent { - /** Name of this hook. */ - name?: string; - /** Code to be executed when this hook runs. */ - script?: string; - /** Whether this hook will be executed (true) or ignored (false). */ - enabled?: boolean; - dependencies?: Management.HookDependencies; -} diff --git a/src/management/api/resources/hooks/client/requests/index.ts b/src/management/api/resources/hooks/client/requests/index.ts deleted file mode 100644 index a0a3552b4b..0000000000 --- a/src/management/api/resources/hooks/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListHooksRequestParameters } from "./ListHooksRequestParameters.js"; -export { type CreateHookRequestContent } from "./CreateHookRequestContent.js"; -export { type GetHookRequestParameters } from "./GetHookRequestParameters.js"; -export { type UpdateHookRequestContent } from "./UpdateHookRequestContent.js"; diff --git a/src/management/api/resources/hooks/resources/secrets/client/Client.ts b/src/management/api/resources/hooks/resources/secrets/client/Client.ts index fc442d58a9..d755fc3b7c 100644 --- a/src/management/api/resources/hooks/resources/secrets/client/Client.ts +++ b/src/management/api/resources/hooks/resources/secrets/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Secrets { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Secrets { @@ -66,9 +46,12 @@ export class Secrets { id: string, requestOptions?: Secrets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,14 +59,15 @@ export class Secrets { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}/secrets`, + `hooks/${core.url.encodePathParam(id)}/secrets`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -161,9 +145,12 @@ export class Secrets { request: Management.CreateHookSecretRequestContent, requestOptions?: Secrets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -171,7 +158,7 @@ export class Secrets { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}/secrets`, + `hooks/${core.url.encodePathParam(id)}/secrets`, ), method: "POST", headers: _headers, @@ -179,9 +166,10 @@ export class Secrets { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -253,9 +241,12 @@ export class Secrets { request: Management.DeleteHookSecretRequestContent, requestOptions?: Secrets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -263,7 +254,7 @@ export class Secrets { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}/secrets`, + `hooks/${core.url.encodePathParam(id)}/secrets`, ), method: "DELETE", headers: _headers, @@ -271,9 +262,10 @@ export class Secrets { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -347,9 +339,12 @@ export class Secrets { request: Management.UpdateHookSecretRequestContent, requestOptions?: Secrets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:hooks"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -357,7 +352,7 @@ export class Secrets { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `hooks/${encodeURIComponent(id)}/secrets`, + `hooks/${core.url.encodePathParam(id)}/secrets`, ), method: "PATCH", headers: _headers, @@ -365,9 +360,10 @@ export class Secrets { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -413,7 +409,7 @@ export class Secrets { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/index.ts b/src/management/api/resources/index.ts index a8ef73f9ae..cd8026cb9f 100644 --- a/src/management/api/resources/index.ts +++ b/src/management/api/resources/index.ts @@ -29,98 +29,14 @@ export * as stats from "./stats/index.js"; export * as supplementalSignals from "./supplementalSignals/index.js"; export * as tickets from "./tickets/index.js"; export * as tokenExchangeProfiles from "./tokenExchangeProfiles/index.js"; +export * as userAttributeProfiles from "./userAttributeProfiles/index.js"; export * as userBlocks from "./userBlocks/index.js"; export * as users from "./users/index.js"; export * as anomaly from "./anomaly/index.js"; export * as attackProtection from "./attackProtection/index.js"; export * as emails from "./emails/index.js"; -export * as groups from "./groups/index.js"; export * as guardian from "./guardian/index.js"; export * as keys from "./keys/index.js"; export * as riskAssessments from "./riskAssessments/index.js"; export * as tenants from "./tenants/index.js"; export * as verifiableCredentials from "./verifiableCredentials/index.js"; -export * from "./actions/client/requests/index.js"; -export * from "./branding/client/requests/index.js"; -export * from "./clientGrants/client/requests/index.js"; -export * from "./clients/client/requests/index.js"; -export * from "./connections/client/requests/index.js"; -export * from "./customDomains/client/requests/index.js"; -export * from "./deviceCredentials/client/requests/index.js"; -export * from "./emailTemplates/client/requests/index.js"; -export * from "./eventStreams/client/requests/index.js"; -export * from "./flows/client/requests/index.js"; -export * from "./forms/client/requests/index.js"; -export * from "./userGrants/client/requests/index.js"; -export * from "./hooks/client/requests/index.js"; -export * from "./logStreams/client/requests/index.js"; -export * from "./logs/client/requests/index.js"; -export * from "./networkAcls/client/requests/index.js"; -export * from "./organizations/client/requests/index.js"; -export * from "./prompts/client/requests/index.js"; -export * from "./resourceServers/client/requests/index.js"; -export * from "./roles/client/requests/index.js"; -export * from "./rules/client/requests/index.js"; -export * from "./rulesConfigs/client/requests/index.js"; -export * from "./selfServiceProfiles/client/requests/index.js"; -export * from "./stats/client/requests/index.js"; -export * from "./supplementalSignals/client/requests/index.js"; -export * from "./tickets/client/requests/index.js"; -export * from "./tokenExchangeProfiles/client/requests/index.js"; -export * from "./userBlocks/client/requests/index.js"; -export * from "./users/client/requests/index.js"; -export * from "./actions/resources/versions/client/requests/index.js"; -export * from "./actions/resources/triggers/resources/bindings/client/requests/index.js"; -export * from "./attackProtection/resources/breachedPasswordDetection/client/requests/index.js"; -export * from "./attackProtection/resources/bruteForceProtection/client/requests/index.js"; -export * from "./attackProtection/resources/suspiciousIpThrottling/client/requests/index.js"; -export * from "./branding/resources/themes/client/requests/index.js"; -export * from "./branding/resources/phone/resources/providers/client/requests/index.js"; -export * from "./branding/resources/phone/resources/templates/client/requests/index.js"; -export * from "./clientGrants/resources/organizations/client/requests/index.js"; -export * from "./clients/resources/credentials/client/requests/index.js"; -export * from "./clients/resources/connections/client/requests/index.js"; -export * from "./connections/resources/clients/client/requests/index.js"; -export * from "./connections/resources/scimConfiguration/client/requests/index.js"; -export * from "./connections/resources/users/client/requests/index.js"; -export * from "./connections/resources/scimConfiguration/resources/tokens/client/requests/index.js"; -export * from "./emails/resources/provider/client/requests/index.js"; -export * from "./eventStreams/resources/deliveries/client/requests/index.js"; -export * from "./eventStreams/resources/redeliveries/client/requests/index.js"; -export * from "./flows/resources/executions/client/requests/index.js"; -export * from "./flows/resources/vault/resources/connections/client/requests/index.js"; -export * from "./groups/resources/members/client/requests/index.js"; -export * from "./guardian/resources/enrollments/client/requests/index.js"; -export * from "./guardian/resources/factors/client/requests/index.js"; -export * from "./guardian/resources/factors/resources/phone/client/requests/index.js"; -export * from "./guardian/resources/factors/resources/pushNotification/client/requests/index.js"; -export * from "./guardian/resources/factors/resources/sms/client/requests/index.js"; -export * from "./guardian/resources/factors/resources/duo/resources/settings/client/requests/index.js"; -export * from "./jobs/resources/usersExports/client/requests/index.js"; -export * from "./jobs/resources/usersImports/client/requests/index.js"; -export * from "./jobs/resources/verificationEmail/client/requests/index.js"; -export * from "./keys/resources/customSigning/client/requests/index.js"; -export * from "./keys/resources/encryption/client/requests/index.js"; -export * from "./organizations/resources/clientGrants/client/requests/index.js"; -export * from "./organizations/resources/enabledConnections/client/requests/index.js"; -export * from "./organizations/resources/invitations/client/requests/index.js"; -export * from "./organizations/resources/members/client/requests/index.js"; -export * from "./organizations/resources/members/resources/roles/client/requests/index.js"; -export * from "./prompts/resources/rendering/client/requests/index.js"; -export * from "./riskAssessments/resources/settings/client/requests/index.js"; -export * from "./riskAssessments/resources/settings/resources/newDevice/client/requests/index.js"; -export * from "./roles/resources/permissions/client/requests/index.js"; -export * from "./roles/resources/users/client/requests/index.js"; -export * from "./selfServiceProfiles/resources/ssoTicket/client/requests/index.js"; -export * from "./tenants/resources/settings/client/requests/index.js"; -export * from "./users/resources/authenticationMethods/client/requests/index.js"; -export * from "./users/resources/groups/client/requests/index.js"; -export * from "./users/resources/identities/client/requests/index.js"; -export * from "./users/resources/logs/client/requests/index.js"; -export * from "./users/resources/organizations/client/requests/index.js"; -export * from "./users/resources/permissions/client/requests/index.js"; -export * from "./users/resources/riskAssessments/client/requests/index.js"; -export * from "./users/resources/roles/client/requests/index.js"; -export * from "./users/resources/refreshToken/client/requests/index.js"; -export * from "./users/resources/sessions/client/requests/index.js"; -export * from "./verifiableCredentials/resources/verification/resources/templates/client/requests/index.js"; diff --git a/src/management/api/resources/jobs/client/Client.ts b/src/management/api/resources/jobs/client/Client.ts index 7779b0af46..7d1bd695d0 100644 --- a/src/management/api/resources/jobs/client/Client.ts +++ b/src/management/api/resources/jobs/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -13,28 +12,9 @@ import { VerificationEmail } from "../resources/verificationEmail/client/Client. import { Errors } from "../resources/errors/client/Client.js"; export declare namespace Jobs { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Jobs { @@ -90,9 +70,12 @@ export class Jobs { id: string, requestOptions?: Jobs.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:users", "read:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -100,14 +83,15 @@ export class Jobs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `jobs/${encodeURIComponent(id)}`, + `jobs/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetJobResponseContent, rawResponse: _response.rawResponse }; @@ -151,7 +135,7 @@ export class Jobs { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/jobs/resources/errors/client/Client.ts b/src/management/api/resources/jobs/resources/errors/client/Client.ts index 774b8f0172..de946d06f5 100644 --- a/src/management/api/resources/jobs/resources/errors/client/Client.ts +++ b/src/management/api/resources/jobs/resources/errors/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Errors { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Errors { @@ -66,9 +46,12 @@ export class Errors { id: string, requestOptions?: Errors.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:users", "read:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,14 +59,15 @@ export class Errors { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `jobs/${encodeURIComponent(id)}/errors`, + `jobs/${core.url.encodePathParam(id)}/errors`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.jobs.ErrorsGetResponse, rawResponse: _response.rawResponse }; @@ -127,7 +111,7 @@ export class Errors { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/jobs/resources/errors/types/ErrorsGetResponse.ts b/src/management/api/resources/jobs/resources/errors/types/ErrorsGetResponse.ts index 1dedae8abf..e0650419a2 100644 --- a/src/management/api/resources/jobs/resources/errors/types/ErrorsGetResponse.ts +++ b/src/management/api/resources/jobs/resources/errors/types/ErrorsGetResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../../../../../index.js"; diff --git a/src/management/api/resources/jobs/resources/index.ts b/src/management/api/resources/jobs/resources/index.ts index 6417aee04d..8ad0c25571 100644 --- a/src/management/api/resources/jobs/resources/index.ts +++ b/src/management/api/resources/jobs/resources/index.ts @@ -3,6 +3,3 @@ export * from "./errors/types/index.js"; export * as usersExports from "./usersExports/index.js"; export * as usersImports from "./usersImports/index.js"; export * as verificationEmail from "./verificationEmail/index.js"; -export * from "./usersExports/client/requests/index.js"; -export * from "./usersImports/client/requests/index.js"; -export * from "./verificationEmail/client/requests/index.js"; diff --git a/src/management/api/resources/jobs/resources/usersExports/client/Client.ts b/src/management/api/resources/jobs/resources/usersExports/client/Client.ts index 0f51366b99..36c482f061 100644 --- a/src/management/api/resources/jobs/resources/usersExports/client/Client.ts +++ b/src/management/api/resources/jobs/resources/usersExports/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace UsersExports { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class UsersExports { @@ -65,9 +45,12 @@ export class UsersExports { request: Management.CreateExportUsersRequestContent = {}, requestOptions?: UsersExports.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -83,9 +66,10 @@ export class UsersExports { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -130,7 +114,7 @@ export class UsersExports { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/jobs/resources/usersExports/client/index.ts b/src/management/api/resources/jobs/resources/usersExports/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/jobs/resources/usersExports/client/index.ts +++ b/src/management/api/resources/jobs/resources/usersExports/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/jobs/resources/usersExports/client/requests/CreateExportUsersRequestContent.ts b/src/management/api/resources/jobs/resources/usersExports/client/requests/CreateExportUsersRequestContent.ts deleted file mode 100644 index e6ba73fc43..0000000000 --- a/src/management/api/resources/jobs/resources/usersExports/client/requests/CreateExportUsersRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface CreateExportUsersRequestContent { - /** connection_id of the connection from which users will be exported. */ - connection_id?: string; - format?: Management.JobFileFormatEnum; - /** Limit the number of records. */ - limit?: number; - /** List of fields to be included in the CSV. Defaults to a predefined set of fields. */ - fields?: Management.CreateExportUsersFields[]; -} diff --git a/src/management/api/resources/jobs/resources/usersExports/client/requests/index.ts b/src/management/api/resources/jobs/resources/usersExports/client/requests/index.ts deleted file mode 100644 index 1e3204dda5..0000000000 --- a/src/management/api/resources/jobs/resources/usersExports/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateExportUsersRequestContent } from "./CreateExportUsersRequestContent.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 8c426dcadc..f22551331c 100644 --- a/src/management/api/resources/jobs/resources/usersImports/client/Client.ts +++ b/src/management/api/resources/jobs/resources/usersImports/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -10,28 +9,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace UsersImports { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class UsersImports { @@ -72,6 +52,9 @@ export class UsersImports { request: Management.CreateImportUsersRequestContent, requestOptions?: UsersImports.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:users"] }], + }; const _request = await core.newFormData(); await _request.appendFile("users", request.users); _request.append("connection_id", request.connection_id); @@ -91,7 +74,7 @@ export class UsersImports { let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, mergeOnlyDefinedHeaders({ - Authorization: await this._getAuthorizationHeader(), + Authorization: await this._getAuthorizationHeader(_metadata), ..._maybeEncodedRequest.headers, }), requestOptions?.headers, @@ -109,9 +92,10 @@ export class UsersImports { requestType: "file", duplex: _maybeEncodedRequest.duplex, body: _maybeEncodedRequest.body, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -160,7 +144,7 @@ export class UsersImports { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/jobs/resources/usersImports/client/index.ts b/src/management/api/resources/jobs/resources/usersImports/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/jobs/resources/usersImports/client/index.ts +++ b/src/management/api/resources/jobs/resources/usersImports/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/jobs/resources/usersImports/client/requests/CreateImportUsersRequestContent.ts b/src/management/api/resources/jobs/resources/usersImports/client/requests/CreateImportUsersRequestContent.ts deleted file mode 100644 index a3b70850a7..0000000000 --- a/src/management/api/resources/jobs/resources/usersImports/client/requests/CreateImportUsersRequestContent.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as fs from "fs"; -import * as core from "../../../../../../../core/index.js"; - -/** - * @example - * { - * users: fs.createReadStream("/path/to/your/file"), - * connection_id: "connection_id" - * } - */ -export interface CreateImportUsersRequestContent { - users: core.file.Uploadable.FileLike; - /** connection_id of the connection to which users will be imported. */ - connection_id: string; - /** Whether to update users if they already exist (true) or to ignore them (false). */ - upsert?: boolean; - /** Customer-defined ID. */ - external_id?: string; - /** Whether to send a completion email to all tenant owners when the job is finished (true) or not (false). */ - send_completion_email?: boolean; -} diff --git a/src/management/api/resources/jobs/resources/usersImports/client/requests/index.ts b/src/management/api/resources/jobs/resources/usersImports/client/requests/index.ts deleted file mode 100644 index 3efc758551..0000000000 --- a/src/management/api/resources/jobs/resources/usersImports/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateImportUsersRequestContent } from "./CreateImportUsersRequestContent.js"; diff --git a/src/management/api/resources/jobs/resources/verificationEmail/client/Client.ts b/src/management/api/resources/jobs/resources/verificationEmail/client/Client.ts index 76a421ad29..b677f10c1c 100644 --- a/src/management/api/resources/jobs/resources/verificationEmail/client/Client.ts +++ b/src/management/api/resources/jobs/resources/verificationEmail/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace VerificationEmail { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class VerificationEmail { @@ -69,9 +49,12 @@ export class VerificationEmail { request: Management.CreateVerificationEmailRequestContent, requestOptions?: VerificationEmail.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -87,9 +70,10 @@ export class VerificationEmail { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -134,7 +118,7 @@ export class VerificationEmail { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/jobs/resources/verificationEmail/client/index.ts b/src/management/api/resources/jobs/resources/verificationEmail/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/jobs/resources/verificationEmail/client/index.ts +++ b/src/management/api/resources/jobs/resources/verificationEmail/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/jobs/resources/verificationEmail/client/requests/CreateVerificationEmailRequestContent.ts b/src/management/api/resources/jobs/resources/verificationEmail/client/requests/CreateVerificationEmailRequestContent.ts deleted file mode 100644 index 92d5f9b0f8..0000000000 --- a/src/management/api/resources/jobs/resources/verificationEmail/client/requests/CreateVerificationEmailRequestContent.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * user_id: "user_id" - * } - */ -export interface CreateVerificationEmailRequestContent { - /** user_id of the user to send the verification email to. */ - user_id: string; - /** client_id of the client (application). If no value provided, the global Client ID will be used. */ - client_id?: string; - identity?: Management.Identity; - /** (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. */ - organization_id?: string; -} diff --git a/src/management/api/resources/jobs/resources/verificationEmail/client/requests/index.ts b/src/management/api/resources/jobs/resources/verificationEmail/client/requests/index.ts deleted file mode 100644 index a0e377707a..0000000000 --- a/src/management/api/resources/jobs/resources/verificationEmail/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateVerificationEmailRequestContent } from "./CreateVerificationEmailRequestContent.js"; diff --git a/src/management/api/resources/keys/client/Client.ts b/src/management/api/resources/keys/client/Client.ts index e75582ee46..ffb0233042 100644 --- a/src/management/api/resources/keys/client/Client.ts +++ b/src/management/api/resources/keys/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { CustomSigning } from "../resources/customSigning/client/Client.js"; @@ -9,15 +8,7 @@ import { Encryption } from "../resources/encryption/client/Client.js"; import { Signing } from "../resources/signing/client/Client.js"; export declare namespace Keys { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Keys { diff --git a/src/management/api/resources/keys/resources/customSigning/client/Client.ts b/src/management/api/resources/keys/resources/customSigning/client/Client.ts index 6a4cd283b0..c4e7fa36d8 100644 --- a/src/management/api/resources/keys/resources/customSigning/client/Client.ts +++ b/src/management/api/resources/keys/resources/customSigning/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace CustomSigning { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class CustomSigning { @@ -62,9 +42,12 @@ export class CustomSigning { private async __get( requestOptions?: CustomSigning.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:custom_signing_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -77,9 +60,10 @@ export class CustomSigning { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -153,9 +137,15 @@ export class CustomSigning { request: Management.SetCustomSigningKeysRequestContent, requestOptions?: CustomSigning.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["create:custom_signing_keys", "update:custom_signing_keys"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -171,9 +161,10 @@ export class CustomSigning { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -235,9 +226,12 @@ export class CustomSigning { } private async __delete(requestOptions?: CustomSigning.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:custom_signing_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -250,9 +244,10 @@ export class CustomSigning { method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -292,7 +287,7 @@ export class CustomSigning { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/keys/resources/customSigning/client/index.ts b/src/management/api/resources/keys/resources/customSigning/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/keys/resources/customSigning/client/index.ts +++ b/src/management/api/resources/keys/resources/customSigning/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/keys/resources/customSigning/client/requests/SetCustomSigningKeysRequestContent.ts b/src/management/api/resources/keys/resources/customSigning/client/requests/SetCustomSigningKeysRequestContent.ts deleted file mode 100644 index c601a088ec..0000000000 --- a/src/management/api/resources/keys/resources/customSigning/client/requests/SetCustomSigningKeysRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * keys: [{ - * kty: "EC" - * }] - * } - */ -export interface SetCustomSigningKeysRequestContent { - /** An array of custom public signing keys. */ - keys: Management.CustomSigningKeyJwk[]; -} diff --git a/src/management/api/resources/keys/resources/customSigning/client/requests/index.ts b/src/management/api/resources/keys/resources/customSigning/client/requests/index.ts deleted file mode 100644 index 75c1a6a808..0000000000 --- a/src/management/api/resources/keys/resources/customSigning/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type SetCustomSigningKeysRequestContent } from "./SetCustomSigningKeysRequestContent.js"; 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 ff8767b2ea..56a3a44f55 100644 --- a/src/management/api/resources/keys/resources/encryption/client/Client.ts +++ b/src/management/api/resources/keys/resources/encryption/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Encryption { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Encryption { @@ -52,30 +32,37 @@ export class Encryption { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.keys.encryption.list() + * await client.keys.encryption.list({ + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( request: Management.ListEncryptionKeysRequestParameters = {}, requestOptions?: Encryption.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.keys.ListEncryptionKeysRequestParameters, + request: Management.ListEncryptionKeysRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:encryption_keys"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -88,10 +75,10 @@ export class Encryption { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -145,7 +132,7 @@ export class Encryption { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.keys ?? []).length > 0, @@ -185,9 +172,12 @@ export class Encryption { request: Management.CreateEncryptionKeyRequestContent, requestOptions?: Encryption.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:encryption_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,9 +193,10 @@ export class Encryption { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -269,9 +260,15 @@ export class Encryption { } private async __rekey(requestOptions?: Encryption.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["create:encryption_keys", "update:encryption_keys"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -284,9 +281,10 @@ export class Encryption { method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -352,9 +350,12 @@ export class Encryption { kid: string, requestOptions?: Encryption.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:encryption_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -362,14 +363,15 @@ export class Encryption { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `keys/encryption/${encodeURIComponent(kid)}`, + `keys/encryption/${core.url.encodePathParam(kid)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -447,9 +449,12 @@ export class Encryption { request: Management.ImportEncryptionKeyRequestContent, requestOptions?: Encryption.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:encryption_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -457,7 +462,7 @@ export class Encryption { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `keys/encryption/${encodeURIComponent(kid)}`, + `keys/encryption/${core.url.encodePathParam(kid)}`, ), method: "POST", headers: _headers, @@ -465,9 +470,10 @@ export class Encryption { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -536,9 +542,12 @@ export class Encryption { kid: string, requestOptions?: Encryption.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:encryption_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -546,14 +555,15 @@ export class Encryption { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `keys/encryption/${encodeURIComponent(kid)}`, + `keys/encryption/${core.url.encodePathParam(kid)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -621,9 +631,12 @@ export class Encryption { kid: string, requestOptions?: Encryption.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:encryption_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -631,14 +644,15 @@ export class Encryption { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `keys/encryption/${encodeURIComponent(kid)}/wrapping-key`, + `keys/encryption/${core.url.encodePathParam(kid)}/wrapping-key`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -687,7 +701,7 @@ export class Encryption { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/keys/resources/encryption/client/index.ts b/src/management/api/resources/keys/resources/encryption/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/keys/resources/encryption/client/index.ts +++ b/src/management/api/resources/keys/resources/encryption/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/keys/resources/encryption/client/requests/CreateEncryptionKeyRequestContent.ts b/src/management/api/resources/keys/resources/encryption/client/requests/CreateEncryptionKeyRequestContent.ts deleted file mode 100644 index 6a0a5ea6ee..0000000000 --- a/src/management/api/resources/keys/resources/encryption/client/requests/CreateEncryptionKeyRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * type: "customer-provided-root-key" - * } - */ -export interface CreateEncryptionKeyRequestContent { - type: Management.CreateEncryptionKeyType; -} diff --git a/src/management/api/resources/keys/resources/encryption/client/requests/ImportEncryptionKeyRequestContent.ts b/src/management/api/resources/keys/resources/encryption/client/requests/ImportEncryptionKeyRequestContent.ts deleted file mode 100644 index 990eac1a60..0000000000 --- a/src/management/api/resources/keys/resources/encryption/client/requests/ImportEncryptionKeyRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * wrapped_key: "wrapped_key" - * } - */ -export interface ImportEncryptionKeyRequestContent { - /** Base64 encoded ciphertext of key material wrapped by public wrapping key. */ - wrapped_key: string; -} diff --git a/src/management/api/resources/keys/resources/encryption/client/requests/ListEncryptionKeysRequestParameters.ts b/src/management/api/resources/keys/resources/encryption/client/requests/ListEncryptionKeysRequestParameters.ts deleted file mode 100644 index ac76198f01..0000000000 --- a/src/management/api/resources/keys/resources/encryption/client/requests/ListEncryptionKeysRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListEncryptionKeysRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Default value is 50, maximum value is 100. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/keys/resources/encryption/client/requests/index.ts b/src/management/api/resources/keys/resources/encryption/client/requests/index.ts deleted file mode 100644 index 2a77fa7d06..0000000000 --- a/src/management/api/resources/keys/resources/encryption/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListEncryptionKeysRequestParameters } from "./ListEncryptionKeysRequestParameters.js"; -export { type CreateEncryptionKeyRequestContent } from "./CreateEncryptionKeyRequestContent.js"; -export { type ImportEncryptionKeyRequestContent } from "./ImportEncryptionKeyRequestContent.js"; diff --git a/src/management/api/resources/keys/resources/index.ts b/src/management/api/resources/keys/resources/index.ts index 9a3c86b00a..1216d55ac2 100644 --- a/src/management/api/resources/keys/resources/index.ts +++ b/src/management/api/resources/keys/resources/index.ts @@ -1,5 +1,3 @@ export * as customSigning from "./customSigning/index.js"; export * as encryption from "./encryption/index.js"; export * as signing from "./signing/index.js"; -export * from "./customSigning/client/requests/index.js"; -export * from "./encryption/client/requests/index.js"; diff --git a/src/management/api/resources/keys/resources/signing/client/Client.ts b/src/management/api/resources/keys/resources/signing/client/Client.ts index 82b0ba67f5..421da20d6b 100644 --- a/src/management/api/resources/keys/resources/signing/client/Client.ts +++ b/src/management/api/resources/keys/resources/signing/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Signing { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Signing { @@ -60,9 +40,12 @@ export class Signing { private async __list( requestOptions?: Signing.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:signing_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -75,9 +58,10 @@ export class Signing { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.SigningKeys[], rawResponse: _response.rawResponse }; @@ -140,9 +124,12 @@ export class Signing { private async __rotate( requestOptions?: Signing.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:signing_keys", "update:signing_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -155,9 +142,10 @@ export class Signing { method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -225,9 +213,12 @@ export class Signing { kid: string, requestOptions?: Signing.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:signing_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -235,14 +226,15 @@ export class Signing { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `keys/signing/${encodeURIComponent(kid)}`, + `keys/signing/${core.url.encodePathParam(kid)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -312,9 +304,12 @@ export class Signing { kid: string, requestOptions?: Signing.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:signing_keys"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -322,14 +317,15 @@ export class Signing { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `keys/signing/${encodeURIComponent(kid)}/revoke`, + `keys/signing/${core.url.encodePathParam(kid)}/revoke`, ), method: "PUT", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -376,7 +372,7 @@ export class Signing { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/logStreams/client/Client.ts b/src/management/api/resources/logStreams/client/Client.ts index 507a5fe82d..0e8502fff0 100644 --- a/src/management/api/resources/logStreams/client/Client.ts +++ b/src/management/api/resources/logStreams/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace LogStreams { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class LogStreams { @@ -127,9 +107,12 @@ export class LogStreams { private async __list( requestOptions?: LogStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:log_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -142,9 +125,10 @@ export class LogStreams { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.LogStreamResponseSchema[], rawResponse: _response.rawResponse }; @@ -342,9 +326,12 @@ export class LogStreams { request: Management.CreateLogStreamRequestContent, requestOptions?: LogStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:log_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -360,9 +347,10 @@ export class LogStreams { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -535,9 +523,12 @@ export class LogStreams { id: string, requestOptions?: LogStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:log_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -545,14 +536,15 @@ export class LogStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `log-streams/${encodeURIComponent(id)}`, + `log-streams/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -620,9 +612,12 @@ export class LogStreams { id: string, requestOptions?: LogStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:log_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -630,14 +625,15 @@ export class LogStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `log-streams/${encodeURIComponent(id)}`, + `log-streams/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -743,9 +739,12 @@ export class LogStreams { request: Management.UpdateLogStreamRequestContent = {}, requestOptions?: LogStreams.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:log_streams"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -753,7 +752,7 @@ export class LogStreams { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `log-streams/${encodeURIComponent(id)}`, + `log-streams/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -761,9 +760,10 @@ export class LogStreams { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -808,7 +808,7 @@ export class LogStreams { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/logStreams/client/index.ts b/src/management/api/resources/logStreams/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/logStreams/client/index.ts +++ b/src/management/api/resources/logStreams/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/logStreams/client/requests/UpdateLogStreamRequestContent.ts b/src/management/api/resources/logStreams/client/requests/UpdateLogStreamRequestContent.ts deleted file mode 100644 index 2a35fd2ca9..0000000000 --- a/src/management/api/resources/logStreams/client/requests/UpdateLogStreamRequestContent.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateLogStreamRequestContent { - /** log stream name */ - name?: string; - status?: Management.LogStreamStatusEnum; - /** True for priority log streams, false for non-priority */ - isPriority?: boolean; - /** Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered. */ - filters?: Management.LogStreamFilter[]; - pii_config?: Management.LogStreamPiiConfig; - sink?: Management.LogStreamSinkPatch; -} diff --git a/src/management/api/resources/logStreams/client/requests/index.ts b/src/management/api/resources/logStreams/client/requests/index.ts deleted file mode 100644 index 361dd1f3ed..0000000000 --- a/src/management/api/resources/logStreams/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateLogStreamRequestContent } from "./UpdateLogStreamRequestContent.js"; diff --git a/src/management/api/resources/logs/client/Client.ts b/src/management/api/resources/logs/client/Client.ts index 42b57bb10a..25f87440e3 100644 --- a/src/management/api/resources/logs/client/Client.ts +++ b/src/management/api/resources/logs/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace Logs { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Logs { @@ -80,16 +60,27 @@ export class Logs { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.logs.list() + * await client.logs.list({ + * page: 1, + * per_page: 1, + * sort: "sort", + * fields: "fields", + * include_fields: true, + * include_totals: true, + * search: "search" + * }) */ public async list( request: Management.ListLogsRequestParameters = {}, requestOptions?: Logs.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListLogsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:logs", "read:logs_users"] }], + }; const { page = 0, per_page: perPage = 50, @@ -97,33 +88,33 @@ export class Logs { fields, include_fields: includeFields, include_totals: includeTotals = true, - q, + search, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (sort != null) { + if (sort !== undefined) { _queryParams["sort"] = sort; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (q != null) { - _queryParams["q"] = q; + if (search !== undefined) { + _queryParams["search"] = search; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -136,10 +127,10 @@ export class Logs { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -193,7 +184,7 @@ export class Logs { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.logs ?? []).length > 0, @@ -231,9 +222,12 @@ export class Logs { id: string, requestOptions?: Logs.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:logs", "read:logs_users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -241,14 +235,15 @@ export class Logs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `logs/${encodeURIComponent(id)}`, + `logs/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetLogResponseContent, rawResponse: _response.rawResponse }; @@ -292,7 +287,7 @@ export class Logs { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/logs/client/index.ts b/src/management/api/resources/logs/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/logs/client/index.ts +++ b/src/management/api/resources/logs/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/logs/client/requests/ListLogsRequestParameters.ts b/src/management/api/resources/logs/client/requests/ListLogsRequestParameters.ts deleted file mode 100644 index b6ddb5ecc1..0000000000 --- a/src/management/api/resources/logs/client/requests/ListLogsRequestParameters.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListLogsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Paging is disabled if parameter not sent. Default: 50. Max value: 100 */ - per_page?: number; - /** Field to use for sorting appended with :1 for ascending and :-1 for descending. e.g. date:-1 */ - sort?: string; - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false) */ - include_fields?: boolean; - /** Return results as an array when false (default). Return results inside an object that also contains a total result count when true. */ - include_totals?: boolean; - /** Query in Lucene query string syntax. */ - q?: string; -} diff --git a/src/management/api/resources/logs/client/requests/index.ts b/src/management/api/resources/logs/client/requests/index.ts deleted file mode 100644 index f4f432d770..0000000000 --- a/src/management/api/resources/logs/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListLogsRequestParameters } from "./ListLogsRequestParameters.js"; diff --git a/src/management/api/resources/networkAcls/client/Client.ts b/src/management/api/resources/networkAcls/client/Client.ts index 8b5ffa2e81..465b778887 100644 --- a/src/management/api/resources/networkAcls/client/Client.ts +++ b/src/management/api/resources/networkAcls/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace NetworkAcls { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class NetworkAcls { @@ -52,30 +32,39 @@ export class NetworkAcls { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.networkAcls.list() + * await client.networkAcls.list({ + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( request: Management.ListNetworkAclsRequestParameters = {}, requestOptions?: NetworkAcls.RequestOptions, - ): Promise> { + ): Promise< + core.Page + > { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListNetworkAclsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:network_acls"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -88,10 +77,10 @@ export class NetworkAcls { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -142,9 +131,9 @@ export class NetworkAcls { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListNetworkAclsOffsetPaginatedResponseContent, - Management.NetworkAclsResponseContent + return new core.Page< + Management.NetworkAclsResponseContent, + Management.ListNetworkAclsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -192,9 +181,12 @@ export class NetworkAcls { request: Management.CreateNetworkAclRequestContent, requestOptions?: NetworkAcls.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:network_acls"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -210,9 +202,10 @@ export class NetworkAcls { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -283,9 +276,12 @@ export class NetworkAcls { id: string, requestOptions?: NetworkAcls.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:network_acls"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -293,14 +289,15 @@ export class NetworkAcls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `network-acls/${encodeURIComponent(id)}`, + `network-acls/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -382,9 +379,12 @@ export class NetworkAcls { request: Management.SetNetworkAclRequestContent, requestOptions?: NetworkAcls.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:network_acls"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -392,7 +392,7 @@ export class NetworkAcls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `network-acls/${encodeURIComponent(id)}`, + `network-acls/${core.url.encodePathParam(id)}`, ), method: "PUT", headers: _headers, @@ -400,9 +400,10 @@ export class NetworkAcls { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -472,9 +473,12 @@ export class NetworkAcls { id: string, requestOptions?: NetworkAcls.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:network_acls"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -482,14 +486,15 @@ export class NetworkAcls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `network-acls/${encodeURIComponent(id)}`, + `network-acls/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -562,9 +567,12 @@ export class NetworkAcls { request: Management.UpdateNetworkAclRequestContent = {}, requestOptions?: NetworkAcls.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:network_acls"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -572,7 +580,7 @@ export class NetworkAcls { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `network-acls/${encodeURIComponent(id)}`, + `network-acls/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -580,9 +588,10 @@ export class NetworkAcls { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -629,7 +638,7 @@ export class NetworkAcls { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/networkAcls/client/index.ts b/src/management/api/resources/networkAcls/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/networkAcls/client/index.ts +++ b/src/management/api/resources/networkAcls/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/networkAcls/client/requests/CreateNetworkAclRequestContent.ts b/src/management/api/resources/networkAcls/client/requests/CreateNetworkAclRequestContent.ts deleted file mode 100644 index 55553690ed..0000000000 --- a/src/management/api/resources/networkAcls/client/requests/CreateNetworkAclRequestContent.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * description: "description", - * active: true, - * priority: 1.1, - * rule: { - * action: {}, - * scope: "management" - * } - * } - */ -export interface CreateNetworkAclRequestContent { - description: string; - /** Indicates whether or not this access control list is actively being used */ - active: boolean; - /** Indicates the order in which the ACL will be evaluated relative to other ACL rules. */ - priority: number; - rule: Management.NetworkAclRule; -} diff --git a/src/management/api/resources/networkAcls/client/requests/ListNetworkAclsRequestParameters.ts b/src/management/api/resources/networkAcls/client/requests/ListNetworkAclsRequestParameters.ts deleted file mode 100644 index 2099a8baa8..0000000000 --- a/src/management/api/resources/networkAcls/client/requests/ListNetworkAclsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListNetworkAclsRequestParameters { - /** Use this field to request a specific page of the list results. */ - page?: number; - /** The amount of results per page. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/networkAcls/client/requests/SetNetworkAclRequestContent.ts b/src/management/api/resources/networkAcls/client/requests/SetNetworkAclRequestContent.ts deleted file mode 100644 index 5a773120c6..0000000000 --- a/src/management/api/resources/networkAcls/client/requests/SetNetworkAclRequestContent.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * description: "description", - * active: true, - * priority: 1.1, - * rule: { - * action: {}, - * scope: "management" - * } - * } - */ -export interface SetNetworkAclRequestContent { - description: string; - /** Indicates whether or not this access control list is actively being used */ - active: boolean; - /** Indicates the order in which the ACL will be evaluated relative to other ACL rules. */ - priority: number; - rule: Management.NetworkAclRule; -} diff --git a/src/management/api/resources/networkAcls/client/requests/UpdateNetworkAclRequestContent.ts b/src/management/api/resources/networkAcls/client/requests/UpdateNetworkAclRequestContent.ts deleted file mode 100644 index b31353c647..0000000000 --- a/src/management/api/resources/networkAcls/client/requests/UpdateNetworkAclRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateNetworkAclRequestContent { - description?: string; - /** Indicates whether or not this access control list is actively being used */ - active?: boolean; - /** Indicates the order in which the ACL will be evaluated relative to other ACL rules. */ - priority?: number; - rule?: Management.NetworkAclRule; -} diff --git a/src/management/api/resources/networkAcls/client/requests/index.ts b/src/management/api/resources/networkAcls/client/requests/index.ts deleted file mode 100644 index 22137cf3a6..0000000000 --- a/src/management/api/resources/networkAcls/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListNetworkAclsRequestParameters } from "./ListNetworkAclsRequestParameters.js"; -export { type CreateNetworkAclRequestContent } from "./CreateNetworkAclRequestContent.js"; -export { type SetNetworkAclRequestContent } from "./SetNetworkAclRequestContent.js"; -export { type UpdateNetworkAclRequestContent } from "./UpdateNetworkAclRequestContent.js"; diff --git a/src/management/api/resources/organizations/client/Client.ts b/src/management/api/resources/organizations/client/Client.ts index 5ebde67a89..82ff68bf36 100644 --- a/src/management/api/resources/organizations/client/Client.ts +++ b/src/management/api/resources/organizations/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -13,28 +12,9 @@ import { Invitations } from "../resources/invitations/client/Client.js"; import { Members } from "../resources/members/client/Client.js"; export declare namespace Organizations { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Organizations { @@ -94,30 +74,40 @@ export class Organizations { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.list() + * await client.organizations.list({ + * from: "from", + * take: 1, + * sort: "sort" + * }) */ public async list( request: Management.ListOrganizationsRequestParameters = {}, requestOptions?: Organizations.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListOrganizationsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:organizations", "read:organizations_summary"] }, + ], + }; const { from: from_, take = 50, sort } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } - if (sort != null) { + if (sort !== undefined) { _queryParams["sort"] = sort; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -130,10 +120,10 @@ export class Organizations { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -186,7 +176,7 @@ export class Organizations { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => @@ -226,9 +216,15 @@ export class Organizations { request: Management.CreateOrganizationRequestContent, requestOptions?: Organizations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["create:organizations", "create:organization_connections"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -244,9 +240,10 @@ export class Organizations { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -318,9 +315,12 @@ export class Organizations { name: string, requestOptions?: Organizations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organizations"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -328,14 +328,15 @@ export class Organizations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/name/${encodeURIComponent(name)}`, + `organizations/name/${core.url.encodePathParam(name)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -407,9 +408,15 @@ export class Organizations { id: string, requestOptions?: Organizations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:organizations", "read:organizations_summary"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -417,14 +424,15 @@ export class Organizations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}`, + `organizations/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -494,9 +502,12 @@ export class Organizations { id: string, requestOptions?: Organizations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:organizations"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -504,14 +515,15 @@ export class Organizations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}`, + `organizations/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -583,9 +595,12 @@ export class Organizations { request: Management.UpdateOrganizationRequestContent = {}, requestOptions?: Organizations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:organizations"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -593,7 +608,7 @@ export class Organizations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}`, + `organizations/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -601,9 +616,10 @@ export class Organizations { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -648,7 +664,7 @@ export class Organizations { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/organizations/client/index.ts b/src/management/api/resources/organizations/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/organizations/client/index.ts +++ b/src/management/api/resources/organizations/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/organizations/client/requests/CreateOrganizationRequestContent.ts b/src/management/api/resources/organizations/client/requests/CreateOrganizationRequestContent.ts deleted file mode 100644 index 397def6346..0000000000 --- a/src/management/api/resources/organizations/client/requests/CreateOrganizationRequestContent.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name" - * } - */ -export interface CreateOrganizationRequestContent { - /** The name of this organization. */ - name: string; - /** Friendly name of this organization. */ - display_name?: string; - branding?: Management.OrganizationBranding; - metadata?: Management.OrganizationMetadata; - /** Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed) */ - enabled_connections?: Management.ConnectionForOrganization[]; - token_quota?: Management.CreateTokenQuota; -} diff --git a/src/management/api/resources/organizations/client/requests/ListOrganizationsRequestParameters.ts b/src/management/api/resources/organizations/client/requests/ListOrganizationsRequestParameters.ts deleted file mode 100644 index ebce21145d..0000000000 --- a/src/management/api/resources/organizations/client/requests/ListOrganizationsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListOrganizationsRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; - /** Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1. We currently support sorting by the following fields: name, display_name and created_at. */ - sort?: string; -} diff --git a/src/management/api/resources/organizations/client/requests/UpdateOrganizationRequestContent.ts b/src/management/api/resources/organizations/client/requests/UpdateOrganizationRequestContent.ts deleted file mode 100644 index acc8a70ddf..0000000000 --- a/src/management/api/resources/organizations/client/requests/UpdateOrganizationRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateOrganizationRequestContent { - /** Friendly name of this organization. */ - display_name?: string; - /** The name of this organization. */ - name?: string; - branding?: Management.OrganizationBranding; - metadata?: Management.OrganizationMetadata; - token_quota?: Management.UpdateTokenQuota; -} diff --git a/src/management/api/resources/organizations/client/requests/index.ts b/src/management/api/resources/organizations/client/requests/index.ts deleted file mode 100644 index 4e665288a4..0000000000 --- a/src/management/api/resources/organizations/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListOrganizationsRequestParameters } from "./ListOrganizationsRequestParameters.js"; -export { type CreateOrganizationRequestContent } from "./CreateOrganizationRequestContent.js"; -export { type UpdateOrganizationRequestContent } from "./UpdateOrganizationRequestContent.js"; 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 60caedc4f1..c7229c751f 100644 --- a/src/management/api/resources/organizations/resources/clientGrants/client/Client.ts +++ b/src/management/api/resources/organizations/resources/clientGrants/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace ClientGrants { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class ClientGrants { @@ -51,17 +31,31 @@ export class ClientGrants { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.clientGrants.list("id") + * await client.organizations.clientGrants.list("id", { + * audience: "audience", + * client_id: "client_id", + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListOrganizationClientGrantsRequestParameters = {}, requestOptions?: ClientGrants.RequestOptions, - ): Promise> { + ): Promise< + core.Page< + Management.OrganizationClientGrant, + Management.ListOrganizationClientGrantsOffsetPaginatedResponseContent + > + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.organizations.ListOrganizationClientGrantsRequestParameters, + request: Management.ListOrganizationClientGrantsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_client_grants"] }], + }; const { audience, client_id: clientId, @@ -71,31 +65,31 @@ export class ClientGrants { include_totals: includeTotals = true, } = request; const _queryParams: Record = {}; - if (audience != null) { + if (audience !== undefined) { _queryParams["audience"] = audience; } - if (clientId != null) { + if (clientId !== undefined) { _queryParams["client_id"] = clientId; } - if (grantIds != null) { + if (grantIds !== undefined) { if (Array.isArray(grantIds)) { _queryParams["grant_ids"] = grantIds.map((item) => item); } else { _queryParams["grant_ids"] = grantIds; } } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -103,15 +97,15 @@ export class ClientGrants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/client-grants`, + `organizations/${core.url.encodePathParam(id)}/client-grants`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -167,9 +161,9 @@ export class ClientGrants { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListOrganizationClientGrantsOffsetPaginatedResponseContent, - Management.OrganizationClientGrant + return new core.Page< + Management.OrganizationClientGrant, + Management.ListOrganizationClientGrantsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -212,9 +206,12 @@ export class ClientGrants { request: Management.AssociateOrganizationClientGrantRequestContent, requestOptions?: ClientGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:organization_client_grants"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -222,7 +219,7 @@ export class ClientGrants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/client-grants`, + `organizations/${core.url.encodePathParam(id)}/client-grants`, ), method: "POST", headers: _headers, @@ -230,9 +227,10 @@ export class ClientGrants { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -310,9 +308,12 @@ export class ClientGrants { grantId: string, requestOptions?: ClientGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:organization_client_grants"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -320,14 +321,15 @@ export class ClientGrants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/client-grants/${encodeURIComponent(grantId)}`, + `organizations/${core.url.encodePathParam(id)}/client-grants/${core.url.encodePathParam(grantId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -373,7 +375,7 @@ export class ClientGrants { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/organizations/resources/clientGrants/client/index.ts b/src/management/api/resources/organizations/resources/clientGrants/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/organizations/resources/clientGrants/client/index.ts +++ b/src/management/api/resources/organizations/resources/clientGrants/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/organizations/resources/clientGrants/client/requests/AssociateOrganizationClientGrantRequestContent.ts b/src/management/api/resources/organizations/resources/clientGrants/client/requests/AssociateOrganizationClientGrantRequestContent.ts deleted file mode 100644 index c891b65f8a..0000000000 --- a/src/management/api/resources/organizations/resources/clientGrants/client/requests/AssociateOrganizationClientGrantRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * grant_id: "grant_id" - * } - */ -export interface AssociateOrganizationClientGrantRequestContent { - /** A Client Grant ID to add to the organization. */ - grant_id: string; -} diff --git a/src/management/api/resources/organizations/resources/clientGrants/client/requests/ListOrganizationClientGrantsRequestParameters.ts b/src/management/api/resources/organizations/resources/clientGrants/client/requests/ListOrganizationClientGrantsRequestParameters.ts deleted file mode 100644 index 0c5b20a3db..0000000000 --- a/src/management/api/resources/organizations/resources/clientGrants/client/requests/ListOrganizationClientGrantsRequestParameters.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListOrganizationClientGrantsRequestParameters { - /** Optional filter on audience of the client grant. */ - audience?: string; - /** Optional filter on client_id of the client grant. */ - client_id?: string; - /** Optional filter on the ID of the client grant. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../client-grants?grant_ids=id1&grant_ids=id2 */ - grant_ids?: string | string[]; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/clientGrants/client/requests/index.ts b/src/management/api/resources/organizations/resources/clientGrants/client/requests/index.ts deleted file mode 100644 index 1929c2a13f..0000000000 --- a/src/management/api/resources/organizations/resources/clientGrants/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListOrganizationClientGrantsRequestParameters } from "./ListOrganizationClientGrantsRequestParameters.js"; -export { type AssociateOrganizationClientGrantRequestContent } from "./AssociateOrganizationClientGrantRequestContent.js"; 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 477bf858e8..ea9e6f67df 100644 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/Client.ts +++ b/src/management/api/resources/organizations/resources/enabledConnections/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace EnabledConnections { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class EnabledConnections { @@ -53,31 +33,43 @@ export class EnabledConnections { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.enabledConnections.list("id") + * await client.organizations.enabledConnections.list("id", { + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListOrganizationConnectionsRequestParameters = {}, requestOptions?: EnabledConnections.RequestOptions, - ): Promise> { + ): Promise< + core.Page< + Management.OrganizationConnection, + Management.ListOrganizationConnectionsOffsetPaginatedResponseContent + > + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.organizations.ListOrganizationConnectionsRequestParameters, + request: Management.ListOrganizationConnectionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_connections"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -85,15 +77,15 @@ export class EnabledConnections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/enabled_connections`, + `organizations/${core.url.encodePathParam(id)}/enabled_connections`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -149,9 +141,9 @@ export class EnabledConnections { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListOrganizationConnectionsOffsetPaginatedResponseContent, - Management.OrganizationConnection + return new core.Page< + Management.OrganizationConnection, + Management.ListOrganizationConnectionsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -196,9 +188,12 @@ export class EnabledConnections { request: Management.AddOrganizationConnectionRequestContent, requestOptions?: EnabledConnections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:organization_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -206,7 +201,7 @@ export class EnabledConnections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/enabled_connections`, + `organizations/${core.url.encodePathParam(id)}/enabled_connections`, ), method: "POST", headers: _headers, @@ -214,9 +209,10 @@ export class EnabledConnections { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -290,9 +286,12 @@ export class EnabledConnections { connectionId: string, requestOptions?: EnabledConnections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -300,14 +299,15 @@ export class EnabledConnections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/enabled_connections/${encodeURIComponent(connectionId)}`, + `organizations/${core.url.encodePathParam(id)}/enabled_connections/${core.url.encodePathParam(connectionId)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -382,9 +382,12 @@ export class EnabledConnections { connectionId: string, requestOptions?: EnabledConnections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:organization_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -392,14 +395,15 @@ export class EnabledConnections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/enabled_connections/${encodeURIComponent(connectionId)}`, + `organizations/${core.url.encodePathParam(id)}/enabled_connections/${core.url.encodePathParam(connectionId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -474,9 +478,12 @@ export class EnabledConnections { request: Management.UpdateOrganizationConnectionRequestContent = {}, requestOptions?: EnabledConnections.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:organization_connections"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -484,7 +491,7 @@ export class EnabledConnections { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/enabled_connections/${encodeURIComponent(connectionId)}`, + `organizations/${core.url.encodePathParam(id)}/enabled_connections/${core.url.encodePathParam(connectionId)}`, ), method: "PATCH", headers: _headers, @@ -492,9 +499,10 @@ export class EnabledConnections { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -541,7 +549,7 @@ export class EnabledConnections { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/organizations/resources/enabledConnections/client/index.ts b/src/management/api/resources/organizations/resources/enabledConnections/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/index.ts +++ b/src/management/api/resources/organizations/resources/enabledConnections/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/AddOrganizationConnectionRequestContent.ts b/src/management/api/resources/organizations/resources/enabledConnections/client/requests/AddOrganizationConnectionRequestContent.ts deleted file mode 100644 index 65756b7a1c..0000000000 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/AddOrganizationConnectionRequestContent.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * connection_id: "connection_id" - * } - */ -export interface AddOrganizationConnectionRequestContent { - /** Single connection ID to add to the organization. */ - connection_id: string; - /** When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection. */ - assign_membership_on_login?: boolean; - /** Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. */ - is_signup_enabled?: boolean; - /** Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. */ - show_as_button?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/ListOrganizationConnectionsRequestParameters.ts b/src/management/api/resources/organizations/resources/enabledConnections/client/requests/ListOrganizationConnectionsRequestParameters.ts deleted file mode 100644 index 4714ebf9ba..0000000000 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/ListOrganizationConnectionsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListOrganizationConnectionsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/UpdateOrganizationConnectionRequestContent.ts b/src/management/api/resources/organizations/resources/enabledConnections/client/requests/UpdateOrganizationConnectionRequestContent.ts deleted file mode 100644 index ee13bd748f..0000000000 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/UpdateOrganizationConnectionRequestContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateOrganizationConnectionRequestContent { - /** When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection. */ - assign_membership_on_login?: boolean; - /** Determines whether organization signup should be enabled for this organization connection. Only applicable for database connections. Default: false. */ - is_signup_enabled?: boolean; - /** Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections. Default: true. */ - show_as_button?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/index.ts b/src/management/api/resources/organizations/resources/enabledConnections/client/requests/index.ts deleted file mode 100644 index deeec038ed..0000000000 --- a/src/management/api/resources/organizations/resources/enabledConnections/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListOrganizationConnectionsRequestParameters } from "./ListOrganizationConnectionsRequestParameters.js"; -export { type AddOrganizationConnectionRequestContent } from "./AddOrganizationConnectionRequestContent.js"; -export { type UpdateOrganizationConnectionRequestContent } from "./UpdateOrganizationConnectionRequestContent.js"; diff --git a/src/management/api/resources/organizations/resources/index.ts b/src/management/api/resources/organizations/resources/index.ts index b642fa04b1..a82cbb312a 100644 --- a/src/management/api/resources/organizations/resources/index.ts +++ b/src/management/api/resources/organizations/resources/index.ts @@ -2,7 +2,3 @@ export * as clientGrants from "./clientGrants/index.js"; export * as enabledConnections from "./enabledConnections/index.js"; export * as invitations from "./invitations/index.js"; export * as members from "./members/index.js"; -export * from "./clientGrants/client/requests/index.js"; -export * from "./enabledConnections/client/requests/index.js"; -export * from "./invitations/client/requests/index.js"; -export * from "./members/client/requests/index.js"; 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 9850c50a52..48cfd90ce4 100644 --- a/src/management/api/resources/organizations/resources/invitations/client/Client.ts +++ b/src/management/api/resources/organizations/resources/invitations/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Invitations { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Invitations { @@ -54,17 +34,32 @@ export class Invitations { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.invitations.list("id") + * await client.organizations.invitations.list("id", { + * page: 1, + * per_page: 1, + * include_totals: true, + * fields: "fields", + * include_fields: true, + * sort: "sort" + * }) */ public async list( id: string, request: Management.ListOrganizationInvitationsRequestParameters = {}, requestOptions?: Invitations.RequestOptions, - ): Promise> { + ): Promise< + core.Page< + Management.OrganizationInvitation, + Management.ListOrganizationInvitationsOffsetPaginatedResponseContent + > + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.organizations.ListOrganizationInvitationsRequestParameters, + request: Management.ListOrganizationInvitationsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_invitations"] }], + }; const { page = 0, per_page: perPage = 50, @@ -74,27 +69,27 @@ export class Invitations { sort, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } - if (sort != null) { + if (sort !== undefined) { _queryParams["sort"] = sort; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -102,15 +97,15 @@ export class Invitations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/invitations`, + `organizations/${core.url.encodePathParam(id)}/invitations`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -168,9 +163,9 @@ export class Invitations { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListOrganizationInvitationsOffsetPaginatedResponseContent, - Management.OrganizationInvitation + return new core.Page< + Management.OrganizationInvitation, + Management.ListOrganizationInvitationsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -220,9 +215,12 @@ export class Invitations { request: Management.CreateOrganizationInvitationRequestContent, requestOptions?: Invitations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:organization_invitations"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -230,7 +228,7 @@ export class Invitations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/invitations`, + `organizations/${core.url.encodePathParam(id)}/invitations`, ), method: "POST", headers: _headers, @@ -238,9 +236,10 @@ export class Invitations { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -302,7 +301,10 @@ export class Invitations { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.invitations.get("id", "invitation_id") + * await client.organizations.invitations.get("id", "invitation_id", { + * fields: "fields", + * include_fields: true + * }) */ public get( id: string, @@ -319,19 +321,22 @@ export class Invitations { request: Management.GetOrganizationInvitationRequestParameters = {}, requestOptions?: Invitations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_invitations"] }], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -339,14 +344,15 @@ export class Invitations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/invitations/${encodeURIComponent(invitationId)}`, + `organizations/${core.url.encodePathParam(id)}/invitations/${core.url.encodePathParam(invitationId)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -421,9 +427,12 @@ export class Invitations { invitationId: string, requestOptions?: Invitations.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:organization_invitations"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -431,14 +440,15 @@ export class Invitations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/invitations/${encodeURIComponent(invitationId)}`, + `organizations/${core.url.encodePathParam(id)}/invitations/${core.url.encodePathParam(invitationId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -482,7 +492,7 @@ export class Invitations { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/organizations/resources/invitations/client/index.ts b/src/management/api/resources/organizations/resources/invitations/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/organizations/resources/invitations/client/index.ts +++ b/src/management/api/resources/organizations/resources/invitations/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/organizations/resources/invitations/client/requests/CreateOrganizationInvitationRequestContent.ts b/src/management/api/resources/organizations/resources/invitations/client/requests/CreateOrganizationInvitationRequestContent.ts deleted file mode 100644 index fa328f3d56..0000000000 --- a/src/management/api/resources/organizations/resources/invitations/client/requests/CreateOrganizationInvitationRequestContent.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * inviter: { - * name: "name" - * }, - * invitee: { - * email: "email" - * }, - * client_id: "client_id" - * } - */ -export interface CreateOrganizationInvitationRequestContent { - inviter: Management.OrganizationInvitationInviter; - invitee: Management.OrganizationInvitationInvitee; - /** Auth0 client ID. Used to resolve the application's login initiation endpoint. */ - client_id: string; - /** The id of the connection to force invitee to authenticate with. */ - connection_id?: string; - app_metadata?: Management.AppMetadata; - user_metadata?: Management.UserMetadata; - /** Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days). */ - ttl_sec?: number; - /** List of roles IDs to associated with the user. */ - roles?: string[]; - /** Whether the user will receive an invitation email (true) or no email (false), true by default */ - send_invitation_email?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/invitations/client/requests/GetOrganizationInvitationRequestParameters.ts b/src/management/api/resources/organizations/resources/invitations/client/requests/GetOrganizationInvitationRequestParameters.ts deleted file mode 100644 index ef7368bf40..0000000000 --- a/src/management/api/resources/organizations/resources/invitations/client/requests/GetOrganizationInvitationRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetOrganizationInvitationRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/invitations/client/requests/ListOrganizationInvitationsRequestParameters.ts b/src/management/api/resources/organizations/resources/invitations/client/requests/ListOrganizationInvitationsRequestParameters.ts deleted file mode 100644 index 90066c57b4..0000000000 --- a/src/management/api/resources/organizations/resources/invitations/client/requests/ListOrganizationInvitationsRequestParameters.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListOrganizationInvitationsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** When true, return results inside an object that also contains the start and limit. When false (default), a direct array of results is returned. We do not yet support returning the total invitations count. */ - include_totals?: boolean; - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ - include_fields?: boolean; - /** Field to sort by. Use field:order where order is 1 for ascending and -1 for descending Defaults to created_at:-1. */ - sort?: string; -} diff --git a/src/management/api/resources/organizations/resources/invitations/client/requests/index.ts b/src/management/api/resources/organizations/resources/invitations/client/requests/index.ts deleted file mode 100644 index 68abb338a0..0000000000 --- a/src/management/api/resources/organizations/resources/invitations/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListOrganizationInvitationsRequestParameters } from "./ListOrganizationInvitationsRequestParameters.js"; -export { type CreateOrganizationInvitationRequestContent } from "./CreateOrganizationInvitationRequestContent.js"; -export { type GetOrganizationInvitationRequestParameters } from "./GetOrganizationInvitationRequestParameters.js"; 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 36e8617438..80193724cc 100644 --- a/src/management/api/resources/organizations/resources/members/client/Client.ts +++ b/src/management/api/resources/organizations/resources/members/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -10,28 +9,9 @@ import * as errors from "../../../../../../errors/index.js"; import { Roles } from "../resources/roles/client/Client.js"; export declare namespace Members { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Members { @@ -80,34 +60,42 @@ export class Members { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.members.list("id") + * await client.organizations.members.list("id", { + * from: "from", + * take: 1, + * fields: "fields", + * include_fields: true + * }) */ public async list( id: string, request: Management.ListOrganizationMembersRequestParameters = {}, requestOptions?: Members.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.organizations.ListOrganizationMembersRequestParameters, + request: Management.ListOrganizationMembersRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_members"] }], + }; const { from: from_, take = 50, fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -115,15 +103,15 @@ export class Members { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/members`, + `organizations/${core.url.encodePathParam(id)}/members`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -178,19 +166,18 @@ export class Members { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListOrganizationMembersPaginatedResponseContent, - Management.OrganizationMember - >({ - 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)); + 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)); + }, }, - }); + ); } /** @@ -225,9 +212,12 @@ export class Members { request: Management.CreateOrganizationMemberRequestContent, requestOptions?: Members.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:organization_members"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -235,7 +225,7 @@ export class Members { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/members`, + `organizations/${core.url.encodePathParam(id)}/members`, ), method: "POST", headers: _headers, @@ -243,9 +233,10 @@ export class Members { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -317,9 +308,12 @@ export class Members { request: Management.DeleteOrganizationMembersRequestContent, requestOptions?: Members.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:organization_members"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -327,7 +321,7 @@ export class Members { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/members`, + `organizations/${core.url.encodePathParam(id)}/members`, ), method: "DELETE", headers: _headers, @@ -335,9 +329,10 @@ export class Members { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -381,7 +376,7 @@ export class Members { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/organizations/resources/members/client/index.ts b/src/management/api/resources/organizations/resources/members/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/organizations/resources/members/client/index.ts +++ b/src/management/api/resources/organizations/resources/members/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/organizations/resources/members/client/requests/CreateOrganizationMemberRequestContent.ts b/src/management/api/resources/organizations/resources/members/client/requests/CreateOrganizationMemberRequestContent.ts deleted file mode 100644 index eddea51186..0000000000 --- a/src/management/api/resources/organizations/resources/members/client/requests/CreateOrganizationMemberRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * members: ["members"] - * } - */ -export interface CreateOrganizationMemberRequestContent { - /** List of user IDs to add to the organization as members. */ - members: string[]; -} diff --git a/src/management/api/resources/organizations/resources/members/client/requests/DeleteOrganizationMembersRequestContent.ts b/src/management/api/resources/organizations/resources/members/client/requests/DeleteOrganizationMembersRequestContent.ts deleted file mode 100644 index 7c0109444a..0000000000 --- a/src/management/api/resources/organizations/resources/members/client/requests/DeleteOrganizationMembersRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * members: ["members"] - * } - */ -export interface DeleteOrganizationMembersRequestContent { - /** List of user IDs to remove from the organization. */ - members: string[]; -} diff --git a/src/management/api/resources/organizations/resources/members/client/requests/ListOrganizationMembersRequestParameters.ts b/src/management/api/resources/organizations/resources/members/client/requests/ListOrganizationMembersRequestParameters.ts deleted file mode 100644 index 3343cf1ff6..0000000000 --- a/src/management/api/resources/organizations/resources/members/client/requests/ListOrganizationMembersRequestParameters.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListOrganizationMembersRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/members/client/requests/index.ts b/src/management/api/resources/organizations/resources/members/client/requests/index.ts deleted file mode 100644 index 02da9c9451..0000000000 --- a/src/management/api/resources/organizations/resources/members/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListOrganizationMembersRequestParameters } from "./ListOrganizationMembersRequestParameters.js"; -export { type CreateOrganizationMemberRequestContent } from "./CreateOrganizationMemberRequestContent.js"; -export { type DeleteOrganizationMembersRequestContent } from "./DeleteOrganizationMembersRequestContent.js"; diff --git a/src/management/api/resources/organizations/resources/members/resources/index.ts b/src/management/api/resources/organizations/resources/members/resources/index.ts index 8af6c96b2c..b36e075187 100644 --- a/src/management/api/resources/organizations/resources/members/resources/index.ts +++ b/src/management/api/resources/organizations/resources/members/resources/index.ts @@ -1,2 +1 @@ export * as roles from "./roles/index.js"; -export * from "./roles/client/requests/index.js"; 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 8bca5e6d5a..53ddf56adc 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Roles { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Roles { @@ -56,32 +36,39 @@ export class Roles { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.organizations.members.roles.list("id", "user_id") + * await client.organizations.members.roles.list("id", "user_id", { + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( id: string, userId: string, request: Management.ListOrganizationMemberRolesRequestParameters = {}, requestOptions?: Roles.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.organizations.members.ListOrganizationMemberRolesRequestParameters, + request: Management.ListOrganizationMemberRolesRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organization_member_roles"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -89,15 +76,15 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/members/${encodeURIComponent(userId)}/roles`, + `organizations/${core.url.encodePathParam(id)}/members/${core.url.encodePathParam(userId)}/roles`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -153,18 +140,16 @@ export class Roles { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable( - { - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => (response?.roles ?? []).length > 0, - getItems: (response) => response?.roles ?? [], - loadPage: (_response) => { - _offset += 1; - return list(core.setObjectProperty(request, "page", _offset)); - }, + return new core.Page({ + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => (response?.roles ?? []).length > 0, + getItems: (response) => response?.roles ?? [], + loadPage: (_response) => { + _offset += 1; + return list(core.setObjectProperty(request, "page", _offset)); }, - ); + }); } /** @@ -203,9 +188,12 @@ export class Roles { request: Management.AssignOrganizationMemberRolesRequestContent, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:organization_member_roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -213,7 +201,7 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/members/${encodeURIComponent(userId)}/roles`, + `organizations/${core.url.encodePathParam(id)}/members/${core.url.encodePathParam(userId)}/roles`, ), method: "POST", headers: _headers, @@ -221,9 +209,10 @@ export class Roles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -304,9 +293,12 @@ export class Roles { request: Management.DeleteOrganizationMemberRolesRequestContent, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:organization_member_roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -314,7 +306,7 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `organizations/${encodeURIComponent(id)}/members/${encodeURIComponent(userId)}/roles`, + `organizations/${core.url.encodePathParam(id)}/members/${core.url.encodePathParam(userId)}/roles`, ), method: "DELETE", headers: _headers, @@ -322,9 +314,10 @@ export class Roles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -368,7 +361,7 @@ export class Roles { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/organizations/resources/members/resources/roles/client/index.ts b/src/management/api/resources/organizations/resources/members/resources/roles/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/organizations/resources/members/resources/roles/client/index.ts +++ b/src/management/api/resources/organizations/resources/members/resources/roles/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/AssignOrganizationMemberRolesRequestContent.ts b/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/AssignOrganizationMemberRolesRequestContent.ts deleted file mode 100644 index f3113938d7..0000000000 --- a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/AssignOrganizationMemberRolesRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * roles: ["roles"] - * } - */ -export interface AssignOrganizationMemberRolesRequestContent { - /** List of roles IDs to associated with the user. */ - roles: string[]; -} diff --git a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/DeleteOrganizationMemberRolesRequestContent.ts b/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/DeleteOrganizationMemberRolesRequestContent.ts deleted file mode 100644 index 23643624c1..0000000000 --- a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/DeleteOrganizationMemberRolesRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * roles: ["roles"] - * } - */ -export interface DeleteOrganizationMemberRolesRequestContent { - /** List of roles IDs associated with the organization member to remove. */ - roles: string[]; -} diff --git a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/ListOrganizationMemberRolesRequestParameters.ts b/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/ListOrganizationMemberRolesRequestParameters.ts deleted file mode 100644 index 8d4702cdea..0000000000 --- a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/ListOrganizationMemberRolesRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListOrganizationMemberRolesRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/index.ts b/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/index.ts deleted file mode 100644 index e31015eb46..0000000000 --- a/src/management/api/resources/organizations/resources/members/resources/roles/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListOrganizationMemberRolesRequestParameters } from "./ListOrganizationMemberRolesRequestParameters.js"; -export { type AssignOrganizationMemberRolesRequestContent } from "./AssignOrganizationMemberRolesRequestContent.js"; -export { type DeleteOrganizationMemberRolesRequestContent } from "./DeleteOrganizationMemberRolesRequestContent.js"; diff --git a/src/management/api/resources/prompts/client/Client.ts b/src/management/api/resources/prompts/client/Client.ts index ebfd63e3a0..5e1c6c7173 100644 --- a/src/management/api/resources/prompts/client/Client.ts +++ b/src/management/api/resources/prompts/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -12,28 +11,9 @@ import { CustomText } from "../resources/customText/client/Client.js"; import { Partials } from "../resources/partials/client/Client.js"; export declare namespace Prompts { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Prompts { @@ -79,9 +59,12 @@ export class Prompts { private async __getSettings( requestOptions?: Prompts.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -94,9 +77,10 @@ export class Prompts { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -164,9 +148,12 @@ export class Prompts { request: Management.UpdateSettingsRequestContent = {}, requestOptions?: Prompts.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -182,9 +169,10 @@ export class Prompts { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -229,7 +217,7 @@ export class Prompts { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/prompts/client/index.ts b/src/management/api/resources/prompts/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/prompts/client/index.ts +++ b/src/management/api/resources/prompts/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/prompts/client/requests/UpdateSettingsRequestContent.ts b/src/management/api/resources/prompts/client/requests/UpdateSettingsRequestContent.ts deleted file mode 100644 index 76f3e46921..0000000000 --- a/src/management/api/resources/prompts/client/requests/UpdateSettingsRequestContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateSettingsRequestContent { - universal_login_experience?: Management.UniversalLoginExperienceEnum; - /** Whether identifier first is enabled or not */ - identifier_first?: boolean; - /** Use WebAuthn with Device Biometrics as the first authentication factor */ - webauthn_platform_first_factor?: boolean; -} diff --git a/src/management/api/resources/prompts/client/requests/index.ts b/src/management/api/resources/prompts/client/requests/index.ts deleted file mode 100644 index 883b647084..0000000000 --- a/src/management/api/resources/prompts/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateSettingsRequestContent } from "./UpdateSettingsRequestContent.js"; diff --git a/src/management/api/resources/prompts/resources/customText/client/Client.ts b/src/management/api/resources/prompts/resources/customText/client/Client.ts index 6383ff5276..7ac91a4020 100644 --- a/src/management/api/resources/prompts/resources/customText/client/Client.ts +++ b/src/management/api/resources/prompts/resources/customText/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace CustomText { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class CustomText { @@ -69,9 +49,12 @@ export class CustomText { language: Management.PromptLanguageEnum, requestOptions?: CustomText.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -79,14 +62,15 @@ export class CustomText { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `prompts/${encodeURIComponent(prompt)}/custom-text/${encodeURIComponent(language)}`, + `prompts/${core.url.encodePathParam(prompt)}/custom-text/${core.url.encodePathParam(language)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -168,9 +152,12 @@ export class CustomText { request: Management.SetsCustomTextsByLanguageRequestContent, requestOptions?: CustomText.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -178,7 +165,7 @@ export class CustomText { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `prompts/${encodeURIComponent(prompt)}/custom-text/${encodeURIComponent(language)}`, + `prompts/${core.url.encodePathParam(prompt)}/custom-text/${core.url.encodePathParam(language)}`, ), method: "PUT", headers: _headers, @@ -186,9 +173,10 @@ export class CustomText { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -232,7 +220,7 @@ export class CustomText { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/prompts/resources/index.ts b/src/management/api/resources/prompts/resources/index.ts index 0808e501b3..835350d858 100644 --- a/src/management/api/resources/prompts/resources/index.ts +++ b/src/management/api/resources/prompts/resources/index.ts @@ -1,4 +1,3 @@ export * as rendering from "./rendering/index.js"; export * as customText from "./customText/index.js"; export * as partials from "./partials/index.js"; -export * from "./rendering/client/requests/index.js"; diff --git a/src/management/api/resources/prompts/resources/partials/client/Client.ts b/src/management/api/resources/prompts/resources/partials/client/Client.ts index e72aa721cb..e887354de2 100644 --- a/src/management/api/resources/prompts/resources/partials/client/Client.ts +++ b/src/management/api/resources/prompts/resources/partials/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Partials { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Partials { @@ -66,9 +46,12 @@ export class Partials { prompt: Management.PartialGroupsEnum, requestOptions?: Partials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,14 +59,15 @@ export class Partials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `prompts/${encodeURIComponent(prompt)}/partials`, + `prompts/${core.url.encodePathParam(prompt)}/partials`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -162,9 +146,12 @@ export class Partials { request: Management.SetPartialsRequestContent, requestOptions?: Partials.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -172,7 +159,7 @@ export class Partials { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `prompts/${encodeURIComponent(prompt)}/partials`, + `prompts/${core.url.encodePathParam(prompt)}/partials`, ), method: "PUT", headers: _headers, @@ -180,9 +167,10 @@ export class Partials { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -226,7 +214,7 @@ export class Partials { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } 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 37db5478aa..7d8387a66b 100644 --- a/src/management/api/resources/prompts/resources/rendering/client/Client.ts +++ b/src/management/api/resources/prompts/resources/rendering/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Rendering { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Rendering { @@ -53,16 +33,28 @@ export class Rendering { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.prompts.rendering.list() + * await client.prompts.rendering.list({ + * fields: "fields", + * include_fields: true, + * page: 1, + * per_page: 1, + * include_totals: true, + * prompt: "prompt", + * screen: "screen", + * rendering_mode: "advanced" + * }) */ public async list( request: Management.ListAculsRequestParameters = {}, requestOptions?: Rendering.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.prompts.ListAculsRequestParameters, + request: Management.ListAculsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:prompts"] }], + }; const { fields, include_fields: includeFields, @@ -74,33 +66,33 @@ export class Rendering { rendering_mode: renderingMode, } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (prompt != null) { + if (prompt !== undefined) { _queryParams["prompt"] = prompt; } - if (screen != null) { + if (screen !== undefined) { _queryParams["screen"] = screen; } - if (renderingMode != null) { + if (renderingMode !== undefined) { _queryParams["rendering_mode"] = renderingMode; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -113,10 +105,10 @@ export class Rendering { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -177,7 +169,7 @@ export class Rendering { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.configs ?? []).length > 0, @@ -189,6 +181,137 @@ export class Rendering { }); } + /** + * Learn more about configuring render settings for advanced customization. + * + *

+ * Example head_tags array. See our documentation on using Liquid variables within head tags. + *

+ *
{
+     *   "head_tags": [
+     *     {
+     *       "tag": "script",
+     *       "attributes": {
+     *         "defer": true,
+     *         "src": "URL_TO_ASSET",
+     *         "async": true,
+     *         "integrity": [
+     *           "ASSET_SHA"
+     *         ]
+     *       }
+     *     },
+     *     {
+     *       "tag": "link",
+     *       "attributes": {
+     *         "href": "URL_TO_ASSET",
+     *         "rel": "stylesheet"
+     *       }
+     *     }
+     *   ]
+     * }
+     * 
+ * + * @param {Management.BulkUpdateAculRequestContent} request + * @param {Rendering.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.PaymentRequiredError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.prompts.rendering.bulkUpdate({ + * configs: [{ + * prompt: "login", + * screen: "login", + * rendering_mode: "advanced", + * head_tags: [{}] + * }] + * }) + */ + public bulkUpdate( + request: Management.BulkUpdateAculRequestContent, + requestOptions?: Rendering.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__bulkUpdate(request, requestOptions)); + } + + private async __bulkUpdate( + request: Management.BulkUpdateAculRequestContent, + requestOptions?: Rendering.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:prompts"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + "prompts/rendering", + ), + 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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.BulkUpdateAculResponseContent, + 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 402: + throw new Management.PaymentRequiredError(_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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError("Timeout exceeded when calling PATCH /prompts/rendering."); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + /** * Get render settings for a screen. * @@ -219,9 +342,12 @@ export class Rendering { screen: Management.ScreenGroupNameEnum, requestOptions?: Rendering.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -229,14 +355,15 @@ export class Rendering { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `prompts/${encodeURIComponent(prompt)}/screen/${encodeURIComponent(screen)}/rendering`, + `prompts/${core.url.encodePathParam(prompt)}/screen/${core.url.encodePathParam(screen)}/rendering`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetAculResponseContent, rawResponse: _response.rawResponse }; @@ -326,12 +453,15 @@ export class Rendering { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.prompts.rendering.update("login", "login") + * await client.prompts.rendering.update("login", "login", { + * rendering_mode: "advanced", + * head_tags: [{}] + * }) */ public update( prompt: Management.PromptGroupNameEnum, screen: Management.ScreenGroupNameEnum, - request: Management.UpdateAculRequestContent = {}, + request: Management.UpdateAculRequestContent, requestOptions?: Rendering.RequestOptions, ): core.HttpResponsePromise { return core.HttpResponsePromise.fromPromise(this.__update(prompt, screen, request, requestOptions)); @@ -340,12 +470,15 @@ export class Rendering { private async __update( prompt: Management.PromptGroupNameEnum, screen: Management.ScreenGroupNameEnum, - request: Management.UpdateAculRequestContent = {}, + request: Management.UpdateAculRequestContent, requestOptions?: Rendering.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:prompts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -353,7 +486,7 @@ export class Rendering { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `prompts/${encodeURIComponent(prompt)}/screen/${encodeURIComponent(screen)}/rendering`, + `prompts/${core.url.encodePathParam(prompt)}/screen/${core.url.encodePathParam(screen)}/rendering`, ), method: "PATCH", headers: _headers, @@ -361,9 +494,10 @@ export class Rendering { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateAculResponseContent, rawResponse: _response.rawResponse }; @@ -409,7 +543,7 @@ export class Rendering { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/prompts/resources/rendering/client/index.ts b/src/management/api/resources/prompts/resources/rendering/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/prompts/resources/rendering/client/index.ts +++ b/src/management/api/resources/prompts/resources/rendering/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/prompts/resources/rendering/client/requests/ListAculsRequestParameters.ts b/src/management/api/resources/prompts/resources/rendering/client/requests/ListAculsRequestParameters.ts deleted file mode 100644 index 42cf1c1989..0000000000 --- a/src/management/api/resources/prompts/resources/rendering/client/requests/ListAculsRequestParameters.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListAculsRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (default: true) or excluded (false). */ - include_fields?: boolean; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Maximum value is 100, default value is 50. */ - per_page?: number; - /** Return results inside an object that contains the total configuration count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Name of the prompt to filter by */ - prompt?: string; - /** Name of the screen to filter by */ - screen?: string; - /** Rendering mode to filter by */ - rendering_mode?: Management.AculRenderingModeEnum; -} diff --git a/src/management/api/resources/prompts/resources/rendering/client/requests/UpdateAculRequestContent.ts b/src/management/api/resources/prompts/resources/rendering/client/requests/UpdateAculRequestContent.ts deleted file mode 100644 index 9c24b47f0a..0000000000 --- a/src/management/api/resources/prompts/resources/rendering/client/requests/UpdateAculRequestContent.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateAculRequestContent { - rendering_mode?: Management.AculRenderingModeEnum; - /** Context values to make available */ - context_configuration?: string[]; - /** Override Universal Login default head tags */ - default_head_tags_disabled?: boolean; - /** An array of head tags */ - head_tags?: Management.AculHeadTag[]; - filters?: Management.AculFilters; - /** Use page template with ACUL */ - use_page_template?: boolean; -} diff --git a/src/management/api/resources/prompts/resources/rendering/client/requests/index.ts b/src/management/api/resources/prompts/resources/rendering/client/requests/index.ts deleted file mode 100644 index f9582bb3d0..0000000000 --- a/src/management/api/resources/prompts/resources/rendering/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListAculsRequestParameters } from "./ListAculsRequestParameters.js"; -export { type UpdateAculRequestContent } from "./UpdateAculRequestContent.js"; diff --git a/src/management/api/resources/refreshTokens/client/Client.ts b/src/management/api/resources/refreshTokens/client/Client.ts index b3924f7591..a317b13ba5 100644 --- a/src/management/api/resources/refreshTokens/client/Client.ts +++ b/src/management/api/resources/refreshTokens/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace RefreshTokens { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class RefreshTokens { @@ -65,9 +45,12 @@ export class RefreshTokens { id: string, requestOptions?: RefreshTokens.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:refresh_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -75,14 +58,15 @@ export class RefreshTokens { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `refresh-tokens/${encodeURIComponent(id)}`, + `refresh-tokens/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -149,9 +133,12 @@ export class RefreshTokens { id: string, requestOptions?: RefreshTokens.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:refresh_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -159,14 +146,15 @@ export class RefreshTokens { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `refresh-tokens/${encodeURIComponent(id)}`, + `refresh-tokens/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -208,7 +196,7 @@ export class RefreshTokens { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/resourceServers/client/Client.ts b/src/management/api/resources/resourceServers/client/Client.ts index 1f0a107aea..464d315301 100644 --- a/src/management/api/resources/resourceServers/client/Client.ts +++ b/src/management/api/resources/resourceServers/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace ResourceServers { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class ResourceServers { @@ -52,16 +32,24 @@ export class ResourceServers { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.resourceServers.list() + * await client.resourceServers.list({ + * page: 1, + * per_page: 1, + * include_totals: true, + * include_fields: true + * }) */ public async list( request: Management.ListResourceServerRequestParameters = {}, requestOptions?: ResourceServers.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListResourceServerRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:resource_servers"] }], + }; const { identifiers, page = 0, @@ -70,28 +58,28 @@ export class ResourceServers { include_fields: includeFields, } = request; const _queryParams: Record = {}; - if (identifiers != null) { + if (identifiers !== undefined) { if (Array.isArray(identifiers)) { _queryParams["identifiers"] = identifiers.map((item) => item); } else { _queryParams["identifiers"] = identifiers; } } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -104,10 +92,10 @@ export class ResourceServers { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -161,10 +149,7 @@ export class ResourceServers { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListResourceServerOffsetPaginatedResponseContent, - Management.ResourceServer - >({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.resource_servers ?? []).length > 0, @@ -204,9 +189,12 @@ export class ResourceServers { request: Management.CreateResourceServerRequestContent, requestOptions?: ResourceServers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:resource_servers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -222,9 +210,10 @@ export class ResourceServers { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -285,7 +274,9 @@ export class ResourceServers { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.resourceServers.get("id") + * await client.resourceServers.get("id", { + * include_fields: true + * }) */ public get( id: string, @@ -300,15 +291,18 @@ export class ResourceServers { request: Management.GetResourceServerRequestParameters = {}, requestOptions?: ResourceServers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:resource_servers"] }], + }; const { include_fields: includeFields } = request; const _queryParams: Record = {}; - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -316,14 +310,15 @@ export class ResourceServers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `resource-servers/${encodeURIComponent(id)}`, + `resource-servers/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -392,9 +387,12 @@ export class ResourceServers { id: string, requestOptions?: ResourceServers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:resource_servers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -402,14 +400,15 @@ export class ResourceServers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `resource-servers/${encodeURIComponent(id)}`, + `resource-servers/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -480,9 +479,12 @@ export class ResourceServers { request: Management.UpdateResourceServerRequestContent = {}, requestOptions?: ResourceServers.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:resource_servers"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -490,7 +492,7 @@ export class ResourceServers { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `resource-servers/${encodeURIComponent(id)}`, + `resource-servers/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -498,9 +500,10 @@ export class ResourceServers { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -547,7 +550,7 @@ export class ResourceServers { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/resourceServers/client/index.ts b/src/management/api/resources/resourceServers/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/resourceServers/client/index.ts +++ b/src/management/api/resources/resourceServers/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/resourceServers/client/requests/CreateResourceServerRequestContent.ts b/src/management/api/resources/resourceServers/client/requests/CreateResourceServerRequestContent.ts deleted file mode 100644 index 45a2ef132d..0000000000 --- a/src/management/api/resources/resourceServers/client/requests/CreateResourceServerRequestContent.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * identifier: "identifier" - * } - */ -export interface CreateResourceServerRequestContent { - /** Friendly name for this resource server. Can not contain `<` or `>` characters. */ - name?: string; - /** Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set. */ - identifier: string; - /** List of permissions (scopes) that this API uses. */ - scopes?: Management.ResourceServerScope[]; - signing_alg?: Management.SigningAlgorithmEnum; - /** Secret used to sign tokens when using symmetric algorithms (HS256). */ - signing_secret?: string; - /** Whether refresh tokens can be issued for this API (true) or not (false). */ - allow_offline_access?: boolean; - /** Expiration value (in seconds) for access tokens issued for this API from the token endpoint. */ - token_lifetime?: number; - token_dialect?: Management.ResourceServerTokenDialectSchemaEnum; - /** Whether to skip user consent for applications flagged as first party (true) or not (false). */ - skip_consent_for_verifiable_first_party_clients?: boolean; - /** Whether to enforce authorization policies (true) or to ignore them (false). */ - enforce_policies?: boolean; - token_encryption?: Management.ResourceServerTokenEncryption; - consent_policy?: Management.ResourceServerConsentPolicyEnum | undefined; - authorization_details?: unknown[]; - proof_of_possession?: Management.ResourceServerProofOfPossession; - subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; -} diff --git a/src/management/api/resources/resourceServers/client/requests/GetResourceServerRequestParameters.ts b/src/management/api/resources/resourceServers/client/requests/GetResourceServerRequestParameters.ts deleted file mode 100644 index 2e1613fc38..0000000000 --- a/src/management/api/resources/resourceServers/client/requests/GetResourceServerRequestParameters.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetResourceServerRequestParameters { - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/resourceServers/client/requests/ListResourceServerRequestParameters.ts b/src/management/api/resources/resourceServers/client/requests/ListResourceServerRequestParameters.ts deleted file mode 100644 index c6576d86c8..0000000000 --- a/src/management/api/resources/resourceServers/client/requests/ListResourceServerRequestParameters.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListResourceServerRequestParameters { - /** An optional filter on the resource server identifier. Must be URL encoded and may be specified multiple times (max 10).
e.g. ../resource-servers?identifiers=id1&identifiers=id2 */ - identifiers?: string | string[]; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/resourceServers/client/requests/UpdateResourceServerRequestContent.ts b/src/management/api/resources/resourceServers/client/requests/UpdateResourceServerRequestContent.ts deleted file mode 100644 index d0ab73fe45..0000000000 --- a/src/management/api/resources/resourceServers/client/requests/UpdateResourceServerRequestContent.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateResourceServerRequestContent { - /** Friendly name for this resource server. Can not contain `<` or `>` characters. */ - name?: string; - /** List of permissions (scopes) that this API uses. */ - scopes?: Management.ResourceServerScope[]; - signing_alg?: Management.SigningAlgorithmEnum; - /** Secret used to sign tokens when using symmetric algorithms (HS256). */ - signing_secret?: string; - /** Whether to skip user consent for applications flagged as first party (true) or not (false). */ - skip_consent_for_verifiable_first_party_clients?: boolean; - /** Whether refresh tokens can be issued for this API (true) or not (false). */ - allow_offline_access?: boolean; - /** Expiration value (in seconds) for access tokens issued for this API from the token endpoint. */ - token_lifetime?: number; - token_dialect?: Management.ResourceServerTokenDialectSchemaEnum; - /** Whether authorization policies are enforced (true) or not enforced (false). */ - enforce_policies?: boolean; - token_encryption?: Management.ResourceServerTokenEncryption; - consent_policy?: Management.ResourceServerConsentPolicyEnum | undefined; - authorization_details?: unknown[]; - proof_of_possession?: Management.ResourceServerProofOfPossession; - subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; -} diff --git a/src/management/api/resources/resourceServers/client/requests/index.ts b/src/management/api/resources/resourceServers/client/requests/index.ts deleted file mode 100644 index c045aa5a60..0000000000 --- a/src/management/api/resources/resourceServers/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListResourceServerRequestParameters } from "./ListResourceServerRequestParameters.js"; -export { type CreateResourceServerRequestContent } from "./CreateResourceServerRequestContent.js"; -export { type GetResourceServerRequestParameters } from "./GetResourceServerRequestParameters.js"; -export { type UpdateResourceServerRequestContent } from "./UpdateResourceServerRequestContent.js"; diff --git a/src/management/api/resources/riskAssessments/client/Client.ts b/src/management/api/resources/riskAssessments/client/Client.ts index 9bf8437e3a..ce970cb28b 100644 --- a/src/management/api/resources/riskAssessments/client/Client.ts +++ b/src/management/api/resources/riskAssessments/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { Settings } from "../resources/settings/client/Client.js"; export declare namespace RiskAssessments { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class RiskAssessments { diff --git a/src/management/api/resources/riskAssessments/resources/index.ts b/src/management/api/resources/riskAssessments/resources/index.ts index 46ab3e0a99..5d08c46378 100644 --- a/src/management/api/resources/riskAssessments/resources/index.ts +++ b/src/management/api/resources/riskAssessments/resources/index.ts @@ -1,2 +1 @@ export * as settings from "./settings/index.js"; -export * from "./settings/client/requests/index.js"; diff --git a/src/management/api/resources/riskAssessments/resources/settings/client/Client.ts b/src/management/api/resources/riskAssessments/resources/settings/client/Client.ts index d6fd2f3cbb..02ce223fa5 100644 --- a/src/management/api/resources/riskAssessments/resources/settings/client/Client.ts +++ b/src/management/api/resources/riskAssessments/resources/settings/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -10,28 +9,9 @@ import * as errors from "../../../../../../errors/index.js"; import { NewDevice } from "../resources/newDevice/client/Client.js"; export declare namespace Settings { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Settings { @@ -68,9 +48,12 @@ export class Settings { private async __get( requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -83,9 +66,10 @@ export class Settings { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -160,9 +144,12 @@ export class Settings { request: Management.UpdateRiskAssessmentsSettingsRequestContent, requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -178,9 +165,10 @@ export class Settings { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -229,7 +217,7 @@ export class Settings { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/riskAssessments/resources/settings/client/index.ts b/src/management/api/resources/riskAssessments/resources/settings/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/riskAssessments/resources/settings/client/index.ts +++ b/src/management/api/resources/riskAssessments/resources/settings/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/riskAssessments/resources/settings/client/requests/UpdateRiskAssessmentsSettingsRequestContent.ts b/src/management/api/resources/riskAssessments/resources/settings/client/requests/UpdateRiskAssessmentsSettingsRequestContent.ts deleted file mode 100644 index de690fd528..0000000000 --- a/src/management/api/resources/riskAssessments/resources/settings/client/requests/UpdateRiskAssessmentsSettingsRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * enabled: true - * } - */ -export interface UpdateRiskAssessmentsSettingsRequestContent { - /** Whether or not risk assessment is enabled. */ - enabled: boolean; -} diff --git a/src/management/api/resources/riskAssessments/resources/settings/client/requests/index.ts b/src/management/api/resources/riskAssessments/resources/settings/client/requests/index.ts deleted file mode 100644 index d10ce3215c..0000000000 --- a/src/management/api/resources/riskAssessments/resources/settings/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateRiskAssessmentsSettingsRequestContent } from "./UpdateRiskAssessmentsSettingsRequestContent.js"; diff --git a/src/management/api/resources/riskAssessments/resources/settings/resources/index.ts b/src/management/api/resources/riskAssessments/resources/settings/resources/index.ts index 26d626c4d3..498387fab5 100644 --- a/src/management/api/resources/riskAssessments/resources/settings/resources/index.ts +++ b/src/management/api/resources/riskAssessments/resources/settings/resources/index.ts @@ -1,2 +1 @@ export * as newDevice from "./newDevice/index.js"; -export * from "./newDevice/client/requests/index.js"; diff --git a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/Client.ts b/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/Client.ts index 1442f71693..50afdda325 100644 --- a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/Client.ts +++ b/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace NewDevice { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class NewDevice { @@ -62,9 +42,12 @@ export class NewDevice { private async __get( requestOptions?: NewDevice.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -77,9 +60,10 @@ export class NewDevice { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -154,9 +138,12 @@ export class NewDevice { request: Management.UpdateRiskAssessmentsSettingsNewDeviceRequestContent, requestOptions?: NewDevice.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -172,9 +159,10 @@ export class NewDevice { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -223,7 +211,7 @@ export class NewDevice { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/index.ts b/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/index.ts +++ b/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/requests/UpdateRiskAssessmentsSettingsNewDeviceRequestContent.ts b/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/requests/UpdateRiskAssessmentsSettingsNewDeviceRequestContent.ts deleted file mode 100644 index 2ee67bb5fe..0000000000 --- a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/requests/UpdateRiskAssessmentsSettingsNewDeviceRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * remember_for: 1 - * } - */ -export interface UpdateRiskAssessmentsSettingsNewDeviceRequestContent { - /** Length of time to remember devices for, in days. */ - remember_for: number; -} diff --git a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/requests/index.ts b/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/requests/index.ts deleted file mode 100644 index 823cebec36..0000000000 --- a/src/management/api/resources/riskAssessments/resources/settings/resources/newDevice/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateRiskAssessmentsSettingsNewDeviceRequestContent } from "./UpdateRiskAssessmentsSettingsNewDeviceRequestContent.js"; diff --git a/src/management/api/resources/roles/client/Client.ts b/src/management/api/resources/roles/client/Client.ts index 47b41e90e5..cb89b4ac05 100644 --- a/src/management/api/resources/roles/client/Client.ts +++ b/src/management/api/resources/roles/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -11,28 +10,9 @@ import { Permissions } from "../resources/permissions/client/Client.js"; import { Users } from "../resources/users/client/Client.js"; export declare namespace Roles { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Roles { @@ -66,16 +46,24 @@ export class Roles { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.roles.list() + * await client.roles.list({ + * per_page: 1, + * page: 1, + * include_totals: true, + * name_filter: "name_filter" + * }) */ public async list( request: Management.ListRolesRequestParameters = {}, requestOptions?: Roles.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListRolesRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:roles"] }], + }; const { per_page: perPage = 50, page = 0, @@ -83,21 +71,21 @@ export class Roles { name_filter: nameFilter, } = request; const _queryParams: Record = {}; - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (nameFilter != null) { + if (nameFilter !== undefined) { _queryParams["name_filter"] = nameFilter; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -110,10 +98,10 @@ export class Roles { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -167,7 +155,7 @@ export class Roles { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.roles ?? []).length > 0, @@ -208,9 +196,12 @@ export class Roles { request: Management.CreateRoleRequestContent, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -226,9 +217,10 @@ export class Roles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.CreateRoleResponseContent, rawResponse: _response.rawResponse }; @@ -296,9 +288,12 @@ export class Roles { id: string, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -306,14 +301,15 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}`, + `roles/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetRoleResponseContent, rawResponse: _response.rawResponse }; @@ -377,9 +373,12 @@ export class Roles { } private async __delete(id: string, requestOptions?: Roles.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -387,14 +386,15 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}`, + `roles/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -466,9 +466,12 @@ export class Roles { request: Management.UpdateRoleRequestContent = {}, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -476,7 +479,7 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}`, + `roles/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -484,9 +487,10 @@ export class Roles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateRoleResponseContent, rawResponse: _response.rawResponse }; @@ -528,7 +532,7 @@ export class Roles { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/roles/client/index.ts b/src/management/api/resources/roles/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/roles/client/index.ts +++ b/src/management/api/resources/roles/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/roles/client/requests/CreateRoleRequestContent.ts b/src/management/api/resources/roles/client/requests/CreateRoleRequestContent.ts deleted file mode 100644 index eaad2a1980..0000000000 --- a/src/management/api/resources/roles/client/requests/CreateRoleRequestContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * name: "name" - * } - */ -export interface CreateRoleRequestContent { - /** Name of the role. */ - name: string; - /** Description of the role. */ - description?: string; -} diff --git a/src/management/api/resources/roles/client/requests/ListRolesRequestParameters.ts b/src/management/api/resources/roles/client/requests/ListRolesRequestParameters.ts deleted file mode 100644 index 4bb2069ca4..0000000000 --- a/src/management/api/resources/roles/client/requests/ListRolesRequestParameters.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListRolesRequestParameters { - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Optional filter on name (case-insensitive). */ - name_filter?: string; -} diff --git a/src/management/api/resources/roles/client/requests/UpdateRoleRequestContent.ts b/src/management/api/resources/roles/client/requests/UpdateRoleRequestContent.ts deleted file mode 100644 index 29f4ab000a..0000000000 --- a/src/management/api/resources/roles/client/requests/UpdateRoleRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateRoleRequestContent { - /** Name of this role. */ - name?: string; - /** Description of this role. */ - description?: string; -} diff --git a/src/management/api/resources/roles/client/requests/index.ts b/src/management/api/resources/roles/client/requests/index.ts deleted file mode 100644 index a8e9f86b2c..0000000000 --- a/src/management/api/resources/roles/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListRolesRequestParameters } from "./ListRolesRequestParameters.js"; -export { type CreateRoleRequestContent } from "./CreateRoleRequestContent.js"; -export { type UpdateRoleRequestContent } from "./UpdateRoleRequestContent.js"; diff --git a/src/management/api/resources/roles/resources/index.ts b/src/management/api/resources/roles/resources/index.ts index 1600f1a41b..60a0bccefd 100644 --- a/src/management/api/resources/roles/resources/index.ts +++ b/src/management/api/resources/roles/resources/index.ts @@ -1,4 +1,2 @@ export * as permissions from "./permissions/index.js"; export * as users from "./users/index.js"; -export * from "./permissions/client/requests/index.js"; -export * from "./users/client/requests/index.js"; 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 e73447a275..7c752ca98f 100644 --- a/src/management/api/resources/roles/resources/permissions/client/Client.ts +++ b/src/management/api/resources/roles/resources/permissions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Permissions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Permissions { @@ -54,31 +34,40 @@ export class Permissions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.roles.permissions.list("id") + * await client.roles.permissions.list("id", { + * per_page: 1, + * page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListRolePermissionsRequestParameters = {}, requestOptions?: Permissions.RequestOptions, - ): Promise> { + ): Promise< + core.Page + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.roles.ListRolePermissionsRequestParameters, + request: Management.ListRolePermissionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:roles"] }], + }; const { per_page: perPage = 50, page = 0, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,15 +75,15 @@ export class Permissions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}/permissions`, + `roles/${core.url.encodePathParam(id)}/permissions`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -152,9 +141,9 @@ export class Permissions { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListRolePermissionsOffsetPaginatedResponseContent, - Management.PermissionsResponsePayload + return new core.Page< + Management.PermissionsResponsePayload, + Management.ListRolePermissionsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -200,9 +189,12 @@ export class Permissions { request: Management.AddRolePermissionsRequestContent, requestOptions?: Permissions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -210,7 +202,7 @@ export class Permissions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}/permissions`, + `roles/${core.url.encodePathParam(id)}/permissions`, ), method: "POST", headers: _headers, @@ -218,9 +210,10 @@ export class Permissions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -295,9 +288,12 @@ export class Permissions { request: Management.DeleteRolePermissionsRequestContent, requestOptions?: Permissions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:roles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -305,7 +301,7 @@ export class Permissions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}/permissions`, + `roles/${core.url.encodePathParam(id)}/permissions`, ), method: "DELETE", headers: _headers, @@ -313,9 +309,10 @@ export class Permissions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -359,7 +356,7 @@ export class Permissions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/roles/resources/permissions/client/index.ts b/src/management/api/resources/roles/resources/permissions/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/roles/resources/permissions/client/index.ts +++ b/src/management/api/resources/roles/resources/permissions/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/roles/resources/permissions/client/requests/AddRolePermissionsRequestContent.ts b/src/management/api/resources/roles/resources/permissions/client/requests/AddRolePermissionsRequestContent.ts deleted file mode 100644 index 87f07e107a..0000000000 --- a/src/management/api/resources/roles/resources/permissions/client/requests/AddRolePermissionsRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * permissions: [{ - * resource_server_identifier: "resource_server_identifier", - * permission_name: "permission_name" - * }] - * } - */ -export interface AddRolePermissionsRequestContent { - /** array of resource_server_identifier, permission_name pairs. */ - permissions: Management.PermissionRequestPayload[]; -} diff --git a/src/management/api/resources/roles/resources/permissions/client/requests/DeleteRolePermissionsRequestContent.ts b/src/management/api/resources/roles/resources/permissions/client/requests/DeleteRolePermissionsRequestContent.ts deleted file mode 100644 index d013155f50..0000000000 --- a/src/management/api/resources/roles/resources/permissions/client/requests/DeleteRolePermissionsRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * permissions: [{ - * resource_server_identifier: "resource_server_identifier", - * permission_name: "permission_name" - * }] - * } - */ -export interface DeleteRolePermissionsRequestContent { - /** array of resource_server_identifier, permission_name pairs. */ - permissions: Management.PermissionRequestPayload[]; -} diff --git a/src/management/api/resources/roles/resources/permissions/client/requests/ListRolePermissionsRequestParameters.ts b/src/management/api/resources/roles/resources/permissions/client/requests/ListRolePermissionsRequestParameters.ts deleted file mode 100644 index 4213e73515..0000000000 --- a/src/management/api/resources/roles/resources/permissions/client/requests/ListRolePermissionsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListRolePermissionsRequestParameters { - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/roles/resources/permissions/client/requests/index.ts b/src/management/api/resources/roles/resources/permissions/client/requests/index.ts deleted file mode 100644 index 05e307377e..0000000000 --- a/src/management/api/resources/roles/resources/permissions/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListRolePermissionsRequestParameters } from "./ListRolePermissionsRequestParameters.js"; -export { type AddRolePermissionsRequestContent } from "./AddRolePermissionsRequestContent.js"; -export { type DeleteRolePermissionsRequestContent } from "./DeleteRolePermissionsRequestContent.js"; 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 efde21cbce..9e78f6d17a 100644 --- a/src/management/api/resources/roles/resources/users/client/Client.ts +++ b/src/management/api/resources/roles/resources/users/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Users { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Users { @@ -72,28 +52,37 @@ export class Users { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.roles.users.list("id") + * await client.roles.users.list("id", { + * from: "from", + * take: 1 + * }) */ public async list( id: string, request: Management.ListRoleUsersRequestParameters = {}, requestOptions?: Users.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.roles.ListRoleUsersRequestParameters, + request: Management.ListRoleUsersRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:users", "read:roles", "read:role_members"] }, + ], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -101,15 +90,15 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}/users`, + `roles/${core.url.encodePathParam(id)}/users`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -164,7 +153,7 @@ export class Users { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => @@ -209,9 +198,12 @@ export class Users { request: Management.AssignRoleUsersRequestContent, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:roles", "create:role_members"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -219,7 +211,7 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `roles/${encodeURIComponent(id)}/users`, + `roles/${core.url.encodePathParam(id)}/users`, ), method: "POST", headers: _headers, @@ -227,9 +219,10 @@ export class Users { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -273,7 +266,7 @@ export class Users { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/roles/resources/users/client/index.ts b/src/management/api/resources/roles/resources/users/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/roles/resources/users/client/index.ts +++ b/src/management/api/resources/roles/resources/users/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/roles/resources/users/client/requests/AssignRoleUsersRequestContent.ts b/src/management/api/resources/roles/resources/users/client/requests/AssignRoleUsersRequestContent.ts deleted file mode 100644 index 03e9fd1c70..0000000000 --- a/src/management/api/resources/roles/resources/users/client/requests/AssignRoleUsersRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * users: ["users"] - * } - */ -export interface AssignRoleUsersRequestContent { - /** user_id's of the users to assign the role to. */ - users: string[]; -} diff --git a/src/management/api/resources/roles/resources/users/client/requests/ListRoleUsersRequestParameters.ts b/src/management/api/resources/roles/resources/users/client/requests/ListRoleUsersRequestParameters.ts deleted file mode 100644 index dd1da5b6eb..0000000000 --- a/src/management/api/resources/roles/resources/users/client/requests/ListRoleUsersRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListRoleUsersRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/roles/resources/users/client/requests/index.ts b/src/management/api/resources/roles/resources/users/client/requests/index.ts deleted file mode 100644 index 85bf6afe50..0000000000 --- a/src/management/api/resources/roles/resources/users/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListRoleUsersRequestParameters } from "./ListRoleUsersRequestParameters.js"; -export { type AssignRoleUsersRequestContent } from "./AssignRoleUsersRequestContent.js"; diff --git a/src/management/api/resources/rules/client/Client.ts b/src/management/api/resources/rules/client/Client.ts index c5da7a3bde..c713383e03 100644 --- a/src/management/api/resources/rules/client/Client.ts +++ b/src/management/api/resources/rules/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace Rules { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Rules { @@ -53,16 +33,26 @@ export class Rules { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.rules.list() + * await client.rules.list({ + * page: 1, + * per_page: 1, + * include_totals: true, + * enabled: true, + * fields: "fields", + * include_fields: true + * }) */ public async list( request: Management.ListRulesRequestParameters = {}, requestOptions?: Rules.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListRulesRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:rules"] }], + }; const { page = 0, per_page: perPage = 50, @@ -72,27 +62,27 @@ export class Rules { include_fields: includeFields, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (enabled != null) { - _queryParams["enabled"] = enabled.toString(); + if (enabled !== undefined) { + _queryParams["enabled"] = enabled?.toString() ?? null; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -105,10 +95,10 @@ export class Rules { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -164,7 +154,7 @@ export class Rules { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.rules ?? []).length > 0, @@ -207,9 +197,12 @@ export class Rules { request: Management.CreateRuleRequestContent, requestOptions?: Rules.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:rules"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -225,9 +218,10 @@ export class Rules { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.CreateRuleResponseContent, rawResponse: _response.rawResponse }; @@ -285,7 +279,10 @@ export class Rules { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.rules.get("id") + * await client.rules.get("id", { + * fields: "fields", + * include_fields: true + * }) */ public get( id: string, @@ -300,19 +297,22 @@ export class Rules { request: Management.GetRuleRequestParameters = {}, requestOptions?: Rules.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:rules"] }], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -320,14 +320,15 @@ export class Rules { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `rules/${encodeURIComponent(id)}`, + `rules/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetRuleResponseContent, rawResponse: _response.rawResponse }; @@ -390,9 +391,12 @@ export class Rules { } private async __delete(id: string, requestOptions?: Rules.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:rules"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -400,14 +404,15 @@ export class Rules { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `rules/${encodeURIComponent(id)}`, + `rules/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -479,9 +484,12 @@ export class Rules { request: Management.UpdateRuleRequestContent = {}, requestOptions?: Rules.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:rules"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -489,7 +497,7 @@ export class Rules { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `rules/${encodeURIComponent(id)}`, + `rules/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -497,9 +505,10 @@ export class Rules { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateRuleResponseContent, rawResponse: _response.rawResponse }; @@ -545,7 +554,7 @@ export class Rules { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/rules/client/index.ts b/src/management/api/resources/rules/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/rules/client/index.ts +++ b/src/management/api/resources/rules/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/rules/client/requests/CreateRuleRequestContent.ts b/src/management/api/resources/rules/client/requests/CreateRuleRequestContent.ts deleted file mode 100644 index 7223d7704f..0000000000 --- a/src/management/api/resources/rules/client/requests/CreateRuleRequestContent.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * name: "name", - * script: "script" - * } - */ -export interface CreateRuleRequestContent { - /** Name of this rule. */ - name: string; - /** Code to be executed when this rule runs. */ - script: string; - /** Order that this rule should execute in relative to other rules. Lower-valued rules execute first. */ - order?: number; - /** Whether the rule is enabled (true), or disabled (false). */ - enabled?: boolean; -} diff --git a/src/management/api/resources/rules/client/requests/GetRuleRequestParameters.ts b/src/management/api/resources/rules/client/requests/GetRuleRequestParameters.ts deleted file mode 100644 index 28cd846f1e..0000000000 --- a/src/management/api/resources/rules/client/requests/GetRuleRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetRuleRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/rules/client/requests/ListRulesRequestParameters.ts b/src/management/api/resources/rules/client/requests/ListRulesRequestParameters.ts deleted file mode 100644 index 8fb11ce829..0000000000 --- a/src/management/api/resources/rules/client/requests/ListRulesRequestParameters.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListRulesRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Optional filter on whether a rule is enabled (true) or disabled (false). */ - enabled?: boolean; - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/rules/client/requests/UpdateRuleRequestContent.ts b/src/management/api/resources/rules/client/requests/UpdateRuleRequestContent.ts deleted file mode 100644 index aa2f236557..0000000000 --- a/src/management/api/resources/rules/client/requests/UpdateRuleRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateRuleRequestContent { - /** Code to be executed when this rule runs. */ - script?: string; - /** Name of this rule. */ - name?: string; - /** Order that this rule should execute in relative to other rules. Lower-valued rules execute first. */ - order?: number; - /** Whether the rule is enabled (true), or disabled (false). */ - enabled?: boolean; -} diff --git a/src/management/api/resources/rules/client/requests/index.ts b/src/management/api/resources/rules/client/requests/index.ts deleted file mode 100644 index ec3cea5cc5..0000000000 --- a/src/management/api/resources/rules/client/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { type ListRulesRequestParameters } from "./ListRulesRequestParameters.js"; -export { type CreateRuleRequestContent } from "./CreateRuleRequestContent.js"; -export { type GetRuleRequestParameters } from "./GetRuleRequestParameters.js"; -export { type UpdateRuleRequestContent } from "./UpdateRuleRequestContent.js"; diff --git a/src/management/api/resources/rulesConfigs/client/Client.ts b/src/management/api/resources/rulesConfigs/client/Client.ts index 2510ddc39a..a36cf0f221 100644 --- a/src/management/api/resources/rulesConfigs/client/Client.ts +++ b/src/management/api/resources/rulesConfigs/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace RulesConfigs { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class RulesConfigs { @@ -61,9 +41,12 @@ export class RulesConfigs { private async __list( requestOptions?: RulesConfigs.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:rules_configs"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class RulesConfigs { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.RulesConfig[], rawResponse: _response.rawResponse }; @@ -147,9 +131,12 @@ export class RulesConfigs { request: Management.SetRulesConfigRequestContent, requestOptions?: RulesConfigs.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:rules_configs"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -157,7 +144,7 @@ export class RulesConfigs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `rules-configs/${encodeURIComponent(key)}`, + `rules-configs/${core.url.encodePathParam(key)}`, ), method: "PUT", headers: _headers, @@ -165,9 +152,10 @@ export class RulesConfigs { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -231,9 +219,12 @@ export class RulesConfigs { key: string, requestOptions?: RulesConfigs.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:rules_configs"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -241,14 +232,15 @@ export class RulesConfigs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `rules-configs/${encodeURIComponent(key)}`, + `rules-configs/${core.url.encodePathParam(key)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -288,7 +280,7 @@ export class RulesConfigs { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/rulesConfigs/client/index.ts b/src/management/api/resources/rulesConfigs/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/rulesConfigs/client/index.ts +++ b/src/management/api/resources/rulesConfigs/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/rulesConfigs/client/requests/SetRulesConfigRequestContent.ts b/src/management/api/resources/rulesConfigs/client/requests/SetRulesConfigRequestContent.ts deleted file mode 100644 index 2d01cc644e..0000000000 --- a/src/management/api/resources/rulesConfigs/client/requests/SetRulesConfigRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * value: "value" - * } - */ -export interface SetRulesConfigRequestContent { - /** Value for a rules config variable. */ - value: string; -} diff --git a/src/management/api/resources/rulesConfigs/client/requests/index.ts b/src/management/api/resources/rulesConfigs/client/requests/index.ts deleted file mode 100644 index 24b6e71a28..0000000000 --- a/src/management/api/resources/rulesConfigs/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type SetRulesConfigRequestContent } from "./SetRulesConfigRequestContent.js"; diff --git a/src/management/api/resources/selfServiceProfiles/client/Client.ts b/src/management/api/resources/selfServiceProfiles/client/Client.ts index f62ab4d303..c78be4b754 100644 --- a/src/management/api/resources/selfServiceProfiles/client/Client.ts +++ b/src/management/api/resources/selfServiceProfiles/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -11,28 +10,9 @@ import { CustomText } from "../resources/customText/client/Client.js"; import { SsoTicket } from "../resources/ssoTicket/client/Client.js"; export declare namespace SelfServiceProfiles { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class SelfServiceProfiles { @@ -64,30 +44,37 @@ export class SelfServiceProfiles { * @throws {@link Management.InternalServerError} * * @example - * await client.selfServiceProfiles.list() + * await client.selfServiceProfiles.list({ + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( request: Management.ListSelfServiceProfilesRequestParameters = {}, requestOptions?: SelfServiceProfiles.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListSelfServiceProfilesRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:self_service_profiles"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -100,10 +87,10 @@ export class SelfServiceProfiles { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -159,19 +146,18 @@ export class SelfServiceProfiles { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListSelfServiceProfilesPaginatedResponseContent, - Management.SelfServiceProfile - >({ - response: dataWithRawResponse.data, - rawResponse: dataWithRawResponse.rawResponse, - hasNextPage: (response) => (response?.self_service_profiles ?? []).length > 0, - getItems: (response) => response?.self_service_profiles ?? [], - loadPage: (_response) => { - _offset += 1; - return list(core.setObjectProperty(request, "page", _offset)); + return new core.Page( + { + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => (response?.self_service_profiles ?? []).length > 0, + getItems: (response) => response?.self_service_profiles ?? [], + loadPage: (_response) => { + _offset += 1; + return list(core.setObjectProperty(request, "page", _offset)); + }, }, - }); + ); } /** @@ -203,9 +189,12 @@ export class SelfServiceProfiles { request: Management.CreateSelfServiceProfileRequestContent, requestOptions?: SelfServiceProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:self_service_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -221,9 +210,10 @@ export class SelfServiceProfiles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -299,9 +289,12 @@ export class SelfServiceProfiles { id: string, requestOptions?: SelfServiceProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:self_service_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -309,14 +302,15 @@ export class SelfServiceProfiles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(id)}`, + `self-service-profiles/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -390,9 +384,12 @@ export class SelfServiceProfiles { id: string, requestOptions?: SelfServiceProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:self_service_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -400,14 +397,15 @@ export class SelfServiceProfiles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(id)}`, + `self-service-profiles/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -483,9 +481,12 @@ export class SelfServiceProfiles { request: Management.UpdateSelfServiceProfileRequestContent = {}, requestOptions?: SelfServiceProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:self_service_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -493,7 +494,7 @@ export class SelfServiceProfiles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(id)}`, + `self-service-profiles/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -501,9 +502,10 @@ export class SelfServiceProfiles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -554,7 +556,7 @@ export class SelfServiceProfiles { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/selfServiceProfiles/client/index.ts b/src/management/api/resources/selfServiceProfiles/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/selfServiceProfiles/client/index.ts +++ b/src/management/api/resources/selfServiceProfiles/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/selfServiceProfiles/client/requests/CreateSelfServiceProfileRequestContent.ts b/src/management/api/resources/selfServiceProfiles/client/requests/CreateSelfServiceProfileRequestContent.ts deleted file mode 100644 index b9eafba779..0000000000 --- a/src/management/api/resources/selfServiceProfiles/client/requests/CreateSelfServiceProfileRequestContent.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * name: "name" - * } - */ -export interface CreateSelfServiceProfileRequestContent { - /** The name of the self-service Profile. */ - name: string; - /** The description of the self-service Profile. */ - description?: string; - branding?: Management.SelfServiceProfileBrandingProperties; - /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ - allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; - /** List of attributes to be mapped that will be shown to the user during the SS-SSO flow. */ - user_attributes?: Management.SelfServiceProfileUserAttribute[]; -} diff --git a/src/management/api/resources/selfServiceProfiles/client/requests/ListSelfServiceProfilesRequestParameters.ts b/src/management/api/resources/selfServiceProfiles/client/requests/ListSelfServiceProfilesRequestParameters.ts deleted file mode 100644 index ac850a4fc6..0000000000 --- a/src/management/api/resources/selfServiceProfiles/client/requests/ListSelfServiceProfilesRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListSelfServiceProfilesRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/selfServiceProfiles/client/requests/UpdateSelfServiceProfileRequestContent.ts b/src/management/api/resources/selfServiceProfiles/client/requests/UpdateSelfServiceProfileRequestContent.ts deleted file mode 100644 index 9ffca8a1bf..0000000000 --- a/src/management/api/resources/selfServiceProfiles/client/requests/UpdateSelfServiceProfileRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateSelfServiceProfileRequestContent { - /** The name of the self-service Profile. */ - name?: string; - description?: Management.SelfServiceProfileDescription | undefined; - branding?: Management.SelfServiceProfileBranding | undefined; - /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ - allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; - user_attributes?: Management.SelfServiceProfileUserAttributes | undefined; -} diff --git a/src/management/api/resources/selfServiceProfiles/client/requests/index.ts b/src/management/api/resources/selfServiceProfiles/client/requests/index.ts deleted file mode 100644 index efe09d9f1a..0000000000 --- a/src/management/api/resources/selfServiceProfiles/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListSelfServiceProfilesRequestParameters } from "./ListSelfServiceProfilesRequestParameters.js"; -export { type CreateSelfServiceProfileRequestContent } from "./CreateSelfServiceProfileRequestContent.js"; -export { type UpdateSelfServiceProfileRequestContent } from "./UpdateSelfServiceProfileRequestContent.js"; diff --git a/src/management/api/resources/selfServiceProfiles/resources/customText/client/Client.ts b/src/management/api/resources/selfServiceProfiles/resources/customText/client/Client.ts index 4bec110865..e202e288a0 100644 --- a/src/management/api/resources/selfServiceProfiles/resources/customText/client/Client.ts +++ b/src/management/api/resources/selfServiceProfiles/resources/customText/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace CustomText { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class CustomText { @@ -71,9 +51,12 @@ export class CustomText { page: Management.SelfServiceProfileCustomTextPageEnum, requestOptions?: CustomText.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:self_service_profile_custom_texts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -81,14 +64,15 @@ export class CustomText { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(id)}/custom-text/${encodeURIComponent(language)}/${encodeURIComponent(page)}`, + `self-service-profiles/${core.url.encodePathParam(id)}/custom-text/${core.url.encodePathParam(language)}/${core.url.encodePathParam(page)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -171,9 +155,12 @@ export class CustomText { request: Management.SetSelfServiceProfileCustomTextRequestContent, requestOptions?: CustomText.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:self_service_profile_custom_texts"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -181,7 +168,7 @@ export class CustomText { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(id)}/custom-text/${encodeURIComponent(language)}/${encodeURIComponent(page)}`, + `self-service-profiles/${core.url.encodePathParam(id)}/custom-text/${core.url.encodePathParam(language)}/${core.url.encodePathParam(page)}`, ), method: "PUT", headers: _headers, @@ -189,9 +176,10 @@ export class CustomText { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -238,7 +226,7 @@ export class CustomText { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/selfServiceProfiles/resources/index.ts b/src/management/api/resources/selfServiceProfiles/resources/index.ts index 1f04b5fb98..2c2543f75b 100644 --- a/src/management/api/resources/selfServiceProfiles/resources/index.ts +++ b/src/management/api/resources/selfServiceProfiles/resources/index.ts @@ -1,3 +1,2 @@ export * as customText from "./customText/index.js"; export * as ssoTicket from "./ssoTicket/index.js"; -export * from "./ssoTicket/client/requests/index.js"; diff --git a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.ts b/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.ts index 8d007f7a63..d8edaafe6f 100644 --- a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.ts +++ b/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace SsoTicket { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class SsoTicket { @@ -68,9 +48,12 @@ export class SsoTicket { request: Management.CreateSelfServiceProfileSsoTicketRequestContent = {}, requestOptions?: SsoTicket.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:sso_access_tickets"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -78,7 +61,7 @@ export class SsoTicket { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(id)}/sso-ticket`, + `self-service-profiles/${core.url.encodePathParam(id)}/sso-ticket`, ), method: "POST", headers: _headers, @@ -86,9 +69,10 @@ export class SsoTicket { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -163,9 +147,12 @@ export class SsoTicket { id: string, requestOptions?: SsoTicket.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:sso_access_tickets"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -173,14 +160,15 @@ export class SsoTicket { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `self-service-profiles/${encodeURIComponent(profileId)}/sso-ticket/${encodeURIComponent(id)}/revoke`, + `self-service-profiles/${core.url.encodePathParam(profileId)}/sso-ticket/${core.url.encodePathParam(id)}/revoke`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -222,7 +210,7 @@ export class SsoTicket { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/index.ts b/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/index.ts +++ b/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/requests/CreateSelfServiceProfileSsoTicketRequestContent.ts b/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/requests/CreateSelfServiceProfileSsoTicketRequestContent.ts deleted file mode 100644 index 9395db000e..0000000000 --- a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/requests/CreateSelfServiceProfileSsoTicketRequestContent.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface CreateSelfServiceProfileSsoTicketRequestContent { - /** If provided, this will allow editing of the provided connection during the SSO Flow */ - connection_id?: string; - connection_config?: Management.SelfServiceProfileSsoTicketConnectionConfig; - /** List of client_ids that the connection will be enabled for. */ - enabled_clients?: string[]; - /** List of organizations that the connection will be enabled for. */ - enabled_organizations?: Management.SelfServiceProfileSsoTicketEnabledOrganization[]; - /** Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). */ - ttl_sec?: number; - domain_aliases_config?: Management.SelfServiceProfileSsoTicketDomainAliasesConfig; - provisioning_config?: Management.SelfServiceProfileSsoTicketProvisioningConfig; -} diff --git a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/requests/index.ts b/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/requests/index.ts deleted file mode 100644 index bce228d5a1..0000000000 --- a/src/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type CreateSelfServiceProfileSsoTicketRequestContent } from "./CreateSelfServiceProfileSsoTicketRequestContent.js"; diff --git a/src/management/api/resources/sessions/client/Client.ts b/src/management/api/resources/sessions/client/Client.ts index 30a2fbb476..39ffd6baeb 100644 --- a/src/management/api/resources/sessions/client/Client.ts +++ b/src/management/api/resources/sessions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace Sessions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Sessions { @@ -65,9 +45,12 @@ export class Sessions { id: string, requestOptions?: Sessions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:sessions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -75,14 +58,15 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `sessions/${encodeURIComponent(id)}`, + `sessions/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetSessionResponseContent, rawResponse: _response.rawResponse }; @@ -143,9 +127,12 @@ export class Sessions { } private async __delete(id: string, requestOptions?: Sessions.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:sessions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -153,14 +140,15 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `sessions/${encodeURIComponent(id)}`, + `sessions/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -202,6 +190,106 @@ export class Sessions { } } + /** + * Update session information. + * + * @param {string} id - ID of the session to update. + * @param {Management.UpdateSessionRequestContent} request + * @param {Sessions.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.sessions.update("id") + */ + public update( + id: string, + request: Management.UpdateSessionRequestContent = {}, + requestOptions?: Sessions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + } + + private async __update( + id: string, + request: Management.UpdateSessionRequestContent = {}, + requestOptions?: Sessions.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:sessions"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + `sessions/${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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.UpdateSessionResponseContent, + 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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError("Timeout exceeded when calling PATCH /sessions/{id}."); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + /** * Revokes a session by ID and all associated refresh tokens. * @@ -222,9 +310,12 @@ export class Sessions { } private async __revoke(id: string, requestOptions?: Sessions.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:sessions", "delete:refresh_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -232,14 +323,15 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `sessions/${encodeURIComponent(id)}/revoke`, + `sessions/${core.url.encodePathParam(id)}/revoke`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -283,7 +375,7 @@ export class Sessions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/stats/client/Client.ts b/src/management/api/resources/stats/client/Client.ts index 93c334d4e3..bd7bfd17bd 100644 --- a/src/management/api/resources/stats/client/Client.ts +++ b/src/management/api/resources/stats/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace Stats { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Stats { @@ -61,9 +41,12 @@ export class Stats { private async __getActiveUsersCount( requestOptions?: Stats.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:stats"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,9 +59,10 @@ export class Stats { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -133,7 +117,10 @@ export class Stats { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.stats.getDaily() + * await client.stats.getDaily({ + * from: "from", + * to: "to" + * }) */ public getDaily( request: Management.GetDailyStatsRequestParameters = {}, @@ -146,19 +133,22 @@ export class Stats { request: Management.GetDailyStatsRequestParameters = {}, requestOptions?: Stats.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:stats"] }], + }; const { from: from_, to } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (to != null) { + if (to !== undefined) { _queryParams["to"] = to; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -171,9 +161,10 @@ export class Stats { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.DailyStats[], rawResponse: _response.rawResponse }; @@ -215,7 +206,7 @@ export class Stats { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/stats/client/index.ts b/src/management/api/resources/stats/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/stats/client/index.ts +++ b/src/management/api/resources/stats/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/stats/client/requests/GetDailyStatsRequestParameters.ts b/src/management/api/resources/stats/client/requests/GetDailyStatsRequestParameters.ts deleted file mode 100644 index 3fb893a9d9..0000000000 --- a/src/management/api/resources/stats/client/requests/GetDailyStatsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetDailyStatsRequestParameters { - /** Optional first day of the date range (inclusive) in YYYYMMDD format. */ - from?: string; - /** Optional last day of the date range (inclusive) in YYYYMMDD format. */ - to?: string; -} diff --git a/src/management/api/resources/stats/client/requests/index.ts b/src/management/api/resources/stats/client/requests/index.ts deleted file mode 100644 index 969b583ec7..0000000000 --- a/src/management/api/resources/stats/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type GetDailyStatsRequestParameters } from "./GetDailyStatsRequestParameters.js"; diff --git a/src/management/api/resources/supplementalSignals/client/Client.ts b/src/management/api/resources/supplementalSignals/client/Client.ts index 442e07bc13..faa2914882 100644 --- a/src/management/api/resources/supplementalSignals/client/Client.ts +++ b/src/management/api/resources/supplementalSignals/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace SupplementalSignals { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class SupplementalSignals { @@ -62,9 +42,12 @@ export class SupplementalSignals { private async __get( requestOptions?: SupplementalSignals.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -77,9 +60,10 @@ export class SupplementalSignals { method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -151,9 +135,12 @@ export class SupplementalSignals { request: Management.UpdateSupplementalSignalsRequestContent, requestOptions?: SupplementalSignals.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:attack_protection"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -169,9 +156,10 @@ export class SupplementalSignals { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -216,7 +204,7 @@ export class SupplementalSignals { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/supplementalSignals/client/index.ts b/src/management/api/resources/supplementalSignals/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/supplementalSignals/client/index.ts +++ b/src/management/api/resources/supplementalSignals/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/supplementalSignals/client/requests/UpdateSupplementalSignalsRequestContent.ts b/src/management/api/resources/supplementalSignals/client/requests/UpdateSupplementalSignalsRequestContent.ts deleted file mode 100644 index 441886f569..0000000000 --- a/src/management/api/resources/supplementalSignals/client/requests/UpdateSupplementalSignalsRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * akamai_enabled: true - * } - */ -export interface UpdateSupplementalSignalsRequestContent { - /** Indicates if incoming Akamai Headers should be processed */ - akamai_enabled: boolean; -} diff --git a/src/management/api/resources/supplementalSignals/client/requests/index.ts b/src/management/api/resources/supplementalSignals/client/requests/index.ts deleted file mode 100644 index e2bd585133..0000000000 --- a/src/management/api/resources/supplementalSignals/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type UpdateSupplementalSignalsRequestContent } from "./UpdateSupplementalSignalsRequestContent.js"; diff --git a/src/management/api/resources/tenants/client/Client.ts b/src/management/api/resources/tenants/client/Client.ts index 07318062fe..c1b4123a95 100644 --- a/src/management/api/resources/tenants/client/Client.ts +++ b/src/management/api/resources/tenants/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { Settings } from "../resources/settings/client/Client.js"; export declare namespace Tenants { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Tenants { diff --git a/src/management/api/resources/tenants/resources/index.ts b/src/management/api/resources/tenants/resources/index.ts index 46ab3e0a99..5d08c46378 100644 --- a/src/management/api/resources/tenants/resources/index.ts +++ b/src/management/api/resources/tenants/resources/index.ts @@ -1,2 +1 @@ export * as settings from "./settings/index.js"; -export * from "./settings/client/requests/index.js"; 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 39dca221a6..ee2e3c414c 100644 --- a/src/management/api/resources/tenants/resources/settings/client/Client.ts +++ b/src/management/api/resources/tenants/resources/settings/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Settings { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Settings { @@ -52,7 +32,10 @@ export class Settings { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.tenants.settings.get() + * await client.tenants.settings.get({ + * fields: "fields", + * include_fields: true + * }) */ public get( request: Management.GetTenantSettingsRequestParameters = {}, @@ -65,19 +48,22 @@ export class Settings { request: Management.GetTenantSettingsRequestParameters = {}, requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:tenant_settings"] }], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -90,9 +76,10 @@ export class Settings { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -162,9 +149,12 @@ export class Settings { request: Management.UpdateTenantSettingsRequestContent = {}, requestOptions?: Settings.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:tenant_settings"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -180,9 +170,10 @@ export class Settings { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -227,7 +218,7 @@ export class Settings { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/tenants/resources/settings/client/index.ts b/src/management/api/resources/tenants/resources/settings/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/tenants/resources/settings/client/index.ts +++ b/src/management/api/resources/tenants/resources/settings/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/tenants/resources/settings/client/requests/GetTenantSettingsRequestParameters.ts b/src/management/api/resources/tenants/resources/settings/client/requests/GetTenantSettingsRequestParameters.ts deleted file mode 100644 index 486ea5618e..0000000000 --- a/src/management/api/resources/tenants/resources/settings/client/requests/GetTenantSettingsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetTenantSettingsRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/tenants/resources/settings/client/requests/UpdateTenantSettingsRequestContent.ts b/src/management/api/resources/tenants/resources/settings/client/requests/UpdateTenantSettingsRequestContent.ts deleted file mode 100644 index 53821a96d0..0000000000 --- a/src/management/api/resources/tenants/resources/settings/client/requests/UpdateTenantSettingsRequestContent.ts +++ /dev/null @@ -1,234 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateTenantSettingsRequestContent { - change_password?: Management.TenantSettingsPasswordPage; - device_flow?: Management.TenantSettingsDeviceFlow; - guardian_mfa_page?: Management.TenantSettingsGuardianPage; - /** Default audience for API Authorization. */ - default_audience?: string; - /** Name of connection used for password grants at the `/token` endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. */ - default_directory?: string; - error_page?: Management.TenantSettingsErrorPage; - default_token_quota?: Management.DefaultTokenQuota; - flags?: Management.TenantSettingsFlags; - /** Friendly name for this tenant. */ - friendly_name?: string; - /** URL of logo to be shown for this tenant (recommended size: 150x150) */ - picture_url?: string; - /** End-user support email. */ - support_email?: string; - /** End-user support url. */ - support_url?: string; - /** URLs that are valid to redirect to after logout from Auth0. */ - allowed_logout_urls?: string[]; - /** Number of hours a session will stay valid. */ - session_lifetime?: number; - /** Number of hours for which a session can be inactive before the user must log in again. */ - idle_session_lifetime?: number; - /** Number of hours an ephemeral (non-persistent) session will stay valid. */ - ephemeral_session_lifetime?: number; - /** Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. */ - idle_ephemeral_session_lifetime?: number; - /** Selected sandbox version for the extensibility environment */ - sandbox_version?: string; - /** Selected legacy sandbox version for the extensibility environment */ - legacy_sandbox_version?: string; - /** The default absolute redirection uri, must be https */ - default_redirection_uri?: string; - /** Supported locales for the user interface */ - enabled_locales?: UpdateTenantSettingsRequestContent.EnabledLocales.Item[]; - session_cookie?: Management.SessionCookieSchema; - sessions?: Management.TenantSettingsSessions; - oidc_logout?: Management.TenantOidcLogoutSettings; - /** Whether to enable flexible factors for MFA in the PostLogin action */ - customize_mfa_in_postlogin_action?: boolean; - /** Whether to accept an organization name instead of an ID on auth endpoints */ - allow_organization_name_in_authentication_api?: boolean; - /** Supported ACR values */ - acr_values_supported?: string[]; - mtls?: Management.TenantSettingsMtls; - /** Enables the use of Pushed Authorization Requests */ - pushed_authorization_requests_supported?: boolean; - /** Supports iss parameter in authorization responses */ - authorization_response_iss_parameter_supported?: boolean; -} - -export namespace UpdateTenantSettingsRequestContent { - export type EnabledLocales = EnabledLocales.Item[]; - - export namespace EnabledLocales { - export type Item = - | "am" - | "ar" - | "ar-EG" - | "ar-SA" - | "az" - | "bg" - | "bn" - | "bs" - | "ca-ES" - | "cnr" - | "cs" - | "cy" - | "da" - | "de" - | "el" - | "en" - | "en-CA" - | "es" - | "es-419" - | "es-AR" - | "es-MX" - | "et" - | "eu-ES" - | "fa" - | "fi" - | "fr" - | "fr-CA" - | "fr-FR" - | "gl-ES" - | "gu" - | "he" - | "hi" - | "hr" - | "hu" - | "hy" - | "id" - | "is" - | "it" - | "ja" - | "ka" - | "kk" - | "kn" - | "ko" - | "lt" - | "lv" - | "mk" - | "ml" - | "mn" - | "mr" - | "ms" - | "my" - | "nb" - | "nl" - | "nn" - | "no" - | "pa" - | "pl" - | "pt" - | "pt-BR" - | "pt-PT" - | "ro" - | "ru" - | "sk" - | "sl" - | "so" - | "sq" - | "sr" - | "sv" - | "sw" - | "ta" - | "te" - | "th" - | "tl" - | "tr" - | "uk" - | "ur" - | "vi" - | "zgh" - | "zh-CN" - | "zh-HK" - | "zh-TW"; - export const Item = { - Am: "am", - Ar: "ar", - ArEg: "ar-EG", - ArSa: "ar-SA", - Az: "az", - Bg: "bg", - Bn: "bn", - Bs: "bs", - CaEs: "ca-ES", - Cnr: "cnr", - Cs: "cs", - Cy: "cy", - Da: "da", - De: "de", - El: "el", - En: "en", - EnCa: "en-CA", - Es: "es", - Es419: "es-419", - EsAr: "es-AR", - EsMx: "es-MX", - Et: "et", - EuEs: "eu-ES", - Fa: "fa", - Fi: "fi", - Fr: "fr", - FrCa: "fr-CA", - FrFr: "fr-FR", - GlEs: "gl-ES", - Gu: "gu", - He: "he", - Hi: "hi", - Hr: "hr", - Hu: "hu", - Hy: "hy", - Id: "id", - Is: "is", - It: "it", - Ja: "ja", - Ka: "ka", - Kk: "kk", - Kn: "kn", - Ko: "ko", - Lt: "lt", - Lv: "lv", - Mk: "mk", - Ml: "ml", - Mn: "mn", - Mr: "mr", - Ms: "ms", - My: "my", - Nb: "nb", - Nl: "nl", - Nn: "nn", - No: "no", - Pa: "pa", - Pl: "pl", - Pt: "pt", - PtBr: "pt-BR", - PtPt: "pt-PT", - Ro: "ro", - Ru: "ru", - Sk: "sk", - Sl: "sl", - So: "so", - Sq: "sq", - Sr: "sr", - Sv: "sv", - Sw: "sw", - Ta: "ta", - Te: "te", - Th: "th", - Tl: "tl", - Tr: "tr", - Uk: "uk", - Ur: "ur", - Vi: "vi", - Zgh: "zgh", - ZhCn: "zh-CN", - ZhHk: "zh-HK", - ZhTw: "zh-TW", - } as const; - } -} diff --git a/src/management/api/resources/tenants/resources/settings/client/requests/index.ts b/src/management/api/resources/tenants/resources/settings/client/requests/index.ts deleted file mode 100644 index fcd5b06134..0000000000 --- a/src/management/api/resources/tenants/resources/settings/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type GetTenantSettingsRequestParameters } from "./GetTenantSettingsRequestParameters.js"; -export { type UpdateTenantSettingsRequestContent } from "./UpdateTenantSettingsRequestContent.js"; diff --git a/src/management/api/resources/tickets/client/Client.ts b/src/management/api/resources/tickets/client/Client.ts index f9ffe12d75..049d366add 100644 --- a/src/management/api/resources/tickets/client/Client.ts +++ b/src/management/api/resources/tickets/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace Tickets { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Tickets { @@ -68,9 +48,12 @@ export class Tickets { request: Management.VerifyEmailTicketRequestContent, requestOptions?: Tickets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:user_tickets"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,9 +69,10 @@ export class Tickets { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -165,9 +149,12 @@ export class Tickets { request: Management.ChangePasswordTicketRequestContent = {}, requestOptions?: Tickets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:user_tickets"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -183,9 +170,10 @@ export class Tickets { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -232,7 +220,7 @@ export class Tickets { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/tickets/client/index.ts b/src/management/api/resources/tickets/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/tickets/client/index.ts +++ b/src/management/api/resources/tickets/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/tickets/client/requests/ChangePasswordTicketRequestContent.ts b/src/management/api/resources/tickets/client/requests/ChangePasswordTicketRequestContent.ts deleted file mode 100644 index 9cb7bcae6b..0000000000 --- a/src/management/api/resources/tickets/client/requests/ChangePasswordTicketRequestContent.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ChangePasswordTicketRequestContent { - /** URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. */ - result_url?: string; - /** user_id of for whom the ticket should be created. */ - user_id?: string; - /** ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's default login route after the ticket is used. client_id is required to use the Password Reset Post Challenge trigger. */ - client_id?: string; - /** (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. */ - organization_id?: string; - /** ID of the connection. If provided, allows the user to be specified using email instead of user_id. If you set this value, you must also send the email parameter. You cannot send user_id when specifying a connection_id. */ - connection_id?: string; - /** Email address of the user for whom the tickets should be created. Requires the connection_id parameter. Cannot be specified when using user_id. */ - email?: string; - /** Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). */ - ttl_sec?: number; - /** Whether to set the email_verified attribute to true (true) or whether it should not be updated (false). */ - mark_email_as_verified?: boolean; - /** Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). */ - includeEmailInRedirect?: boolean; -} diff --git a/src/management/api/resources/tickets/client/requests/VerifyEmailTicketRequestContent.ts b/src/management/api/resources/tickets/client/requests/VerifyEmailTicketRequestContent.ts deleted file mode 100644 index 309cd4702b..0000000000 --- a/src/management/api/resources/tickets/client/requests/VerifyEmailTicketRequestContent.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * user_id: "user_id" - * } - */ -export interface VerifyEmailTicketRequestContent { - /** URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id. */ - result_url?: string; - /** user_id of for whom the ticket should be created. */ - user_id: string; - /** ID of the client (application). If provided for tenants using the New Universal Login experience, the email template and UI displays application details, and the user is prompted to redirect to the application's default login route after the ticket is used. client_id is required to use the Password Reset Post Challenge trigger. */ - client_id?: string; - /** (Optional) Organization ID – the ID of the Organization. If provided, organization parameters will be made available to the email template and organization branding will be applied to the prompt. In addition, the redirect link in the prompt will include organization_id and organization_name query string parameters. */ - organization_id?: string; - /** Number of seconds for which the ticket is valid before expiration. If unspecified or set to 0, this value defaults to 432000 seconds (5 days). */ - ttl_sec?: number; - /** Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). */ - includeEmailInRedirect?: boolean; - identity?: Management.Identity; -} diff --git a/src/management/api/resources/tickets/client/requests/index.ts b/src/management/api/resources/tickets/client/requests/index.ts deleted file mode 100644 index 48391d34d1..0000000000 --- a/src/management/api/resources/tickets/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type VerifyEmailTicketRequestContent } from "./VerifyEmailTicketRequestContent.js"; -export { type ChangePasswordTicketRequestContent } from "./ChangePasswordTicketRequestContent.js"; diff --git a/src/management/api/resources/tokenExchangeProfiles/client/Client.ts b/src/management/api/resources/tokenExchangeProfiles/client/Client.ts index 58178528fe..a1be6fb2c3 100644 --- a/src/management/api/resources/tokenExchangeProfiles/client/Client.ts +++ b/src/management/api/resources/tokenExchangeProfiles/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace TokenExchangeProfiles { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class TokenExchangeProfiles { @@ -60,27 +40,35 @@ export class TokenExchangeProfiles { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.tokenExchangeProfiles.list() + * await client.tokenExchangeProfiles.list({ + * from: "from", + * take: 1 + * }) */ public async list( request: Management.TokenExchangeProfilesListRequest = {}, requestOptions?: TokenExchangeProfiles.RequestOptions, - ): Promise> { + ): Promise< + core.Page + > { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.TokenExchangeProfilesListRequest, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:token_exchange_profiles"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -93,10 +81,10 @@ export class TokenExchangeProfiles { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -151,9 +139,9 @@ export class TokenExchangeProfiles { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListTokenExchangeProfileResponseContent, - Management.TokenExchangeProfileResponseContent + return new core.Page< + Management.TokenExchangeProfileResponseContent, + Management.ListTokenExchangeProfileResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -196,9 +184,12 @@ export class TokenExchangeProfiles { request: Management.CreateTokenExchangeProfileRequestContent, requestOptions?: TokenExchangeProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:token_exchange_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -214,9 +205,10 @@ export class TokenExchangeProfiles { queryParameters: requestOptions?.queryParams, requestType: "json", body: { ...request, type: "custom_authentication" }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -289,9 +281,12 @@ export class TokenExchangeProfiles { id: string, requestOptions?: TokenExchangeProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:token_exchange_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -299,14 +294,15 @@ export class TokenExchangeProfiles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `token-exchange-profiles/${encodeURIComponent(id)}`, + `token-exchange-profiles/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -376,9 +372,12 @@ export class TokenExchangeProfiles { id: string, requestOptions?: TokenExchangeProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:token_exchange_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -386,14 +385,15 @@ export class TokenExchangeProfiles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `token-exchange-profiles/${encodeURIComponent(id)}`, + `token-exchange-profiles/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -464,9 +464,12 @@ export class TokenExchangeProfiles { request: Management.UpdateTokenExchangeProfileRequestContent = {}, requestOptions?: TokenExchangeProfiles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:token_exchange_profiles"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -474,7 +477,7 @@ export class TokenExchangeProfiles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `token-exchange-profiles/${encodeURIComponent(id)}`, + `token-exchange-profiles/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -482,9 +485,10 @@ export class TokenExchangeProfiles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -530,7 +534,7 @@ export class TokenExchangeProfiles { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/tokenExchangeProfiles/client/index.ts b/src/management/api/resources/tokenExchangeProfiles/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/tokenExchangeProfiles/client/index.ts +++ b/src/management/api/resources/tokenExchangeProfiles/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/tokenExchangeProfiles/client/requests/CreateTokenExchangeProfileRequestContent.ts b/src/management/api/resources/tokenExchangeProfiles/client/requests/CreateTokenExchangeProfileRequestContent.ts deleted file mode 100644 index 9fcf5f2c72..0000000000 --- a/src/management/api/resources/tokenExchangeProfiles/client/requests/CreateTokenExchangeProfileRequestContent.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * name: "name", - * subject_token_type: "subject_token_type", - * action_id: "action_id" - * } - */ -export interface CreateTokenExchangeProfileRequestContent { - /** Friendly name of this profile. */ - name: string; - /** Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI. */ - subject_token_type: string; - /** The ID of the Custom Token Exchange action to execute for this profile, in order to validate the subject_token. The action must use the custom-token-exchange trigger. */ - action_id: string; -} diff --git a/src/management/api/resources/tokenExchangeProfiles/client/requests/TokenExchangeProfilesListRequest.ts b/src/management/api/resources/tokenExchangeProfiles/client/requests/TokenExchangeProfilesListRequest.ts deleted file mode 100644 index 6f5ae5de9c..0000000000 --- a/src/management/api/resources/tokenExchangeProfiles/client/requests/TokenExchangeProfilesListRequest.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface TokenExchangeProfilesListRequest { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/tokenExchangeProfiles/client/requests/UpdateTokenExchangeProfileRequestContent.ts b/src/management/api/resources/tokenExchangeProfiles/client/requests/UpdateTokenExchangeProfileRequestContent.ts deleted file mode 100644 index 6c89de5f0a..0000000000 --- a/src/management/api/resources/tokenExchangeProfiles/client/requests/UpdateTokenExchangeProfileRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface UpdateTokenExchangeProfileRequestContent { - /** Friendly name of this profile. */ - name?: string; - /** Subject token type for this profile. When receiving a token exchange request on the Authentication API, the corresponding token exchange profile with a matching subject_token_type will be executed. This must be a URI. */ - subject_token_type?: string; -} diff --git a/src/management/api/resources/tokenExchangeProfiles/client/requests/index.ts b/src/management/api/resources/tokenExchangeProfiles/client/requests/index.ts deleted file mode 100644 index c3365f207e..0000000000 --- a/src/management/api/resources/tokenExchangeProfiles/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type TokenExchangeProfilesListRequest } from "./TokenExchangeProfilesListRequest.js"; -export { type CreateTokenExchangeProfileRequestContent } from "./CreateTokenExchangeProfileRequestContent.js"; -export { type UpdateTokenExchangeProfileRequestContent } from "./UpdateTokenExchangeProfileRequestContent.js"; diff --git a/src/management/api/resources/userAttributeProfiles/client/Client.ts b/src/management/api/resources/userAttributeProfiles/client/Client.ts new file mode 100644 index 0000000000..ffef645501 --- /dev/null +++ b/src/management/api/resources/userAttributeProfiles/client/Client.ts @@ -0,0 +1,715 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; +import * as environments from "../../../../environments.js"; +import * as core from "../../../../core/index.js"; +import * as Management from "../../../index.js"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js"; +import * as errors from "../../../../errors/index.js"; + +export declare namespace UserAttributeProfiles { + export interface Options extends BaseClientOptions {} + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class UserAttributeProfiles { + protected readonly _options: UserAttributeProfiles.Options; + + constructor(_options: UserAttributeProfiles.Options) { + this._options = _options; + } + + /** + * Retrieve a list of User Attribute Profiles. This endpoint supports Checkpoint pagination. + * + * @param {Management.ListUserAttributeProfileRequestParameters} request + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.list({ + * from: "from", + * take: 1 + * }) + */ + public async list( + request: Management.ListUserAttributeProfileRequestParameters = {}, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise< + core.Page + > { + const list = core.HttpResponsePromise.interceptFunction( + async ( + request: Management.ListUserAttributeProfileRequestParameters, + ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:user_attribute_profiles"] }], + }; + const { from: from_, take = 50 } = request; + const _queryParams: Record = {}; + if (from_ !== undefined) { + _queryParams["from"] = from_; + } + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; + } + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + "user-attribute-profiles", + ), + 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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.ListUserAttributeProfilesPaginatedResponseContent, + 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, + }); + } + } + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling GET /user-attribute-profiles.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + }, + ); + const dataWithRawResponse = await list(request).withRawResponse(); + return new core.Page< + Management.UserAttributeProfile, + Management.ListUserAttributeProfilesPaginatedResponseContent + >({ + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => + response?.next != null && !(typeof response?.next === "string" && response?.next === ""), + getItems: (response) => response?.user_attribute_profiles ?? [], + loadPage: (response) => { + return list(core.setObjectProperty(request, "from", response?.next)); + }, + }); + } + + /** + * Retrieve details about a single User Attribute Profile specified by ID. + * + * @param {Management.CreateUserAttributeProfileRequestContent} request + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.ConflictError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.create({ + * name: "name", + * user_attributes: { + * "key": { + * description: "description", + * label: "label", + * profile_required: true, + * auth0_mapping: "auth0_mapping" + * } + * } + * }) + */ + public create( + request: Management.CreateUserAttributeProfileRequestContent, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Management.CreateUserAttributeProfileRequestContent, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:user_attribute_profiles"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + "user-attribute-profiles", + ), + method: "POST", + 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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.CreateUserAttributeProfileResponseContent, + 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 409: + throw new Management.ConflictError(_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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError("Timeout exceeded when calling POST /user-attribute-profiles."); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Retrieve a list of User Attribute Profile Templates. + * + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.listTemplates() + */ + public listTemplates( + requestOptions?: UserAttributeProfiles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__listTemplates(requestOptions)); + } + + private async __listTemplates( + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:user_attribute_profiles"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + "user-attribute-profiles/templates", + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.ListUserAttributeProfileTemplateResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + 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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling GET /user-attribute-profiles/templates.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Retrieve a User Attribute Profile Template. + * + * @param {string} id - ID of the user-attribute-profile-template to retrieve. + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.getTemplate("id") + */ + public getTemplate( + id: string, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getTemplate(id, requestOptions)); + } + + private async __getTemplate( + id: string, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:user_attribute_profiles"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + `user-attribute-profiles/templates/${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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetUserAttributeProfileTemplateResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + 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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling GET /user-attribute-profiles/templates/{id}.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Retrieve details about a single User Attribute Profile specified by ID. + * + * @param {string} id - ID of the user-attribute-profile to retrieve. + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.get("id") + */ + public get( + id: string, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + } + + private async __get( + id: string, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:user_attribute_profiles"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + `user-attribute-profiles/${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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetUserAttributeProfileResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + 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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling GET /user-attribute-profiles/{id}.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Delete a single User Attribute Profile specified by ID. + * + * @param {string} id - ID of the user-attribute-profile to delete. + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.delete("id") + */ + public delete(id: string, requestOptions?: UserAttributeProfiles.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + } + + private async __delete( + id: string, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:user_attribute_profiles"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + `user-attribute-profiles/${core.url.encodePathParam(id)}`, + ), + method: "DELETE", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { data: undefined, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + 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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling DELETE /user-attribute-profiles/{id}.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Update the details of a specific User attribute profile, such as name, user_id and user_attributes. + * + * @param {string} id - ID of the user attribute profile to update. + * @param {Management.UpdateUserAttributeProfileRequestContent} request + * @param {UserAttributeProfiles.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.userAttributeProfiles.update("id") + */ + public update( + id: string, + request: Management.UpdateUserAttributeProfileRequestContent = {}, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + } + + private async __update( + id: string, + request: Management.UpdateUserAttributeProfileRequestContent = {}, + requestOptions?: UserAttributeProfiles.RequestOptions, + ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:user_attribute_profiles"] }], + }; + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), + 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, + `user-attribute-profiles/${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, + endpointMetadata: _metadata, + }); + if (_response.ok) { + return { + data: _response.body as Management.UpdateUserAttributeProfileResponseContent, + 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, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + rawResponse: _response.rawResponse, + }); + case "timeout": + throw new errors.ManagementTimeoutError( + "Timeout exceeded when calling PATCH /user-attribute-profiles/{id}.", + ); + case "unknown": + throw new errors.ManagementError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; + } +} diff --git a/src/management/api/resources/groups/client/index.ts b/src/management/api/resources/userAttributeProfiles/client/index.ts similarity index 100% rename from src/management/api/resources/groups/client/index.ts rename to src/management/api/resources/userAttributeProfiles/client/index.ts diff --git a/src/management/api/resources/groups/resources/members/index.ts b/src/management/api/resources/userAttributeProfiles/index.ts similarity index 100% rename from src/management/api/resources/groups/resources/members/index.ts rename to src/management/api/resources/userAttributeProfiles/index.ts diff --git a/src/management/api/resources/userBlocks/client/Client.ts b/src/management/api/resources/userBlocks/client/Client.ts index 9916e95f34..74d6b36c13 100644 --- a/src/management/api/resources/userBlocks/client/Client.ts +++ b/src/management/api/resources/userBlocks/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace UserBlocks { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class UserBlocks { @@ -53,7 +33,8 @@ export class UserBlocks { * * @example * await client.userBlocks.listByIdentifier({ - * identifier: "identifier" + * identifier: "identifier", + * consider_brute_force_enablement: true * }) */ public listByIdentifier( @@ -67,16 +48,19 @@ export class UserBlocks { request: Management.ListUserBlocksByIdentifierRequestParameters, requestOptions?: UserBlocks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users"] }], + }; const { identifier, consider_brute_force_enablement: considerBruteForceEnablement } = request; const _queryParams: Record = {}; _queryParams["identifier"] = identifier; - if (considerBruteForceEnablement != null) { - _queryParams["consider_brute_force_enablement"] = considerBruteForceEnablement.toString(); + if (considerBruteForceEnablement !== undefined) { + _queryParams["consider_brute_force_enablement"] = considerBruteForceEnablement?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -89,9 +73,10 @@ export class UserBlocks { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -165,12 +150,15 @@ export class UserBlocks { request: Management.DeleteUserBlocksByIdentifierRequestParameters, requestOptions?: UserBlocks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; const { identifier } = request; const _queryParams: Record = {}; _queryParams["identifier"] = identifier; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -183,9 +171,10 @@ export class UserBlocks { method: "DELETE", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -241,7 +230,9 @@ export class UserBlocks { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.userBlocks.list("id") + * await client.userBlocks.list("id", { + * consider_brute_force_enablement: true + * }) */ public list( id: string, @@ -256,15 +247,18 @@ export class UserBlocks { request: Management.ListUserBlocksRequestParameters = {}, requestOptions?: UserBlocks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users"] }], + }; const { consider_brute_force_enablement: considerBruteForceEnablement } = request; const _queryParams: Record = {}; - if (considerBruteForceEnablement != null) { - _queryParams["consider_brute_force_enablement"] = considerBruteForceEnablement.toString(); + if (considerBruteForceEnablement !== undefined) { + _queryParams["consider_brute_force_enablement"] = considerBruteForceEnablement?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -272,14 +266,15 @@ export class UserBlocks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `user-blocks/${encodeURIComponent(id)}`, + `user-blocks/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -351,9 +346,12 @@ export class UserBlocks { id: string, requestOptions?: UserBlocks.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -361,14 +359,15 @@ export class UserBlocks { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `user-blocks/${encodeURIComponent(id)}`, + `user-blocks/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -412,7 +411,7 @@ export class UserBlocks { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/userBlocks/client/index.ts b/src/management/api/resources/userBlocks/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/userBlocks/client/index.ts +++ b/src/management/api/resources/userBlocks/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/userBlocks/client/requests/DeleteUserBlocksByIdentifierRequestParameters.ts b/src/management/api/resources/userBlocks/client/requests/DeleteUserBlocksByIdentifierRequestParameters.ts deleted file mode 100644 index 73c36ecd0a..0000000000 --- a/src/management/api/resources/userBlocks/client/requests/DeleteUserBlocksByIdentifierRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * identifier: "identifier" - * } - */ -export interface DeleteUserBlocksByIdentifierRequestParameters { - /** Should be any of a username, phone number, or email. */ - identifier: string; -} diff --git a/src/management/api/resources/userBlocks/client/requests/ListUserBlocksByIdentifierRequestParameters.ts b/src/management/api/resources/userBlocks/client/requests/ListUserBlocksByIdentifierRequestParameters.ts deleted file mode 100644 index 982329418f..0000000000 --- a/src/management/api/resources/userBlocks/client/requests/ListUserBlocksByIdentifierRequestParameters.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * identifier: "identifier" - * } - */ -export interface ListUserBlocksByIdentifierRequestParameters { - /** Should be any of a username, phone number, or email. */ - identifier: string; - /** - * If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list. - * - */ - consider_brute_force_enablement?: boolean; -} diff --git a/src/management/api/resources/userBlocks/client/requests/ListUserBlocksRequestParameters.ts b/src/management/api/resources/userBlocks/client/requests/ListUserBlocksRequestParameters.ts deleted file mode 100644 index 5a523d571c..0000000000 --- a/src/management/api/resources/userBlocks/client/requests/ListUserBlocksRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserBlocksRequestParameters { - /** - * If true and Brute Force Protection is enabled and configured to block logins, will return a list of blocked IP addresses. - * If true and Brute Force Protection is disabled, will return an empty list. - * - */ - consider_brute_force_enablement?: boolean; -} diff --git a/src/management/api/resources/userBlocks/client/requests/index.ts b/src/management/api/resources/userBlocks/client/requests/index.ts deleted file mode 100644 index c5fdc209eb..0000000000 --- a/src/management/api/resources/userBlocks/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListUserBlocksByIdentifierRequestParameters } from "./ListUserBlocksByIdentifierRequestParameters.js"; -export { type DeleteUserBlocksByIdentifierRequestParameters } from "./DeleteUserBlocksByIdentifierRequestParameters.js"; -export { type ListUserBlocksRequestParameters } from "./ListUserBlocksRequestParameters.js"; diff --git a/src/management/api/resources/userGrants/client/Client.ts b/src/management/api/resources/userGrants/client/Client.ts index d46e1f35b3..e94471de4e 100644 --- a/src/management/api/resources/userGrants/client/Client.ts +++ b/src/management/api/resources/userGrants/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; export declare namespace UserGrants { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class UserGrants { @@ -51,16 +31,26 @@ export class UserGrants { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.userGrants.list() + * await client.userGrants.list({ + * per_page: 1, + * page: 1, + * include_totals: true, + * user_id: "user_id", + * client_id: "client_id", + * audience: "audience" + * }) */ public async list( request: Management.ListUserGrantsRequestParameters = {}, requestOptions?: UserGrants.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListUserGrantsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:grants"] }], + }; const { per_page: perPage = 50, page = 0, @@ -70,27 +60,27 @@ export class UserGrants { audience, } = request; const _queryParams: Record = {}; - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (userId != null) { + if (userId !== undefined) { _queryParams["user_id"] = userId; } - if (clientId != null) { + if (clientId !== undefined) { _queryParams["client_id"] = clientId; } - if (audience != null) { + if (audience !== undefined) { _queryParams["audience"] = audience; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -103,10 +93,10 @@ export class UserGrants { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -155,7 +145,7 @@ export class UserGrants { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.grants ?? []).length > 0, @@ -193,12 +183,15 @@ export class UserGrants { request: Management.DeleteUserGrantByUserIdRequestParameters, requestOptions?: UserGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:grants"] }], + }; const { user_id: userId } = request; const _queryParams: Record = {}; _queryParams["user_id"] = userId; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -211,9 +204,10 @@ export class UserGrants { method: "DELETE", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -274,9 +268,12 @@ export class UserGrants { id: string, requestOptions?: UserGrants.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:grants"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -284,14 +281,15 @@ export class UserGrants { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `grants/${encodeURIComponent(id)}`, + `grants/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -331,7 +329,7 @@ export class UserGrants { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/userGrants/client/index.ts b/src/management/api/resources/userGrants/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/userGrants/client/index.ts +++ b/src/management/api/resources/userGrants/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/userGrants/client/requests/DeleteUserGrantByUserIdRequestParameters.ts b/src/management/api/resources/userGrants/client/requests/DeleteUserGrantByUserIdRequestParameters.ts deleted file mode 100644 index bf07d92961..0000000000 --- a/src/management/api/resources/userGrants/client/requests/DeleteUserGrantByUserIdRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * user_id: "user_id" - * } - */ -export interface DeleteUserGrantByUserIdRequestParameters { - /** user_id of the grant to delete. */ - user_id: string; -} diff --git a/src/management/api/resources/userGrants/client/requests/ListUserGrantsRequestParameters.ts b/src/management/api/resources/userGrants/client/requests/ListUserGrantsRequestParameters.ts deleted file mode 100644 index 8eec5ba621..0000000000 --- a/src/management/api/resources/userGrants/client/requests/ListUserGrantsRequestParameters.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserGrantsRequestParameters { - /** Number of results per page. */ - per_page?: number; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** user_id of the grants to retrieve. */ - user_id?: string; - /** client_id of the grants to retrieve. */ - client_id?: string; - /** audience of the grants to retrieve. */ - audience?: string; -} diff --git a/src/management/api/resources/userGrants/client/requests/index.ts b/src/management/api/resources/userGrants/client/requests/index.ts deleted file mode 100644 index 4f67043d05..0000000000 --- a/src/management/api/resources/userGrants/client/requests/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { type ListUserGrantsRequestParameters } from "./ListUserGrantsRequestParameters.js"; -export { type DeleteUserGrantByUserIdRequestParameters } from "./DeleteUserGrantByUserIdRequestParameters.js"; diff --git a/src/management/api/resources/users/client/Client.ts b/src/management/api/resources/users/client/Client.ts index f64d3848e1..de51116cf5 100644 --- a/src/management/api/resources/users/client/Client.ts +++ b/src/management/api/resources/users/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import * as Management from "../../../index.js"; @@ -9,9 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers. import * as errors from "../../../../errors/index.js"; import { AuthenticationMethods } from "../resources/authenticationMethods/client/Client.js"; import { Authenticators } from "../resources/authenticators/client/Client.js"; +import { ConnectedAccounts } from "../resources/connectedAccounts/client/Client.js"; import { Enrollments } from "../resources/enrollments/client/Client.js"; import { FederatedConnectionsTokensets } from "../resources/federatedConnectionsTokensets/client/Client.js"; -import { Groups } from "../resources/groups/client/Client.js"; import { Identities } from "../resources/identities/client/Client.js"; import { Logs } from "../resources/logs/client/Client.js"; import { Multifactor } from "../resources/multifactor/client/Client.js"; @@ -23,37 +22,18 @@ import { RefreshToken } from "../resources/refreshToken/client/Client.js"; import { Sessions } from "../resources/sessions/client/Client.js"; export declare namespace Users { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Users { protected readonly _options: Users.Options; protected _authenticationMethods: AuthenticationMethods | undefined; protected _authenticators: Authenticators | undefined; + protected _connectedAccounts: ConnectedAccounts | undefined; protected _enrollments: Enrollments | undefined; protected _federatedConnectionsTokensets: FederatedConnectionsTokensets | undefined; - protected _groups: Groups | undefined; protected _identities: Identities | undefined; protected _logs: Logs | undefined; protected _multifactor: Multifactor | undefined; @@ -76,6 +56,10 @@ export class Users { return (this._authenticators ??= new Authenticators(this._options)); } + public get connectedAccounts(): ConnectedAccounts { + return (this._connectedAccounts ??= new ConnectedAccounts(this._options)); + } + public get enrollments(): Enrollments { return (this._enrollments ??= new Enrollments(this._options)); } @@ -84,10 +68,6 @@ export class Users { return (this._federatedConnectionsTokensets ??= new FederatedConnectionsTokensets(this._options)); } - public get groups(): Groups { - return (this._groups ??= new Groups(this._options)); - } - public get identities(): Identities { return (this._identities ??= new Identities(this._options)); } @@ -150,16 +130,30 @@ export class Users { * @throws {@link Management.ServiceUnavailableError} * * @example - * await client.users.list() + * await client.users.list({ + * page: 1, + * per_page: 1, + * include_totals: true, + * sort: "sort", + * connection: "connection", + * fields: "fields", + * include_fields: true, + * q: "q", + * search_engine: "v1", + * primary_order: true + * }) */ public async list( request: Management.ListUsersRequestParameters = {}, requestOptions?: Users.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( request: Management.ListUsersRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users", "read:user_idp_tokens"] }], + }; const { page = 0, per_page: perPage = 50, @@ -173,39 +167,39 @@ export class Users { primary_order: primaryOrder, } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } - if (sort != null) { + if (sort !== undefined) { _queryParams["sort"] = sort; } - if (connection != null) { + if (connection !== undefined) { _queryParams["connection"] = connection; } - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } - if (q != null) { + if (q !== undefined) { _queryParams["q"] = q; } - if (searchEngine != null) { + if (searchEngine !== undefined) { _queryParams["search_engine"] = searchEngine; } - if (primaryOrder != null) { - _queryParams["primary_order"] = primaryOrder.toString(); + if (primaryOrder !== undefined) { + _queryParams["primary_order"] = primaryOrder?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -218,10 +212,10 @@ export class Users { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -280,7 +274,7 @@ export class Users { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.users ?? []).length > 0, @@ -322,9 +316,12 @@ export class Users { request: Management.CreateUserRequestContent, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -340,9 +337,10 @@ export class Users { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.CreateUserResponseContent, rawResponse: _response.rawResponse }; @@ -403,6 +401,8 @@ export class Users { * * @example * await client.users.listUsersByEmail({ + * fields: "fields", + * include_fields: true, * email: "email" * }) */ @@ -417,20 +417,23 @@ export class Users { request: Management.ListUsersByEmailRequestParameters, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users"] }], + }; const { fields, include_fields: includeFields, email } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } _queryParams["email"] = email; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -443,9 +446,10 @@ export class Users { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UserResponseSchema[], rawResponse: _response.rawResponse }; @@ -501,7 +505,10 @@ export class Users { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.get("id") + * await client.users.get("id", { + * fields: "fields", + * include_fields: true + * }) */ public get( id: string, @@ -516,19 +523,25 @@ export class Users { request: Management.GetUserRequestParameters = {}, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:users", "read:current_user", "read:user_idp_tokens"] }, + ], + }; const { fields, include_fields: includeFields } = request; const _queryParams: Record = {}; - if (fields != null) { + if (fields !== undefined) { _queryParams["fields"] = fields; } - if (includeFields != null) { - _queryParams["include_fields"] = includeFields.toString(); + if (includeFields !== undefined) { + _queryParams["include_fields"] = includeFields?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -536,14 +549,15 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}`, + `users/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.GetUserResponseContent, rawResponse: _response.rawResponse }; @@ -606,9 +620,12 @@ export class Users { } private async __delete(id: string, requestOptions?: Users.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:users", "delete:current_user"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -616,14 +633,15 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}`, + `users/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -763,9 +781,21 @@ export class Users { request: Management.UpdateUserRequestContent = {}, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { + oAuth2ClientCredentials: [ + "update:users", + "update:users_app_metadata", + "update:current_user_metadata", + ], + }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -773,7 +803,7 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}`, + `users/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -781,9 +811,10 @@ export class Users { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UpdateUserResponseContent, rawResponse: _response.rawResponse }; @@ -852,9 +883,12 @@ export class Users { id: string, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -862,14 +896,15 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/recovery-code-regeneration`, + `users/${core.url.encodePathParam(id)}/recovery-code-regeneration`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -944,9 +979,12 @@ export class Users { request: Management.RevokeUserAccessRequestContent = {}, requestOptions?: Users.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:sessions", "delete:refresh_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -954,7 +992,7 @@ export class Users { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/revoke-access`, + `users/${core.url.encodePathParam(id)}/revoke-access`, ), method: "POST", headers: _headers, @@ -962,9 +1000,10 @@ export class Users { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -1008,7 +1047,7 @@ export class Users { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/client/index.ts b/src/management/api/resources/users/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/client/index.ts +++ b/src/management/api/resources/users/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/client/requests/CreateUserRequestContent.ts b/src/management/api/resources/users/client/requests/CreateUserRequestContent.ts deleted file mode 100644 index 4478ae424e..0000000000 --- a/src/management/api/resources/users/client/requests/CreateUserRequestContent.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * { - * connection: "connection" - * } - */ -export interface CreateUserRequestContent { - /** The user's email. */ - email?: string; - /** The user's phone number (following the E.164 recommendation). */ - phone_number?: string; - user_metadata?: Management.UserMetadata; - /** Whether this user was blocked by an administrator (true) or not (false). */ - blocked?: boolean; - /** Whether this email address is verified (true) or unverified (false). User will receive a verification email after creation if `email_verified` is false or not specified */ - email_verified?: boolean; - /** Whether this phone number has been verified (true) or not (false). */ - phone_verified?: boolean; - app_metadata?: Management.AppMetadata; - /** The user's given name(s). */ - given_name?: string; - /** The user's family name(s). */ - family_name?: string; - /** The user's full name. */ - name?: string; - /** The user's nickname. */ - nickname?: string; - /** A URI pointing to the user's picture. */ - picture?: string; - /** The external user's id provided by the identity provider. */ - user_id?: string; - /** Name of the connection this user should be created in. */ - connection: string; - /** Initial password for this user. Only valid for auth0 connection strategy. */ - password?: string; - /** Whether the user will receive a verification email after creation (true) or no email (false). Overrides behavior of `email_verified` parameter. */ - verify_email?: boolean; - /** The user's username. Only valid if the connection requires a username. */ - username?: string; -} diff --git a/src/management/api/resources/users/client/requests/GetUserRequestParameters.ts b/src/management/api/resources/users/client/requests/GetUserRequestParameters.ts deleted file mode 100644 index 402a92983e..0000000000 --- a/src/management/api/resources/users/client/requests/GetUserRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetUserRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; -} diff --git a/src/management/api/resources/users/client/requests/ListUsersByEmailRequestParameters.ts b/src/management/api/resources/users/client/requests/ListUsersByEmailRequestParameters.ts deleted file mode 100644 index e6e0951b5d..0000000000 --- a/src/management/api/resources/users/client/requests/ListUsersByEmailRequestParameters.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * email: "email" - * } - */ -export interface ListUsersByEmailRequestParameters { - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). Defaults to true. */ - include_fields?: boolean; - /** Email address to search for (case-sensitive). */ - email: string; -} diff --git a/src/management/api/resources/users/client/requests/ListUsersRequestParameters.ts b/src/management/api/resources/users/client/requests/ListUsersRequestParameters.ts deleted file mode 100644 index 300d8bbeae..0000000000 --- a/src/management/api/resources/users/client/requests/ListUsersRequestParameters.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface ListUsersRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; - /** Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1 */ - sort?: string; - /** Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name" */ - connection?: string; - /** 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. */ - fields?: string; - /** Whether specified fields are to be included (true) or excluded (false). */ - include_fields?: boolean; - /** Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields. */ - q?: string; - /** The version of the search engine */ - search_engine?: Management.SearchEngineVersionsEnum; - /** If true (default), results are returned in a deterministic order. If false, results may be returned in a non-deterministic order, which can enhance performance for complex queries targeting a small number of users. Set to false only when consistent ordering and pagination is not required. */ - primary_order?: boolean; -} diff --git a/src/management/api/resources/users/client/requests/RevokeUserAccessRequestContent.ts b/src/management/api/resources/users/client/requests/RevokeUserAccessRequestContent.ts deleted file mode 100644 index 537620c5c6..0000000000 --- a/src/management/api/resources/users/client/requests/RevokeUserAccessRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface RevokeUserAccessRequestContent { - /** ID of the session to revoke. */ - session_id?: string; - /** Whether to preserve the refresh tokens associated with the session. */ - preserve_refresh_tokens?: boolean; -} diff --git a/src/management/api/resources/users/client/requests/UpdateUserRequestContent.ts b/src/management/api/resources/users/client/requests/UpdateUserRequestContent.ts deleted file mode 100644 index 3027f118d9..0000000000 --- a/src/management/api/resources/users/client/requests/UpdateUserRequestContent.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateUserRequestContent { - /** Whether this user was blocked by an administrator (true) or not (false). */ - blocked?: boolean; - /** Whether this email address is verified (true) or unverified (false). If set to false the user will not receive a verification email unless `verify_email` is set to true. */ - email_verified?: boolean; - /** Email address of this user. */ - email?: string; - /** The user's phone number (following the E.164 recommendation). */ - phone_number?: string; - /** Whether this phone number has been verified (true) or not (false). */ - phone_verified?: boolean; - user_metadata?: Management.UserMetadata; - app_metadata?: Management.AppMetadata; - /** Given name/first name/forename of this user. */ - given_name?: string; - /** Family name/last name/surname of this user. */ - family_name?: string; - /** Name of this user. */ - name?: string; - /** Preferred nickname or alias of this user. */ - nickname?: string; - /** URL to picture, photo, or avatar of this user. */ - picture?: string; - /** Whether this user will receive a verification email after creation (true) or no email (false). Overrides behavior of `email_verified` parameter. */ - verify_email?: boolean; - /** Whether this user will receive a text after changing the phone number (true) or no text (false). Only valid when changing phone number for SMS connections. */ - verify_phone_number?: boolean; - /** New password for this user. Only valid for database connections. */ - password?: string; - /** Name of the connection to target for this user update. */ - connection?: string; - /** Auth0 client ID. Only valid when updating email address. */ - client_id?: string; - /** The user's username. Only valid if the connection requires a username. */ - username?: string; -} diff --git a/src/management/api/resources/users/client/requests/index.ts b/src/management/api/resources/users/client/requests/index.ts deleted file mode 100644 index bab8e65c91..0000000000 --- a/src/management/api/resources/users/client/requests/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { type ListUsersRequestParameters } from "./ListUsersRequestParameters.js"; -export { type CreateUserRequestContent } from "./CreateUserRequestContent.js"; -export { type ListUsersByEmailRequestParameters } from "./ListUsersByEmailRequestParameters.js"; -export { type GetUserRequestParameters } from "./GetUserRequestParameters.js"; -export { type UpdateUserRequestContent } from "./UpdateUserRequestContent.js"; -export { type RevokeUserAccessRequestContent } from "./RevokeUserAccessRequestContent.js"; 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 ee441bdf63..35574edbdd 100644 --- a/src/management/api/resources/users/resources/authenticationMethods/client/Client.ts +++ b/src/management/api/resources/users/resources/authenticationMethods/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace AuthenticationMethods { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class AuthenticationMethods { @@ -54,33 +34,45 @@ export class AuthenticationMethods { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.authenticationMethods.list("id") + * await client.users.authenticationMethods.list("id", { + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListUserAuthenticationMethodsRequestParameters = {}, requestOptions?: AuthenticationMethods.RequestOptions, - ): Promise> { + ): Promise< + core.Page< + Management.UserAuthenticationMethod, + Management.ListUserAuthenticationMethodsOffsetPaginatedResponseContent + > + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListUserAuthenticationMethodsRequestParameters, + request: Management.ListUserAuthenticationMethodsRequestParameters, ): Promise< core.WithRawResponse > => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:authentication_methods"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -88,15 +80,15 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods`, + `users/${core.url.encodePathParam(id)}/authentication-methods`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -154,9 +146,9 @@ export class AuthenticationMethods { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListUserAuthenticationMethodsOffsetPaginatedResponseContent, - Management.UserAuthenticationMethod + return new core.Page< + Management.UserAuthenticationMethod, + Management.ListUserAuthenticationMethodsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -201,9 +193,12 @@ export class AuthenticationMethods { request: Management.CreateUserAuthenticationMethodRequestContent, requestOptions?: AuthenticationMethods.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:authentication_methods"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -211,7 +206,7 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods`, + `users/${core.url.encodePathParam(id)}/authentication-methods`, ), method: "POST", headers: _headers, @@ -219,9 +214,10 @@ export class AuthenticationMethods { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -305,9 +301,12 @@ export class AuthenticationMethods { request: Management.SetUserAuthenticationMethodsRequestContent, requestOptions?: AuthenticationMethods.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:authentication_methods"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -315,7 +314,7 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods`, + `users/${core.url.encodePathParam(id)}/authentication-methods`, ), method: "PUT", headers: _headers, @@ -323,9 +322,10 @@ export class AuthenticationMethods { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -399,9 +399,12 @@ export class AuthenticationMethods { id: string, requestOptions?: AuthenticationMethods.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:authentication_methods"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -409,14 +412,15 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods`, + `users/${core.url.encodePathParam(id)}/authentication-methods`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -487,9 +491,12 @@ export class AuthenticationMethods { authenticationMethodId: string, requestOptions?: AuthenticationMethods.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:authentication_methods"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -497,14 +504,15 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods/${encodeURIComponent(authenticationMethodId)}`, + `users/${core.url.encodePathParam(id)}/authentication-methods/${core.url.encodePathParam(authenticationMethodId)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -582,9 +590,12 @@ export class AuthenticationMethods { authenticationMethodId: string, requestOptions?: AuthenticationMethods.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:authentication_methods"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -592,14 +603,15 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods/${encodeURIComponent(authenticationMethodId)}`, + `users/${core.url.encodePathParam(id)}/authentication-methods/${core.url.encodePathParam(authenticationMethodId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -677,9 +689,12 @@ export class AuthenticationMethods { request: Management.UpdateUserAuthenticationMethodRequestContent = {}, requestOptions?: AuthenticationMethods.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:authentication_methods"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -687,7 +702,7 @@ export class AuthenticationMethods { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authentication-methods/${encodeURIComponent(authenticationMethodId)}`, + `users/${core.url.encodePathParam(id)}/authentication-methods/${core.url.encodePathParam(authenticationMethodId)}`, ), method: "PATCH", headers: _headers, @@ -695,9 +710,10 @@ export class AuthenticationMethods { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -746,7 +762,7 @@ export class AuthenticationMethods { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/authenticationMethods/client/index.ts b/src/management/api/resources/users/resources/authenticationMethods/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/authenticationMethods/client/index.ts +++ b/src/management/api/resources/users/resources/authenticationMethods/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/authenticationMethods/client/requests/CreateUserAuthenticationMethodRequestContent.ts b/src/management/api/resources/users/resources/authenticationMethods/client/requests/CreateUserAuthenticationMethodRequestContent.ts deleted file mode 100644 index c2e4d839a0..0000000000 --- a/src/management/api/resources/users/resources/authenticationMethods/client/requests/CreateUserAuthenticationMethodRequestContent.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * type: "phone" - * } - */ -export interface CreateUserAuthenticationMethodRequestContent { - type: Management.CreatedUserAuthenticationMethodTypeEnum; - /** A human-readable label to identify the authentication method. */ - name?: string; - /** Base32 encoded secret for TOTP generation. */ - totp_secret?: string; - /** Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice. */ - phone_number?: string; - /** Applies to email authentication methods only. The email address used to send verification messages. */ - email?: string; - preferred_authentication_method?: Management.PreferredAuthenticationMethodEnum; - /** Applies to webauthn authentication methods only. The id of the credential. */ - key_id?: string; - /** Applies to webauthn authentication methods only. The public key, which is encoded as base64. */ - public_key?: string; - /** Applies to webauthn authentication methods only. The relying party identifier. */ - relying_party_identifier?: string; -} diff --git a/src/management/api/resources/users/resources/authenticationMethods/client/requests/ListUserAuthenticationMethodsRequestParameters.ts b/src/management/api/resources/users/resources/authenticationMethods/client/requests/ListUserAuthenticationMethodsRequestParameters.ts deleted file mode 100644 index 42d8e7d1aa..0000000000 --- a/src/management/api/resources/users/resources/authenticationMethods/client/requests/ListUserAuthenticationMethodsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserAuthenticationMethodsRequestParameters { - /** Page index of the results to return. First page is 0. Default is 0. */ - page?: number; - /** Number of results per page. Default is 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/users/resources/authenticationMethods/client/requests/UpdateUserAuthenticationMethodRequestContent.ts b/src/management/api/resources/users/resources/authenticationMethods/client/requests/UpdateUserAuthenticationMethodRequestContent.ts deleted file mode 100644 index d80ad0003a..0000000000 --- a/src/management/api/resources/users/resources/authenticationMethods/client/requests/UpdateUserAuthenticationMethodRequestContent.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateUserAuthenticationMethodRequestContent { - /** A human-readable label to identify the authentication method. */ - name?: string; - preferred_authentication_method?: Management.PreferredAuthenticationMethodEnum; -} diff --git a/src/management/api/resources/users/resources/authenticationMethods/client/requests/index.ts b/src/management/api/resources/users/resources/authenticationMethods/client/requests/index.ts deleted file mode 100644 index 2b5ece5e01..0000000000 --- a/src/management/api/resources/users/resources/authenticationMethods/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListUserAuthenticationMethodsRequestParameters } from "./ListUserAuthenticationMethodsRequestParameters.js"; -export { type CreateUserAuthenticationMethodRequestContent } from "./CreateUserAuthenticationMethodRequestContent.js"; -export { type UpdateUserAuthenticationMethodRequestContent } from "./UpdateUserAuthenticationMethodRequestContent.js"; diff --git a/src/management/api/resources/users/resources/authenticators/client/Client.ts b/src/management/api/resources/users/resources/authenticators/client/Client.ts index e1558d8350..89fd0c384b 100644 --- a/src/management/api/resources/users/resources/authenticators/client/Client.ts +++ b/src/management/api/resources/users/resources/authenticators/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Authenticators { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Authenticators { @@ -62,9 +42,12 @@ export class Authenticators { id: string, requestOptions?: Authenticators.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:guardian_enrollments"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -72,14 +55,15 @@ export class Authenticators { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/authenticators`, + `users/${core.url.encodePathParam(id)}/authenticators`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -123,7 +107,7 @@ export class Authenticators { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/groups/resources/members/client/Client.ts b/src/management/api/resources/users/resources/connectedAccounts/client/Client.ts similarity index 63% rename from src/management/api/resources/groups/resources/members/client/Client.ts rename to src/management/api/resources/users/resources/connectedAccounts/client/Client.ts index 36e507102f..a90ed54de5 100644 --- a/src/management/api/resources/groups/resources/members/client/Client.ts +++ b/src/management/api/resources/users/resources/connectedAccounts/client/Client.ts @@ -1,49 +1,31 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; import * as errors from "../../../../../../errors/index.js"; -export declare namespace Members { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } +export declare namespace ConnectedAccounts { + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } -export class Members { - protected readonly _options: Members.Options; +export class ConnectedAccounts { + protected readonly _options: ConnectedAccounts.Options; - constructor(_options: Members.Options) { + constructor(_options: ConnectedAccounts.Options) { this._options = _options; } /** - * @param {string} id - Unique identifier for the group (service-generated). - * @param {Management.GetGroupMembersRequestParameters} request - * @param {Members.RequestOptions} requestOptions - Request-specific configuration. + * Retrieve all connected accounts associated with the user. + * + * @param {string} id - ID of the user to list connected accounts for. + * @param {Management.GetUserConnectedAccountsRequestParameters} request + * @param {ConnectedAccounts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Management.BadRequestError} * @throws {@link Management.UnauthorizedError} @@ -51,28 +33,34 @@ export class Members { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.groups.members.get("id") + * await client.users.connectedAccounts.list("id", { + * from: "from", + * take: 1 + * }) */ - public async get( + public async list( id: string, - request: Management.GetGroupMembersRequestParameters = {}, - requestOptions?: Members.RequestOptions, - ): Promise> { + request: Management.GetUserConnectedAccountsRequestParameters = {}, + requestOptions?: ConnectedAccounts.RequestOptions, + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.groups.GetGroupMembersRequestParameters, - ): Promise> => { + request: Management.GetUserConnectedAccountsRequestParameters, + ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -80,19 +68,19 @@ export class Members { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `groups/${encodeURIComponent(id)}/members`, + `users/${core.url.encodePathParam(id)}/connected-accounts`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { - data: _response.body as Management.GetGroupMembersResponseContent, + data: _response.body as Management.ListUserConnectedAccountsResponseContent, rawResponse: _response.rawResponse, }; } @@ -132,7 +120,7 @@ export class Members { }); case "timeout": throw new errors.ManagementTimeoutError( - "Timeout exceeded when calling GET /groups/{id}/members.", + "Timeout exceeded when calling GET /users/{id}/connected-accounts.", ); case "unknown": throw new errors.ManagementError({ @@ -143,19 +131,19 @@ export class Members { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + 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 ?? [], + getItems: (response) => response?.connected_accounts ?? [], loadPage: (response) => { return list(core.setObjectProperty(request, "from", response?.next)); }, }); } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/connectedAccounts/client/index.ts b/src/management/api/resources/users/resources/connectedAccounts/client/index.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/src/management/api/resources/users/resources/connectedAccounts/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/management/api/resources/users/resources/groups/index.ts b/src/management/api/resources/users/resources/connectedAccounts/index.ts similarity index 100% rename from src/management/api/resources/users/resources/groups/index.ts rename to src/management/api/resources/users/resources/connectedAccounts/index.ts diff --git a/src/management/api/resources/users/resources/enrollments/client/Client.ts b/src/management/api/resources/users/resources/enrollments/client/Client.ts index 96dfd6eba0..49fe494e8f 100644 --- a/src/management/api/resources/users/resources/enrollments/client/Client.ts +++ b/src/management/api/resources/users/resources/enrollments/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Enrollments { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Enrollments { @@ -66,9 +46,12 @@ export class Enrollments { id: string, requestOptions?: Enrollments.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users", "read:current_user"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -76,14 +59,15 @@ export class Enrollments { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/enrollments`, + `users/${core.url.encodePathParam(id)}/enrollments`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UsersEnrollment[], rawResponse: _response.rawResponse }; @@ -127,7 +111,7 @@ export class Enrollments { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/federatedConnectionsTokensets/client/Client.ts b/src/management/api/resources/users/resources/federatedConnectionsTokensets/client/Client.ts index 0a06b23ce9..332c9ae960 100644 --- a/src/management/api/resources/users/resources/federatedConnectionsTokensets/client/Client.ts +++ b/src/management/api/resources/users/resources/federatedConnectionsTokensets/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace FederatedConnectionsTokensets { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class FederatedConnectionsTokensets { @@ -65,9 +45,12 @@ export class FederatedConnectionsTokensets { id: string, requestOptions?: FederatedConnectionsTokensets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:federated_connections_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -75,14 +58,15 @@ export class FederatedConnectionsTokensets { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/federated-connections-tokensets`, + `users/${core.url.encodePathParam(id)}/federated-connections-tokensets`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -155,9 +139,12 @@ export class FederatedConnectionsTokensets { tokensetId: string, requestOptions?: FederatedConnectionsTokensets.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:federated_connections_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -165,14 +152,15 @@ export class FederatedConnectionsTokensets { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/federated-connections-tokensets/${encodeURIComponent(tokensetId)}`, + `users/${core.url.encodePathParam(id)}/federated-connections-tokensets/${core.url.encodePathParam(tokensetId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -216,7 +204,7 @@ export class FederatedConnectionsTokensets { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } 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 a8e8b90cb8..0000000000 --- a/src/management/api/resources/users/resources/groups/client/Client.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as environments from "../../../../../../environments.js"; -import * as core from "../../../../../../core/index.js"; -import * as Management from "../../../../../index.js"; -import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; -import * as errors from "../../../../../../errors/index.js"; - -export declare namespace Groups { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } - - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } -} - -export class Groups { - protected readonly _options: Groups.Options; - - constructor(_options: Groups.Options) { - this._options = _options; - } - - /** - * Retrieve the first multi-factor authentication enrollment that a specific user has confirmed. - * - * @param {string} id - ID of the user to list groups for. - * @param {Management.GetUserGroupsRequestParameters} request - * @param {Groups.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") - */ - public async get( - id: string, - request: Management.GetUserGroupsRequestParameters = {}, - requestOptions?: Groups.RequestOptions, - ): Promise> { - const list = core.HttpResponsePromise.interceptFunction( - async ( - request: Management.users.GetUserGroupsRequestParameters, - ): Promise> => { - const { from: from_, take = 50 } = request; - const _queryParams: Record = {}; - if (from_ != null) { - _queryParams["from"] = from_; - } - if (take != null) { - _queryParams["take"] = take.toString(); - } - let _headers: core.Fetcher.Args["headers"] = mergeHeaders( - this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), - 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/${encodeURIComponent(id)}/groups`, - ), - method: "GET", - headers: _headers, - queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, - abortSignal: requestOptions?.abortSignal, - }); - if (_response.ok) { - return { - data: _response.body as Management.GetUserGroupsResponseContent, - 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, - }); - } - } - switch (_response.error.reason) { - case "non-json": - throw new errors.ManagementError({ - statusCode: _response.error.statusCode, - body: _response.error.rawBody, - rawResponse: _response.rawResponse, - }); - case "timeout": - throw new errors.ManagementTimeoutError( - "Timeout exceeded when calling GET /users/{id}/groups.", - ); - case "unknown": - throw new errors.ManagementError({ - message: _response.error.errorMessage, - rawResponse: _response.rawResponse, - }); - } - }, - ); - const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ - 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)); - }, - }); - } - - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; - } -} 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 82648c6ff8..0000000000 --- a/src/management/api/resources/users/resources/groups/client/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/groups/client/requests/GetUserGroupsRequestParameters.ts b/src/management/api/resources/users/resources/groups/client/requests/GetUserGroupsRequestParameters.ts deleted file mode 100644 index f746c07a02..0000000000 --- a/src/management/api/resources/users/resources/groups/client/requests/GetUserGroupsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface GetUserGroupsRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 25. */ - take?: number; -} diff --git a/src/management/api/resources/users/resources/groups/client/requests/index.ts b/src/management/api/resources/users/resources/groups/client/requests/index.ts deleted file mode 100644 index 886b6a2ec1..0000000000 --- a/src/management/api/resources/users/resources/groups/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type GetUserGroupsRequestParameters } from "./GetUserGroupsRequestParameters.js"; diff --git a/src/management/api/resources/users/resources/identities/client/Client.ts b/src/management/api/resources/users/resources/identities/client/Client.ts index 0ef9921873..e9fa4a2b43 100644 --- a/src/management/api/resources/users/resources/identities/client/Client.ts +++ b/src/management/api/resources/users/resources/identities/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Identities { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Identities { @@ -96,9 +76,15 @@ export class Identities { request: Management.LinkUserIdentityRequestContent = {}, requestOptions?: Identities.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["update:users", "update:current_user_identities"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -106,7 +92,7 @@ export class Identities { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/identities`, + `users/${core.url.encodePathParam(id)}/identities`, ), method: "POST", headers: _headers, @@ -114,9 +100,10 @@ export class Identities { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: _response.body as Management.UserIdentity[], rawResponse: _response.rawResponse }; @@ -193,9 +180,15 @@ export class Identities { userId: string, requestOptions?: Identities.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["update:users", "update:current_user_identities"] }, + ], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,14 +196,15 @@ export class Identities { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/identities/${encodeURIComponent(provider)}/${encodeURIComponent(userId)}`, + `users/${core.url.encodePathParam(id)}/identities/${core.url.encodePathParam(provider)}/${core.url.encodePathParam(userId)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -257,7 +251,7 @@ export class Identities { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/identities/client/index.ts b/src/management/api/resources/users/resources/identities/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/identities/client/index.ts +++ b/src/management/api/resources/users/resources/identities/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/identities/client/requests/LinkUserIdentityRequestContent.ts b/src/management/api/resources/users/resources/identities/client/requests/LinkUserIdentityRequestContent.ts deleted file mode 100644 index 4ea3901cd4..0000000000 --- a/src/management/api/resources/users/resources/identities/client/requests/LinkUserIdentityRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface LinkUserIdentityRequestContent { - provider?: Management.UserIdentityProviderEnum; - /** connection_id of the secondary user account being linked when more than one `auth0` database provider exists. */ - connection_id?: string; - user_id?: Management.UserId; - /** JWT for the secondary account being linked. If sending this parameter, `provider`, `user_id`, and `connection_id` must not be sent. */ - link_with?: string; -} diff --git a/src/management/api/resources/users/resources/identities/client/requests/index.ts b/src/management/api/resources/users/resources/identities/client/requests/index.ts deleted file mode 100644 index 79671576b2..0000000000 --- a/src/management/api/resources/users/resources/identities/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type LinkUserIdentityRequestContent } from "./LinkUserIdentityRequestContent.js"; diff --git a/src/management/api/resources/users/resources/index.ts b/src/management/api/resources/users/resources/index.ts index b25da5b8ac..6c625e352d 100644 --- a/src/management/api/resources/users/resources/index.ts +++ b/src/management/api/resources/users/resources/index.ts @@ -1,8 +1,8 @@ export * as authenticationMethods from "./authenticationMethods/index.js"; 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"; @@ -12,13 +12,3 @@ export * as riskAssessments from "./riskAssessments/index.js"; export * as roles from "./roles/index.js"; export * as refreshToken from "./refreshToken/index.js"; export * as sessions from "./sessions/index.js"; -export * from "./authenticationMethods/client/requests/index.js"; -export * from "./groups/client/requests/index.js"; -export * from "./identities/client/requests/index.js"; -export * from "./logs/client/requests/index.js"; -export * from "./organizations/client/requests/index.js"; -export * from "./permissions/client/requests/index.js"; -export * from "./riskAssessments/client/requests/index.js"; -export * from "./roles/client/requests/index.js"; -export * from "./refreshToken/client/requests/index.js"; -export * from "./sessions/client/requests/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 748958b68a..dcb135eda3 100644 --- a/src/management/api/resources/users/resources/logs/client/Client.ts +++ b/src/management/api/resources/users/resources/logs/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Logs { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Logs { @@ -59,34 +39,42 @@ export class Logs { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.logs.list("id") + * await client.users.logs.list("id", { + * page: 1, + * per_page: 1, + * sort: "sort", + * include_totals: true + * }) */ public async list( id: string, request: Management.ListUserLogsRequestParameters = {}, requestOptions?: Logs.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListUserLogsRequestParameters, + request: Management.ListUserLogsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:logs", "read:logs_users"] }], + }; const { page = 0, per_page: perPage = 50, sort, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (sort != null) { + if (sort !== undefined) { _queryParams["sort"] = sort; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -94,15 +82,15 @@ export class Logs { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/logs`, + `users/${core.url.encodePathParam(id)}/logs`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -156,7 +144,7 @@ export class Logs { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.logs ?? []).length > 0, @@ -168,7 +156,7 @@ export class Logs { }); } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/logs/client/index.ts b/src/management/api/resources/users/resources/logs/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/logs/client/index.ts +++ b/src/management/api/resources/users/resources/logs/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/logs/client/requests/ListUserLogsRequestParameters.ts b/src/management/api/resources/users/resources/logs/client/requests/ListUserLogsRequestParameters.ts deleted file mode 100644 index ea86ce74a4..0000000000 --- a/src/management/api/resources/users/resources/logs/client/requests/ListUserLogsRequestParameters.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserLogsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Paging is disabled if parameter not sent. */ - per_page?: number; - /** Field to sort by. Use `fieldname:1` for ascending order and `fieldname:-1` for descending. */ - sort?: string; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/users/resources/logs/client/requests/index.ts b/src/management/api/resources/users/resources/logs/client/requests/index.ts deleted file mode 100644 index 752f3683c6..0000000000 --- a/src/management/api/resources/users/resources/logs/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListUserLogsRequestParameters } from "./ListUserLogsRequestParameters.js"; diff --git a/src/management/api/resources/users/resources/multifactor/client/Client.ts b/src/management/api/resources/users/resources/multifactor/client/Client.ts index d6e814634b..7f46e18644 100644 --- a/src/management/api/resources/users/resources/multifactor/client/Client.ts +++ b/src/management/api/resources/users/resources/multifactor/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Multifactor { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Multifactor { @@ -64,9 +44,12 @@ export class Multifactor { id: string, requestOptions?: Multifactor.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -74,14 +57,15 @@ export class Multifactor { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/multifactor/actions/invalidate-remember-browser`, + `users/${core.url.encodePathParam(id)}/multifactor/actions/invalidate-remember-browser`, ), method: "POST", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -152,9 +136,12 @@ export class Multifactor { provider: Management.UserMultifactorProviderEnum, requestOptions?: Multifactor.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -162,14 +149,15 @@ export class Multifactor { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/multifactor/${encodeURIComponent(provider)}`, + `users/${core.url.encodePathParam(id)}/multifactor/${core.url.encodePathParam(provider)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -215,7 +203,7 @@ export class Multifactor { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } 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 85b467e72f..6ec42f95e1 100644 --- a/src/management/api/resources/users/resources/organizations/client/Client.ts +++ b/src/management/api/resources/users/resources/organizations/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Organizations { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Organizations { @@ -52,31 +32,38 @@ export class Organizations { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.organizations.list("id") + * await client.users.organizations.list("id", { + * page: 1, + * per_page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListUserOrganizationsRequestParameters = {}, requestOptions?: Organizations.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListUserOrganizationsRequestParameters, + request: Management.ListUserOrganizationsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:organizations"] }], + }; const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -84,15 +71,15 @@ export class Organizations { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/organizations`, + `users/${core.url.encodePathParam(id)}/organizations`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -143,10 +130,7 @@ export class Organizations { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListUserOrganizationsOffsetPaginatedResponseContent, - Management.Organization - >({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.organizations ?? []).length > 0, @@ -158,7 +142,7 @@ export class Organizations { }); } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/organizations/client/index.ts b/src/management/api/resources/users/resources/organizations/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/organizations/client/index.ts +++ b/src/management/api/resources/users/resources/organizations/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/organizations/client/requests/ListUserOrganizationsRequestParameters.ts b/src/management/api/resources/users/resources/organizations/client/requests/ListUserOrganizationsRequestParameters.ts deleted file mode 100644 index 0e5c6cb2b3..0000000000 --- a/src/management/api/resources/users/resources/organizations/client/requests/ListUserOrganizationsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserOrganizationsRequestParameters { - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Number of results per page. Defaults to 50. */ - per_page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/users/resources/organizations/client/requests/index.ts b/src/management/api/resources/users/resources/organizations/client/requests/index.ts deleted file mode 100644 index 891404ab76..0000000000 --- a/src/management/api/resources/users/resources/organizations/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListUserOrganizationsRequestParameters } from "./ListUserOrganizationsRequestParameters.js"; 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 c9fc4bd2b5..a1f264b11f 100644 --- a/src/management/api/resources/users/resources/permissions/client/Client.ts +++ b/src/management/api/resources/users/resources/permissions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Permissions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Permissions { @@ -54,31 +34,40 @@ export class Permissions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.permissions.list("id") + * await client.users.permissions.list("id", { + * per_page: 1, + * page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListUserPermissionsRequestParameters = {}, requestOptions?: Permissions.RequestOptions, - ): Promise> { + ): Promise< + core.Page + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListUserPermissionsRequestParameters, + request: Management.ListUserPermissionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:users"] }], + }; const { per_page: perPage = 50, page = 0, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,15 +75,15 @@ export class Permissions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/permissions`, + `users/${core.url.encodePathParam(id)}/permissions`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -152,9 +141,9 @@ export class Permissions { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListUserPermissionsOffsetPaginatedResponseContent, - Management.UserPermissionSchema + return new core.Page< + Management.UserPermissionSchema, + Management.ListUserPermissionsOffsetPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -200,9 +189,12 @@ export class Permissions { request: Management.CreateUserPermissionsRequestContent, requestOptions?: Permissions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -210,7 +202,7 @@ export class Permissions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/permissions`, + `users/${core.url.encodePathParam(id)}/permissions`, ), method: "POST", headers: _headers, @@ -218,9 +210,10 @@ export class Permissions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -295,9 +288,12 @@ export class Permissions { request: Management.DeleteUserPermissionsRequestContent, requestOptions?: Permissions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -305,7 +301,7 @@ export class Permissions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/permissions`, + `users/${core.url.encodePathParam(id)}/permissions`, ), method: "DELETE", headers: _headers, @@ -313,9 +309,10 @@ export class Permissions { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -359,7 +356,7 @@ export class Permissions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/permissions/client/index.ts b/src/management/api/resources/users/resources/permissions/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/permissions/client/index.ts +++ b/src/management/api/resources/users/resources/permissions/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/permissions/client/requests/CreateUserPermissionsRequestContent.ts b/src/management/api/resources/users/resources/permissions/client/requests/CreateUserPermissionsRequestContent.ts deleted file mode 100644 index c6a05dbf2f..0000000000 --- a/src/management/api/resources/users/resources/permissions/client/requests/CreateUserPermissionsRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * permissions: [{ - * resource_server_identifier: "resource_server_identifier", - * permission_name: "permission_name" - * }] - * } - */ -export interface CreateUserPermissionsRequestContent { - /** List of permissions to add to this user. */ - permissions: Management.PermissionRequestPayload[]; -} diff --git a/src/management/api/resources/users/resources/permissions/client/requests/DeleteUserPermissionsRequestContent.ts b/src/management/api/resources/users/resources/permissions/client/requests/DeleteUserPermissionsRequestContent.ts deleted file mode 100644 index 8806e5a86b..0000000000 --- a/src/management/api/resources/users/resources/permissions/client/requests/DeleteUserPermissionsRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * permissions: [{ - * resource_server_identifier: "resource_server_identifier", - * permission_name: "permission_name" - * }] - * } - */ -export interface DeleteUserPermissionsRequestContent { - /** List of permissions to remove from this user. */ - permissions: Management.PermissionRequestPayload[]; -} diff --git a/src/management/api/resources/users/resources/permissions/client/requests/ListUserPermissionsRequestParameters.ts b/src/management/api/resources/users/resources/permissions/client/requests/ListUserPermissionsRequestParameters.ts deleted file mode 100644 index 233d92f8d4..0000000000 --- a/src/management/api/resources/users/resources/permissions/client/requests/ListUserPermissionsRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserPermissionsRequestParameters { - /** Number of results per page. */ - per_page?: number; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/users/resources/permissions/client/requests/index.ts b/src/management/api/resources/users/resources/permissions/client/requests/index.ts deleted file mode 100644 index 7e9af8bf20..0000000000 --- a/src/management/api/resources/users/resources/permissions/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListUserPermissionsRequestParameters } from "./ListUserPermissionsRequestParameters.js"; -export { type CreateUserPermissionsRequestContent } from "./CreateUserPermissionsRequestContent.js"; -export { type DeleteUserPermissionsRequestContent } from "./DeleteUserPermissionsRequestContent.js"; 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 5440b08667..9a401f1e69 100644 --- a/src/management/api/resources/users/resources/refreshToken/client/Client.ts +++ b/src/management/api/resources/users/resources/refreshToken/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace RefreshToken { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class RefreshToken { @@ -53,28 +33,36 @@ export class RefreshToken { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.refreshToken.list("user_id") + * await client.users.refreshToken.list("user_id", { + * from: "from", + * take: 1 + * }) */ public async list( userId: string, request: Management.ListRefreshTokensRequestParameters = {}, requestOptions?: RefreshToken.RequestOptions, - ): Promise> { + ): Promise< + core.Page + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListRefreshTokensRequestParameters, + request: Management.ListRefreshTokensRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:refresh_tokens"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -82,15 +70,15 @@ export class RefreshToken { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(userId)}/refresh-tokens`, + `users/${core.url.encodePathParam(userId)}/refresh-tokens`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -142,9 +130,9 @@ export class RefreshToken { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListRefreshTokensPaginatedResponseContent, - Management.RefreshTokenResponseContent + return new core.Page< + Management.RefreshTokenResponseContent, + Management.ListRefreshTokensPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -180,9 +168,12 @@ export class RefreshToken { userId: string, requestOptions?: RefreshToken.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:refresh_tokens"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -190,14 +181,15 @@ export class RefreshToken { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(userId)}/refresh-tokens`, + `users/${core.url.encodePathParam(userId)}/refresh-tokens`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -243,7 +235,7 @@ export class RefreshToken { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/refreshToken/client/index.ts b/src/management/api/resources/users/resources/refreshToken/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/refreshToken/client/index.ts +++ b/src/management/api/resources/users/resources/refreshToken/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/refreshToken/client/requests/ListRefreshTokensRequestParameters.ts b/src/management/api/resources/users/resources/refreshToken/client/requests/ListRefreshTokensRequestParameters.ts deleted file mode 100644 index 16b1b6dded..0000000000 --- a/src/management/api/resources/users/resources/refreshToken/client/requests/ListRefreshTokensRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListRefreshTokensRequestParameters { - /** An optional cursor from which to start the selection (exclusive). */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/users/resources/refreshToken/client/requests/index.ts b/src/management/api/resources/users/resources/refreshToken/client/requests/index.ts deleted file mode 100644 index f3a52a22a2..0000000000 --- a/src/management/api/resources/users/resources/refreshToken/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListRefreshTokensRequestParameters } from "./ListRefreshTokensRequestParameters.js"; diff --git a/src/management/api/resources/users/resources/riskAssessments/client/Client.ts b/src/management/api/resources/users/resources/riskAssessments/client/Client.ts index f84fda7f27..cfafb1e3f7 100644 --- a/src/management/api/resources/users/resources/riskAssessments/client/Client.ts +++ b/src/management/api/resources/users/resources/riskAssessments/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace RiskAssessments { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class RiskAssessments { @@ -71,9 +51,12 @@ export class RiskAssessments { request: Management.ClearAssessorsRequestContent, requestOptions?: RiskAssessments.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -81,7 +64,7 @@ export class RiskAssessments { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/risk-assessments/clear`, + `users/${core.url.encodePathParam(id)}/risk-assessments/clear`, ), method: "POST", headers: _headers, @@ -89,9 +72,10 @@ export class RiskAssessments { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -135,7 +119,7 @@ export class RiskAssessments { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/riskAssessments/client/index.ts b/src/management/api/resources/users/resources/riskAssessments/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/riskAssessments/client/index.ts +++ b/src/management/api/resources/users/resources/riskAssessments/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/riskAssessments/client/requests/ClearAssessorsRequestContent.ts b/src/management/api/resources/users/resources/riskAssessments/client/requests/ClearAssessorsRequestContent.ts deleted file mode 100644 index c739c55133..0000000000 --- a/src/management/api/resources/users/resources/riskAssessments/client/requests/ClearAssessorsRequestContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../index.js"; - -/** - * @example - * { - * connection: "connection", - * assessors: ["new-device"] - * } - */ -export interface ClearAssessorsRequestContent { - /** The name of the connection containing the user whose assessors should be cleared. */ - connection: string; - /** List of assessors to clear. */ - assessors: Management.AssessorsTypeEnum[]; -} diff --git a/src/management/api/resources/users/resources/riskAssessments/client/requests/index.ts b/src/management/api/resources/users/resources/riskAssessments/client/requests/index.ts deleted file mode 100644 index cd005d097f..0000000000 --- a/src/management/api/resources/users/resources/riskAssessments/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ClearAssessorsRequestContent } from "./ClearAssessorsRequestContent.js"; 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 176334b24b..046c8b562a 100644 --- a/src/management/api/resources/users/resources/roles/client/Client.ts +++ b/src/management/api/resources/users/resources/roles/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Roles { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Roles { @@ -54,31 +34,41 @@ export class Roles { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.roles.list("id") + * await client.users.roles.list("id", { + * per_page: 1, + * page: 1, + * include_totals: true + * }) */ public async list( id: string, request: Management.ListUserRolesRequestParameters = {}, requestOptions?: Roles.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListUserRolesRequestParameters, + request: Management.ListUserRolesRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [ + { bearerAuth: [] }, + { oAuth2ClientCredentials: ["read:users", "read:roles", "read:role_members"] }, + ], + }; const { per_page: perPage = 50, page = 0, include_totals: includeTotals = true } = request; const _queryParams: Record = {}; - if (perPage != null) { - _queryParams["per_page"] = perPage.toString(); + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; } - if (page != null) { - _queryParams["page"] = page.toString(); + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; } - if (includeTotals != null) { - _queryParams["include_totals"] = includeTotals.toString(); + if (includeTotals !== undefined) { + _queryParams["include_totals"] = includeTotals?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -86,15 +76,15 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/roles`, + `users/${core.url.encodePathParam(id)}/roles`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -143,7 +133,7 @@ export class Roles { ); let _offset = request?.page != null ? request?.page : 0; const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => (response?.roles ?? []).length > 0, @@ -187,9 +177,12 @@ export class Roles { request: Management.AssignUserRolesRequestContent, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users", "create:role_members"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -197,7 +190,7 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/roles`, + `users/${core.url.encodePathParam(id)}/roles`, ), method: "POST", headers: _headers, @@ -205,9 +198,10 @@ export class Roles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -280,9 +274,12 @@ export class Roles { request: Management.DeleteUserRolesRequestContent, requestOptions?: Roles.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:users", "delete:role_members"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -290,7 +287,7 @@ export class Roles { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(id)}/roles`, + `users/${core.url.encodePathParam(id)}/roles`, ), method: "DELETE", headers: _headers, @@ -298,9 +295,10 @@ export class Roles { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -340,7 +338,7 @@ export class Roles { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/roles/client/index.ts b/src/management/api/resources/users/resources/roles/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/roles/client/index.ts +++ b/src/management/api/resources/users/resources/roles/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/roles/client/requests/AssignUserRolesRequestContent.ts b/src/management/api/resources/users/resources/roles/client/requests/AssignUserRolesRequestContent.ts deleted file mode 100644 index a51fef410b..0000000000 --- a/src/management/api/resources/users/resources/roles/client/requests/AssignUserRolesRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * roles: ["roles"] - * } - */ -export interface AssignUserRolesRequestContent { - /** List of roles IDs to associated with the user. */ - roles: string[]; -} diff --git a/src/management/api/resources/users/resources/roles/client/requests/DeleteUserRolesRequestContent.ts b/src/management/api/resources/users/resources/roles/client/requests/DeleteUserRolesRequestContent.ts deleted file mode 100644 index a9014c7564..0000000000 --- a/src/management/api/resources/users/resources/roles/client/requests/DeleteUserRolesRequestContent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * { - * roles: ["roles"] - * } - */ -export interface DeleteUserRolesRequestContent { - /** List of roles IDs to remove from the user. */ - roles: string[]; -} diff --git a/src/management/api/resources/users/resources/roles/client/requests/ListUserRolesRequestParameters.ts b/src/management/api/resources/users/resources/roles/client/requests/ListUserRolesRequestParameters.ts deleted file mode 100644 index 535ea0f12b..0000000000 --- a/src/management/api/resources/users/resources/roles/client/requests/ListUserRolesRequestParameters.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserRolesRequestParameters { - /** Number of results per page. */ - per_page?: number; - /** Page index of the results to return. First page is 0. */ - page?: number; - /** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */ - include_totals?: boolean; -} diff --git a/src/management/api/resources/users/resources/roles/client/requests/index.ts b/src/management/api/resources/users/resources/roles/client/requests/index.ts deleted file mode 100644 index 0d6035cbd9..0000000000 --- a/src/management/api/resources/users/resources/roles/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListUserRolesRequestParameters } from "./ListUserRolesRequestParameters.js"; -export { type AssignUserRolesRequestContent } from "./AssignUserRolesRequestContent.js"; -export { type DeleteUserRolesRequestContent } from "./DeleteUserRolesRequestContent.js"; 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 afc35ced8d..98df3cf483 100644 --- a/src/management/api/resources/users/resources/sessions/client/Client.ts +++ b/src/management/api/resources/users/resources/sessions/client/Client.ts @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import * as Management from "../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/he import * as errors from "../../../../../../errors/index.js"; export declare namespace Sessions { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Sessions { @@ -53,28 +33,34 @@ export class Sessions { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.users.sessions.list("user_id") + * await client.users.sessions.list("user_id", { + * from: "from", + * take: 1 + * }) */ public async list( userId: string, request: Management.ListUserSessionsRequestParameters = {}, requestOptions?: Sessions.RequestOptions, - ): Promise> { + ): Promise> { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.users.ListUserSessionsRequestParameters, + request: Management.ListUserSessionsRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:sessions"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -82,15 +68,15 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(userId)}/sessions`, + `users/${core.url.encodePathParam(userId)}/sessions`, ), method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -142,10 +128,7 @@ export class Sessions { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListUserSessionsPaginatedResponseContent, - Management.SessionResponseContent - >({ + return new core.Page({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, hasNextPage: (response) => @@ -180,9 +163,12 @@ export class Sessions { userId: string, requestOptions?: Sessions.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:sessions"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -190,14 +176,15 @@ export class Sessions { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `users/${encodeURIComponent(userId)}/sessions`, + `users/${core.url.encodePathParam(userId)}/sessions`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -243,7 +230,7 @@ export class Sessions { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/users/resources/sessions/client/index.ts b/src/management/api/resources/users/resources/sessions/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/users/resources/sessions/client/index.ts +++ b/src/management/api/resources/users/resources/sessions/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/users/resources/sessions/client/requests/ListUserSessionsRequestParameters.ts b/src/management/api/resources/users/resources/sessions/client/requests/ListUserSessionsRequestParameters.ts deleted file mode 100644 index 860021af4d..0000000000 --- a/src/management/api/resources/users/resources/sessions/client/requests/ListUserSessionsRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListUserSessionsRequestParameters { - /** An optional cursor from which to start the selection (exclusive). */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/users/resources/sessions/client/requests/index.ts b/src/management/api/resources/users/resources/sessions/client/requests/index.ts deleted file mode 100644 index b42a3e1fad..0000000000 --- a/src/management/api/resources/users/resources/sessions/client/requests/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type ListUserSessionsRequestParameters } from "./ListUserSessionsRequestParameters.js"; diff --git a/src/management/api/resources/verifiableCredentials/client/Client.ts b/src/management/api/resources/verifiableCredentials/client/Client.ts index c687018129..5ef516ef46 100644 --- a/src/management/api/resources/verifiableCredentials/client/Client.ts +++ b/src/management/api/resources/verifiableCredentials/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../BaseClient.js"; import * as environments from "../../../../environments.js"; import * as core from "../../../../core/index.js"; import { Verification } from "../resources/verification/client/Client.js"; export declare namespace VerifiableCredentials { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class VerifiableCredentials { diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/client/Client.ts b/src/management/api/resources/verifiableCredentials/resources/verification/client/Client.ts index b9c608d5bf..295cb570ce 100644 --- a/src/management/api/resources/verifiableCredentials/resources/verification/client/Client.ts +++ b/src/management/api/resources/verifiableCredentials/resources/verification/client/Client.ts @@ -1,21 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions } from "../../../../../../BaseClient.js"; import * as environments from "../../../../../../environments.js"; import * as core from "../../../../../../core/index.js"; import { Templates } from "../resources/templates/client/Client.js"; export declare namespace Verification { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} } export class Verification { diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/index.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/index.ts index b7cd6b2e25..949ef2878b 100644 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/index.ts +++ b/src/management/api/resources/verifiableCredentials/resources/verification/resources/index.ts @@ -1,2 +1 @@ export * as templates from "./templates/index.js"; -export * from "./templates/client/requests/index.js"; 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 0b55545d4e..4a9b94279d 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 @@ -1,7 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; import * as environments from "../../../../../../../../environments.js"; import * as core from "../../../../../../../../core/index.js"; import * as Management from "../../../../../../../index.js"; @@ -9,28 +8,9 @@ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../../../c import * as errors from "../../../../../../../../errors/index.js"; export declare namespace Templates { - export interface Options { - environment?: core.Supplier; - /** Specify a custom URL to connect the client to. */ - baseUrl?: core.Supplier; - token: core.Supplier; - /** Additional headers to include in requests. */ - headers?: Record | undefined>; - fetcher?: core.FetchFunction; - } + export interface Options extends BaseClientOptions {} - export interface RequestOptions { - /** The maximum time to wait for a response in seconds. */ - timeoutInSeconds?: number; - /** The number of times to retry the request. Defaults to 2. */ - maxRetries?: number; - /** A hook to abort the request. */ - abortSignal?: AbortSignal; - /** Additional query string parameters to include in the request. */ - queryParams?: Record; - /** Additional headers to include in the request. */ - headers?: Record | undefined>; - } + export interface RequestOptions extends BaseRequestOptions {} } export class Templates { @@ -52,27 +32,38 @@ export class Templates { * @throws {@link Management.TooManyRequestsError} * * @example - * await client.verifiableCredentials.verification.templates.list() + * await client.verifiableCredentials.verification.templates.list({ + * from: "from", + * take: 1 + * }) */ public async list( request: Management.ListVerifiableCredentialTemplatesRequestParameters = {}, requestOptions?: Templates.RequestOptions, - ): Promise> { + ): Promise< + core.Page< + Management.VerifiableCredentialTemplateResponse, + Management.ListVerifiableCredentialTemplatesPaginatedResponseContent + > + > { const list = core.HttpResponsePromise.interceptFunction( async ( - request: Management.verifiableCredentials.verification.ListVerifiableCredentialTemplatesRequestParameters, + request: Management.ListVerifiableCredentialTemplatesRequestParameters, ): Promise> => { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:vdcs_templates"] }], + }; const { from: from_, take = 50 } = request; const _queryParams: Record = {}; - if (from_ != null) { + if (from_ !== undefined) { _queryParams["from"] = from_; } - if (take != null) { - _queryParams["take"] = take.toString(); + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; } let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -85,10 +76,10 @@ export class Templates { method: "GET", headers: _headers, queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, - timeoutMs: - requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -143,9 +134,9 @@ export class Templates { }, ); const dataWithRawResponse = await list(request).withRawResponse(); - return new core.Pageable< - Management.ListVerifiableCredentialTemplatesPaginatedResponseContent, - Management.VerifiableCredentialTemplateResponse + return new core.Page< + Management.VerifiableCredentialTemplateResponse, + Management.ListVerifiableCredentialTemplatesPaginatedResponseContent >({ response: dataWithRawResponse.data, rawResponse: dataWithRawResponse.rawResponse, @@ -194,9 +185,12 @@ export class Templates { request: Management.CreateVerifiableCredentialTemplateRequestContent, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["create:vdcs_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -212,9 +206,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -289,9 +284,12 @@ export class Templates { id: string, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["read:vdcs_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -299,14 +297,15 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `verifiable-credentials/verification/templates/${encodeURIComponent(id)}`, + `verifiable-credentials/verification/templates/${core.url.encodePathParam(id)}`, ), method: "GET", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -374,9 +373,12 @@ export class Templates { } private async __delete(id: string, requestOptions?: Templates.RequestOptions): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["delete:vdcs_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -384,14 +386,15 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `verifiable-credentials/verification/templates/${encodeURIComponent(id)}`, + `verifiable-credentials/verification/templates/${core.url.encodePathParam(id)}`, ), method: "DELETE", headers: _headers, queryParameters: requestOptions?.queryParams, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { data: undefined, rawResponse: _response.rawResponse }; @@ -464,9 +467,12 @@ export class Templates { request: Management.UpdateVerifiableCredentialTemplateRequestContent = {}, requestOptions?: Templates.RequestOptions, ): Promise> { + const _metadata: core.EndpointMetadata = { + security: [{ bearerAuth: [] }, { oAuth2ClientCredentials: ["update:vdcs_templates"] }], + }; let _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }), + mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader(_metadata) }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -474,7 +480,7 @@ export class Templates { (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.ManagementEnvironment.Default, - `verifiable-credentials/verification/templates/${encodeURIComponent(id)}`, + `verifiable-credentials/verification/templates/${core.url.encodePathParam(id)}`, ), method: "PATCH", headers: _headers, @@ -482,9 +488,10 @@ export class Templates { queryParameters: requestOptions?.queryParams, requestType: "json", body: request, - timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, - maxRetries: requestOptions?.maxRetries, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, + endpointMetadata: _metadata, }); if (_response.ok) { return { @@ -533,7 +540,7 @@ export class Templates { } } - protected async _getAuthorizationHeader(): Promise { - return `Bearer ${await core.Supplier.get(this._options.token)}`; + protected async _getAuthorizationHeader(endpointMetadata: core.EndpointMetadata): Promise { + return `Bearer ${await core.EndpointSupplier.get(this._options.token, { endpointMetadata })}`; } } diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/index.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/index.ts index 82648c6ff8..cb0ff5c3b5 100644 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/index.ts +++ b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/index.ts @@ -1,2 +1 @@ export {}; -export * from "./requests/index.js"; diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/CreateVerifiableCredentialTemplateRequestContent.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/CreateVerifiableCredentialTemplateRequestContent.ts deleted file mode 100644 index 0d9bd99342..0000000000 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/CreateVerifiableCredentialTemplateRequestContent.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * { - * name: "name", - * type: "type", - * dialect: "dialect", - * presentation: { - * "org.iso.18013.5.1.mDL": { - * "org.iso.18013.5.1": {} - * } - * }, - * well_known_trusted_issuers: "well_known_trusted_issuers" - * } - */ -export interface CreateVerifiableCredentialTemplateRequestContent { - name: string; - type: string; - dialect: string; - presentation: Management.MdlPresentationRequest; - custom_certificate_authority?: string; - well_known_trusted_issuers: string; -} diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/ListVerifiableCredentialTemplatesRequestParameters.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/ListVerifiableCredentialTemplatesRequestParameters.ts deleted file mode 100644 index 38e30c5a2d..0000000000 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/ListVerifiableCredentialTemplatesRequestParameters.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * @example - * {} - */ -export interface ListVerifiableCredentialTemplatesRequestParameters { - /** Optional Id from which to start selection. */ - from?: string; - /** Number of results per page. Defaults to 50. */ - take?: number; -} diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/UpdateVerifiableCredentialTemplateRequestContent.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/UpdateVerifiableCredentialTemplateRequestContent.ts deleted file mode 100644 index bc4876713b..0000000000 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/UpdateVerifiableCredentialTemplateRequestContent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../../../../../../../../index.js"; - -/** - * @example - * {} - */ -export interface UpdateVerifiableCredentialTemplateRequestContent { - name?: string; - type?: string; - dialect?: string; - presentation?: Management.MdlPresentationRequest; - well_known_trusted_issuers?: string; - version?: number; -} diff --git a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/index.ts b/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/index.ts deleted file mode 100644 index 02d29e36e0..0000000000 --- a/src/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/requests/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { type ListVerifiableCredentialTemplatesRequestParameters } from "./ListVerifiableCredentialTemplatesRequestParameters.js"; -export { type CreateVerifiableCredentialTemplateRequestContent } from "./CreateVerifiableCredentialTemplateRequestContent.js"; -export { type UpdateVerifiableCredentialTemplateRequestContent } from "./UpdateVerifiableCredentialTemplateRequestContent.js"; diff --git a/src/management/api/types/Action.ts b/src/management/api/types/Action.ts index 622c6bd454..e4c239f56d 100644 --- a/src/management/api/types/Action.ts +++ b/src/management/api/types/Action.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionBase.ts b/src/management/api/types/ActionBase.ts index 7c902a2975..9b14166084 100644 --- a/src/management/api/types/ActionBase.ts +++ b/src/management/api/types/ActionBase.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionBinding.ts b/src/management/api/types/ActionBinding.ts index e753da321c..cd537d8c7b 100644 --- a/src/management/api/types/ActionBinding.ts +++ b/src/management/api/types/ActionBinding.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionBindingRef.ts b/src/management/api/types/ActionBindingRef.ts index 962c865a7c..f1364d9379 100644 --- a/src/management/api/types/ActionBindingRef.ts +++ b/src/management/api/types/ActionBindingRef.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionBindingRefTypeEnum.ts b/src/management/api/types/ActionBindingRefTypeEnum.ts index 04b03b25b6..295c7d2aa0 100644 --- a/src/management/api/types/ActionBindingRefTypeEnum.ts +++ b/src/management/api/types/ActionBindingRefTypeEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * How the action is being referred to: `action_id` or `action_name`. - */ -export type ActionBindingRefTypeEnum = "binding_id" | "action_id" | "action_name"; +/** How the action is being referred to: `action_id` or `action_name`. */ export const ActionBindingRefTypeEnum = { BindingId: "binding_id", ActionId: "action_id", ActionName: "action_name", } as const; +export type ActionBindingRefTypeEnum = (typeof ActionBindingRefTypeEnum)[keyof typeof ActionBindingRefTypeEnum]; diff --git a/src/management/api/types/ActionBindingTypeEnum.ts b/src/management/api/types/ActionBindingTypeEnum.ts index abb39f7c6a..0e217cbc64 100644 --- a/src/management/api/types/ActionBindingTypeEnum.ts +++ b/src/management/api/types/ActionBindingTypeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * In order to execute an Action, it must be bound to a trigger using a binding. `trigger-bound` means that bindings are managed by the tenant. `entity-bound` means that the bindings are automatically managed by Auth0 and other internal resouces will control those bindings. Tenants cannot manage `entity-bound` bindings. - */ -export type ActionBindingTypeEnum = "trigger-bound" | "entity-bound"; +/** In order to execute an Action, it must be bound to a trigger using a binding. `trigger-bound` means that bindings are managed by the tenant. `entity-bound` means that the bindings are automatically managed by Auth0 and other internal resouces will control those bindings. Tenants cannot manage `entity-bound` bindings. */ export const ActionBindingTypeEnum = { TriggerBound: "trigger-bound", EntityBound: "entity-bound", } as const; +export type ActionBindingTypeEnum = (typeof ActionBindingTypeEnum)[keyof typeof ActionBindingTypeEnum]; diff --git a/src/management/api/types/ActionBindingWithRef.ts b/src/management/api/types/ActionBindingWithRef.ts index ffd7e4109d..ba3711d68f 100644 --- a/src/management/api/types/ActionBindingWithRef.ts +++ b/src/management/api/types/ActionBindingWithRef.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionBuildStatusEnum.ts b/src/management/api/types/ActionBuildStatusEnum.ts index c7647d5401..8e2e4b7d97 100644 --- a/src/management/api/types/ActionBuildStatusEnum.ts +++ b/src/management/api/types/ActionBuildStatusEnum.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The build status of this action. - */ -export type ActionBuildStatusEnum = "pending" | "building" | "packaged" | "built" | "retrying" | "failed"; +/** The build status of this action. */ export const ActionBuildStatusEnum = { Pending: "pending", Building: "building", @@ -14,3 +9,4 @@ export const ActionBuildStatusEnum = { Retrying: "retrying", Failed: "failed", } as const; +export type ActionBuildStatusEnum = (typeof ActionBuildStatusEnum)[keyof typeof ActionBuildStatusEnum]; diff --git a/src/management/api/types/ActionDeployedVersion.ts b/src/management/api/types/ActionDeployedVersion.ts index b73ec6c927..267783214f 100644 --- a/src/management/api/types/ActionDeployedVersion.ts +++ b/src/management/api/types/ActionDeployedVersion.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionError.ts b/src/management/api/types/ActionError.ts index fa861d114e..b2d0d14d23 100644 --- a/src/management/api/types/ActionError.ts +++ b/src/management/api/types/ActionError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Error is a generic error with a human readable id which should be easily referenced in support tickets. diff --git a/src/management/api/types/ActionExecutionResult.ts b/src/management/api/types/ActionExecutionResult.ts index 88a1b6dad5..284fe26366 100644 --- a/src/management/api/types/ActionExecutionResult.ts +++ b/src/management/api/types/ActionExecutionResult.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionExecutionStatusEnum.ts b/src/management/api/types/ActionExecutionStatusEnum.ts index 58892a8e3d..3b744352ca 100644 --- a/src/management/api/types/ActionExecutionStatusEnum.ts +++ b/src/management/api/types/ActionExecutionStatusEnum.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The overall status of an execution. - */ -export type ActionExecutionStatusEnum = "unspecified" | "pending" | "final" | "partial" | "canceled" | "suspended"; +/** The overall status of an execution. */ export const ActionExecutionStatusEnum = { Unspecified: "unspecified", Pending: "pending", @@ -14,3 +9,4 @@ export const ActionExecutionStatusEnum = { Canceled: "canceled", Suspended: "suspended", } as const; +export type ActionExecutionStatusEnum = (typeof ActionExecutionStatusEnum)[keyof typeof ActionExecutionStatusEnum]; diff --git a/src/management/api/types/ActionSecretRequest.ts b/src/management/api/types/ActionSecretRequest.ts index f617889ddc..362d299ae2 100644 --- a/src/management/api/types/ActionSecretRequest.ts +++ b/src/management/api/types/ActionSecretRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ActionSecretRequest { /** The name of the particular secret, e.g. API_KEY. */ diff --git a/src/management/api/types/ActionSecretResponse.ts b/src/management/api/types/ActionSecretResponse.ts index c2f409e671..f36db3fe1a 100644 --- a/src/management/api/types/ActionSecretResponse.ts +++ b/src/management/api/types/ActionSecretResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ActionSecretResponse { /** The name of the particular secret, e.g. API_KEY. */ diff --git a/src/management/api/types/ActionTrigger.ts b/src/management/api/types/ActionTrigger.ts index 6b646a77b5..2ba1e72e77 100644 --- a/src/management/api/types/ActionTrigger.ts +++ b/src/management/api/types/ActionTrigger.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionTriggerCompatibleTrigger.ts b/src/management/api/types/ActionTriggerCompatibleTrigger.ts index 92ac1e5156..326d869791 100644 --- a/src/management/api/types/ActionTriggerCompatibleTrigger.ts +++ b/src/management/api/types/ActionTriggerCompatibleTrigger.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionTriggerTypeEnum.ts b/src/management/api/types/ActionTriggerTypeEnum.ts index 4fdd223021..b886b6df17 100644 --- a/src/management/api/types/ActionTriggerTypeEnum.ts +++ b/src/management/api/types/ActionTriggerTypeEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * An actions extensibility point. diff --git a/src/management/api/types/ActionVersion.ts b/src/management/api/types/ActionVersion.ts index f0c3869e7f..971a2d3ccb 100644 --- a/src/management/api/types/ActionVersion.ts +++ b/src/management/api/types/ActionVersion.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ActionVersionBuildStatusEnum.ts b/src/management/api/types/ActionVersionBuildStatusEnum.ts index c1e622c937..791ac2aae1 100644 --- a/src/management/api/types/ActionVersionBuildStatusEnum.ts +++ b/src/management/api/types/ActionVersionBuildStatusEnum.ts @@ -1,11 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The build status of this specific version. - */ -export type ActionVersionBuildStatusEnum = "pending" | "building" | "packaged" | "built" | "retrying" | "failed"; +/** The build status of this specific version. */ export const ActionVersionBuildStatusEnum = { Pending: "pending", Building: "building", @@ -14,3 +9,5 @@ export const ActionVersionBuildStatusEnum = { Retrying: "retrying", Failed: "failed", } as const; +export type ActionVersionBuildStatusEnum = + (typeof ActionVersionBuildStatusEnum)[keyof typeof ActionVersionBuildStatusEnum]; diff --git a/src/management/api/types/ActionVersionDependency.ts b/src/management/api/types/ActionVersionDependency.ts index b800d602aa..657574a168 100644 --- a/src/management/api/types/ActionVersionDependency.ts +++ b/src/management/api/types/ActionVersionDependency.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Dependency is an npm module. These values are used to produce an immutable artifact, which manifests as a layer_id. diff --git a/src/management/api/types/AculClientFilter.ts b/src/management/api/types/AculClientFilter.ts index 4b797d16aa..061442df08 100644 --- a/src/management/api/types/AculClientFilter.ts +++ b/src/management/api/types/AculClientFilter.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculClientFilterById.ts b/src/management/api/types/AculClientFilterById.ts index 48c5c99ff9..adc705b8e8 100644 --- a/src/management/api/types/AculClientFilterById.ts +++ b/src/management/api/types/AculClientFilterById.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AculClientFilterById { /** Client ID */ diff --git a/src/management/api/types/AculClientFilterByMetadata.ts b/src/management/api/types/AculClientFilterByMetadata.ts index 6ef4cf62ed..bbe7d59728 100644 --- a/src/management/api/types/AculClientFilterByMetadata.ts +++ b/src/management/api/types/AculClientFilterByMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculClientMetadata.ts b/src/management/api/types/AculClientMetadata.ts index 06e9a3c452..cff5d6092e 100644 --- a/src/management/api/types/AculClientMetadata.ts +++ b/src/management/api/types/AculClientMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Client metadata key/value pairs diff --git a/src/management/api/types/AculConfigs.ts b/src/management/api/types/AculConfigs.ts new file mode 100644 index 0000000000..4ea7bccf87 --- /dev/null +++ b/src/management/api/types/AculConfigs.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Array of screen configurations to update + */ +export type AculConfigs = Management.AculConfigsItem[]; diff --git a/src/management/api/types/AculConfigsItem.ts b/src/management/api/types/AculConfigsItem.ts new file mode 100644 index 0000000000..37477f9b47 --- /dev/null +++ b/src/management/api/types/AculConfigsItem.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface AculConfigsItem { + prompt: Management.PromptGroupNameEnum; + screen: Management.ScreenGroupNameEnum; + rendering_mode: Management.AculRenderingModeEnum; + context_configuration?: Management.AculContextConfiguration; + default_head_tags_disabled?: (Management.AculDefaultHeadTagsDisabled | undefined) | null; + head_tags: Management.AculHeadTags; + filters?: Management.AculFilters | null; + use_page_template?: (Management.AculUsePageTemplate | undefined) | null; +} diff --git a/src/management/api/types/AculContextConfiguration.ts b/src/management/api/types/AculContextConfiguration.ts new file mode 100644 index 0000000000..491c155e8c --- /dev/null +++ b/src/management/api/types/AculContextConfiguration.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Context values to make available + */ +export type AculContextConfiguration = Management.AculContextConfigurationItem[]; diff --git a/src/management/api/types/AculContextConfigurationItem.ts b/src/management/api/types/AculContextConfigurationItem.ts new file mode 100644 index 0000000000..42c3412dcb --- /dev/null +++ b/src/management/api/types/AculContextConfigurationItem.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type AculContextConfigurationItem = string; diff --git a/src/management/api/types/AculDefaultHeadTagsDisabled.ts b/src/management/api/types/AculDefaultHeadTagsDisabled.ts new file mode 100644 index 0000000000..43cb6880bc --- /dev/null +++ b/src/management/api/types/AculDefaultHeadTagsDisabled.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Override Universal Login default head tags + */ +export type AculDefaultHeadTagsDisabled = (boolean | null) | undefined; diff --git a/src/management/api/types/AculDomainFilter.ts b/src/management/api/types/AculDomainFilter.ts index b8cc46ee9c..752aab1d9f 100644 --- a/src/management/api/types/AculDomainFilter.ts +++ b/src/management/api/types/AculDomainFilter.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculDomainFilterById.ts b/src/management/api/types/AculDomainFilterById.ts index aec283dfe7..f5ae95c1e6 100644 --- a/src/management/api/types/AculDomainFilterById.ts +++ b/src/management/api/types/AculDomainFilterById.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AculDomainFilterById { /** Domain ID */ diff --git a/src/management/api/types/AculDomainFilterByMetadata.ts b/src/management/api/types/AculDomainFilterByMetadata.ts index aefe049bd4..1c5006d167 100644 --- a/src/management/api/types/AculDomainFilterByMetadata.ts +++ b/src/management/api/types/AculDomainFilterByMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculDomainMetadata.ts b/src/management/api/types/AculDomainMetadata.ts index 6fe0579074..7e4c563d16 100644 --- a/src/management/api/types/AculDomainMetadata.ts +++ b/src/management/api/types/AculDomainMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Domain metadata key/value pairs diff --git a/src/management/api/types/AculFilters.ts b/src/management/api/types/AculFilters.ts index ddda922a4b..0756b38d0d 100644 --- a/src/management/api/types/AculFilters.ts +++ b/src/management/api/types/AculFilters.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculHeadTag.ts b/src/management/api/types/AculHeadTag.ts index db6464ce84..20ea5c4dc9 100644 --- a/src/management/api/types/AculHeadTag.ts +++ b/src/management/api/types/AculHeadTag.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculHeadTagAttributes.ts b/src/management/api/types/AculHeadTagAttributes.ts index 58813dd3b3..dfe8ec3e0e 100644 --- a/src/management/api/types/AculHeadTagAttributes.ts +++ b/src/management/api/types/AculHeadTagAttributes.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Attributes of the HTML tag diff --git a/src/management/api/types/AculHeadTags.ts b/src/management/api/types/AculHeadTags.ts new file mode 100644 index 0000000000..a16b68bf17 --- /dev/null +++ b/src/management/api/types/AculHeadTags.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * An array of head tags + */ +export type AculHeadTags = Management.AculHeadTag[]; diff --git a/src/management/api/types/AculMatchTypeEnum.ts b/src/management/api/types/AculMatchTypeEnum.ts index dadac8b1dd..83096efa3c 100644 --- a/src/management/api/types/AculMatchTypeEnum.ts +++ b/src/management/api/types/AculMatchTypeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Type of match to apply - */ -export type AculMatchTypeEnum = "includes_any" | "excludes_any"; +/** Type of match to apply */ export const AculMatchTypeEnum = { IncludesAny: "includes_any", ExcludesAny: "excludes_any", } as const; +export type AculMatchTypeEnum = (typeof AculMatchTypeEnum)[keyof typeof AculMatchTypeEnum]; diff --git a/src/management/api/types/AculOrganizationFilter.ts b/src/management/api/types/AculOrganizationFilter.ts index 2f8477f14d..9af6e0efc5 100644 --- a/src/management/api/types/AculOrganizationFilter.ts +++ b/src/management/api/types/AculOrganizationFilter.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculOrganizationFilterById.ts b/src/management/api/types/AculOrganizationFilterById.ts index 3762df2c70..898d17265e 100644 --- a/src/management/api/types/AculOrganizationFilterById.ts +++ b/src/management/api/types/AculOrganizationFilterById.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface AculOrganizationFilterById { /** Organization ID */ diff --git a/src/management/api/types/AculOrganizationFilterByMetadata.ts b/src/management/api/types/AculOrganizationFilterByMetadata.ts index ee9fa324db..a8113ea316 100644 --- a/src/management/api/types/AculOrganizationFilterByMetadata.ts +++ b/src/management/api/types/AculOrganizationFilterByMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AculOrganizationMetadata.ts b/src/management/api/types/AculOrganizationMetadata.ts index 90cdb6c853..f7266fedd4 100644 --- a/src/management/api/types/AculOrganizationMetadata.ts +++ b/src/management/api/types/AculOrganizationMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Organization metadata key/value pairs diff --git a/src/management/api/types/AculRenderingModeEnum.ts b/src/management/api/types/AculRenderingModeEnum.ts index 343b258f09..38fb5cc506 100644 --- a/src/management/api/types/AculRenderingModeEnum.ts +++ b/src/management/api/types/AculRenderingModeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Rendering mode to filter by - */ -export type AculRenderingModeEnum = "advanced" | "standard"; +/** Rendering mode to filter by */ export const AculRenderingModeEnum = { Advanced: "advanced", Standard: "standard", } as const; +export type AculRenderingModeEnum = (typeof AculRenderingModeEnum)[keyof typeof AculRenderingModeEnum]; diff --git a/src/management/api/types/AculResponseContent.ts b/src/management/api/types/AculResponseContent.ts index 8347700d82..b5960c38e2 100644 --- a/src/management/api/types/AculResponseContent.ts +++ b/src/management/api/types/AculResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -9,12 +7,12 @@ export interface AculResponseContent { /** Context values to make available */ context_configuration?: string[]; /** Override Universal Login default head tags */ - default_head_tags_disabled?: boolean; + default_head_tags_disabled?: boolean | null; /** An array of head tags */ head_tags?: Management.AculHeadTag[]; - filters?: Management.AculFilters; + filters?: Management.AculFilters | null; /** Use page template with ACUL */ - use_page_template?: boolean; + use_page_template?: boolean | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/AculUsePageTemplate.ts b/src/management/api/types/AculUsePageTemplate.ts new file mode 100644 index 0000000000..91e3d1bf43 --- /dev/null +++ b/src/management/api/types/AculUsePageTemplate.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Use page template with ACUL + */ +export type AculUsePageTemplate = (boolean | null) | undefined; diff --git a/src/management/api/types/AddOrganizationConnectionResponseContent.ts b/src/management/api/types/AddOrganizationConnectionResponseContent.ts index 2329d837c5..156b837611 100644 --- a/src/management/api/types/AddOrganizationConnectionResponseContent.ts +++ b/src/management/api/types/AddOrganizationConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AnomalyIpFormat.ts b/src/management/api/types/AnomalyIpFormat.ts index 8541196f69..f07eb6dd7e 100644 --- a/src/management/api/types/AnomalyIpFormat.ts +++ b/src/management/api/types/AnomalyIpFormat.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * IP address to check. diff --git a/src/management/api/types/AppMetadata.ts b/src/management/api/types/AppMetadata.ts index 89fb240065..c117358ae9 100644 --- a/src/management/api/types/AppMetadata.ts +++ b/src/management/api/types/AppMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Data related to the user that does affect the application's core functionality. diff --git a/src/management/api/types/AssessorsTypeEnum.ts b/src/management/api/types/AssessorsTypeEnum.ts index 414853a733..e591df63e7 100644 --- a/src/management/api/types/AssessorsTypeEnum.ts +++ b/src/management/api/types/AssessorsTypeEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type AssessorsTypeEnum = "new-device"; diff --git a/src/management/api/types/AssociateOrganizationClientGrantResponseContent.ts b/src/management/api/types/AssociateOrganizationClientGrantResponseContent.ts index b19b8c41d5..eea6af2633 100644 --- a/src/management/api/types/AssociateOrganizationClientGrantResponseContent.ts +++ b/src/management/api/types/AssociateOrganizationClientGrantResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/AsyncApprovalNotificationsChannelsEnum.ts b/src/management/api/types/AsyncApprovalNotificationsChannelsEnum.ts new file mode 100644 index 0000000000..cda48dde48 --- /dev/null +++ b/src/management/api/types/AsyncApprovalNotificationsChannelsEnum.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const AsyncApprovalNotificationsChannelsEnum = { + GuardianPush: "guardian-push", + Email: "email", +} as const; +export type AsyncApprovalNotificationsChannelsEnum = + (typeof AsyncApprovalNotificationsChannelsEnum)[keyof typeof AsyncApprovalNotificationsChannelsEnum]; diff --git a/src/management/api/types/AuthenticationMethodTypeEnum.ts b/src/management/api/types/AuthenticationMethodTypeEnum.ts index 205bcf4dc6..3a2ab20fa0 100644 --- a/src/management/api/types/AuthenticationMethodTypeEnum.ts +++ b/src/management/api/types/AuthenticationMethodTypeEnum.ts @@ -1,19 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AuthenticationMethodTypeEnum = - | "recovery-code" - | "totp" - | "push" - | "phone" - | "email" - | "email-verification" - | "webauthn-roaming" - | "webauthn-platform" - | "guardian" - | "passkey" - | "password"; export const AuthenticationMethodTypeEnum = { RecoveryCode: "recovery-code", Totp: "totp", @@ -27,3 +13,5 @@ export const AuthenticationMethodTypeEnum = { Passkey: "passkey", Password: "password", } as const; +export type AuthenticationMethodTypeEnum = + (typeof AuthenticationMethodTypeEnum)[keyof typeof AuthenticationMethodTypeEnum]; diff --git a/src/management/api/types/AuthenticationTypeEnum.ts b/src/management/api/types/AuthenticationTypeEnum.ts index 61ddb0ee07..ed6a8eb0d3 100644 --- a/src/management/api/types/AuthenticationTypeEnum.ts +++ b/src/management/api/types/AuthenticationTypeEnum.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type AuthenticationTypeEnum = "phone" | "email" | "totp"; export const AuthenticationTypeEnum = { Phone: "phone", Email: "email", Totp: "totp", } as const; +export type AuthenticationTypeEnum = (typeof AuthenticationTypeEnum)[keyof typeof AuthenticationTypeEnum]; diff --git a/src/management/api/types/BrandingColors.ts b/src/management/api/types/BrandingColors.ts index e4513ad4d0..7febd97419 100644 --- a/src/management/api/types/BrandingColors.ts +++ b/src/management/api/types/BrandingColors.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BrandingFont.ts b/src/management/api/types/BrandingFont.ts index 0e4785aed4..ac56fab8c0 100644 --- a/src/management/api/types/BrandingFont.ts +++ b/src/management/api/types/BrandingFont.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Custom font settings. diff --git a/src/management/api/types/BrandingPageBackground.ts b/src/management/api/types/BrandingPageBackground.ts index b30f1b0fc5..51ebf40953 100644 --- a/src/management/api/types/BrandingPageBackground.ts +++ b/src/management/api/types/BrandingPageBackground.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Page Background Color or Gradient. @@ -15,4 +13,4 @@ * } * */ -export type BrandingPageBackground = string | undefined | Record | undefined; +export type BrandingPageBackground = (string | null) | undefined | (Record | null) | undefined; diff --git a/src/management/api/types/BrandingThemeBorders.ts b/src/management/api/types/BrandingThemeBorders.ts index a77ca0f4ad..42e5a9a59e 100644 --- a/src/management/api/types/BrandingThemeBorders.ts +++ b/src/management/api/types/BrandingThemeBorders.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BrandingThemeBordersButtonsStyleEnum.ts b/src/management/api/types/BrandingThemeBordersButtonsStyleEnum.ts index c8abf7bda2..c02071108c 100644 --- a/src/management/api/types/BrandingThemeBordersButtonsStyleEnum.ts +++ b/src/management/api/types/BrandingThemeBordersButtonsStyleEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Buttons style - */ -export type BrandingThemeBordersButtonsStyleEnum = "pill" | "rounded" | "sharp"; +/** Buttons style */ export const BrandingThemeBordersButtonsStyleEnum = { Pill: "pill", Rounded: "rounded", Sharp: "sharp", } as const; +export type BrandingThemeBordersButtonsStyleEnum = + (typeof BrandingThemeBordersButtonsStyleEnum)[keyof typeof BrandingThemeBordersButtonsStyleEnum]; diff --git a/src/management/api/types/BrandingThemeBordersInputsStyleEnum.ts b/src/management/api/types/BrandingThemeBordersInputsStyleEnum.ts index 0d5dd186a0..105ef0c0f4 100644 --- a/src/management/api/types/BrandingThemeBordersInputsStyleEnum.ts +++ b/src/management/api/types/BrandingThemeBordersInputsStyleEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Inputs style - */ -export type BrandingThemeBordersInputsStyleEnum = "pill" | "rounded" | "sharp"; +/** Inputs style */ export const BrandingThemeBordersInputsStyleEnum = { Pill: "pill", Rounded: "rounded", Sharp: "sharp", } as const; +export type BrandingThemeBordersInputsStyleEnum = + (typeof BrandingThemeBordersInputsStyleEnum)[keyof typeof BrandingThemeBordersInputsStyleEnum]; diff --git a/src/management/api/types/BrandingThemeColors.ts b/src/management/api/types/BrandingThemeColors.ts index 088d507ec4..465bdfc85f 100644 --- a/src/management/api/types/BrandingThemeColors.ts +++ b/src/management/api/types/BrandingThemeColors.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BrandingThemeColorsCaptchaWidgetThemeEnum.ts b/src/management/api/types/BrandingThemeColorsCaptchaWidgetThemeEnum.ts index 7a37a186c9..d1651c57b7 100644 --- a/src/management/api/types/BrandingThemeColorsCaptchaWidgetThemeEnum.ts +++ b/src/management/api/types/BrandingThemeColorsCaptchaWidgetThemeEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Captcha Widget Theme - */ -export type BrandingThemeColorsCaptchaWidgetThemeEnum = "auto" | "dark" | "light"; +/** Captcha Widget Theme */ export const BrandingThemeColorsCaptchaWidgetThemeEnum = { Auto: "auto", Dark: "dark", Light: "light", } as const; +export type BrandingThemeColorsCaptchaWidgetThemeEnum = + (typeof BrandingThemeColorsCaptchaWidgetThemeEnum)[keyof typeof BrandingThemeColorsCaptchaWidgetThemeEnum]; diff --git a/src/management/api/types/BrandingThemeFontBodyText.ts b/src/management/api/types/BrandingThemeFontBodyText.ts index 52e3191934..e695bc4724 100644 --- a/src/management/api/types/BrandingThemeFontBodyText.ts +++ b/src/management/api/types/BrandingThemeFontBodyText.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Body text diff --git a/src/management/api/types/BrandingThemeFontButtonsText.ts b/src/management/api/types/BrandingThemeFontButtonsText.ts index 0766b5bce9..7d1ee55688 100644 --- a/src/management/api/types/BrandingThemeFontButtonsText.ts +++ b/src/management/api/types/BrandingThemeFontButtonsText.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Buttons text diff --git a/src/management/api/types/BrandingThemeFontInputLabels.ts b/src/management/api/types/BrandingThemeFontInputLabels.ts index 3eaef1589f..93ccb664cc 100644 --- a/src/management/api/types/BrandingThemeFontInputLabels.ts +++ b/src/management/api/types/BrandingThemeFontInputLabels.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Input Labels diff --git a/src/management/api/types/BrandingThemeFontLinks.ts b/src/management/api/types/BrandingThemeFontLinks.ts index 1043b3aac6..c177454f67 100644 --- a/src/management/api/types/BrandingThemeFontLinks.ts +++ b/src/management/api/types/BrandingThemeFontLinks.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Links diff --git a/src/management/api/types/BrandingThemeFontLinksStyleEnum.ts b/src/management/api/types/BrandingThemeFontLinksStyleEnum.ts index 8a2c76fae9..e973ab154a 100644 --- a/src/management/api/types/BrandingThemeFontLinksStyleEnum.ts +++ b/src/management/api/types/BrandingThemeFontLinksStyleEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Links style - */ -export type BrandingThemeFontLinksStyleEnum = "normal" | "underlined"; +/** Links style */ export const BrandingThemeFontLinksStyleEnum = { Normal: "normal", Underlined: "underlined", } as const; +export type BrandingThemeFontLinksStyleEnum = + (typeof BrandingThemeFontLinksStyleEnum)[keyof typeof BrandingThemeFontLinksStyleEnum]; diff --git a/src/management/api/types/BrandingThemeFontSubtitle.ts b/src/management/api/types/BrandingThemeFontSubtitle.ts index a7521329c7..8ec4e1335f 100644 --- a/src/management/api/types/BrandingThemeFontSubtitle.ts +++ b/src/management/api/types/BrandingThemeFontSubtitle.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Subtitle diff --git a/src/management/api/types/BrandingThemeFontTitle.ts b/src/management/api/types/BrandingThemeFontTitle.ts index d54b72571c..9e8f8914d0 100644 --- a/src/management/api/types/BrandingThemeFontTitle.ts +++ b/src/management/api/types/BrandingThemeFontTitle.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Title diff --git a/src/management/api/types/BrandingThemeFonts.ts b/src/management/api/types/BrandingThemeFonts.ts index 8dc489d040..ea36d6cc3e 100644 --- a/src/management/api/types/BrandingThemeFonts.ts +++ b/src/management/api/types/BrandingThemeFonts.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BrandingThemePageBackground.ts b/src/management/api/types/BrandingThemePageBackground.ts index e0df88bea3..71aa096afc 100644 --- a/src/management/api/types/BrandingThemePageBackground.ts +++ b/src/management/api/types/BrandingThemePageBackground.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BrandingThemePageBackgroundPageLayoutEnum.ts b/src/management/api/types/BrandingThemePageBackgroundPageLayoutEnum.ts index 35a311ff9b..5a7c9e5422 100644 --- a/src/management/api/types/BrandingThemePageBackgroundPageLayoutEnum.ts +++ b/src/management/api/types/BrandingThemePageBackgroundPageLayoutEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Page Layout - */ -export type BrandingThemePageBackgroundPageLayoutEnum = "center" | "left" | "right"; +/** Page Layout */ export const BrandingThemePageBackgroundPageLayoutEnum = { Center: "center", Left: "left", Right: "right", } as const; +export type BrandingThemePageBackgroundPageLayoutEnum = + (typeof BrandingThemePageBackgroundPageLayoutEnum)[keyof typeof BrandingThemePageBackgroundPageLayoutEnum]; diff --git a/src/management/api/types/BrandingThemeWidget.ts b/src/management/api/types/BrandingThemeWidget.ts index fee4ca9128..7404b6961a 100644 --- a/src/management/api/types/BrandingThemeWidget.ts +++ b/src/management/api/types/BrandingThemeWidget.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BrandingThemeWidgetHeaderTextAlignmentEnum.ts b/src/management/api/types/BrandingThemeWidgetHeaderTextAlignmentEnum.ts index 1c70373796..030a49edbb 100644 --- a/src/management/api/types/BrandingThemeWidgetHeaderTextAlignmentEnum.ts +++ b/src/management/api/types/BrandingThemeWidgetHeaderTextAlignmentEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Header text alignment - */ -export type BrandingThemeWidgetHeaderTextAlignmentEnum = "center" | "left" | "right"; +/** Header text alignment */ export const BrandingThemeWidgetHeaderTextAlignmentEnum = { Center: "center", Left: "left", Right: "right", } as const; +export type BrandingThemeWidgetHeaderTextAlignmentEnum = + (typeof BrandingThemeWidgetHeaderTextAlignmentEnum)[keyof typeof BrandingThemeWidgetHeaderTextAlignmentEnum]; diff --git a/src/management/api/types/BrandingThemeWidgetLogoPositionEnum.ts b/src/management/api/types/BrandingThemeWidgetLogoPositionEnum.ts index 53a162ce1b..94e4eaa22f 100644 --- a/src/management/api/types/BrandingThemeWidgetLogoPositionEnum.ts +++ b/src/management/api/types/BrandingThemeWidgetLogoPositionEnum.ts @@ -1,14 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Logo position - */ -export type BrandingThemeWidgetLogoPositionEnum = "center" | "left" | "none" | "right"; +/** Logo position */ export const BrandingThemeWidgetLogoPositionEnum = { Center: "center", Left: "left", None: "none", Right: "right", } as const; +export type BrandingThemeWidgetLogoPositionEnum = + (typeof BrandingThemeWidgetLogoPositionEnum)[keyof typeof BrandingThemeWidgetLogoPositionEnum]; diff --git a/src/management/api/types/BrandingThemeWidgetSocialButtonsLayoutEnum.ts b/src/management/api/types/BrandingThemeWidgetSocialButtonsLayoutEnum.ts index 872c02fd14..e1041c337a 100644 --- a/src/management/api/types/BrandingThemeWidgetSocialButtonsLayoutEnum.ts +++ b/src/management/api/types/BrandingThemeWidgetSocialButtonsLayoutEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Social buttons layout - */ -export type BrandingThemeWidgetSocialButtonsLayoutEnum = "bottom" | "top"; +/** Social buttons layout */ export const BrandingThemeWidgetSocialButtonsLayoutEnum = { Bottom: "bottom", Top: "top", } as const; +export type BrandingThemeWidgetSocialButtonsLayoutEnum = + (typeof BrandingThemeWidgetSocialButtonsLayoutEnum)[keyof typeof BrandingThemeWidgetSocialButtonsLayoutEnum]; diff --git a/src/management/api/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.ts b/src/management/api/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.ts index c967793802..4991c7385a 100644 --- a/src/management/api/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.ts +++ b/src/management/api/types/BreachedPasswordDetectionAdminNotificationFrequencyEnum.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type BreachedPasswordDetectionAdminNotificationFrequencyEnum = "immediately" | "daily" | "weekly" | "monthly"; export const BreachedPasswordDetectionAdminNotificationFrequencyEnum = { Immediately: "immediately", Daily: "daily", Weekly: "weekly", Monthly: "monthly", } as const; +export type BreachedPasswordDetectionAdminNotificationFrequencyEnum = + (typeof BreachedPasswordDetectionAdminNotificationFrequencyEnum)[keyof typeof BreachedPasswordDetectionAdminNotificationFrequencyEnum]; diff --git a/src/management/api/types/BreachedPasswordDetectionMethodEnum.ts b/src/management/api/types/BreachedPasswordDetectionMethodEnum.ts index afcf8c1277..c0b72f3c13 100644 --- a/src/management/api/types/BreachedPasswordDetectionMethodEnum.ts +++ b/src/management/api/types/BreachedPasswordDetectionMethodEnum.ts @@ -1,13 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The subscription level for breached password detection methods. Use "enhanced" to enable Credential Guard. * Possible values: standard, enhanced. */ -export type BreachedPasswordDetectionMethodEnum = "standard" | "enhanced"; export const BreachedPasswordDetectionMethodEnum = { Standard: "standard", Enhanced: "enhanced", } as const; +export type BreachedPasswordDetectionMethodEnum = + (typeof BreachedPasswordDetectionMethodEnum)[keyof typeof BreachedPasswordDetectionMethodEnum]; diff --git a/src/management/api/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.ts b/src/management/api/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.ts index 550b49d1c3..5b4bd0ed37 100644 --- a/src/management/api/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.ts +++ b/src/management/api/types/BreachedPasswordDetectionPreChangePasswordShieldsEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type BreachedPasswordDetectionPreChangePasswordShieldsEnum = "block" | "admin_notification"; export const BreachedPasswordDetectionPreChangePasswordShieldsEnum = { Block: "block", AdminNotification: "admin_notification", } as const; +export type BreachedPasswordDetectionPreChangePasswordShieldsEnum = + (typeof BreachedPasswordDetectionPreChangePasswordShieldsEnum)[keyof typeof BreachedPasswordDetectionPreChangePasswordShieldsEnum]; diff --git a/src/management/api/types/BreachedPasswordDetectionPreChangePasswordStage.ts b/src/management/api/types/BreachedPasswordDetectionPreChangePasswordStage.ts index c1bdd2d782..274f28d46a 100644 --- a/src/management/api/types/BreachedPasswordDetectionPreChangePasswordStage.ts +++ b/src/management/api/types/BreachedPasswordDetectionPreChangePasswordStage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.ts b/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.ts index 565b97c35c..c7bd8aa97e 100644 --- a/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.ts +++ b/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationShieldsEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type BreachedPasswordDetectionPreUserRegistrationShieldsEnum = "block" | "admin_notification"; export const BreachedPasswordDetectionPreUserRegistrationShieldsEnum = { Block: "block", AdminNotification: "admin_notification", } as const; +export type BreachedPasswordDetectionPreUserRegistrationShieldsEnum = + (typeof BreachedPasswordDetectionPreUserRegistrationShieldsEnum)[keyof typeof BreachedPasswordDetectionPreUserRegistrationShieldsEnum]; diff --git a/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationStage.ts b/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationStage.ts index 1724a973ec..da5d5d75bc 100644 --- a/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationStage.ts +++ b/src/management/api/types/BreachedPasswordDetectionPreUserRegistrationStage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BreachedPasswordDetectionShieldsEnum.ts b/src/management/api/types/BreachedPasswordDetectionShieldsEnum.ts index f2661d62f2..1461b2f5d1 100644 --- a/src/management/api/types/BreachedPasswordDetectionShieldsEnum.ts +++ b/src/management/api/types/BreachedPasswordDetectionShieldsEnum.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type BreachedPasswordDetectionShieldsEnum = "block" | "user_notification" | "admin_notification"; export const BreachedPasswordDetectionShieldsEnum = { Block: "block", UserNotification: "user_notification", AdminNotification: "admin_notification", } as const; +export type BreachedPasswordDetectionShieldsEnum = + (typeof BreachedPasswordDetectionShieldsEnum)[keyof typeof BreachedPasswordDetectionShieldsEnum]; diff --git a/src/management/api/types/BreachedPasswordDetectionStage.ts b/src/management/api/types/BreachedPasswordDetectionStage.ts index 69a8a190df..a9f5a96744 100644 --- a/src/management/api/types/BreachedPasswordDetectionStage.ts +++ b/src/management/api/types/BreachedPasswordDetectionStage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/BulkUpdateAculResponseContent.ts b/src/management/api/types/BulkUpdateAculResponseContent.ts new file mode 100644 index 0000000000..5c357cea99 --- /dev/null +++ b/src/management/api/types/BulkUpdateAculResponseContent.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface BulkUpdateAculResponseContent { + configs: Management.AculConfigs; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/ChangePasswordTicketResponseContent.ts b/src/management/api/types/ChangePasswordTicketResponseContent.ts index 6fe72f68ba..fabe1dc10e 100644 --- a/src/management/api/types/ChangePasswordTicketResponseContent.ts +++ b/src/management/api/types/ChangePasswordTicketResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ChangePasswordTicketResponseContent { /** URL representing the ticket. */ diff --git a/src/management/api/types/Client.ts b/src/management/api/types/Client.ts index c453d99718..97b3ad5cb6 100644 --- a/src/management/api/types/Client.ts +++ b/src/management/api/types/Client.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -36,13 +34,13 @@ export interface Client { allowed_clients?: string[]; /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ allowed_logout_urls?: string[]; - session_transfer?: Management.ClientSessionTransferConfiguration; + session_transfer?: Management.ClientSessionTransferConfiguration | null; oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ grant_types?: string[]; jwt_configuration?: Management.ClientJwtConfiguration; signing_keys?: Management.ClientSigningKeys; - encryption_key?: Management.ClientEncryptionKey; + encryption_key?: Management.ClientEncryptionKey | null; /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ sso?: boolean; /** Whether Single Sign On is disabled (true) or enabled (true). Defaults to true. */ @@ -61,29 +59,37 @@ export interface Client { form_template?: string; addons?: Management.ClientAddons; token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; client_metadata?: Management.ClientMetadata; mobile?: Management.ClientMobile; /** Initiate login uri, must be https */ initiate_login_uri?: string; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; organization_usage?: Management.ClientOrganizationUsageEnum; organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientAuthenticationMethod; + client_authentication_methods?: Management.ClientAuthenticationMethod | null; /** Makes the use of Pushed Authorization Requests mandatory for this client */ require_pushed_authorization_requests?: boolean; /** Makes the use of Proof-of-Possession mandatory for this client */ require_proof_of_possession?: boolean; signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean; /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; + par_request_expiry?: number | null; token_quota?: Management.TokenQuota; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; /** The identifier of the resource server that this client is linked to. */ resource_server_identifier?: string; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPostConfiguration; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/ClientAddonAws.ts b/src/management/api/types/ClientAddonAws.ts index d2fe202504..ee55b00685 100644 --- a/src/management/api/types/ClientAddonAws.ts +++ b/src/management/api/types/ClientAddonAws.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * AWS addon configuration. diff --git a/src/management/api/types/ClientAddonAzureBlob.ts b/src/management/api/types/ClientAddonAzureBlob.ts index e103720a19..b286fbb0b9 100644 --- a/src/management/api/types/ClientAddonAzureBlob.ts +++ b/src/management/api/types/ClientAddonAzureBlob.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Azure Blob Storage addon configuration. diff --git a/src/management/api/types/ClientAddonAzureSb.ts b/src/management/api/types/ClientAddonAzureSb.ts index 35aa1883b2..ebe03d9b9b 100644 --- a/src/management/api/types/ClientAddonAzureSb.ts +++ b/src/management/api/types/ClientAddonAzureSb.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Azure Storage Bus addon configuration. diff --git a/src/management/api/types/ClientAddonBox.ts b/src/management/api/types/ClientAddonBox.ts index b9bfaf095e..40fdd54c85 100644 --- a/src/management/api/types/ClientAddonBox.ts +++ b/src/management/api/types/ClientAddonBox.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Box SSO indicator (no configuration settings needed for Box SSO). diff --git a/src/management/api/types/ClientAddonCloudBees.ts b/src/management/api/types/ClientAddonCloudBees.ts index 44957316ec..2486827c2d 100644 --- a/src/management/api/types/ClientAddonCloudBees.ts +++ b/src/management/api/types/ClientAddonCloudBees.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * CloudBees SSO indicator (no configuration settings needed for CloudBees SSO). diff --git a/src/management/api/types/ClientAddonConcur.ts b/src/management/api/types/ClientAddonConcur.ts index 7cefa41753..f45a3c3766 100644 --- a/src/management/api/types/ClientAddonConcur.ts +++ b/src/management/api/types/ClientAddonConcur.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Concur SSO indicator (no configuration settings needed for Concur SSO). diff --git a/src/management/api/types/ClientAddonDropbox.ts b/src/management/api/types/ClientAddonDropbox.ts index 08c34b39a1..b47b3a5924 100644 --- a/src/management/api/types/ClientAddonDropbox.ts +++ b/src/management/api/types/ClientAddonDropbox.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Dropbox SSO indicator (no configuration settings needed for Dropbox SSO). diff --git a/src/management/api/types/ClientAddonEchoSign.ts b/src/management/api/types/ClientAddonEchoSign.ts index b84287b2ca..c396a257b5 100644 --- a/src/management/api/types/ClientAddonEchoSign.ts +++ b/src/management/api/types/ClientAddonEchoSign.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Adobe EchoSign SSO configuration. diff --git a/src/management/api/types/ClientAddonEgnyte.ts b/src/management/api/types/ClientAddonEgnyte.ts index 429a16745e..eb2f76d555 100644 --- a/src/management/api/types/ClientAddonEgnyte.ts +++ b/src/management/api/types/ClientAddonEgnyte.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Egnyte SSO configuration. diff --git a/src/management/api/types/ClientAddonFirebase.ts b/src/management/api/types/ClientAddonFirebase.ts index b100f278ef..e8f45e955c 100644 --- a/src/management/api/types/ClientAddonFirebase.ts +++ b/src/management/api/types/ClientAddonFirebase.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Google Firebase addon configuration. diff --git a/src/management/api/types/ClientAddonLayer.ts b/src/management/api/types/ClientAddonLayer.ts index 048c8b95af..c98ab95a9b 100644 --- a/src/management/api/types/ClientAddonLayer.ts +++ b/src/management/api/types/ClientAddonLayer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Layer addon configuration. diff --git a/src/management/api/types/ClientAddonMscrm.ts b/src/management/api/types/ClientAddonMscrm.ts index 7846e634d9..dd1b007ecd 100644 --- a/src/management/api/types/ClientAddonMscrm.ts +++ b/src/management/api/types/ClientAddonMscrm.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Microsoft Dynamics CRM SSO configuration. diff --git a/src/management/api/types/ClientAddonNewRelic.ts b/src/management/api/types/ClientAddonNewRelic.ts index dd4474a04b..33a5798de9 100644 --- a/src/management/api/types/ClientAddonNewRelic.ts +++ b/src/management/api/types/ClientAddonNewRelic.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * New Relic SSO configuration. diff --git a/src/management/api/types/ClientAddonOag.ts b/src/management/api/types/ClientAddonOag.ts index b3ecd78bdc..9a6adff5ea 100644 --- a/src/management/api/types/ClientAddonOag.ts +++ b/src/management/api/types/ClientAddonOag.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Okta Access Gateway SSO configuration diff --git a/src/management/api/types/ClientAddonOffice365.ts b/src/management/api/types/ClientAddonOffice365.ts index 9a58932529..c65cea35b0 100644 --- a/src/management/api/types/ClientAddonOffice365.ts +++ b/src/management/api/types/ClientAddonOffice365.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Microsoft Office 365 SSO configuration. diff --git a/src/management/api/types/ClientAddonRms.ts b/src/management/api/types/ClientAddonRms.ts index 461bac3599..29d4e88805 100644 --- a/src/management/api/types/ClientAddonRms.ts +++ b/src/management/api/types/ClientAddonRms.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Active Directory Rights Management Service SSO configuration. diff --git a/src/management/api/types/ClientAddonSalesforce.ts b/src/management/api/types/ClientAddonSalesforce.ts index dabccb9756..8e10eadafc 100644 --- a/src/management/api/types/ClientAddonSalesforce.ts +++ b/src/management/api/types/ClientAddonSalesforce.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Salesforce SSO configuration. diff --git a/src/management/api/types/ClientAddonSalesforceApi.ts b/src/management/api/types/ClientAddonSalesforceApi.ts index 9ca370b809..dc183f0d21 100644 --- a/src/management/api/types/ClientAddonSalesforceApi.ts +++ b/src/management/api/types/ClientAddonSalesforceApi.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Salesforce API addon configuration. diff --git a/src/management/api/types/ClientAddonSalesforceSandboxApi.ts b/src/management/api/types/ClientAddonSalesforceSandboxApi.ts index 887a033e42..07aae04cd4 100644 --- a/src/management/api/types/ClientAddonSalesforceSandboxApi.ts +++ b/src/management/api/types/ClientAddonSalesforceSandboxApi.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Salesforce Sandbox addon configuration. diff --git a/src/management/api/types/ClientAddonSaml.ts b/src/management/api/types/ClientAddonSaml.ts index 8f1359ffc6..3b9ef3ff65 100644 --- a/src/management/api/types/ClientAddonSaml.ts +++ b/src/management/api/types/ClientAddonSaml.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientAddonSamlMapping.ts b/src/management/api/types/ClientAddonSamlMapping.ts index 4348f35a6b..ab14a58d86 100644 --- a/src/management/api/types/ClientAddonSamlMapping.ts +++ b/src/management/api/types/ClientAddonSamlMapping.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type ClientAddonSamlMapping = Record; diff --git a/src/management/api/types/ClientAddonSapapi.ts b/src/management/api/types/ClientAddonSapapi.ts index e49c721e7a..11083fe787 100644 --- a/src/management/api/types/ClientAddonSapapi.ts +++ b/src/management/api/types/ClientAddonSapapi.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * SAP API addon configuration. diff --git a/src/management/api/types/ClientAddonSentry.ts b/src/management/api/types/ClientAddonSentry.ts index 0127208a3e..bd73a043f4 100644 --- a/src/management/api/types/ClientAddonSentry.ts +++ b/src/management/api/types/ClientAddonSentry.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Sentry SSO configuration. diff --git a/src/management/api/types/ClientAddonSharePoint.ts b/src/management/api/types/ClientAddonSharePoint.ts index b07e2dbae7..4b6213c69f 100644 --- a/src/management/api/types/ClientAddonSharePoint.ts +++ b/src/management/api/types/ClientAddonSharePoint.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientAddonSharePointExternalUrl.ts b/src/management/api/types/ClientAddonSharePointExternalUrl.ts index d0a800b448..345843b265 100644 --- a/src/management/api/types/ClientAddonSharePointExternalUrl.ts +++ b/src/management/api/types/ClientAddonSharePointExternalUrl.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * External SharePoint application URLs if exposed to the Internet. diff --git a/src/management/api/types/ClientAddonSlack.ts b/src/management/api/types/ClientAddonSlack.ts index 235730da14..6f71a38248 100644 --- a/src/management/api/types/ClientAddonSlack.ts +++ b/src/management/api/types/ClientAddonSlack.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Slack team or workspace name usually first segment in your Slack URL. e.g. `https://acme-org.slack.com` would be `acme-org`. diff --git a/src/management/api/types/ClientAddonSpringCm.ts b/src/management/api/types/ClientAddonSpringCm.ts index e76a82b193..39d8459322 100644 --- a/src/management/api/types/ClientAddonSpringCm.ts +++ b/src/management/api/types/ClientAddonSpringCm.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * SpringCM SSO configuration. diff --git a/src/management/api/types/ClientAddonSsoIntegration.ts b/src/management/api/types/ClientAddonSsoIntegration.ts index 6f1a054241..a163769faa 100644 --- a/src/management/api/types/ClientAddonSsoIntegration.ts +++ b/src/management/api/types/ClientAddonSsoIntegration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ClientAddonSsoIntegration { /** SSO integration name */ diff --git a/src/management/api/types/ClientAddonWams.ts b/src/management/api/types/ClientAddonWams.ts index 1641538d0c..e6cca5ecc7 100644 --- a/src/management/api/types/ClientAddonWams.ts +++ b/src/management/api/types/ClientAddonWams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Windows Azure Mobile Services addon configuration. diff --git a/src/management/api/types/ClientAddonWsFed.ts b/src/management/api/types/ClientAddonWsFed.ts index 71a6e62f6f..6ce1e5e768 100644 --- a/src/management/api/types/ClientAddonWsFed.ts +++ b/src/management/api/types/ClientAddonWsFed.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * WS-Fed (WIF) addon indicator. Actual configuration is stored in `callback` and `client_aliases` properties on the client. diff --git a/src/management/api/types/ClientAddonZendesk.ts b/src/management/api/types/ClientAddonZendesk.ts index f473e2c3a6..9ae802eec1 100644 --- a/src/management/api/types/ClientAddonZendesk.ts +++ b/src/management/api/types/ClientAddonZendesk.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Zendesk SSO configuration. diff --git a/src/management/api/types/ClientAddonZoom.ts b/src/management/api/types/ClientAddonZoom.ts index 8b5e1fecdf..d3666edd58 100644 --- a/src/management/api/types/ClientAddonZoom.ts +++ b/src/management/api/types/ClientAddonZoom.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Zoom SSO configuration. diff --git a/src/management/api/types/ClientAddons.ts b/src/management/api/types/ClientAddons.ts index 28f2e8b746..99118afa9b 100644 --- a/src/management/api/types/ClientAddons.ts +++ b/src/management/api/types/ClientAddons.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -37,5 +35,5 @@ export interface ClientAddons { zendesk?: Management.ClientAddonZendesk; zoom?: Management.ClientAddonZoom; sso_integration?: Management.ClientAddonSsoIntegration; - oag?: Management.ClientAddonOag; + oag?: Management.ClientAddonOag | null; } diff --git a/src/management/api/types/ClientAppTypeEnum.ts b/src/management/api/types/ClientAppTypeEnum.ts index df750a5800..3af32e2f81 100644 --- a/src/management/api/types/ClientAppTypeEnum.ts +++ b/src/management/api/types/ClientAppTypeEnum.ts @@ -1,36 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The type of application this client represents - */ -export type ClientAppTypeEnum = - | "native" - | "spa" - | "regular_web" - | "non_interactive" - | "resource_server" - | "express_configuration" - | "rms" - | "box" - | "cloudbees" - | "concur" - | "dropbox" - | "mscrm" - | "echosign" - | "egnyte" - | "newrelic" - | "office365" - | "salesforce" - | "sentry" - | "sharepoint" - | "slack" - | "springcm" - | "zendesk" - | "zoom" - | "sso_integration" - | "oag"; +/** The type of application this client represents */ export const ClientAppTypeEnum = { Native: "native", Spa: "spa", @@ -58,3 +28,4 @@ export const ClientAppTypeEnum = { SsoIntegration: "sso_integration", Oag: "oag", } as const; +export type ClientAppTypeEnum = (typeof ClientAppTypeEnum)[keyof typeof ClientAppTypeEnum]; diff --git a/src/management/api/types/ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration.ts b/src/management/api/types/ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration.ts new file mode 100644 index 0000000000..f119f98f7b --- /dev/null +++ b/src/management/api/types/ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Array of notification channels for contacting the user when their approval is required. Valid values are `guardian-push`, `email`. + */ +export type ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration = + Management.AsyncApprovalNotificationsChannelsEnum[]; diff --git a/src/management/api/types/ClientAsyncApprovalNotificationsChannelsApiPostConfiguration.ts b/src/management/api/types/ClientAsyncApprovalNotificationsChannelsApiPostConfiguration.ts new file mode 100644 index 0000000000..e5917dc35c --- /dev/null +++ b/src/management/api/types/ClientAsyncApprovalNotificationsChannelsApiPostConfiguration.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Array of notification channels for contacting the user when their approval is required. Valid values are `guardian-push`, `email`. + */ +export type ClientAsyncApprovalNotificationsChannelsApiPostConfiguration = + Management.AsyncApprovalNotificationsChannelsEnum[]; diff --git a/src/management/api/types/ClientAuthenticationMethod.ts b/src/management/api/types/ClientAuthenticationMethod.ts index ee74ac9bd9..d0e52af043 100644 --- a/src/management/api/types/ClientAuthenticationMethod.ts +++ b/src/management/api/types/ClientAuthenticationMethod.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.ts b/src/management/api/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.ts index fb3799fce0..7f4156ab56 100644 --- a/src/management/api/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.ts +++ b/src/management/api/types/ClientAuthenticationMethodSelfSignedTlsClientAuth.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientAuthenticationMethodTlsClientAuth.ts b/src/management/api/types/ClientAuthenticationMethodTlsClientAuth.ts index 876be87c0d..55d303ddb5 100644 --- a/src/management/api/types/ClientAuthenticationMethodTlsClientAuth.ts +++ b/src/management/api/types/ClientAuthenticationMethodTlsClientAuth.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientComplianceLevelEnum.ts b/src/management/api/types/ClientComplianceLevelEnum.ts index 65703a31fb..db46bce4d8 100644 --- a/src/management/api/types/ClientComplianceLevelEnum.ts +++ b/src/management/api/types/ClientComplianceLevelEnum.ts @@ -1,8 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the compliance level for this client, which may restrict it's capabilities - */ -export type ClientComplianceLevelEnum = string | undefined; +/** Defines the compliance level for this client, which may restrict it's capabilities */ +export const ClientComplianceLevelEnum = { + None: "none", + Fapi1AdvPkjPar: "fapi1_adv_pkj_par", + Fapi1AdvMtlsPar: "fapi1_adv_mtls_par", + Fapi2SpPkjMtls: "fapi2_sp_pkj_mtls", + Fapi2SpMtlsMtls: "fapi2_sp_mtls_mtls", +} as const; +export type ClientComplianceLevelEnum = (typeof ClientComplianceLevelEnum)[keyof typeof ClientComplianceLevelEnum]; diff --git a/src/management/api/types/ClientCreateAuthenticationMethod.ts b/src/management/api/types/ClientCreateAuthenticationMethod.ts index 49b2f8b704..0be579ae5f 100644 --- a/src/management/api/types/ClientCreateAuthenticationMethod.ts +++ b/src/management/api/types/ClientCreateAuthenticationMethod.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientCredential.ts b/src/management/api/types/ClientCredential.ts index 037573a701..cc504ebeed 100644 --- a/src/management/api/types/ClientCredential.ts +++ b/src/management/api/types/ClientCredential.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientCredentialAlgorithmEnum.ts b/src/management/api/types/ClientCredentialAlgorithmEnum.ts index 163c32e993..5402af2d69 100644 --- a/src/management/api/types/ClientCredentialAlgorithmEnum.ts +++ b/src/management/api/types/ClientCredentialAlgorithmEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Algorithm which will be used with the credential. Supported algorithms: RS256,RS384,PS256 - */ -export type ClientCredentialAlgorithmEnum = "RS256" | "RS384" | "PS256"; +/** Algorithm which will be used with the credential. Supported algorithms: RS256,RS384,PS256 */ export const ClientCredentialAlgorithmEnum = { Rs256: "RS256", Rs384: "RS384", Ps256: "PS256", } as const; +export type ClientCredentialAlgorithmEnum = + (typeof ClientCredentialAlgorithmEnum)[keyof typeof ClientCredentialAlgorithmEnum]; diff --git a/src/management/api/types/ClientCredentialTypeEnum.ts b/src/management/api/types/ClientCredentialTypeEnum.ts index 235d10d075..d5fdf5d2fa 100644 --- a/src/management/api/types/ClientCredentialTypeEnum.ts +++ b/src/management/api/types/ClientCredentialTypeEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The type of credential. - */ -export type ClientCredentialTypeEnum = "public_key" | "cert_subject_dn" | "x509_cert"; +/** The type of credential. */ export const ClientCredentialTypeEnum = { PublicKey: "public_key", CertSubjectDn: "cert_subject_dn", X509Cert: "x509_cert", } as const; +export type ClientCredentialTypeEnum = (typeof ClientCredentialTypeEnum)[keyof typeof ClientCredentialTypeEnum]; diff --git a/src/management/api/types/ClientDefaultOrganization.ts b/src/management/api/types/ClientDefaultOrganization.ts index 54f6e67c88..07b4235110 100644 --- a/src/management/api/types/ClientDefaultOrganization.ts +++ b/src/management/api/types/ClientDefaultOrganization.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientDefaultOrganizationFlowsEnum.ts b/src/management/api/types/ClientDefaultOrganizationFlowsEnum.ts index 9379ffba66..293d540533 100644 --- a/src/management/api/types/ClientDefaultOrganizationFlowsEnum.ts +++ b/src/management/api/types/ClientDefaultOrganizationFlowsEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type ClientDefaultOrganizationFlowsEnum = "client_credentials"; diff --git a/src/management/api/types/ClientEncryptionKey.ts b/src/management/api/types/ClientEncryptionKey.ts index 5b9d53c857..4e67ad79b1 100644 --- a/src/management/api/types/ClientEncryptionKey.ts +++ b/src/management/api/types/ClientEncryptionKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Encryption used for WsFed responses with this client. diff --git a/src/management/api/types/ClientGrantAllowAnyOrganizationEnum.ts b/src/management/api/types/ClientGrantAllowAnyOrganizationEnum.ts index f19089b1cd..94b439b221 100644 --- a/src/management/api/types/ClientGrantAllowAnyOrganizationEnum.ts +++ b/src/management/api/types/ClientGrantAllowAnyOrganizationEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Optional filter on allow_any_organization. diff --git a/src/management/api/types/ClientGrantOrganizationNullableUsageEnum.ts b/src/management/api/types/ClientGrantOrganizationNullableUsageEnum.ts index 1502c5a52e..57284e34ef 100644 --- a/src/management/api/types/ClientGrantOrganizationNullableUsageEnum.ts +++ b/src/management/api/types/ClientGrantOrganizationNullableUsageEnum.ts @@ -1,8 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Controls how organizations may be used with this grant - */ -export type ClientGrantOrganizationNullableUsageEnum = string | undefined; +/** Controls how organizations may be used with this grant */ +export const ClientGrantOrganizationNullableUsageEnum = { + Deny: "deny", + Allow: "allow", + Require: "require", +} as const; +export type ClientGrantOrganizationNullableUsageEnum = + (typeof ClientGrantOrganizationNullableUsageEnum)[keyof typeof ClientGrantOrganizationNullableUsageEnum]; diff --git a/src/management/api/types/ClientGrantOrganizationUsageEnum.ts b/src/management/api/types/ClientGrantOrganizationUsageEnum.ts index edd35cbe94..e54f3f9be2 100644 --- a/src/management/api/types/ClientGrantOrganizationUsageEnum.ts +++ b/src/management/api/types/ClientGrantOrganizationUsageEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines whether organizations can be used with client credentials exchanges for this grant. - */ -export type ClientGrantOrganizationUsageEnum = "deny" | "allow" | "require"; +/** Defines whether organizations can be used with client credentials exchanges for this grant. */ export const ClientGrantOrganizationUsageEnum = { Deny: "deny", Allow: "allow", Require: "require", } as const; +export type ClientGrantOrganizationUsageEnum = + (typeof ClientGrantOrganizationUsageEnum)[keyof typeof ClientGrantOrganizationUsageEnum]; diff --git a/src/management/api/types/ClientGrantResponseContent.ts b/src/management/api/types/ClientGrantResponseContent.ts index 8ddccd6dfe..bb4bae4615 100644 --- a/src/management/api/types/ClientGrantResponseContent.ts +++ b/src/management/api/types/ClientGrantResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientGrantSubjectTypeEnum.ts b/src/management/api/types/ClientGrantSubjectTypeEnum.ts index cc65ab7532..4a40572a5c 100644 --- a/src/management/api/types/ClientGrantSubjectTypeEnum.ts +++ b/src/management/api/types/ClientGrantSubjectTypeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. - */ -export type ClientGrantSubjectTypeEnum = "client" | "user"; +/** The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. */ export const ClientGrantSubjectTypeEnum = { Client: "client", User: "user", } as const; +export type ClientGrantSubjectTypeEnum = (typeof ClientGrantSubjectTypeEnum)[keyof typeof ClientGrantSubjectTypeEnum]; diff --git a/src/management/api/types/ClientJwtConfiguration.ts b/src/management/api/types/ClientJwtConfiguration.ts index 6be4597bc7..ce45571709 100644 --- a/src/management/api/types/ClientJwtConfiguration.ts +++ b/src/management/api/types/ClientJwtConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientJwtConfigurationScopes.ts b/src/management/api/types/ClientJwtConfigurationScopes.ts index 26dab194b2..92f05370cf 100644 --- a/src/management/api/types/ClientJwtConfigurationScopes.ts +++ b/src/management/api/types/ClientJwtConfigurationScopes.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Configuration related to id token claims for the client. diff --git a/src/management/api/types/ClientMetadata.ts b/src/management/api/types/ClientMetadata.ts index 8422fe0243..edd9b07e6b 100644 --- a/src/management/api/types/ClientMetadata.ts +++ b/src/management/api/types/ClientMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?"/\()<>@ [Tab] [Space] diff --git a/src/management/api/types/ClientMobile.ts b/src/management/api/types/ClientMobile.ts index 9a4f27009b..7d1cbe9754 100644 --- a/src/management/api/types/ClientMobile.ts +++ b/src/management/api/types/ClientMobile.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientMobileAndroid.ts b/src/management/api/types/ClientMobileAndroid.ts index 606f17e7b9..0846e473d7 100644 --- a/src/management/api/types/ClientMobileAndroid.ts +++ b/src/management/api/types/ClientMobileAndroid.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Android native app configuration. diff --git a/src/management/api/types/ClientMobileiOs.ts b/src/management/api/types/ClientMobileiOs.ts index d9ce933301..1485f29a63 100644 --- a/src/management/api/types/ClientMobileiOs.ts +++ b/src/management/api/types/ClientMobileiOs.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * iOS native app configuration. diff --git a/src/management/api/types/ClientMyOrganizationConfiguration.ts b/src/management/api/types/ClientMyOrganizationConfiguration.ts deleted file mode 100644 index 3dad13cf04..0000000000 --- a/src/management/api/types/ClientMyOrganizationConfiguration.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../index.js"; - -/** - * Configuration related to the My Organization Configuration for the client. - */ -export interface ClientMyOrganizationConfiguration { - /** The connection profile ID that this client should validate against. */ - connection_profile_id?: string; - /** The user attribute profile ID that this client should validate against. */ - user_attribute_profile_id?: string; - /** The allowed connection strategies for the My Organization Configuration. */ - allowed_strategies: Management.ClientMyOrganizationConfigurationAllowedStrategiesEnum[]; - connection_deletion_behavior: Management.ClientMyOrganizationDeletionBehaviorEnum; - /** The client ID this client uses while creating invitations through My Organization API. */ - invitation_landing_client_id?: string; -} diff --git a/src/management/api/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.ts b/src/management/api/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.ts deleted file mode 100644 index 0f8515b7b5..0000000000 --- a/src/management/api/types/ClientMyOrganizationConfigurationAllowedStrategiesEnum.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * The allowed connection strategy values for the My Organization Configuration. - */ -export type ClientMyOrganizationConfigurationAllowedStrategiesEnum = - | "pingfederate" - | "adfs" - | "waad" - | "google-apps" - | "okta" - | "oidc" - | "samlp"; -export const ClientMyOrganizationConfigurationAllowedStrategiesEnum = { - Pingfederate: "pingfederate", - Adfs: "adfs", - Waad: "waad", - GoogleApps: "google-apps", - Okta: "okta", - Oidc: "oidc", - Samlp: "samlp", -} as const; diff --git a/src/management/api/types/ClientMyOrganizationDeletionBehaviorEnum.ts b/src/management/api/types/ClientMyOrganizationDeletionBehaviorEnum.ts deleted file mode 100644 index e90f81f894..0000000000 --- a/src/management/api/types/ClientMyOrganizationDeletionBehaviorEnum.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * The deletion behavior for this client. - */ -export type ClientMyOrganizationDeletionBehaviorEnum = "allow" | "allow_if_empty"; -export const ClientMyOrganizationDeletionBehaviorEnum = { - Allow: "allow", - AllowIfEmpty: "allow_if_empty", -} as const; diff --git a/src/management/api/types/ClientOidcBackchannelLogoutInitiators.ts b/src/management/api/types/ClientOidcBackchannelLogoutInitiators.ts index 0b6d1e4ee8..29ab150036 100644 --- a/src/management/api/types/ClientOidcBackchannelLogoutInitiators.ts +++ b/src/management/api/types/ClientOidcBackchannelLogoutInitiators.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsEnum.ts b/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsEnum.ts index 7d769e1238..dab5582939 100644 --- a/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsEnum.ts +++ b/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsEnum.ts @@ -1,20 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The `selected_initiators` property contains the list of initiators to be enabled for the given application. - */ -export type ClientOidcBackchannelLogoutInitiatorsEnum = - | "rp-logout" - | "idp-logout" - | "password-changed" - | "session-expired" - | "session-revoked" - | "account-deleted" - | "email-identifier-changed" - | "mfa-phone-unenrolled" - | "account-deactivated"; +/** The `selected_initiators` property contains the list of initiators to be enabled for the given application. */ export const ClientOidcBackchannelLogoutInitiatorsEnum = { RpLogout: "rp-logout", IdpLogout: "idp-logout", @@ -26,3 +12,5 @@ export const ClientOidcBackchannelLogoutInitiatorsEnum = { MfaPhoneUnenrolled: "mfa-phone-unenrolled", AccountDeactivated: "account-deactivated", } as const; +export type ClientOidcBackchannelLogoutInitiatorsEnum = + (typeof ClientOidcBackchannelLogoutInitiatorsEnum)[keyof typeof ClientOidcBackchannelLogoutInitiatorsEnum]; diff --git a/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.ts b/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.ts index b8de5432e7..42dc1ee0c1 100644 --- a/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.ts +++ b/src/management/api/types/ClientOidcBackchannelLogoutInitiatorsModeEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The `mode` property determines the configuration method for enabling initiators. `custom` enables only the initiators listed in the selected_initiators array, `all` enables all current and future initiators. - */ -export type ClientOidcBackchannelLogoutInitiatorsModeEnum = "custom" | "all"; +/** The `mode` property determines the configuration method for enabling initiators. `custom` enables only the initiators listed in the selected_initiators array, `all` enables all current and future initiators. */ export const ClientOidcBackchannelLogoutInitiatorsModeEnum = { Custom: "custom", All: "all", } as const; +export type ClientOidcBackchannelLogoutInitiatorsModeEnum = + (typeof ClientOidcBackchannelLogoutInitiatorsModeEnum)[keyof typeof ClientOidcBackchannelLogoutInitiatorsModeEnum]; diff --git a/src/management/api/types/ClientOidcBackchannelLogoutSessionMetadata.ts b/src/management/api/types/ClientOidcBackchannelLogoutSessionMetadata.ts index dba829c030..eb0036dcb6 100644 --- a/src/management/api/types/ClientOidcBackchannelLogoutSessionMetadata.ts +++ b/src/management/api/types/ClientOidcBackchannelLogoutSessionMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Controls whether session metadata is included in the logout token. Default value is null. diff --git a/src/management/api/types/ClientOidcBackchannelLogoutSettings.ts b/src/management/api/types/ClientOidcBackchannelLogoutSettings.ts index f00648fd6f..daeb60b583 100644 --- a/src/management/api/types/ClientOidcBackchannelLogoutSettings.ts +++ b/src/management/api/types/ClientOidcBackchannelLogoutSettings.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -11,7 +9,7 @@ export interface ClientOidcBackchannelLogoutSettings { /** Comma-separated list of URLs that are valid to call back from Auth0 for OIDC backchannel logout. Currently only one URL is allowed. */ backchannel_logout_urls?: string[]; backchannel_logout_initiators?: Management.ClientOidcBackchannelLogoutInitiators; - backchannel_logout_session_metadata?: Management.ClientOidcBackchannelLogoutSessionMetadata; + backchannel_logout_session_metadata?: Management.ClientOidcBackchannelLogoutSessionMetadata | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/ClientOrganizationDiscoveryEnum.ts b/src/management/api/types/ClientOrganizationDiscoveryEnum.ts index d067cf9017..d67471a94e 100644 --- a/src/management/api/types/ClientOrganizationDiscoveryEnum.ts +++ b/src/management/api/types/ClientOrganizationDiscoveryEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Method for discovering organizations during the `pre_login_prompt`. `email` allows users to find their organization by entering their email address and performing domain matching, while `organization_name` requires users to enter the organization name directly. These methods can be combined. - */ -export type ClientOrganizationDiscoveryEnum = "email" | "organization_name"; +/** Method for discovering organizations during the `pre_login_prompt`. `email` allows users to find their organization by entering their email address and performing domain matching, while `organization_name` requires users to enter the organization name directly. These methods can be combined. */ export const ClientOrganizationDiscoveryEnum = { Email: "email", OrganizationName: "organization_name", } as const; +export type ClientOrganizationDiscoveryEnum = + (typeof ClientOrganizationDiscoveryEnum)[keyof typeof ClientOrganizationDiscoveryEnum]; diff --git a/src/management/api/types/ClientOrganizationRequireBehaviorEnum.ts b/src/management/api/types/ClientOrganizationRequireBehaviorEnum.ts index b032e005ed..9a1a48cc99 100644 --- a/src/management/api/types/ClientOrganizationRequireBehaviorEnum.ts +++ b/src/management/api/types/ClientOrganizationRequireBehaviorEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines how to proceed during an authentication transaction when `client.organization_usage: 'require'`. Can be `no_prompt` (default), `pre_login_prompt` or `post_login_prompt`. `post_login_prompt` requires `oidc_conformant: true`. - */ -export type ClientOrganizationRequireBehaviorEnum = "no_prompt" | "pre_login_prompt" | "post_login_prompt"; +/** Defines how to proceed during an authentication transaction when `client.organization_usage: 'require'`. Can be `no_prompt` (default), `pre_login_prompt` or `post_login_prompt`. `post_login_prompt` requires `oidc_conformant: true`. */ export const ClientOrganizationRequireBehaviorEnum = { NoPrompt: "no_prompt", PreLoginPrompt: "pre_login_prompt", PostLoginPrompt: "post_login_prompt", } as const; +export type ClientOrganizationRequireBehaviorEnum = + (typeof ClientOrganizationRequireBehaviorEnum)[keyof typeof ClientOrganizationRequireBehaviorEnum]; diff --git a/src/management/api/types/ClientOrganizationRequireBehaviorPatchEnum.ts b/src/management/api/types/ClientOrganizationRequireBehaviorPatchEnum.ts index f3ef5fa9e8..c17f125cd6 100644 --- a/src/management/api/types/ClientOrganizationRequireBehaviorPatchEnum.ts +++ b/src/management/api/types/ClientOrganizationRequireBehaviorPatchEnum.ts @@ -1,8 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines how to proceed during an authentication transaction when `client.organization_usage: 'require'`. Can be `no_prompt` (default), `pre_login_prompt` or `post_login_prompt`. `post_login_prompt` requires `oidc_conformant: true`. - */ -export type ClientOrganizationRequireBehaviorPatchEnum = string | undefined; +/** Defines how to proceed during an authentication transaction when `client.organization_usage: 'require'`. Can be `no_prompt` (default), `pre_login_prompt` or `post_login_prompt`. `post_login_prompt` requires `oidc_conformant: true`. */ +export const ClientOrganizationRequireBehaviorPatchEnum = { + NoPrompt: "no_prompt", + PreLoginPrompt: "pre_login_prompt", + PostLoginPrompt: "post_login_prompt", +} as const; +export type ClientOrganizationRequireBehaviorPatchEnum = + (typeof ClientOrganizationRequireBehaviorPatchEnum)[keyof typeof ClientOrganizationRequireBehaviorPatchEnum]; diff --git a/src/management/api/types/ClientOrganizationUsageEnum.ts b/src/management/api/types/ClientOrganizationUsageEnum.ts index e46e58c39c..2955e4dc2f 100644 --- a/src/management/api/types/ClientOrganizationUsageEnum.ts +++ b/src/management/api/types/ClientOrganizationUsageEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines how to proceed during an authentication transaction with regards an organization. Can be `deny` (default), `allow` or `require`. - */ -export type ClientOrganizationUsageEnum = "deny" | "allow" | "require"; +/** Defines how to proceed during an authentication transaction with regards an organization. Can be `deny` (default), `allow` or `require`. */ export const ClientOrganizationUsageEnum = { Deny: "deny", Allow: "allow", Require: "require", } as const; +export type ClientOrganizationUsageEnum = + (typeof ClientOrganizationUsageEnum)[keyof typeof ClientOrganizationUsageEnum]; diff --git a/src/management/api/types/ClientOrganizationUsagePatchEnum.ts b/src/management/api/types/ClientOrganizationUsagePatchEnum.ts index cb96f83590..483a70baf6 100644 --- a/src/management/api/types/ClientOrganizationUsagePatchEnum.ts +++ b/src/management/api/types/ClientOrganizationUsagePatchEnum.ts @@ -1,8 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines how to proceed during an authentication transaction with regards an organization. Can be `deny` (default), `allow` or `require`. - */ -export type ClientOrganizationUsagePatchEnum = string | undefined; +/** Defines how to proceed during an authentication transaction with regards an organization. Can be `deny` (default), `allow` or `require`. */ +export const ClientOrganizationUsagePatchEnum = { + Deny: "deny", + Allow: "allow", + Require: "require", +} as const; +export type ClientOrganizationUsagePatchEnum = + (typeof ClientOrganizationUsagePatchEnum)[keyof typeof ClientOrganizationUsagePatchEnum]; diff --git a/src/management/api/types/ClientRefreshTokenConfiguration.ts b/src/management/api/types/ClientRefreshTokenConfiguration.ts index dfbfc0f0fb..10d9d910e1 100644 --- a/src/management/api/types/ClientRefreshTokenConfiguration.ts +++ b/src/management/api/types/ClientRefreshTokenConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.ts b/src/management/api/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.ts index 70cc254390..f213422d5b 100644 --- a/src/management/api/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.ts +++ b/src/management/api/types/ClientSessionTransferAllowedAuthenticationMethodsEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ClientSessionTransferAllowedAuthenticationMethodsEnum = "cookie" | "query"; export const ClientSessionTransferAllowedAuthenticationMethodsEnum = { Cookie: "cookie", Query: "query", } as const; +export type ClientSessionTransferAllowedAuthenticationMethodsEnum = + (typeof ClientSessionTransferAllowedAuthenticationMethodsEnum)[keyof typeof ClientSessionTransferAllowedAuthenticationMethodsEnum]; diff --git a/src/management/api/types/ClientSessionTransferConfiguration.ts b/src/management/api/types/ClientSessionTransferConfiguration.ts index 1d4ae4fc27..b8fb9b02f7 100644 --- a/src/management/api/types/ClientSessionTransferConfiguration.ts +++ b/src/management/api/types/ClientSessionTransferConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -8,15 +6,15 @@ import * as Management from "../index.js"; * Native to Web SSO Configuration */ export interface ClientSessionTransferConfiguration { - /** Indicates whether an app can issue a session_token through Token Exchange. If set to 'false', the app will not be able to issue a session_token. */ + /** 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 an app can create a session from a session_token received via indicated methods. */ + /** 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. */ 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. */ + /** 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. */ + /** 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 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. */ - enforce_cascade_revocation?: boolean; } diff --git a/src/management/api/types/ClientSessionTransferDeviceBindingEnum.ts b/src/management/api/types/ClientSessionTransferDeviceBindingEnum.ts index c7ee88ddb9..b7a4fcc747 100644 --- a/src/management/api/types/ClientSessionTransferDeviceBindingEnum.ts +++ b/src/management/api/types/ClientSessionTransferDeviceBindingEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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_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_token must be done from the same ASN as the issuer. If set to 'null', device binding is not enforced. - */ -export type ClientSessionTransferDeviceBindingEnum = "ip" | "asn" | "none"; +/** 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", None: "none", } as const; +export type ClientSessionTransferDeviceBindingEnum = + (typeof ClientSessionTransferDeviceBindingEnum)[keyof typeof ClientSessionTransferDeviceBindingEnum]; diff --git a/src/management/api/types/ClientSignedRequestObjectWithCredentialId.ts b/src/management/api/types/ClientSignedRequestObjectWithCredentialId.ts index d0f53f622f..a67fb753a7 100644 --- a/src/management/api/types/ClientSignedRequestObjectWithCredentialId.ts +++ b/src/management/api/types/ClientSignedRequestObjectWithCredentialId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientSignedRequestObjectWithPublicKey.ts b/src/management/api/types/ClientSignedRequestObjectWithPublicKey.ts index 09a734b6a9..8cee9b36f3 100644 --- a/src/management/api/types/ClientSignedRequestObjectWithPublicKey.ts +++ b/src/management/api/types/ClientSignedRequestObjectWithPublicKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientSigningKey.ts b/src/management/api/types/ClientSigningKey.ts index a874025bc2..60f5ac8c5b 100644 --- a/src/management/api/types/ClientSigningKey.ts +++ b/src/management/api/types/ClientSigningKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ClientSigningKey { /** Signing certificate public key and chain in PKCS#7 (.P7B) format. */ diff --git a/src/management/api/types/ClientSigningKeys.ts b/src/management/api/types/ClientSigningKeys.ts index b2e320976f..39c4e9c0e7 100644 --- a/src/management/api/types/ClientSigningKeys.ts +++ b/src/management/api/types/ClientSigningKeys.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ClientTokenEndpointAuthMethodEnum.ts b/src/management/api/types/ClientTokenEndpointAuthMethodEnum.ts index 0943f8888b..e15e8ff344 100644 --- a/src/management/api/types/ClientTokenEndpointAuthMethodEnum.ts +++ b/src/management/api/types/ClientTokenEndpointAuthMethodEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the requested authentication method for the token endpoint. Can be `none` (public client without a client secret), `client_secret_post` (client uses HTTP POST parameters), or `client_secret_basic` (client uses HTTP Basic). - */ -export type ClientTokenEndpointAuthMethodEnum = "none" | "client_secret_post" | "client_secret_basic"; +/** Defines the requested authentication method for the token endpoint. Can be `none` (public client without a client secret), `client_secret_post` (client uses HTTP POST parameters), or `client_secret_basic` (client uses HTTP Basic). */ export const ClientTokenEndpointAuthMethodEnum = { None: "none", ClientSecretPost: "client_secret_post", ClientSecretBasic: "client_secret_basic", } as const; +export type ClientTokenEndpointAuthMethodEnum = + (typeof ClientTokenEndpointAuthMethodEnum)[keyof typeof ClientTokenEndpointAuthMethodEnum]; diff --git a/src/management/api/types/ClientTokenEndpointAuthMethodOrNullEnum.ts b/src/management/api/types/ClientTokenEndpointAuthMethodOrNullEnum.ts index a6aef0ec51..b044c24500 100644 --- a/src/management/api/types/ClientTokenEndpointAuthMethodOrNullEnum.ts +++ b/src/management/api/types/ClientTokenEndpointAuthMethodOrNullEnum.ts @@ -1,8 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the requested authentication method for the token endpoint. Can be `none` (public client without a client secret), `client_secret_post` (client uses HTTP POST parameters), or `client_secret_basic` (client uses HTTP Basic). - */ -export type ClientTokenEndpointAuthMethodOrNullEnum = string | undefined; +/** Defines the requested authentication method for the token endpoint. Can be `none` (public client without a client secret), `client_secret_post` (client uses HTTP POST parameters), or `client_secret_basic` (client uses HTTP Basic). */ +export const ClientTokenEndpointAuthMethodOrNullEnum = { + None: "none", + ClientSecretPost: "client_secret_post", + ClientSecretBasic: "client_secret_basic", +} as const; +export type ClientTokenEndpointAuthMethodOrNullEnum = + (typeof ClientTokenEndpointAuthMethodOrNullEnum)[keyof typeof ClientTokenEndpointAuthMethodOrNullEnum]; diff --git a/src/management/api/types/ConnectedAccount.ts b/src/management/api/types/ConnectedAccount.ts new file mode 100644 index 0000000000..7d9abdf62a --- /dev/null +++ b/src/management/api/types/ConnectedAccount.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface ConnectedAccount { + /** The unique identifier for the connected account. */ + id: string; + /** The name of the connection associated with the account. */ + connection: string; + /** The unique identifier of the connection associated with the account. */ + connection_id: string; + /** The authentication strategy used by the connection. */ + strategy: string; + access_type: Management.ConnectedAccountAccessTypeEnum; + /** The scopes granted for this connected account. */ + scopes?: string[]; + /** ISO 8601 timestamp when the connected account was created. */ + created_at: string; + /** ISO 8601 timestamp when the connected account expires. */ + expires_at?: string; +} diff --git a/src/management/api/types/ConnectedAccountAccessTypeEnum.ts b/src/management/api/types/ConnectedAccountAccessTypeEnum.ts new file mode 100644 index 0000000000..b380ae2b8b --- /dev/null +++ b/src/management/api/types/ConnectedAccountAccessTypeEnum.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The access type for the connected account. + */ +export type ConnectedAccountAccessTypeEnum = "offline"; diff --git a/src/management/api/types/ConnectionAttributeIdentifier.ts b/src/management/api/types/ConnectionAttributeIdentifier.ts index 7163a9fde0..d77c52fd97 100644 --- a/src/management/api/types/ConnectionAttributeIdentifier.ts +++ b/src/management/api/types/ConnectionAttributeIdentifier.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ConnectionAttributeIdentifier { /** Determines if the attribute is used for identification */ diff --git a/src/management/api/types/ConnectionAttributes.ts b/src/management/api/types/ConnectionAttributes.ts index d64c37c1bc..4324a04272 100644 --- a/src/management/api/types/ConnectionAttributes.ts +++ b/src/management/api/types/ConnectionAttributes.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ConnectionAuthenticationMethods.ts b/src/management/api/types/ConnectionAuthenticationMethods.ts index bdd4f4c142..fbb2459b6e 100644 --- a/src/management/api/types/ConnectionAuthenticationMethods.ts +++ b/src/management/api/types/ConnectionAuthenticationMethods.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ConnectionAuthenticationPurpose.ts b/src/management/api/types/ConnectionAuthenticationPurpose.ts new file mode 100644 index 0000000000..957520e55f --- /dev/null +++ b/src/management/api/types/ConnectionAuthenticationPurpose.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Configure the purpose of a connection to be used for authentication during login. + */ +export interface ConnectionAuthenticationPurpose { + active: boolean; +} diff --git a/src/management/api/types/ConnectionConnectedAccountsPurpose.ts b/src/management/api/types/ConnectionConnectedAccountsPurpose.ts new file mode 100644 index 0000000000..9e30c3ee4f --- /dev/null +++ b/src/management/api/types/ConnectionConnectedAccountsPurpose.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Configure the purpose of a connection to be used for connected accounts and Token Vault. + */ +export interface ConnectionConnectedAccountsPurpose { + active: boolean; + cross_app_access?: boolean; +} diff --git a/src/management/api/types/ConnectionCustomScripts.ts b/src/management/api/types/ConnectionCustomScripts.ts index 7ce9632d78..4bc9bfcd9d 100644 --- a/src/management/api/types/ConnectionCustomScripts.ts +++ b/src/management/api/types/ConnectionCustomScripts.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * A map of scripts used to integrate with a custom database. diff --git a/src/management/api/types/ConnectionDisplayName.ts b/src/management/api/types/ConnectionDisplayName.ts new file mode 100644 index 0000000000..c2ad7cd5ad --- /dev/null +++ b/src/management/api/types/ConnectionDisplayName.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Connection name used in the new universal login experience + */ +export type ConnectionDisplayName = string; diff --git a/src/management/api/types/ConnectionEnabledClient.ts b/src/management/api/types/ConnectionEnabledClient.ts index bbde0e9578..ae2e749c8f 100644 --- a/src/management/api/types/ConnectionEnabledClient.ts +++ b/src/management/api/types/ConnectionEnabledClient.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ConnectionEnabledClient { /** The client id */ diff --git a/src/management/api/types/ConnectionEnabledClients.ts b/src/management/api/types/ConnectionEnabledClients.ts new file mode 100644 index 0000000000..e296f63c92 --- /dev/null +++ b/src/management/api/types/ConnectionEnabledClients.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients. + */ +export type ConnectionEnabledClients = string[]; diff --git a/src/management/api/types/ConnectionFederatedConnectionsAccessTokens.ts b/src/management/api/types/ConnectionFederatedConnectionsAccessTokens.ts index 87ef2773cc..0ded93eeee 100644 --- a/src/management/api/types/ConnectionFederatedConnectionsAccessTokens.ts +++ b/src/management/api/types/ConnectionFederatedConnectionsAccessTokens.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Federated Connections Access Tokens diff --git a/src/management/api/types/ConnectionForList.ts b/src/management/api/types/ConnectionForList.ts index 65329246c5..49a7792104 100644 --- a/src/management/api/types/ConnectionForList.ts +++ b/src/management/api/types/ConnectionForList.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -21,4 +19,6 @@ export interface ConnectionForList { /** Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. */ show_as_button?: boolean; metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; } diff --git a/src/management/api/types/ConnectionForOrganization.ts b/src/management/api/types/ConnectionForOrganization.ts index 0f0c2aff53..b15bea6c3b 100644 --- a/src/management/api/types/ConnectionForOrganization.ts +++ b/src/management/api/types/ConnectionForOrganization.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Connection to be added to the organization. diff --git a/src/management/api/types/ConnectionGatewayAuthentication.ts b/src/management/api/types/ConnectionGatewayAuthentication.ts index 370dc97d45..a23adc32ca 100644 --- a/src/management/api/types/ConnectionGatewayAuthentication.ts +++ b/src/management/api/types/ConnectionGatewayAuthentication.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Token-based authentication settings to be applied when connection is using an sms strategy. diff --git a/src/management/api/types/ConnectionId.ts b/src/management/api/types/ConnectionId.ts new file mode 100644 index 0000000000..5fb401b50a --- /dev/null +++ b/src/management/api/types/ConnectionId.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The connection's identifier + */ +export type ConnectionId = string; diff --git a/src/management/api/types/ConnectionIdentifierPrecedenceEnum.ts b/src/management/api/types/ConnectionIdentifierPrecedenceEnum.ts index af74011c32..45016bae9f 100644 --- a/src/management/api/types/ConnectionIdentifierPrecedenceEnum.ts +++ b/src/management/api/types/ConnectionIdentifierPrecedenceEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Order of precedence for attribute types - */ -export type ConnectionIdentifierPrecedenceEnum = "email" | "phone_number" | "username"; +/** Order of precedence for attribute types */ export const ConnectionIdentifierPrecedenceEnum = { Email: "email", PhoneNumber: "phone_number", Username: "username", } as const; +export type ConnectionIdentifierPrecedenceEnum = + (typeof ConnectionIdentifierPrecedenceEnum)[keyof typeof ConnectionIdentifierPrecedenceEnum]; diff --git a/src/management/api/types/ConnectionIdentityProviderEnum.ts b/src/management/api/types/ConnectionIdentityProviderEnum.ts index d4de24a469..3b2f053d23 100644 --- a/src/management/api/types/ConnectionIdentityProviderEnum.ts +++ b/src/management/api/types/ConnectionIdentityProviderEnum.ts @@ -1,73 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The identity provider identifier for the connection - */ -export type ConnectionIdentityProviderEnum = - | "ad" - | "adfs" - | "amazon" - | "apple" - | "dropbox" - | "bitbucket" - | "aol" - | "auth0-oidc" - | "auth0" - | "baidu" - | "bitly" - | "box" - | "custom" - | "daccount" - | "dwolla" - | "email" - | "evernote-sandbox" - | "evernote" - | "exact" - | "facebook" - | "fitbit" - | "flickr" - | "github" - | "google-apps" - | "google-oauth2" - | "instagram" - | "ip" - | "line" - | "linkedin" - | "miicard" - | "oauth1" - | "oauth2" - | "office365" - | "oidc" - | "okta" - | "paypal" - | "paypal-sandbox" - | "pingfederate" - | "planningcenter" - | "renren" - | "salesforce-community" - | "salesforce-sandbox" - | "salesforce" - | "samlp" - | "sharepoint" - | "shopify" - | "shop" - | "sms" - | "soundcloud" - | "thecity-sandbox" - | "thecity" - | "thirtysevensignals" - | "twitter" - | "untappd" - | "vkontakte" - | "waad" - | "weibo" - | "windowslive" - | "wordpress" - | "yahoo" - | "yammer" - | "yandex"; +/** The identity provider identifier for the connection */ export const ConnectionIdentityProviderEnum = { Ad: "ad", Adfs: "adfs", @@ -132,3 +65,5 @@ export const ConnectionIdentityProviderEnum = { Yammer: "yammer", Yandex: "yandex", } as const; +export type ConnectionIdentityProviderEnum = + (typeof ConnectionIdentityProviderEnum)[keyof typeof ConnectionIdentityProviderEnum]; diff --git a/src/management/api/types/ConnectionIsDomainConnection.ts b/src/management/api/types/ConnectionIsDomainConnection.ts new file mode 100644 index 0000000000..fe86d9b244 --- /dev/null +++ b/src/management/api/types/ConnectionIsDomainConnection.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.) + */ +export type ConnectionIsDomainConnection = boolean; diff --git a/src/management/api/types/ConnectionKey.ts b/src/management/api/types/ConnectionKey.ts index 897f285da5..75562f6034 100644 --- a/src/management/api/types/ConnectionKey.ts +++ b/src/management/api/types/ConnectionKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ConnectionKeyUseEnum.ts b/src/management/api/types/ConnectionKeyUseEnum.ts index 8e2827c68f..00a6fa1956 100644 --- a/src/management/api/types/ConnectionKeyUseEnum.ts +++ b/src/management/api/types/ConnectionKeyUseEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Signing key use, whether for encryption or signing - */ -export type ConnectionKeyUseEnum = "encryption" | "signing"; +/** Signing key use, whether for encryption or signing */ export const ConnectionKeyUseEnum = { Encryption: "encryption", Signing: "signing", } as const; +export type ConnectionKeyUseEnum = (typeof ConnectionKeyUseEnum)[keyof typeof ConnectionKeyUseEnum]; diff --git a/src/management/api/types/ConnectionName.ts b/src/management/api/types/ConnectionName.ts new file mode 100644 index 0000000000..548490b28e --- /dev/null +++ b/src/management/api/types/ConnectionName.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128 + */ +export type ConnectionName = string; diff --git a/src/management/api/types/ConnectionOptions.ts b/src/management/api/types/ConnectionOptions.ts index b644a53f9e..d8d05b033c 100644 --- a/src/management/api/types/ConnectionOptions.ts +++ b/src/management/api/types/ConnectionOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * In order to return options in the response, the `read:connections_options` scope must be present diff --git a/src/management/api/types/ConnectionOptionsAd.ts b/src/management/api/types/ConnectionOptionsAd.ts new file mode 100644 index 0000000000..2145b76cff --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAd.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'ad' connection + */ +export type ConnectionOptionsAd = Record; diff --git a/src/management/api/types/ConnectionOptionsAdfs.ts b/src/management/api/types/ConnectionOptionsAdfs.ts new file mode 100644 index 0000000000..75bfbb93c5 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAdfs.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'adfs' connection + */ +export type ConnectionOptionsAdfs = Record; diff --git a/src/management/api/types/ConnectionOptionsAmazon.ts b/src/management/api/types/ConnectionOptionsAmazon.ts new file mode 100644 index 0000000000..9e81bb2420 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAmazon.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsAmazon = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsAol.ts b/src/management/api/types/ConnectionOptionsAol.ts new file mode 100644 index 0000000000..0ebbc4db5d --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAol.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsAol = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsApple.ts b/src/management/api/types/ConnectionOptionsApple.ts new file mode 100644 index 0000000000..dc681ac14c --- /dev/null +++ b/src/management/api/types/ConnectionOptionsApple.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'apple' connection + */ +export type ConnectionOptionsApple = Record; diff --git a/src/management/api/types/ConnectionOptionsAuth0.ts b/src/management/api/types/ConnectionOptionsAuth0.ts new file mode 100644 index 0000000000..79f72d3d1a --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAuth0.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'auth0' connection + */ +export type ConnectionOptionsAuth0 = Record; diff --git a/src/management/api/types/ConnectionOptionsAuth0Oidc.ts b/src/management/api/types/ConnectionOptionsAuth0Oidc.ts new file mode 100644 index 0000000000..b260a13853 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAuth0Oidc.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'auth0-oidc' connection + */ +export type ConnectionOptionsAuth0Oidc = Record; diff --git a/src/management/api/types/ConnectionOptionsAzureAd.ts b/src/management/api/types/ConnectionOptionsAzureAd.ts new file mode 100644 index 0000000000..6e9b791e6c --- /dev/null +++ b/src/management/api/types/ConnectionOptionsAzureAd.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'waad' connection + */ +export type ConnectionOptionsAzureAd = Record; diff --git a/src/management/api/types/ConnectionOptionsBaidu.ts b/src/management/api/types/ConnectionOptionsBaidu.ts new file mode 100644 index 0000000000..b1817733ba --- /dev/null +++ b/src/management/api/types/ConnectionOptionsBaidu.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsBaidu = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsBitbucket.ts b/src/management/api/types/ConnectionOptionsBitbucket.ts new file mode 100644 index 0000000000..5dae27c7d7 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsBitbucket.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsBitbucket = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsBitly.ts b/src/management/api/types/ConnectionOptionsBitly.ts new file mode 100644 index 0000000000..89c0180fbb --- /dev/null +++ b/src/management/api/types/ConnectionOptionsBitly.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsBitly = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsBox.ts b/src/management/api/types/ConnectionOptionsBox.ts new file mode 100644 index 0000000000..3083203638 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsBox.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsBox = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsCustom.ts b/src/management/api/types/ConnectionOptionsCustom.ts new file mode 100644 index 0000000000..86468447d3 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsCustom.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'custom' connection + */ +export type ConnectionOptionsCustom = Record; diff --git a/src/management/api/types/ConnectionOptionsDaccount.ts b/src/management/api/types/ConnectionOptionsDaccount.ts new file mode 100644 index 0000000000..26a47ad924 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsDaccount.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsDaccount = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsDropbox.ts b/src/management/api/types/ConnectionOptionsDropbox.ts new file mode 100644 index 0000000000..f3bde880f6 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsDropbox.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsDropbox = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsDwolla.ts b/src/management/api/types/ConnectionOptionsDwolla.ts new file mode 100644 index 0000000000..60f61db631 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsDwolla.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsDwolla = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsEmail.ts b/src/management/api/types/ConnectionOptionsEmail.ts new file mode 100644 index 0000000000..08917f8681 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsEmail.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'email' connection + */ +export type ConnectionOptionsEmail = Record; diff --git a/src/management/api/types/ConnectionOptionsEvernote.ts b/src/management/api/types/ConnectionOptionsEvernote.ts new file mode 100644 index 0000000000..e6b48f481a --- /dev/null +++ b/src/management/api/types/ConnectionOptionsEvernote.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsEvernote = Management.ConnectionOptionsEvernoteCommon; diff --git a/src/management/api/types/ConnectionOptionsEvernoteCommon.ts b/src/management/api/types/ConnectionOptionsEvernoteCommon.ts new file mode 100644 index 0000000000..85dc45ba1a --- /dev/null +++ b/src/management/api/types/ConnectionOptionsEvernoteCommon.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type ConnectionOptionsEvernoteCommon = Record; diff --git a/src/management/api/types/ConnectionOptionsEvernoteSandbox.ts b/src/management/api/types/ConnectionOptionsEvernoteSandbox.ts new file mode 100644 index 0000000000..0547e1d414 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsEvernoteSandbox.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsEvernoteSandbox = Management.ConnectionOptionsEvernoteCommon; diff --git a/src/management/api/types/ConnectionOptionsExact.ts b/src/management/api/types/ConnectionOptionsExact.ts new file mode 100644 index 0000000000..d011040a98 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsExact.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsExact = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsFacebook.ts b/src/management/api/types/ConnectionOptionsFacebook.ts new file mode 100644 index 0000000000..fd2e6f0c8e --- /dev/null +++ b/src/management/api/types/ConnectionOptionsFacebook.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'facebook' connection + */ +export type ConnectionOptionsFacebook = Record; diff --git a/src/management/api/types/ConnectionOptionsFitbit.ts b/src/management/api/types/ConnectionOptionsFitbit.ts new file mode 100644 index 0000000000..363eafa8a1 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsFitbit.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'fitbit' connection + */ +export type ConnectionOptionsFitbit = Record; diff --git a/src/management/api/types/ConnectionOptionsFlickr.ts b/src/management/api/types/ConnectionOptionsFlickr.ts new file mode 100644 index 0000000000..24bf5853fc --- /dev/null +++ b/src/management/api/types/ConnectionOptionsFlickr.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'flickr' connection + */ +export type ConnectionOptionsFlickr = Record; diff --git a/src/management/api/types/ConnectionOptionsGitHub.ts b/src/management/api/types/ConnectionOptionsGitHub.ts new file mode 100644 index 0000000000..c59a37c4cd --- /dev/null +++ b/src/management/api/types/ConnectionOptionsGitHub.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'github' connection + */ +export type ConnectionOptionsGitHub = Record; diff --git a/src/management/api/types/ConnectionOptionsGoogleApps.ts b/src/management/api/types/ConnectionOptionsGoogleApps.ts new file mode 100644 index 0000000000..5f3543c369 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsGoogleApps.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'google-apps' connection + */ +export type ConnectionOptionsGoogleApps = Record; diff --git a/src/management/api/types/ConnectionOptionsGoogleOAuth2.ts b/src/management/api/types/ConnectionOptionsGoogleOAuth2.ts new file mode 100644 index 0000000000..4bb528215c --- /dev/null +++ b/src/management/api/types/ConnectionOptionsGoogleOAuth2.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'google-oauth2' connection + */ +export type ConnectionOptionsGoogleOAuth2 = Record; diff --git a/src/management/api/types/ConnectionOptionsInstagram.ts b/src/management/api/types/ConnectionOptionsInstagram.ts new file mode 100644 index 0000000000..0a3ecf5863 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsInstagram.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsInstagram = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsIp.ts b/src/management/api/types/ConnectionOptionsIp.ts new file mode 100644 index 0000000000..52292c79fb --- /dev/null +++ b/src/management/api/types/ConnectionOptionsIp.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'ip' connection + */ +export type ConnectionOptionsIp = Record; diff --git a/src/management/api/types/ConnectionOptionsLine.ts b/src/management/api/types/ConnectionOptionsLine.ts new file mode 100644 index 0000000000..4ffc780274 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsLine.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsLine = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsLinkedin.ts b/src/management/api/types/ConnectionOptionsLinkedin.ts new file mode 100644 index 0000000000..67a7623649 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsLinkedin.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'linkedin' connection + */ +export type ConnectionOptionsLinkedin = Record; diff --git a/src/management/api/types/ConnectionOptionsMiicard.ts b/src/management/api/types/ConnectionOptionsMiicard.ts new file mode 100644 index 0000000000..99c2d89842 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsMiicard.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsMiicard = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsOAuth1.ts b/src/management/api/types/ConnectionOptionsOAuth1.ts new file mode 100644 index 0000000000..772d8fb39e --- /dev/null +++ b/src/management/api/types/ConnectionOptionsOAuth1.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'oauth1' connection + */ +export type ConnectionOptionsOAuth1 = Record; diff --git a/src/management/api/types/ConnectionOptionsOAuth2.ts b/src/management/api/types/ConnectionOptionsOAuth2.ts new file mode 100644 index 0000000000..ed006b863e --- /dev/null +++ b/src/management/api/types/ConnectionOptionsOAuth2.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsOAuth2 = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsOAuth2Common.ts b/src/management/api/types/ConnectionOptionsOAuth2Common.ts new file mode 100644 index 0000000000..cec3318aca --- /dev/null +++ b/src/management/api/types/ConnectionOptionsOAuth2Common.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type ConnectionOptionsOAuth2Common = Record; diff --git a/src/management/api/types/ConnectionOptionsOffice365.ts b/src/management/api/types/ConnectionOptionsOffice365.ts new file mode 100644 index 0000000000..e6eb21a4ee --- /dev/null +++ b/src/management/api/types/ConnectionOptionsOffice365.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'office365' connection + */ +export type ConnectionOptionsOffice365 = Record; diff --git a/src/management/api/types/ConnectionOptionsOidc.ts b/src/management/api/types/ConnectionOptionsOidc.ts new file mode 100644 index 0000000000..a9b3ad7601 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsOidc.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'oidc' connection + */ +export type ConnectionOptionsOidc = Record; diff --git a/src/management/api/types/ConnectionOptionsOkta.ts b/src/management/api/types/ConnectionOptionsOkta.ts new file mode 100644 index 0000000000..ec624a317f --- /dev/null +++ b/src/management/api/types/ConnectionOptionsOkta.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'okta' connection + */ +export type ConnectionOptionsOkta = Record; diff --git a/src/management/api/types/ConnectionOptionsPaypal.ts b/src/management/api/types/ConnectionOptionsPaypal.ts new file mode 100644 index 0000000000..7c86f6211e --- /dev/null +++ b/src/management/api/types/ConnectionOptionsPaypal.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsPaypal = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsPaypalSandbox.ts b/src/management/api/types/ConnectionOptionsPaypalSandbox.ts new file mode 100644 index 0000000000..3694e13a13 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsPaypalSandbox.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsPaypalSandbox = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsPingFederate.ts b/src/management/api/types/ConnectionOptionsPingFederate.ts new file mode 100644 index 0000000000..775bed1134 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsPingFederate.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'pingfederate' connection + */ +export type ConnectionOptionsPingFederate = Record; diff --git a/src/management/api/types/ConnectionOptionsPlanningCenter.ts b/src/management/api/types/ConnectionOptionsPlanningCenter.ts new file mode 100644 index 0000000000..19aed54613 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsPlanningCenter.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'planningcenter' connection + */ +export type ConnectionOptionsPlanningCenter = Record; diff --git a/src/management/api/types/ConnectionOptionsRenren.ts b/src/management/api/types/ConnectionOptionsRenren.ts new file mode 100644 index 0000000000..347c87e367 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsRenren.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsRenren = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsSalesforce.ts b/src/management/api/types/ConnectionOptionsSalesforce.ts new file mode 100644 index 0000000000..83b93b0bf9 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSalesforce.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsSalesforce = Management.ConnectionOptionsSalesforceCommon; diff --git a/src/management/api/types/ConnectionOptionsSalesforceCommon.ts b/src/management/api/types/ConnectionOptionsSalesforceCommon.ts new file mode 100644 index 0000000000..181c092b8a --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSalesforceCommon.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type ConnectionOptionsSalesforceCommon = Record; diff --git a/src/management/api/types/ConnectionOptionsSalesforceCommunity.ts b/src/management/api/types/ConnectionOptionsSalesforceCommunity.ts new file mode 100644 index 0000000000..84cf185b25 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSalesforceCommunity.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsSalesforceCommunity = Management.ConnectionOptionsSalesforceCommon; diff --git a/src/management/api/types/ConnectionOptionsSalesforceSandbox.ts b/src/management/api/types/ConnectionOptionsSalesforceSandbox.ts new file mode 100644 index 0000000000..7ee71d4216 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSalesforceSandbox.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsSalesforceSandbox = Management.ConnectionOptionsSalesforceCommon; diff --git a/src/management/api/types/ConnectionOptionsSaml.ts b/src/management/api/types/ConnectionOptionsSaml.ts new file mode 100644 index 0000000000..b652de5ffa --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSaml.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'samlp' connection + */ +export type ConnectionOptionsSaml = Record; diff --git a/src/management/api/types/ConnectionOptionsSharepoint.ts b/src/management/api/types/ConnectionOptionsSharepoint.ts new file mode 100644 index 0000000000..60112b6fe0 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSharepoint.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsSharepoint = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsShop.ts b/src/management/api/types/ConnectionOptionsShop.ts new file mode 100644 index 0000000000..a6ab72913f --- /dev/null +++ b/src/management/api/types/ConnectionOptionsShop.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'shop' connection + */ +export type ConnectionOptionsShop = Record; diff --git a/src/management/api/types/ConnectionOptionsShopify.ts b/src/management/api/types/ConnectionOptionsShopify.ts new file mode 100644 index 0000000000..63ac383ff9 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsShopify.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsShopify = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsSms.ts b/src/management/api/types/ConnectionOptionsSms.ts new file mode 100644 index 0000000000..9d2890c273 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSms.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'sms' connection + */ +export type ConnectionOptionsSms = Record; diff --git a/src/management/api/types/ConnectionOptionsSoundcloud.ts b/src/management/api/types/ConnectionOptionsSoundcloud.ts new file mode 100644 index 0000000000..63718840e5 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsSoundcloud.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsSoundcloud = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsTheCity.ts b/src/management/api/types/ConnectionOptionsTheCity.ts new file mode 100644 index 0000000000..e298825391 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsTheCity.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsTheCity = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsTheCitySandbox.ts b/src/management/api/types/ConnectionOptionsTheCitySandbox.ts new file mode 100644 index 0000000000..146069eb8e --- /dev/null +++ b/src/management/api/types/ConnectionOptionsTheCitySandbox.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsTheCitySandbox = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsThirtySevenSignals.ts b/src/management/api/types/ConnectionOptionsThirtySevenSignals.ts new file mode 100644 index 0000000000..5e4f074995 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsThirtySevenSignals.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsThirtySevenSignals = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsTwitter.ts b/src/management/api/types/ConnectionOptionsTwitter.ts new file mode 100644 index 0000000000..d307ced7f2 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsTwitter.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'twitter' connection + */ +export type ConnectionOptionsTwitter = Record; diff --git a/src/management/api/types/ConnectionOptionsUntappd.ts b/src/management/api/types/ConnectionOptionsUntappd.ts new file mode 100644 index 0000000000..56a82cb6c9 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsUntappd.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsUntappd = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsVkontakte.ts b/src/management/api/types/ConnectionOptionsVkontakte.ts new file mode 100644 index 0000000000..09706ce2a4 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsVkontakte.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsVkontakte = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsWeibo.ts b/src/management/api/types/ConnectionOptionsWeibo.ts new file mode 100644 index 0000000000..e16fa734f4 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsWeibo.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsWeibo = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsWindowsLive.ts b/src/management/api/types/ConnectionOptionsWindowsLive.ts new file mode 100644 index 0000000000..0c511f9bb2 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsWindowsLive.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * options for the 'windowslive' connection + */ +export type ConnectionOptionsWindowsLive = Record; diff --git a/src/management/api/types/ConnectionOptionsWordpress.ts b/src/management/api/types/ConnectionOptionsWordpress.ts new file mode 100644 index 0000000000..11374e54da --- /dev/null +++ b/src/management/api/types/ConnectionOptionsWordpress.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsWordpress = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsYahoo.ts b/src/management/api/types/ConnectionOptionsYahoo.ts new file mode 100644 index 0000000000..57eac252da --- /dev/null +++ b/src/management/api/types/ConnectionOptionsYahoo.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsYahoo = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsYammer.ts b/src/management/api/types/ConnectionOptionsYammer.ts new file mode 100644 index 0000000000..a771482506 --- /dev/null +++ b/src/management/api/types/ConnectionOptionsYammer.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsYammer = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionOptionsYandex.ts b/src/management/api/types/ConnectionOptionsYandex.ts new file mode 100644 index 0000000000..008055701b --- /dev/null +++ b/src/management/api/types/ConnectionOptionsYandex.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type ConnectionOptionsYandex = Management.ConnectionOptionsOAuth2Common; diff --git a/src/management/api/types/ConnectionPasskeyAuthenticationMethod.ts b/src/management/api/types/ConnectionPasskeyAuthenticationMethod.ts index 02dd17a2f6..98e449dc6e 100644 --- a/src/management/api/types/ConnectionPasskeyAuthenticationMethod.ts +++ b/src/management/api/types/ConnectionPasskeyAuthenticationMethod.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Passkey authentication enablement diff --git a/src/management/api/types/ConnectionPasskeyChallengeUiEnum.ts b/src/management/api/types/ConnectionPasskeyChallengeUiEnum.ts index f2d633c17e..57da90978b 100644 --- a/src/management/api/types/ConnectionPasskeyChallengeUiEnum.ts +++ b/src/management/api/types/ConnectionPasskeyChallengeUiEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Controls the UI used to challenge the user for their passkey. - */ -export type ConnectionPasskeyChallengeUiEnum = "both" | "autofill" | "button"; +/** Controls the UI used to challenge the user for their passkey. */ export const ConnectionPasskeyChallengeUiEnum = { Both: "both", Autofill: "autofill", Button: "button", } as const; +export type ConnectionPasskeyChallengeUiEnum = + (typeof ConnectionPasskeyChallengeUiEnum)[keyof typeof ConnectionPasskeyChallengeUiEnum]; diff --git a/src/management/api/types/ConnectionPasskeyOptions.ts b/src/management/api/types/ConnectionPasskeyOptions.ts index 6aff7f0380..284642c1ba 100644 --- a/src/management/api/types/ConnectionPasskeyOptions.ts +++ b/src/management/api/types/ConnectionPasskeyOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ConnectionPasswordAuthenticationMethod.ts b/src/management/api/types/ConnectionPasswordAuthenticationMethod.ts index 4b7412e88e..1d0eb78fe8 100644 --- a/src/management/api/types/ConnectionPasswordAuthenticationMethod.ts +++ b/src/management/api/types/ConnectionPasswordAuthenticationMethod.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Password authentication enablement diff --git a/src/management/api/types/ConnectionPasswordComplexityOptions.ts b/src/management/api/types/ConnectionPasswordComplexityOptions.ts index 3762d9c735..7b9a12691d 100644 --- a/src/management/api/types/ConnectionPasswordComplexityOptions.ts +++ b/src/management/api/types/ConnectionPasswordComplexityOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Password complexity options diff --git a/src/management/api/types/ConnectionPasswordDictionaryOptions.ts b/src/management/api/types/ConnectionPasswordDictionaryOptions.ts index 337cd1450d..fcd5df5786 100644 --- a/src/management/api/types/ConnectionPasswordDictionaryOptions.ts +++ b/src/management/api/types/ConnectionPasswordDictionaryOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Options for password dictionary policy diff --git a/src/management/api/types/ConnectionPasswordHistoryOptions.ts b/src/management/api/types/ConnectionPasswordHistoryOptions.ts index cf6c5353f4..111985e8d7 100644 --- a/src/management/api/types/ConnectionPasswordHistoryOptions.ts +++ b/src/management/api/types/ConnectionPasswordHistoryOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Options for password history policy diff --git a/src/management/api/types/ConnectionPasswordNoPersonalInfoOptions.ts b/src/management/api/types/ConnectionPasswordNoPersonalInfoOptions.ts index 89026c66e5..5615e8812c 100644 --- a/src/management/api/types/ConnectionPasswordNoPersonalInfoOptions.ts +++ b/src/management/api/types/ConnectionPasswordNoPersonalInfoOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Options for personal info in passwords policy diff --git a/src/management/api/types/ConnectionPasswordPolicyEnum.ts b/src/management/api/types/ConnectionPasswordPolicyEnum.ts index dea0d955a4..21237085dd 100644 --- a/src/management/api/types/ConnectionPasswordPolicyEnum.ts +++ b/src/management/api/types/ConnectionPasswordPolicyEnum.ts @@ -1,8 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Password strength level - */ -export type ConnectionPasswordPolicyEnum = string | undefined; +/** Password strength level */ +export const ConnectionPasswordPolicyEnum = { + None: "none", + Low: "low", + Fair: "fair", + Good: "good", + Excellent: "excellent", +} as const; +export type ConnectionPasswordPolicyEnum = + (typeof ConnectionPasswordPolicyEnum)[keyof typeof ConnectionPasswordPolicyEnum]; diff --git a/src/management/api/types/ConnectionPropertiesOptions.ts b/src/management/api/types/ConnectionPropertiesOptions.ts index 0d3d58e8db..c9e4cdf7c1 100644 --- a/src/management/api/types/ConnectionPropertiesOptions.ts +++ b/src/management/api/types/ConnectionPropertiesOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -8,25 +6,26 @@ import * as Management from "../index.js"; * The connection's options (depend on the connection strategy) */ export interface ConnectionPropertiesOptions { - validation?: Management.ConnectionValidationOptions; + validation?: Management.ConnectionValidationOptions | null; /** An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) */ non_persistent_attrs?: string[]; /** Order of precedence for attribute types. If the property is not specified, the default precedence of attributes will be used. */ precedence?: Management.ConnectionIdentifierPrecedenceEnum[]; attributes?: Management.ConnectionAttributes; + /** Set to true to inject context into custom DB scripts (warning: cannot be disabled once enabled) */ enable_script_context?: boolean; /** Set to true to use a legacy user store */ enabledDatabaseCustomization?: boolean; /** Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store */ import_mode?: boolean; customScripts?: Management.ConnectionCustomScripts; - authentication_methods?: Management.ConnectionAuthenticationMethods; - passkey_options?: Management.ConnectionPasskeyOptions; - passwordPolicy?: Management.ConnectionPasswordPolicyEnum | undefined; - password_complexity_options?: Management.ConnectionPasswordComplexityOptions; - password_history?: Management.ConnectionPasswordHistoryOptions; - password_no_personal_info?: Management.ConnectionPasswordNoPersonalInfoOptions; - password_dictionary?: Management.ConnectionPasswordDictionaryOptions; + authentication_methods?: Management.ConnectionAuthenticationMethods | null; + passkey_options?: Management.ConnectionPasskeyOptions | null; + passwordPolicy?: Management.ConnectionPasswordPolicyEnum | null; + password_complexity_options?: Management.ConnectionPasswordComplexityOptions | null; + password_history?: Management.ConnectionPasswordHistoryOptions | null; + password_no_personal_info?: Management.ConnectionPasswordNoPersonalInfoOptions | null; + password_dictionary?: Management.ConnectionPasswordDictionaryOptions | null; api_enable_users?: boolean; basic_profile?: boolean; ext_admin?: boolean; @@ -36,10 +35,10 @@ export interface ConnectionPropertiesOptions { ext_assigned_plans?: boolean; ext_profile?: boolean; disable_self_service_change_password?: boolean; - upstream_params?: Management.ConnectionUpstreamParams | undefined; + upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; - gateway_authentication?: Management.ConnectionGatewayAuthentication; - federated_connections_access_tokens?: Management.ConnectionFederatedConnectionsAccessTokens; + gateway_authentication?: Management.ConnectionGatewayAuthentication | null; + federated_connections_access_tokens?: Management.ConnectionFederatedConnectionsAccessTokens | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/ConnectionRealms.ts b/src/management/api/types/ConnectionRealms.ts new file mode 100644 index 0000000000..cbdbc86649 --- /dev/null +++ b/src/management/api/types/ConnectionRealms.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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 ConnectionRealms = string[]; diff --git a/src/management/api/types/ConnectionRequestCommon.ts b/src/management/api/types/ConnectionRequestCommon.ts new file mode 100644 index 0000000000..5fe9b2554a --- /dev/null +++ b/src/management/api/types/ConnectionRequestCommon.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface ConnectionRequestCommon { + display_name?: Management.ConnectionDisplayName; + enabled_clients?: Management.ConnectionEnabledClients; + is_domain_connection?: Management.ConnectionIsDomainConnection; + show_as_button?: Management.ConnectionShowAsButton; + realms?: Management.ConnectionRealms; + metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; +} diff --git a/src/management/api/types/ConnectionResponseCommon.ts b/src/management/api/types/ConnectionResponseCommon.ts new file mode 100644 index 0000000000..5b351e588e --- /dev/null +++ b/src/management/api/types/ConnectionResponseCommon.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface ConnectionResponseCommon extends Management.ConnectionRequestCommon { + id?: Management.ConnectionId; + strategy?: Management.ConnectionIdentityProviderEnum; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAd.ts b/src/management/api/types/ConnectionResponseContentAd.ts new file mode 100644 index 0000000000..295017c8d2 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAd.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=ad + */ +export interface ConnectionResponseContentAd extends Management.ConnectionRequestCommon { + strategy: "ad"; + options?: Management.ConnectionOptionsAd; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAdfs.ts b/src/management/api/types/ConnectionResponseContentAdfs.ts new file mode 100644 index 0000000000..d2585dc0b6 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAdfs.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=adfs + */ +export interface ConnectionResponseContentAdfs extends Management.ConnectionRequestCommon { + strategy: "adfs"; + options?: Management.ConnectionOptionsAdfs; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAmazon.ts b/src/management/api/types/ConnectionResponseContentAmazon.ts new file mode 100644 index 0000000000..17aa0f1562 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAmazon.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=amazon + */ +export interface ConnectionResponseContentAmazon extends Management.ConnectionRequestCommon { + strategy: "amazon"; + options?: Management.ConnectionOptionsAmazon; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAol.ts b/src/management/api/types/ConnectionResponseContentAol.ts new file mode 100644 index 0000000000..223e39f71e --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAol.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=aol + */ +export interface ConnectionResponseContentAol extends Management.ConnectionRequestCommon { + strategy: "aol"; + options?: Management.ConnectionOptionsAol; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentApple.ts b/src/management/api/types/ConnectionResponseContentApple.ts new file mode 100644 index 0000000000..0b407de0ad --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentApple.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=apple + */ +export interface ConnectionResponseContentApple extends Management.ConnectionRequestCommon { + strategy: "apple"; + options?: Management.ConnectionOptionsApple; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAuth0.ts b/src/management/api/types/ConnectionResponseContentAuth0.ts new file mode 100644 index 0000000000..d625cebcd3 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAuth0.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=auth0 + */ +export interface ConnectionResponseContentAuth0 extends Management.ConnectionRequestCommon { + strategy: "auth0"; + options?: Management.ConnectionOptionsAuth0; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAuth0Oidc.ts b/src/management/api/types/ConnectionResponseContentAuth0Oidc.ts new file mode 100644 index 0000000000..85e007e42f --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAuth0Oidc.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=auth0-oidc + */ +export interface ConnectionResponseContentAuth0Oidc extends Management.ConnectionRequestCommon { + strategy: "auth0-oidc"; + options?: Management.ConnectionOptionsAuth0Oidc; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentAzureAd.ts b/src/management/api/types/ConnectionResponseContentAzureAd.ts new file mode 100644 index 0000000000..c93e30e2de --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentAzureAd.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=waad + */ +export interface ConnectionResponseContentAzureAd extends Management.ConnectionRequestCommon { + strategy: "waad"; + options?: Management.ConnectionOptionsAzureAd; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentBaidu.ts b/src/management/api/types/ConnectionResponseContentBaidu.ts new file mode 100644 index 0000000000..483af6356c --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentBaidu.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=baidu + */ +export interface ConnectionResponseContentBaidu extends Management.ConnectionRequestCommon { + strategy: "baidu"; + options?: Management.ConnectionOptionsBaidu; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentBitbucket.ts b/src/management/api/types/ConnectionResponseContentBitbucket.ts new file mode 100644 index 0000000000..09c05a40ee --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentBitbucket.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=bitbucket + */ +export interface ConnectionResponseContentBitbucket extends Management.ConnectionRequestCommon { + strategy: "bitbucket"; + options?: Management.ConnectionOptionsBitbucket; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentBitly.ts b/src/management/api/types/ConnectionResponseContentBitly.ts new file mode 100644 index 0000000000..98dc9f3335 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentBitly.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=bitly + */ +export interface ConnectionResponseContentBitly extends Management.ConnectionRequestCommon { + strategy: "bitly"; + options?: Management.ConnectionOptionsBitly; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentBox.ts b/src/management/api/types/ConnectionResponseContentBox.ts new file mode 100644 index 0000000000..53bf4eddde --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentBox.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=box + */ +export interface ConnectionResponseContentBox extends Management.ConnectionRequestCommon { + strategy: "box"; + options?: Management.ConnectionOptionsBox; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentCustom.ts b/src/management/api/types/ConnectionResponseContentCustom.ts new file mode 100644 index 0000000000..32242cc083 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentCustom.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=custom + */ +export interface ConnectionResponseContentCustom extends Management.ConnectionRequestCommon { + strategy: "custom"; + options?: Management.ConnectionOptionsCustom; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentDaccount.ts b/src/management/api/types/ConnectionResponseContentDaccount.ts new file mode 100644 index 0000000000..c4635f4582 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentDaccount.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=daccount + */ +export interface ConnectionResponseContentDaccount extends Management.ConnectionRequestCommon { + strategy: "daccount"; + options?: Management.ConnectionOptionsDaccount; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentDropbox.ts b/src/management/api/types/ConnectionResponseContentDropbox.ts new file mode 100644 index 0000000000..2085ee41f0 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentDropbox.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=dropbox + */ +export interface ConnectionResponseContentDropbox extends Management.ConnectionRequestCommon { + strategy: "dropbox"; + options?: Management.ConnectionOptionsDropbox; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentDwolla.ts b/src/management/api/types/ConnectionResponseContentDwolla.ts new file mode 100644 index 0000000000..f301841f58 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentDwolla.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=dwolla + */ +export interface ConnectionResponseContentDwolla extends Management.ConnectionRequestCommon { + strategy: "dwolla"; + options?: Management.ConnectionOptionsDwolla; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentEmail.ts b/src/management/api/types/ConnectionResponseContentEmail.ts new file mode 100644 index 0000000000..6488b0cbf5 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentEmail.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=email + */ +export interface ConnectionResponseContentEmail extends Management.ConnectionRequestCommon { + strategy: "email"; + options?: Management.ConnectionOptionsEmail; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentEvernote.ts b/src/management/api/types/ConnectionResponseContentEvernote.ts new file mode 100644 index 0000000000..6682863e34 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentEvernote.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=evernote + */ +export interface ConnectionResponseContentEvernote extends Management.ConnectionRequestCommon { + strategy: "evernote"; + options?: Management.ConnectionOptionsEvernote; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentEvernoteSandbox.ts b/src/management/api/types/ConnectionResponseContentEvernoteSandbox.ts new file mode 100644 index 0000000000..f082abbbf4 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentEvernoteSandbox.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=evernote-sandbox + */ +export interface ConnectionResponseContentEvernoteSandbox extends Management.ConnectionRequestCommon { + strategy: "evernote-sandbox"; + options?: Management.ConnectionOptionsEvernoteSandbox; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentExact.ts b/src/management/api/types/ConnectionResponseContentExact.ts new file mode 100644 index 0000000000..22a708bb5a --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentExact.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=exact + */ +export interface ConnectionResponseContentExact extends Management.ConnectionRequestCommon { + strategy: "exact"; + options?: Management.ConnectionOptionsExact; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentFacebook.ts b/src/management/api/types/ConnectionResponseContentFacebook.ts new file mode 100644 index 0000000000..ca89962bf0 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentFacebook.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=facebook + */ +export interface ConnectionResponseContentFacebook extends Management.ConnectionRequestCommon { + strategy: "facebook"; + options?: Management.ConnectionOptionsFacebook; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentFitbit.ts b/src/management/api/types/ConnectionResponseContentFitbit.ts new file mode 100644 index 0000000000..09c1d76d35 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentFitbit.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=fitbit + */ +export interface ConnectionResponseContentFitbit extends Management.ConnectionRequestCommon { + strategy: "fitbit"; + options?: Management.ConnectionOptionsFitbit; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentFlickr.ts b/src/management/api/types/ConnectionResponseContentFlickr.ts new file mode 100644 index 0000000000..fe12e0b994 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentFlickr.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=flickr + */ +export interface ConnectionResponseContentFlickr extends Management.ConnectionRequestCommon { + strategy: "flickr"; + options?: Management.ConnectionOptionsFlickr; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentGitHub.ts b/src/management/api/types/ConnectionResponseContentGitHub.ts new file mode 100644 index 0000000000..c4e77de5fb --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentGitHub.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=github + */ +export interface ConnectionResponseContentGitHub extends Management.ConnectionRequestCommon { + strategy: "github"; + options?: Management.ConnectionOptionsGitHub; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentGoogleApps.ts b/src/management/api/types/ConnectionResponseContentGoogleApps.ts new file mode 100644 index 0000000000..4c46b2c9cf --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentGoogleApps.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=google-apps + */ +export interface ConnectionResponseContentGoogleApps extends Management.ConnectionRequestCommon { + strategy: "google-apps"; + options?: Management.ConnectionOptionsGoogleApps; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentGoogleOAuth2.ts b/src/management/api/types/ConnectionResponseContentGoogleOAuth2.ts new file mode 100644 index 0000000000..ab5c397a27 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentGoogleOAuth2.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=google-oauth2 + */ +export interface ConnectionResponseContentGoogleOAuth2 extends Management.ConnectionRequestCommon { + strategy: "google-oauth2"; + options?: Management.ConnectionOptionsGoogleOAuth2; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentInstagram.ts b/src/management/api/types/ConnectionResponseContentInstagram.ts new file mode 100644 index 0000000000..4db829050b --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentInstagram.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=instagram + */ +export interface ConnectionResponseContentInstagram extends Management.ConnectionRequestCommon { + strategy: "instagram"; + options?: Management.ConnectionOptionsInstagram; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentIp.ts b/src/management/api/types/ConnectionResponseContentIp.ts new file mode 100644 index 0000000000..ca24a7d2c8 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentIp.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=ip + */ +export interface ConnectionResponseContentIp extends Management.ConnectionRequestCommon { + strategy: "ip"; + options?: Management.ConnectionOptionsIp; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentLine.ts b/src/management/api/types/ConnectionResponseContentLine.ts new file mode 100644 index 0000000000..a819abbb29 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentLine.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=line + */ +export interface ConnectionResponseContentLine extends Management.ConnectionRequestCommon { + strategy: "line"; + options?: Management.ConnectionOptionsLine; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentLinkedin.ts b/src/management/api/types/ConnectionResponseContentLinkedin.ts new file mode 100644 index 0000000000..13608c1609 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentLinkedin.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=linkedin + */ +export interface ConnectionResponseContentLinkedin extends Management.ConnectionRequestCommon { + strategy: "linkedin"; + options?: Management.ConnectionOptionsLinkedin; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentMiicard.ts b/src/management/api/types/ConnectionResponseContentMiicard.ts new file mode 100644 index 0000000000..2e4c253cbb --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentMiicard.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=miicard + */ +export interface ConnectionResponseContentMiicard extends Management.ConnectionRequestCommon { + strategy: "miicard"; + options?: Management.ConnectionOptionsMiicard; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentOAuth1.ts b/src/management/api/types/ConnectionResponseContentOAuth1.ts new file mode 100644 index 0000000000..924a634842 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentOAuth1.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=oauth1 + */ +export interface ConnectionResponseContentOAuth1 extends Management.ConnectionRequestCommon { + strategy: "oauth1"; + options?: Management.ConnectionOptionsOAuth1; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentOAuth2.ts b/src/management/api/types/ConnectionResponseContentOAuth2.ts new file mode 100644 index 0000000000..3837999b7d --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentOAuth2.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=oauth2 + */ +export interface ConnectionResponseContentOAuth2 extends Management.ConnectionRequestCommon { + strategy: "oauth2"; + options?: Management.ConnectionOptionsOAuth2; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentOffice365.ts b/src/management/api/types/ConnectionResponseContentOffice365.ts new file mode 100644 index 0000000000..2ff6cf0906 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentOffice365.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=office365 + */ +export interface ConnectionResponseContentOffice365 extends Management.ConnectionRequestCommon { + strategy: "office365"; + options?: Management.ConnectionOptionsOffice365; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentOidc.ts b/src/management/api/types/ConnectionResponseContentOidc.ts new file mode 100644 index 0000000000..7cbee316bc --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentOidc.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=oidc + */ +export interface ConnectionResponseContentOidc extends Management.ConnectionRequestCommon { + strategy: "oidc"; + options?: Management.ConnectionOptionsOidc; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentOkta.ts b/src/management/api/types/ConnectionResponseContentOkta.ts new file mode 100644 index 0000000000..0cc047cf1f --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentOkta.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=okta + */ +export interface ConnectionResponseContentOkta extends Management.ConnectionRequestCommon { + strategy: "okta"; + options?: Management.ConnectionOptionsOkta; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentPaypal.ts b/src/management/api/types/ConnectionResponseContentPaypal.ts new file mode 100644 index 0000000000..8dc1fb8eeb --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentPaypal.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=paypal + */ +export interface ConnectionResponseContentPaypal extends Management.ConnectionRequestCommon { + strategy: "paypal"; + options?: Management.ConnectionOptionsPaypal; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentPaypalSandbox.ts b/src/management/api/types/ConnectionResponseContentPaypalSandbox.ts new file mode 100644 index 0000000000..e53db92271 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentPaypalSandbox.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=paypal-sandbox + */ +export interface ConnectionResponseContentPaypalSandbox extends Management.ConnectionRequestCommon { + strategy: "paypal-sandbox"; + options?: Management.ConnectionOptionsPaypalSandbox; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentPingFederate.ts b/src/management/api/types/ConnectionResponseContentPingFederate.ts new file mode 100644 index 0000000000..19c0766499 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentPingFederate.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=pingfederate + */ +export interface ConnectionResponseContentPingFederate extends Management.ConnectionRequestCommon { + strategy: "pingfederate"; + options?: Management.ConnectionOptionsPingFederate; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentPlanningCenter.ts b/src/management/api/types/ConnectionResponseContentPlanningCenter.ts new file mode 100644 index 0000000000..2465c1de7b --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentPlanningCenter.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=planningcenter + */ +export interface ConnectionResponseContentPlanningCenter extends Management.ConnectionRequestCommon { + strategy: "planningcenter"; + options?: Management.ConnectionOptionsPlanningCenter; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentRenren.ts b/src/management/api/types/ConnectionResponseContentRenren.ts new file mode 100644 index 0000000000..0b8eab1c2e --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentRenren.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=renren + */ +export interface ConnectionResponseContentRenren extends Management.ConnectionRequestCommon { + strategy: "renren"; + options?: Management.ConnectionOptionsRenren; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSalesforce.ts b/src/management/api/types/ConnectionResponseContentSalesforce.ts new file mode 100644 index 0000000000..5b75402476 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSalesforce.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=salesforce + */ +export interface ConnectionResponseContentSalesforce extends Management.ConnectionRequestCommon { + strategy: "salesforce"; + options?: Management.ConnectionOptionsSalesforce; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSalesforceCommunity.ts b/src/management/api/types/ConnectionResponseContentSalesforceCommunity.ts new file mode 100644 index 0000000000..b7926250c2 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSalesforceCommunity.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=salesforce-community + */ +export interface ConnectionResponseContentSalesforceCommunity extends Management.ConnectionRequestCommon { + strategy: "salesforce-community"; + options?: Management.ConnectionOptionsSalesforceCommunity; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSalesforceSandbox.ts b/src/management/api/types/ConnectionResponseContentSalesforceSandbox.ts new file mode 100644 index 0000000000..1271b0e6fa --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSalesforceSandbox.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=salesforce-sandbox + */ +export interface ConnectionResponseContentSalesforceSandbox extends Management.ConnectionRequestCommon { + strategy: "salesforce-sandbox"; + options?: Management.ConnectionOptionsSalesforceSandbox; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSaml.ts b/src/management/api/types/ConnectionResponseContentSaml.ts new file mode 100644 index 0000000000..6de56326bc --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSaml.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=samlp + */ +export interface ConnectionResponseContentSaml extends Management.ConnectionRequestCommon { + strategy: "samlp"; + options?: Management.ConnectionOptionsSaml; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSharepoint.ts b/src/management/api/types/ConnectionResponseContentSharepoint.ts new file mode 100644 index 0000000000..e283661ecf --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSharepoint.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=sharepoint + */ +export interface ConnectionResponseContentSharepoint extends Management.ConnectionRequestCommon { + strategy: "sharepoint"; + options?: Management.ConnectionOptionsSharepoint; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentShop.ts b/src/management/api/types/ConnectionResponseContentShop.ts new file mode 100644 index 0000000000..6097ca49ff --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentShop.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=shop + */ +export interface ConnectionResponseContentShop extends Management.ConnectionRequestCommon { + strategy: "shop"; + options?: Management.ConnectionOptionsShop; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentShopify.ts b/src/management/api/types/ConnectionResponseContentShopify.ts new file mode 100644 index 0000000000..0d183a8b19 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentShopify.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=shopify + */ +export interface ConnectionResponseContentShopify extends Management.ConnectionRequestCommon { + strategy: "shopify"; + options?: Management.ConnectionOptionsShopify; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSms.ts b/src/management/api/types/ConnectionResponseContentSms.ts new file mode 100644 index 0000000000..66b616d077 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSms.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=sms + */ +export interface ConnectionResponseContentSms extends Management.ConnectionRequestCommon { + strategy: "sms"; + options?: Management.ConnectionOptionsSms; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentSoundcloud.ts b/src/management/api/types/ConnectionResponseContentSoundcloud.ts new file mode 100644 index 0000000000..3938999310 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentSoundcloud.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=soundcloud + */ +export interface ConnectionResponseContentSoundcloud extends Management.ConnectionRequestCommon { + strategy: "soundcloud"; + options?: Management.ConnectionOptionsSoundcloud; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentTheCity.ts b/src/management/api/types/ConnectionResponseContentTheCity.ts new file mode 100644 index 0000000000..f16b553689 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentTheCity.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=thecity + */ +export interface ConnectionResponseContentTheCity extends Management.ConnectionRequestCommon { + strategy: "thecity"; + options?: Management.ConnectionOptionsTheCity; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentTheCitySandbox.ts b/src/management/api/types/ConnectionResponseContentTheCitySandbox.ts new file mode 100644 index 0000000000..30b156f4f2 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentTheCitySandbox.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=thecity-sandbox + */ +export interface ConnectionResponseContentTheCitySandbox extends Management.ConnectionRequestCommon { + strategy: "thecity-sandbox"; + options?: Management.ConnectionOptionsTheCitySandbox; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentThirtySevenSignals.ts b/src/management/api/types/ConnectionResponseContentThirtySevenSignals.ts new file mode 100644 index 0000000000..ce5ccc9628 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentThirtySevenSignals.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=thirtysevensignals + */ +export interface ConnectionResponseContentThirtySevenSignals extends Management.ConnectionRequestCommon { + strategy: "thirtysevensignals"; + options?: Management.ConnectionOptionsThirtySevenSignals; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentTwitter.ts b/src/management/api/types/ConnectionResponseContentTwitter.ts new file mode 100644 index 0000000000..780a9ca28a --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentTwitter.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=twitter + */ +export interface ConnectionResponseContentTwitter extends Management.ConnectionRequestCommon { + strategy: "twitter"; + options?: Management.ConnectionOptionsTwitter; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentUntappd.ts b/src/management/api/types/ConnectionResponseContentUntappd.ts new file mode 100644 index 0000000000..66a594680c --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentUntappd.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=untappd + */ +export interface ConnectionResponseContentUntappd extends Management.ConnectionRequestCommon { + strategy: "untappd"; + options?: Management.ConnectionOptionsUntappd; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentVkontakte.ts b/src/management/api/types/ConnectionResponseContentVkontakte.ts new file mode 100644 index 0000000000..1065e23671 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentVkontakte.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=vkontakte + */ +export interface ConnectionResponseContentVkontakte extends Management.ConnectionRequestCommon { + strategy: "vkontakte"; + options?: Management.ConnectionOptionsVkontakte; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentWeibo.ts b/src/management/api/types/ConnectionResponseContentWeibo.ts new file mode 100644 index 0000000000..285062910e --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentWeibo.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=weibo + */ +export interface ConnectionResponseContentWeibo extends Management.ConnectionRequestCommon { + strategy: "weibo"; + options?: Management.ConnectionOptionsWeibo; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentWindowsLive.ts b/src/management/api/types/ConnectionResponseContentWindowsLive.ts new file mode 100644 index 0000000000..f74ff5fdf8 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentWindowsLive.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=windowslive + */ +export interface ConnectionResponseContentWindowsLive extends Management.ConnectionRequestCommon { + strategy: "windowslive"; + options?: Management.ConnectionOptionsWindowsLive; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentWordpress.ts b/src/management/api/types/ConnectionResponseContentWordpress.ts new file mode 100644 index 0000000000..0c8c83ae12 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentWordpress.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=wordpress + */ +export interface ConnectionResponseContentWordpress extends Management.ConnectionRequestCommon { + strategy: "wordpress"; + options?: Management.ConnectionOptionsWordpress; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentYahoo.ts b/src/management/api/types/ConnectionResponseContentYahoo.ts new file mode 100644 index 0000000000..a5c82fc21e --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentYahoo.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=yahoo + */ +export interface ConnectionResponseContentYahoo extends Management.ConnectionRequestCommon { + strategy: "yahoo"; + options?: Management.ConnectionOptionsYahoo; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentYammer.ts b/src/management/api/types/ConnectionResponseContentYammer.ts new file mode 100644 index 0000000000..23b2154b6b --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentYammer.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=yammer + */ +export interface ConnectionResponseContentYammer extends Management.ConnectionRequestCommon { + strategy: "yammer"; + options?: Management.ConnectionOptionsYammer; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionResponseContentYandex.ts b/src/management/api/types/ConnectionResponseContentYandex.ts new file mode 100644 index 0000000000..4299457e45 --- /dev/null +++ b/src/management/api/types/ConnectionResponseContentYandex.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Response for connections with strategy=yandex + */ +export interface ConnectionResponseContentYandex extends Management.ConnectionRequestCommon { + strategy: "yandex"; + options?: Management.ConnectionOptionsYandex; + id?: Management.ConnectionId; + name?: Management.ConnectionName; +} diff --git a/src/management/api/types/ConnectionSetUserRootAttributesEnum.ts b/src/management/api/types/ConnectionSetUserRootAttributesEnum.ts index 98f4c57265..aa13940f4c 100644 --- a/src/management/api/types/ConnectionSetUserRootAttributesEnum.ts +++ b/src/management/api/types/ConnectionSetUserRootAttributesEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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 type ConnectionSetUserRootAttributesEnum = "on_each_login" | "on_first_login" | "never_on_login"; +/** 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 = { OnEachLogin: "on_each_login", OnFirstLogin: "on_first_login", NeverOnLogin: "never_on_login", } as const; +export type ConnectionSetUserRootAttributesEnum = + (typeof ConnectionSetUserRootAttributesEnum)[keyof typeof ConnectionSetUserRootAttributesEnum]; diff --git a/src/management/api/types/ConnectionShowAsButton.ts b/src/management/api/types/ConnectionShowAsButton.ts new file mode 100644 index 0000000000..fb1fa7146d --- /dev/null +++ b/src/management/api/types/ConnectionShowAsButton.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * 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; diff --git a/src/management/api/types/ConnectionStrategyEnum.ts b/src/management/api/types/ConnectionStrategyEnum.ts index 0075894d57..5b2c00679a 100644 --- a/src/management/api/types/ConnectionStrategyEnum.ts +++ b/src/management/api/types/ConnectionStrategyEnum.ts @@ -1,71 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ConnectionStrategyEnum = - | "ad" - | "adfs" - | "amazon" - | "apple" - | "dropbox" - | "bitbucket" - | "aol" - | "auth0-oidc" - | "auth0" - | "baidu" - | "bitly" - | "box" - | "custom" - | "daccount" - | "dwolla" - | "email" - | "evernote-sandbox" - | "evernote" - | "exact" - | "facebook" - | "fitbit" - | "flickr" - | "github" - | "google-apps" - | "google-oauth2" - | "instagram" - | "ip" - | "line" - | "linkedin" - | "miicard" - | "oauth1" - | "oauth2" - | "office365" - | "oidc" - | "okta" - | "paypal" - | "paypal-sandbox" - | "pingfederate" - | "planningcenter" - | "renren" - | "salesforce-community" - | "salesforce-sandbox" - | "salesforce" - | "samlp" - | "sharepoint" - | "shopify" - | "shop" - | "sms" - | "soundcloud" - | "thecity-sandbox" - | "thecity" - | "thirtysevensignals" - | "twitter" - | "untappd" - | "vkontakte" - | "waad" - | "weibo" - | "windowslive" - | "wordpress" - | "yahoo" - | "yammer" - | "yandex" - | "auth0-adldap"; export const ConnectionStrategyEnum = { Ad: "ad", Adfs: "adfs", @@ -131,3 +65,4 @@ export const ConnectionStrategyEnum = { Yandex: "yandex", Auth0Adldap: "auth0-adldap", } as const; +export type ConnectionStrategyEnum = (typeof ConnectionStrategyEnum)[keyof typeof ConnectionStrategyEnum]; diff --git a/src/management/api/types/ConnectionUpstreamAdditionalProperties.ts b/src/management/api/types/ConnectionUpstreamAdditionalProperties.ts index 2c54ffaf9c..58be246b6e 100644 --- a/src/management/api/types/ConnectionUpstreamAdditionalProperties.ts +++ b/src/management/api/types/ConnectionUpstreamAdditionalProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ConnectionUpstreamAlias.ts b/src/management/api/types/ConnectionUpstreamAlias.ts index 0442b48556..e1bf7d5f2e 100644 --- a/src/management/api/types/ConnectionUpstreamAlias.ts +++ b/src/management/api/types/ConnectionUpstreamAlias.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ConnectionUpstreamAliasEnum.ts b/src/management/api/types/ConnectionUpstreamAliasEnum.ts index b4262e7e51..2a6879a989 100644 --- a/src/management/api/types/ConnectionUpstreamAliasEnum.ts +++ b/src/management/api/types/ConnectionUpstreamAliasEnum.ts @@ -1,20 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ConnectionUpstreamAliasEnum = - | "acr_values" - | "audience" - | "client_id" - | "display" - | "id_token_hint" - | "login_hint" - | "max_age" - | "prompt" - | "resource" - | "response_mode" - | "response_type" - | "ui_locales"; export const ConnectionUpstreamAliasEnum = { AcrValues: "acr_values", Audience: "audience", @@ -29,3 +14,5 @@ export const ConnectionUpstreamAliasEnum = { ResponseType: "response_type", UiLocales: "ui_locales", } as const; +export type ConnectionUpstreamAliasEnum = + (typeof ConnectionUpstreamAliasEnum)[keyof typeof ConnectionUpstreamAliasEnum]; diff --git a/src/management/api/types/ConnectionUpstreamParams.ts b/src/management/api/types/ConnectionUpstreamParams.ts index a7df544818..9fe5867817 100644 --- a/src/management/api/types/ConnectionUpstreamParams.ts +++ b/src/management/api/types/ConnectionUpstreamParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -8,5 +6,5 @@ import * as Management from "../index.js"; * Options for adding parameters in the request to the upstream IdP */ export type ConnectionUpstreamParams = - | Record + | (Record | null) | undefined; diff --git a/src/management/api/types/ConnectionUpstreamValue.ts b/src/management/api/types/ConnectionUpstreamValue.ts index 09ab24c0f9..945ab939ef 100644 --- a/src/management/api/types/ConnectionUpstreamValue.ts +++ b/src/management/api/types/ConnectionUpstreamValue.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ConnectionUpstreamValue { value?: string; diff --git a/src/management/api/types/ConnectionUsernameValidationOptions.ts b/src/management/api/types/ConnectionUsernameValidationOptions.ts index 7408963be0..1f90a1e63e 100644 --- a/src/management/api/types/ConnectionUsernameValidationOptions.ts +++ b/src/management/api/types/ConnectionUsernameValidationOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ConnectionUsernameValidationOptions { min: number; diff --git a/src/management/api/types/ConnectionValidationOptions.ts b/src/management/api/types/ConnectionValidationOptions.ts index 1c57945773..a2bef28065 100644 --- a/src/management/api/types/ConnectionValidationOptions.ts +++ b/src/management/api/types/ConnectionValidationOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -8,5 +6,5 @@ import * as Management from "../index.js"; * Options for validation */ export interface ConnectionValidationOptions { - username?: Management.ConnectionUsernameValidationOptions; + username?: Management.ConnectionUsernameValidationOptions | null; } diff --git a/src/management/api/types/ConnectionsMetadata.ts b/src/management/api/types/ConnectionsMetadata.ts index 17094ba005..d51e73541c 100644 --- a/src/management/api/types/ConnectionsMetadata.ts +++ b/src/management/api/types/ConnectionsMetadata.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. */ -export type ConnectionsMetadata = Record; +export type ConnectionsMetadata = Record; diff --git a/src/management/api/types/CreateActionResponseContent.ts b/src/management/api/types/CreateActionResponseContent.ts index 3e7ac56838..070627847f 100644 --- a/src/management/api/types/CreateActionResponseContent.ts +++ b/src/management/api/types/CreateActionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateBrandingPhoneProviderResponseContent.ts b/src/management/api/types/CreateBrandingPhoneProviderResponseContent.ts index f077a43e24..a0e867e900 100644 --- a/src/management/api/types/CreateBrandingPhoneProviderResponseContent.ts +++ b/src/management/api/types/CreateBrandingPhoneProviderResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateBrandingThemeResponseContent.ts b/src/management/api/types/CreateBrandingThemeResponseContent.ts index 49c1e6549d..e3ffab8f2f 100644 --- a/src/management/api/types/CreateBrandingThemeResponseContent.ts +++ b/src/management/api/types/CreateBrandingThemeResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateClientGrantResponseContent.ts b/src/management/api/types/CreateClientGrantResponseContent.ts index 6413933e72..4fd6566c2b 100644 --- a/src/management/api/types/CreateClientGrantResponseContent.ts +++ b/src/management/api/types/CreateClientGrantResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateClientResponseContent.ts b/src/management/api/types/CreateClientResponseContent.ts index cacb1483d9..14fad8f9ca 100644 --- a/src/management/api/types/CreateClientResponseContent.ts +++ b/src/management/api/types/CreateClientResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -36,13 +34,13 @@ export interface CreateClientResponseContent { allowed_clients?: string[]; /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ allowed_logout_urls?: string[]; - session_transfer?: Management.ClientSessionTransferConfiguration; + session_transfer?: Management.ClientSessionTransferConfiguration | null; oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ grant_types?: string[]; jwt_configuration?: Management.ClientJwtConfiguration; signing_keys?: Management.ClientSigningKeys; - encryption_key?: Management.ClientEncryptionKey; + encryption_key?: Management.ClientEncryptionKey | null; /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ sso?: boolean; /** Whether Single Sign On is disabled (true) or enabled (true). Defaults to true. */ @@ -61,29 +59,37 @@ export interface CreateClientResponseContent { form_template?: string; addons?: Management.ClientAddons; token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; client_metadata?: Management.ClientMetadata; mobile?: Management.ClientMobile; /** Initiate login uri, must be https */ initiate_login_uri?: string; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; organization_usage?: Management.ClientOrganizationUsageEnum; organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientAuthenticationMethod; + client_authentication_methods?: Management.ClientAuthenticationMethod | null; /** Makes the use of Pushed Authorization Requests mandatory for this client */ require_pushed_authorization_requests?: boolean; /** Makes the use of Proof-of-Possession mandatory for this client */ require_proof_of_possession?: boolean; signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean; /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; + par_request_expiry?: number | null; token_quota?: Management.TokenQuota; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; /** The identifier of the resource server that this client is linked to. */ resource_server_identifier?: string; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPostConfiguration; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/CreateConnectionRequestContentAd.ts b/src/management/api/types/CreateConnectionRequestContentAd.ts new file mode 100644 index 0000000000..8ed11591f9 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAd.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=ad + */ +export interface CreateConnectionRequestContentAd extends Management.ConnectionRequestCommon { + strategy: "ad"; + options?: Management.ConnectionOptionsAd; +} diff --git a/src/management/api/types/CreateConnectionRequestContentAdfs.ts b/src/management/api/types/CreateConnectionRequestContentAdfs.ts new file mode 100644 index 0000000000..23bca1e646 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAdfs.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=adfs + */ +export interface CreateConnectionRequestContentAdfs extends Management.ConnectionRequestCommon { + strategy: "adfs"; + options?: Management.ConnectionOptionsAdfs; +} diff --git a/src/management/api/types/CreateConnectionRequestContentAmazon.ts b/src/management/api/types/CreateConnectionRequestContentAmazon.ts new file mode 100644 index 0000000000..d4b40759f2 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAmazon.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=amazon + */ +export interface CreateConnectionRequestContentAmazon extends Management.ConnectionRequestCommon { + strategy: "amazon"; + options?: Management.ConnectionOptionsAmazon; +} diff --git a/src/management/api/types/CreateConnectionRequestContentAol.ts b/src/management/api/types/CreateConnectionRequestContentAol.ts new file mode 100644 index 0000000000..64cfddbc35 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAol.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=aol + */ +export interface CreateConnectionRequestContentAol extends Management.ConnectionRequestCommon { + strategy: "aol"; + options?: Management.ConnectionOptionsAol; +} diff --git a/src/management/api/types/CreateConnectionRequestContentApple.ts b/src/management/api/types/CreateConnectionRequestContentApple.ts new file mode 100644 index 0000000000..8ce74b2b5c --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentApple.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=apple + */ +export interface CreateConnectionRequestContentApple extends Management.ConnectionRequestCommon { + strategy: "apple"; + options?: Management.ConnectionOptionsApple; +} diff --git a/src/management/api/types/CreateConnectionRequestContentAuth0.ts b/src/management/api/types/CreateConnectionRequestContentAuth0.ts new file mode 100644 index 0000000000..8e79da5556 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAuth0.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=auth0 + */ +export interface CreateConnectionRequestContentAuth0 extends Management.ConnectionRequestCommon { + strategy: "auth0"; + options?: Management.ConnectionOptionsAuth0; +} diff --git a/src/management/api/types/CreateConnectionRequestContentAuth0Oidc.ts b/src/management/api/types/CreateConnectionRequestContentAuth0Oidc.ts new file mode 100644 index 0000000000..2d71c4e08a --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAuth0Oidc.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=auth0-oidc + */ +export interface CreateConnectionRequestContentAuth0Oidc extends Management.ConnectionRequestCommon { + strategy: "auth0-oidc"; + options?: Management.ConnectionOptionsAuth0Oidc; +} diff --git a/src/management/api/types/CreateConnectionRequestContentAzureAd.ts b/src/management/api/types/CreateConnectionRequestContentAzureAd.ts new file mode 100644 index 0000000000..0ba4fe84b0 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentAzureAd.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=waad + */ +export interface CreateConnectionRequestContentAzureAd extends Management.ConnectionRequestCommon { + strategy: "waad"; + options?: Management.ConnectionOptionsAzureAd; +} diff --git a/src/management/api/types/CreateConnectionRequestContentBaidu.ts b/src/management/api/types/CreateConnectionRequestContentBaidu.ts new file mode 100644 index 0000000000..1d0a05282a --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentBaidu.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=baidu + */ +export interface CreateConnectionRequestContentBaidu extends Management.ConnectionRequestCommon { + strategy: "baidu"; + options?: Management.ConnectionOptionsBaidu; +} diff --git a/src/management/api/types/CreateConnectionRequestContentBitbucket.ts b/src/management/api/types/CreateConnectionRequestContentBitbucket.ts new file mode 100644 index 0000000000..512fc51309 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentBitbucket.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=bitbucket + */ +export interface CreateConnectionRequestContentBitbucket extends Management.ConnectionRequestCommon { + strategy: "bitbucket"; + options?: Management.ConnectionOptionsBitbucket; +} diff --git a/src/management/api/types/CreateConnectionRequestContentBitly.ts b/src/management/api/types/CreateConnectionRequestContentBitly.ts new file mode 100644 index 0000000000..4e40af5d02 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentBitly.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=bitly + */ +export interface CreateConnectionRequestContentBitly extends Management.ConnectionRequestCommon { + strategy: "bitly"; + options?: Management.ConnectionOptionsBitly; +} diff --git a/src/management/api/types/CreateConnectionRequestContentBox.ts b/src/management/api/types/CreateConnectionRequestContentBox.ts new file mode 100644 index 0000000000..548b9d8db8 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentBox.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=box + */ +export interface CreateConnectionRequestContentBox extends Management.ConnectionRequestCommon { + strategy: "box"; + options?: Management.ConnectionOptionsBox; +} diff --git a/src/management/api/types/CreateConnectionRequestContentCustom.ts b/src/management/api/types/CreateConnectionRequestContentCustom.ts new file mode 100644 index 0000000000..03cb8482b8 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentCustom.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=custom + */ +export interface CreateConnectionRequestContentCustom extends Management.ConnectionRequestCommon { + strategy: "custom"; + options?: Management.ConnectionOptionsCustom; +} diff --git a/src/management/api/types/CreateConnectionRequestContentDaccount.ts b/src/management/api/types/CreateConnectionRequestContentDaccount.ts new file mode 100644 index 0000000000..2c0125ba5e --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentDaccount.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=daccount + */ +export interface CreateConnectionRequestContentDaccount extends Management.ConnectionRequestCommon { + strategy: "daccount"; + options?: Management.ConnectionOptionsDaccount; +} diff --git a/src/management/api/types/CreateConnectionRequestContentDropbox.ts b/src/management/api/types/CreateConnectionRequestContentDropbox.ts new file mode 100644 index 0000000000..35e40c317f --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentDropbox.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=dropbox + */ +export interface CreateConnectionRequestContentDropbox extends Management.ConnectionRequestCommon { + strategy: "dropbox"; + options?: Management.ConnectionOptionsDropbox; +} diff --git a/src/management/api/types/CreateConnectionRequestContentDwolla.ts b/src/management/api/types/CreateConnectionRequestContentDwolla.ts new file mode 100644 index 0000000000..15a350fba7 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentDwolla.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=dwolla + */ +export interface CreateConnectionRequestContentDwolla extends Management.ConnectionRequestCommon { + strategy: "dwolla"; + options?: Management.ConnectionOptionsDwolla; +} diff --git a/src/management/api/types/CreateConnectionRequestContentEmail.ts b/src/management/api/types/CreateConnectionRequestContentEmail.ts new file mode 100644 index 0000000000..3dfe492504 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentEmail.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=email + */ +export interface CreateConnectionRequestContentEmail extends Management.ConnectionRequestCommon { + strategy: "email"; + options?: Management.ConnectionOptionsEmail; +} diff --git a/src/management/api/types/CreateConnectionRequestContentEvernote.ts b/src/management/api/types/CreateConnectionRequestContentEvernote.ts new file mode 100644 index 0000000000..1c6be176b6 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentEvernote.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=evernote + */ +export interface CreateConnectionRequestContentEvernote extends Management.ConnectionRequestCommon { + strategy: "evernote"; + options?: Management.ConnectionOptionsEvernote; +} diff --git a/src/management/api/types/CreateConnectionRequestContentEvernoteSandbox.ts b/src/management/api/types/CreateConnectionRequestContentEvernoteSandbox.ts new file mode 100644 index 0000000000..937a4f1d4c --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentEvernoteSandbox.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=evernote-sandbox + */ +export interface CreateConnectionRequestContentEvernoteSandbox extends Management.ConnectionRequestCommon { + strategy: "evernote-sandbox"; + options?: Management.ConnectionOptionsEvernoteSandbox; +} diff --git a/src/management/api/types/CreateConnectionRequestContentExact.ts b/src/management/api/types/CreateConnectionRequestContentExact.ts new file mode 100644 index 0000000000..4ddbd250e0 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentExact.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=exact + */ +export interface CreateConnectionRequestContentExact extends Management.ConnectionRequestCommon { + strategy: "exact"; + options?: Management.ConnectionOptionsExact; +} diff --git a/src/management/api/types/CreateConnectionRequestContentFacebook.ts b/src/management/api/types/CreateConnectionRequestContentFacebook.ts new file mode 100644 index 0000000000..9caba98f23 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentFacebook.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=facebook + */ +export interface CreateConnectionRequestContentFacebook extends Management.ConnectionRequestCommon { + strategy: "facebook"; + options?: Management.ConnectionOptionsFacebook; +} diff --git a/src/management/api/types/CreateConnectionRequestContentFitbit.ts b/src/management/api/types/CreateConnectionRequestContentFitbit.ts new file mode 100644 index 0000000000..9b02d6b5a8 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentFitbit.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=fitbit + */ +export interface CreateConnectionRequestContentFitbit extends Management.ConnectionRequestCommon { + strategy: "fitbit"; + options?: Management.ConnectionOptionsFitbit; +} diff --git a/src/management/api/types/CreateConnectionRequestContentFlickr.ts b/src/management/api/types/CreateConnectionRequestContentFlickr.ts new file mode 100644 index 0000000000..f276d828d7 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentFlickr.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=flickr + */ +export interface CreateConnectionRequestContentFlickr extends Management.ConnectionRequestCommon { + strategy: "flickr"; + options?: Management.ConnectionOptionsFlickr; +} diff --git a/src/management/api/types/CreateConnectionRequestContentGitHub.ts b/src/management/api/types/CreateConnectionRequestContentGitHub.ts new file mode 100644 index 0000000000..b19efb6266 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentGitHub.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=github + */ +export interface CreateConnectionRequestContentGitHub extends Management.ConnectionRequestCommon { + strategy: "github"; + options?: Management.ConnectionOptionsGitHub; +} diff --git a/src/management/api/types/CreateConnectionRequestContentGoogleApps.ts b/src/management/api/types/CreateConnectionRequestContentGoogleApps.ts new file mode 100644 index 0000000000..75c9b0396c --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentGoogleApps.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=google-apps + */ +export interface CreateConnectionRequestContentGoogleApps extends Management.ConnectionRequestCommon { + strategy: "google-apps"; + options?: Management.ConnectionOptionsGoogleApps; +} diff --git a/src/management/api/types/CreateConnectionRequestContentGoogleOAuth2.ts b/src/management/api/types/CreateConnectionRequestContentGoogleOAuth2.ts new file mode 100644 index 0000000000..50c5d7a6f5 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentGoogleOAuth2.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=google-oauth2 + */ +export interface CreateConnectionRequestContentGoogleOAuth2 extends Management.ConnectionRequestCommon { + strategy: "google-oauth2"; + options?: Management.ConnectionOptionsGoogleOAuth2; +} diff --git a/src/management/api/types/CreateConnectionRequestContentInstagram.ts b/src/management/api/types/CreateConnectionRequestContentInstagram.ts new file mode 100644 index 0000000000..acffaa8f95 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentInstagram.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=instagram + */ +export interface CreateConnectionRequestContentInstagram extends Management.ConnectionRequestCommon { + strategy: "instagram"; + options?: Management.ConnectionOptionsInstagram; +} diff --git a/src/management/api/types/CreateConnectionRequestContentIp.ts b/src/management/api/types/CreateConnectionRequestContentIp.ts new file mode 100644 index 0000000000..782f3e1473 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentIp.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=ip + */ +export interface CreateConnectionRequestContentIp extends Management.ConnectionRequestCommon { + strategy: "ip"; + options?: Management.ConnectionOptionsIp; +} diff --git a/src/management/api/types/CreateConnectionRequestContentLine.ts b/src/management/api/types/CreateConnectionRequestContentLine.ts new file mode 100644 index 0000000000..2b82743e6b --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentLine.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=line + */ +export interface CreateConnectionRequestContentLine extends Management.ConnectionRequestCommon { + strategy: "line"; + options?: Management.ConnectionOptionsLine; +} diff --git a/src/management/api/types/CreateConnectionRequestContentLinkedin.ts b/src/management/api/types/CreateConnectionRequestContentLinkedin.ts new file mode 100644 index 0000000000..4ae00128f0 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentLinkedin.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=linkedin + */ +export interface CreateConnectionRequestContentLinkedin extends Management.ConnectionRequestCommon { + strategy: "linkedin"; + options?: Management.ConnectionOptionsLinkedin; +} diff --git a/src/management/api/types/CreateConnectionRequestContentMiicard.ts b/src/management/api/types/CreateConnectionRequestContentMiicard.ts new file mode 100644 index 0000000000..2ba0ca11b5 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentMiicard.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=miicard + */ +export interface CreateConnectionRequestContentMiicard extends Management.ConnectionRequestCommon { + strategy: "miicard"; + options?: Management.ConnectionOptionsMiicard; +} diff --git a/src/management/api/types/CreateConnectionRequestContentOAuth1.ts b/src/management/api/types/CreateConnectionRequestContentOAuth1.ts new file mode 100644 index 0000000000..a2f5a3eaf4 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentOAuth1.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=oauth1 + */ +export interface CreateConnectionRequestContentOAuth1 extends Management.ConnectionRequestCommon { + strategy: "oauth1"; + options?: Management.ConnectionOptionsOAuth1; +} diff --git a/src/management/api/types/CreateConnectionRequestContentOAuth2.ts b/src/management/api/types/CreateConnectionRequestContentOAuth2.ts new file mode 100644 index 0000000000..7dbd0481b4 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentOAuth2.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=oauth2 + */ +export interface CreateConnectionRequestContentOAuth2 extends Management.ConnectionRequestCommon { + strategy: "oauth2"; + options?: Management.ConnectionOptionsOAuth2; +} diff --git a/src/management/api/types/CreateConnectionRequestContentOffice365.ts b/src/management/api/types/CreateConnectionRequestContentOffice365.ts new file mode 100644 index 0000000000..b4500fae0b --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentOffice365.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=office365 + */ +export interface CreateConnectionRequestContentOffice365 extends Management.ConnectionRequestCommon { + strategy: "office365"; + options?: Management.ConnectionOptionsOffice365; +} diff --git a/src/management/api/types/CreateConnectionRequestContentOidc.ts b/src/management/api/types/CreateConnectionRequestContentOidc.ts new file mode 100644 index 0000000000..f918ec35d0 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentOidc.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=oidc + */ +export interface CreateConnectionRequestContentOidc extends Management.ConnectionRequestCommon { + strategy: "oidc"; + options?: Management.ConnectionOptionsOidc; +} diff --git a/src/management/api/types/CreateConnectionRequestContentOkta.ts b/src/management/api/types/CreateConnectionRequestContentOkta.ts new file mode 100644 index 0000000000..050bcff152 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentOkta.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=okta + */ +export interface CreateConnectionRequestContentOkta extends Management.ConnectionRequestCommon { + strategy: "okta"; + options?: Management.ConnectionOptionsOkta; +} diff --git a/src/management/api/types/CreateConnectionRequestContentPaypal.ts b/src/management/api/types/CreateConnectionRequestContentPaypal.ts new file mode 100644 index 0000000000..325e4188f7 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentPaypal.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=paypal + */ +export interface CreateConnectionRequestContentPaypal extends Management.ConnectionRequestCommon { + strategy: "paypal"; + options?: Management.ConnectionOptionsPaypal; +} diff --git a/src/management/api/types/CreateConnectionRequestContentPaypalSandbox.ts b/src/management/api/types/CreateConnectionRequestContentPaypalSandbox.ts new file mode 100644 index 0000000000..f2e8985c8b --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentPaypalSandbox.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=paypal-sandbox + */ +export interface CreateConnectionRequestContentPaypalSandbox extends Management.ConnectionRequestCommon { + strategy: "paypal-sandbox"; + options?: Management.ConnectionOptionsPaypalSandbox; +} diff --git a/src/management/api/types/CreateConnectionRequestContentPingFederate.ts b/src/management/api/types/CreateConnectionRequestContentPingFederate.ts new file mode 100644 index 0000000000..f947750efe --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentPingFederate.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=pingfederate + */ +export interface CreateConnectionRequestContentPingFederate extends Management.ConnectionRequestCommon { + strategy: "pingfederate"; + options?: Management.ConnectionOptionsPingFederate; +} diff --git a/src/management/api/types/CreateConnectionRequestContentPlanningCenter.ts b/src/management/api/types/CreateConnectionRequestContentPlanningCenter.ts new file mode 100644 index 0000000000..f560198004 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentPlanningCenter.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=planningcenter + */ +export interface CreateConnectionRequestContentPlanningCenter extends Management.ConnectionRequestCommon { + strategy: "planningcenter"; + options?: Management.ConnectionOptionsPlanningCenter; +} diff --git a/src/management/api/types/CreateConnectionRequestContentRenren.ts b/src/management/api/types/CreateConnectionRequestContentRenren.ts new file mode 100644 index 0000000000..09267621f3 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentRenren.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=renren + */ +export interface CreateConnectionRequestContentRenren extends Management.ConnectionRequestCommon { + strategy: "renren"; + options?: Management.ConnectionOptionsRenren; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSalesforce.ts b/src/management/api/types/CreateConnectionRequestContentSalesforce.ts new file mode 100644 index 0000000000..6d98779202 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSalesforce.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=salesforce + */ +export interface CreateConnectionRequestContentSalesforce extends Management.ConnectionRequestCommon { + strategy: "salesforce"; + options?: Management.ConnectionOptionsSalesforce; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSalesforceCommunity.ts b/src/management/api/types/CreateConnectionRequestContentSalesforceCommunity.ts new file mode 100644 index 0000000000..cafa90346a --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSalesforceCommunity.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=salesforce-community + */ +export interface CreateConnectionRequestContentSalesforceCommunity extends Management.ConnectionRequestCommon { + strategy: "salesforce-community"; + options?: Management.ConnectionOptionsSalesforceCommunity; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSalesforceSandbox.ts b/src/management/api/types/CreateConnectionRequestContentSalesforceSandbox.ts new file mode 100644 index 0000000000..1603ca0db3 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSalesforceSandbox.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=salesforce-sandbox + */ +export interface CreateConnectionRequestContentSalesforceSandbox extends Management.ConnectionRequestCommon { + strategy: "salesforce-sandbox"; + options?: Management.ConnectionOptionsSalesforceSandbox; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSaml.ts b/src/management/api/types/CreateConnectionRequestContentSaml.ts new file mode 100644 index 0000000000..09949f6fa1 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSaml.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=samlp + */ +export interface CreateConnectionRequestContentSaml extends Management.ConnectionRequestCommon { + strategy: "samlp"; + options?: Management.ConnectionOptionsSaml; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSharepoint.ts b/src/management/api/types/CreateConnectionRequestContentSharepoint.ts new file mode 100644 index 0000000000..5d6b45838f --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSharepoint.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=sharepoint + */ +export interface CreateConnectionRequestContentSharepoint extends Management.ConnectionRequestCommon { + strategy: "sharepoint"; + options?: Management.ConnectionOptionsSharepoint; +} diff --git a/src/management/api/types/CreateConnectionRequestContentShop.ts b/src/management/api/types/CreateConnectionRequestContentShop.ts new file mode 100644 index 0000000000..a9c2c359a8 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentShop.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=shop + */ +export interface CreateConnectionRequestContentShop extends Management.ConnectionRequestCommon { + strategy: "shop"; + options?: Management.ConnectionOptionsShop; +} diff --git a/src/management/api/types/CreateConnectionRequestContentShopify.ts b/src/management/api/types/CreateConnectionRequestContentShopify.ts new file mode 100644 index 0000000000..0bf069aeaa --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentShopify.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=shopify + */ +export interface CreateConnectionRequestContentShopify extends Management.ConnectionRequestCommon { + strategy: "shopify"; + options?: Management.ConnectionOptionsShopify; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSms.ts b/src/management/api/types/CreateConnectionRequestContentSms.ts new file mode 100644 index 0000000000..5f1515af44 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSms.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=sms + */ +export interface CreateConnectionRequestContentSms extends Management.ConnectionRequestCommon { + strategy: "sms"; + options?: Management.ConnectionOptionsSms; +} diff --git a/src/management/api/types/CreateConnectionRequestContentSoundcloud.ts b/src/management/api/types/CreateConnectionRequestContentSoundcloud.ts new file mode 100644 index 0000000000..a829fda84b --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentSoundcloud.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=soundcloud + */ +export interface CreateConnectionRequestContentSoundcloud extends Management.ConnectionRequestCommon { + strategy: "soundcloud"; + options?: Management.ConnectionOptionsSoundcloud; +} diff --git a/src/management/api/types/CreateConnectionRequestContentTheCity.ts b/src/management/api/types/CreateConnectionRequestContentTheCity.ts new file mode 100644 index 0000000000..307c7fc2f1 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentTheCity.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=thecity + */ +export interface CreateConnectionRequestContentTheCity extends Management.ConnectionRequestCommon { + strategy: "thecity"; + options?: Management.ConnectionOptionsTheCity; +} diff --git a/src/management/api/types/CreateConnectionRequestContentTheCitySandbox.ts b/src/management/api/types/CreateConnectionRequestContentTheCitySandbox.ts new file mode 100644 index 0000000000..9b65a1c580 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentTheCitySandbox.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=thecity-sandbox + */ +export interface CreateConnectionRequestContentTheCitySandbox extends Management.ConnectionRequestCommon { + strategy: "thecity-sandbox"; + options?: Management.ConnectionOptionsTheCitySandbox; +} diff --git a/src/management/api/types/CreateConnectionRequestContentThirtySevenSignals.ts b/src/management/api/types/CreateConnectionRequestContentThirtySevenSignals.ts new file mode 100644 index 0000000000..fc2769ceb4 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentThirtySevenSignals.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=thirtysevensignals + */ +export interface CreateConnectionRequestContentThirtySevenSignals extends Management.ConnectionRequestCommon { + strategy: "thirtysevensignals"; + options?: Management.ConnectionOptionsThirtySevenSignals; +} diff --git a/src/management/api/types/CreateConnectionRequestContentTwitter.ts b/src/management/api/types/CreateConnectionRequestContentTwitter.ts new file mode 100644 index 0000000000..cb0fb665e2 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentTwitter.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=twitter + */ +export interface CreateConnectionRequestContentTwitter extends Management.ConnectionRequestCommon { + strategy: "twitter"; + options?: Management.ConnectionOptionsTwitter; +} diff --git a/src/management/api/types/CreateConnectionRequestContentUntappd.ts b/src/management/api/types/CreateConnectionRequestContentUntappd.ts new file mode 100644 index 0000000000..e15fa75b1c --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentUntappd.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=untappd + */ +export interface CreateConnectionRequestContentUntappd extends Management.ConnectionRequestCommon { + strategy: "untappd"; + options?: Management.ConnectionOptionsUntappd; +} diff --git a/src/management/api/types/CreateConnectionRequestContentVkontakte.ts b/src/management/api/types/CreateConnectionRequestContentVkontakte.ts new file mode 100644 index 0000000000..cd0aa049e4 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentVkontakte.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=vkontakte + */ +export interface CreateConnectionRequestContentVkontakte extends Management.ConnectionRequestCommon { + strategy: "vkontakte"; + options?: Management.ConnectionOptionsVkontakte; +} diff --git a/src/management/api/types/CreateConnectionRequestContentWeibo.ts b/src/management/api/types/CreateConnectionRequestContentWeibo.ts new file mode 100644 index 0000000000..5af9f69473 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentWeibo.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=weibo + */ +export interface CreateConnectionRequestContentWeibo extends Management.ConnectionRequestCommon { + strategy: "weibo"; + options?: Management.ConnectionOptionsWeibo; +} diff --git a/src/management/api/types/CreateConnectionRequestContentWindowsLive.ts b/src/management/api/types/CreateConnectionRequestContentWindowsLive.ts new file mode 100644 index 0000000000..269d2c823f --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentWindowsLive.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=windowslive + */ +export interface CreateConnectionRequestContentWindowsLive extends Management.ConnectionRequestCommon { + strategy: "windowslive"; + options?: Management.ConnectionOptionsWindowsLive; +} diff --git a/src/management/api/types/CreateConnectionRequestContentWordpress.ts b/src/management/api/types/CreateConnectionRequestContentWordpress.ts new file mode 100644 index 0000000000..39f30083ca --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentWordpress.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=wordpress + */ +export interface CreateConnectionRequestContentWordpress extends Management.ConnectionRequestCommon { + strategy: "wordpress"; + options?: Management.ConnectionOptionsWordpress; +} diff --git a/src/management/api/types/CreateConnectionRequestContentYahoo.ts b/src/management/api/types/CreateConnectionRequestContentYahoo.ts new file mode 100644 index 0000000000..a047928c2b --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentYahoo.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=yahoo + */ +export interface CreateConnectionRequestContentYahoo extends Management.ConnectionRequestCommon { + strategy: "yahoo"; + options?: Management.ConnectionOptionsYahoo; +} diff --git a/src/management/api/types/CreateConnectionRequestContentYammer.ts b/src/management/api/types/CreateConnectionRequestContentYammer.ts new file mode 100644 index 0000000000..ce620cf0c7 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentYammer.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=yammer + */ +export interface CreateConnectionRequestContentYammer extends Management.ConnectionRequestCommon { + strategy: "yammer"; + options?: Management.ConnectionOptionsYammer; +} diff --git a/src/management/api/types/CreateConnectionRequestContentYandex.ts b/src/management/api/types/CreateConnectionRequestContentYandex.ts new file mode 100644 index 0000000000..224719da56 --- /dev/null +++ b/src/management/api/types/CreateConnectionRequestContentYandex.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Create a connection with strategy=yandex + */ +export interface CreateConnectionRequestContentYandex extends Management.ConnectionRequestCommon { + strategy: "yandex"; + options?: Management.ConnectionOptionsYandex; +} diff --git a/src/management/api/types/CreateConnectionResponseContent.ts b/src/management/api/types/CreateConnectionResponseContent.ts index 34aa4cfe0c..b761411da8 100644 --- a/src/management/api/types/CreateConnectionResponseContent.ts +++ b/src/management/api/types/CreateConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -23,4 +21,6 @@ export interface CreateConnectionResponseContent { /** Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. */ show_as_button?: boolean; metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; } diff --git a/src/management/api/types/CreateCustomDomainResponseContent.ts b/src/management/api/types/CreateCustomDomainResponseContent.ts index d104b5859f..27e45400ab 100644 --- a/src/management/api/types/CreateCustomDomainResponseContent.ts +++ b/src/management/api/types/CreateCustomDomainResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -15,7 +13,8 @@ export interface CreateCustomDomainResponseContent { type: Management.CustomDomainTypeEnum; verification: Management.DomainVerification; /** The HTTP header to fetch the client's IP address */ - custom_client_ip_header?: string; + custom_client_ip_header?: string | null; /** The TLS version policy */ tls_policy?: string; + certificate?: Management.DomainCertificate; } diff --git a/src/management/api/types/CreateEmailProviderResponseContent.ts b/src/management/api/types/CreateEmailProviderResponseContent.ts index 073f28648f..ac54043f7f 100644 --- a/src/management/api/types/CreateEmailProviderResponseContent.ts +++ b/src/management/api/types/CreateEmailProviderResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEmailTemplateResponseContent.ts b/src/management/api/types/CreateEmailTemplateResponseContent.ts index fb4edc65db..8c017b92f4 100644 --- a/src/management/api/types/CreateEmailTemplateResponseContent.ts +++ b/src/management/api/types/CreateEmailTemplateResponseContent.ts @@ -1,25 +1,23 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface CreateEmailTemplateResponseContent { template: Management.EmailTemplateNameEnum; /** Body of the email template. */ - body?: string; + body?: string | null; /** Senders `from` email address. */ - from?: string; + from?: string | null; /** URL to redirect the user to after a successful action. */ - resultUrl?: string; + resultUrl?: string | null; /** Subject line of the email. */ - subject?: string; + subject?: string | null; /** Syntax of the template body. */ - syntax?: string; + syntax?: string | null; /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; + urlLifetimeInSeconds?: number | null; /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ includeEmailInRedirect?: boolean; /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; + enabled?: boolean | null; } diff --git a/src/management/api/types/CreateEncryptionKeyPublicWrappingResponseContent.ts b/src/management/api/types/CreateEncryptionKeyPublicWrappingResponseContent.ts index bbcfd9324c..0af4b6af14 100644 --- a/src/management/api/types/CreateEncryptionKeyPublicWrappingResponseContent.ts +++ b/src/management/api/types/CreateEncryptionKeyPublicWrappingResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEncryptionKeyResponseContent.ts b/src/management/api/types/CreateEncryptionKeyResponseContent.ts index caf7819d12..597803340e 100644 --- a/src/management/api/types/CreateEncryptionKeyResponseContent.ts +++ b/src/management/api/types/CreateEncryptionKeyResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEncryptionKeyType.ts b/src/management/api/types/CreateEncryptionKeyType.ts index 34b3560b9c..9471748208 100644 --- a/src/management/api/types/CreateEncryptionKeyType.ts +++ b/src/management/api/types/CreateEncryptionKeyType.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Type of the encryption key to be created. - */ -export type CreateEncryptionKeyType = "customer-provided-root-key" | "tenant-encryption-key"; +/** Type of the encryption key to be created. */ export const CreateEncryptionKeyType = { CustomerProvidedRootKey: "customer-provided-root-key", TenantEncryptionKey: "tenant-encryption-key", } as const; +export type CreateEncryptionKeyType = (typeof CreateEncryptionKeyType)[keyof typeof CreateEncryptionKeyType]; diff --git a/src/management/api/types/CreateEventStreamActionRequestContent.ts b/src/management/api/types/CreateEventStreamActionRequestContent.ts index 47ddaadd7b..231e982c58 100644 --- a/src/management/api/types/CreateEventStreamActionRequestContent.ts +++ b/src/management/api/types/CreateEventStreamActionRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEventStreamEventBridgeRequestContent.ts b/src/management/api/types/CreateEventStreamEventBridgeRequestContent.ts index fb52b5c05e..d759dabfaa 100644 --- a/src/management/api/types/CreateEventStreamEventBridgeRequestContent.ts +++ b/src/management/api/types/CreateEventStreamEventBridgeRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEventStreamRedeliveryResponseContent.ts b/src/management/api/types/CreateEventStreamRedeliveryResponseContent.ts index 6ec2cb5e3e..28b68b4f0b 100644 --- a/src/management/api/types/CreateEventStreamRedeliveryResponseContent.ts +++ b/src/management/api/types/CreateEventStreamRedeliveryResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEventStreamResponseContent.ts b/src/management/api/types/CreateEventStreamResponseContent.ts index 3c55c5a659..33fab4917d 100644 --- a/src/management/api/types/CreateEventStreamResponseContent.ts +++ b/src/management/api/types/CreateEventStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEventStreamTestEventResponseContent.ts b/src/management/api/types/CreateEventStreamTestEventResponseContent.ts index 2c79061714..5e989c33aa 100644 --- a/src/management/api/types/CreateEventStreamTestEventResponseContent.ts +++ b/src/management/api/types/CreateEventStreamTestEventResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateEventStreamWebHookRequestContent.ts b/src/management/api/types/CreateEventStreamWebHookRequestContent.ts index 3510b968ff..d8371de477 100644 --- a/src/management/api/types/CreateEventStreamWebHookRequestContent.ts +++ b/src/management/api/types/CreateEventStreamWebHookRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateExportUsersFields.ts b/src/management/api/types/CreateExportUsersFields.ts index d99dbccd71..680b485e29 100644 --- a/src/management/api/types/CreateExportUsersFields.ts +++ b/src/management/api/types/CreateExportUsersFields.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateExportUsersFields { /** Name of the field in the profile. */ diff --git a/src/management/api/types/CreateExportUsersResponseContent.ts b/src/management/api/types/CreateExportUsersResponseContent.ts index 3ee30c8e86..1533e627b1 100644 --- a/src/management/api/types/CreateExportUsersResponseContent.ts +++ b/src/management/api/types/CreateExportUsersResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowResponseContent.ts b/src/management/api/types/CreateFlowResponseContent.ts index 78c50cfa56..e711a49aa1 100644 --- a/src/management/api/types/CreateFlowResponseContent.ts +++ b/src/management/api/types/CreateFlowResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionActivecampaign.ts b/src/management/api/types/CreateFlowsVaultConnectionActivecampaign.ts index f1f24f1197..002ee0b5ee 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionActivecampaign.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionActivecampaign.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionActivecampaignApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionActivecampaignApiKey.ts index 40319ca435..9a88084a5e 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionActivecampaignApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionActivecampaignApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionActivecampaignUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionActivecampaignUninitialized.ts index 0472f6fd76..3ba5bd0003 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionActivecampaignUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionActivecampaignUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionAirtable.ts b/src/management/api/types/CreateFlowsVaultConnectionAirtable.ts index e2bb6b7924..866f7c62d0 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionAirtable.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionAirtable.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionAirtableApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionAirtableApiKey.ts index dfe66ca927..f06ee81ae6 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionAirtableApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionAirtableApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionAirtableUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionAirtableUninitialized.ts index 8a8f27d2f8..f21f466c97 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionAirtableUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionAirtableUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionAuth0.ts b/src/management/api/types/CreateFlowsVaultConnectionAuth0.ts index 0c1789bf64..775f8e48ef 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionAuth0.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionAuth0.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionAuth0OauthApp.ts b/src/management/api/types/CreateFlowsVaultConnectionAuth0OauthApp.ts index 6f792d3c1e..e725228927 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionAuth0OauthApp.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionAuth0OauthApp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionAuth0Uninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionAuth0Uninitialized.ts index cfa68506fd..90a9cb3489 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionAuth0Uninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionAuth0Uninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionBigquery.ts b/src/management/api/types/CreateFlowsVaultConnectionBigquery.ts index 96a2acc7af..2b818f52f2 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionBigquery.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionBigquery.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionBigqueryJwt.ts b/src/management/api/types/CreateFlowsVaultConnectionBigqueryJwt.ts index 2b783abb44..b695198f03 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionBigqueryJwt.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionBigqueryJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionBigqueryUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionBigqueryUninitialized.ts index e09acab9ea..ed2d522b78 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionBigqueryUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionBigqueryUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionClearbit.ts b/src/management/api/types/CreateFlowsVaultConnectionClearbit.ts index a29a83baed..3ec2c8b273 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionClearbit.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionClearbit.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionClearbitApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionClearbitApiKey.ts index 75e2212e21..c9343111d3 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionClearbitApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionClearbitApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionClearbitUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionClearbitUninitialized.ts index 35839e65fb..4da256a106 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionClearbitUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionClearbitUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionDocusign.ts b/src/management/api/types/CreateFlowsVaultConnectionDocusign.ts index 17981d1094..8da5d29240 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionDocusign.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionDocusign.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionDocusignOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionDocusignOauthCode.ts index ec48ce7511..82dc68ae81 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionDocusignOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionDocusignOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionDocusignUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionDocusignUninitialized.ts index 1da7702580..c44f4f6bd8 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionDocusignUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionDocusignUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionGoogleSheets.ts b/src/management/api/types/CreateFlowsVaultConnectionGoogleSheets.ts index 2602a41bd6..3805204461 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionGoogleSheets.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionGoogleSheets.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.ts index aeb8a195cf..2fb39cd98e 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.ts index d0723985e3..7be936480b 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionGoogleSheetsUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHttp.ts b/src/management/api/types/CreateFlowsVaultConnectionHttp.ts index 2a3c3ea22d..6724bf4645 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHttp.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHttp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHttpBearer.ts b/src/management/api/types/CreateFlowsVaultConnectionHttpBearer.ts index 5e392408f8..cae8002863 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHttpBearer.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHttpBearer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHttpUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionHttpUninitialized.ts index 7b603145b7..b099fa9515 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHttpUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHttpUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHubspot.ts b/src/management/api/types/CreateFlowsVaultConnectionHubspot.ts index 17960e9a44..208d1a6a3f 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHubspot.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHubspot.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHubspotApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionHubspotApiKey.ts index 49dc4ad15e..4da7216db2 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHubspotApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHubspotApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHubspotOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionHubspotOauthCode.ts index 7edf710844..159885e61f 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHubspotOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHubspotOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionHubspotUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionHubspotUninitialized.ts index c0c805a0bf..64bafb8566 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionHubspotUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionHubspotUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionJwt.ts b/src/management/api/types/CreateFlowsVaultConnectionJwt.ts index 24a0506f0d..2b259cc2e1 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionJwt.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionJwtJwt.ts b/src/management/api/types/CreateFlowsVaultConnectionJwtJwt.ts index 340b79003f..63f78f3ac6 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionJwtJwt.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionJwtJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionJwtUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionJwtUninitialized.ts index 3cf02ae412..de6c02ff9a 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionJwtUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionJwtUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailchimp.ts b/src/management/api/types/CreateFlowsVaultConnectionMailchimp.ts index 2b49716117..862e1d0f69 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailchimp.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailchimp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailchimpApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionMailchimpApiKey.ts index 2338bcbd9b..36e0ae6f59 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailchimpApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailchimpApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailchimpOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionMailchimpOauthCode.ts index 210ab39e09..934fb8b69e 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailchimpOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailchimpOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailchimpUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionMailchimpUninitialized.ts index 5ad54b69dc..0999de15dd 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailchimpUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailchimpUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailjet.ts b/src/management/api/types/CreateFlowsVaultConnectionMailjet.ts index 89606e307f..ed4cbdd3c0 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailjet.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailjet.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailjetApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionMailjetApiKey.ts index e753f2bf1c..7a83ee6993 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailjetApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailjetApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionMailjetUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionMailjetUninitialized.ts index ca0ae8e47a..9f10f5fb23 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionMailjetUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionMailjetUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionPipedrive.ts b/src/management/api/types/CreateFlowsVaultConnectionPipedrive.ts index e4d8059daa..f8178a752b 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionPipedrive.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionPipedrive.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionPipedriveOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionPipedriveOauthCode.ts index 0b497ae445..509047fb04 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionPipedriveOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionPipedriveOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionPipedriveToken.ts b/src/management/api/types/CreateFlowsVaultConnectionPipedriveToken.ts index 51acf06621..90693feaf5 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionPipedriveToken.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionPipedriveToken.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionPipedriveUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionPipedriveUninitialized.ts index d48f2cb382..4cbe7f0322 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionPipedriveUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionPipedriveUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionRequestContent.ts b/src/management/api/types/CreateFlowsVaultConnectionRequestContent.ts index 44da3b7f4d..3082b73d9a 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionRequestContent.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionResponseContent.ts b/src/management/api/types/CreateFlowsVaultConnectionResponseContent.ts index 4229b65680..95c9e10b9f 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionResponseContent.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateFlowsVaultConnectionResponseContent { /** Flows Vault Connection identifier. */ diff --git a/src/management/api/types/CreateFlowsVaultConnectionSalesforce.ts b/src/management/api/types/CreateFlowsVaultConnectionSalesforce.ts index 29e5f656df..4c970fa594 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSalesforce.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSalesforce.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSalesforceOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionSalesforceOauthCode.ts index ca33fc4693..dbdab66db8 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSalesforceOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSalesforceOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSalesforceUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionSalesforceUninitialized.ts index 00d3db7360..6ac7c19cc4 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSalesforceUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSalesforceUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSendgrid.ts b/src/management/api/types/CreateFlowsVaultConnectionSendgrid.ts index 8e7f7809a4..0d946ecb8f 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSendgrid.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSendgrid.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSendgridApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionSendgridApiKey.ts index e6e81e3d35..5e3a111195 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSendgridApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSendgridApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSendgridUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionSendgridUninitialized.ts index 033f51974d..466964c83e 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSendgridUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSendgridUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSlack.ts b/src/management/api/types/CreateFlowsVaultConnectionSlack.ts index 610919da20..321523568e 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSlack.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSlack.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSlackOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionSlackOauthCode.ts index b0e8bccfd6..cbb291f067 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSlackOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSlackOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSlackUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionSlackUninitialized.ts index fadd2ce479..8f0125d402 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSlackUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSlackUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionSlackWebhook.ts b/src/management/api/types/CreateFlowsVaultConnectionSlackWebhook.ts index 7f1d3e5fe7..a38b15daa9 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionSlackWebhook.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionSlackWebhook.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionStripe.ts b/src/management/api/types/CreateFlowsVaultConnectionStripe.ts index 67d3c831da..e7c548e6a9 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionStripe.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionStripe.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionStripeKeyPair.ts b/src/management/api/types/CreateFlowsVaultConnectionStripeKeyPair.ts index 98406d6a83..13ec84d032 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionStripeKeyPair.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionStripeKeyPair.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionStripeOauthCode.ts b/src/management/api/types/CreateFlowsVaultConnectionStripeOauthCode.ts index e2e5640e82..10aeab2455 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionStripeOauthCode.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionStripeOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionStripeUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionStripeUninitialized.ts index e01f77462b..3dc65dea17 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionStripeUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionStripeUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionTelegram.ts b/src/management/api/types/CreateFlowsVaultConnectionTelegram.ts index baad96c9b0..7838482a50 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionTelegram.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionTelegram.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionTelegramToken.ts b/src/management/api/types/CreateFlowsVaultConnectionTelegramToken.ts index f4ad41a287..166ceb4dc3 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionTelegramToken.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionTelegramToken.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionTelegramUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionTelegramUninitialized.ts index 185b17f4bb..23b3fbdc4f 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionTelegramUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionTelegramUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionTwilio.ts b/src/management/api/types/CreateFlowsVaultConnectionTwilio.ts index c8fe773653..95aa183bf8 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionTwilio.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionTwilio.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionTwilioApiKey.ts b/src/management/api/types/CreateFlowsVaultConnectionTwilioApiKey.ts index 3fa6c7d609..de45b746cd 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionTwilioApiKey.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionTwilioApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionTwilioUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionTwilioUninitialized.ts index 51f3649502..afab7e5491 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionTwilioUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionTwilioUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionWhatsapp.ts b/src/management/api/types/CreateFlowsVaultConnectionWhatsapp.ts index 27665fe94f..f223ad908c 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionWhatsapp.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionWhatsapp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionWhatsappToken.ts b/src/management/api/types/CreateFlowsVaultConnectionWhatsappToken.ts index 405ca3eb54..71c1041460 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionWhatsappToken.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionWhatsappToken.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionWhatsappUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionWhatsappUninitialized.ts index 210809f45a..deb2346a56 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionWhatsappUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionWhatsappUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionZapier.ts b/src/management/api/types/CreateFlowsVaultConnectionZapier.ts index 45f64a3d08..f1f1369353 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionZapier.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionZapier.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionZapierUninitialized.ts b/src/management/api/types/CreateFlowsVaultConnectionZapierUninitialized.ts index 96198aab32..00589b801f 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionZapierUninitialized.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionZapierUninitialized.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFlowsVaultConnectionZapierWebhook.ts b/src/management/api/types/CreateFlowsVaultConnectionZapierWebhook.ts index 0341122448..c371df4603 100644 --- a/src/management/api/types/CreateFlowsVaultConnectionZapierWebhook.ts +++ b/src/management/api/types/CreateFlowsVaultConnectionZapierWebhook.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateFormResponseContent.ts b/src/management/api/types/CreateFormResponseContent.ts index 46252c4e18..7c3bc047a5 100644 --- a/src/management/api/types/CreateFormResponseContent.ts +++ b/src/management/api/types/CreateFormResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateGuardianEnrollmentTicketResponseContent.ts b/src/management/api/types/CreateGuardianEnrollmentTicketResponseContent.ts index 278b1552a8..f33db7a3d3 100644 --- a/src/management/api/types/CreateGuardianEnrollmentTicketResponseContent.ts +++ b/src/management/api/types/CreateGuardianEnrollmentTicketResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateGuardianEnrollmentTicketResponseContent { /** The ticket_id used to identify the enrollment */ diff --git a/src/management/api/types/CreateHookResponseContent.ts b/src/management/api/types/CreateHookResponseContent.ts index 9085d1e241..610985ef82 100644 --- a/src/management/api/types/CreateHookResponseContent.ts +++ b/src/management/api/types/CreateHookResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateHookSecretRequestContent.ts b/src/management/api/types/CreateHookSecretRequestContent.ts index ae71437b40..b70d5b8962 100644 --- a/src/management/api/types/CreateHookSecretRequestContent.ts +++ b/src/management/api/types/CreateHookSecretRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Hashmap of key-value pairs where the value must be a string. diff --git a/src/management/api/types/CreateImportUsersResponseContent.ts b/src/management/api/types/CreateImportUsersResponseContent.ts index ea8d490325..27bea8324a 100644 --- a/src/management/api/types/CreateImportUsersResponseContent.ts +++ b/src/management/api/types/CreateImportUsersResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateImportUsersResponseContent { /** Status of this job. */ diff --git a/src/management/api/types/CreateLogStreamDatadogRequestBody.ts b/src/management/api/types/CreateLogStreamDatadogRequestBody.ts index 584a128eda..8e5dd1b718 100644 --- a/src/management/api/types/CreateLogStreamDatadogRequestBody.ts +++ b/src/management/api/types/CreateLogStreamDatadogRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamEventBridgeRequestBody.ts b/src/management/api/types/CreateLogStreamEventBridgeRequestBody.ts index 086411bf72..91826a70c9 100644 --- a/src/management/api/types/CreateLogStreamEventBridgeRequestBody.ts +++ b/src/management/api/types/CreateLogStreamEventBridgeRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamEventGridRequestBody.ts b/src/management/api/types/CreateLogStreamEventGridRequestBody.ts index f6590171a1..cd98eaf6b7 100644 --- a/src/management/api/types/CreateLogStreamEventGridRequestBody.ts +++ b/src/management/api/types/CreateLogStreamEventGridRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamHttpRequestBody.ts b/src/management/api/types/CreateLogStreamHttpRequestBody.ts index d83b92e6db..4a55f2a0ae 100644 --- a/src/management/api/types/CreateLogStreamHttpRequestBody.ts +++ b/src/management/api/types/CreateLogStreamHttpRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamMixpanelRequestBody.ts b/src/management/api/types/CreateLogStreamMixpanelRequestBody.ts index e62c0ad88d..b804aadaec 100644 --- a/src/management/api/types/CreateLogStreamMixpanelRequestBody.ts +++ b/src/management/api/types/CreateLogStreamMixpanelRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamRequestContent.ts b/src/management/api/types/CreateLogStreamRequestContent.ts index 0d23966f05..ee0207d68c 100644 --- a/src/management/api/types/CreateLogStreamRequestContent.ts +++ b/src/management/api/types/CreateLogStreamRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamResponseContent.ts b/src/management/api/types/CreateLogStreamResponseContent.ts index b3f6a4e5b4..9ffefb75c8 100644 --- a/src/management/api/types/CreateLogStreamResponseContent.ts +++ b/src/management/api/types/CreateLogStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamSegmentRequestBody.ts b/src/management/api/types/CreateLogStreamSegmentRequestBody.ts index 0a640bd378..323bd5901f 100644 --- a/src/management/api/types/CreateLogStreamSegmentRequestBody.ts +++ b/src/management/api/types/CreateLogStreamSegmentRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamSplunkRequestBody.ts b/src/management/api/types/CreateLogStreamSplunkRequestBody.ts index c66d4563fa..fdabe02b93 100644 --- a/src/management/api/types/CreateLogStreamSplunkRequestBody.ts +++ b/src/management/api/types/CreateLogStreamSplunkRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateLogStreamSumoRequestBody.ts b/src/management/api/types/CreateLogStreamSumoRequestBody.ts index afbc1af75b..d0a88b22c1 100644 --- a/src/management/api/types/CreateLogStreamSumoRequestBody.ts +++ b/src/management/api/types/CreateLogStreamSumoRequestBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateOrganizationInvitationResponseContent.ts b/src/management/api/types/CreateOrganizationInvitationResponseContent.ts index 8cdd9b5fa4..51ffceecf9 100644 --- a/src/management/api/types/CreateOrganizationInvitationResponseContent.ts +++ b/src/management/api/types/CreateOrganizationInvitationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateOrganizationResponseContent.ts b/src/management/api/types/CreateOrganizationResponseContent.ts index 9ccb90935b..2061994cde 100644 --- a/src/management/api/types/CreateOrganizationResponseContent.ts +++ b/src/management/api/types/CreateOrganizationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreatePhoneProviderSendTestResponseContent.ts b/src/management/api/types/CreatePhoneProviderSendTestResponseContent.ts index a59e228376..57f2f51a26 100644 --- a/src/management/api/types/CreatePhoneProviderSendTestResponseContent.ts +++ b/src/management/api/types/CreatePhoneProviderSendTestResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreatePhoneProviderSendTestResponseContent { /** The status code of the operation. */ diff --git a/src/management/api/types/CreatePhoneTemplateResponseContent.ts b/src/management/api/types/CreatePhoneTemplateResponseContent.ts index e67e7a0edb..ed8b779e93 100644 --- a/src/management/api/types/CreatePhoneTemplateResponseContent.ts +++ b/src/management/api/types/CreatePhoneTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreatePhoneTemplateTestNotificationResponseContent.ts b/src/management/api/types/CreatePhoneTemplateTestNotificationResponseContent.ts index bd4c4096a0..4e2348da75 100644 --- a/src/management/api/types/CreatePhoneTemplateTestNotificationResponseContent.ts +++ b/src/management/api/types/CreatePhoneTemplateTestNotificationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreatePhoneTemplateTestNotificationResponseContent { message: string; diff --git a/src/management/api/types/CreatePublicKeyDeviceCredentialResponseContent.ts b/src/management/api/types/CreatePublicKeyDeviceCredentialResponseContent.ts index 6fbde6e9b8..28c0be6ac3 100644 --- a/src/management/api/types/CreatePublicKeyDeviceCredentialResponseContent.ts +++ b/src/management/api/types/CreatePublicKeyDeviceCredentialResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreatePublicKeyDeviceCredentialResponseContent { /** The credential's identifier */ diff --git a/src/management/api/types/CreateResourceServerResponseContent.ts b/src/management/api/types/CreateResourceServerResponseContent.ts index 622a3c5fbe..89ec5df9a8 100644 --- a/src/management/api/types/CreateResourceServerResponseContent.ts +++ b/src/management/api/types/CreateResourceServerResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -29,10 +27,10 @@ export interface CreateResourceServerResponseContent { /** Whether authorization polices are enforced (true) or unenforced (false). */ enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; - token_encryption?: Management.ResourceServerTokenEncryption; - consent_policy?: Management.ResourceServerConsentPolicyEnum | undefined; + token_encryption?: Management.ResourceServerTokenEncryption | null; + consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; authorization_details?: unknown[]; - proof_of_possession?: Management.ResourceServerProofOfPossession; + proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; /** The client ID of the client that this resource server is linked to */ client_id?: string; diff --git a/src/management/api/types/CreateRoleResponseContent.ts b/src/management/api/types/CreateRoleResponseContent.ts index 7bb1d3bb79..5682d755aa 100644 --- a/src/management/api/types/CreateRoleResponseContent.ts +++ b/src/management/api/types/CreateRoleResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateRoleResponseContent { /** ID for this role. */ diff --git a/src/management/api/types/CreateRuleResponseContent.ts b/src/management/api/types/CreateRuleResponseContent.ts index 905b3a57f5..478aae64a0 100644 --- a/src/management/api/types/CreateRuleResponseContent.ts +++ b/src/management/api/types/CreateRuleResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateRuleResponseContent { /** Name of this rule. */ diff --git a/src/management/api/types/CreateScimConfigurationRequestContent.ts b/src/management/api/types/CreateScimConfigurationRequestContent.ts index f34b8d37b2..ef10040cbc 100644 --- a/src/management/api/types/CreateScimConfigurationRequestContent.ts +++ b/src/management/api/types/CreateScimConfigurationRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateScimConfigurationResponseContent.ts b/src/management/api/types/CreateScimConfigurationResponseContent.ts index 195ad12ae5..952cfadbf7 100644 --- a/src/management/api/types/CreateScimConfigurationResponseContent.ts +++ b/src/management/api/types/CreateScimConfigurationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateScimTokenResponseContent.ts b/src/management/api/types/CreateScimTokenResponseContent.ts index b9a1647341..cb53ce7b11 100644 --- a/src/management/api/types/CreateScimTokenResponseContent.ts +++ b/src/management/api/types/CreateScimTokenResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateScimTokenResponseContent { /** The token's identifier */ diff --git a/src/management/api/types/CreateSelfServiceProfileResponseContent.ts b/src/management/api/types/CreateSelfServiceProfileResponseContent.ts index 966fc13fc8..40ab2c8a0e 100644 --- a/src/management/api/types/CreateSelfServiceProfileResponseContent.ts +++ b/src/management/api/types/CreateSelfServiceProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -20,4 +18,6 @@ export interface CreateSelfServiceProfileResponseContent { branding?: Management.SelfServiceProfileBrandingProperties; /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; + /** ID of the user-attribute-profile to associate with this self-service profile. */ + user_attribute_profile_id?: string; } diff --git a/src/management/api/types/CreateSelfServiceProfileSsoTicketResponseContent.ts b/src/management/api/types/CreateSelfServiceProfileSsoTicketResponseContent.ts index 7939c4db2f..c856001751 100644 --- a/src/management/api/types/CreateSelfServiceProfileSsoTicketResponseContent.ts +++ b/src/management/api/types/CreateSelfServiceProfileSsoTicketResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateSelfServiceProfileSsoTicketResponseContent { /** The URL for the created ticket. */ diff --git a/src/management/api/types/CreateTokenExchangeProfileResponseContent.ts b/src/management/api/types/CreateTokenExchangeProfileResponseContent.ts index 915adaf2ea..6c8930c54a 100644 --- a/src/management/api/types/CreateTokenExchangeProfileResponseContent.ts +++ b/src/management/api/types/CreateTokenExchangeProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateTokenQuota.ts b/src/management/api/types/CreateTokenQuota.ts index c447812f75..c944f5e088 100644 --- a/src/management/api/types/CreateTokenQuota.ts +++ b/src/management/api/types/CreateTokenQuota.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateUserAttributeProfileResponseContent.ts b/src/management/api/types/CreateUserAttributeProfileResponseContent.ts new file mode 100644 index 0000000000..a55225f24a --- /dev/null +++ b/src/management/api/types/CreateUserAttributeProfileResponseContent.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface CreateUserAttributeProfileResponseContent { + id?: Management.UserAttributeProfileId; + name?: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfileUserId; + user_attributes?: Management.UserAttributeProfileUserAttributes; +} diff --git a/src/management/api/types/CreateUserAuthenticationMethodResponseContent.ts b/src/management/api/types/CreateUserAuthenticationMethodResponseContent.ts index 20880f4ac5..01e9d8c2e7 100644 --- a/src/management/api/types/CreateUserAuthenticationMethodResponseContent.ts +++ b/src/management/api/types/CreateUserAuthenticationMethodResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -25,6 +23,8 @@ export interface CreateUserAuthenticationMethodResponseContent { key_id?: string; /** Applies to webauthn authenticators only. The public key. */ public_key?: string; + /** Applies to passkeys only. Authenticator Attestation Globally Unique Identifier. */ + aaguid?: string; /** Applies to webauthn authenticators only. The relying party identifier. */ relying_party_identifier?: string; /** Authentication method creation date */ diff --git a/src/management/api/types/CreateUserResponseContent.ts b/src/management/api/types/CreateUserResponseContent.ts index f7d6c2f596..2dec98b544 100644 --- a/src/management/api/types/CreateUserResponseContent.ts +++ b/src/management/api/types/CreateUserResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateVerifiableCredentialTemplateResponseContent.ts b/src/management/api/types/CreateVerifiableCredentialTemplateResponseContent.ts index 0c8550dd96..e69491e438 100644 --- a/src/management/api/types/CreateVerifiableCredentialTemplateResponseContent.ts +++ b/src/management/api/types/CreateVerifiableCredentialTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CreateVerificationEmailResponseContent.ts b/src/management/api/types/CreateVerificationEmailResponseContent.ts index fedd9c79d4..d5a2d8c395 100644 --- a/src/management/api/types/CreateVerificationEmailResponseContent.ts +++ b/src/management/api/types/CreateVerificationEmailResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CreateVerificationEmailResponseContent { /** Status of this job. */ diff --git a/src/management/api/types/CreatedAuthenticationMethodTypeEnum.ts b/src/management/api/types/CreatedAuthenticationMethodTypeEnum.ts index 116621fbab..0d5b0bf17c 100644 --- a/src/management/api/types/CreatedAuthenticationMethodTypeEnum.ts +++ b/src/management/api/types/CreatedAuthenticationMethodTypeEnum.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreatedAuthenticationMethodTypeEnum = "phone" | "email" | "totp" | "webauthn-roaming"; export const CreatedAuthenticationMethodTypeEnum = { Phone: "phone", Email: "email", Totp: "totp", WebauthnRoaming: "webauthn-roaming", } as const; +export type CreatedAuthenticationMethodTypeEnum = + (typeof CreatedAuthenticationMethodTypeEnum)[keyof typeof CreatedAuthenticationMethodTypeEnum]; diff --git a/src/management/api/types/CreatedUserAuthenticationMethodTypeEnum.ts b/src/management/api/types/CreatedUserAuthenticationMethodTypeEnum.ts index 8e781e52af..990337bcfa 100644 --- a/src/management/api/types/CreatedUserAuthenticationMethodTypeEnum.ts +++ b/src/management/api/types/CreatedUserAuthenticationMethodTypeEnum.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CreatedUserAuthenticationMethodTypeEnum = "phone" | "email" | "totp" | "webauthn-roaming" | "passkey"; export const CreatedUserAuthenticationMethodTypeEnum = { Phone: "phone", Email: "email", @@ -10,3 +7,5 @@ export const CreatedUserAuthenticationMethodTypeEnum = { WebauthnRoaming: "webauthn-roaming", Passkey: "passkey", } as const; +export type CreatedUserAuthenticationMethodTypeEnum = + (typeof CreatedUserAuthenticationMethodTypeEnum)[keyof typeof CreatedUserAuthenticationMethodTypeEnum]; diff --git a/src/management/api/types/CredentialId.ts b/src/management/api/types/CredentialId.ts index 5b69f2833b..e3fdb6ddcb 100644 --- a/src/management/api/types/CredentialId.ts +++ b/src/management/api/types/CredentialId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CredentialId { /** Credential ID */ diff --git a/src/management/api/types/CustomDomain.ts b/src/management/api/types/CustomDomain.ts index 72aedf23bc..97728ff99a 100644 --- a/src/management/api/types/CustomDomain.ts +++ b/src/management/api/types/CustomDomain.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -17,7 +15,8 @@ export interface CustomDomain { origin_domain_name?: string; verification?: Management.DomainVerification; /** The HTTP header to fetch the client's IP address */ - custom_client_ip_header?: string; + custom_client_ip_header?: string | null; /** The TLS version policy */ tls_policy?: string; + certificate?: Management.DomainCertificate; } diff --git a/src/management/api/types/CustomDomainCustomClientIpHeader.ts b/src/management/api/types/CustomDomainCustomClientIpHeader.ts index 35de9e0d7f..fa5f4b09ab 100644 --- a/src/management/api/types/CustomDomainCustomClientIpHeader.ts +++ b/src/management/api/types/CustomDomainCustomClientIpHeader.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type CustomDomainCustomClientIpHeader = Management.CustomDomainCustomClientIpHeaderEnum | undefined; +export type CustomDomainCustomClientIpHeader = (Management.CustomDomainCustomClientIpHeaderEnum | null) | undefined; diff --git a/src/management/api/types/CustomDomainCustomClientIpHeaderEnum.ts b/src/management/api/types/CustomDomainCustomClientIpHeaderEnum.ts index 7dad6111a5..28312063ae 100644 --- a/src/management/api/types/CustomDomainCustomClientIpHeaderEnum.ts +++ b/src/management/api/types/CustomDomainCustomClientIpHeaderEnum.ts @@ -1,16 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The HTTP header to fetch the client's IP address - */ -export type CustomDomainCustomClientIpHeaderEnum = - | "true-client-ip" - | "cf-connecting-ip" - | "x-forwarded-for" - | "x-azure-clientip" - | ""; +/** The HTTP header to fetch the client's IP address */ export const CustomDomainCustomClientIpHeaderEnum = { TrueClientIp: "true-client-ip", CfConnectingIp: "cf-connecting-ip", @@ -18,3 +8,5 @@ export const CustomDomainCustomClientIpHeaderEnum = { XAzureClientip: "x-azure-clientip", Empty: "", } as const; +export type CustomDomainCustomClientIpHeaderEnum = + (typeof CustomDomainCustomClientIpHeaderEnum)[keyof typeof CustomDomainCustomClientIpHeaderEnum]; diff --git a/src/management/api/types/CustomDomainProvisioningTypeEnum.ts b/src/management/api/types/CustomDomainProvisioningTypeEnum.ts index 0aa2ee077b..a49c119bb5 100644 --- a/src/management/api/types/CustomDomainProvisioningTypeEnum.ts +++ b/src/management/api/types/CustomDomainProvisioningTypeEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Custom domain provisioning type. Must be `auth0_managed_certs` or `self_managed_certs`. - */ -export type CustomDomainProvisioningTypeEnum = "auth0_managed_certs" | "self_managed_certs"; +/** Custom domain provisioning type. Must be `auth0_managed_certs` or `self_managed_certs`. */ export const CustomDomainProvisioningTypeEnum = { Auth0ManagedCerts: "auth0_managed_certs", SelfManagedCerts: "self_managed_certs", } as const; +export type CustomDomainProvisioningTypeEnum = + (typeof CustomDomainProvisioningTypeEnum)[keyof typeof CustomDomainProvisioningTypeEnum]; diff --git a/src/management/api/types/CustomDomainStatusFilterEnum.ts b/src/management/api/types/CustomDomainStatusFilterEnum.ts index eb471edd97..5a40ae4de2 100644 --- a/src/management/api/types/CustomDomainStatusFilterEnum.ts +++ b/src/management/api/types/CustomDomainStatusFilterEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Custom domain configuration status. Can be `failed`, `pending_verification`, or `ready`. - */ -export type CustomDomainStatusFilterEnum = "pending_verification" | "ready" | "failed"; +/** Custom domain configuration status. Can be `failed`, `pending_verification`, or `ready`. */ export const CustomDomainStatusFilterEnum = { PendingVerification: "pending_verification", Ready: "ready", Failed: "failed", } as const; +export type CustomDomainStatusFilterEnum = + (typeof CustomDomainStatusFilterEnum)[keyof typeof CustomDomainStatusFilterEnum]; diff --git a/src/management/api/types/CustomDomainTlsPolicyEnum.ts b/src/management/api/types/CustomDomainTlsPolicyEnum.ts index 1808b6a732..aa3ca2fd46 100644 --- a/src/management/api/types/CustomDomainTlsPolicyEnum.ts +++ b/src/management/api/types/CustomDomainTlsPolicyEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Custom domain TLS policy. Must be `recommended`, includes TLS 1.2. diff --git a/src/management/api/types/CustomDomainTypeEnum.ts b/src/management/api/types/CustomDomainTypeEnum.ts index 17b576d655..3e397e4e4a 100644 --- a/src/management/api/types/CustomDomainTypeEnum.ts +++ b/src/management/api/types/CustomDomainTypeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Custom domain provisioning type. Can be `auth0_managed_certs` or `self_managed_certs`. - */ -export type CustomDomainTypeEnum = "auth0_managed_certs" | "self_managed_certs"; +/** Custom domain provisioning type. Can be `auth0_managed_certs` or `self_managed_certs`. */ export const CustomDomainTypeEnum = { Auth0ManagedCerts: "auth0_managed_certs", SelfManagedCerts: "self_managed_certs", } as const; +export type CustomDomainTypeEnum = (typeof CustomDomainTypeEnum)[keyof typeof CustomDomainTypeEnum]; diff --git a/src/management/api/types/CustomDomainVerificationMethodEnum.ts b/src/management/api/types/CustomDomainVerificationMethodEnum.ts index fb03770643..ede7d4c3a8 100644 --- a/src/management/api/types/CustomDomainVerificationMethodEnum.ts +++ b/src/management/api/types/CustomDomainVerificationMethodEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Custom domain verification method. Must be `txt`. diff --git a/src/management/api/types/CustomProviderConfiguration.ts b/src/management/api/types/CustomProviderConfiguration.ts index 487d398874..6fbe8772a3 100644 --- a/src/management/api/types/CustomProviderConfiguration.ts +++ b/src/management/api/types/CustomProviderConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CustomProviderCredentials.ts b/src/management/api/types/CustomProviderCredentials.ts index 97e18b3479..fbae3e3ad6 100644 --- a/src/management/api/types/CustomProviderCredentials.ts +++ b/src/management/api/types/CustomProviderCredentials.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface CustomProviderCredentials {} diff --git a/src/management/api/types/CustomProviderDeliveryMethodEnum.ts b/src/management/api/types/CustomProviderDeliveryMethodEnum.ts index 729c24d81b..0c781adace 100644 --- a/src/management/api/types/CustomProviderDeliveryMethodEnum.ts +++ b/src/management/api/types/CustomProviderDeliveryMethodEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type CustomProviderDeliveryMethodEnum = "text" | "voice"; export const CustomProviderDeliveryMethodEnum = { Text: "text", Voice: "voice", } as const; +export type CustomProviderDeliveryMethodEnum = + (typeof CustomProviderDeliveryMethodEnum)[keyof typeof CustomProviderDeliveryMethodEnum]; diff --git a/src/management/api/types/CustomSigningKeyAlgorithmEnum.ts b/src/management/api/types/CustomSigningKeyAlgorithmEnum.ts index ba3708e517..ddf81276c1 100644 --- a/src/management/api/types/CustomSigningKeyAlgorithmEnum.ts +++ b/src/management/api/types/CustomSigningKeyAlgorithmEnum.ts @@ -1,20 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Key algorithm - */ -export type CustomSigningKeyAlgorithmEnum = - | "RS256" - | "RS384" - | "RS512" - | "ES256" - | "ES384" - | "ES512" - | "PS256" - | "PS384" - | "PS512"; +/** Key algorithm */ export const CustomSigningKeyAlgorithmEnum = { Rs256: "RS256", Rs384: "RS384", @@ -26,3 +12,5 @@ export const CustomSigningKeyAlgorithmEnum = { Ps384: "PS384", Ps512: "PS512", } as const; +export type CustomSigningKeyAlgorithmEnum = + (typeof CustomSigningKeyAlgorithmEnum)[keyof typeof CustomSigningKeyAlgorithmEnum]; diff --git a/src/management/api/types/CustomSigningKeyCurveEnum.ts b/src/management/api/types/CustomSigningKeyCurveEnum.ts index 5f556dd110..6ad6006a22 100644 --- a/src/management/api/types/CustomSigningKeyCurveEnum.ts +++ b/src/management/api/types/CustomSigningKeyCurveEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Curve - */ -export type CustomSigningKeyCurveEnum = "P-256" | "P-384" | "P-521"; +/** Curve */ export const CustomSigningKeyCurveEnum = { P256: "P-256", P384: "P-384", P521: "P-521", } as const; +export type CustomSigningKeyCurveEnum = (typeof CustomSigningKeyCurveEnum)[keyof typeof CustomSigningKeyCurveEnum]; diff --git a/src/management/api/types/CustomSigningKeyJwk.ts b/src/management/api/types/CustomSigningKeyJwk.ts index 3c8abb4756..a06222b6e4 100644 --- a/src/management/api/types/CustomSigningKeyJwk.ts +++ b/src/management/api/types/CustomSigningKeyJwk.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/CustomSigningKeyOperationEnum.ts b/src/management/api/types/CustomSigningKeyOperationEnum.ts index eb7b1397c6..6e5a996e0d 100644 --- a/src/management/api/types/CustomSigningKeyOperationEnum.ts +++ b/src/management/api/types/CustomSigningKeyOperationEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type CustomSigningKeyOperationEnum = "verify"; diff --git a/src/management/api/types/CustomSigningKeyTypeEnum.ts b/src/management/api/types/CustomSigningKeyTypeEnum.ts index 18bd959b4d..bcdca046c4 100644 --- a/src/management/api/types/CustomSigningKeyTypeEnum.ts +++ b/src/management/api/types/CustomSigningKeyTypeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Key type - */ -export type CustomSigningKeyTypeEnum = "EC" | "RSA"; +/** Key type */ export const CustomSigningKeyTypeEnum = { Ec: "EC", Rsa: "RSA", } as const; +export type CustomSigningKeyTypeEnum = (typeof CustomSigningKeyTypeEnum)[keyof typeof CustomSigningKeyTypeEnum]; diff --git a/src/management/api/types/CustomSigningKeyUseEnum.ts b/src/management/api/types/CustomSigningKeyUseEnum.ts index 2fe2986b15..fc7a76b629 100644 --- a/src/management/api/types/CustomSigningKeyUseEnum.ts +++ b/src/management/api/types/CustomSigningKeyUseEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Key use diff --git a/src/management/api/types/DailyStats.ts b/src/management/api/types/DailyStats.ts index b548f1fe18..a17fc97a85 100644 --- a/src/management/api/types/DailyStats.ts +++ b/src/management/api/types/DailyStats.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface DailyStats { /** Date these events occurred in ISO 8601 format. */ diff --git a/src/management/api/types/DefaultTokenQuota.ts b/src/management/api/types/DefaultTokenQuota.ts index fea139bc0f..431140ad90 100644 --- a/src/management/api/types/DefaultTokenQuota.ts +++ b/src/management/api/types/DefaultTokenQuota.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DeleteHookSecretRequestContent.ts b/src/management/api/types/DeleteHookSecretRequestContent.ts index a50939c561..1b53d8d46d 100644 --- a/src/management/api/types/DeleteHookSecretRequestContent.ts +++ b/src/management/api/types/DeleteHookSecretRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Array of secret names to delete. diff --git a/src/management/api/types/DeleteUserIdentityResponseContent.ts b/src/management/api/types/DeleteUserIdentityResponseContent.ts index 9e7175330d..acddfdaaec 100644 --- a/src/management/api/types/DeleteUserIdentityResponseContent.ts +++ b/src/management/api/types/DeleteUserIdentityResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DeleteUserIdentityResponseContentItem.ts b/src/management/api/types/DeleteUserIdentityResponseContentItem.ts index b154e46b31..4a8b43d90c 100644 --- a/src/management/api/types/DeleteUserIdentityResponseContentItem.ts +++ b/src/management/api/types/DeleteUserIdentityResponseContentItem.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DeployActionResponseContent.ts b/src/management/api/types/DeployActionResponseContent.ts index 50cb80a4d4..07bd69f41c 100644 --- a/src/management/api/types/DeployActionResponseContent.ts +++ b/src/management/api/types/DeployActionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DeployActionVersionRequestBodyParams.ts b/src/management/api/types/DeployActionVersionRequestBodyParams.ts index b8b22d1bc6..a672a603c5 100644 --- a/src/management/api/types/DeployActionVersionRequestBodyParams.ts +++ b/src/management/api/types/DeployActionVersionRequestBodyParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface DeployActionVersionRequestBodyParams { /** True if the draft of the action should be updated with the reverted version. */ diff --git a/src/management/api/types/DeployActionVersionRequestContent.ts b/src/management/api/types/DeployActionVersionRequestContent.ts index e2220418c5..35a0916f7e 100644 --- a/src/management/api/types/DeployActionVersionRequestContent.ts +++ b/src/management/api/types/DeployActionVersionRequestContent.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type DeployActionVersionRequestContent = Management.DeployActionVersionRequestBodyParams | undefined; +export type DeployActionVersionRequestContent = (Management.DeployActionVersionRequestBodyParams | null) | undefined; diff --git a/src/management/api/types/DeployActionVersionResponseContent.ts b/src/management/api/types/DeployActionVersionResponseContent.ts index f067c293e5..64b58a7eaa 100644 --- a/src/management/api/types/DeployActionVersionResponseContent.ts +++ b/src/management/api/types/DeployActionVersionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DeviceCredential.ts b/src/management/api/types/DeviceCredential.ts index a6c287f36a..1471c87384 100644 --- a/src/management/api/types/DeviceCredential.ts +++ b/src/management/api/types/DeviceCredential.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DeviceCredentialPublicKeyTypeEnum.ts b/src/management/api/types/DeviceCredentialPublicKeyTypeEnum.ts index 02bf8e42fb..3e7508a0ce 100644 --- a/src/management/api/types/DeviceCredentialPublicKeyTypeEnum.ts +++ b/src/management/api/types/DeviceCredentialPublicKeyTypeEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Type of credential. Must be `public_key`. diff --git a/src/management/api/types/DeviceCredentialTypeEnum.ts b/src/management/api/types/DeviceCredentialTypeEnum.ts index b1d0c43da1..a0c9ba95ea 100644 --- a/src/management/api/types/DeviceCredentialTypeEnum.ts +++ b/src/management/api/types/DeviceCredentialTypeEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Type of credentials to retrieve. Must be `public_key`, `refresh_token` or `rotating_refresh_token`. The property will default to `refresh_token` when paging is requested - */ -export type DeviceCredentialTypeEnum = "public_key" | "refresh_token" | "rotating_refresh_token"; +/** Type of credentials to retrieve. Must be `public_key`, `refresh_token` or `rotating_refresh_token`. The property will default to `refresh_token` when paging is requested */ export const DeviceCredentialTypeEnum = { PublicKey: "public_key", RefreshToken: "refresh_token", RotatingRefreshToken: "rotating_refresh_token", } as const; +export type DeviceCredentialTypeEnum = (typeof DeviceCredentialTypeEnum)[keyof typeof DeviceCredentialTypeEnum]; diff --git a/src/management/api/types/DomainCertificate.ts b/src/management/api/types/DomainCertificate.ts new file mode 100644 index 0000000000..b06629bd3b --- /dev/null +++ b/src/management/api/types/DomainCertificate.ts @@ -0,0 +1,15 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Certificate information. This object is relevant only for Custom Domains with Auth0-Managed Certificates. + */ +export interface DomainCertificate { + status?: Management.DomainCertificateStatusEnum; + /** A user-friendly error message will be presented if the certificate status is provisioning_failed or renewing_failed. */ + error_msg?: string; + certificate_authority?: Management.DomainCertificateAuthorityEnum; + /** The certificate will be renewed prior to this date. */ + renews_before?: string; +} diff --git a/src/management/api/types/DomainCertificateAuthorityEnum.ts b/src/management/api/types/DomainCertificateAuthorityEnum.ts new file mode 100644 index 0000000000..75a4083489 --- /dev/null +++ b/src/management/api/types/DomainCertificateAuthorityEnum.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The Certificate Authority issued the certificate. */ +export const DomainCertificateAuthorityEnum = { + Letsencrypt: "letsencrypt", + Googletrust: "googletrust", +} as const; +export type DomainCertificateAuthorityEnum = + (typeof DomainCertificateAuthorityEnum)[keyof typeof DomainCertificateAuthorityEnum]; diff --git a/src/management/api/types/DomainCertificateStatusEnum.ts b/src/management/api/types/DomainCertificateStatusEnum.ts new file mode 100644 index 0000000000..211e20b88e --- /dev/null +++ b/src/management/api/types/DomainCertificateStatusEnum.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The provisioning status of the certificate. */ +export const DomainCertificateStatusEnum = { + Provisioning: "provisioning", + ProvisioningFailed: "provisioning_failed", + Provisioned: "provisioned", + RenewingFailed: "renewing_failed", +} as const; +export type DomainCertificateStatusEnum = + (typeof DomainCertificateStatusEnum)[keyof typeof DomainCertificateStatusEnum]; diff --git a/src/management/api/types/DomainVerification.ts b/src/management/api/types/DomainVerification.ts index 5600f7cb6c..da81e2c4f9 100644 --- a/src/management/api/types/DomainVerification.ts +++ b/src/management/api/types/DomainVerification.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -10,4 +8,9 @@ import * as Management from "../index.js"; export interface DomainVerification { /** Domain verification methods. */ methods?: Management.DomainVerificationMethod[]; + status?: Management.DomainVerificationStatusEnum; + /** The user0-friendly error message in case of failed verification. This field is relevant only for Custom Domains with Auth0-Managed Certificates. */ + error_msg?: string; + /** The date and time when the custom domain was last verified. This field is relevant only for Custom Domains with Auth0-Managed Certificates. */ + last_verified_at?: string; } diff --git a/src/management/api/types/DomainVerificationMethod.ts b/src/management/api/types/DomainVerificationMethod.ts index b2e03ee47c..b068118245 100644 --- a/src/management/api/types/DomainVerificationMethod.ts +++ b/src/management/api/types/DomainVerificationMethod.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/DomainVerificationMethodNameEnum.ts b/src/management/api/types/DomainVerificationMethodNameEnum.ts index be9135798e..71312571eb 100644 --- a/src/management/api/types/DomainVerificationMethodNameEnum.ts +++ b/src/management/api/types/DomainVerificationMethodNameEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Domain verification method. - */ -export type DomainVerificationMethodNameEnum = "cname" | "txt"; +/** Domain verification method. */ export const DomainVerificationMethodNameEnum = { Cname: "cname", Txt: "txt", } as const; +export type DomainVerificationMethodNameEnum = + (typeof DomainVerificationMethodNameEnum)[keyof typeof DomainVerificationMethodNameEnum]; diff --git a/src/management/api/types/DomainVerificationStatusEnum.ts b/src/management/api/types/DomainVerificationStatusEnum.ts new file mode 100644 index 0000000000..2ef87ba618 --- /dev/null +++ b/src/management/api/types/DomainVerificationStatusEnum.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** The DNS record verification status. This field is relevant only for Custom Domains with Auth0-Managed Certificates. */ +export const DomainVerificationStatusEnum = { + Verified: "verified", + Pending: "pending", + Failed: "failed", +} as const; +export type DomainVerificationStatusEnum = + (typeof DomainVerificationStatusEnum)[keyof typeof DomainVerificationStatusEnum]; diff --git a/src/management/api/types/EmailAttribute.ts b/src/management/api/types/EmailAttribute.ts index 106fd17f46..3fdd41d8d3 100644 --- a/src/management/api/types/EmailAttribute.ts +++ b/src/management/api/types/EmailAttribute.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EmailMailgunRegionEnum.ts b/src/management/api/types/EmailMailgunRegionEnum.ts index 5746043316..9b89be6f78 100644 --- a/src/management/api/types/EmailMailgunRegionEnum.ts +++ b/src/management/api/types/EmailMailgunRegionEnum.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Set to eu if your domain is provisioned to use Mailgun's EU region. Otherwise, set to null. */ -export type EmailMailgunRegionEnum = string; +export type EmailMailgunRegionEnum = "eu"; diff --git a/src/management/api/types/EmailProviderCredentials.ts b/src/management/api/types/EmailProviderCredentials.ts index f5938f214d..f9d4210077 100644 --- a/src/management/api/types/EmailProviderCredentials.ts +++ b/src/management/api/types/EmailProviderCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Credentials required to use the provider. diff --git a/src/management/api/types/EmailProviderCredentialsSchema.ts b/src/management/api/types/EmailProviderCredentialsSchema.ts index d65d50d9c5..1a67a34707 100644 --- a/src/management/api/types/EmailProviderCredentialsSchema.ts +++ b/src/management/api/types/EmailProviderCredentialsSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EmailProviderNameEnum.ts b/src/management/api/types/EmailProviderNameEnum.ts index 287b85587e..d4734a7626 100644 --- a/src/management/api/types/EmailProviderNameEnum.ts +++ b/src/management/api/types/EmailProviderNameEnum.ts @@ -1,20 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. - */ -export type EmailProviderNameEnum = - | "mailgun" - | "mandrill" - | "sendgrid" - | "ses" - | "sparkpost" - | "smtp" - | "azure_cs" - | "ms365" - | "custom"; +/** Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. */ export const EmailProviderNameEnum = { Mailgun: "mailgun", Mandrill: "mandrill", @@ -26,3 +12,4 @@ export const EmailProviderNameEnum = { Ms365: "ms365", Custom: "custom", } as const; +export type EmailProviderNameEnum = (typeof EmailProviderNameEnum)[keyof typeof EmailProviderNameEnum]; diff --git a/src/management/api/types/EmailProviderSettings.ts b/src/management/api/types/EmailProviderSettings.ts index 49ff0e920b..359562b772 100644 --- a/src/management/api/types/EmailProviderSettings.ts +++ b/src/management/api/types/EmailProviderSettings.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Specific provider setting diff --git a/src/management/api/types/EmailSmtpHost.ts b/src/management/api/types/EmailSmtpHost.ts index a1fcb44147..520b44bdb4 100644 --- a/src/management/api/types/EmailSmtpHost.ts +++ b/src/management/api/types/EmailSmtpHost.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * SMTP host. diff --git a/src/management/api/types/EmailSparkPostRegionEnum.ts b/src/management/api/types/EmailSparkPostRegionEnum.ts index 99f4271f32..c6e3c5f329 100644 --- a/src/management/api/types/EmailSparkPostRegionEnum.ts +++ b/src/management/api/types/EmailSparkPostRegionEnum.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Set to eu to use SparkPost service hosted in Western Europe. To use SparkPost hosted in North America, set it to null. */ -export type EmailSparkPostRegionEnum = string; +export type EmailSparkPostRegionEnum = "eu"; diff --git a/src/management/api/types/EmailSpecificProviderSettingsWithAdditionalProperties.ts b/src/management/api/types/EmailSpecificProviderSettingsWithAdditionalProperties.ts index 4483402aa6..3a6a69fed7 100644 --- a/src/management/api/types/EmailSpecificProviderSettingsWithAdditionalProperties.ts +++ b/src/management/api/types/EmailSpecificProviderSettingsWithAdditionalProperties.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Specific provider setting */ -export type EmailSpecificProviderSettingsWithAdditionalProperties = Record | undefined; +export type EmailSpecificProviderSettingsWithAdditionalProperties = (Record | null) | undefined; diff --git a/src/management/api/types/EmailTemplateNameEnum.ts b/src/management/api/types/EmailTemplateNameEnum.ts index 18571d0d7b..dc9fd77ca4 100644 --- a/src/management/api/types/EmailTemplateNameEnum.ts +++ b/src/management/api/types/EmailTemplateNameEnum.ts @@ -1,24 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). - */ -export type EmailTemplateNameEnum = - | "verify_email" - | "verify_email_by_code" - | "reset_email" - | "reset_email_by_code" - | "welcome_email" - | "blocked_account" - | "stolen_credentials" - | "enrollment_email" - | "mfa_oob_code" - | "user_invitation" - | "change_password" - | "password_reset" - | "async_approval"; +/** Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy). */ export const EmailTemplateNameEnum = { VerifyEmail: "verify_email", VerifyEmailByCode: "verify_email_by_code", @@ -34,3 +16,4 @@ export const EmailTemplateNameEnum = { PasswordReset: "password_reset", AsyncApproval: "async_approval", } as const; +export type EmailTemplateNameEnum = (typeof EmailTemplateNameEnum)[keyof typeof EmailTemplateNameEnum]; diff --git a/src/management/api/types/EncryptionKey.ts b/src/management/api/types/EncryptionKey.ts index ef5b8c636d..d056e18fce 100644 --- a/src/management/api/types/EncryptionKey.ts +++ b/src/management/api/types/EncryptionKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EncryptionKeyPublicWrappingAlgorithm.ts b/src/management/api/types/EncryptionKeyPublicWrappingAlgorithm.ts index 66bbb780d1..442b0b5cc8 100644 --- a/src/management/api/types/EncryptionKeyPublicWrappingAlgorithm.ts +++ b/src/management/api/types/EncryptionKeyPublicWrappingAlgorithm.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Encryption algorithm that shall be used to wrap your key material diff --git a/src/management/api/types/EncryptionKeyState.ts b/src/management/api/types/EncryptionKeyState.ts index 457962b7fb..453c0a3d95 100644 --- a/src/management/api/types/EncryptionKeyState.ts +++ b/src/management/api/types/EncryptionKeyState.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Key state - */ -export type EncryptionKeyState = "pre-activation" | "active" | "deactivated" | "destroyed"; +/** Key state */ export const EncryptionKeyState = { PreActivation: "pre-activation", Active: "active", Deactivated: "deactivated", Destroyed: "destroyed", } as const; +export type EncryptionKeyState = (typeof EncryptionKeyState)[keyof typeof EncryptionKeyState]; diff --git a/src/management/api/types/EncryptionKeyType.ts b/src/management/api/types/EncryptionKeyType.ts index b482715b19..33f25b6c79 100644 --- a/src/management/api/types/EncryptionKeyType.ts +++ b/src/management/api/types/EncryptionKeyType.ts @@ -1,18 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Key type - */ -export type EncryptionKeyType = - | "customer-provided-root-key" - | "environment-root-key" - | "tenant-master-key" - | "tenant-encryption-key"; +/** Key type */ export const EncryptionKeyType = { CustomerProvidedRootKey: "customer-provided-root-key", EnvironmentRootKey: "environment-root-key", TenantMasterKey: "tenant-master-key", TenantEncryptionKey: "tenant-encryption-key", } as const; +export type EncryptionKeyType = (typeof EncryptionKeyType)[keyof typeof EncryptionKeyType]; diff --git a/src/management/api/types/EventStreamActionConfiguration.ts b/src/management/api/types/EventStreamActionConfiguration.ts index 048eb968c6..60816b429b 100644 --- a/src/management/api/types/EventStreamActionConfiguration.ts +++ b/src/management/api/types/EventStreamActionConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Configuration specific to an action destination. diff --git a/src/management/api/types/EventStreamActionDestination.ts b/src/management/api/types/EventStreamActionDestination.ts index 36ca2c50bd..e05c396bdf 100644 --- a/src/management/api/types/EventStreamActionDestination.ts +++ b/src/management/api/types/EventStreamActionDestination.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamActionDestinationTypeEnum.ts b/src/management/api/types/EventStreamActionDestinationTypeEnum.ts index 6d7a59ea1b..e45cc43d34 100644 --- a/src/management/api/types/EventStreamActionDestinationTypeEnum.ts +++ b/src/management/api/types/EventStreamActionDestinationTypeEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type EventStreamActionDestinationTypeEnum = "action"; diff --git a/src/management/api/types/EventStreamActionResponseContent.ts b/src/management/api/types/EventStreamActionResponseContent.ts index 1dd7cd3707..f41d4aa908 100644 --- a/src/management/api/types/EventStreamActionResponseContent.ts +++ b/src/management/api/types/EventStreamActionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamCloudEvent.ts b/src/management/api/types/EventStreamCloudEvent.ts index 0449df7050..22a55ef183 100644 --- a/src/management/api/types/EventStreamCloudEvent.ts +++ b/src/management/api/types/EventStreamCloudEvent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Event content. This will only be set if delivery failed. diff --git a/src/management/api/types/EventStreamDelivery.ts b/src/management/api/types/EventStreamDelivery.ts index 7ce5265957..3a2a056e91 100644 --- a/src/management/api/types/EventStreamDelivery.ts +++ b/src/management/api/types/EventStreamDelivery.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamDeliveryAttempt.ts b/src/management/api/types/EventStreamDeliveryAttempt.ts index 0e6013f9fa..b4f865e622 100644 --- a/src/management/api/types/EventStreamDeliveryAttempt.ts +++ b/src/management/api/types/EventStreamDeliveryAttempt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamDeliveryEventTypeEnum.ts b/src/management/api/types/EventStreamDeliveryEventTypeEnum.ts index c831f26b33..387873b516 100644 --- a/src/management/api/types/EventStreamDeliveryEventTypeEnum.ts +++ b/src/management/api/types/EventStreamDeliveryEventTypeEnum.ts @@ -1,24 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Type of event - */ -export type EventStreamDeliveryEventTypeEnum = - | "user.created" - | "user.deleted" - | "user.updated" - | "organization.created" - | "organization.updated" - | "organization.deleted" - | "organization.member.added" - | "organization.member.deleted" - | "organization.member.role.assigned" - | "organization.member.role.deleted" - | "organization.connection.added" - | "organization.connection.updated" - | "organization.connection.removed"; +/** Type of event */ export const EventStreamDeliveryEventTypeEnum = { UserCreated: "user.created", UserDeleted: "user.deleted", @@ -33,4 +15,11 @@ export const EventStreamDeliveryEventTypeEnum = { OrganizationConnectionAdded: "organization.connection.added", OrganizationConnectionUpdated: "organization.connection.updated", OrganizationConnectionRemoved: "organization.connection.removed", + GroupCreated: "group.created", + GroupUpdated: "group.updated", + GroupDeleted: "group.deleted", + GroupMemberAdded: "group.member.added", + GroupMemberDeleted: "group.member.deleted", } as const; +export type EventStreamDeliveryEventTypeEnum = + (typeof EventStreamDeliveryEventTypeEnum)[keyof typeof EventStreamDeliveryEventTypeEnum]; diff --git a/src/management/api/types/EventStreamDeliveryStatusEnum.ts b/src/management/api/types/EventStreamDeliveryStatusEnum.ts index 65d17ffda5..f518422f00 100644 --- a/src/management/api/types/EventStreamDeliveryStatusEnum.ts +++ b/src/management/api/types/EventStreamDeliveryStatusEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Delivery status diff --git a/src/management/api/types/EventStreamDestinationPatch.ts b/src/management/api/types/EventStreamDestinationPatch.ts index 68741a31fc..9848671fcc 100644 --- a/src/management/api/types/EventStreamDestinationPatch.ts +++ b/src/management/api/types/EventStreamDestinationPatch.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamEventBridgeAwsRegionEnum.ts b/src/management/api/types/EventStreamEventBridgeAwsRegionEnum.ts index 0f7271b8bc..a9aa9e67f8 100644 --- a/src/management/api/types/EventStreamEventBridgeAwsRegionEnum.ts +++ b/src/management/api/types/EventStreamEventBridgeAwsRegionEnum.ts @@ -1,47 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * AWS Region for EventBridge destination. - */ -export type EventStreamEventBridgeAwsRegionEnum = - | "af-south-1" - | "ap-east-1" - | "ap-east-2" - | "ap-northeast-1" - | "ap-northeast-2" - | "ap-northeast-3" - | "ap-south-1" - | "ap-south-2" - | "ap-southeast-1" - | "ap-southeast-2" - | "ap-southeast-3" - | "ap-southeast-4" - | "ap-southeast-5" - | "ap-southeast-6" - | "ap-southeast-7" - | "ca-central-1" - | "ca-west-1" - | "eu-central-1" - | "eu-central-2" - | "eu-north-1" - | "eu-south-1" - | "eu-south-2" - | "eu-west-1" - | "eu-west-2" - | "eu-west-3" - | "il-central-1" - | "me-central-1" - | "me-south-1" - | "mx-central-1" - | "sa-east-1" - | "us-gov-east-1" - | "us-gov-west-1" - | "us-east-1" - | "us-east-2" - | "us-west-1" - | "us-west-2"; +/** AWS Region for EventBridge destination. */ export const EventStreamEventBridgeAwsRegionEnum = { AfSouth1: "af-south-1", ApEast1: "ap-east-1", @@ -80,3 +39,5 @@ export const EventStreamEventBridgeAwsRegionEnum = { UsWest1: "us-west-1", UsWest2: "us-west-2", } as const; +export type EventStreamEventBridgeAwsRegionEnum = + (typeof EventStreamEventBridgeAwsRegionEnum)[keyof typeof EventStreamEventBridgeAwsRegionEnum]; diff --git a/src/management/api/types/EventStreamEventBridgeConfiguration.ts b/src/management/api/types/EventStreamEventBridgeConfiguration.ts index 36fa2c3af5..68dd8cd7a8 100644 --- a/src/management/api/types/EventStreamEventBridgeConfiguration.ts +++ b/src/management/api/types/EventStreamEventBridgeConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamEventBridgeDestination.ts b/src/management/api/types/EventStreamEventBridgeDestination.ts index 303b88519b..a1f08d6c79 100644 --- a/src/management/api/types/EventStreamEventBridgeDestination.ts +++ b/src/management/api/types/EventStreamEventBridgeDestination.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamEventBridgeDestinationTypeEnum.ts b/src/management/api/types/EventStreamEventBridgeDestinationTypeEnum.ts index 076dba3bb4..73944353a2 100644 --- a/src/management/api/types/EventStreamEventBridgeDestinationTypeEnum.ts +++ b/src/management/api/types/EventStreamEventBridgeDestinationTypeEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type EventStreamEventBridgeDestinationTypeEnum = "eventbridge"; diff --git a/src/management/api/types/EventStreamEventBridgeResponseContent.ts b/src/management/api/types/EventStreamEventBridgeResponseContent.ts index 334ef0f30f..c8d51ff54c 100644 --- a/src/management/api/types/EventStreamEventBridgeResponseContent.ts +++ b/src/management/api/types/EventStreamEventBridgeResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamEventTypeEnum.ts b/src/management/api/types/EventStreamEventTypeEnum.ts index 7b7ed4fcc6..4de6b4cddb 100644 --- a/src/management/api/types/EventStreamEventTypeEnum.ts +++ b/src/management/api/types/EventStreamEventTypeEnum.ts @@ -1,21 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type EventStreamEventTypeEnum = - | "user.created" - | "user.deleted" - | "user.updated" - | "organization.created" - | "organization.updated" - | "organization.deleted" - | "organization.member.added" - | "organization.member.deleted" - | "organization.member.role.assigned" - | "organization.member.role.deleted" - | "organization.connection.added" - | "organization.connection.updated" - | "organization.connection.removed"; export const EventStreamEventTypeEnum = { UserCreated: "user.created", UserDeleted: "user.deleted", @@ -30,4 +14,10 @@ export const EventStreamEventTypeEnum = { OrganizationConnectionAdded: "organization.connection.added", OrganizationConnectionUpdated: "organization.connection.updated", OrganizationConnectionRemoved: "organization.connection.removed", + GroupCreated: "group.created", + GroupUpdated: "group.updated", + GroupDeleted: "group.deleted", + GroupMemberAdded: "group.member.added", + GroupMemberDeleted: "group.member.deleted", } as const; +export type EventStreamEventTypeEnum = (typeof EventStreamEventTypeEnum)[keyof typeof EventStreamEventTypeEnum]; diff --git a/src/management/api/types/EventStreamResponseContent.ts b/src/management/api/types/EventStreamResponseContent.ts index 4b2db685ef..df763ef5a8 100644 --- a/src/management/api/types/EventStreamResponseContent.ts +++ b/src/management/api/types/EventStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamStatusEnum.ts b/src/management/api/types/EventStreamStatusEnum.ts index fa6ad2d822..ccaca81b95 100644 --- a/src/management/api/types/EventStreamStatusEnum.ts +++ b/src/management/api/types/EventStreamStatusEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Indicates whether the event stream is actively forwarding events. - */ -export type EventStreamStatusEnum = "enabled" | "disabled"; +/** Indicates whether the event stream is actively forwarding events. */ export const EventStreamStatusEnum = { Enabled: "enabled", Disabled: "disabled", } as const; +export type EventStreamStatusEnum = (typeof EventStreamStatusEnum)[keyof typeof EventStreamStatusEnum]; diff --git a/src/management/api/types/EventStreamSubscription.ts b/src/management/api/types/EventStreamSubscription.ts index cab6bf38ff..199604ab9d 100644 --- a/src/management/api/types/EventStreamSubscription.ts +++ b/src/management/api/types/EventStreamSubscription.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Event types diff --git a/src/management/api/types/EventStreamTestEventTypeEnum.ts b/src/management/api/types/EventStreamTestEventTypeEnum.ts index 6f82d7da5a..e1b40675ad 100644 --- a/src/management/api/types/EventStreamTestEventTypeEnum.ts +++ b/src/management/api/types/EventStreamTestEventTypeEnum.ts @@ -1,24 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The type of event this test event represents. - */ -export type EventStreamTestEventTypeEnum = - | "user.created" - | "user.deleted" - | "user.updated" - | "organization.created" - | "organization.updated" - | "organization.deleted" - | "organization.member.added" - | "organization.member.deleted" - | "organization.member.role.assigned" - | "organization.member.role.deleted" - | "organization.connection.added" - | "organization.connection.updated" - | "organization.connection.removed"; +/** The type of event this test event represents. */ export const EventStreamTestEventTypeEnum = { UserCreated: "user.created", UserDeleted: "user.deleted", @@ -33,4 +15,11 @@ export const EventStreamTestEventTypeEnum = { OrganizationConnectionAdded: "organization.connection.added", OrganizationConnectionUpdated: "organization.connection.updated", OrganizationConnectionRemoved: "organization.connection.removed", + GroupCreated: "group.created", + GroupUpdated: "group.updated", + GroupDeleted: "group.deleted", + GroupMemberAdded: "group.member.added", + GroupMemberDeleted: "group.member.deleted", } as const; +export type EventStreamTestEventTypeEnum = + (typeof EventStreamTestEventTypeEnum)[keyof typeof EventStreamTestEventTypeEnum]; diff --git a/src/management/api/types/EventStreamWebhookAuthorizationResponse.ts b/src/management/api/types/EventStreamWebhookAuthorizationResponse.ts index 0f0b36a988..b7a7775c7b 100644 --- a/src/management/api/types/EventStreamWebhookAuthorizationResponse.ts +++ b/src/management/api/types/EventStreamWebhookAuthorizationResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamWebhookBasicAuth.ts b/src/management/api/types/EventStreamWebhookBasicAuth.ts index a11ab44232..2ae496ac9e 100644 --- a/src/management/api/types/EventStreamWebhookBasicAuth.ts +++ b/src/management/api/types/EventStreamWebhookBasicAuth.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamWebhookBasicAuthMethodEnum.ts b/src/management/api/types/EventStreamWebhookBasicAuthMethodEnum.ts index 252da6fe7d..93bf0f6b7d 100644 --- a/src/management/api/types/EventStreamWebhookBasicAuthMethodEnum.ts +++ b/src/management/api/types/EventStreamWebhookBasicAuthMethodEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Type of authorization. diff --git a/src/management/api/types/EventStreamWebhookBearerAuth.ts b/src/management/api/types/EventStreamWebhookBearerAuth.ts index 52c4473a50..d12d379807 100644 --- a/src/management/api/types/EventStreamWebhookBearerAuth.ts +++ b/src/management/api/types/EventStreamWebhookBearerAuth.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamWebhookBearerAuthMethodEnum.ts b/src/management/api/types/EventStreamWebhookBearerAuthMethodEnum.ts index 4eba3dd851..70b163b876 100644 --- a/src/management/api/types/EventStreamWebhookBearerAuthMethodEnum.ts +++ b/src/management/api/types/EventStreamWebhookBearerAuthMethodEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Type of authorization. diff --git a/src/management/api/types/EventStreamWebhookConfiguration.ts b/src/management/api/types/EventStreamWebhookConfiguration.ts index 29caf7685b..e0deeb53a1 100644 --- a/src/management/api/types/EventStreamWebhookConfiguration.ts +++ b/src/management/api/types/EventStreamWebhookConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamWebhookDestination.ts b/src/management/api/types/EventStreamWebhookDestination.ts index 69f19ab660..868fadc7ef 100644 --- a/src/management/api/types/EventStreamWebhookDestination.ts +++ b/src/management/api/types/EventStreamWebhookDestination.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/EventStreamWebhookDestinationTypeEnum.ts b/src/management/api/types/EventStreamWebhookDestinationTypeEnum.ts index 1554209dfe..21bcd65c63 100644 --- a/src/management/api/types/EventStreamWebhookDestinationTypeEnum.ts +++ b/src/management/api/types/EventStreamWebhookDestinationTypeEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type EventStreamWebhookDestinationTypeEnum = "webhook"; diff --git a/src/management/api/types/EventStreamWebhookResponseContent.ts b/src/management/api/types/EventStreamWebhookResponseContent.ts index 95a7b4e32f..565f860c77 100644 --- a/src/management/api/types/EventStreamWebhookResponseContent.ts +++ b/src/management/api/types/EventStreamWebhookResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ExtensibilityEmailProviderCredentials.ts b/src/management/api/types/ExtensibilityEmailProviderCredentials.ts index 4dff1a26e6..7fe99f3294 100644 --- a/src/management/api/types/ExtensibilityEmailProviderCredentials.ts +++ b/src/management/api/types/ExtensibilityEmailProviderCredentials.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ExtensibilityEmailProviderCredentials {} diff --git a/src/management/api/types/FederatedConnectionTokenSet.ts b/src/management/api/types/FederatedConnectionTokenSet.ts index a50fa92fb6..5abe8cb3c1 100644 --- a/src/management/api/types/FederatedConnectionTokenSet.ts +++ b/src/management/api/types/FederatedConnectionTokenSet.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FederatedConnectionTokenSet { id?: string; diff --git a/src/management/api/types/FlowAction.ts b/src/management/api/types/FlowAction.ts index 1080ff5e82..f05a6486d9 100644 --- a/src/management/api/types/FlowAction.ts +++ b/src/management/api/types/FlowAction.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionActivecampaign.ts b/src/management/api/types/FlowActionActivecampaign.ts index 8f6d86d659..224860990e 100644 --- a/src/management/api/types/FlowActionActivecampaign.ts +++ b/src/management/api/types/FlowActionActivecampaign.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionActivecampaignListContacts.ts b/src/management/api/types/FlowActionActivecampaignListContacts.ts index 1a17a83197..42aa8ac978 100644 --- a/src/management/api/types/FlowActionActivecampaignListContacts.ts +++ b/src/management/api/types/FlowActionActivecampaignListContacts.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionActivecampaignListContactsParams.ts b/src/management/api/types/FlowActionActivecampaignListContactsParams.ts index 40da036e68..e62239e000 100644 --- a/src/management/api/types/FlowActionActivecampaignListContactsParams.ts +++ b/src/management/api/types/FlowActionActivecampaignListContactsParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionActivecampaignListContactsParams { connection_id: string; diff --git a/src/management/api/types/FlowActionActivecampaignUpsertContact.ts b/src/management/api/types/FlowActionActivecampaignUpsertContact.ts index f2c14968ee..3bcfc3cd86 100644 --- a/src/management/api/types/FlowActionActivecampaignUpsertContact.ts +++ b/src/management/api/types/FlowActionActivecampaignUpsertContact.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionActivecampaignUpsertContactParams.ts b/src/management/api/types/FlowActionActivecampaignUpsertContactParams.ts index 7fc3255691..edbd82c232 100644 --- a/src/management/api/types/FlowActionActivecampaignUpsertContactParams.ts +++ b/src/management/api/types/FlowActionActivecampaignUpsertContactParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionActivecampaignUpsertContactParamsCustomFields.ts b/src/management/api/types/FlowActionActivecampaignUpsertContactParamsCustomFields.ts index b797c1a58e..d52b031d81 100644 --- a/src/management/api/types/FlowActionActivecampaignUpsertContactParamsCustomFields.ts +++ b/src/management/api/types/FlowActionActivecampaignUpsertContactParamsCustomFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionActivecampaignUpsertContactParamsCustomFields = Record; diff --git a/src/management/api/types/FlowActionAirtable.ts b/src/management/api/types/FlowActionAirtable.ts index 5b42e90d88..00e5c8f3b2 100644 --- a/src/management/api/types/FlowActionAirtable.ts +++ b/src/management/api/types/FlowActionAirtable.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAirtableCreateRecord.ts b/src/management/api/types/FlowActionAirtableCreateRecord.ts index fb509a5adb..496927938a 100644 --- a/src/management/api/types/FlowActionAirtableCreateRecord.ts +++ b/src/management/api/types/FlowActionAirtableCreateRecord.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAirtableCreateRecordParams.ts b/src/management/api/types/FlowActionAirtableCreateRecordParams.ts index 43c09db7fb..b7f6c28ad3 100644 --- a/src/management/api/types/FlowActionAirtableCreateRecordParams.ts +++ b/src/management/api/types/FlowActionAirtableCreateRecordParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAirtableCreateRecordParamsFields.ts b/src/management/api/types/FlowActionAirtableCreateRecordParamsFields.ts index b15b7cbcf8..b29adbd8e1 100644 --- a/src/management/api/types/FlowActionAirtableCreateRecordParamsFields.ts +++ b/src/management/api/types/FlowActionAirtableCreateRecordParamsFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAirtableCreateRecordParamsFields = Record; diff --git a/src/management/api/types/FlowActionAirtableListRecords.ts b/src/management/api/types/FlowActionAirtableListRecords.ts index f627877093..436bd855fd 100644 --- a/src/management/api/types/FlowActionAirtableListRecords.ts +++ b/src/management/api/types/FlowActionAirtableListRecords.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAirtableListRecordsParams.ts b/src/management/api/types/FlowActionAirtableListRecordsParams.ts index f81ac95b82..13f030673d 100644 --- a/src/management/api/types/FlowActionAirtableListRecordsParams.ts +++ b/src/management/api/types/FlowActionAirtableListRecordsParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionAirtableListRecordsParams { connection_id: string; diff --git a/src/management/api/types/FlowActionAirtableUpdateRecord.ts b/src/management/api/types/FlowActionAirtableUpdateRecord.ts index e759213f0c..6150b13fc8 100644 --- a/src/management/api/types/FlowActionAirtableUpdateRecord.ts +++ b/src/management/api/types/FlowActionAirtableUpdateRecord.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAirtableUpdateRecordParams.ts b/src/management/api/types/FlowActionAirtableUpdateRecordParams.ts index 74ca652178..2289da3afe 100644 --- a/src/management/api/types/FlowActionAirtableUpdateRecordParams.ts +++ b/src/management/api/types/FlowActionAirtableUpdateRecordParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAirtableUpdateRecordParamsFields.ts b/src/management/api/types/FlowActionAirtableUpdateRecordParamsFields.ts index 1208098156..a3ca34244c 100644 --- a/src/management/api/types/FlowActionAirtableUpdateRecordParamsFields.ts +++ b/src/management/api/types/FlowActionAirtableUpdateRecordParamsFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAirtableUpdateRecordParamsFields = Record; diff --git a/src/management/api/types/FlowActionAuth0.ts b/src/management/api/types/FlowActionAuth0.ts index f0c95c94e0..a735393b32 100644 --- a/src/management/api/types/FlowActionAuth0.ts +++ b/src/management/api/types/FlowActionAuth0.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0CreateUser.ts b/src/management/api/types/FlowActionAuth0CreateUser.ts index aa62e303ee..1cb8a176cc 100644 --- a/src/management/api/types/FlowActionAuth0CreateUser.ts +++ b/src/management/api/types/FlowActionAuth0CreateUser.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0CreateUserParams.ts b/src/management/api/types/FlowActionAuth0CreateUserParams.ts index 66a27f48aa..47fbffa292 100644 --- a/src/management/api/types/FlowActionAuth0CreateUserParams.ts +++ b/src/management/api/types/FlowActionAuth0CreateUserParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0CreateUserParamsPayload.ts b/src/management/api/types/FlowActionAuth0CreateUserParamsPayload.ts index 3a2b0c0ee0..83a28131db 100644 --- a/src/management/api/types/FlowActionAuth0CreateUserParamsPayload.ts +++ b/src/management/api/types/FlowActionAuth0CreateUserParamsPayload.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAuth0CreateUserParamsPayload = Record; diff --git a/src/management/api/types/FlowActionAuth0GetUser.ts b/src/management/api/types/FlowActionAuth0GetUser.ts index c22cd07729..70771d1940 100644 --- a/src/management/api/types/FlowActionAuth0GetUser.ts +++ b/src/management/api/types/FlowActionAuth0GetUser.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0GetUserParams.ts b/src/management/api/types/FlowActionAuth0GetUserParams.ts index 54a3eb3108..490b811d11 100644 --- a/src/management/api/types/FlowActionAuth0GetUserParams.ts +++ b/src/management/api/types/FlowActionAuth0GetUserParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionAuth0GetUserParams { connection_id: string; diff --git a/src/management/api/types/FlowActionAuth0SendRequest.ts b/src/management/api/types/FlowActionAuth0SendRequest.ts index a64ca5d3cb..1adcd8a601 100644 --- a/src/management/api/types/FlowActionAuth0SendRequest.ts +++ b/src/management/api/types/FlowActionAuth0SendRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0SendRequestParams.ts b/src/management/api/types/FlowActionAuth0SendRequestParams.ts index f88a6cded9..2405104589 100644 --- a/src/management/api/types/FlowActionAuth0SendRequestParams.ts +++ b/src/management/api/types/FlowActionAuth0SendRequestParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -14,7 +12,6 @@ export interface FlowActionAuth0SendRequestParams { } export namespace FlowActionAuth0SendRequestParams { - export type Method = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; export const Method = { Get: "GET", Post: "POST", @@ -22,4 +19,5 @@ export namespace FlowActionAuth0SendRequestParams { Patch: "PATCH", Delete: "DELETE", } as const; + export type Method = (typeof Method)[keyof typeof Method]; } diff --git a/src/management/api/types/FlowActionAuth0SendRequestParamsHeaders.ts b/src/management/api/types/FlowActionAuth0SendRequestParamsHeaders.ts index 5364a577ce..f0867d0417 100644 --- a/src/management/api/types/FlowActionAuth0SendRequestParamsHeaders.ts +++ b/src/management/api/types/FlowActionAuth0SendRequestParamsHeaders.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAuth0SendRequestParamsHeaders = Record; diff --git a/src/management/api/types/FlowActionAuth0SendRequestParamsPayload.ts b/src/management/api/types/FlowActionAuth0SendRequestParamsPayload.ts index 89f23c3083..73285dd063 100644 --- a/src/management/api/types/FlowActionAuth0SendRequestParamsPayload.ts +++ b/src/management/api/types/FlowActionAuth0SendRequestParamsPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0SendRequestParamsPayloadObject.ts b/src/management/api/types/FlowActionAuth0SendRequestParamsPayloadObject.ts index 9c310270ac..b0707c7196 100644 --- a/src/management/api/types/FlowActionAuth0SendRequestParamsPayloadObject.ts +++ b/src/management/api/types/FlowActionAuth0SendRequestParamsPayloadObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAuth0SendRequestParamsPayloadObject = Record; diff --git a/src/management/api/types/FlowActionAuth0SendRequestParamsQueryParams.ts b/src/management/api/types/FlowActionAuth0SendRequestParamsQueryParams.ts index 5bcf6c8c7a..ac69c56760 100644 --- a/src/management/api/types/FlowActionAuth0SendRequestParamsQueryParams.ts +++ b/src/management/api/types/FlowActionAuth0SendRequestParamsQueryParams.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAuth0SendRequestParamsQueryParams = Record< string, - FlowActionAuth0SendRequestParamsQueryParams.Value | undefined + (FlowActionAuth0SendRequestParamsQueryParams.Value | null) | undefined >; export namespace FlowActionAuth0SendRequestParamsQueryParams { diff --git a/src/management/api/types/FlowActionAuth0UpdateUser.ts b/src/management/api/types/FlowActionAuth0UpdateUser.ts index 506931fd14..c0de6aeaf8 100644 --- a/src/management/api/types/FlowActionAuth0UpdateUser.ts +++ b/src/management/api/types/FlowActionAuth0UpdateUser.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0UpdateUserParams.ts b/src/management/api/types/FlowActionAuth0UpdateUserParams.ts index 8cced20b46..571a68502a 100644 --- a/src/management/api/types/FlowActionAuth0UpdateUserParams.ts +++ b/src/management/api/types/FlowActionAuth0UpdateUserParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionAuth0UpdateUserParamsChanges.ts b/src/management/api/types/FlowActionAuth0UpdateUserParamsChanges.ts index 3152fd4cd1..956eaa4af0 100644 --- a/src/management/api/types/FlowActionAuth0UpdateUserParamsChanges.ts +++ b/src/management/api/types/FlowActionAuth0UpdateUserParamsChanges.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionAuth0UpdateUserParamsChanges = Record; diff --git a/src/management/api/types/FlowActionBigquery.ts b/src/management/api/types/FlowActionBigquery.ts index 19b52b7a62..0730c1ae2a 100644 --- a/src/management/api/types/FlowActionBigquery.ts +++ b/src/management/api/types/FlowActionBigquery.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionBigqueryInsertRows.ts b/src/management/api/types/FlowActionBigqueryInsertRows.ts index 37620e9627..aaeaa1b14e 100644 --- a/src/management/api/types/FlowActionBigqueryInsertRows.ts +++ b/src/management/api/types/FlowActionBigqueryInsertRows.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionBigqueryInsertRowsParams.ts b/src/management/api/types/FlowActionBigqueryInsertRowsParams.ts index 1f7677eb79..b2affcba9f 100644 --- a/src/management/api/types/FlowActionBigqueryInsertRowsParams.ts +++ b/src/management/api/types/FlowActionBigqueryInsertRowsParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionBigqueryInsertRowsParamsData.ts b/src/management/api/types/FlowActionBigqueryInsertRowsParamsData.ts index e6f60f0ec8..417d3eafc6 100644 --- a/src/management/api/types/FlowActionBigqueryInsertRowsParamsData.ts +++ b/src/management/api/types/FlowActionBigqueryInsertRowsParamsData.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionBigqueryInsertRowsParamsData = Record; diff --git a/src/management/api/types/FlowActionClearbit.ts b/src/management/api/types/FlowActionClearbit.ts index 3f1873fe42..fee0b98df1 100644 --- a/src/management/api/types/FlowActionClearbit.ts +++ b/src/management/api/types/FlowActionClearbit.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionClearbitFindCompany.ts b/src/management/api/types/FlowActionClearbitFindCompany.ts index 975ca200e7..dcaf96daa8 100644 --- a/src/management/api/types/FlowActionClearbitFindCompany.ts +++ b/src/management/api/types/FlowActionClearbitFindCompany.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionClearbitFindCompanyParams.ts b/src/management/api/types/FlowActionClearbitFindCompanyParams.ts index d4386817cf..1b2f646020 100644 --- a/src/management/api/types/FlowActionClearbitFindCompanyParams.ts +++ b/src/management/api/types/FlowActionClearbitFindCompanyParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionClearbitFindCompanyParams { connection_id: string; diff --git a/src/management/api/types/FlowActionClearbitFindPerson.ts b/src/management/api/types/FlowActionClearbitFindPerson.ts index 57219b209d..972e9c5f35 100644 --- a/src/management/api/types/FlowActionClearbitFindPerson.ts +++ b/src/management/api/types/FlowActionClearbitFindPerson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionClearbitFindPersonParams.ts b/src/management/api/types/FlowActionClearbitFindPersonParams.ts index 23ca63280f..bf1a3fbd8f 100644 --- a/src/management/api/types/FlowActionClearbitFindPersonParams.ts +++ b/src/management/api/types/FlowActionClearbitFindPersonParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionClearbitFindPersonParams { connection_id: string; diff --git a/src/management/api/types/FlowActionEmail.ts b/src/management/api/types/FlowActionEmail.ts index 465aaa8803..2dec232352 100644 --- a/src/management/api/types/FlowActionEmail.ts +++ b/src/management/api/types/FlowActionEmail.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionEmailVerifyEmail.ts b/src/management/api/types/FlowActionEmailVerifyEmail.ts index e86804c878..e06caff052 100644 --- a/src/management/api/types/FlowActionEmailVerifyEmail.ts +++ b/src/management/api/types/FlowActionEmailVerifyEmail.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionEmailVerifyEmailParams.ts b/src/management/api/types/FlowActionEmailVerifyEmailParams.ts index 348b70410a..71560ad2b7 100644 --- a/src/management/api/types/FlowActionEmailVerifyEmailParams.ts +++ b/src/management/api/types/FlowActionEmailVerifyEmailParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionEmailVerifyEmailParamsRules.ts b/src/management/api/types/FlowActionEmailVerifyEmailParamsRules.ts index 28ce259297..e49d2fb760 100644 --- a/src/management/api/types/FlowActionEmailVerifyEmailParamsRules.ts +++ b/src/management/api/types/FlowActionEmailVerifyEmailParamsRules.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionEmailVerifyEmailParamsRules { require_mx_record?: boolean; diff --git a/src/management/api/types/FlowActionFlow.ts b/src/management/api/types/FlowActionFlow.ts index d0ef992420..c4022e0af2 100644 --- a/src/management/api/types/FlowActionFlow.ts +++ b/src/management/api/types/FlowActionFlow.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowBooleanCondition.ts b/src/management/api/types/FlowActionFlowBooleanCondition.ts index 4e6a628d26..4fec381828 100644 --- a/src/management/api/types/FlowActionFlowBooleanCondition.ts +++ b/src/management/api/types/FlowActionFlowBooleanCondition.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowBooleanConditionParams.ts b/src/management/api/types/FlowActionFlowBooleanConditionParams.ts index 396d695e86..319f5f0fff 100644 --- a/src/management/api/types/FlowActionFlowBooleanConditionParams.ts +++ b/src/management/api/types/FlowActionFlowBooleanConditionParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowDelayFlow.ts b/src/management/api/types/FlowActionFlowDelayFlow.ts index 50fb3f3a96..a57a4795d6 100644 --- a/src/management/api/types/FlowActionFlowDelayFlow.ts +++ b/src/management/api/types/FlowActionFlowDelayFlow.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowDelayFlowParams.ts b/src/management/api/types/FlowActionFlowDelayFlowParams.ts index 4101608a0b..0117c4050a 100644 --- a/src/management/api/types/FlowActionFlowDelayFlowParams.ts +++ b/src/management/api/types/FlowActionFlowDelayFlowParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -10,11 +8,11 @@ export interface FlowActionFlowDelayFlowParams { } export namespace FlowActionFlowDelayFlowParams { - export type Units = "SECONDS" | "MINUTES" | "HOURS" | "DAYS"; export const Units = { Seconds: "SECONDS", Minutes: "MINUTES", Hours: "HOURS", Days: "DAYS", } as const; + export type Units = (typeof Units)[keyof typeof Units]; } diff --git a/src/management/api/types/FlowActionFlowDelayFlowParamsNumber.ts b/src/management/api/types/FlowActionFlowDelayFlowParamsNumber.ts index 1a0d3bf136..d60cb007d5 100644 --- a/src/management/api/types/FlowActionFlowDelayFlowParamsNumber.ts +++ b/src/management/api/types/FlowActionFlowDelayFlowParamsNumber.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionFlowDelayFlowParamsNumber = number | string; diff --git a/src/management/api/types/FlowActionFlowDoNothing.ts b/src/management/api/types/FlowActionFlowDoNothing.ts index 34e9b2ce22..1b04100ced 100644 --- a/src/management/api/types/FlowActionFlowDoNothing.ts +++ b/src/management/api/types/FlowActionFlowDoNothing.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowDoNothingParams.ts b/src/management/api/types/FlowActionFlowDoNothingParams.ts index ea564d972d..4d06f6f5a1 100644 --- a/src/management/api/types/FlowActionFlowDoNothingParams.ts +++ b/src/management/api/types/FlowActionFlowDoNothingParams.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionFlowDoNothingParams {} diff --git a/src/management/api/types/FlowActionFlowErrorMessage.ts b/src/management/api/types/FlowActionFlowErrorMessage.ts index b572c59688..a9082c76cc 100644 --- a/src/management/api/types/FlowActionFlowErrorMessage.ts +++ b/src/management/api/types/FlowActionFlowErrorMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowErrorMessageParams.ts b/src/management/api/types/FlowActionFlowErrorMessageParams.ts index b31e28c3fd..9a790fc650 100644 --- a/src/management/api/types/FlowActionFlowErrorMessageParams.ts +++ b/src/management/api/types/FlowActionFlowErrorMessageParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionFlowErrorMessageParams { message: string; diff --git a/src/management/api/types/FlowActionFlowMapValue.ts b/src/management/api/types/FlowActionFlowMapValue.ts index 8b91870240..8404c411f4 100644 --- a/src/management/api/types/FlowActionFlowMapValue.ts +++ b/src/management/api/types/FlowActionFlowMapValue.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowMapValueParams.ts b/src/management/api/types/FlowActionFlowMapValueParams.ts index 2bb1cc31a4..a9f9a49fc2 100644 --- a/src/management/api/types/FlowActionFlowMapValueParams.ts +++ b/src/management/api/types/FlowActionFlowMapValueParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowMapValueParamsCases.ts b/src/management/api/types/FlowActionFlowMapValueParamsCases.ts index 5595264df9..4a2c3cd548 100644 --- a/src/management/api/types/FlowActionFlowMapValueParamsCases.ts +++ b/src/management/api/types/FlowActionFlowMapValueParamsCases.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionFlowMapValueParamsCases = Record; diff --git a/src/management/api/types/FlowActionFlowMapValueParamsFallback.ts b/src/management/api/types/FlowActionFlowMapValueParamsFallback.ts index 668f304243..5cb23e3c66 100644 --- a/src/management/api/types/FlowActionFlowMapValueParamsFallback.ts +++ b/src/management/api/types/FlowActionFlowMapValueParamsFallback.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowMapValueParamsFallbackObject.ts b/src/management/api/types/FlowActionFlowMapValueParamsFallbackObject.ts index 7cedbb4ff2..583349c299 100644 --- a/src/management/api/types/FlowActionFlowMapValueParamsFallbackObject.ts +++ b/src/management/api/types/FlowActionFlowMapValueParamsFallbackObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionFlowMapValueParamsFallbackObject = Record; diff --git a/src/management/api/types/FlowActionFlowMapValueParamsInput.ts b/src/management/api/types/FlowActionFlowMapValueParamsInput.ts index 1a65b49154..9cf92dfe51 100644 --- a/src/management/api/types/FlowActionFlowMapValueParamsInput.ts +++ b/src/management/api/types/FlowActionFlowMapValueParamsInput.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionFlowMapValueParamsInput = string | number; diff --git a/src/management/api/types/FlowActionFlowReturnJson.ts b/src/management/api/types/FlowActionFlowReturnJson.ts index 4eab409c8f..8c7b1070ab 100644 --- a/src/management/api/types/FlowActionFlowReturnJson.ts +++ b/src/management/api/types/FlowActionFlowReturnJson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowReturnJsonParams.ts b/src/management/api/types/FlowActionFlowReturnJsonParams.ts index 20fd8e6661..6b7d20498a 100644 --- a/src/management/api/types/FlowActionFlowReturnJsonParams.ts +++ b/src/management/api/types/FlowActionFlowReturnJsonParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowReturnJsonParamsPayload.ts b/src/management/api/types/FlowActionFlowReturnJsonParamsPayload.ts index 6afc248409..b8aa3142ab 100644 --- a/src/management/api/types/FlowActionFlowReturnJsonParamsPayload.ts +++ b/src/management/api/types/FlowActionFlowReturnJsonParamsPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowReturnJsonParamsPayloadObject.ts b/src/management/api/types/FlowActionFlowReturnJsonParamsPayloadObject.ts index d43826d4ad..00bfbfafc8 100644 --- a/src/management/api/types/FlowActionFlowReturnJsonParamsPayloadObject.ts +++ b/src/management/api/types/FlowActionFlowReturnJsonParamsPayloadObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionFlowReturnJsonParamsPayloadObject = Record; diff --git a/src/management/api/types/FlowActionFlowStoreVars.ts b/src/management/api/types/FlowActionFlowStoreVars.ts index 8f94e39b78..9459486fc4 100644 --- a/src/management/api/types/FlowActionFlowStoreVars.ts +++ b/src/management/api/types/FlowActionFlowStoreVars.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowStoreVarsParams.ts b/src/management/api/types/FlowActionFlowStoreVarsParams.ts index 9b32be131a..7f4632f080 100644 --- a/src/management/api/types/FlowActionFlowStoreVarsParams.ts +++ b/src/management/api/types/FlowActionFlowStoreVarsParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionFlowStoreVarsParamsVars.ts b/src/management/api/types/FlowActionFlowStoreVarsParamsVars.ts index 0d5be47d7b..1d9c43ba01 100644 --- a/src/management/api/types/FlowActionFlowStoreVarsParamsVars.ts +++ b/src/management/api/types/FlowActionFlowStoreVarsParamsVars.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionFlowStoreVarsParamsVars = Record; diff --git a/src/management/api/types/FlowActionGoogleSheets.ts b/src/management/api/types/FlowActionGoogleSheets.ts index aa0c52a646..41453b391b 100644 --- a/src/management/api/types/FlowActionGoogleSheets.ts +++ b/src/management/api/types/FlowActionGoogleSheets.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionGoogleSheetsAddRow.ts b/src/management/api/types/FlowActionGoogleSheetsAddRow.ts index e51e84d1db..2adec2dab6 100644 --- a/src/management/api/types/FlowActionGoogleSheetsAddRow.ts +++ b/src/management/api/types/FlowActionGoogleSheetsAddRow.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionGoogleSheetsAddRowParams.ts b/src/management/api/types/FlowActionGoogleSheetsAddRowParams.ts index 95f45287cd..93d1fbf7ec 100644 --- a/src/management/api/types/FlowActionGoogleSheetsAddRowParams.ts +++ b/src/management/api/types/FlowActionGoogleSheetsAddRowParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionGoogleSheetsAddRowParamsSheetId.ts b/src/management/api/types/FlowActionGoogleSheetsAddRowParamsSheetId.ts index 51d49834af..5c93cdb4e7 100644 --- a/src/management/api/types/FlowActionGoogleSheetsAddRowParamsSheetId.ts +++ b/src/management/api/types/FlowActionGoogleSheetsAddRowParamsSheetId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionGoogleSheetsAddRowParamsSheetId = number | string; diff --git a/src/management/api/types/FlowActionGoogleSheetsAddRowParamsValues.ts b/src/management/api/types/FlowActionGoogleSheetsAddRowParamsValues.ts index 2adb2fa6ea..826faa8d6f 100644 --- a/src/management/api/types/FlowActionGoogleSheetsAddRowParamsValues.ts +++ b/src/management/api/types/FlowActionGoogleSheetsAddRowParamsValues.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FlowActionGoogleSheetsAddRowParamsValues = (string | undefined)[]; +export type FlowActionGoogleSheetsAddRowParamsValues = ((string | null) | undefined)[]; diff --git a/src/management/api/types/FlowActionHttp.ts b/src/management/api/types/FlowActionHttp.ts index e4950ba26e..c9704b2f3b 100644 --- a/src/management/api/types/FlowActionHttp.ts +++ b/src/management/api/types/FlowActionHttp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHttpSendRequest.ts b/src/management/api/types/FlowActionHttpSendRequest.ts index c70243725a..89b745a74f 100644 --- a/src/management/api/types/FlowActionHttpSendRequest.ts +++ b/src/management/api/types/FlowActionHttpSendRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHttpSendRequestParams.ts b/src/management/api/types/FlowActionHttpSendRequestParams.ts index 9fa05ddd4b..baba936645 100644 --- a/src/management/api/types/FlowActionHttpSendRequestParams.ts +++ b/src/management/api/types/FlowActionHttpSendRequestParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -16,7 +14,6 @@ export interface FlowActionHttpSendRequestParams { } export namespace FlowActionHttpSendRequestParams { - export type Method = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; export const Method = { Get: "GET", Post: "POST", @@ -24,10 +21,11 @@ export namespace FlowActionHttpSendRequestParams { Patch: "PATCH", Delete: "DELETE", } as const; - export type ContentType = "JSON" | "FORM" | "XML"; + export type Method = (typeof Method)[keyof typeof Method]; export const ContentType = { Json: "JSON", Form: "FORM", Xml: "XML", } as const; + export type ContentType = (typeof ContentType)[keyof typeof ContentType]; } diff --git a/src/management/api/types/FlowActionHttpSendRequestParamsBasicAuth.ts b/src/management/api/types/FlowActionHttpSendRequestParamsBasicAuth.ts index 8977e9d9e3..1aace46801 100644 --- a/src/management/api/types/FlowActionHttpSendRequestParamsBasicAuth.ts +++ b/src/management/api/types/FlowActionHttpSendRequestParamsBasicAuth.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionHttpSendRequestParamsBasicAuth { username?: string; diff --git a/src/management/api/types/FlowActionHttpSendRequestParamsHeaders.ts b/src/management/api/types/FlowActionHttpSendRequestParamsHeaders.ts index 896507ca81..a29de981c4 100644 --- a/src/management/api/types/FlowActionHttpSendRequestParamsHeaders.ts +++ b/src/management/api/types/FlowActionHttpSendRequestParamsHeaders.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionHttpSendRequestParamsHeaders = Record; diff --git a/src/management/api/types/FlowActionHttpSendRequestParamsPayload.ts b/src/management/api/types/FlowActionHttpSendRequestParamsPayload.ts index 1a0d645714..f0e8fe9ca3 100644 --- a/src/management/api/types/FlowActionHttpSendRequestParamsPayload.ts +++ b/src/management/api/types/FlowActionHttpSendRequestParamsPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHttpSendRequestParamsPayloadObject.ts b/src/management/api/types/FlowActionHttpSendRequestParamsPayloadObject.ts index e83feaf7ce..50e1181afc 100644 --- a/src/management/api/types/FlowActionHttpSendRequestParamsPayloadObject.ts +++ b/src/management/api/types/FlowActionHttpSendRequestParamsPayloadObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionHttpSendRequestParamsPayloadObject = Record; diff --git a/src/management/api/types/FlowActionHttpSendRequestParamsQueryParams.ts b/src/management/api/types/FlowActionHttpSendRequestParamsQueryParams.ts index ffb8a6da46..9a3163da7d 100644 --- a/src/management/api/types/FlowActionHttpSendRequestParamsQueryParams.ts +++ b/src/management/api/types/FlowActionHttpSendRequestParamsQueryParams.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionHttpSendRequestParamsQueryParams = Record< string, - FlowActionHttpSendRequestParamsQueryParams.Value | undefined + (FlowActionHttpSendRequestParamsQueryParams.Value | null) | undefined >; export namespace FlowActionHttpSendRequestParamsQueryParams { diff --git a/src/management/api/types/FlowActionHubspot.ts b/src/management/api/types/FlowActionHubspot.ts index 07012a562b..debeeccac4 100644 --- a/src/management/api/types/FlowActionHubspot.ts +++ b/src/management/api/types/FlowActionHubspot.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHubspotEnrollContact.ts b/src/management/api/types/FlowActionHubspotEnrollContact.ts index d3a91f183f..0fab8e127d 100644 --- a/src/management/api/types/FlowActionHubspotEnrollContact.ts +++ b/src/management/api/types/FlowActionHubspotEnrollContact.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHubspotEnrollContactParams.ts b/src/management/api/types/FlowActionHubspotEnrollContactParams.ts index 7cb6986b39..253cf0a167 100644 --- a/src/management/api/types/FlowActionHubspotEnrollContactParams.ts +++ b/src/management/api/types/FlowActionHubspotEnrollContactParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHubspotEnrollContactParamsWorkflowId.ts b/src/management/api/types/FlowActionHubspotEnrollContactParamsWorkflowId.ts index 2c5aeaa0af..a0c0f04e11 100644 --- a/src/management/api/types/FlowActionHubspotEnrollContactParamsWorkflowId.ts +++ b/src/management/api/types/FlowActionHubspotEnrollContactParamsWorkflowId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionHubspotEnrollContactParamsWorkflowId = string | number; diff --git a/src/management/api/types/FlowActionHubspotGetContact.ts b/src/management/api/types/FlowActionHubspotGetContact.ts index 6cdb48ecab..d6270df8a3 100644 --- a/src/management/api/types/FlowActionHubspotGetContact.ts +++ b/src/management/api/types/FlowActionHubspotGetContact.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHubspotGetContactParams.ts b/src/management/api/types/FlowActionHubspotGetContactParams.ts index bd9dae73fb..dbf82e6e16 100644 --- a/src/management/api/types/FlowActionHubspotGetContactParams.ts +++ b/src/management/api/types/FlowActionHubspotGetContactParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionHubspotGetContactParams { connection_id: string; diff --git a/src/management/api/types/FlowActionHubspotUpsertContact.ts b/src/management/api/types/FlowActionHubspotUpsertContact.ts index 7563732a9f..007d63c919 100644 --- a/src/management/api/types/FlowActionHubspotUpsertContact.ts +++ b/src/management/api/types/FlowActionHubspotUpsertContact.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHubspotUpsertContactParams.ts b/src/management/api/types/FlowActionHubspotUpsertContactParams.ts index 25a3f8d2b1..0599efb79e 100644 --- a/src/management/api/types/FlowActionHubspotUpsertContactParams.ts +++ b/src/management/api/types/FlowActionHubspotUpsertContactParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionHubspotUpsertContactParamsProperty.ts b/src/management/api/types/FlowActionHubspotUpsertContactParamsProperty.ts index 37a4fe70a4..2a90ed4ae5 100644 --- a/src/management/api/types/FlowActionHubspotUpsertContactParamsProperty.ts +++ b/src/management/api/types/FlowActionHubspotUpsertContactParamsProperty.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionHubspotUpsertContactParamsProperty { property: string; diff --git a/src/management/api/types/FlowActionJson.ts b/src/management/api/types/FlowActionJson.ts index ecd0332560..c414381ff4 100644 --- a/src/management/api/types/FlowActionJson.ts +++ b/src/management/api/types/FlowActionJson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonCreateJson.ts b/src/management/api/types/FlowActionJsonCreateJson.ts index d35246dc5a..80bb9151d9 100644 --- a/src/management/api/types/FlowActionJsonCreateJson.ts +++ b/src/management/api/types/FlowActionJsonCreateJson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonCreateJsonParams.ts b/src/management/api/types/FlowActionJsonCreateJsonParams.ts index 56e055cb4a..79633ed493 100644 --- a/src/management/api/types/FlowActionJsonCreateJsonParams.ts +++ b/src/management/api/types/FlowActionJsonCreateJsonParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonCreateJsonParamsObject.ts b/src/management/api/types/FlowActionJsonCreateJsonParamsObject.ts index c35a8ee6c1..4a8d29d4cc 100644 --- a/src/management/api/types/FlowActionJsonCreateJsonParamsObject.ts +++ b/src/management/api/types/FlowActionJsonCreateJsonParamsObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionJsonCreateJsonParamsObject = Record; diff --git a/src/management/api/types/FlowActionJsonParseJson.ts b/src/management/api/types/FlowActionJsonParseJson.ts index 736f9fc176..561fcf9f3a 100644 --- a/src/management/api/types/FlowActionJsonParseJson.ts +++ b/src/management/api/types/FlowActionJsonParseJson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonParseJsonParams.ts b/src/management/api/types/FlowActionJsonParseJsonParams.ts index 201e016ed5..1f32d386f5 100644 --- a/src/management/api/types/FlowActionJsonParseJsonParams.ts +++ b/src/management/api/types/FlowActionJsonParseJsonParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionJsonParseJsonParams { json: string; diff --git a/src/management/api/types/FlowActionJsonSerializeJson.ts b/src/management/api/types/FlowActionJsonSerializeJson.ts index 63f2da9896..0455e0c5fd 100644 --- a/src/management/api/types/FlowActionJsonSerializeJson.ts +++ b/src/management/api/types/FlowActionJsonSerializeJson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonSerializeJsonParams.ts b/src/management/api/types/FlowActionJsonSerializeJsonParams.ts index 3d1418fb70..82410f1abd 100644 --- a/src/management/api/types/FlowActionJsonSerializeJsonParams.ts +++ b/src/management/api/types/FlowActionJsonSerializeJsonParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonSerializeJsonParamsObject.ts b/src/management/api/types/FlowActionJsonSerializeJsonParamsObject.ts index 8d32dd13e9..78c1f3837f 100644 --- a/src/management/api/types/FlowActionJsonSerializeJsonParamsObject.ts +++ b/src/management/api/types/FlowActionJsonSerializeJsonParamsObject.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJsonSerializeJsonParamsObjectObject.ts b/src/management/api/types/FlowActionJsonSerializeJsonParamsObjectObject.ts index 00d427b147..a1a3956984 100644 --- a/src/management/api/types/FlowActionJsonSerializeJsonParamsObjectObject.ts +++ b/src/management/api/types/FlowActionJsonSerializeJsonParamsObjectObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionJsonSerializeJsonParamsObjectObject = Record; diff --git a/src/management/api/types/FlowActionJwt.ts b/src/management/api/types/FlowActionJwt.ts index 8ca87fc5b1..1818e2c1f0 100644 --- a/src/management/api/types/FlowActionJwt.ts +++ b/src/management/api/types/FlowActionJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJwtDecodeJwt.ts b/src/management/api/types/FlowActionJwtDecodeJwt.ts index 926dcbb37f..886395ca5f 100644 --- a/src/management/api/types/FlowActionJwtDecodeJwt.ts +++ b/src/management/api/types/FlowActionJwtDecodeJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJwtDecodeJwtParams.ts b/src/management/api/types/FlowActionJwtDecodeJwtParams.ts index ebfe92f5b7..9188a13d7d 100644 --- a/src/management/api/types/FlowActionJwtDecodeJwtParams.ts +++ b/src/management/api/types/FlowActionJwtDecodeJwtParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionJwtDecodeJwtParams { token: string; diff --git a/src/management/api/types/FlowActionJwtSignJwt.ts b/src/management/api/types/FlowActionJwtSignJwt.ts index 20de82f777..cbb2befe3f 100644 --- a/src/management/api/types/FlowActionJwtSignJwt.ts +++ b/src/management/api/types/FlowActionJwtSignJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJwtSignJwtParams.ts b/src/management/api/types/FlowActionJwtSignJwtParams.ts index cae9dd14ef..bea33f5192 100644 --- a/src/management/api/types/FlowActionJwtSignJwtParams.ts +++ b/src/management/api/types/FlowActionJwtSignJwtParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJwtSignJwtParamsPayload.ts b/src/management/api/types/FlowActionJwtSignJwtParamsPayload.ts index edf25f7b85..d2cdb69f2f 100644 --- a/src/management/api/types/FlowActionJwtSignJwtParamsPayload.ts +++ b/src/management/api/types/FlowActionJwtSignJwtParamsPayload.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionJwtSignJwtParamsPayload = Record; diff --git a/src/management/api/types/FlowActionJwtVerifyJwt.ts b/src/management/api/types/FlowActionJwtVerifyJwt.ts index 19045244d8..408529f553 100644 --- a/src/management/api/types/FlowActionJwtVerifyJwt.ts +++ b/src/management/api/types/FlowActionJwtVerifyJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionJwtVerifyJwtParams.ts b/src/management/api/types/FlowActionJwtVerifyJwtParams.ts index dcb515a9ac..9c0d5c6345 100644 --- a/src/management/api/types/FlowActionJwtVerifyJwtParams.ts +++ b/src/management/api/types/FlowActionJwtVerifyJwtParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionJwtVerifyJwtParams { connection_id: string; diff --git a/src/management/api/types/FlowActionMailchimp.ts b/src/management/api/types/FlowActionMailchimp.ts index a754559c86..0a7fc06c39 100644 --- a/src/management/api/types/FlowActionMailchimp.ts +++ b/src/management/api/types/FlowActionMailchimp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionMailchimpUpsertMember.ts b/src/management/api/types/FlowActionMailchimpUpsertMember.ts index 0140a40782..4e86d1608a 100644 --- a/src/management/api/types/FlowActionMailchimpUpsertMember.ts +++ b/src/management/api/types/FlowActionMailchimpUpsertMember.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionMailchimpUpsertMemberParams.ts b/src/management/api/types/FlowActionMailchimpUpsertMemberParams.ts index 5b1414a038..a70f321def 100644 --- a/src/management/api/types/FlowActionMailchimpUpsertMemberParams.ts +++ b/src/management/api/types/FlowActionMailchimpUpsertMemberParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMember.ts b/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMember.ts index 0e86b42dcd..aa644cf102 100644 --- a/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMember.ts +++ b/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMember.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMemberMergeFields.ts b/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMemberMergeFields.ts index 390a29f1d2..44ee99e624 100644 --- a/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMemberMergeFields.ts +++ b/src/management/api/types/FlowActionMailchimpUpsertMemberParamsMemberMergeFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionMailchimpUpsertMemberParamsMemberMergeFields = Record; diff --git a/src/management/api/types/FlowActionMailjet.ts b/src/management/api/types/FlowActionMailjet.ts index b0fbea55df..368a2a2863 100644 --- a/src/management/api/types/FlowActionMailjet.ts +++ b/src/management/api/types/FlowActionMailjet.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionMailjetSendEmail.ts b/src/management/api/types/FlowActionMailjetSendEmail.ts index 420ad3883d..af9a8e5cc1 100644 --- a/src/management/api/types/FlowActionMailjetSendEmail.ts +++ b/src/management/api/types/FlowActionMailjetSendEmail.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionMailjetSendEmailParams.ts b/src/management/api/types/FlowActionMailjetSendEmailParams.ts index 0fe594ff17..a6d02d1709 100644 --- a/src/management/api/types/FlowActionMailjetSendEmailParams.ts +++ b/src/management/api/types/FlowActionMailjetSendEmailParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionMailjetSendEmailParams = | { diff --git a/src/management/api/types/FlowActionOtp.ts b/src/management/api/types/FlowActionOtp.ts index a74e71d9bf..f4ec8ee032 100644 --- a/src/management/api/types/FlowActionOtp.ts +++ b/src/management/api/types/FlowActionOtp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionOtpGenerateCode.ts b/src/management/api/types/FlowActionOtpGenerateCode.ts index 16703f93a1..8b94c142dd 100644 --- a/src/management/api/types/FlowActionOtpGenerateCode.ts +++ b/src/management/api/types/FlowActionOtpGenerateCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionOtpGenerateCodeParams.ts b/src/management/api/types/FlowActionOtpGenerateCodeParams.ts index bec73bc663..97b8a24c2a 100644 --- a/src/management/api/types/FlowActionOtpGenerateCodeParams.ts +++ b/src/management/api/types/FlowActionOtpGenerateCodeParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionOtpGenerateCodeParams { reference: string; diff --git a/src/management/api/types/FlowActionOtpVerifyCode.ts b/src/management/api/types/FlowActionOtpVerifyCode.ts index 776aa7ae6a..f603e7eba0 100644 --- a/src/management/api/types/FlowActionOtpVerifyCode.ts +++ b/src/management/api/types/FlowActionOtpVerifyCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionOtpVerifyCodeParams.ts b/src/management/api/types/FlowActionOtpVerifyCodeParams.ts index 8381a75810..592aeb5364 100644 --- a/src/management/api/types/FlowActionOtpVerifyCodeParams.ts +++ b/src/management/api/types/FlowActionOtpVerifyCodeParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionOtpVerifyCodeParamsCode.ts b/src/management/api/types/FlowActionOtpVerifyCodeParamsCode.ts index 381382a876..9a96c46550 100644 --- a/src/management/api/types/FlowActionOtpVerifyCodeParamsCode.ts +++ b/src/management/api/types/FlowActionOtpVerifyCodeParamsCode.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionOtpVerifyCodeParamsCode = number | string; diff --git a/src/management/api/types/FlowActionPipedrive.ts b/src/management/api/types/FlowActionPipedrive.ts index f2751666ea..8d091fe928 100644 --- a/src/management/api/types/FlowActionPipedrive.ts +++ b/src/management/api/types/FlowActionPipedrive.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddDeal.ts b/src/management/api/types/FlowActionPipedriveAddDeal.ts index 4738be66c9..a089f37375 100644 --- a/src/management/api/types/FlowActionPipedriveAddDeal.ts +++ b/src/management/api/types/FlowActionPipedriveAddDeal.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddDealParams.ts b/src/management/api/types/FlowActionPipedriveAddDealParams.ts index 0409bc60b7..d2a66eb82b 100644 --- a/src/management/api/types/FlowActionPipedriveAddDealParams.ts +++ b/src/management/api/types/FlowActionPipedriveAddDealParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddDealParamsFields.ts b/src/management/api/types/FlowActionPipedriveAddDealParamsFields.ts index 6516bdd7ab..022a6602e2 100644 --- a/src/management/api/types/FlowActionPipedriveAddDealParamsFields.ts +++ b/src/management/api/types/FlowActionPipedriveAddDealParamsFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddDealParamsFields = Record; diff --git a/src/management/api/types/FlowActionPipedriveAddDealParamsOrganizationId.ts b/src/management/api/types/FlowActionPipedriveAddDealParamsOrganizationId.ts index c5d5f540b7..ea1109d746 100644 --- a/src/management/api/types/FlowActionPipedriveAddDealParamsOrganizationId.ts +++ b/src/management/api/types/FlowActionPipedriveAddDealParamsOrganizationId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddDealParamsOrganizationId = string | number; diff --git a/src/management/api/types/FlowActionPipedriveAddDealParamsPersonId.ts b/src/management/api/types/FlowActionPipedriveAddDealParamsPersonId.ts index 4e95555dd3..3c634af022 100644 --- a/src/management/api/types/FlowActionPipedriveAddDealParamsPersonId.ts +++ b/src/management/api/types/FlowActionPipedriveAddDealParamsPersonId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddDealParamsPersonId = string | number; diff --git a/src/management/api/types/FlowActionPipedriveAddDealParamsStageId.ts b/src/management/api/types/FlowActionPipedriveAddDealParamsStageId.ts index 276b335f65..d39b7e58bc 100644 --- a/src/management/api/types/FlowActionPipedriveAddDealParamsStageId.ts +++ b/src/management/api/types/FlowActionPipedriveAddDealParamsStageId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddDealParamsStageId = string | number; diff --git a/src/management/api/types/FlowActionPipedriveAddDealParamsUserId.ts b/src/management/api/types/FlowActionPipedriveAddDealParamsUserId.ts index e081c781c9..2279032549 100644 --- a/src/management/api/types/FlowActionPipedriveAddDealParamsUserId.ts +++ b/src/management/api/types/FlowActionPipedriveAddDealParamsUserId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddDealParamsUserId = string | number; diff --git a/src/management/api/types/FlowActionPipedriveAddOrganization.ts b/src/management/api/types/FlowActionPipedriveAddOrganization.ts index 4797af0b14..1447d51b52 100644 --- a/src/management/api/types/FlowActionPipedriveAddOrganization.ts +++ b/src/management/api/types/FlowActionPipedriveAddOrganization.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddOrganizationParams.ts b/src/management/api/types/FlowActionPipedriveAddOrganizationParams.ts index 49ec73777b..e7a899ff22 100644 --- a/src/management/api/types/FlowActionPipedriveAddOrganizationParams.ts +++ b/src/management/api/types/FlowActionPipedriveAddOrganizationParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddOrganizationParamsFields.ts b/src/management/api/types/FlowActionPipedriveAddOrganizationParamsFields.ts index 0e678978d9..2ef7b39a2b 100644 --- a/src/management/api/types/FlowActionPipedriveAddOrganizationParamsFields.ts +++ b/src/management/api/types/FlowActionPipedriveAddOrganizationParamsFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddOrganizationParamsFields = Record; diff --git a/src/management/api/types/FlowActionPipedriveAddOrganizationParamsOwnerId.ts b/src/management/api/types/FlowActionPipedriveAddOrganizationParamsOwnerId.ts index 62f15ce6dc..bb5984c0c7 100644 --- a/src/management/api/types/FlowActionPipedriveAddOrganizationParamsOwnerId.ts +++ b/src/management/api/types/FlowActionPipedriveAddOrganizationParamsOwnerId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddOrganizationParamsOwnerId = string | number; diff --git a/src/management/api/types/FlowActionPipedriveAddPerson.ts b/src/management/api/types/FlowActionPipedriveAddPerson.ts index 2bb6dc291e..427db6c7c9 100644 --- a/src/management/api/types/FlowActionPipedriveAddPerson.ts +++ b/src/management/api/types/FlowActionPipedriveAddPerson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddPersonParams.ts b/src/management/api/types/FlowActionPipedriveAddPersonParams.ts index 71ce40f757..dffe562d8e 100644 --- a/src/management/api/types/FlowActionPipedriveAddPersonParams.ts +++ b/src/management/api/types/FlowActionPipedriveAddPersonParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionPipedriveAddPersonParamsFields.ts b/src/management/api/types/FlowActionPipedriveAddPersonParamsFields.ts index 7a5e5dd92c..d2145788f9 100644 --- a/src/management/api/types/FlowActionPipedriveAddPersonParamsFields.ts +++ b/src/management/api/types/FlowActionPipedriveAddPersonParamsFields.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddPersonParamsFields = Record; diff --git a/src/management/api/types/FlowActionPipedriveAddPersonParamsOrganizationId.ts b/src/management/api/types/FlowActionPipedriveAddPersonParamsOrganizationId.ts index 78e04f8d29..abd3c14195 100644 --- a/src/management/api/types/FlowActionPipedriveAddPersonParamsOrganizationId.ts +++ b/src/management/api/types/FlowActionPipedriveAddPersonParamsOrganizationId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddPersonParamsOrganizationId = string | number; diff --git a/src/management/api/types/FlowActionPipedriveAddPersonParamsOwnerId.ts b/src/management/api/types/FlowActionPipedriveAddPersonParamsOwnerId.ts index 17d304f121..70335dae5a 100644 --- a/src/management/api/types/FlowActionPipedriveAddPersonParamsOwnerId.ts +++ b/src/management/api/types/FlowActionPipedriveAddPersonParamsOwnerId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionPipedriveAddPersonParamsOwnerId = string | number; diff --git a/src/management/api/types/FlowActionSalesforce.ts b/src/management/api/types/FlowActionSalesforce.ts index 95ec892e5d..bf57ecdc26 100644 --- a/src/management/api/types/FlowActionSalesforce.ts +++ b/src/management/api/types/FlowActionSalesforce.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceCreateLead.ts b/src/management/api/types/FlowActionSalesforceCreateLead.ts index d745a66f7e..291b026347 100644 --- a/src/management/api/types/FlowActionSalesforceCreateLead.ts +++ b/src/management/api/types/FlowActionSalesforceCreateLead.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceCreateLeadParams.ts b/src/management/api/types/FlowActionSalesforceCreateLeadParams.ts index 2d21693c4d..feeac03ee6 100644 --- a/src/management/api/types/FlowActionSalesforceCreateLeadParams.ts +++ b/src/management/api/types/FlowActionSalesforceCreateLeadParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceCreateLeadParamsPayload.ts b/src/management/api/types/FlowActionSalesforceCreateLeadParamsPayload.ts index 8711d80a2d..5c80ad4c18 100644 --- a/src/management/api/types/FlowActionSalesforceCreateLeadParamsPayload.ts +++ b/src/management/api/types/FlowActionSalesforceCreateLeadParamsPayload.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionSalesforceCreateLeadParamsPayload = Record; diff --git a/src/management/api/types/FlowActionSalesforceGetLead.ts b/src/management/api/types/FlowActionSalesforceGetLead.ts index 8fdd13ffcd..9a22c9d755 100644 --- a/src/management/api/types/FlowActionSalesforceGetLead.ts +++ b/src/management/api/types/FlowActionSalesforceGetLead.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceGetLeadParams.ts b/src/management/api/types/FlowActionSalesforceGetLeadParams.ts index ebf1f4426b..9fe693c9a4 100644 --- a/src/management/api/types/FlowActionSalesforceGetLeadParams.ts +++ b/src/management/api/types/FlowActionSalesforceGetLeadParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionSalesforceGetLeadParams { connection_id: string; diff --git a/src/management/api/types/FlowActionSalesforceSearchLeads.ts b/src/management/api/types/FlowActionSalesforceSearchLeads.ts index 55347f6d57..743bbe632e 100644 --- a/src/management/api/types/FlowActionSalesforceSearchLeads.ts +++ b/src/management/api/types/FlowActionSalesforceSearchLeads.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceSearchLeadsParams.ts b/src/management/api/types/FlowActionSalesforceSearchLeadsParams.ts index de0e5ec7ff..03e2e55b1c 100644 --- a/src/management/api/types/FlowActionSalesforceSearchLeadsParams.ts +++ b/src/management/api/types/FlowActionSalesforceSearchLeadsParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionSalesforceSearchLeadsParams { connection_id: string; @@ -10,11 +8,11 @@ export interface FlowActionSalesforceSearchLeadsParams { } export namespace FlowActionSalesforceSearchLeadsParams { - export type SearchField = "email" | "name" | "phone" | "all"; export const SearchField = { Email: "email", Name: "name", Phone: "phone", All: "all", } as const; + export type SearchField = (typeof SearchField)[keyof typeof SearchField]; } diff --git a/src/management/api/types/FlowActionSalesforceUpdateLead.ts b/src/management/api/types/FlowActionSalesforceUpdateLead.ts index 9a51326baa..098eff7d00 100644 --- a/src/management/api/types/FlowActionSalesforceUpdateLead.ts +++ b/src/management/api/types/FlowActionSalesforceUpdateLead.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceUpdateLeadParams.ts b/src/management/api/types/FlowActionSalesforceUpdateLeadParams.ts index 612488aab2..5ff7fc1c03 100644 --- a/src/management/api/types/FlowActionSalesforceUpdateLeadParams.ts +++ b/src/management/api/types/FlowActionSalesforceUpdateLeadParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSalesforceUpdateLeadParamsPayload.ts b/src/management/api/types/FlowActionSalesforceUpdateLeadParamsPayload.ts index efdb05896b..0e900e44f4 100644 --- a/src/management/api/types/FlowActionSalesforceUpdateLeadParamsPayload.ts +++ b/src/management/api/types/FlowActionSalesforceUpdateLeadParamsPayload.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionSalesforceUpdateLeadParamsPayload = Record; diff --git a/src/management/api/types/FlowActionSendgrid.ts b/src/management/api/types/FlowActionSendgrid.ts index 7b2c707e9e..0272bf9d73 100644 --- a/src/management/api/types/FlowActionSendgrid.ts +++ b/src/management/api/types/FlowActionSendgrid.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSendgridSendEmail.ts b/src/management/api/types/FlowActionSendgridSendEmail.ts index 990f3064af..adbfd81044 100644 --- a/src/management/api/types/FlowActionSendgridSendEmail.ts +++ b/src/management/api/types/FlowActionSendgridSendEmail.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSendgridSendEmailParams.ts b/src/management/api/types/FlowActionSendgridSendEmailParams.ts index bc3ee2c8d8..3cfd4e8223 100644 --- a/src/management/api/types/FlowActionSendgridSendEmailParams.ts +++ b/src/management/api/types/FlowActionSendgridSendEmailParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSendgridSendEmailParamsPerson.ts b/src/management/api/types/FlowActionSendgridSendEmailParamsPerson.ts index b84fbbb5ec..82d7f20620 100644 --- a/src/management/api/types/FlowActionSendgridSendEmailParamsPerson.ts +++ b/src/management/api/types/FlowActionSendgridSendEmailParamsPerson.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionSendgridSendEmailParamsPerson { name?: string; diff --git a/src/management/api/types/FlowActionSlack.ts b/src/management/api/types/FlowActionSlack.ts index fb372bed03..e3e2ef4539 100644 --- a/src/management/api/types/FlowActionSlack.ts +++ b/src/management/api/types/FlowActionSlack.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSlackPostMessage.ts b/src/management/api/types/FlowActionSlackPostMessage.ts index 9e50146a6e..97a21a634f 100644 --- a/src/management/api/types/FlowActionSlackPostMessage.ts +++ b/src/management/api/types/FlowActionSlackPostMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSlackPostMessageParams.ts b/src/management/api/types/FlowActionSlackPostMessageParams.ts index 679fcb7ede..2a629684d6 100644 --- a/src/management/api/types/FlowActionSlackPostMessageParams.ts +++ b/src/management/api/types/FlowActionSlackPostMessageParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionSlackPostMessageParamsAttachment.ts b/src/management/api/types/FlowActionSlackPostMessageParamsAttachment.ts index 99404dc7e5..14d4ef7132 100644 --- a/src/management/api/types/FlowActionSlackPostMessageParamsAttachment.ts +++ b/src/management/api/types/FlowActionSlackPostMessageParamsAttachment.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -12,10 +10,10 @@ export interface FlowActionSlackPostMessageParamsAttachment { } export namespace FlowActionSlackPostMessageParamsAttachment { - export type Color = "GOOD" | "WARNING" | "DANGER"; export const Color = { Good: "GOOD", Warning: "WARNING", Danger: "DANGER", } as const; + export type Color = (typeof Color)[keyof typeof Color]; } diff --git a/src/management/api/types/FlowActionSlackPostMessageParamsAttachmentField.ts b/src/management/api/types/FlowActionSlackPostMessageParamsAttachmentField.ts index a8ea5a9272..db75651ced 100644 --- a/src/management/api/types/FlowActionSlackPostMessageParamsAttachmentField.ts +++ b/src/management/api/types/FlowActionSlackPostMessageParamsAttachmentField.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionSlackPostMessageParamsAttachmentField { title: string; diff --git a/src/management/api/types/FlowActionStripe.ts b/src/management/api/types/FlowActionStripe.ts index 2fda252c75..b7b308b7c0 100644 --- a/src/management/api/types/FlowActionStripe.ts +++ b/src/management/api/types/FlowActionStripe.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeAddTaxId.ts b/src/management/api/types/FlowActionStripeAddTaxId.ts index 3fd0e9035c..ee4897f088 100644 --- a/src/management/api/types/FlowActionStripeAddTaxId.ts +++ b/src/management/api/types/FlowActionStripeAddTaxId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeAddTaxIdParams.ts b/src/management/api/types/FlowActionStripeAddTaxIdParams.ts index 1ea1f48ad8..2215e20a2d 100644 --- a/src/management/api/types/FlowActionStripeAddTaxIdParams.ts +++ b/src/management/api/types/FlowActionStripeAddTaxIdParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeAddTaxIdParams { connection_id: string; diff --git a/src/management/api/types/FlowActionStripeAddress.ts b/src/management/api/types/FlowActionStripeAddress.ts index b89df74b92..8b30f4cca7 100644 --- a/src/management/api/types/FlowActionStripeAddress.ts +++ b/src/management/api/types/FlowActionStripeAddress.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeAddress { line1?: string; diff --git a/src/management/api/types/FlowActionStripeCreateCustomer.ts b/src/management/api/types/FlowActionStripeCreateCustomer.ts index cef4793c3b..b8d29441b8 100644 --- a/src/management/api/types/FlowActionStripeCreateCustomer.ts +++ b/src/management/api/types/FlowActionStripeCreateCustomer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeCreateCustomerParams.ts b/src/management/api/types/FlowActionStripeCreateCustomerParams.ts index 0c191b16be..41f3da26d6 100644 --- a/src/management/api/types/FlowActionStripeCreateCustomerParams.ts +++ b/src/management/api/types/FlowActionStripeCreateCustomerParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeCreatePortalSession.ts b/src/management/api/types/FlowActionStripeCreatePortalSession.ts index 6dc4aa3c52..79d58ba536 100644 --- a/src/management/api/types/FlowActionStripeCreatePortalSession.ts +++ b/src/management/api/types/FlowActionStripeCreatePortalSession.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeCreatePortalSessionParams.ts b/src/management/api/types/FlowActionStripeCreatePortalSessionParams.ts index df26f830b6..da32534595 100644 --- a/src/management/api/types/FlowActionStripeCreatePortalSessionParams.ts +++ b/src/management/api/types/FlowActionStripeCreatePortalSessionParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeCreatePortalSessionParams { connection_id: string; diff --git a/src/management/api/types/FlowActionStripeDeleteTaxId.ts b/src/management/api/types/FlowActionStripeDeleteTaxId.ts index 6288ac7ffd..7ca35d8b5c 100644 --- a/src/management/api/types/FlowActionStripeDeleteTaxId.ts +++ b/src/management/api/types/FlowActionStripeDeleteTaxId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeDeleteTaxIdParams.ts b/src/management/api/types/FlowActionStripeDeleteTaxIdParams.ts index c49584ce01..30e6a0b1b3 100644 --- a/src/management/api/types/FlowActionStripeDeleteTaxIdParams.ts +++ b/src/management/api/types/FlowActionStripeDeleteTaxIdParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeDeleteTaxIdParams { connection_id: string; diff --git a/src/management/api/types/FlowActionStripeFindCustomers.ts b/src/management/api/types/FlowActionStripeFindCustomers.ts index 29a16f43fe..4bed013898 100644 --- a/src/management/api/types/FlowActionStripeFindCustomers.ts +++ b/src/management/api/types/FlowActionStripeFindCustomers.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeFindCustomersParams.ts b/src/management/api/types/FlowActionStripeFindCustomersParams.ts index 3050e0bc9a..dff075bfbb 100644 --- a/src/management/api/types/FlowActionStripeFindCustomersParams.ts +++ b/src/management/api/types/FlowActionStripeFindCustomersParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeFindCustomersParams { connection_id: string; diff --git a/src/management/api/types/FlowActionStripeGetCustomer.ts b/src/management/api/types/FlowActionStripeGetCustomer.ts index 296d80b491..5658acbe90 100644 --- a/src/management/api/types/FlowActionStripeGetCustomer.ts +++ b/src/management/api/types/FlowActionStripeGetCustomer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeGetCustomerParams.ts b/src/management/api/types/FlowActionStripeGetCustomerParams.ts index 9911e57aa7..ea4daf3cf9 100644 --- a/src/management/api/types/FlowActionStripeGetCustomerParams.ts +++ b/src/management/api/types/FlowActionStripeGetCustomerParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeGetCustomerParams { connection_id: string; diff --git a/src/management/api/types/FlowActionStripeMetadata.ts b/src/management/api/types/FlowActionStripeMetadata.ts index 0c19e501d9..358c7ec646 100644 --- a/src/management/api/types/FlowActionStripeMetadata.ts +++ b/src/management/api/types/FlowActionStripeMetadata.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionStripeMetadata = Record; diff --git a/src/management/api/types/FlowActionStripeTaxId.ts b/src/management/api/types/FlowActionStripeTaxId.ts index 2ee6cfbbde..7720c40e48 100644 --- a/src/management/api/types/FlowActionStripeTaxId.ts +++ b/src/management/api/types/FlowActionStripeTaxId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionStripeTaxId { type: string; diff --git a/src/management/api/types/FlowActionStripeUpdateCustomer.ts b/src/management/api/types/FlowActionStripeUpdateCustomer.ts index ce1e6dcb6e..42fb50e68d 100644 --- a/src/management/api/types/FlowActionStripeUpdateCustomer.ts +++ b/src/management/api/types/FlowActionStripeUpdateCustomer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionStripeUpdateCustomerParams.ts b/src/management/api/types/FlowActionStripeUpdateCustomerParams.ts index 20d0545ce5..f0d42126fc 100644 --- a/src/management/api/types/FlowActionStripeUpdateCustomerParams.ts +++ b/src/management/api/types/FlowActionStripeUpdateCustomerParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionTelegram.ts b/src/management/api/types/FlowActionTelegram.ts index 5505465856..eaab724200 100644 --- a/src/management/api/types/FlowActionTelegram.ts +++ b/src/management/api/types/FlowActionTelegram.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionTelegramSendMessage.ts b/src/management/api/types/FlowActionTelegramSendMessage.ts index 491336b0c6..7d3e68cef3 100644 --- a/src/management/api/types/FlowActionTelegramSendMessage.ts +++ b/src/management/api/types/FlowActionTelegramSendMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionTelegramSendMessageParams.ts b/src/management/api/types/FlowActionTelegramSendMessageParams.ts index 4272377325..01a055c336 100644 --- a/src/management/api/types/FlowActionTelegramSendMessageParams.ts +++ b/src/management/api/types/FlowActionTelegramSendMessageParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionTelegramSendMessageParams { connection_id: string; diff --git a/src/management/api/types/FlowActionTwilio.ts b/src/management/api/types/FlowActionTwilio.ts index a843bcb9f9..c87773f38a 100644 --- a/src/management/api/types/FlowActionTwilio.ts +++ b/src/management/api/types/FlowActionTwilio.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionTwilioMakeCall.ts b/src/management/api/types/FlowActionTwilioMakeCall.ts index 36df26b334..426f504be4 100644 --- a/src/management/api/types/FlowActionTwilioMakeCall.ts +++ b/src/management/api/types/FlowActionTwilioMakeCall.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionTwilioMakeCallParams.ts b/src/management/api/types/FlowActionTwilioMakeCallParams.ts index 5df0c35c12..a17207db12 100644 --- a/src/management/api/types/FlowActionTwilioMakeCallParams.ts +++ b/src/management/api/types/FlowActionTwilioMakeCallParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionTwilioMakeCallParams { connection_id: string; diff --git a/src/management/api/types/FlowActionTwilioSendSms.ts b/src/management/api/types/FlowActionTwilioSendSms.ts index 4c3d1d7262..404db2ba24 100644 --- a/src/management/api/types/FlowActionTwilioSendSms.ts +++ b/src/management/api/types/FlowActionTwilioSendSms.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionTwilioSendSmsParams.ts b/src/management/api/types/FlowActionTwilioSendSmsParams.ts index 0416dc124e..7307ea66cc 100644 --- a/src/management/api/types/FlowActionTwilioSendSmsParams.ts +++ b/src/management/api/types/FlowActionTwilioSendSmsParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionTwilioSendSmsParams { connection_id: string; diff --git a/src/management/api/types/FlowActionWhatsapp.ts b/src/management/api/types/FlowActionWhatsapp.ts index cdab8827ed..8380e9cc6e 100644 --- a/src/management/api/types/FlowActionWhatsapp.ts +++ b/src/management/api/types/FlowActionWhatsapp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionWhatsappSendMessage.ts b/src/management/api/types/FlowActionWhatsappSendMessage.ts index 7393a9a681..cb945783e4 100644 --- a/src/management/api/types/FlowActionWhatsappSendMessage.ts +++ b/src/management/api/types/FlowActionWhatsappSendMessage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionWhatsappSendMessageParams.ts b/src/management/api/types/FlowActionWhatsappSendMessageParams.ts index b686e5f949..282aa8bbe5 100644 --- a/src/management/api/types/FlowActionWhatsappSendMessageParams.ts +++ b/src/management/api/types/FlowActionWhatsappSendMessageParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -13,16 +11,6 @@ export interface FlowActionWhatsappSendMessageParams { } export namespace FlowActionWhatsappSendMessageParams { - export type Type = - | "AUDIO" - | "CONTACTS" - | "DOCUMENT" - | "IMAGE" - | "INTERACTIVE" - | "LOCATION" - | "STICKER" - | "TEMPLATE" - | "TEXT"; export const Type = { Audio: "AUDIO", Contacts: "CONTACTS", @@ -34,4 +22,5 @@ export namespace FlowActionWhatsappSendMessageParams { Template: "TEMPLATE", Text: "TEXT", } as const; + export type Type = (typeof Type)[keyof typeof Type]; } diff --git a/src/management/api/types/FlowActionWhatsappSendMessageParamsPayload.ts b/src/management/api/types/FlowActionWhatsappSendMessageParamsPayload.ts index 2c35f9a980..8844a8f004 100644 --- a/src/management/api/types/FlowActionWhatsappSendMessageParamsPayload.ts +++ b/src/management/api/types/FlowActionWhatsappSendMessageParamsPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionWhatsappSendMessageParamsPayloadObject.ts b/src/management/api/types/FlowActionWhatsappSendMessageParamsPayloadObject.ts index 2e9b5c1f04..ff837a08a9 100644 --- a/src/management/api/types/FlowActionWhatsappSendMessageParamsPayloadObject.ts +++ b/src/management/api/types/FlowActionWhatsappSendMessageParamsPayloadObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionWhatsappSendMessageParamsPayloadObject = Record; diff --git a/src/management/api/types/FlowActionXml.ts b/src/management/api/types/FlowActionXml.ts index 92e5d65c37..5208389019 100644 --- a/src/management/api/types/FlowActionXml.ts +++ b/src/management/api/types/FlowActionXml.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionXmlParseXml.ts b/src/management/api/types/FlowActionXmlParseXml.ts index cb9e080d40..b90c7119f2 100644 --- a/src/management/api/types/FlowActionXmlParseXml.ts +++ b/src/management/api/types/FlowActionXmlParseXml.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionXmlParseXmlParams.ts b/src/management/api/types/FlowActionXmlParseXmlParams.ts index 109a0009b3..ea8d431ea3 100644 --- a/src/management/api/types/FlowActionXmlParseXmlParams.ts +++ b/src/management/api/types/FlowActionXmlParseXmlParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionXmlParseXmlParams { xml: string; diff --git a/src/management/api/types/FlowActionXmlSerializeXml.ts b/src/management/api/types/FlowActionXmlSerializeXml.ts index 6969d51d77..a32c706070 100644 --- a/src/management/api/types/FlowActionXmlSerializeXml.ts +++ b/src/management/api/types/FlowActionXmlSerializeXml.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionXmlSerializeXmlParams.ts b/src/management/api/types/FlowActionXmlSerializeXmlParams.ts index 70b1ec963c..f86e214a6b 100644 --- a/src/management/api/types/FlowActionXmlSerializeXmlParams.ts +++ b/src/management/api/types/FlowActionXmlSerializeXmlParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionXmlSerializeXmlParamsObject.ts b/src/management/api/types/FlowActionXmlSerializeXmlParamsObject.ts index e4306c73e3..bbd5f1c1ab 100644 --- a/src/management/api/types/FlowActionXmlSerializeXmlParamsObject.ts +++ b/src/management/api/types/FlowActionXmlSerializeXmlParamsObject.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionXmlSerializeXmlParamsObjectObject.ts b/src/management/api/types/FlowActionXmlSerializeXmlParamsObjectObject.ts index b7e2ad94e2..3b39d76b48 100644 --- a/src/management/api/types/FlowActionXmlSerializeXmlParamsObjectObject.ts +++ b/src/management/api/types/FlowActionXmlSerializeXmlParamsObjectObject.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowActionXmlSerializeXmlParamsObjectObject = Record; diff --git a/src/management/api/types/FlowActionZapier.ts b/src/management/api/types/FlowActionZapier.ts index 452ee6a2ad..9235f9fa06 100644 --- a/src/management/api/types/FlowActionZapier.ts +++ b/src/management/api/types/FlowActionZapier.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionZapierTriggerWebhook.ts b/src/management/api/types/FlowActionZapierTriggerWebhook.ts index b4d85d6025..b91ca0b4d9 100644 --- a/src/management/api/types/FlowActionZapierTriggerWebhook.ts +++ b/src/management/api/types/FlowActionZapierTriggerWebhook.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowActionZapierTriggerWebhookParams.ts b/src/management/api/types/FlowActionZapierTriggerWebhookParams.ts index 98348250b0..b4e11d877b 100644 --- a/src/management/api/types/FlowActionZapierTriggerWebhookParams.ts +++ b/src/management/api/types/FlowActionZapierTriggerWebhookParams.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowActionZapierTriggerWebhookParams { connection_id: string; @@ -10,10 +8,10 @@ export interface FlowActionZapierTriggerWebhookParams { } export namespace FlowActionZapierTriggerWebhookParams { - export type Method = "GET" | "POST" | "PUT"; export const Method = { Get: "GET", Post: "POST", Put: "PUT", } as const; + export type Method = (typeof Method)[keyof typeof Method]; } diff --git a/src/management/api/types/FlowExecutionDebug.ts b/src/management/api/types/FlowExecutionDebug.ts index 23cc9cea99..b2809459af 100644 --- a/src/management/api/types/FlowExecutionDebug.ts +++ b/src/management/api/types/FlowExecutionDebug.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flow execution debug. diff --git a/src/management/api/types/FlowExecutionSummary.ts b/src/management/api/types/FlowExecutionSummary.ts index 829f170d98..b427ee3e62 100644 --- a/src/management/api/types/FlowExecutionSummary.ts +++ b/src/management/api/types/FlowExecutionSummary.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowExecutionSummary { /** Flow execution identifier */ diff --git a/src/management/api/types/FlowSummary.ts b/src/management/api/types/FlowSummary.ts index f3b86e9cc7..5f3b7fc995 100644 --- a/src/management/api/types/FlowSummary.ts +++ b/src/management/api/types/FlowSummary.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowSummary { id: string; diff --git a/src/management/api/types/FlowsVaultConnectioSetupApiKey.ts b/src/management/api/types/FlowsVaultConnectioSetupApiKey.ts index 832dc45035..6dcad98aa7 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupApiKey.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.ts b/src/management/api/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.ts index 99a40f6af5..db982ca044 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupApiKeyWithBaseUrl.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface FlowsVaultConnectioSetupApiKeyWithBaseUrl { type: Management.FlowsVaultConnectioSetupTypeApiKeyEnum; api_key: string; - base_url?: string; + base_url: string; } diff --git a/src/management/api/types/FlowsVaultConnectioSetupBigqueryOauthJwt.ts b/src/management/api/types/FlowsVaultConnectioSetupBigqueryOauthJwt.ts index 1b73ef9431..76f53b33b9 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupBigqueryOauthJwt.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupBigqueryOauthJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupHttpBearer.ts b/src/management/api/types/FlowsVaultConnectioSetupHttpBearer.ts index 6558e84e58..20ec1802bc 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupHttpBearer.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupHttpBearer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupJwt.ts b/src/management/api/types/FlowsVaultConnectioSetupJwt.ts index 92478657f8..9015c22374 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupJwt.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.ts index 7cffe52d0a..04f71ef902 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupJwtAlgorithmEnum.ts @@ -1,20 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FlowsVaultConnectioSetupJwtAlgorithmEnum = - | "HS256" - | "HS384" - | "HS512" - | "RS256" - | "RS384" - | "RS512" - | "ES256" - | "ES384" - | "ES512" - | "PS256" - | "PS384" - | "PS512"; export const FlowsVaultConnectioSetupJwtAlgorithmEnum = { Hs256: "HS256", Hs384: "HS384", @@ -29,3 +14,5 @@ export const FlowsVaultConnectioSetupJwtAlgorithmEnum = { Ps384: "PS384", Ps512: "PS512", } as const; +export type FlowsVaultConnectioSetupJwtAlgorithmEnum = + (typeof FlowsVaultConnectioSetupJwtAlgorithmEnum)[keyof typeof FlowsVaultConnectioSetupJwtAlgorithmEnum]; diff --git a/src/management/api/types/FlowsVaultConnectioSetupMailjetApiKey.ts b/src/management/api/types/FlowsVaultConnectioSetupMailjetApiKey.ts index 02d1418b98..93f3a49136 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupMailjetApiKey.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupMailjetApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupOauthApp.ts b/src/management/api/types/FlowsVaultConnectioSetupOauthApp.ts index c82999f282..9df16cff8e 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupOauthApp.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupOauthApp.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupOauthCode.ts b/src/management/api/types/FlowsVaultConnectioSetupOauthCode.ts index 52ba8cc7cd..cd046fb4a5 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupOauthCode.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupOauthCode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupSecretApiKey.ts b/src/management/api/types/FlowsVaultConnectioSetupSecretApiKey.ts index fd338b014b..7454cf3c9a 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupSecretApiKey.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupSecretApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupStripeKeyPair.ts b/src/management/api/types/FlowsVaultConnectioSetupStripeKeyPair.ts index b15023253b..27b52b28ed 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupStripeKeyPair.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupStripeKeyPair.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupToken.ts b/src/management/api/types/FlowsVaultConnectioSetupToken.ts index 2275ab3d7a..13ebe8fcc8 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupToken.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupToken.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTwilioApiKey.ts b/src/management/api/types/FlowsVaultConnectioSetupTwilioApiKey.ts index 42f5fc71eb..c4d5b822d2 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTwilioApiKey.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTwilioApiKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeApiKeyEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeApiKeyEnum.ts index 3da28086a4..10addcdd51 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeApiKeyEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeApiKeyEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeApiKeyEnum = "API_KEY"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeBearerEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeBearerEnum.ts index e01b0be6de..bed9a652f0 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeBearerEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeBearerEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeBearerEnum = "BEARER"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeJwtEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeJwtEnum.ts index 2dd83cfec4..320e1c472b 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeJwtEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeJwtEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeJwtEnum = "JWT"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeKeyPairEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeKeyPairEnum.ts index e3489364b6..ff0ced88a3 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeKeyPairEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeKeyPairEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeKeyPairEnum = "KEY_PAIR"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeOauthAppEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeOauthAppEnum.ts index 46f9086b4e..378782701a 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeOauthAppEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeOauthAppEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeOauthAppEnum = "OAUTH_APP"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.ts index a09be30fea..2a8eb48960 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeOauthCodeEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeOauthCodeEnum = "OAUTH_CODE"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.ts index caed675e20..205dd7a859 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeOauthJwtEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeOauthJwtEnum = "OAUTH_JWT"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeTokenEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeTokenEnum.ts index 95055d5fc6..2388cd696e 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeTokenEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeTokenEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeTokenEnum = "TOKEN"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupTypeWebhookEnum.ts b/src/management/api/types/FlowsVaultConnectioSetupTypeWebhookEnum.ts index eedf588537..28e805936f 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupTypeWebhookEnum.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupTypeWebhookEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FlowsVaultConnectioSetupTypeWebhookEnum = "WEBHOOK"; diff --git a/src/management/api/types/FlowsVaultConnectioSetupWebhook.ts b/src/management/api/types/FlowsVaultConnectioSetupWebhook.ts index e5c341894b..b24d2a09dd 100644 --- a/src/management/api/types/FlowsVaultConnectioSetupWebhook.ts +++ b/src/management/api/types/FlowsVaultConnectioSetupWebhook.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FlowsVaultConnectionAppIdActivecampaignEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdActivecampaignEnum.ts index d30c926432..cc50afa77e 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdActivecampaignEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdActivecampaignEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdAirtableEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdAirtableEnum.ts index f8c82f5878..e6b7aa132d 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdAirtableEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdAirtableEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdAuth0Enum.ts b/src/management/api/types/FlowsVaultConnectionAppIdAuth0Enum.ts index 4b0c25060a..033f037cb5 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdAuth0Enum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdAuth0Enum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdBigqueryEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdBigqueryEnum.ts index c90e7982f3..de7765d496 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdBigqueryEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdBigqueryEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdClearbitEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdClearbitEnum.ts index 41c4a44556..d98faf9b80 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdClearbitEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdClearbitEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdDocusignEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdDocusignEnum.ts index afc1d01fd5..cd5567b7c2 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdDocusignEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdDocusignEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.ts index 0b3c0513c4..8efc851b86 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdGoogleSheetsEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdHttpEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdHttpEnum.ts index a4dbbddf31..304d4ededc 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdHttpEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdHttpEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdHubspotEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdHubspotEnum.ts index 42343c9a8e..5fbe441962 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdHubspotEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdHubspotEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdJwtEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdJwtEnum.ts index 54bcd22500..834bf7d2f5 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdJwtEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdJwtEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdMailchimpEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdMailchimpEnum.ts index 56e4a42ccb..1f24aae602 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdMailchimpEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdMailchimpEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdMailjetEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdMailjetEnum.ts index fa617590d6..79cea76b9a 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdMailjetEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdMailjetEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdPipedriveEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdPipedriveEnum.ts index a9ee1363aa..8b68a5c879 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdPipedriveEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdPipedriveEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdSalesforceEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdSalesforceEnum.ts index 894fe25435..fb22174e6b 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdSalesforceEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdSalesforceEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdSendgridEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdSendgridEnum.ts index bfb1aadf04..940fef343a 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdSendgridEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdSendgridEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdSlackEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdSlackEnum.ts index 18c47fe841..ba84007357 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdSlackEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdSlackEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdStripeEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdStripeEnum.ts index 334621cc20..8f0e0e936f 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdStripeEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdStripeEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdTelegramEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdTelegramEnum.ts index 8fdf5be42c..7998ef0cee 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdTelegramEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdTelegramEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdTwilioEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdTwilioEnum.ts index 2a9c5d4dee..cb080c7727 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdTwilioEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdTwilioEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdWhatsappEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdWhatsappEnum.ts index dcd392fb12..089c543de8 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdWhatsappEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdWhatsappEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionAppIdZapierEnum.ts b/src/management/api/types/FlowsVaultConnectionAppIdZapierEnum.ts index 646bfb9e82..a02e5c8c57 100644 --- a/src/management/api/types/FlowsVaultConnectionAppIdZapierEnum.ts +++ b/src/management/api/types/FlowsVaultConnectionAppIdZapierEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flows Vault Connection app identifier. diff --git a/src/management/api/types/FlowsVaultConnectionSummary.ts b/src/management/api/types/FlowsVaultConnectionSummary.ts index 262052aa53..295234de68 100644 --- a/src/management/api/types/FlowsVaultConnectionSummary.ts +++ b/src/management/api/types/FlowsVaultConnectionSummary.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FlowsVaultConnectionSummary { /** Flows Vault Connection identifier. */ diff --git a/src/management/api/types/FormBlock.ts b/src/management/api/types/FormBlock.ts index f64ff8c3b5..6e606ec122 100644 --- a/src/management/api/types/FormBlock.ts +++ b/src/management/api/types/FormBlock.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockDivider.ts b/src/management/api/types/FormBlockDivider.ts index 8b8e515d72..b2457d6185 100644 --- a/src/management/api/types/FormBlockDivider.ts +++ b/src/management/api/types/FormBlockDivider.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockDividerConfig.ts b/src/management/api/types/FormBlockDividerConfig.ts index 4d1e123832..06a459b8c8 100644 --- a/src/management/api/types/FormBlockDividerConfig.ts +++ b/src/management/api/types/FormBlockDividerConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormBlockDividerConfig { text?: string; diff --git a/src/management/api/types/FormBlockHtml.ts b/src/management/api/types/FormBlockHtml.ts index 631c680746..26f0d447df 100644 --- a/src/management/api/types/FormBlockHtml.ts +++ b/src/management/api/types/FormBlockHtml.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockHtmlConfig.ts b/src/management/api/types/FormBlockHtmlConfig.ts index bb01c81905..299520be93 100644 --- a/src/management/api/types/FormBlockHtmlConfig.ts +++ b/src/management/api/types/FormBlockHtmlConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormBlockHtmlConfig { content?: string; diff --git a/src/management/api/types/FormBlockImage.ts b/src/management/api/types/FormBlockImage.ts index c4ca3f430b..79724eac1d 100644 --- a/src/management/api/types/FormBlockImage.ts +++ b/src/management/api/types/FormBlockImage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockImageConfig.ts b/src/management/api/types/FormBlockImageConfig.ts index 6012346249..a8005e8ba5 100644 --- a/src/management/api/types/FormBlockImageConfig.ts +++ b/src/management/api/types/FormBlockImageConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockImageConfigPositionEnum.ts b/src/management/api/types/FormBlockImageConfigPositionEnum.ts index 992444a2cc..7ba38e706a 100644 --- a/src/management/api/types/FormBlockImageConfigPositionEnum.ts +++ b/src/management/api/types/FormBlockImageConfigPositionEnum.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormBlockImageConfigPositionEnum = "LEFT" | "CENTER" | "RIGHT"; export const FormBlockImageConfigPositionEnum = { Left: "LEFT", Center: "CENTER", Right: "RIGHT", } as const; +export type FormBlockImageConfigPositionEnum = + (typeof FormBlockImageConfigPositionEnum)[keyof typeof FormBlockImageConfigPositionEnum]; diff --git a/src/management/api/types/FormBlockJumpButton.ts b/src/management/api/types/FormBlockJumpButton.ts index 146ecef8d2..7c458b85a4 100644 --- a/src/management/api/types/FormBlockJumpButton.ts +++ b/src/management/api/types/FormBlockJumpButton.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockJumpButtonConfig.ts b/src/management/api/types/FormBlockJumpButtonConfig.ts index c96a782dd0..41f529c711 100644 --- a/src/management/api/types/FormBlockJumpButtonConfig.ts +++ b/src/management/api/types/FormBlockJumpButtonConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockJumpButtonConfigStyle.ts b/src/management/api/types/FormBlockJumpButtonConfigStyle.ts index 797c64d459..3168ef0129 100644 --- a/src/management/api/types/FormBlockJumpButtonConfigStyle.ts +++ b/src/management/api/types/FormBlockJumpButtonConfigStyle.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormBlockJumpButtonConfigStyle { background_color?: string; diff --git a/src/management/api/types/FormBlockNextButton.ts b/src/management/api/types/FormBlockNextButton.ts index 0045c34440..030930a637 100644 --- a/src/management/api/types/FormBlockNextButton.ts +++ b/src/management/api/types/FormBlockNextButton.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockNextButtonConfig.ts b/src/management/api/types/FormBlockNextButtonConfig.ts index 19d9f8b128..99d0b8dbd8 100644 --- a/src/management/api/types/FormBlockNextButtonConfig.ts +++ b/src/management/api/types/FormBlockNextButtonConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormBlockNextButtonConfig { text: string; diff --git a/src/management/api/types/FormBlockPreviousButton.ts b/src/management/api/types/FormBlockPreviousButton.ts index a00e377027..781f8727e7 100644 --- a/src/management/api/types/FormBlockPreviousButton.ts +++ b/src/management/api/types/FormBlockPreviousButton.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockPreviousButtonConfig.ts b/src/management/api/types/FormBlockPreviousButtonConfig.ts index 3937a4f2f5..b7592b69a7 100644 --- a/src/management/api/types/FormBlockPreviousButtonConfig.ts +++ b/src/management/api/types/FormBlockPreviousButtonConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormBlockPreviousButtonConfig { text: string; diff --git a/src/management/api/types/FormBlockResendButton.ts b/src/management/api/types/FormBlockResendButton.ts index 805c792a1d..661799d74c 100644 --- a/src/management/api/types/FormBlockResendButton.ts +++ b/src/management/api/types/FormBlockResendButton.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockResendButtonConfig.ts b/src/management/api/types/FormBlockResendButtonConfig.ts index 75787c2477..4962524236 100644 --- a/src/management/api/types/FormBlockResendButtonConfig.ts +++ b/src/management/api/types/FormBlockResendButtonConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockResendButtonConfigTextAlignmentEnum.ts b/src/management/api/types/FormBlockResendButtonConfigTextAlignmentEnum.ts index ddf48c1d8c..b4fe95b48e 100644 --- a/src/management/api/types/FormBlockResendButtonConfigTextAlignmentEnum.ts +++ b/src/management/api/types/FormBlockResendButtonConfigTextAlignmentEnum.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormBlockResendButtonConfigTextAlignmentEnum = "LEFT" | "CENTER" | "RIGHT"; export const FormBlockResendButtonConfigTextAlignmentEnum = { Left: "LEFT", Center: "CENTER", Right: "RIGHT", } as const; +export type FormBlockResendButtonConfigTextAlignmentEnum = + (typeof FormBlockResendButtonConfigTextAlignmentEnum)[keyof typeof FormBlockResendButtonConfigTextAlignmentEnum]; diff --git a/src/management/api/types/FormBlockRichText.ts b/src/management/api/types/FormBlockRichText.ts index 6a0dad9bbb..724a629262 100644 --- a/src/management/api/types/FormBlockRichText.ts +++ b/src/management/api/types/FormBlockRichText.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormBlockRichTextConfig.ts b/src/management/api/types/FormBlockRichTextConfig.ts index 98615c0efb..8abf59b089 100644 --- a/src/management/api/types/FormBlockRichTextConfig.ts +++ b/src/management/api/types/FormBlockRichTextConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormBlockRichTextConfig { content?: string; diff --git a/src/management/api/types/FormBlockTypeDividerConst.ts b/src/management/api/types/FormBlockTypeDividerConst.ts index b3483307ea..2067f228ad 100644 --- a/src/management/api/types/FormBlockTypeDividerConst.ts +++ b/src/management/api/types/FormBlockTypeDividerConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeDividerConst = "DIVIDER"; diff --git a/src/management/api/types/FormBlockTypeHtmlConst.ts b/src/management/api/types/FormBlockTypeHtmlConst.ts index c5b1c3f498..78174e9646 100644 --- a/src/management/api/types/FormBlockTypeHtmlConst.ts +++ b/src/management/api/types/FormBlockTypeHtmlConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeHtmlConst = "HTML"; diff --git a/src/management/api/types/FormBlockTypeImageConst.ts b/src/management/api/types/FormBlockTypeImageConst.ts index e7935cf24a..943bf8d876 100644 --- a/src/management/api/types/FormBlockTypeImageConst.ts +++ b/src/management/api/types/FormBlockTypeImageConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeImageConst = "IMAGE"; diff --git a/src/management/api/types/FormBlockTypeJumpButtonConst.ts b/src/management/api/types/FormBlockTypeJumpButtonConst.ts index aa9704178f..471397b63e 100644 --- a/src/management/api/types/FormBlockTypeJumpButtonConst.ts +++ b/src/management/api/types/FormBlockTypeJumpButtonConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeJumpButtonConst = "JUMP_BUTTON"; diff --git a/src/management/api/types/FormBlockTypeNextButtonConst.ts b/src/management/api/types/FormBlockTypeNextButtonConst.ts index c9c6b72ba0..e308a96f7f 100644 --- a/src/management/api/types/FormBlockTypeNextButtonConst.ts +++ b/src/management/api/types/FormBlockTypeNextButtonConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeNextButtonConst = "NEXT_BUTTON"; diff --git a/src/management/api/types/FormBlockTypePreviousButtonConst.ts b/src/management/api/types/FormBlockTypePreviousButtonConst.ts index 7c03cd068d..0134207b53 100644 --- a/src/management/api/types/FormBlockTypePreviousButtonConst.ts +++ b/src/management/api/types/FormBlockTypePreviousButtonConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypePreviousButtonConst = "PREVIOUS_BUTTON"; diff --git a/src/management/api/types/FormBlockTypeResendButtonConst.ts b/src/management/api/types/FormBlockTypeResendButtonConst.ts index 2e5109022d..cb02d24b62 100644 --- a/src/management/api/types/FormBlockTypeResendButtonConst.ts +++ b/src/management/api/types/FormBlockTypeResendButtonConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeResendButtonConst = "RESEND_BUTTON"; diff --git a/src/management/api/types/FormBlockTypeRichTextConst.ts b/src/management/api/types/FormBlockTypeRichTextConst.ts index 6710683abe..0c30a1b0df 100644 --- a/src/management/api/types/FormBlockTypeRichTextConst.ts +++ b/src/management/api/types/FormBlockTypeRichTextConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormBlockTypeRichTextConst = "RICH_TEXT"; diff --git a/src/management/api/types/FormComponent.ts b/src/management/api/types/FormComponent.ts index 09ca0b55e1..0cc95e6b2e 100644 --- a/src/management/api/types/FormComponent.ts +++ b/src/management/api/types/FormComponent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormComponentCategoryBlockConst.ts b/src/management/api/types/FormComponentCategoryBlockConst.ts index b85a086bfb..e6cc1b66d3 100644 --- a/src/management/api/types/FormComponentCategoryBlockConst.ts +++ b/src/management/api/types/FormComponentCategoryBlockConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormComponentCategoryBlockConst = "BLOCK"; diff --git a/src/management/api/types/FormComponentCategoryFieldConst.ts b/src/management/api/types/FormComponentCategoryFieldConst.ts index 24051b4acb..5ff3d0e790 100644 --- a/src/management/api/types/FormComponentCategoryFieldConst.ts +++ b/src/management/api/types/FormComponentCategoryFieldConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormComponentCategoryFieldConst = "FIELD"; diff --git a/src/management/api/types/FormComponentCategoryWidgetConst.ts b/src/management/api/types/FormComponentCategoryWidgetConst.ts index 43cd5292a9..b9db2742d4 100644 --- a/src/management/api/types/FormComponentCategoryWidgetConst.ts +++ b/src/management/api/types/FormComponentCategoryWidgetConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormComponentCategoryWidgetConst = "WIDGET"; diff --git a/src/management/api/types/FormEndingNode.ts b/src/management/api/types/FormEndingNode.ts index 40f2ed07ed..0666cd1c5e 100644 --- a/src/management/api/types/FormEndingNode.ts +++ b/src/management/api/types/FormEndingNode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormEndingNodeAfterSubmit.ts b/src/management/api/types/FormEndingNodeAfterSubmit.ts index 227f5ae572..a8233e1a37 100644 --- a/src/management/api/types/FormEndingNodeAfterSubmit.ts +++ b/src/management/api/types/FormEndingNodeAfterSubmit.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormEndingNodeAfterSubmit { flow_id?: string; diff --git a/src/management/api/types/FormEndingNodeId.ts b/src/management/api/types/FormEndingNodeId.ts index 93b7a1225e..ff740dc616 100644 --- a/src/management/api/types/FormEndingNodeId.ts +++ b/src/management/api/types/FormEndingNodeId.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormEndingNodeId = "$ending"; diff --git a/src/management/api/types/FormEndingNodeNullable.ts b/src/management/api/types/FormEndingNodeNullable.ts index 2d2ce11628..103722cc14 100644 --- a/src/management/api/types/FormEndingNodeNullable.ts +++ b/src/management/api/types/FormEndingNodeNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormEndingNodeNullable = Management.FormEndingNode | undefined; +export type FormEndingNodeNullable = (Management.FormEndingNode | null) | undefined; diff --git a/src/management/api/types/FormEndingNodeRedirection.ts b/src/management/api/types/FormEndingNodeRedirection.ts index edeadbd699..bed8a88e47 100644 --- a/src/management/api/types/FormEndingNodeRedirection.ts +++ b/src/management/api/types/FormEndingNodeRedirection.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormEndingNodeRedirection { delay?: number; diff --git a/src/management/api/types/FormEndingNodeResumeFlowTrueConst.ts b/src/management/api/types/FormEndingNodeResumeFlowTrueConst.ts index b8a3317cda..b9d5194d5b 100644 --- a/src/management/api/types/FormEndingNodeResumeFlowTrueConst.ts +++ b/src/management/api/types/FormEndingNodeResumeFlowTrueConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormEndingNodeResumeFlowTrueConst = boolean; diff --git a/src/management/api/types/FormField.ts b/src/management/api/types/FormField.ts index 60ef87fdba..13f9e6e842 100644 --- a/src/management/api/types/FormField.ts +++ b/src/management/api/types/FormField.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldBoolean.ts b/src/management/api/types/FormFieldBoolean.ts index 20171deec6..04c33be891 100644 --- a/src/management/api/types/FormFieldBoolean.ts +++ b/src/management/api/types/FormFieldBoolean.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldBooleanConfig.ts b/src/management/api/types/FormFieldBooleanConfig.ts index c6972641cb..e3c2b0193c 100644 --- a/src/management/api/types/FormFieldBooleanConfig.ts +++ b/src/management/api/types/FormFieldBooleanConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldBooleanConfigOptions.ts b/src/management/api/types/FormFieldBooleanConfigOptions.ts index e5d5ad6bcc..367c14f0d1 100644 --- a/src/management/api/types/FormFieldBooleanConfigOptions.ts +++ b/src/management/api/types/FormFieldBooleanConfigOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldBooleanConfigOptions { true?: string; diff --git a/src/management/api/types/FormFieldCards.ts b/src/management/api/types/FormFieldCards.ts index fec3590219..55232d35ec 100644 --- a/src/management/api/types/FormFieldCards.ts +++ b/src/management/api/types/FormFieldCards.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldCardsConfig.ts b/src/management/api/types/FormFieldCardsConfig.ts index 4730a9d47e..e0fa198f82 100644 --- a/src/management/api/types/FormFieldCardsConfig.ts +++ b/src/management/api/types/FormFieldCardsConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldCardsConfigOption.ts b/src/management/api/types/FormFieldCardsConfigOption.ts index f2e367322f..db27f1ba9e 100644 --- a/src/management/api/types/FormFieldCardsConfigOption.ts +++ b/src/management/api/types/FormFieldCardsConfigOption.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldCardsConfigOption { value: string; diff --git a/src/management/api/types/FormFieldChoice.ts b/src/management/api/types/FormFieldChoice.ts index d589cd8986..56a9e4972d 100644 --- a/src/management/api/types/FormFieldChoice.ts +++ b/src/management/api/types/FormFieldChoice.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldChoiceConfig.ts b/src/management/api/types/FormFieldChoiceConfig.ts index c53d2076f8..efa0cbd9cc 100644 --- a/src/management/api/types/FormFieldChoiceConfig.ts +++ b/src/management/api/types/FormFieldChoiceConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldChoiceConfigAllowOther.ts b/src/management/api/types/FormFieldChoiceConfigAllowOther.ts index 5e016a1b4e..134813d516 100644 --- a/src/management/api/types/FormFieldChoiceConfigAllowOther.ts +++ b/src/management/api/types/FormFieldChoiceConfigAllowOther.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldChoiceConfigAllowOtherEnabledTrueEnum.ts b/src/management/api/types/FormFieldChoiceConfigAllowOtherEnabledTrueEnum.ts index 1786639171..7d755135cd 100644 --- a/src/management/api/types/FormFieldChoiceConfigAllowOtherEnabledTrueEnum.ts +++ b/src/management/api/types/FormFieldChoiceConfigAllowOtherEnabledTrueEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldChoiceConfigAllowOtherEnabledTrueEnum = boolean; diff --git a/src/management/api/types/FormFieldChoiceConfigOption.ts b/src/management/api/types/FormFieldChoiceConfigOption.ts index c253506f89..855098f586 100644 --- a/src/management/api/types/FormFieldChoiceConfigOption.ts +++ b/src/management/api/types/FormFieldChoiceConfigOption.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldChoiceConfigOption { value: string; diff --git a/src/management/api/types/FormFieldCustom.ts b/src/management/api/types/FormFieldCustom.ts index fe17858540..aca2123f46 100644 --- a/src/management/api/types/FormFieldCustom.ts +++ b/src/management/api/types/FormFieldCustom.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldCustomConfig.ts b/src/management/api/types/FormFieldCustomConfig.ts index 038e62af93..8fd715cb62 100644 --- a/src/management/api/types/FormFieldCustomConfig.ts +++ b/src/management/api/types/FormFieldCustomConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldCustomConfigParams.ts b/src/management/api/types/FormFieldCustomConfigParams.ts index 97a1464864..a689c7aaf0 100644 --- a/src/management/api/types/FormFieldCustomConfigParams.ts +++ b/src/management/api/types/FormFieldCustomConfigParams.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldCustomConfigParams = Record; diff --git a/src/management/api/types/FormFieldCustomConfigSchema.ts b/src/management/api/types/FormFieldCustomConfigSchema.ts index bed871948e..834fe29fc2 100644 --- a/src/management/api/types/FormFieldCustomConfigSchema.ts +++ b/src/management/api/types/FormFieldCustomConfigSchema.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldCustomConfigSchema = Record; diff --git a/src/management/api/types/FormFieldDate.ts b/src/management/api/types/FormFieldDate.ts index ece0017c4c..01aa09397a 100644 --- a/src/management/api/types/FormFieldDate.ts +++ b/src/management/api/types/FormFieldDate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldDateConfig.ts b/src/management/api/types/FormFieldDateConfig.ts index 55eaf81235..7db861ebb8 100644 --- a/src/management/api/types/FormFieldDateConfig.ts +++ b/src/management/api/types/FormFieldDateConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldDateConfigFormatEnum.ts b/src/management/api/types/FormFieldDateConfigFormatEnum.ts index 05e278f54d..a927be1184 100644 --- a/src/management/api/types/FormFieldDateConfigFormatEnum.ts +++ b/src/management/api/types/FormFieldDateConfigFormatEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormFieldDateConfigFormatEnum = "DATE" | "TIME"; export const FormFieldDateConfigFormatEnum = { Date: "DATE", Time: "TIME", } as const; +export type FormFieldDateConfigFormatEnum = + (typeof FormFieldDateConfigFormatEnum)[keyof typeof FormFieldDateConfigFormatEnum]; diff --git a/src/management/api/types/FormFieldDropdown.ts b/src/management/api/types/FormFieldDropdown.ts index bf20d67838..06ed632ea8 100644 --- a/src/management/api/types/FormFieldDropdown.ts +++ b/src/management/api/types/FormFieldDropdown.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldDropdownConfig.ts b/src/management/api/types/FormFieldDropdownConfig.ts index e349c53363..ffdd0fcf98 100644 --- a/src/management/api/types/FormFieldDropdownConfig.ts +++ b/src/management/api/types/FormFieldDropdownConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldDropdownConfigOption.ts b/src/management/api/types/FormFieldDropdownConfigOption.ts index 4cee121d51..84dde4e60f 100644 --- a/src/management/api/types/FormFieldDropdownConfigOption.ts +++ b/src/management/api/types/FormFieldDropdownConfigOption.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldDropdownConfigOption { value: string; diff --git a/src/management/api/types/FormFieldEmail.ts b/src/management/api/types/FormFieldEmail.ts index 70eeaf2119..b78666d96e 100644 --- a/src/management/api/types/FormFieldEmail.ts +++ b/src/management/api/types/FormFieldEmail.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldEmailConfig.ts b/src/management/api/types/FormFieldEmailConfig.ts index 2ca15b1395..6e1518d423 100644 --- a/src/management/api/types/FormFieldEmailConfig.ts +++ b/src/management/api/types/FormFieldEmailConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldEmailConfig { default_value?: string; diff --git a/src/management/api/types/FormFieldFile.ts b/src/management/api/types/FormFieldFile.ts index 34c00387a8..5206eac361 100644 --- a/src/management/api/types/FormFieldFile.ts +++ b/src/management/api/types/FormFieldFile.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldFileConfig.ts b/src/management/api/types/FormFieldFileConfig.ts index caef5d430c..f1544d531b 100644 --- a/src/management/api/types/FormFieldFileConfig.ts +++ b/src/management/api/types/FormFieldFileConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldFileConfigCategoryEnum.ts b/src/management/api/types/FormFieldFileConfigCategoryEnum.ts index 55e443a43e..724d45266a 100644 --- a/src/management/api/types/FormFieldFileConfigCategoryEnum.ts +++ b/src/management/api/types/FormFieldFileConfigCategoryEnum.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormFieldFileConfigCategoryEnum = "AUDIO" | "VIDEO" | "IMAGE" | "DOCUMENT" | "ARCHIVE"; export const FormFieldFileConfigCategoryEnum = { Audio: "AUDIO", Video: "VIDEO", @@ -10,3 +7,5 @@ export const FormFieldFileConfigCategoryEnum = { Document: "DOCUMENT", Archive: "ARCHIVE", } as const; +export type FormFieldFileConfigCategoryEnum = + (typeof FormFieldFileConfigCategoryEnum)[keyof typeof FormFieldFileConfigCategoryEnum]; diff --git a/src/management/api/types/FormFieldFileConfigStorage.ts b/src/management/api/types/FormFieldFileConfigStorage.ts index 9b08d29854..76b686ed31 100644 --- a/src/management/api/types/FormFieldFileConfigStorage.ts +++ b/src/management/api/types/FormFieldFileConfigStorage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldFileConfigStorageTypeEnum.ts b/src/management/api/types/FormFieldFileConfigStorageTypeEnum.ts index 513b56b19e..10fb5945e3 100644 --- a/src/management/api/types/FormFieldFileConfigStorageTypeEnum.ts +++ b/src/management/api/types/FormFieldFileConfigStorageTypeEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormFieldFileConfigStorageTypeEnum = "MANAGED" | "CUSTOM"; export const FormFieldFileConfigStorageTypeEnum = { Managed: "MANAGED", Custom: "CUSTOM", } as const; +export type FormFieldFileConfigStorageTypeEnum = + (typeof FormFieldFileConfigStorageTypeEnum)[keyof typeof FormFieldFileConfigStorageTypeEnum]; diff --git a/src/management/api/types/FormFieldLegal.ts b/src/management/api/types/FormFieldLegal.ts index b2db772745..18b92fb72a 100644 --- a/src/management/api/types/FormFieldLegal.ts +++ b/src/management/api/types/FormFieldLegal.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldLegalConfig.ts b/src/management/api/types/FormFieldLegalConfig.ts index e10e080bd3..b5fa404e7e 100644 --- a/src/management/api/types/FormFieldLegalConfig.ts +++ b/src/management/api/types/FormFieldLegalConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldLegalConfig { text?: string; diff --git a/src/management/api/types/FormFieldNumber.ts b/src/management/api/types/FormFieldNumber.ts index 4255243b96..c0f7192da4 100644 --- a/src/management/api/types/FormFieldNumber.ts +++ b/src/management/api/types/FormFieldNumber.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldNumberConfig.ts b/src/management/api/types/FormFieldNumberConfig.ts index c114904267..bb86dc08c4 100644 --- a/src/management/api/types/FormFieldNumberConfig.ts +++ b/src/management/api/types/FormFieldNumberConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldNumberConfig { default_value?: number; diff --git a/src/management/api/types/FormFieldPassword.ts b/src/management/api/types/FormFieldPassword.ts index d407c9856a..631ef43f53 100644 --- a/src/management/api/types/FormFieldPassword.ts +++ b/src/management/api/types/FormFieldPassword.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPasswordConfig.ts b/src/management/api/types/FormFieldPasswordConfig.ts index def8fb5dfb..1d966e5b53 100644 --- a/src/management/api/types/FormFieldPasswordConfig.ts +++ b/src/management/api/types/FormFieldPasswordConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPasswordConfigHashEnum.ts b/src/management/api/types/FormFieldPasswordConfigHashEnum.ts index 2600044593..75ddcf9c37 100644 --- a/src/management/api/types/FormFieldPasswordConfigHashEnum.ts +++ b/src/management/api/types/FormFieldPasswordConfigHashEnum.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormFieldPasswordConfigHashEnum = "NONE" | "MD5" | "SHA1" | "SHA256" | "SHA512"; export const FormFieldPasswordConfigHashEnum = { None: "NONE", Md5: "MD5", @@ -10,3 +7,5 @@ export const FormFieldPasswordConfigHashEnum = { Sha256: "SHA256", Sha512: "SHA512", } as const; +export type FormFieldPasswordConfigHashEnum = + (typeof FormFieldPasswordConfigHashEnum)[keyof typeof FormFieldPasswordConfigHashEnum]; diff --git a/src/management/api/types/FormFieldPayment.ts b/src/management/api/types/FormFieldPayment.ts index 5a0d10d1b0..a46e3d78a2 100644 --- a/src/management/api/types/FormFieldPayment.ts +++ b/src/management/api/types/FormFieldPayment.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPaymentConfig.ts b/src/management/api/types/FormFieldPaymentConfig.ts index 24fa3d5afe..b8c7fac6ea 100644 --- a/src/management/api/types/FormFieldPaymentConfig.ts +++ b/src/management/api/types/FormFieldPaymentConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPaymentConfigCharge.ts b/src/management/api/types/FormFieldPaymentConfigCharge.ts index 1634e2e42c..76c2bdb7e7 100644 --- a/src/management/api/types/FormFieldPaymentConfigCharge.ts +++ b/src/management/api/types/FormFieldPaymentConfigCharge.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPaymentConfigChargeOneOff.ts b/src/management/api/types/FormFieldPaymentConfigChargeOneOff.ts index 0fe55805d2..07fc6fb1f0 100644 --- a/src/management/api/types/FormFieldPaymentConfigChargeOneOff.ts +++ b/src/management/api/types/FormFieldPaymentConfigChargeOneOff.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.ts b/src/management/api/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.ts index 65acd657f1..2b215b6028 100644 --- a/src/management/api/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.ts +++ b/src/management/api/types/FormFieldPaymentConfigChargeOneOffCurrencyEnum.ts @@ -1,17 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormFieldPaymentConfigChargeOneOffCurrencyEnum = - | "AUD" - | "CAD" - | "CHF" - | "EUR" - | "GBP" - | "INR" - | "MXN" - | "SEK" - | "USD"; export const FormFieldPaymentConfigChargeOneOffCurrencyEnum = { Aud: "AUD", Cad: "CAD", @@ -23,3 +11,5 @@ export const FormFieldPaymentConfigChargeOneOffCurrencyEnum = { Sek: "SEK", Usd: "USD", } as const; +export type FormFieldPaymentConfigChargeOneOffCurrencyEnum = + (typeof FormFieldPaymentConfigChargeOneOffCurrencyEnum)[keyof typeof FormFieldPaymentConfigChargeOneOffCurrencyEnum]; diff --git a/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOff.ts b/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOff.ts index 9d59f3981c..61178c75e1 100644 --- a/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOff.ts +++ b/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOff.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.ts b/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.ts index a8fef4f308..8f570d53dc 100644 --- a/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.ts +++ b/src/management/api/types/FormFieldPaymentConfigChargeOneOffOneOffAmount.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldPaymentConfigChargeOneOffOneOffAmount = string | number; diff --git a/src/management/api/types/FormFieldPaymentConfigChargeTypeOneOffConst.ts b/src/management/api/types/FormFieldPaymentConfigChargeTypeOneOffConst.ts index c2ca3cba85..d7f23ff808 100644 --- a/src/management/api/types/FormFieldPaymentConfigChargeTypeOneOffConst.ts +++ b/src/management/api/types/FormFieldPaymentConfigChargeTypeOneOffConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldPaymentConfigChargeTypeOneOffConst = "ONE_OFF"; diff --git a/src/management/api/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.ts b/src/management/api/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.ts index 29b08b77cd..ae1acaa5c8 100644 --- a/src/management/api/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.ts +++ b/src/management/api/types/FormFieldPaymentConfigChargeTypeSubscriptionConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldPaymentConfigChargeTypeSubscriptionConst = "SUBSCRIPTION"; diff --git a/src/management/api/types/FormFieldPaymentConfigCredentials.ts b/src/management/api/types/FormFieldPaymentConfigCredentials.ts index f89a0efa45..19016ccdef 100644 --- a/src/management/api/types/FormFieldPaymentConfigCredentials.ts +++ b/src/management/api/types/FormFieldPaymentConfigCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldPaymentConfigCredentials { public_key: string; diff --git a/src/management/api/types/FormFieldPaymentConfigCustomer.ts b/src/management/api/types/FormFieldPaymentConfigCustomer.ts index f3bb37cab3..357c771f09 100644 --- a/src/management/api/types/FormFieldPaymentConfigCustomer.ts +++ b/src/management/api/types/FormFieldPaymentConfigCustomer.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldPaymentConfigCustomer = Record; diff --git a/src/management/api/types/FormFieldPaymentConfigFieldProperties.ts b/src/management/api/types/FormFieldPaymentConfigFieldProperties.ts index 31a2cb3ad2..4f1b345263 100644 --- a/src/management/api/types/FormFieldPaymentConfigFieldProperties.ts +++ b/src/management/api/types/FormFieldPaymentConfigFieldProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldPaymentConfigFieldProperties { label?: string; diff --git a/src/management/api/types/FormFieldPaymentConfigFields.ts b/src/management/api/types/FormFieldPaymentConfigFields.ts index d958d0738c..95416ad81b 100644 --- a/src/management/api/types/FormFieldPaymentConfigFields.ts +++ b/src/management/api/types/FormFieldPaymentConfigFields.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldPaymentConfigProviderEnum.ts b/src/management/api/types/FormFieldPaymentConfigProviderEnum.ts index 7a8db89573..1af91e4866 100644 --- a/src/management/api/types/FormFieldPaymentConfigProviderEnum.ts +++ b/src/management/api/types/FormFieldPaymentConfigProviderEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldPaymentConfigProviderEnum = "STRIPE"; diff --git a/src/management/api/types/FormFieldPaymentConfigSubscription.ts b/src/management/api/types/FormFieldPaymentConfigSubscription.ts index 5ac023fee1..ee025e101c 100644 --- a/src/management/api/types/FormFieldPaymentConfigSubscription.ts +++ b/src/management/api/types/FormFieldPaymentConfigSubscription.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldPaymentConfigSubscription = Record; diff --git a/src/management/api/types/FormFieldSocial.ts b/src/management/api/types/FormFieldSocial.ts index bcd0189fbe..e6946e3241 100644 --- a/src/management/api/types/FormFieldSocial.ts +++ b/src/management/api/types/FormFieldSocial.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldSocialConfig.ts b/src/management/api/types/FormFieldSocialConfig.ts index eca6c41259..8bb9e475bc 100644 --- a/src/management/api/types/FormFieldSocialConfig.ts +++ b/src/management/api/types/FormFieldSocialConfig.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldSocialConfig {} diff --git a/src/management/api/types/FormFieldTel.ts b/src/management/api/types/FormFieldTel.ts index aa95b5a6ef..10d9666608 100644 --- a/src/management/api/types/FormFieldTel.ts +++ b/src/management/api/types/FormFieldTel.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldTelConfig.ts b/src/management/api/types/FormFieldTelConfig.ts index 1f60163434..5908993742 100644 --- a/src/management/api/types/FormFieldTelConfig.ts +++ b/src/management/api/types/FormFieldTelConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldTelConfigStrings.ts b/src/management/api/types/FormFieldTelConfigStrings.ts index aa1711b3a5..4a8b620bd4 100644 --- a/src/management/api/types/FormFieldTelConfigStrings.ts +++ b/src/management/api/types/FormFieldTelConfigStrings.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldTelConfigStrings { filter_placeholder?: string; diff --git a/src/management/api/types/FormFieldText.ts b/src/management/api/types/FormFieldText.ts index 913517aa24..b81ff1000e 100644 --- a/src/management/api/types/FormFieldText.ts +++ b/src/management/api/types/FormFieldText.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldTextConfig.ts b/src/management/api/types/FormFieldTextConfig.ts index ec8ce6f0cd..0645da07f0 100644 --- a/src/management/api/types/FormFieldTextConfig.ts +++ b/src/management/api/types/FormFieldTextConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldTextConfig { multiline?: boolean; diff --git a/src/management/api/types/FormFieldTypeBooleanConst.ts b/src/management/api/types/FormFieldTypeBooleanConst.ts index f821b9f3db..76c1f6d0c5 100644 --- a/src/management/api/types/FormFieldTypeBooleanConst.ts +++ b/src/management/api/types/FormFieldTypeBooleanConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeBooleanConst = "BOOLEAN"; diff --git a/src/management/api/types/FormFieldTypeCardsConst.ts b/src/management/api/types/FormFieldTypeCardsConst.ts index 28b70b8acd..5c6b7b1e63 100644 --- a/src/management/api/types/FormFieldTypeCardsConst.ts +++ b/src/management/api/types/FormFieldTypeCardsConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeCardsConst = "CARDS"; diff --git a/src/management/api/types/FormFieldTypeChoiceConst.ts b/src/management/api/types/FormFieldTypeChoiceConst.ts index e7f5f5faab..f8d173b418 100644 --- a/src/management/api/types/FormFieldTypeChoiceConst.ts +++ b/src/management/api/types/FormFieldTypeChoiceConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeChoiceConst = "CHOICE"; diff --git a/src/management/api/types/FormFieldTypeCustomConst.ts b/src/management/api/types/FormFieldTypeCustomConst.ts index c4bf5831a0..57096974b1 100644 --- a/src/management/api/types/FormFieldTypeCustomConst.ts +++ b/src/management/api/types/FormFieldTypeCustomConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeCustomConst = "CUSTOM"; diff --git a/src/management/api/types/FormFieldTypeDateConst.ts b/src/management/api/types/FormFieldTypeDateConst.ts index 5b05f307a0..bbc6384209 100644 --- a/src/management/api/types/FormFieldTypeDateConst.ts +++ b/src/management/api/types/FormFieldTypeDateConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeDateConst = "DATE"; diff --git a/src/management/api/types/FormFieldTypeDropdownConst.ts b/src/management/api/types/FormFieldTypeDropdownConst.ts index 40e6e0418a..d29e0a1f81 100644 --- a/src/management/api/types/FormFieldTypeDropdownConst.ts +++ b/src/management/api/types/FormFieldTypeDropdownConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeDropdownConst = "DROPDOWN"; diff --git a/src/management/api/types/FormFieldTypeEmailConst.ts b/src/management/api/types/FormFieldTypeEmailConst.ts index 160759eb9b..ce4406819d 100644 --- a/src/management/api/types/FormFieldTypeEmailConst.ts +++ b/src/management/api/types/FormFieldTypeEmailConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeEmailConst = "EMAIL"; diff --git a/src/management/api/types/FormFieldTypeFileConst.ts b/src/management/api/types/FormFieldTypeFileConst.ts index 49203e87fe..e16b12e7be 100644 --- a/src/management/api/types/FormFieldTypeFileConst.ts +++ b/src/management/api/types/FormFieldTypeFileConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeFileConst = "FILE"; diff --git a/src/management/api/types/FormFieldTypeLegalConst.ts b/src/management/api/types/FormFieldTypeLegalConst.ts index 53cea05208..d67d627564 100644 --- a/src/management/api/types/FormFieldTypeLegalConst.ts +++ b/src/management/api/types/FormFieldTypeLegalConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeLegalConst = "LEGAL"; diff --git a/src/management/api/types/FormFieldTypeNumberConst.ts b/src/management/api/types/FormFieldTypeNumberConst.ts index 9cc356a204..c7b74c460e 100644 --- a/src/management/api/types/FormFieldTypeNumberConst.ts +++ b/src/management/api/types/FormFieldTypeNumberConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeNumberConst = "NUMBER"; diff --git a/src/management/api/types/FormFieldTypePasswordConst.ts b/src/management/api/types/FormFieldTypePasswordConst.ts index 4470adfdb0..0444fbf7a8 100644 --- a/src/management/api/types/FormFieldTypePasswordConst.ts +++ b/src/management/api/types/FormFieldTypePasswordConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypePasswordConst = "PASSWORD"; diff --git a/src/management/api/types/FormFieldTypePaymentConst.ts b/src/management/api/types/FormFieldTypePaymentConst.ts index 691f80068f..1e02bd491e 100644 --- a/src/management/api/types/FormFieldTypePaymentConst.ts +++ b/src/management/api/types/FormFieldTypePaymentConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypePaymentConst = "PAYMENT"; diff --git a/src/management/api/types/FormFieldTypeSocialConst.ts b/src/management/api/types/FormFieldTypeSocialConst.ts index 52e6aaee64..1ab5398f5f 100644 --- a/src/management/api/types/FormFieldTypeSocialConst.ts +++ b/src/management/api/types/FormFieldTypeSocialConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeSocialConst = "SOCIAL"; diff --git a/src/management/api/types/FormFieldTypeTelConst.ts b/src/management/api/types/FormFieldTypeTelConst.ts index cbb03d1b4e..c000281ffd 100644 --- a/src/management/api/types/FormFieldTypeTelConst.ts +++ b/src/management/api/types/FormFieldTypeTelConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeTelConst = "TEL"; diff --git a/src/management/api/types/FormFieldTypeTextConst.ts b/src/management/api/types/FormFieldTypeTextConst.ts index 45e7b794fe..4248a9bfe0 100644 --- a/src/management/api/types/FormFieldTypeTextConst.ts +++ b/src/management/api/types/FormFieldTypeTextConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeTextConst = "TEXT"; diff --git a/src/management/api/types/FormFieldTypeUrlConst.ts b/src/management/api/types/FormFieldTypeUrlConst.ts index e30b6f66e1..6b119f185f 100644 --- a/src/management/api/types/FormFieldTypeUrlConst.ts +++ b/src/management/api/types/FormFieldTypeUrlConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormFieldTypeUrlConst = "URL"; diff --git a/src/management/api/types/FormFieldUrl.ts b/src/management/api/types/FormFieldUrl.ts index 49fa7badd4..ef3153d3a7 100644 --- a/src/management/api/types/FormFieldUrl.ts +++ b/src/management/api/types/FormFieldUrl.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFieldUrlConfig.ts b/src/management/api/types/FormFieldUrlConfig.ts index 1a5bbc9141..c42b2edb30 100644 --- a/src/management/api/types/FormFieldUrlConfig.ts +++ b/src/management/api/types/FormFieldUrlConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormFieldUrlConfig { default_value?: string; diff --git a/src/management/api/types/FormFlow.ts b/src/management/api/types/FormFlow.ts index 573c83522d..6190dff274 100644 --- a/src/management/api/types/FormFlow.ts +++ b/src/management/api/types/FormFlow.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormFlowConfig.ts b/src/management/api/types/FormFlowConfig.ts index 0e7b2699f0..ad6c879c44 100644 --- a/src/management/api/types/FormFlowConfig.ts +++ b/src/management/api/types/FormFlowConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormHiddenField.ts b/src/management/api/types/FormHiddenField.ts index 0d9448d4bf..74bf45c090 100644 --- a/src/management/api/types/FormHiddenField.ts +++ b/src/management/api/types/FormHiddenField.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormHiddenField { key: string; diff --git a/src/management/api/types/FormLanguages.ts b/src/management/api/types/FormLanguages.ts index e8c35ab196..febe65bd64 100644 --- a/src/management/api/types/FormLanguages.ts +++ b/src/management/api/types/FormLanguages.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormLanguages { primary?: string; diff --git a/src/management/api/types/FormLanguagesNullable.ts b/src/management/api/types/FormLanguagesNullable.ts index fa0c7f30fa..0cc14c91ef 100644 --- a/src/management/api/types/FormLanguagesNullable.ts +++ b/src/management/api/types/FormLanguagesNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormLanguagesNullable = Management.FormLanguages | undefined; +export type FormLanguagesNullable = (Management.FormLanguages | null) | undefined; diff --git a/src/management/api/types/FormMessages.ts b/src/management/api/types/FormMessages.ts index a4efd6b08e..113e100968 100644 --- a/src/management/api/types/FormMessages.ts +++ b/src/management/api/types/FormMessages.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormMessagesCustom.ts b/src/management/api/types/FormMessagesCustom.ts index 6680cf76ec..a00f7263ef 100644 --- a/src/management/api/types/FormMessagesCustom.ts +++ b/src/management/api/types/FormMessagesCustom.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormMessagesCustom = Record; diff --git a/src/management/api/types/FormMessagesError.ts b/src/management/api/types/FormMessagesError.ts index 780a6c96cc..17d3c9312e 100644 --- a/src/management/api/types/FormMessagesError.ts +++ b/src/management/api/types/FormMessagesError.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormMessagesError = Record; diff --git a/src/management/api/types/FormMessagesNullable.ts b/src/management/api/types/FormMessagesNullable.ts index c2e40f01a1..8b3aae67e6 100644 --- a/src/management/api/types/FormMessagesNullable.ts +++ b/src/management/api/types/FormMessagesNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormMessagesNullable = Management.FormMessages | undefined; +export type FormMessagesNullable = (Management.FormMessages | null) | undefined; diff --git a/src/management/api/types/FormNode.ts b/src/management/api/types/FormNode.ts index d3f97637a8..2b0018147f 100644 --- a/src/management/api/types/FormNode.ts +++ b/src/management/api/types/FormNode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormNodeCoordinates.ts b/src/management/api/types/FormNodeCoordinates.ts index bf10a34172..066cf26654 100644 --- a/src/management/api/types/FormNodeCoordinates.ts +++ b/src/management/api/types/FormNodeCoordinates.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormNodeCoordinates { x: number; diff --git a/src/management/api/types/FormNodeList.ts b/src/management/api/types/FormNodeList.ts index 4a60dfb65c..8ae02fb017 100644 --- a/src/management/api/types/FormNodeList.ts +++ b/src/management/api/types/FormNodeList.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormNodeListNullable.ts b/src/management/api/types/FormNodeListNullable.ts index 6ec94a9c52..966ba4a914 100644 --- a/src/management/api/types/FormNodeListNullable.ts +++ b/src/management/api/types/FormNodeListNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormNodeListNullable = Management.FormNodeList | undefined; +export type FormNodeListNullable = (Management.FormNodeList | null) | undefined; diff --git a/src/management/api/types/FormNodePointer.ts b/src/management/api/types/FormNodePointer.ts index 5600693699..a7dbce4c09 100644 --- a/src/management/api/types/FormNodePointer.ts +++ b/src/management/api/types/FormNodePointer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormNodeTypeFlowConst.ts b/src/management/api/types/FormNodeTypeFlowConst.ts index 987abb50c8..00974d505a 100644 --- a/src/management/api/types/FormNodeTypeFlowConst.ts +++ b/src/management/api/types/FormNodeTypeFlowConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormNodeTypeFlowConst = "FLOW"; diff --git a/src/management/api/types/FormNodeTypeRouterConst.ts b/src/management/api/types/FormNodeTypeRouterConst.ts index 54bcbf5bf9..8cedf37255 100644 --- a/src/management/api/types/FormNodeTypeRouterConst.ts +++ b/src/management/api/types/FormNodeTypeRouterConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormNodeTypeRouterConst = "ROUTER"; diff --git a/src/management/api/types/FormNodeTypeStepConst.ts b/src/management/api/types/FormNodeTypeStepConst.ts index 3e587ad71a..dae9a91c46 100644 --- a/src/management/api/types/FormNodeTypeStepConst.ts +++ b/src/management/api/types/FormNodeTypeStepConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormNodeTypeStepConst = "STEP"; diff --git a/src/management/api/types/FormRouter.ts b/src/management/api/types/FormRouter.ts index e33759f011..8743664d9c 100644 --- a/src/management/api/types/FormRouter.ts +++ b/src/management/api/types/FormRouter.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormRouterConfig.ts b/src/management/api/types/FormRouterConfig.ts index d8a5bc1da3..ad1cfbeb85 100644 --- a/src/management/api/types/FormRouterConfig.ts +++ b/src/management/api/types/FormRouterConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormRouterRule.ts b/src/management/api/types/FormRouterRule.ts index 0d3507830e..8fd1015969 100644 --- a/src/management/api/types/FormRouterRule.ts +++ b/src/management/api/types/FormRouterRule.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormStartNode.ts b/src/management/api/types/FormStartNode.ts index 647104e956..586d603a0f 100644 --- a/src/management/api/types/FormStartNode.ts +++ b/src/management/api/types/FormStartNode.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormStartNodeNullable.ts b/src/management/api/types/FormStartNodeNullable.ts index 8e3aa853df..2847021710 100644 --- a/src/management/api/types/FormStartNodeNullable.ts +++ b/src/management/api/types/FormStartNodeNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormStartNodeNullable = Management.FormStartNode | undefined; +export type FormStartNodeNullable = (Management.FormStartNode | null) | undefined; diff --git a/src/management/api/types/FormStep.ts b/src/management/api/types/FormStep.ts index 7ea8eaefb8..2a32ccdbcb 100644 --- a/src/management/api/types/FormStep.ts +++ b/src/management/api/types/FormStep.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormStepComponentList.ts b/src/management/api/types/FormStepComponentList.ts index 5860c7126d..ba012145b1 100644 --- a/src/management/api/types/FormStepComponentList.ts +++ b/src/management/api/types/FormStepComponentList.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormStepConfig.ts b/src/management/api/types/FormStepConfig.ts index eef8be3352..2e13527ee8 100644 --- a/src/management/api/types/FormStepConfig.ts +++ b/src/management/api/types/FormStepConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormStyle.ts b/src/management/api/types/FormStyle.ts index d37ef45f14..1445ae7873 100644 --- a/src/management/api/types/FormStyle.ts +++ b/src/management/api/types/FormStyle.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormStyle { css?: string; diff --git a/src/management/api/types/FormStyleNullable.ts b/src/management/api/types/FormStyleNullable.ts index 697d35a4b4..c5b2fbdb2d 100644 --- a/src/management/api/types/FormStyleNullable.ts +++ b/src/management/api/types/FormStyleNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormStyleNullable = Management.FormStyle | undefined; +export type FormStyleNullable = (Management.FormStyle | null) | undefined; diff --git a/src/management/api/types/FormSummary.ts b/src/management/api/types/FormSummary.ts index 972560ab1f..cec2f65524 100644 --- a/src/management/api/types/FormSummary.ts +++ b/src/management/api/types/FormSummary.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormSummary { id: string; diff --git a/src/management/api/types/FormTranslations.ts b/src/management/api/types/FormTranslations.ts index 6dd357743e..b02354c4ba 100644 --- a/src/management/api/types/FormTranslations.ts +++ b/src/management/api/types/FormTranslations.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormTranslations = Record>; diff --git a/src/management/api/types/FormTranslationsNullable.ts b/src/management/api/types/FormTranslationsNullable.ts index 1adef1290e..8c26c6ba05 100644 --- a/src/management/api/types/FormTranslationsNullable.ts +++ b/src/management/api/types/FormTranslationsNullable.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type FormTranslationsNullable = Management.FormTranslations | undefined; +export type FormTranslationsNullable = (Management.FormTranslations | null) | undefined; diff --git a/src/management/api/types/FormWidget.ts b/src/management/api/types/FormWidget.ts index 067b1c5ffc..2d96645113 100644 --- a/src/management/api/types/FormWidget.ts +++ b/src/management/api/types/FormWidget.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormWidgetAuth0VerifiableCredentials.ts b/src/management/api/types/FormWidgetAuth0VerifiableCredentials.ts index be95473d2d..ffb1c11772 100644 --- a/src/management/api/types/FormWidgetAuth0VerifiableCredentials.ts +++ b/src/management/api/types/FormWidgetAuth0VerifiableCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormWidgetAuth0VerifiableCredentialsConfig.ts b/src/management/api/types/FormWidgetAuth0VerifiableCredentialsConfig.ts index c3c82f186e..f30cb2acd3 100644 --- a/src/management/api/types/FormWidgetAuth0VerifiableCredentialsConfig.ts +++ b/src/management/api/types/FormWidgetAuth0VerifiableCredentialsConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormWidgetAuth0VerifiableCredentialsConfig { url: string; diff --git a/src/management/api/types/FormWidgetGMapsAddress.ts b/src/management/api/types/FormWidgetGMapsAddress.ts index bfe13ca4a4..676c708e83 100644 --- a/src/management/api/types/FormWidgetGMapsAddress.ts +++ b/src/management/api/types/FormWidgetGMapsAddress.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormWidgetGMapsAddressConfig.ts b/src/management/api/types/FormWidgetGMapsAddressConfig.ts index a6b51c5883..57da92e34b 100644 --- a/src/management/api/types/FormWidgetGMapsAddressConfig.ts +++ b/src/management/api/types/FormWidgetGMapsAddressConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormWidgetGMapsAddressConfig { api_key: string; diff --git a/src/management/api/types/FormWidgetRecaptcha.ts b/src/management/api/types/FormWidgetRecaptcha.ts index 92557ff50c..33d7dc01ff 100644 --- a/src/management/api/types/FormWidgetRecaptcha.ts +++ b/src/management/api/types/FormWidgetRecaptcha.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/FormWidgetRecaptchaConfig.ts b/src/management/api/types/FormWidgetRecaptchaConfig.ts index 34de34d204..06a1c8e66f 100644 --- a/src/management/api/types/FormWidgetRecaptchaConfig.ts +++ b/src/management/api/types/FormWidgetRecaptchaConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface FormWidgetRecaptchaConfig { site_key: string; diff --git a/src/management/api/types/FormWidgetTypeAuth0VerifiableCredentialsConst.ts b/src/management/api/types/FormWidgetTypeAuth0VerifiableCredentialsConst.ts index 8121ce0be0..54f5c3e85b 100644 --- a/src/management/api/types/FormWidgetTypeAuth0VerifiableCredentialsConst.ts +++ b/src/management/api/types/FormWidgetTypeAuth0VerifiableCredentialsConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormWidgetTypeAuth0VerifiableCredentialsConst = "AUTH0_VERIFIABLE_CREDENTIALS"; diff --git a/src/management/api/types/FormWidgetTypeGMapsAddressConst.ts b/src/management/api/types/FormWidgetTypeGMapsAddressConst.ts index 6a4ccaa968..3e440c3c13 100644 --- a/src/management/api/types/FormWidgetTypeGMapsAddressConst.ts +++ b/src/management/api/types/FormWidgetTypeGMapsAddressConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormWidgetTypeGMapsAddressConst = "GMAPS_ADDRESS"; diff --git a/src/management/api/types/FormWidgetTypeRecaptchaConst.ts b/src/management/api/types/FormWidgetTypeRecaptchaConst.ts index 12d54aa6a8..1ffb747fb4 100644 --- a/src/management/api/types/FormWidgetTypeRecaptchaConst.ts +++ b/src/management/api/types/FormWidgetTypeRecaptchaConst.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type FormWidgetTypeRecaptchaConst = "RECAPTCHA"; diff --git a/src/management/api/types/FormsRequestParametersHydrateEnum.ts b/src/management/api/types/FormsRequestParametersHydrateEnum.ts index b3a600ce1c..88e0564383 100644 --- a/src/management/api/types/FormsRequestParametersHydrateEnum.ts +++ b/src/management/api/types/FormsRequestParametersHydrateEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type FormsRequestParametersHydrateEnum = "flow_count" | "links"; export const FormsRequestParametersHydrateEnum = { FlowCount: "flow_count", Links: "links", } as const; +export type FormsRequestParametersHydrateEnum = + (typeof FormsRequestParametersHydrateEnum)[keyof typeof FormsRequestParametersHydrateEnum]; diff --git a/src/management/api/types/GetActionExecutionResponseContent.ts b/src/management/api/types/GetActionExecutionResponseContent.ts index dfa30b3e06..9810e31228 100644 --- a/src/management/api/types/GetActionExecutionResponseContent.ts +++ b/src/management/api/types/GetActionExecutionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetActionResponseContent.ts b/src/management/api/types/GetActionResponseContent.ts index e99bcc6c41..2e3916e9d4 100644 --- a/src/management/api/types/GetActionResponseContent.ts +++ b/src/management/api/types/GetActionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetActionVersionResponseContent.ts b/src/management/api/types/GetActionVersionResponseContent.ts index 17bbed2a80..b930d85dd3 100644 --- a/src/management/api/types/GetActionVersionResponseContent.ts +++ b/src/management/api/types/GetActionVersionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetActiveUsersCountStatsResponseContent.ts b/src/management/api/types/GetActiveUsersCountStatsResponseContent.ts index 319bbc91eb..edff96ea55 100644 --- a/src/management/api/types/GetActiveUsersCountStatsResponseContent.ts +++ b/src/management/api/types/GetActiveUsersCountStatsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Number of active users in the last 30 days. diff --git a/src/management/api/types/GetAculResponseContent.ts b/src/management/api/types/GetAculResponseContent.ts index 3dee5a4a62..d911b9650a 100644 --- a/src/management/api/types/GetAculResponseContent.ts +++ b/src/management/api/types/GetAculResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -18,9 +16,9 @@ export interface GetAculResponseContent { default_head_tags_disabled?: boolean; /** An array of head tags */ head_tags?: Management.AculHeadTag[]; - filters?: Management.AculFilters; + filters?: Management.AculFilters | null; /** Use page template with ACUL */ - use_page_template?: boolean; + use_page_template?: boolean | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/GetBrandingDefaultThemeResponseContent.ts b/src/management/api/types/GetBrandingDefaultThemeResponseContent.ts index 585e0ac572..c5ab9e0d88 100644 --- a/src/management/api/types/GetBrandingDefaultThemeResponseContent.ts +++ b/src/management/api/types/GetBrandingDefaultThemeResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetBrandingPhoneProviderResponseContent.ts b/src/management/api/types/GetBrandingPhoneProviderResponseContent.ts index c50d56e6b7..59d2d27909 100644 --- a/src/management/api/types/GetBrandingPhoneProviderResponseContent.ts +++ b/src/management/api/types/GetBrandingPhoneProviderResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetBrandingResponseContent.ts b/src/management/api/types/GetBrandingResponseContent.ts index 20f9944467..c358a0e023 100644 --- a/src/management/api/types/GetBrandingResponseContent.ts +++ b/src/management/api/types/GetBrandingResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetBrandingThemeResponseContent.ts b/src/management/api/types/GetBrandingThemeResponseContent.ts index 75e1970a9f..8b274ca129 100644 --- a/src/management/api/types/GetBrandingThemeResponseContent.ts +++ b/src/management/api/types/GetBrandingThemeResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetBreachedPasswordDetectionSettingsResponseContent.ts b/src/management/api/types/GetBreachedPasswordDetectionSettingsResponseContent.ts index 731636feaa..c0824aef90 100644 --- a/src/management/api/types/GetBreachedPasswordDetectionSettingsResponseContent.ts +++ b/src/management/api/types/GetBreachedPasswordDetectionSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetBruteForceSettingsResponseContent.ts b/src/management/api/types/GetBruteForceSettingsResponseContent.ts index 26b53fb250..632805fe58 100644 --- a/src/management/api/types/GetBruteForceSettingsResponseContent.ts +++ b/src/management/api/types/GetBruteForceSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetBruteForceSettingsResponseContent { /** Whether or not brute force attack protections are active. */ @@ -25,20 +23,20 @@ export namespace GetBruteForceSettingsResponseContent { export type Shields = Shields.Item[]; export namespace Shields { - export type Item = "block" | "user_notification"; export const Item = { Block: "block", UserNotification: "user_notification", } as const; + export type Item = (typeof Item)[keyof typeof Item]; } /** * Account Lockout: Determines whether or not IP address is used when counting failed attempts. * Possible values: count_per_identifier_and_ip, count_per_identifier. */ - export type Mode = "count_per_identifier_and_ip" | "count_per_identifier"; export const Mode = { CountPerIdentifierAndIp: "count_per_identifier_and_ip", CountPerIdentifier: "count_per_identifier", } as const; + export type Mode = (typeof Mode)[keyof typeof Mode]; } diff --git a/src/management/api/types/GetClientCredentialResponseContent.ts b/src/management/api/types/GetClientCredentialResponseContent.ts index 4ef707ce9e..c26acfd2aa 100644 --- a/src/management/api/types/GetClientCredentialResponseContent.ts +++ b/src/management/api/types/GetClientCredentialResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetClientResponseContent.ts b/src/management/api/types/GetClientResponseContent.ts index 68a4622be8..ac26dd896f 100644 --- a/src/management/api/types/GetClientResponseContent.ts +++ b/src/management/api/types/GetClientResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -36,13 +34,13 @@ export interface GetClientResponseContent { allowed_clients?: string[]; /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ allowed_logout_urls?: string[]; - session_transfer?: Management.ClientSessionTransferConfiguration; + session_transfer?: Management.ClientSessionTransferConfiguration | null; oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ grant_types?: string[]; jwt_configuration?: Management.ClientJwtConfiguration; signing_keys?: Management.ClientSigningKeys; - encryption_key?: Management.ClientEncryptionKey; + encryption_key?: Management.ClientEncryptionKey | null; /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ sso?: boolean; /** Whether Single Sign On is disabled (true) or enabled (true). Defaults to true. */ @@ -61,29 +59,37 @@ export interface GetClientResponseContent { form_template?: string; addons?: Management.ClientAddons; token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; client_metadata?: Management.ClientMetadata; mobile?: Management.ClientMobile; /** Initiate login uri, must be https */ initiate_login_uri?: string; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; organization_usage?: Management.ClientOrganizationUsageEnum; organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientAuthenticationMethod; + client_authentication_methods?: Management.ClientAuthenticationMethod | null; /** Makes the use of Pushed Authorization Requests mandatory for this client */ require_pushed_authorization_requests?: boolean; /** Makes the use of Proof-of-Possession mandatory for this client */ require_proof_of_possession?: boolean; signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean; /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; + par_request_expiry?: number | null; token_quota?: Management.TokenQuota; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; /** The identifier of the resource server that this client is linked to. */ resource_server_identifier?: string; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPostConfiguration; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/GetConnectionEnabledClientsResponseContent.ts b/src/management/api/types/GetConnectionEnabledClientsResponseContent.ts index 4b55df1414..bc84d4bb14 100644 --- a/src/management/api/types/GetConnectionEnabledClientsResponseContent.ts +++ b/src/management/api/types/GetConnectionEnabledClientsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetConnectionResponseContent.ts b/src/management/api/types/GetConnectionResponseContent.ts index 6009b84175..9eb3562e68 100644 --- a/src/management/api/types/GetConnectionResponseContent.ts +++ b/src/management/api/types/GetConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -23,4 +21,6 @@ export interface GetConnectionResponseContent { /** Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. */ show_as_button?: boolean; metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; } diff --git a/src/management/api/types/GetCustomDomainResponseContent.ts b/src/management/api/types/GetCustomDomainResponseContent.ts index 8c01c221dc..a87cf2bdb3 100644 --- a/src/management/api/types/GetCustomDomainResponseContent.ts +++ b/src/management/api/types/GetCustomDomainResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -17,7 +15,8 @@ export interface GetCustomDomainResponseContent { origin_domain_name?: string; verification?: Management.DomainVerification; /** The HTTP header to fetch the client's IP address */ - custom_client_ip_header?: string; + custom_client_ip_header?: string | null; /** The TLS version policy */ tls_policy?: string; + certificate?: Management.DomainCertificate; } diff --git a/src/management/api/types/GetCustomSigningKeysResponseContent.ts b/src/management/api/types/GetCustomSigningKeysResponseContent.ts index d6c522ca50..26bd442c80 100644 --- a/src/management/api/types/GetCustomSigningKeysResponseContent.ts +++ b/src/management/api/types/GetCustomSigningKeysResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetCustomTextsByLanguageResponseContent.ts b/src/management/api/types/GetCustomTextsByLanguageResponseContent.ts index e1944113e7..44057fa385 100644 --- a/src/management/api/types/GetCustomTextsByLanguageResponseContent.ts +++ b/src/management/api/types/GetCustomTextsByLanguageResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * An object containing custom dictionaries for a group of screens. diff --git a/src/management/api/types/GetEmailProviderResponseContent.ts b/src/management/api/types/GetEmailProviderResponseContent.ts index e0335f9f64..fbf17a98a0 100644 --- a/src/management/api/types/GetEmailProviderResponseContent.ts +++ b/src/management/api/types/GetEmailProviderResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetEmailTemplateResponseContent.ts b/src/management/api/types/GetEmailTemplateResponseContent.ts index 7def40b97c..a8b7971288 100644 --- a/src/management/api/types/GetEmailTemplateResponseContent.ts +++ b/src/management/api/types/GetEmailTemplateResponseContent.ts @@ -1,25 +1,23 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface GetEmailTemplateResponseContent { template?: Management.EmailTemplateNameEnum; /** Body of the email template. */ - body?: string; + body?: string | null; /** Senders `from` email address. */ - from?: string; + from?: string | null; /** URL to redirect the user to after a successful action. */ - resultUrl?: string; + resultUrl?: string | null; /** Subject line of the email. */ - subject?: string; + subject?: string | null; /** Syntax of the template body. */ - syntax?: string; + syntax?: string | null; /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; + urlLifetimeInSeconds?: number | null; /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ includeEmailInRedirect?: boolean; /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; + enabled?: boolean | null; } diff --git a/src/management/api/types/GetEncryptionKeyResponseContent.ts b/src/management/api/types/GetEncryptionKeyResponseContent.ts index 6359d155c2..def87c30e0 100644 --- a/src/management/api/types/GetEncryptionKeyResponseContent.ts +++ b/src/management/api/types/GetEncryptionKeyResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetEventStreamDeliveryHistoryResponseContent.ts b/src/management/api/types/GetEventStreamDeliveryHistoryResponseContent.ts index f938eaa9bf..e4726f29f8 100644 --- a/src/management/api/types/GetEventStreamDeliveryHistoryResponseContent.ts +++ b/src/management/api/types/GetEventStreamDeliveryHistoryResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetEventStreamResponseContent.ts b/src/management/api/types/GetEventStreamResponseContent.ts index 0f0b4e679b..b559eb7707 100644 --- a/src/management/api/types/GetEventStreamResponseContent.ts +++ b/src/management/api/types/GetEventStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetFlowExecutionResponseContent.ts b/src/management/api/types/GetFlowExecutionResponseContent.ts index 32ae397e39..a39495726a 100644 --- a/src/management/api/types/GetFlowExecutionResponseContent.ts +++ b/src/management/api/types/GetFlowExecutionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetFlowRequestParametersHydrateEnum.ts b/src/management/api/types/GetFlowRequestParametersHydrateEnum.ts index 4d90b96c50..79efa7ec41 100644 --- a/src/management/api/types/GetFlowRequestParametersHydrateEnum.ts +++ b/src/management/api/types/GetFlowRequestParametersHydrateEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GetFlowRequestParametersHydrateEnum = "form_count" | "forms"; export const GetFlowRequestParametersHydrateEnum = { FormCount: "form_count", Forms: "forms", } as const; +export type GetFlowRequestParametersHydrateEnum = + (typeof GetFlowRequestParametersHydrateEnum)[keyof typeof GetFlowRequestParametersHydrateEnum]; diff --git a/src/management/api/types/GetFlowResponseContent.ts b/src/management/api/types/GetFlowResponseContent.ts index 1fd3328691..d383029850 100644 --- a/src/management/api/types/GetFlowResponseContent.ts +++ b/src/management/api/types/GetFlowResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetFlowsVaultConnectionResponseContent.ts b/src/management/api/types/GetFlowsVaultConnectionResponseContent.ts index b4304f82b4..8c806611a8 100644 --- a/src/management/api/types/GetFlowsVaultConnectionResponseContent.ts +++ b/src/management/api/types/GetFlowsVaultConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetFlowsVaultConnectionResponseContent { /** Flows Vault Connection identifier. */ diff --git a/src/management/api/types/GetFormResponseContent.ts b/src/management/api/types/GetFormResponseContent.ts index 42a5478f6e..99fa235a82 100644 --- a/src/management/api/types/GetFormResponseContent.ts +++ b/src/management/api/types/GetFormResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetGroupMembersResponseContent.ts b/src/management/api/types/GetGroupMembersResponseContent.ts deleted file mode 100644 index 80e4b5abb8..0000000000 --- a/src/management/api/types/GetGroupMembersResponseContent.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../index.js"; - -export interface GetGroupMembersResponseContent { - members: Management.GroupMember[]; - /** A token to retrieve the next page of results. */ - next?: string; -} diff --git a/src/management/api/types/GetGuardianEnrollmentResponseContent.ts b/src/management/api/types/GetGuardianEnrollmentResponseContent.ts index 5fd43faca6..ec72153884 100644 --- a/src/management/api/types/GetGuardianEnrollmentResponseContent.ts +++ b/src/management/api/types/GetGuardianEnrollmentResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetGuardianFactorDuoSettingsResponseContent.ts b/src/management/api/types/GetGuardianFactorDuoSettingsResponseContent.ts index 85b80b68d9..10fa532603 100644 --- a/src/management/api/types/GetGuardianFactorDuoSettingsResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorDuoSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorDuoSettingsResponseContent { ikey?: string; diff --git a/src/management/api/types/GetGuardianFactorPhoneMessageTypesResponseContent.ts b/src/management/api/types/GetGuardianFactorPhoneMessageTypesResponseContent.ts index 6534b15b4e..5f9337af02 100644 --- a/src/management/api/types/GetGuardianFactorPhoneMessageTypesResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorPhoneMessageTypesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetGuardianFactorPhoneTemplatesResponseContent.ts b/src/management/api/types/GetGuardianFactorPhoneTemplatesResponseContent.ts index ae088837bf..c215bca119 100644 --- a/src/management/api/types/GetGuardianFactorPhoneTemplatesResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorPhoneTemplatesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorPhoneTemplatesResponseContent { /** Message sent to the user when they are invited to enroll with a phone number. */ diff --git a/src/management/api/types/GetGuardianFactorSmsTemplatesResponseContent.ts b/src/management/api/types/GetGuardianFactorSmsTemplatesResponseContent.ts index 24754f2e87..a6622db065 100644 --- a/src/management/api/types/GetGuardianFactorSmsTemplatesResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorSmsTemplatesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorSmsTemplatesResponseContent { /** Message sent to the user when they are invited to enroll with a phone number. */ diff --git a/src/management/api/types/GetGuardianFactorsProviderApnsResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderApnsResponseContent.ts index 652f747fd1..fb602201e1 100644 --- a/src/management/api/types/GetGuardianFactorsProviderApnsResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderApnsResponseContent.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorsProviderApnsResponseContent { - bundle_id?: string; + bundle_id?: string | null; sandbox?: boolean; enabled?: boolean; } diff --git a/src/management/api/types/GetGuardianFactorsProviderPhoneResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderPhoneResponseContent.ts index 7dc8399bc7..f0df566f38 100644 --- a/src/management/api/types/GetGuardianFactorsProviderPhoneResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderPhoneResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.ts index 4a4026fe6d..bae6fccc0f 100644 --- a/src/management/api/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderPhoneTwilioResponseContent.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorsProviderPhoneTwilioResponseContent { /** From number */ - from?: string; + from?: string | null; /** Copilot SID */ - messaging_service_sid?: string; + messaging_service_sid?: string | null; /** Twilio Authentication token */ - auth_token?: string; + auth_token?: string | null; /** Twilio SID */ - sid?: string; + sid?: string | null; } diff --git a/src/management/api/types/GetGuardianFactorsProviderPushNotificationResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderPushNotificationResponseContent.ts index b0b58de8a5..c6d299cf0f 100644 --- a/src/management/api/types/GetGuardianFactorsProviderPushNotificationResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderPushNotificationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetGuardianFactorsProviderSmsResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderSmsResponseContent.ts index 0584b77b5d..957c4bf66e 100644 --- a/src/management/api/types/GetGuardianFactorsProviderSmsResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderSmsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetGuardianFactorsProviderSmsTwilioResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderSmsTwilioResponseContent.ts index 3a0f959003..139f6fe320 100644 --- a/src/management/api/types/GetGuardianFactorsProviderSmsTwilioResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderSmsTwilioResponseContent.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorsProviderSmsTwilioResponseContent { /** From number */ - from?: string; + from?: string | null; /** Copilot SID */ - messaging_service_sid?: string; + messaging_service_sid?: string | null; /** Twilio Authentication token */ - auth_token?: string; + auth_token?: string | null; /** Twilio SID */ - sid?: string; + sid?: string | null; } diff --git a/src/management/api/types/GetGuardianFactorsProviderSnsResponseContent.ts b/src/management/api/types/GetGuardianFactorsProviderSnsResponseContent.ts index 402506d9a9..e4238d8765 100644 --- a/src/management/api/types/GetGuardianFactorsProviderSnsResponseContent.ts +++ b/src/management/api/types/GetGuardianFactorsProviderSnsResponseContent.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetGuardianFactorsProviderSnsResponseContent { - aws_access_key_id?: string; - aws_secret_access_key?: string; - aws_region?: string; - sns_apns_platform_application_arn?: string; - sns_gcm_platform_application_arn?: string; + aws_access_key_id?: string | null; + aws_secret_access_key?: string | null; + aws_region?: string | null; + sns_apns_platform_application_arn?: string | null; + sns_gcm_platform_application_arn?: string | null; } diff --git a/src/management/api/types/GetHookResponseContent.ts b/src/management/api/types/GetHookResponseContent.ts index 83faed1774..1bfd772f82 100644 --- a/src/management/api/types/GetHookResponseContent.ts +++ b/src/management/api/types/GetHookResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetHookSecretResponseContent.ts b/src/management/api/types/GetHookSecretResponseContent.ts index c1b931463f..7a2f430770 100644 --- a/src/management/api/types/GetHookSecretResponseContent.ts +++ b/src/management/api/types/GetHookSecretResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Hashmap of key-value pairs where the value must be a string. diff --git a/src/management/api/types/GetJobErrorResponseContent.ts b/src/management/api/types/GetJobErrorResponseContent.ts index 4422f29218..9d5d61ae06 100644 --- a/src/management/api/types/GetJobErrorResponseContent.ts +++ b/src/management/api/types/GetJobErrorResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetJobGenericErrorResponseContent.ts b/src/management/api/types/GetJobGenericErrorResponseContent.ts index b1f10287a8..fea3ddeb80 100644 --- a/src/management/api/types/GetJobGenericErrorResponseContent.ts +++ b/src/management/api/types/GetJobGenericErrorResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetJobGenericErrorResponseContent { /** Status of this job. */ diff --git a/src/management/api/types/GetJobImportUserError.ts b/src/management/api/types/GetJobImportUserError.ts index 7b5c85ba33..cdae06ce14 100644 --- a/src/management/api/types/GetJobImportUserError.ts +++ b/src/management/api/types/GetJobImportUserError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetJobImportUserError { /** Error code. */ diff --git a/src/management/api/types/GetJobResponseContent.ts b/src/management/api/types/GetJobResponseContent.ts index 972bcfc07f..f1db4e95e9 100644 --- a/src/management/api/types/GetJobResponseContent.ts +++ b/src/management/api/types/GetJobResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetJobUserError.ts b/src/management/api/types/GetJobUserError.ts index e8d19ac0cf..79faa364fe 100644 --- a/src/management/api/types/GetJobUserError.ts +++ b/src/management/api/types/GetJobUserError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * User, as provided in the import file diff --git a/src/management/api/types/GetLogResponseContent.ts b/src/management/api/types/GetLogResponseContent.ts index e1ae49cf82..9c26bfe39c 100644 --- a/src/management/api/types/GetLogResponseContent.ts +++ b/src/management/api/types/GetLogResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -9,7 +7,7 @@ export interface GetLogResponseContent { /** Type of event. */ type?: string; /** Description of this event. */ - description?: string; + description?: string | null; /** Name of the connection the event relates to. */ connection?: string; /** ID of the connection the event relates to. */ diff --git a/src/management/api/types/GetLogStreamResponseContent.ts b/src/management/api/types/GetLogStreamResponseContent.ts index 02d2f67ce0..8beaab1592 100644 --- a/src/management/api/types/GetLogStreamResponseContent.ts +++ b/src/management/api/types/GetLogStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetNetworkAclsResponseContent.ts b/src/management/api/types/GetNetworkAclsResponseContent.ts index ae33e34a33..466a3b3c5d 100644 --- a/src/management/api/types/GetNetworkAclsResponseContent.ts +++ b/src/management/api/types/GetNetworkAclsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetOrganizationByNameResponseContent.ts b/src/management/api/types/GetOrganizationByNameResponseContent.ts index 3063259bb7..c64fccdd62 100644 --- a/src/management/api/types/GetOrganizationByNameResponseContent.ts +++ b/src/management/api/types/GetOrganizationByNameResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetOrganizationConnectionResponseContent.ts b/src/management/api/types/GetOrganizationConnectionResponseContent.ts index a222f75066..92ef39befc 100644 --- a/src/management/api/types/GetOrganizationConnectionResponseContent.ts +++ b/src/management/api/types/GetOrganizationConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetOrganizationInvitationResponseContent.ts b/src/management/api/types/GetOrganizationInvitationResponseContent.ts index 6c97b66267..4b67e199f4 100644 --- a/src/management/api/types/GetOrganizationInvitationResponseContent.ts +++ b/src/management/api/types/GetOrganizationInvitationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetOrganizationResponseContent.ts b/src/management/api/types/GetOrganizationResponseContent.ts index b39c7534be..1622714a6f 100644 --- a/src/management/api/types/GetOrganizationResponseContent.ts +++ b/src/management/api/types/GetOrganizationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetPartialsResponseContent.ts b/src/management/api/types/GetPartialsResponseContent.ts index ceec3ab8f5..3a0a5ff498 100644 --- a/src/management/api/types/GetPartialsResponseContent.ts +++ b/src/management/api/types/GetPartialsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * An object containing template partials for a group of screens. diff --git a/src/management/api/types/GetPhoneTemplateResponseContent.ts b/src/management/api/types/GetPhoneTemplateResponseContent.ts index 4f52541ba4..cb8d9c50fc 100644 --- a/src/management/api/types/GetPhoneTemplateResponseContent.ts +++ b/src/management/api/types/GetPhoneTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetRefreshTokenResponseContent.ts b/src/management/api/types/GetRefreshTokenResponseContent.ts index 41914057d6..6b78907a18 100644 --- a/src/management/api/types/GetRefreshTokenResponseContent.ts +++ b/src/management/api/types/GetRefreshTokenResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -15,7 +13,7 @@ export interface GetRefreshTokenResponseContent { device?: Management.RefreshTokenDevice; /** ID of the client application granted with this refresh token */ client_id?: string; - session_id?: Management.RefreshTokenSessionId | undefined; + 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 */ diff --git a/src/management/api/types/GetResourceServerResponseContent.ts b/src/management/api/types/GetResourceServerResponseContent.ts index c30f4a5ceb..0789708ced 100644 --- a/src/management/api/types/GetResourceServerResponseContent.ts +++ b/src/management/api/types/GetResourceServerResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -29,10 +27,10 @@ export interface GetResourceServerResponseContent { /** Whether authorization polices are enforced (true) or unenforced (false). */ enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; - token_encryption?: Management.ResourceServerTokenEncryption; - consent_policy?: Management.ResourceServerConsentPolicyEnum | undefined; + token_encryption?: Management.ResourceServerTokenEncryption | null; + consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; authorization_details?: unknown[]; - proof_of_possession?: Management.ResourceServerProofOfPossession; + proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; /** The client ID of the client that this resource server is linked to */ client_id?: string; diff --git a/src/management/api/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.ts b/src/management/api/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.ts index 70cd822adf..57bd4c0135 100644 --- a/src/management/api/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.ts +++ b/src/management/api/types/GetRiskAssessmentsSettingsNewDeviceResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetRiskAssessmentsSettingsNewDeviceResponseContent { /** Length of time to remember devices for, in days. */ diff --git a/src/management/api/types/GetRiskAssessmentsSettingsResponseContent.ts b/src/management/api/types/GetRiskAssessmentsSettingsResponseContent.ts index ce989ec6e7..adf3634a80 100644 --- a/src/management/api/types/GetRiskAssessmentsSettingsResponseContent.ts +++ b/src/management/api/types/GetRiskAssessmentsSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetRiskAssessmentsSettingsResponseContent { /** Whether or not risk assessment is enabled. */ diff --git a/src/management/api/types/GetRoleResponseContent.ts b/src/management/api/types/GetRoleResponseContent.ts index 1ec072fe45..aa3f25960a 100644 --- a/src/management/api/types/GetRoleResponseContent.ts +++ b/src/management/api/types/GetRoleResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetRoleResponseContent { /** ID for this role. */ diff --git a/src/management/api/types/GetRuleResponseContent.ts b/src/management/api/types/GetRuleResponseContent.ts index 0c6c004476..4575ac173a 100644 --- a/src/management/api/types/GetRuleResponseContent.ts +++ b/src/management/api/types/GetRuleResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetRuleResponseContent { /** Name of this rule. */ diff --git a/src/management/api/types/GetScimConfigurationDefaultMappingResponseContent.ts b/src/management/api/types/GetScimConfigurationDefaultMappingResponseContent.ts index 119598132b..fc65641ab8 100644 --- a/src/management/api/types/GetScimConfigurationDefaultMappingResponseContent.ts +++ b/src/management/api/types/GetScimConfigurationDefaultMappingResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetScimConfigurationResponseContent.ts b/src/management/api/types/GetScimConfigurationResponseContent.ts index e45704f621..085b2ccd32 100644 --- a/src/management/api/types/GetScimConfigurationResponseContent.ts +++ b/src/management/api/types/GetScimConfigurationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetScimTokensResponseContent.ts b/src/management/api/types/GetScimTokensResponseContent.ts index 7d9c6259c7..632eba1738 100644 --- a/src/management/api/types/GetScimTokensResponseContent.ts +++ b/src/management/api/types/GetScimTokensResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetSelfServiceProfileResponseContent.ts b/src/management/api/types/GetSelfServiceProfileResponseContent.ts index 5722444387..800c80a864 100644 --- a/src/management/api/types/GetSelfServiceProfileResponseContent.ts +++ b/src/management/api/types/GetSelfServiceProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -20,4 +18,6 @@ export interface GetSelfServiceProfileResponseContent { branding?: Management.SelfServiceProfileBrandingProperties; /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; + /** ID of the user-attribute-profile to associate with this self-service profile. */ + user_attribute_profile_id?: string; } diff --git a/src/management/api/types/GetSessionResponseContent.ts b/src/management/api/types/GetSessionResponseContent.ts index 61fe4801c7..8d3faa30cd 100644 --- a/src/management/api/types/GetSessionResponseContent.ts +++ b/src/management/api/types/GetSessionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -20,6 +18,7 @@ export interface GetSessionResponseContent { clients?: Management.SessionClientMetadata[]; authentication?: Management.SessionAuthenticationSignals; cookie?: Management.SessionCookieMetadata; + session_metadata?: (Management.SessionMetadata | undefined) | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/GetSettingsResponseContent.ts b/src/management/api/types/GetSettingsResponseContent.ts index fb1a9a377a..4299cfe538 100644 --- a/src/management/api/types/GetSettingsResponseContent.ts +++ b/src/management/api/types/GetSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetSigningKeysResponseContent.ts b/src/management/api/types/GetSigningKeysResponseContent.ts index de7dac42a6..506620e67d 100644 --- a/src/management/api/types/GetSigningKeysResponseContent.ts +++ b/src/management/api/types/GetSigningKeysResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetSupplementalSignalsResponseContent.ts b/src/management/api/types/GetSupplementalSignalsResponseContent.ts index b36d33e36d..cea7537e78 100644 --- a/src/management/api/types/GetSupplementalSignalsResponseContent.ts +++ b/src/management/api/types/GetSupplementalSignalsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetSupplementalSignalsResponseContent { /** Indicates if incoming Akamai Headers should be processed */ diff --git a/src/management/api/types/GetSuspiciousIpThrottlingSettingsResponseContent.ts b/src/management/api/types/GetSuspiciousIpThrottlingSettingsResponseContent.ts index ebb635e5cb..60a8030ff4 100644 --- a/src/management/api/types/GetSuspiciousIpThrottlingSettingsResponseContent.ts +++ b/src/management/api/types/GetSuspiciousIpThrottlingSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetTenantSettingsResponseContent.ts b/src/management/api/types/GetTenantSettingsResponseContent.ts index d468165387..d4f3ad4520 100644 --- a/src/management/api/types/GetTenantSettingsResponseContent.ts +++ b/src/management/api/types/GetTenantSettingsResponseContent.ts @@ -1,19 +1,17 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface GetTenantSettingsResponseContent { - change_password?: Management.TenantSettingsPasswordPage; - guardian_mfa_page?: Management.TenantSettingsGuardianPage; + change_password?: Management.TenantSettingsPasswordPage | null; + guardian_mfa_page?: Management.TenantSettingsGuardianPage | null; /** Default audience for API authorization. */ default_audience?: string; /** Name of connection used for password grants at the `/token`endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. */ default_directory?: string; - error_page?: Management.TenantSettingsErrorPage; - device_flow?: Management.TenantSettingsDeviceFlow; - default_token_quota?: Management.DefaultTokenQuota; + error_page?: Management.TenantSettingsErrorPage | null; + device_flow?: Management.TenantSettingsDeviceFlow | null; + default_token_quota?: Management.DefaultTokenQuota | null; flags?: Management.TenantSettingsFlags; /** Friendly name for this tenant. */ friendly_name?: string; @@ -43,8 +41,8 @@ export interface GetTenantSettingsResponseContent { default_redirection_uri?: string; /** Supported locales for the user interface. */ enabled_locales?: Management.SupportedLocales[]; - session_cookie?: Management.SessionCookieSchema; - sessions?: Management.TenantSettingsSessions; + session_cookie?: Management.SessionCookieSchema | null; + sessions?: Management.TenantSettingsSessions | null; oidc_logout?: Management.TenantOidcLogoutSettings; /** Whether to accept an organization name instead of an ID on auth endpoints */ allow_organization_name_in_authentication_api?: boolean; @@ -52,9 +50,15 @@ export interface GetTenantSettingsResponseContent { customize_mfa_in_postlogin_action?: boolean; /** Supported ACR values */ acr_values_supported?: string[]; - mtls?: Management.TenantSettingsMtls; + mtls?: Management.TenantSettingsMtls | null; /** Enables the use of Pushed Authorization Requests */ pushed_authorization_requests_supported?: boolean; /** Supports iss parameter in authorization responses */ - authorization_response_iss_parameter_supported?: boolean; + authorization_response_iss_parameter_supported?: boolean | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; } diff --git a/src/management/api/types/GetTokenExchangeProfileResponseContent.ts b/src/management/api/types/GetTokenExchangeProfileResponseContent.ts index a6ec2fd42b..832daf9851 100644 --- a/src/management/api/types/GetTokenExchangeProfileResponseContent.ts +++ b/src/management/api/types/GetTokenExchangeProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetUniversalLoginTemplate.ts b/src/management/api/types/GetUniversalLoginTemplate.ts index b84ea56650..b4d43830bf 100644 --- a/src/management/api/types/GetUniversalLoginTemplate.ts +++ b/src/management/api/types/GetUniversalLoginTemplate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface GetUniversalLoginTemplate { /** The custom page template for the New Universal Login Experience */ diff --git a/src/management/api/types/GetUniversalLoginTemplateResponseContent.ts b/src/management/api/types/GetUniversalLoginTemplateResponseContent.ts index 7f685393e6..604c754479 100644 --- a/src/management/api/types/GetUniversalLoginTemplateResponseContent.ts +++ b/src/management/api/types/GetUniversalLoginTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetUserAttributeProfileResponseContent.ts b/src/management/api/types/GetUserAttributeProfileResponseContent.ts new file mode 100644 index 0000000000..1d12bb54f6 --- /dev/null +++ b/src/management/api/types/GetUserAttributeProfileResponseContent.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface GetUserAttributeProfileResponseContent { + id?: Management.UserAttributeProfileId; + name?: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfileUserId; + user_attributes?: Management.UserAttributeProfileUserAttributes; +} diff --git a/src/management/api/types/GetUserAttributeProfileTemplateResponseContent.ts b/src/management/api/types/GetUserAttributeProfileTemplateResponseContent.ts new file mode 100644 index 0000000000..3941534bb7 --- /dev/null +++ b/src/management/api/types/GetUserAttributeProfileTemplateResponseContent.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface GetUserAttributeProfileTemplateResponseContent { + /** The id of the template. */ + id?: string; + /** The user-friendly name of the template displayed in the UI. */ + display_name?: string; + template?: Management.UserAttributeProfileTemplate; +} diff --git a/src/management/api/types/GetUserAuthenticationMethodResponseContent.ts b/src/management/api/types/GetUserAuthenticationMethodResponseContent.ts index 08d213f4cb..bfa15968cd 100644 --- a/src/management/api/types/GetUserAuthenticationMethodResponseContent.ts +++ b/src/management/api/types/GetUserAuthenticationMethodResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -38,4 +36,8 @@ export interface GetUserAuthenticationMethodResponseContent { identity_user_id?: string; /** Applies to passkeys only. The user-agent of the browser used to create the passkey. */ user_agent?: string; + /** Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier. */ + aaguid?: string; + /** Applies to webauthn/passkey authentication methods only. The credential's relying party identifier. */ + relying_party_identifier?: string; } diff --git a/src/management/api/types/GetUserGroupsResponseContent.ts b/src/management/api/types/GetUserGroupsResponseContent.ts deleted file mode 100644 index d323df9440..0000000000 --- a/src/management/api/types/GetUserGroupsResponseContent.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../index.js"; - -export interface GetUserGroupsResponseContent { - groups: Management.Group[]; - /** A token to retrieve the next page of results. */ - next?: string; -} diff --git a/src/management/api/types/GetUserResponseContent.ts b/src/management/api/types/GetUserResponseContent.ts index c34147641f..ff4213f0ae 100644 --- a/src/management/api/types/GetUserResponseContent.ts +++ b/src/management/api/types/GetUserResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GetVerifiableCredentialTemplateResponseContent.ts b/src/management/api/types/GetVerifiableCredentialTemplateResponseContent.ts index 9548ce5748..f3c4942f2d 100644 --- a/src/management/api/types/GetVerifiableCredentialTemplateResponseContent.ts +++ b/src/management/api/types/GetVerifiableCredentialTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/Group.ts b/src/management/api/types/Group.ts index 23c2f37829..a919a8be32 100644 --- a/src/management/api/types/Group.ts +++ b/src/management/api/types/Group.ts @@ -1,26 +1,26 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Represents the metadata of a group. Member lists are retrieved via a separate endpoint. */ export interface Group { /** Unique identifier for the group (service-generated). */ - id: string; + 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; + 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; + organization_id?: string | null; /** Identifier for the tenant this group belongs to. */ - tenant_name: string; - description?: string; + tenant_name?: string; + description?: string | null; /** Timestamp of when the group was created. */ - created_at: string; + created_at?: string; /** Timestamp of when the group was last updated. */ - updated_at: string; + updated_at?: string; + /** Accepts any additional properties */ + [key: string]: any; } diff --git a/src/management/api/types/GroupMember.ts b/src/management/api/types/GroupMember.ts deleted file mode 100644 index 69cebeb8f7..0000000000 --- a/src/management/api/types/GroupMember.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Management from "../index.js"; - -/** - * Represents the metadata of a group membership. - */ -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; -} diff --git a/src/management/api/types/GroupMemberTypeEnum.ts b/src/management/api/types/GroupMemberTypeEnum.ts deleted file mode 100644 index 07404f2881..0000000000 --- a/src/management/api/types/GroupMemberTypeEnum.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Type of the member. - */ -export type GroupMemberTypeEnum = "user" | "group"; -export const GroupMemberTypeEnum = { - User: "user", - Group: "group", -} as const; diff --git a/src/management/api/types/GroupTypeEnum.ts b/src/management/api/types/GroupTypeEnum.ts deleted file mode 100644 index 17ae37d28e..0000000000 --- a/src/management/api/types/GroupTypeEnum.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * Type of the group. - */ -export type GroupTypeEnum = "connection" | "organization" | "tenant"; -export const GroupTypeEnum = { - Connection: "connection", - Organization: "organization", - Tenant: "tenant", -} as const; diff --git a/src/management/api/types/GuardianEnrollmentDate.ts b/src/management/api/types/GuardianEnrollmentDate.ts index fff4047d9f..a0c53c85e4 100644 --- a/src/management/api/types/GuardianEnrollmentDate.ts +++ b/src/management/api/types/GuardianEnrollmentDate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Enrollment date and time. diff --git a/src/management/api/types/GuardianEnrollmentFactorEnum.ts b/src/management/api/types/GuardianEnrollmentFactorEnum.ts index defc7b4e68..3f6a841819 100644 --- a/src/management/api/types/GuardianEnrollmentFactorEnum.ts +++ b/src/management/api/types/GuardianEnrollmentFactorEnum.ts @@ -1,17 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * 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 type GuardianEnrollmentFactorEnum = - | "push-notification" - | "phone" - | "email" - | "otp" - | "webauthn-roaming" - | "webauthn-platform"; +/** 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 = { PushNotification: "push-notification", Phone: "phone", @@ -20,3 +9,5 @@ export const GuardianEnrollmentFactorEnum = { WebauthnRoaming: "webauthn-roaming", WebauthnPlatform: "webauthn-platform", } as const; +export type GuardianEnrollmentFactorEnum = + (typeof GuardianEnrollmentFactorEnum)[keyof typeof GuardianEnrollmentFactorEnum]; diff --git a/src/management/api/types/GuardianEnrollmentStatus.ts b/src/management/api/types/GuardianEnrollmentStatus.ts index 6410e82412..96986ede75 100644 --- a/src/management/api/types/GuardianEnrollmentStatus.ts +++ b/src/management/api/types/GuardianEnrollmentStatus.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Status of this enrollment. Can be `pending` or `confirmed`. - */ -export type GuardianEnrollmentStatus = "pending" | "confirmed"; +/** Status of this enrollment. Can be `pending` or `confirmed`. */ export const GuardianEnrollmentStatus = { Pending: "pending", Confirmed: "confirmed", } as const; +export type GuardianEnrollmentStatus = (typeof GuardianEnrollmentStatus)[keyof typeof GuardianEnrollmentStatus]; diff --git a/src/management/api/types/GuardianFactor.ts b/src/management/api/types/GuardianFactor.ts index 821628eb4d..05450dfb53 100644 --- a/src/management/api/types/GuardianFactor.ts +++ b/src/management/api/types/GuardianFactor.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/GuardianFactorNameEnum.ts b/src/management/api/types/GuardianFactorNameEnum.ts index 7780cbd7dd..7a842a8975 100644 --- a/src/management/api/types/GuardianFactorNameEnum.ts +++ b/src/management/api/types/GuardianFactorNameEnum.ts @@ -1,19 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Factor name. Can be `sms`, `push-notification`, `email`, `duo` `otp` `webauthn-roaming`, `webauthn-platform`, or `recovery-code`. - */ -export type GuardianFactorNameEnum = - | "push-notification" - | "sms" - | "email" - | "duo" - | "otp" - | "webauthn-roaming" - | "webauthn-platform" - | "recovery-code"; +/** Factor name. Can be `sms`, `push-notification`, `email`, `duo` `otp` `webauthn-roaming`, `webauthn-platform`, or `recovery-code`. */ export const GuardianFactorNameEnum = { PushNotification: "push-notification", Sms: "sms", @@ -24,3 +11,4 @@ export const GuardianFactorNameEnum = { WebauthnPlatform: "webauthn-platform", RecoveryCode: "recovery-code", } as const; +export type GuardianFactorNameEnum = (typeof GuardianFactorNameEnum)[keyof typeof GuardianFactorNameEnum]; diff --git a/src/management/api/types/GuardianFactorPhoneFactorMessageTypeEnum.ts b/src/management/api/types/GuardianFactorPhoneFactorMessageTypeEnum.ts index a46d697065..751bf752e6 100644 --- a/src/management/api/types/GuardianFactorPhoneFactorMessageTypeEnum.ts +++ b/src/management/api/types/GuardianFactorPhoneFactorMessageTypeEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GuardianFactorPhoneFactorMessageTypeEnum = "sms" | "voice"; export const GuardianFactorPhoneFactorMessageTypeEnum = { Sms: "sms", Voice: "voice", } as const; +export type GuardianFactorPhoneFactorMessageTypeEnum = + (typeof GuardianFactorPhoneFactorMessageTypeEnum)[keyof typeof GuardianFactorPhoneFactorMessageTypeEnum]; diff --git a/src/management/api/types/GuardianFactorsProviderPushNotificationProviderDataEnum.ts b/src/management/api/types/GuardianFactorsProviderPushNotificationProviderDataEnum.ts index 63c2371e39..02640227ce 100644 --- a/src/management/api/types/GuardianFactorsProviderPushNotificationProviderDataEnum.ts +++ b/src/management/api/types/GuardianFactorsProviderPushNotificationProviderDataEnum.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GuardianFactorsProviderPushNotificationProviderDataEnum = "guardian" | "sns" | "direct"; export const GuardianFactorsProviderPushNotificationProviderDataEnum = { Guardian: "guardian", Sns: "sns", Direct: "direct", } as const; +export type GuardianFactorsProviderPushNotificationProviderDataEnum = + (typeof GuardianFactorsProviderPushNotificationProviderDataEnum)[keyof typeof GuardianFactorsProviderPushNotificationProviderDataEnum]; diff --git a/src/management/api/types/GuardianFactorsProviderSmsProviderEnum.ts b/src/management/api/types/GuardianFactorsProviderSmsProviderEnum.ts index a4a39b72c6..e223a2828e 100644 --- a/src/management/api/types/GuardianFactorsProviderSmsProviderEnum.ts +++ b/src/management/api/types/GuardianFactorsProviderSmsProviderEnum.ts @@ -1,10 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type GuardianFactorsProviderSmsProviderEnum = "auth0" | "twilio" | "phone-message-hook"; export const GuardianFactorsProviderSmsProviderEnum = { Auth0: "auth0", Twilio: "twilio", PhoneMessageHook: "phone-message-hook", } as const; +export type GuardianFactorsProviderSmsProviderEnum = + (typeof GuardianFactorsProviderSmsProviderEnum)[keyof typeof GuardianFactorsProviderSmsProviderEnum]; diff --git a/src/management/api/types/Hook.ts b/src/management/api/types/Hook.ts index ea3d1214fa..b3841e5db0 100644 --- a/src/management/api/types/Hook.ts +++ b/src/management/api/types/Hook.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/HookDependencies.ts b/src/management/api/types/HookDependencies.ts index 2a439c63c1..1b20c2923c 100644 --- a/src/management/api/types/HookDependencies.ts +++ b/src/management/api/types/HookDependencies.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Dependencies of this hook used by webtask server. diff --git a/src/management/api/types/HookTriggerIdEnum.ts b/src/management/api/types/HookTriggerIdEnum.ts index 36364ee681..8f7d2a5f2c 100644 --- a/src/management/api/types/HookTriggerIdEnum.ts +++ b/src/management/api/types/HookTriggerIdEnum.ts @@ -1,16 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Retrieves hooks that match the trigger - */ -export type HookTriggerIdEnum = - | "credentials-exchange" - | "pre-user-registration" - | "post-user-registration" - | "post-change-password" - | "send-phone-message"; +/** Retrieves hooks that match the trigger */ export const HookTriggerIdEnum = { CredentialsExchange: "credentials-exchange", PreUserRegistration: "pre-user-registration", @@ -18,3 +8,4 @@ export const HookTriggerIdEnum = { PostChangePassword: "post-change-password", SendPhoneMessage: "send-phone-message", } as const; +export type HookTriggerIdEnum = (typeof HookTriggerIdEnum)[keyof typeof HookTriggerIdEnum]; diff --git a/src/management/api/types/HttpCustomHeader.ts b/src/management/api/types/HttpCustomHeader.ts index b2ff351b61..40c1cd4ac3 100644 --- a/src/management/api/types/HttpCustomHeader.ts +++ b/src/management/api/types/HttpCustomHeader.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface HttpCustomHeader { /** HTTP header name */ diff --git a/src/management/api/types/Identity.ts b/src/management/api/types/Identity.ts index 557938bac0..1a6cd8f8d5 100644 --- a/src/management/api/types/Identity.ts +++ b/src/management/api/types/Identity.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -11,4 +9,6 @@ export interface Identity { /** user_id of the identity to be verified. */ user_id: string; provider: Management.IdentityProviderEnum; + /** connection_id of the identity. */ + connection_id?: string; } diff --git a/src/management/api/types/IdentityProviderEnum.ts b/src/management/api/types/IdentityProviderEnum.ts index 87b4996eae..cc1fe82dc4 100644 --- a/src/management/api/types/IdentityProviderEnum.ts +++ b/src/management/api/types/IdentityProviderEnum.ts @@ -1,73 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Identity provider name of the identity (e.g. `google-oauth2`). - */ -export type IdentityProviderEnum = - | "ad" - | "adfs" - | "amazon" - | "apple" - | "dropbox" - | "bitbucket" - | "aol" - | "auth0-oidc" - | "auth0" - | "baidu" - | "bitly" - | "box" - | "custom" - | "daccount" - | "dwolla" - | "email" - | "evernote-sandbox" - | "evernote" - | "exact" - | "facebook" - | "fitbit" - | "flickr" - | "github" - | "google-apps" - | "google-oauth2" - | "instagram" - | "ip" - | "line" - | "linkedin" - | "miicard" - | "oauth1" - | "oauth2" - | "office365" - | "oidc" - | "okta" - | "paypal" - | "paypal-sandbox" - | "pingfederate" - | "planningcenter" - | "renren" - | "salesforce-community" - | "salesforce-sandbox" - | "salesforce" - | "samlp" - | "sharepoint" - | "shopify" - | "shop" - | "sms" - | "soundcloud" - | "thecity-sandbox" - | "thecity" - | "thirtysevensignals" - | "twitter" - | "untappd" - | "vkontakte" - | "waad" - | "weibo" - | "windowslive" - | "wordpress" - | "yahoo" - | "yammer" - | "yandex"; +/** Identity provider name of the identity (e.g. `google-oauth2`). */ export const IdentityProviderEnum = { Ad: "ad", Adfs: "adfs", @@ -132,3 +65,4 @@ export const IdentityProviderEnum = { Yammer: "yammer", Yandex: "yandex", } as const; +export type IdentityProviderEnum = (typeof IdentityProviderEnum)[keyof typeof IdentityProviderEnum]; diff --git a/src/management/api/types/ImportEncryptionKeyResponseContent.ts b/src/management/api/types/ImportEncryptionKeyResponseContent.ts index 1409ec4f1c..1e12594283 100644 --- a/src/management/api/types/ImportEncryptionKeyResponseContent.ts +++ b/src/management/api/types/ImportEncryptionKeyResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/Integration.ts b/src/management/api/types/Integration.ts index a3afe76a84..4a8580e18b 100644 --- a/src/management/api/types/Integration.ts +++ b/src/management/api/types/Integration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/IntegrationFeatureTypeEnum.ts b/src/management/api/types/IntegrationFeatureTypeEnum.ts index 7a01bcf2bf..1d143a8422 100644 --- a/src/management/api/types/IntegrationFeatureTypeEnum.ts +++ b/src/management/api/types/IntegrationFeatureTypeEnum.ts @@ -1,17 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * feature_type is the type of the integration. - */ -export type IntegrationFeatureTypeEnum = - | "unspecified" - | "action" - | "social_connection" - | "log_stream" - | "sso_integration" - | "sms_provider"; +/** feature_type is the type of the integration. */ export const IntegrationFeatureTypeEnum = { Unspecified: "unspecified", Action: "action", @@ -20,3 +9,4 @@ export const IntegrationFeatureTypeEnum = { SsoIntegration: "sso_integration", SmsProvider: "sms_provider", } as const; +export type IntegrationFeatureTypeEnum = (typeof IntegrationFeatureTypeEnum)[keyof typeof IntegrationFeatureTypeEnum]; diff --git a/src/management/api/types/IntegrationRelease.ts b/src/management/api/types/IntegrationRelease.ts index 697fe5c9d8..701552a9d2 100644 --- a/src/management/api/types/IntegrationRelease.ts +++ b/src/management/api/types/IntegrationRelease.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/IntegrationRequiredParam.ts b/src/management/api/types/IntegrationRequiredParam.ts index 4136c3f4ed..28a21c704f 100644 --- a/src/management/api/types/IntegrationRequiredParam.ts +++ b/src/management/api/types/IntegrationRequiredParam.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/IntegrationRequiredParamOption.ts b/src/management/api/types/IntegrationRequiredParamOption.ts index b095059f46..00bf9a957d 100644 --- a/src/management/api/types/IntegrationRequiredParamOption.ts +++ b/src/management/api/types/IntegrationRequiredParamOption.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface IntegrationRequiredParamOption { /** The value of an option that will be used within the application. */ diff --git a/src/management/api/types/IntegrationRequiredParamTypeEnum.ts b/src/management/api/types/IntegrationRequiredParamTypeEnum.ts index afd3f5a251..cf19af4d76 100644 --- a/src/management/api/types/IntegrationRequiredParamTypeEnum.ts +++ b/src/management/api/types/IntegrationRequiredParamTypeEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type IntegrationRequiredParamTypeEnum = "UNSPECIFIED" | "STRING"; export const IntegrationRequiredParamTypeEnum = { Unspecified: "UNSPECIFIED", String: "STRING", } as const; +export type IntegrationRequiredParamTypeEnum = + (typeof IntegrationRequiredParamTypeEnum)[keyof typeof IntegrationRequiredParamTypeEnum]; diff --git a/src/management/api/types/IntegrationSemVer.ts b/src/management/api/types/IntegrationSemVer.ts index 31d9d5928e..12ba9fc28b 100644 --- a/src/management/api/types/IntegrationSemVer.ts +++ b/src/management/api/types/IntegrationSemVer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Semver denotes the major.minor version of an integration release diff --git a/src/management/api/types/JobFileFormatEnum.ts b/src/management/api/types/JobFileFormatEnum.ts index 6d45257c84..a4f45b257d 100644 --- a/src/management/api/types/JobFileFormatEnum.ts +++ b/src/management/api/types/JobFileFormatEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Format of the file. Must be `json` or `csv`. - */ -export type JobFileFormatEnum = "json" | "csv"; +/** Format of the file. Must be `json` or `csv`. */ export const JobFileFormatEnum = { Json: "json", Csv: "csv", } as const; +export type JobFileFormatEnum = (typeof JobFileFormatEnum)[keyof typeof JobFileFormatEnum]; diff --git a/src/management/api/types/ListActionBindingsPaginatedResponseContent.ts b/src/management/api/types/ListActionBindingsPaginatedResponseContent.ts index 20a60e78e9..9ea351ba85 100644 --- a/src/management/api/types/ListActionBindingsPaginatedResponseContent.ts +++ b/src/management/api/types/ListActionBindingsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListActionTriggersResponseContent.ts b/src/management/api/types/ListActionTriggersResponseContent.ts index b3f928416e..df893ce8a1 100644 --- a/src/management/api/types/ListActionTriggersResponseContent.ts +++ b/src/management/api/types/ListActionTriggersResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListActionVersionsPaginatedResponseContent.ts b/src/management/api/types/ListActionVersionsPaginatedResponseContent.ts index 3bf8e9f470..15b61b7210 100644 --- a/src/management/api/types/ListActionVersionsPaginatedResponseContent.ts +++ b/src/management/api/types/ListActionVersionsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListActionsPaginatedResponseContent.ts b/src/management/api/types/ListActionsPaginatedResponseContent.ts index f96454c48d..63cbcae565 100644 --- a/src/management/api/types/ListActionsPaginatedResponseContent.ts +++ b/src/management/api/types/ListActionsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListAculsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListAculsOffsetPaginatedResponseContent.ts index 79ec908071..89902f15e5 100644 --- a/src/management/api/types/ListAculsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListAculsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListBrandingPhoneProvidersResponseContent.ts b/src/management/api/types/ListBrandingPhoneProvidersResponseContent.ts index c595831015..50b87f135f 100644 --- a/src/management/api/types/ListBrandingPhoneProvidersResponseContent.ts +++ b/src/management/api/types/ListBrandingPhoneProvidersResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListClientConnectionsResponseContent.ts b/src/management/api/types/ListClientConnectionsResponseContent.ts index 2cf1a56fef..3cab0204e4 100644 --- a/src/management/api/types/ListClientConnectionsResponseContent.ts +++ b/src/management/api/types/ListClientConnectionsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListClientGrantOrganizationsPaginatedResponseContent.ts b/src/management/api/types/ListClientGrantOrganizationsPaginatedResponseContent.ts index 2c12aeccbc..e76f194f01 100644 --- a/src/management/api/types/ListClientGrantOrganizationsPaginatedResponseContent.ts +++ b/src/management/api/types/ListClientGrantOrganizationsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListClientGrantPaginatedResponseContent.ts b/src/management/api/types/ListClientGrantPaginatedResponseContent.ts index a7bf7f389c..3a3868f4d2 100644 --- a/src/management/api/types/ListClientGrantPaginatedResponseContent.ts +++ b/src/management/api/types/ListClientGrantPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListClientsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListClientsOffsetPaginatedResponseContent.ts index c0263483cf..d625c0ee59 100644 --- a/src/management/api/types/ListClientsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListClientsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListConnectionsCheckpointPaginatedResponseContent.ts b/src/management/api/types/ListConnectionsCheckpointPaginatedResponseContent.ts index 99c28bd5f2..96f9996228 100644 --- a/src/management/api/types/ListConnectionsCheckpointPaginatedResponseContent.ts +++ b/src/management/api/types/ListConnectionsCheckpointPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListCustomDomainsResponseContent.ts b/src/management/api/types/ListCustomDomainsResponseContent.ts index 3ec56022ff..f43da7ea76 100644 --- a/src/management/api/types/ListCustomDomainsResponseContent.ts +++ b/src/management/api/types/ListCustomDomainsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListDeviceCredentialsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListDeviceCredentialsOffsetPaginatedResponseContent.ts index 0a7d7f7389..cb56afc07f 100644 --- a/src/management/api/types/ListDeviceCredentialsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListDeviceCredentialsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListEncryptionKeyOffsetPaginatedResponseContent.ts b/src/management/api/types/ListEncryptionKeyOffsetPaginatedResponseContent.ts index 8d158a9874..7c0bc7b880 100644 --- a/src/management/api/types/ListEncryptionKeyOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListEncryptionKeyOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListFlowExecutionsPaginatedResponseContent.ts b/src/management/api/types/ListFlowExecutionsPaginatedResponseContent.ts index 0194a62dca..3296899d34 100644 --- a/src/management/api/types/ListFlowExecutionsPaginatedResponseContent.ts +++ b/src/management/api/types/ListFlowExecutionsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListFlowsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListFlowsOffsetPaginatedResponseContent.ts index b206cc002c..62ad7b5fd2 100644 --- a/src/management/api/types/ListFlowsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListFlowsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.ts index d51a5b6d8d..4bf58a8f86 100644 --- a/src/management/api/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListFlowsVaultConnectionsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListFormsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListFormsOffsetPaginatedResponseContent.ts index 4a6a244751..adda16d0be 100644 --- a/src/management/api/types/ListFormsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListFormsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListGuardianPoliciesResponseContent.ts b/src/management/api/types/ListGuardianPoliciesResponseContent.ts index ab71f5cc38..53cd7be699 100644 --- a/src/management/api/types/ListGuardianPoliciesResponseContent.ts +++ b/src/management/api/types/ListGuardianPoliciesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListHooksOffsetPaginatedResponseContent.ts b/src/management/api/types/ListHooksOffsetPaginatedResponseContent.ts index d7afe2badd..8e6f384db8 100644 --- a/src/management/api/types/ListHooksOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListHooksOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListLogOffsetPaginatedResponseContent.ts b/src/management/api/types/ListLogOffsetPaginatedResponseContent.ts index bda58862fd..e9ed71b2d6 100644 --- a/src/management/api/types/ListLogOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListLogOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListNetworkAclsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListNetworkAclsOffsetPaginatedResponseContent.ts index 77aa438e18..b6b3645aa4 100644 --- a/src/management/api/types/ListNetworkAclsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListNetworkAclsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.ts index 0b25d8309a..1715afafc6 100644 --- a/src/management/api/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListOrganizationClientGrantsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.ts index 3ad5ee8b86..e27dc7f543 100644 --- a/src/management/api/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListOrganizationConnectionsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.ts index 7a441a76e8..9e7b119d23 100644 --- a/src/management/api/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListOrganizationInvitationsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.ts b/src/management/api/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.ts index f02b21d062..c7adccff79 100644 --- a/src/management/api/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListOrganizationMemberRolesOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListOrganizationMembersPaginatedResponseContent.ts b/src/management/api/types/ListOrganizationMembersPaginatedResponseContent.ts index e394e6be50..194dba9700 100644 --- a/src/management/api/types/ListOrganizationMembersPaginatedResponseContent.ts +++ b/src/management/api/types/ListOrganizationMembersPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListOrganizationsPaginatedResponseContent.ts b/src/management/api/types/ListOrganizationsPaginatedResponseContent.ts index 98b573c85b..454d2011a0 100644 --- a/src/management/api/types/ListOrganizationsPaginatedResponseContent.ts +++ b/src/management/api/types/ListOrganizationsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListPhoneTemplatesResponseContent.ts b/src/management/api/types/ListPhoneTemplatesResponseContent.ts index e755105013..fd33b20a7c 100644 --- a/src/management/api/types/ListPhoneTemplatesResponseContent.ts +++ b/src/management/api/types/ListPhoneTemplatesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListRefreshTokensPaginatedResponseContent.ts b/src/management/api/types/ListRefreshTokensPaginatedResponseContent.ts index fc2ca53961..7cebe3274c 100644 --- a/src/management/api/types/ListRefreshTokensPaginatedResponseContent.ts +++ b/src/management/api/types/ListRefreshTokensPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListResourceServerOffsetPaginatedResponseContent.ts b/src/management/api/types/ListResourceServerOffsetPaginatedResponseContent.ts index d8d18f5a1c..198f7d1962 100644 --- a/src/management/api/types/ListResourceServerOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListResourceServerOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListRolePermissionsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListRolePermissionsOffsetPaginatedResponseContent.ts index c1fae4fbd8..31f1ba31e1 100644 --- a/src/management/api/types/ListRolePermissionsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListRolePermissionsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListRoleUsersPaginatedResponseContent.ts b/src/management/api/types/ListRoleUsersPaginatedResponseContent.ts index 178d3291d8..9db8255c2b 100644 --- a/src/management/api/types/ListRoleUsersPaginatedResponseContent.ts +++ b/src/management/api/types/ListRoleUsersPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListRolesOffsetPaginatedResponseContent.ts b/src/management/api/types/ListRolesOffsetPaginatedResponseContent.ts index 6843d9dff1..ef067b97ea 100644 --- a/src/management/api/types/ListRolesOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListRolesOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListRulesOffsetPaginatedResponseContent.ts b/src/management/api/types/ListRulesOffsetPaginatedResponseContent.ts index 003474b374..1eed81c25d 100644 --- a/src/management/api/types/ListRulesOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListRulesOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListSelfServiceProfileCustomTextResponseContent.ts b/src/management/api/types/ListSelfServiceProfileCustomTextResponseContent.ts index bbd0c55dca..1279c0b3ae 100644 --- a/src/management/api/types/ListSelfServiceProfileCustomTextResponseContent.ts +++ b/src/management/api/types/ListSelfServiceProfileCustomTextResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The list of custom text keys and values. diff --git a/src/management/api/types/ListSelfServiceProfilesPaginatedResponseContent.ts b/src/management/api/types/ListSelfServiceProfilesPaginatedResponseContent.ts index 6df0c9b497..ccfe90f906 100644 --- a/src/management/api/types/ListSelfServiceProfilesPaginatedResponseContent.ts +++ b/src/management/api/types/ListSelfServiceProfilesPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListTokenExchangeProfileResponseContent.ts b/src/management/api/types/ListTokenExchangeProfileResponseContent.ts index 7867d98030..9a754b6a76 100644 --- a/src/management/api/types/ListTokenExchangeProfileResponseContent.ts +++ b/src/management/api/types/ListTokenExchangeProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserAttributeProfileTemplateResponseContent.ts b/src/management/api/types/ListUserAttributeProfileTemplateResponseContent.ts new file mode 100644 index 0000000000..f28ca78c1e --- /dev/null +++ b/src/management/api/types/ListUserAttributeProfileTemplateResponseContent.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface ListUserAttributeProfileTemplateResponseContent { + user_attribute_profile_templates?: Management.UserAttributeProfileTemplateItem[]; +} diff --git a/src/management/api/types/ListUserAttributeProfilesPaginatedResponseContent.ts b/src/management/api/types/ListUserAttributeProfilesPaginatedResponseContent.ts new file mode 100644 index 0000000000..1725b93efd --- /dev/null +++ b/src/management/api/types/ListUserAttributeProfilesPaginatedResponseContent.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface ListUserAttributeProfilesPaginatedResponseContent { + /** A cursor to be used as the "from" query parameter for the next page of results. */ + next?: string; + user_attribute_profiles?: Management.UserAttributeProfile[]; +} diff --git a/src/management/api/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.ts index eeeb95f455..713e2680fe 100644 --- a/src/management/api/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListUserAuthenticationMethodsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserBlocksByIdentifierResponseContent.ts b/src/management/api/types/ListUserBlocksByIdentifierResponseContent.ts index 6152425569..ab8312d5d0 100644 --- a/src/management/api/types/ListUserBlocksByIdentifierResponseContent.ts +++ b/src/management/api/types/ListUserBlocksByIdentifierResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserBlocksResponseContent.ts b/src/management/api/types/ListUserBlocksResponseContent.ts index 920d0377b3..90e13343cd 100644 --- a/src/management/api/types/ListUserBlocksResponseContent.ts +++ b/src/management/api/types/ListUserBlocksResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserConnectedAccountsResponseContent.ts b/src/management/api/types/ListUserConnectedAccountsResponseContent.ts new file mode 100644 index 0000000000..9df9a60661 --- /dev/null +++ b/src/management/api/types/ListUserConnectedAccountsResponseContent.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface ListUserConnectedAccountsResponseContent { + connected_accounts: Management.ConnectedAccount[]; + /** The token to retrieve the next page of connected accounts (if there is one) */ + next?: string; +} diff --git a/src/management/api/types/ListUserGrantsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListUserGrantsOffsetPaginatedResponseContent.ts index 2eec03be6c..255e9e78c5 100644 --- a/src/management/api/types/ListUserGrantsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListUserGrantsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserOrganizationsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListUserOrganizationsOffsetPaginatedResponseContent.ts index ccba236cee..3f7158fda7 100644 --- a/src/management/api/types/ListUserOrganizationsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListUserOrganizationsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserPermissionsOffsetPaginatedResponseContent.ts b/src/management/api/types/ListUserPermissionsOffsetPaginatedResponseContent.ts index d7d4069241..99101d2549 100644 --- a/src/management/api/types/ListUserPermissionsOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListUserPermissionsOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserRolesOffsetPaginatedResponseContent.ts b/src/management/api/types/ListUserRolesOffsetPaginatedResponseContent.ts index e49e6e9fa6..27a85ecfd4 100644 --- a/src/management/api/types/ListUserRolesOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListUserRolesOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUserSessionsPaginatedResponseContent.ts b/src/management/api/types/ListUserSessionsPaginatedResponseContent.ts index a9b1a9d148..2d24a30adb 100644 --- a/src/management/api/types/ListUserSessionsPaginatedResponseContent.ts +++ b/src/management/api/types/ListUserSessionsPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListUsersOffsetPaginatedResponseContent.ts b/src/management/api/types/ListUsersOffsetPaginatedResponseContent.ts index 419139dd82..3a8c41675d 100644 --- a/src/management/api/types/ListUsersOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/ListUsersOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.ts b/src/management/api/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.ts index 5a078e0341..73da133801 100644 --- a/src/management/api/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.ts +++ b/src/management/api/types/ListVerifiableCredentialTemplatesPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/Log.ts b/src/management/api/types/Log.ts index 41493dd380..05de2e4b45 100644 --- a/src/management/api/types/Log.ts +++ b/src/management/api/types/Log.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -9,7 +7,7 @@ export interface Log { /** Type of event. */ type?: string; /** Description of this event. */ - description?: string; + description?: string | null; /** Name of the connection the event relates to. */ connection?: string; /** ID of the connection the event relates to. */ diff --git a/src/management/api/types/LogDate.ts b/src/management/api/types/LogDate.ts index 04aa5f5e1e..be5558d3ad 100644 --- a/src/management/api/types/LogDate.ts +++ b/src/management/api/types/LogDate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogDateObject.ts b/src/management/api/types/LogDateObject.ts index 40f856d2c3..e451e4f0fb 100644 --- a/src/management/api/types/LogDateObject.ts +++ b/src/management/api/types/LogDateObject.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Date when the event occurred in ISO 8601 format. diff --git a/src/management/api/types/LogDetails.ts b/src/management/api/types/LogDetails.ts index 75da0572c1..89ae52b24b 100644 --- a/src/management/api/types/LogDetails.ts +++ b/src/management/api/types/LogDetails.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Additional useful details about this event (structure is dependent upon event type). diff --git a/src/management/api/types/LogLocationInfo.ts b/src/management/api/types/LogLocationInfo.ts index 5b27e38270..88ad9fb2af 100644 --- a/src/management/api/types/LogLocationInfo.ts +++ b/src/management/api/types/LogLocationInfo.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Information about the location that triggered this event based on the `ip`. diff --git a/src/management/api/types/LogSecurityContext.ts b/src/management/api/types/LogSecurityContext.ts index f5daaf37ea..f915b07cdf 100644 --- a/src/management/api/types/LogSecurityContext.ts +++ b/src/management/api/types/LogSecurityContext.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Information about security-related signals. diff --git a/src/management/api/types/LogStreamDatadogEnum.ts b/src/management/api/types/LogStreamDatadogEnum.ts index af53b0662a..3c89e66335 100644 --- a/src/management/api/types/LogStreamDatadogEnum.ts +++ b/src/management/api/types/LogStreamDatadogEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamDatadogEnum = "datadog"; diff --git a/src/management/api/types/LogStreamDatadogRegionEnum.ts b/src/management/api/types/LogStreamDatadogRegionEnum.ts index 8c6ef7ef77..d2eadf8689 100644 --- a/src/management/api/types/LogStreamDatadogRegionEnum.ts +++ b/src/management/api/types/LogStreamDatadogRegionEnum.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Datadog region - */ -export type LogStreamDatadogRegionEnum = "us" | "eu" | "us3" | "us5"; +/** Datadog region */ export const LogStreamDatadogRegionEnum = { Us: "us", Eu: "eu", Us3: "us3", Us5: "us5", } as const; +export type LogStreamDatadogRegionEnum = (typeof LogStreamDatadogRegionEnum)[keyof typeof LogStreamDatadogRegionEnum]; diff --git a/src/management/api/types/LogStreamDatadogResponseSchema.ts b/src/management/api/types/LogStreamDatadogResponseSchema.ts index 934e9c6b1e..d4252d21fd 100644 --- a/src/management/api/types/LogStreamDatadogResponseSchema.ts +++ b/src/management/api/types/LogStreamDatadogResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamDatadogSink.ts b/src/management/api/types/LogStreamDatadogSink.ts index 29b6236384..00b13af204 100644 --- a/src/management/api/types/LogStreamDatadogSink.ts +++ b/src/management/api/types/LogStreamDatadogSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamEventBridgeEnum.ts b/src/management/api/types/LogStreamEventBridgeEnum.ts index 8746b73e38..3ec7d0cd6c 100644 --- a/src/management/api/types/LogStreamEventBridgeEnum.ts +++ b/src/management/api/types/LogStreamEventBridgeEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamEventBridgeEnum = "eventbridge"; diff --git a/src/management/api/types/LogStreamEventBridgeResponseSchema.ts b/src/management/api/types/LogStreamEventBridgeResponseSchema.ts index 96840c49c9..a636d4e085 100644 --- a/src/management/api/types/LogStreamEventBridgeResponseSchema.ts +++ b/src/management/api/types/LogStreamEventBridgeResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamEventBridgeSink.ts b/src/management/api/types/LogStreamEventBridgeSink.ts index dbf47430e7..58c9c524d1 100644 --- a/src/management/api/types/LogStreamEventBridgeSink.ts +++ b/src/management/api/types/LogStreamEventBridgeSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamEventBridgeSinkRegionEnum.ts b/src/management/api/types/LogStreamEventBridgeSinkRegionEnum.ts index 21caf27ad3..d29e497b13 100644 --- a/src/management/api/types/LogStreamEventBridgeSinkRegionEnum.ts +++ b/src/management/api/types/LogStreamEventBridgeSinkRegionEnum.ts @@ -1,47 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The region in which the EventBridge event source will be created - */ -export type LogStreamEventBridgeSinkRegionEnum = - | "af-south-1" - | "ap-east-1" - | "ap-east-2" - | "ap-northeast-1" - | "ap-northeast-2" - | "ap-northeast-3" - | "ap-south-1" - | "ap-south-2" - | "ap-southeast-1" - | "ap-southeast-2" - | "ap-southeast-3" - | "ap-southeast-4" - | "ap-southeast-5" - | "ap-southeast-6" - | "ap-southeast-7" - | "ca-central-1" - | "ca-west-1" - | "eu-central-1" - | "eu-central-2" - | "eu-north-1" - | "eu-south-1" - | "eu-south-2" - | "eu-west-1" - | "eu-west-2" - | "eu-west-3" - | "il-central-1" - | "me-central-1" - | "me-south-1" - | "mx-central-1" - | "sa-east-1" - | "us-gov-east-1" - | "us-gov-west-1" - | "us-east-1" - | "us-east-2" - | "us-west-1" - | "us-west-2"; +/** The region in which the EventBridge event source will be created */ export const LogStreamEventBridgeSinkRegionEnum = { AfSouth1: "af-south-1", ApEast1: "ap-east-1", @@ -80,3 +39,5 @@ export const LogStreamEventBridgeSinkRegionEnum = { UsWest1: "us-west-1", UsWest2: "us-west-2", } as const; +export type LogStreamEventBridgeSinkRegionEnum = + (typeof LogStreamEventBridgeSinkRegionEnum)[keyof typeof LogStreamEventBridgeSinkRegionEnum]; diff --git a/src/management/api/types/LogStreamEventGridEnum.ts b/src/management/api/types/LogStreamEventGridEnum.ts index bb4d8d07fd..dea8214194 100644 --- a/src/management/api/types/LogStreamEventGridEnum.ts +++ b/src/management/api/types/LogStreamEventGridEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamEventGridEnum = "eventgrid"; diff --git a/src/management/api/types/LogStreamEventGridRegionEnum.ts b/src/management/api/types/LogStreamEventGridRegionEnum.ts index 15df1c2673..2fd4dc5c81 100644 --- a/src/management/api/types/LogStreamEventGridRegionEnum.ts +++ b/src/management/api/types/LogStreamEventGridRegionEnum.ts @@ -1,45 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Azure Region Name - */ -export type LogStreamEventGridRegionEnum = - | "australiacentral" - | "australiaeast" - | "australiasoutheast" - | "brazilsouth" - | "canadacentral" - | "canadaeast" - | "centralindia" - | "centralus" - | "eastasia" - | "eastus" - | "eastus2" - | "francecentral" - | "germanywestcentral" - | "japaneast" - | "japanwest" - | "koreacentral" - | "koreasouth" - | "northcentralus" - | "northeurope" - | "norwayeast" - | "southafricanorth" - | "southcentralus" - | "southeastasia" - | "southindia" - | "swedencentral" - | "switzerlandnorth" - | "uaenorth" - | "uksouth" - | "ukwest" - | "westcentralus" - | "westeurope" - | "westindia" - | "westus" - | "westus2"; +/** Azure Region Name */ export const LogStreamEventGridRegionEnum = { Australiacentral: "australiacentral", Australiaeast: "australiaeast", @@ -76,3 +37,5 @@ export const LogStreamEventGridRegionEnum = { Westus: "westus", Westus2: "westus2", } as const; +export type LogStreamEventGridRegionEnum = + (typeof LogStreamEventGridRegionEnum)[keyof typeof LogStreamEventGridRegionEnum]; diff --git a/src/management/api/types/LogStreamEventGridResponseSchema.ts b/src/management/api/types/LogStreamEventGridResponseSchema.ts index 28fb6c70eb..2904074a15 100644 --- a/src/management/api/types/LogStreamEventGridResponseSchema.ts +++ b/src/management/api/types/LogStreamEventGridResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamEventGridSink.ts b/src/management/api/types/LogStreamEventGridSink.ts index 6f87532ee3..a212d05cd6 100644 --- a/src/management/api/types/LogStreamEventGridSink.ts +++ b/src/management/api/types/LogStreamEventGridSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamFilter.ts b/src/management/api/types/LogStreamFilter.ts index 6bd48e2c55..926f69dc40 100644 --- a/src/management/api/types/LogStreamFilter.ts +++ b/src/management/api/types/LogStreamFilter.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamFilterGroupNameEnum.ts b/src/management/api/types/LogStreamFilterGroupNameEnum.ts index 2eeef7f26b..c2414f4f16 100644 --- a/src/management/api/types/LogStreamFilterGroupNameEnum.ts +++ b/src/management/api/types/LogStreamFilterGroupNameEnum.ts @@ -1,31 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Category group name - */ -export type LogStreamFilterGroupNameEnum = - | "auth.login.fail" - | "auth.login.notification" - | "auth.login.success" - | "auth.logout.fail" - | "auth.logout.success" - | "auth.signup.fail" - | "auth.signup.success" - | "auth.silent_auth.fail" - | "auth.silent_auth.success" - | "auth.token_exchange.fail" - | "auth.token_exchange.success" - | "management.fail" - | "management.success" - | "scim.event" - | "system.notification" - | "user.fail" - | "user.notification" - | "user.success" - | "actions" - | "other"; +/** Category group name */ export const LogStreamFilterGroupNameEnum = { AuthLoginFail: "auth.login.fail", AuthLoginNotification: "auth.login.notification", @@ -48,3 +23,5 @@ export const LogStreamFilterGroupNameEnum = { Actions: "actions", Other: "other", } as const; +export type LogStreamFilterGroupNameEnum = + (typeof LogStreamFilterGroupNameEnum)[keyof typeof LogStreamFilterGroupNameEnum]; diff --git a/src/management/api/types/LogStreamFilterTypeEnum.ts b/src/management/api/types/LogStreamFilterTypeEnum.ts index 0d18b2f8b6..0b504c80c3 100644 --- a/src/management/api/types/LogStreamFilterTypeEnum.ts +++ b/src/management/api/types/LogStreamFilterTypeEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Filter type. Currently `category` is the only valid type. diff --git a/src/management/api/types/LogStreamHttpContentFormatEnum.ts b/src/management/api/types/LogStreamHttpContentFormatEnum.ts index b415b8b8f6..98f2e61dd7 100644 --- a/src/management/api/types/LogStreamHttpContentFormatEnum.ts +++ b/src/management/api/types/LogStreamHttpContentFormatEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * HTTP JSON format - */ -export type LogStreamHttpContentFormatEnum = "JSONARRAY" | "JSONLINES" | "JSONOBJECT"; +/** HTTP JSON format */ export const LogStreamHttpContentFormatEnum = { Jsonarray: "JSONARRAY", Jsonlines: "JSONLINES", Jsonobject: "JSONOBJECT", } as const; +export type LogStreamHttpContentFormatEnum = + (typeof LogStreamHttpContentFormatEnum)[keyof typeof LogStreamHttpContentFormatEnum]; diff --git a/src/management/api/types/LogStreamHttpEnum.ts b/src/management/api/types/LogStreamHttpEnum.ts index f4d4c17935..cd7647591d 100644 --- a/src/management/api/types/LogStreamHttpEnum.ts +++ b/src/management/api/types/LogStreamHttpEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamHttpEnum = "http"; diff --git a/src/management/api/types/LogStreamHttpResponseSchema.ts b/src/management/api/types/LogStreamHttpResponseSchema.ts index 35e168dd43..df765f086a 100644 --- a/src/management/api/types/LogStreamHttpResponseSchema.ts +++ b/src/management/api/types/LogStreamHttpResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamHttpSink.ts b/src/management/api/types/LogStreamHttpSink.ts index d2e3a38797..60846ec21c 100644 --- a/src/management/api/types/LogStreamHttpSink.ts +++ b/src/management/api/types/LogStreamHttpSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamMixpanelEnum.ts b/src/management/api/types/LogStreamMixpanelEnum.ts index 1b4d99da65..16dd852252 100644 --- a/src/management/api/types/LogStreamMixpanelEnum.ts +++ b/src/management/api/types/LogStreamMixpanelEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamMixpanelEnum = "mixpanel"; diff --git a/src/management/api/types/LogStreamMixpanelRegionEnum.ts b/src/management/api/types/LogStreamMixpanelRegionEnum.ts index cfb7339785..e0a9793462 100644 --- a/src/management/api/types/LogStreamMixpanelRegionEnum.ts +++ b/src/management/api/types/LogStreamMixpanelRegionEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Mixpanel Region - */ -export type LogStreamMixpanelRegionEnum = "us" | "eu"; +/** Mixpanel Region */ export const LogStreamMixpanelRegionEnum = { Us: "us", Eu: "eu", } as const; +export type LogStreamMixpanelRegionEnum = + (typeof LogStreamMixpanelRegionEnum)[keyof typeof LogStreamMixpanelRegionEnum]; diff --git a/src/management/api/types/LogStreamMixpanelResponseSchema.ts b/src/management/api/types/LogStreamMixpanelResponseSchema.ts index d3a7da838f..2bdf7a9916 100644 --- a/src/management/api/types/LogStreamMixpanelResponseSchema.ts +++ b/src/management/api/types/LogStreamMixpanelResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamMixpanelSink.ts b/src/management/api/types/LogStreamMixpanelSink.ts index feff93d3b6..439739fce9 100644 --- a/src/management/api/types/LogStreamMixpanelSink.ts +++ b/src/management/api/types/LogStreamMixpanelSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamMixpanelSinkPatch.ts b/src/management/api/types/LogStreamMixpanelSinkPatch.ts index 4c99f79e0c..d1e36c1dd6 100644 --- a/src/management/api/types/LogStreamMixpanelSinkPatch.ts +++ b/src/management/api/types/LogStreamMixpanelSinkPatch.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamPiiAlgorithmEnum.ts b/src/management/api/types/LogStreamPiiAlgorithmEnum.ts index bf46de4766..967925e452 100644 --- a/src/management/api/types/LogStreamPiiAlgorithmEnum.ts +++ b/src/management/api/types/LogStreamPiiAlgorithmEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamPiiAlgorithmEnum = "xxhash"; diff --git a/src/management/api/types/LogStreamPiiConfig.ts b/src/management/api/types/LogStreamPiiConfig.ts index 622732de83..ef3745d845 100644 --- a/src/management/api/types/LogStreamPiiConfig.ts +++ b/src/management/api/types/LogStreamPiiConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamPiiLogFieldsEnum.ts b/src/management/api/types/LogStreamPiiLogFieldsEnum.ts index 04f804b010..3bed988c47 100644 --- a/src/management/api/types/LogStreamPiiLogFieldsEnum.ts +++ b/src/management/api/types/LogStreamPiiLogFieldsEnum.ts @@ -1,8 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type LogStreamPiiLogFieldsEnum = "first_name" | "last_name" | "username" | "email" | "phone" | "address"; export const LogStreamPiiLogFieldsEnum = { FirstName: "first_name", LastName: "last_name", @@ -11,3 +8,4 @@ export const LogStreamPiiLogFieldsEnum = { Phone: "phone", Address: "address", } as const; +export type LogStreamPiiLogFieldsEnum = (typeof LogStreamPiiLogFieldsEnum)[keyof typeof LogStreamPiiLogFieldsEnum]; diff --git a/src/management/api/types/LogStreamPiiMethodEnum.ts b/src/management/api/types/LogStreamPiiMethodEnum.ts index 39541dcc83..c62c8f6bdf 100644 --- a/src/management/api/types/LogStreamPiiMethodEnum.ts +++ b/src/management/api/types/LogStreamPiiMethodEnum.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type LogStreamPiiMethodEnum = "mask" | "hash"; export const LogStreamPiiMethodEnum = { Mask: "mask", Hash: "hash", } as const; +export type LogStreamPiiMethodEnum = (typeof LogStreamPiiMethodEnum)[keyof typeof LogStreamPiiMethodEnum]; diff --git a/src/management/api/types/LogStreamResponseSchema.ts b/src/management/api/types/LogStreamResponseSchema.ts index 35f3a34631..2e51a1131e 100644 --- a/src/management/api/types/LogStreamResponseSchema.ts +++ b/src/management/api/types/LogStreamResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamSegmentEnum.ts b/src/management/api/types/LogStreamSegmentEnum.ts index e3dc8dc3f1..64efb6a936 100644 --- a/src/management/api/types/LogStreamSegmentEnum.ts +++ b/src/management/api/types/LogStreamSegmentEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamSegmentEnum = "segment"; diff --git a/src/management/api/types/LogStreamSegmentResponseSchema.ts b/src/management/api/types/LogStreamSegmentResponseSchema.ts index 72ec43324a..3ccec7d54d 100644 --- a/src/management/api/types/LogStreamSegmentResponseSchema.ts +++ b/src/management/api/types/LogStreamSegmentResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamSegmentSink.ts b/src/management/api/types/LogStreamSegmentSink.ts index 6648c02dec..f530425032 100644 --- a/src/management/api/types/LogStreamSegmentSink.ts +++ b/src/management/api/types/LogStreamSegmentSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface LogStreamSegmentSink { /** Segment write key */ diff --git a/src/management/api/types/LogStreamSegmentSinkWriteKey.ts b/src/management/api/types/LogStreamSegmentSinkWriteKey.ts index 37245a89ce..1d7d143149 100644 --- a/src/management/api/types/LogStreamSegmentSinkWriteKey.ts +++ b/src/management/api/types/LogStreamSegmentSinkWriteKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface LogStreamSegmentSinkWriteKey { /** Segment write key */ diff --git a/src/management/api/types/LogStreamSinkPatch.ts b/src/management/api/types/LogStreamSinkPatch.ts index 48f4c8d4bc..aafc4a0284 100644 --- a/src/management/api/types/LogStreamSinkPatch.ts +++ b/src/management/api/types/LogStreamSinkPatch.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamSplunkEnum.ts b/src/management/api/types/LogStreamSplunkEnum.ts index 471bd3495e..cacd9c5b5c 100644 --- a/src/management/api/types/LogStreamSplunkEnum.ts +++ b/src/management/api/types/LogStreamSplunkEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamSplunkEnum = "splunk"; diff --git a/src/management/api/types/LogStreamSplunkResponseSchema.ts b/src/management/api/types/LogStreamSplunkResponseSchema.ts index 70766cb73a..a45dbe9c56 100644 --- a/src/management/api/types/LogStreamSplunkResponseSchema.ts +++ b/src/management/api/types/LogStreamSplunkResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamSplunkSink.ts b/src/management/api/types/LogStreamSplunkSink.ts index 018889f8ad..45cd31bc03 100644 --- a/src/management/api/types/LogStreamSplunkSink.ts +++ b/src/management/api/types/LogStreamSplunkSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface LogStreamSplunkSink { /** Splunk URL Endpoint */ diff --git a/src/management/api/types/LogStreamStatusEnum.ts b/src/management/api/types/LogStreamStatusEnum.ts index 66cf37e4b4..d8c7c37d32 100644 --- a/src/management/api/types/LogStreamStatusEnum.ts +++ b/src/management/api/types/LogStreamStatusEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The status of the log stream. Possible values: `active`, `paused`, `suspended` - */ -export type LogStreamStatusEnum = "active" | "paused" | "suspended"; +/** The status of the log stream. Possible values: `active`, `paused`, `suspended` */ export const LogStreamStatusEnum = { Active: "active", Paused: "paused", Suspended: "suspended", } as const; +export type LogStreamStatusEnum = (typeof LogStreamStatusEnum)[keyof typeof LogStreamStatusEnum]; diff --git a/src/management/api/types/LogStreamSumoEnum.ts b/src/management/api/types/LogStreamSumoEnum.ts index 491efd0de2..cc9af1e448 100644 --- a/src/management/api/types/LogStreamSumoEnum.ts +++ b/src/management/api/types/LogStreamSumoEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type LogStreamSumoEnum = "sumo"; diff --git a/src/management/api/types/LogStreamSumoResponseSchema.ts b/src/management/api/types/LogStreamSumoResponseSchema.ts index 1bde34326a..d8f29341ef 100644 --- a/src/management/api/types/LogStreamSumoResponseSchema.ts +++ b/src/management/api/types/LogStreamSumoResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/LogStreamSumoSink.ts b/src/management/api/types/LogStreamSumoSink.ts index 87297075a1..285f1521d0 100644 --- a/src/management/api/types/LogStreamSumoSink.ts +++ b/src/management/api/types/LogStreamSumoSink.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface LogStreamSumoSink { /** HTTP Source Address */ diff --git a/src/management/api/types/MdlPresentationProperties.ts b/src/management/api/types/MdlPresentationProperties.ts index f46d5a3df0..2e0b5e1f52 100644 --- a/src/management/api/types/MdlPresentationProperties.ts +++ b/src/management/api/types/MdlPresentationProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface MdlPresentationProperties { /** Family Name */ diff --git a/src/management/api/types/MdlPresentationRequest.ts b/src/management/api/types/MdlPresentationRequest.ts index 412d86cc54..3b66ad7202 100644 --- a/src/management/api/types/MdlPresentationRequest.ts +++ b/src/management/api/types/MdlPresentationRequest.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/MdlPresentationRequestProperties.ts b/src/management/api/types/MdlPresentationRequestProperties.ts index e678f1f093..d0babd25d8 100644 --- a/src/management/api/types/MdlPresentationRequestProperties.ts +++ b/src/management/api/types/MdlPresentationRequestProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/MfaPolicyEnum.ts b/src/management/api/types/MfaPolicyEnum.ts index 1baf39edc1..125d32b2ad 100644 --- a/src/management/api/types/MfaPolicyEnum.ts +++ b/src/management/api/types/MfaPolicyEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The MFA policy - */ -export type MfaPolicyEnum = "all-applications" | "confidence-score"; +/** The MFA policy */ export const MfaPolicyEnum = { AllApplications: "all-applications", ConfidenceScore: "confidence-score", } as const; +export type MfaPolicyEnum = (typeof MfaPolicyEnum)[keyof typeof MfaPolicyEnum]; diff --git a/src/management/api/types/NativeSocialLogin.ts b/src/management/api/types/NativeSocialLogin.ts index 3d4c1ed6a4..0d1993fe88 100644 --- a/src/management/api/types/NativeSocialLogin.ts +++ b/src/management/api/types/NativeSocialLogin.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/NativeSocialLoginApple.ts b/src/management/api/types/NativeSocialLoginApple.ts index 4049b704f1..a8a81ffbff 100644 --- a/src/management/api/types/NativeSocialLoginApple.ts +++ b/src/management/api/types/NativeSocialLoginApple.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Native Social Login support for the Apple connection diff --git a/src/management/api/types/NativeSocialLoginFacebook.ts b/src/management/api/types/NativeSocialLoginFacebook.ts index a3593b884d..b69f532a87 100644 --- a/src/management/api/types/NativeSocialLoginFacebook.ts +++ b/src/management/api/types/NativeSocialLoginFacebook.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Native Social Login support for the Facebook connection diff --git a/src/management/api/types/NativeSocialLoginGoogle.ts b/src/management/api/types/NativeSocialLoginGoogle.ts index 8f59127253..94e671ef1c 100644 --- a/src/management/api/types/NativeSocialLoginGoogle.ts +++ b/src/management/api/types/NativeSocialLoginGoogle.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Native Social Login support for the google-oauth2 connection diff --git a/src/management/api/types/NetworkAclAction.ts b/src/management/api/types/NetworkAclAction.ts index 8865af83a9..ff01613ef8 100644 --- a/src/management/api/types/NetworkAclAction.ts +++ b/src/management/api/types/NetworkAclAction.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/NetworkAclActionAllowEnum.ts b/src/management/api/types/NetworkAclActionAllowEnum.ts index 9426db6fca..216d84bc0a 100644 --- a/src/management/api/types/NetworkAclActionAllowEnum.ts +++ b/src/management/api/types/NetworkAclActionAllowEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Indicates the rule will allow requests that either match or not_match specific criteria diff --git a/src/management/api/types/NetworkAclActionBlockEnum.ts b/src/management/api/types/NetworkAclActionBlockEnum.ts index 335be3548e..1d1b059865 100644 --- a/src/management/api/types/NetworkAclActionBlockEnum.ts +++ b/src/management/api/types/NetworkAclActionBlockEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Indicates the rule will block requests that either match or not_match specific criteria diff --git a/src/management/api/types/NetworkAclActionLogEnum.ts b/src/management/api/types/NetworkAclActionLogEnum.ts index c5bd2aad43..281e873368 100644 --- a/src/management/api/types/NetworkAclActionLogEnum.ts +++ b/src/management/api/types/NetworkAclActionLogEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Indicates the rule will log requests that either match or not_match specific criteria diff --git a/src/management/api/types/NetworkAclActionRedirectEnum.ts b/src/management/api/types/NetworkAclActionRedirectEnum.ts index ec0b022a2c..617e0896ce 100644 --- a/src/management/api/types/NetworkAclActionRedirectEnum.ts +++ b/src/management/api/types/NetworkAclActionRedirectEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Indicates the rule will redirect requests that either match or not_match specific criteria diff --git a/src/management/api/types/NetworkAclMatch.ts b/src/management/api/types/NetworkAclMatch.ts index 17f9486c19..2719f2752e 100644 --- a/src/management/api/types/NetworkAclMatch.ts +++ b/src/management/api/types/NetworkAclMatch.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/NetworkAclMatchIpv4Cidr.ts b/src/management/api/types/NetworkAclMatchIpv4Cidr.ts index 56027ad73b..43137ef439 100644 --- a/src/management/api/types/NetworkAclMatchIpv4Cidr.ts +++ b/src/management/api/types/NetworkAclMatchIpv4Cidr.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type NetworkAclMatchIpv4Cidr = string; diff --git a/src/management/api/types/NetworkAclMatchIpv6Cidr.ts b/src/management/api/types/NetworkAclMatchIpv6Cidr.ts index 2fcaa307a5..d90d828cd6 100644 --- a/src/management/api/types/NetworkAclMatchIpv6Cidr.ts +++ b/src/management/api/types/NetworkAclMatchIpv6Cidr.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type NetworkAclMatchIpv6Cidr = string; diff --git a/src/management/api/types/NetworkAclRule.ts b/src/management/api/types/NetworkAclRule.ts index b29c20f6e1..2435baaecd 100644 --- a/src/management/api/types/NetworkAclRule.ts +++ b/src/management/api/types/NetworkAclRule.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/NetworkAclRuleScopeEnum.ts b/src/management/api/types/NetworkAclRuleScopeEnum.ts index b7f6ee1433..b42d8bef63 100644 --- a/src/management/api/types/NetworkAclRuleScopeEnum.ts +++ b/src/management/api/types/NetworkAclRuleScopeEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Identifies the origin of the request as the Management API (management), Authentication API (authentication), or either (tenant) - */ -export type NetworkAclRuleScopeEnum = "management" | "authentication" | "tenant"; +/** Identifies the origin of the request as the Management API (management), Authentication API (authentication), or either (tenant) */ export const NetworkAclRuleScopeEnum = { Management: "management", Authentication: "authentication", Tenant: "tenant", } as const; +export type NetworkAclRuleScopeEnum = (typeof NetworkAclRuleScopeEnum)[keyof typeof NetworkAclRuleScopeEnum]; diff --git a/src/management/api/types/NetworkAclsResponseContent.ts b/src/management/api/types/NetworkAclsResponseContent.ts index 1f72e1fdf8..278f7ce2a1 100644 --- a/src/management/api/types/NetworkAclsResponseContent.ts +++ b/src/management/api/types/NetworkAclsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OauthScope.ts b/src/management/api/types/OauthScope.ts index a210f9a83d..e4c0462b46 100644 --- a/src/management/api/types/OauthScope.ts +++ b/src/management/api/types/OauthScope.ts @@ -1,995 +1,749 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type OauthScope = +export const OauthScope = { /** * Read Actions */ - | "read:actions" + ReadActions: "read:actions", /** * Create Actions */ - | "create:actions" + CreateActions: "create:actions", /** * Delete Actions */ - | "delete:actions" + DeleteActions: "delete:actions", /** * Update Actions */ - | "update:actions" + UpdateActions: "update:actions", /** * Read Anomaly Blocks */ - | "read:anomaly_blocks" + ReadAnomalyBlocks: "read:anomaly_blocks", /** * Delete Anomaly Blocks */ - | "delete:anomaly_blocks" + DeleteAnomalyBlocks: "delete:anomaly_blocks", /** * Read Shields */ - | "read:shields" + ReadShields: "read:shields", /** * Create Shields */ - | "create:shields" + CreateShields: "create:shields", /** * Update Shields */ - | "update:shields" + UpdateShields: "update:shields", /** * Read Attack Protection */ - | "read:attack_protection" + ReadAttackProtection: "read:attack_protection", /** * Update Attack Protection */ - | "update:attack_protection" + UpdateAttackProtection: "update:attack_protection", /** * Read Branding */ - | "read:branding" + ReadBranding: "read:branding", /** * Update Branding */ - | "update:branding" + UpdateBranding: "update:branding", /** * Read Phone Providers */ - | "read:phone_providers" + ReadPhoneProviders: "read:phone_providers", /** * Create Phone Providers */ - | "create:phone_providers" + CreatePhoneProviders: "create:phone_providers", /** * Update Phone Providers */ - | "update:phone_providers" + UpdatePhoneProviders: "update:phone_providers", /** * Delete Phone Providers */ - | "delete:phone_providers" + DeletePhoneProviders: "delete:phone_providers", /** * Read Phone Templates */ - | "read:phone_templates" + ReadPhoneTemplates: "read:phone_templates", /** * Create Phone Templates */ - | "create:phone_templates" + CreatePhoneTemplates: "create:phone_templates", /** * Update Phone Templates */ - | "update:phone_templates" + UpdatePhoneTemplates: "update:phone_templates", /** * Delete Phone Templates */ - | "delete:phone_templates" + DeletePhoneTemplates: "delete:phone_templates", /** * Delete Branding */ - | "delete:branding" + DeleteBranding: "delete:branding", /** * Read Client Grants */ - | "read:client_grants" + ReadClientGrants: "read:client_grants", /** * Create Client Grants */ - | "create:client_grants" + CreateClientGrants: "create:client_grants", /** * Update Client Grants */ - | "update:client_grants" + UpdateClientGrants: "update:client_grants", /** * Delete Client Grants */ - | "delete:client_grants" + DeleteClientGrants: "delete:client_grants", /** * Read Organization Client Grants */ - | "read:organization_client_grants" + ReadOrganizationClientGrants: "read:organization_client_grants", /** * Read Clients */ - | "read:clients" + ReadClients: "read:clients", /** * Read Client Keys */ - | "read:client_keys" + ReadClientKeys: "read:client_keys", /** * Read Client Credentials */ - | "read:client_credentials" + ReadClientCredentials: "read:client_credentials", /** * Read Client Summary */ - | "read:client_summary" + ReadClientSummary: "read:client_summary", /** * Create Clients */ - | "create:clients" + CreateClients: "create:clients", /** * Create Client Credentials */ - | "create:client_credentials" + CreateClientCredentials: "create:client_credentials", /** * Update Client Credentials */ - | "update:client_credentials" + UpdateClientCredentials: "update:client_credentials", /** * Delete Client Credentials */ - | "delete:client_credentials" + DeleteClientCredentials: "delete:client_credentials", /** * Update Clients */ - | "update:clients" + UpdateClients: "update:clients", /** * Update Client Keys */ - | "update:client_keys" + UpdateClientKeys: "update:client_keys", /** * Delete Clients */ - | "delete:clients" + DeleteClients: "delete:clients", /** * Read Connections */ - | "read:connections" + ReadConnections: "read:connections", /** * Read Connection Profiles */ - | "read:connection_profiles" + ReadConnectionProfiles: "read:connection_profiles", /** * Create Connection Profiles */ - | "create:connection_profiles" + CreateConnectionProfiles: "create:connection_profiles", /** * Update Connection Profiles */ - | "update:connection_profiles" + UpdateConnectionProfiles: "update:connection_profiles", /** * Delete Connection Profiles */ - | "delete:connection_profiles" + DeleteConnectionProfiles: "delete:connection_profiles", /** * Create Connections */ - | "create:connections" + CreateConnections: "create:connections", /** * Update Connections */ - | "update:connections" + UpdateConnections: "update:connections", /** * Delete Connections */ - | "delete:connections" + DeleteConnections: "delete:connections", /** * Read Directory Provisionings */ - | "read:directory_provisionings" + ReadDirectoryProvisionings: "read:directory_provisionings", /** * Create Directory Provisionings */ - | "create:directory_provisionings" + CreateDirectoryProvisionings: "create:directory_provisionings", /** * Update Directory Provisionings */ - | "update:directory_provisionings" + UpdateDirectoryProvisionings: "update:directory_provisionings", /** * Delete Directory Provisionings */ - | "delete:directory_provisionings" + DeleteDirectoryProvisionings: "delete:directory_provisionings", /** * Read Users */ - | "read:users" + ReadUsers: "read:users", /** * Read Connections Keys */ - | "read:connections_keys" + ReadConnectionsKeys: "read:connections_keys", /** * Create Connections Keys */ - | "create:connections_keys" + CreateConnectionsKeys: "create:connections_keys", /** * Update Connections Keys */ - | "update:connections_keys" + UpdateConnectionsKeys: "update:connections_keys", /** * Read Scim Config */ - | "read:scim_config" + ReadScimConfig: "read:scim_config", /** * Create Scim Config */ - | "create:scim_config" + CreateScimConfig: "create:scim_config", /** * Update Scim Config */ - | "update:scim_config" + UpdateScimConfig: "update:scim_config", /** * Delete Scim Config */ - | "delete:scim_config" + DeleteScimConfig: "delete:scim_config", /** * Read Scim Token */ - | "read:scim_token" + ReadScimToken: "read:scim_token", /** * Create Scim Token */ - | "create:scim_token" + CreateScimToken: "create:scim_token", /** * Delete Scim Token */ - | "delete:scim_token" + DeleteScimToken: "delete:scim_token", /** * Delete Users */ - | "delete:users" + DeleteUsers: "delete:users", /** * Read Custom Domains */ - | "read:custom_domains" + ReadCustomDomains: "read:custom_domains", /** * Create Custom Domains */ - | "create:custom_domains" + CreateCustomDomains: "create:custom_domains", /** * Update Custom Domains */ - | "update:custom_domains" + UpdateCustomDomains: "update:custom_domains", /** * Delete Custom Domains */ - | "delete:custom_domains" + DeleteCustomDomains: "delete:custom_domains", /** * Read Device Credentials */ - | "read:device_credentials" + ReadDeviceCredentials: "read:device_credentials", /** * Create Current User Device Credentials */ - | "create:current_user_device_credentials" + CreateCurrentUserDeviceCredentials: "create:current_user_device_credentials", /** * Delete Device Credentials */ - | "delete:device_credentials" + DeleteDeviceCredentials: "delete:device_credentials", /** * Delete Current User Device Credentials */ - | "delete:current_user_device_credentials" + DeleteCurrentUserDeviceCredentials: "delete:current_user_device_credentials", /** * Update Device Codes */ - | "update:device_codes" + UpdateDeviceCodes: "update:device_codes", /** * Read Device Codes */ - | "read:device_codes" + ReadDeviceCodes: "read:device_codes", /** * Create Test Email Dispatch */ - | "create:test_email_dispatch" + CreateTestEmailDispatch: "create:test_email_dispatch", /** * Create Email Templates */ - | "create:email_templates" + CreateEmailTemplates: "create:email_templates", /** * Read Email Templates */ - | "read:email_templates" + ReadEmailTemplates: "read:email_templates", /** * Update Email Templates */ - | "update:email_templates" + UpdateEmailTemplates: "update:email_templates", /** * Read Email Provider */ - | "read:email_provider" + ReadEmailProvider: "read:email_provider", /** * Create Email Provider */ - | "create:email_provider" + CreateEmailProvider: "create:email_provider", /** * Update Email Provider */ - | "update:email_provider" + UpdateEmailProvider: "update:email_provider", /** * Delete Email Provider */ - | "delete:email_provider" + DeleteEmailProvider: "delete:email_provider", /** * Read Entitlements */ - | "read:entitlements" + ReadEntitlements: "read:entitlements", /** * Read Event Streams */ - | "read:event_streams" + ReadEventStreams: "read:event_streams", /** * Create Event Streams */ - | "create:event_streams" + CreateEventStreams: "create:event_streams", /** * Update Event Streams */ - | "update:event_streams" + UpdateEventStreams: "update:event_streams", /** * Delete Event Streams */ - | "delete:event_streams" + DeleteEventStreams: "delete:event_streams", /** * Read Event Deliveries */ - | "read:event_deliveries" + ReadEventDeliveries: "read:event_deliveries", /** * Update Event Deliveries */ - | "update:event_deliveries" + UpdateEventDeliveries: "update:event_deliveries", /** * Read Extensions */ - | "read:extensions" + ReadExtensions: "read:extensions", /** * Read Flows */ - | "read:flows" + ReadFlows: "read:flows", /** * Create Flows */ - | "create:flows" + CreateFlows: "create:flows", /** * Read Flows Vault Connections */ - | "read:flows_vault_connections" + ReadFlowsVaultConnections: "read:flows_vault_connections", /** * Create Flows Vault Connections */ - | "create:flows_vault_connections" + CreateFlowsVaultConnections: "create:flows_vault_connections", /** * Update Flows Vault Connections */ - | "update:flows_vault_connections" + UpdateFlowsVaultConnections: "update:flows_vault_connections", /** * Delete Flows Vault Connections */ - | "delete:flows_vault_connections" + DeleteFlowsVaultConnections: "delete:flows_vault_connections", /** * Read Flows Executions */ - | "read:flows_executions" + ReadFlowsExecutions: "read:flows_executions", /** * Delete Flows Executions */ - | "delete:flows_executions" + DeleteFlowsExecutions: "delete:flows_executions", /** * Update Flows */ - | "update:flows" + UpdateFlows: "update:flows", /** * Delete Flows */ - | "delete:flows" + DeleteFlows: "delete:flows", /** * Read Forms */ - | "read:forms" + ReadForms: "read:forms", /** * Create Forms */ - | "create:forms" + CreateForms: "create:forms", /** * Update Forms */ - | "update:forms" + UpdateForms: "update:forms", /** * Delete Forms */ - | "delete:forms" + DeleteForms: "delete:forms", /** * Read Grants */ - | "read:grants" + ReadGrants: "read:grants", /** * Delete Grants */ - | "delete:grants" + DeleteGrants: "delete:grants", /** * Read Groups */ - | "read:groups" + ReadGroups: "read:groups", /** * Read Group Members */ - | "read:group_members" + ReadGroupMembers: "read:group_members", /** * Create Guardian Enrollment Tickets */ - | "create:guardian_enrollment_tickets" + CreateGuardianEnrollmentTickets: "create:guardian_enrollment_tickets", /** * Read Guardian Enrollments */ - | "read:guardian_enrollments" + ReadGuardianEnrollments: "read:guardian_enrollments", /** * Delete Guardian Enrollments */ - | "delete:guardian_enrollments" + DeleteGuardianEnrollments: "delete:guardian_enrollments", /** * Read Guardian Factors */ - | "read:guardian_factors" + ReadGuardianFactors: "read:guardian_factors", /** * Update Guardian Factors */ - | "update:guardian_factors" + UpdateGuardianFactors: "update:guardian_factors", /** * Read Mfa Policies */ - | "read:mfa_policies" + ReadMfaPolicies: "read:mfa_policies", /** * Update Mfa Policies */ - | "update:mfa_policies" + UpdateMfaPolicies: "update:mfa_policies", /** * Read Hooks */ - | "read:hooks" + ReadHooks: "read:hooks", /** * Create Hooks */ - | "create:hooks" + CreateHooks: "create:hooks", /** * Update Hooks */ - | "update:hooks" + UpdateHooks: "update:hooks", /** * Delete Hooks */ - | "delete:hooks" + DeleteHooks: "delete:hooks", /** * Read Insights */ - | "read:insights" + ReadInsights: "read:insights", /** * Read Stats */ - | "read:stats" + ReadStats: "read:stats", /** * Read Integrations */ - | "read:integrations" + ReadIntegrations: "read:integrations", /** * Create Integrations */ - | "create:integrations" + CreateIntegrations: "create:integrations", /** * Update Integrations */ - | "update:integrations" + UpdateIntegrations: "update:integrations", /** * Delete Integrations */ - | "delete:integrations" + DeleteIntegrations: "delete:integrations", /** * Create Users */ - | "create:users" + CreateUsers: "create:users", /** * Update Users */ - | "update:users" + UpdateUsers: "update:users", /** * Read Custom Signing Keys */ - | "read:custom_signing_keys" + ReadCustomSigningKeys: "read:custom_signing_keys", /** * Create Custom Signing Keys */ - | "create:custom_signing_keys" + CreateCustomSigningKeys: "create:custom_signing_keys", /** * Update Custom Signing Keys */ - | "update:custom_signing_keys" + UpdateCustomSigningKeys: "update:custom_signing_keys", /** * Delete Custom Signing Keys */ - | "delete:custom_signing_keys" + DeleteCustomSigningKeys: "delete:custom_signing_keys", /** * Read Encryption Keys */ - | "read:encryption_keys" + ReadEncryptionKeys: "read:encryption_keys", /** * Create Encryption Keys */ - | "create:encryption_keys" + CreateEncryptionKeys: "create:encryption_keys", /** * Update Encryption Keys */ - | "update:encryption_keys" + UpdateEncryptionKeys: "update:encryption_keys", /** * Delete Encryption Keys */ - | "delete:encryption_keys" + DeleteEncryptionKeys: "delete:encryption_keys", /** * Read Signing Keys */ - | "read:signing_keys" + ReadSigningKeys: "read:signing_keys", /** * Create Signing Keys */ - | "create:signing_keys" + CreateSigningKeys: "create:signing_keys", /** * Update Signing Keys */ - | "update:signing_keys" + UpdateSigningKeys: "update:signing_keys", /** * Read Log Streams */ - | "read:log_streams" + ReadLogStreams: "read:log_streams", /** * Create Log Streams */ - | "create:log_streams" + CreateLogStreams: "create:log_streams", /** * Update Log Streams */ - | "update:log_streams" + UpdateLogStreams: "update:log_streams", /** * Delete Log Streams */ - | "delete:log_streams" + DeleteLogStreams: "delete:log_streams", /** * Read Logs */ - | "read:logs" + ReadLogs: "read:logs", /** * Read Logs Users */ - | "read:logs_users" + ReadLogsUsers: "read:logs_users", /** * Read Tenant Settings */ - | "read:tenant_settings" + ReadTenantSettings: "read:tenant_settings", /** * Update Tenant Settings */ - | "update:tenant_settings" + UpdateTenantSettings: "update:tenant_settings", /** * Read Network Acls */ - | "read:network_acls" + ReadNetworkAcls: "read:network_acls", /** * Create Network Acls */ - | "create:network_acls" + CreateNetworkAcls: "create:network_acls", /** * Update Network Acls */ - | "update:network_acls" + UpdateNetworkAcls: "update:network_acls", /** * Delete Network Acls */ - | "delete:network_acls" + DeleteNetworkAcls: "delete:network_acls", /** * Read Organizations */ - | "read:organizations" + ReadOrganizations: "read:organizations", /** * Read Organizations Summary */ - | "read:organizations_summary" + ReadOrganizationsSummary: "read:organizations_summary", /** * Create Organizations */ - | "create:organizations" + CreateOrganizations: "create:organizations", /** * Create Organization Connections */ - | "create:organization_connections" + CreateOrganizationConnections: "create:organization_connections", /** * Update Organizations */ - | "update:organizations" + UpdateOrganizations: "update:organizations", /** * Delete Organizations */ - | "delete:organizations" + DeleteOrganizations: "delete:organizations", /** * Create Organization Client Grants */ - | "create:organization_client_grants" + CreateOrganizationClientGrants: "create:organization_client_grants", /** * Delete Organization Client Grants */ - | "delete:organization_client_grants" + DeleteOrganizationClientGrants: "delete:organization_client_grants", /** * Read Organization Connections */ - | "read:organization_connections" + ReadOrganizationConnections: "read:organization_connections", /** * Update Organization Connections */ - | "update:organization_connections" + UpdateOrganizationConnections: "update:organization_connections", /** * Delete Organization Connections */ - | "delete:organization_connections" + DeleteOrganizationConnections: "delete:organization_connections", /** * Read Organization Discovery Domains */ - | "read:organization_discovery_domains" + ReadOrganizationDiscoveryDomains: "read:organization_discovery_domains", /** * Create Organization Discovery Domains */ - | "create:organization_discovery_domains" + CreateOrganizationDiscoveryDomains: "create:organization_discovery_domains", /** * Update Organization Discovery Domains */ - | "update:organization_discovery_domains" + UpdateOrganizationDiscoveryDomains: "update:organization_discovery_domains", /** * Delete Organization Discovery Domains */ - | "delete:organization_discovery_domains" + DeleteOrganizationDiscoveryDomains: "delete:organization_discovery_domains", /** * Read Organization Invitations */ - | "read:organization_invitations" + ReadOrganizationInvitations: "read:organization_invitations", /** * Create Organization Invitations */ - | "create:organization_invitations" + CreateOrganizationInvitations: "create:organization_invitations", /** * Delete Organization Invitations */ - | "delete:organization_invitations" + DeleteOrganizationInvitations: "delete:organization_invitations", /** * Read Organization Members */ - | "read:organization_members" + ReadOrganizationMembers: "read:organization_members", /** * Create Organization Members */ - | "create:organization_members" + CreateOrganizationMembers: "create:organization_members", /** * Delete Organization Members */ - | "delete:organization_members" + DeleteOrganizationMembers: "delete:organization_members", /** * Read Organization Member Roles */ - | "read:organization_member_roles" + ReadOrganizationMemberRoles: "read:organization_member_roles", /** * Create Organization Member Roles */ - | "create:organization_member_roles" + CreateOrganizationMemberRoles: "create:organization_member_roles", /** * Delete Organization Member Roles */ - | "delete:organization_member_roles" + DeleteOrganizationMemberRoles: "delete:organization_member_roles", /** * Read Prompts */ - | "read:prompts" + ReadPrompts: "read:prompts", /** * Update Prompts */ - | "update:prompts" + UpdatePrompts: "update:prompts", /** * Read Resource Servers */ - | "read:resource_servers" + ReadResourceServers: "read:resource_servers", /** * Update Resource Servers */ - | "update:resource_servers" + UpdateResourceServers: "update:resource_servers", /** * Read Refresh Tokens */ - | "read:refresh_tokens" + ReadRefreshTokens: "read:refresh_tokens", /** * Delete Refresh Tokens */ - | "delete:refresh_tokens" + DeleteRefreshTokens: "delete:refresh_tokens", /** * Create Resource Servers */ - | "create:resource_servers" + CreateResourceServers: "create:resource_servers", /** * Delete Resource Servers */ - | "delete:resource_servers" + DeleteResourceServers: "delete:resource_servers", /** * Read Roles */ - | "read:roles" + ReadRoles: "read:roles", /** * Create Roles */ - | "create:roles" + CreateRoles: "create:roles", /** * Update Roles */ - | "update:roles" + UpdateRoles: "update:roles", /** * Delete Roles */ - | "delete:roles" + DeleteRoles: "delete:roles", /** * Read Role Members */ - | "read:role_members" + ReadRoleMembers: "read:role_members", /** * Create Role Members */ - | "create:role_members" + CreateRoleMembers: "create:role_members", /** * Read Rules */ - | "read:rules" + ReadRules: "read:rules", /** * Create Rules */ - | "create:rules" + CreateRules: "create:rules", /** * Update Rules */ - | "update:rules" + UpdateRules: "update:rules", /** * Read Rules Configs */ - | "read:rules_configs" + ReadRulesConfigs: "read:rules_configs", /** * Update Rules Configs */ - | "update:rules_configs" + UpdateRulesConfigs: "update:rules_configs", /** * Delete Rules Configs */ - | "delete:rules_configs" + DeleteRulesConfigs: "delete:rules_configs", /** * Delete Rules */ - | "delete:rules" + DeleteRules: "delete:rules", /** * Read Security Metrics */ - | "read:security_metrics" + ReadSecurityMetrics: "read:security_metrics", /** * Read Self Service Profiles */ - | "read:self_service_profiles" + ReadSelfServiceProfiles: "read:self_service_profiles", /** * Create Self Service Profiles */ - | "create:self_service_profiles" + CreateSelfServiceProfiles: "create:self_service_profiles", /** * Update Self Service Profiles */ - | "update:self_service_profiles" + UpdateSelfServiceProfiles: "update:self_service_profiles", /** * Delete Self Service Profiles */ - | "delete:self_service_profiles" + DeleteSelfServiceProfiles: "delete:self_service_profiles", /** * Read Self Service Profile Custom Texts */ - | "read:self_service_profile_custom_texts" + ReadSelfServiceProfileCustomTexts: "read:self_service_profile_custom_texts", /** * Update Self Service Profile Custom Texts */ - | "update:self_service_profile_custom_texts" + UpdateSelfServiceProfileCustomTexts: "update:self_service_profile_custom_texts", /** * Create Sso Access Tickets */ - | "create:sso_access_tickets" + CreateSsoAccessTickets: "create:sso_access_tickets", /** * Delete Sso Access Tickets */ - | "delete:sso_access_tickets" + DeleteSsoAccessTickets: "delete:sso_access_tickets", /** * Read Sessions */ - | "read:sessions" + ReadSessions: "read:sessions", + /** + * Update Sessions */ + UpdateSessions: "update:sessions", /** * Delete Sessions */ - | "delete:sessions" + DeleteSessions: "delete:sessions", /** * Delete Tenants */ - | "delete:tenants" + DeleteTenants: "delete:tenants", /** * Run Checks */ - | "run:checks" + RunChecks: "run:checks", /** * Read Checks */ - | "read:checks" + ReadChecks: "read:checks", /** * Read Tenant Feature Flags */ - | "read:tenant_feature_flags" + ReadTenantFeatureFlags: "read:tenant_feature_flags", /** * Read Tenant Invitations */ - | "read:tenant_invitations" + ReadTenantInvitations: "read:tenant_invitations", /** * Create Tenant Invitations */ - | "create:tenant_invitations" + CreateTenantInvitations: "create:tenant_invitations", /** * Update Tenant Invitations */ - | "update:tenant_invitations" + UpdateTenantInvitations: "update:tenant_invitations", /** * Delete Tenant Invitations */ - | "delete:tenant_invitations" + DeleteTenantInvitations: "delete:tenant_invitations", /** * Read Tenant Members */ - | "read:tenant_members" + ReadTenantMembers: "read:tenant_members", /** * Update Tenant Members */ - | "update:tenant_members" + UpdateTenantMembers: "update:tenant_members", /** * Delete Tenant Members */ - | "delete:tenant_members" + DeleteTenantMembers: "delete:tenant_members", /** * Read Owners */ - | "read:owners" + ReadOwners: "read:owners", /** * Delete Owners */ - | "delete:owners" + DeleteOwners: "delete:owners", /** * Create User Tickets */ - | "create:user_tickets" + CreateUserTickets: "create:user_tickets", /** * Read Token Exchange Profiles */ - | "read:token_exchange_profiles" + ReadTokenExchangeProfiles: "read:token_exchange_profiles", /** * Create Token Exchange Profiles */ - | "create:token_exchange_profiles" + CreateTokenExchangeProfiles: "create:token_exchange_profiles", /** * Update Token Exchange Profiles */ - | "update:token_exchange_profiles" + UpdateTokenExchangeProfiles: "update:token_exchange_profiles", /** * Delete Token Exchange Profiles */ - | "delete:token_exchange_profiles" + DeleteTokenExchangeProfiles: "delete:token_exchange_profiles", /** * Read Entity Counts */ - | "read:entity_counts" + ReadEntityCounts: "read:entity_counts", /** * Read User Attribute Profiles */ - | "read:user_attribute_profiles" + ReadUserAttributeProfiles: "read:user_attribute_profiles", /** * Create User Attribute Profiles */ - | "create:user_attribute_profiles" + CreateUserAttributeProfiles: "create:user_attribute_profiles", /** * Update User Attribute Profiles */ - | "update:user_attribute_profiles" + UpdateUserAttributeProfiles: "update:user_attribute_profiles", /** * Delete User Attribute Profiles */ - | "delete:user_attribute_profiles" + DeleteUserAttributeProfiles: "delete:user_attribute_profiles", /** * Read User Idp Tokens */ - | "read:user_idp_tokens" + ReadUserIdpTokens: "read:user_idp_tokens", /** * Read Current User */ - | "read:current_user" + ReadCurrentUser: "read:current_user", /** * Update Users App Metadata */ - | "update:users_app_metadata" + UpdateUsersAppMetadata: "update:users_app_metadata", /** * Update Current User Metadata */ - | "update:current_user_metadata" + UpdateCurrentUserMetadata: "update:current_user_metadata", /** * Delete Current User */ - | "delete:current_user" + DeleteCurrentUser: "delete:current_user", /** * Read User Application Passwords */ - | "read:user_application_passwords" + ReadUserApplicationPasswords: "read:user_application_passwords", /** * Create User Application Passwords */ - | "create:user_application_passwords" + CreateUserApplicationPasswords: "create:user_application_passwords", /** * Delete User Application Passwords */ - | "delete:user_application_passwords" + DeleteUserApplicationPasswords: "delete:user_application_passwords", /** * Read Authentication Methods */ - | "read:authentication_methods" + ReadAuthenticationMethods: "read:authentication_methods", /** * Update Authentication Methods */ - | "update:authentication_methods" + UpdateAuthenticationMethods: "update:authentication_methods", /** * Create Authentication Methods */ - | "create:authentication_methods" + CreateAuthenticationMethods: "create:authentication_methods", /** * Delete Authentication Methods */ - | "delete:authentication_methods" + DeleteAuthenticationMethods: "delete:authentication_methods", /** * Read Federated Connections Tokens */ - | "read:federated_connections_tokens" + ReadFederatedConnectionsTokens: "read:federated_connections_tokens", /** * Delete Federated Connections Tokens */ - | "delete:federated_connections_tokens" + DeleteFederatedConnectionsTokens: "delete:federated_connections_tokens", /** * Update Current User Identities */ - | "update:current_user_identities" + UpdateCurrentUserIdentities: "update:current_user_identities", /** * Delete Role Members */ - | "delete:role_members" + DeleteRoleMembers: "delete:role_members", /** * Read Vdcs Templates */ - | "read:vdcs_templates" + ReadVdcsTemplates: "read:vdcs_templates", /** * Create Vdcs Templates */ - | "create:vdcs_templates" + CreateVdcsTemplates: "create:vdcs_templates", /** * Update Vdcs Templates */ - | "update:vdcs_templates" + UpdateVdcsTemplates: "update:vdcs_templates", /** * Delete Vdcs Templates */ - | "delete:vdcs_templates"; -export const OauthScope = { - ReadActions: "read:actions", - CreateActions: "create:actions", - DeleteActions: "delete:actions", - UpdateActions: "update:actions", - ReadAnomalyBlocks: "read:anomaly_blocks", - DeleteAnomalyBlocks: "delete:anomaly_blocks", - ReadShields: "read:shields", - CreateShields: "create:shields", - UpdateShields: "update:shields", - ReadAttackProtection: "read:attack_protection", - UpdateAttackProtection: "update:attack_protection", - ReadBranding: "read:branding", - UpdateBranding: "update:branding", - ReadPhoneProviders: "read:phone_providers", - CreatePhoneProviders: "create:phone_providers", - UpdatePhoneProviders: "update:phone_providers", - DeletePhoneProviders: "delete:phone_providers", - ReadPhoneTemplates: "read:phone_templates", - CreatePhoneTemplates: "create:phone_templates", - UpdatePhoneTemplates: "update:phone_templates", - DeletePhoneTemplates: "delete:phone_templates", - DeleteBranding: "delete:branding", - ReadClientGrants: "read:client_grants", - CreateClientGrants: "create:client_grants", - UpdateClientGrants: "update:client_grants", - DeleteClientGrants: "delete:client_grants", - ReadOrganizationClientGrants: "read:organization_client_grants", - ReadClients: "read:clients", - ReadClientKeys: "read:client_keys", - ReadClientCredentials: "read:client_credentials", - ReadClientSummary: "read:client_summary", - CreateClients: "create:clients", - CreateClientCredentials: "create:client_credentials", - UpdateClientCredentials: "update:client_credentials", - DeleteClientCredentials: "delete:client_credentials", - UpdateClients: "update:clients", - UpdateClientKeys: "update:client_keys", - DeleteClients: "delete:clients", - ReadConnections: "read:connections", - ReadConnectionProfiles: "read:connection_profiles", - CreateConnectionProfiles: "create:connection_profiles", - UpdateConnectionProfiles: "update:connection_profiles", - DeleteConnectionProfiles: "delete:connection_profiles", - CreateConnections: "create:connections", - UpdateConnections: "update:connections", - DeleteConnections: "delete:connections", - ReadDirectoryProvisionings: "read:directory_provisionings", - CreateDirectoryProvisionings: "create:directory_provisionings", - UpdateDirectoryProvisionings: "update:directory_provisionings", - DeleteDirectoryProvisionings: "delete:directory_provisionings", - ReadUsers: "read:users", - ReadConnectionsKeys: "read:connections_keys", - CreateConnectionsKeys: "create:connections_keys", - UpdateConnectionsKeys: "update:connections_keys", - ReadScimConfig: "read:scim_config", - CreateScimConfig: "create:scim_config", - UpdateScimConfig: "update:scim_config", - DeleteScimConfig: "delete:scim_config", - ReadScimToken: "read:scim_token", - CreateScimToken: "create:scim_token", - DeleteScimToken: "delete:scim_token", - DeleteUsers: "delete:users", - ReadCustomDomains: "read:custom_domains", - CreateCustomDomains: "create:custom_domains", - UpdateCustomDomains: "update:custom_domains", - DeleteCustomDomains: "delete:custom_domains", - ReadDeviceCredentials: "read:device_credentials", - CreateCurrentUserDeviceCredentials: "create:current_user_device_credentials", - DeleteDeviceCredentials: "delete:device_credentials", - DeleteCurrentUserDeviceCredentials: "delete:current_user_device_credentials", - UpdateDeviceCodes: "update:device_codes", - ReadDeviceCodes: "read:device_codes", - CreateTestEmailDispatch: "create:test_email_dispatch", - CreateEmailTemplates: "create:email_templates", - ReadEmailTemplates: "read:email_templates", - UpdateEmailTemplates: "update:email_templates", - ReadEmailProvider: "read:email_provider", - CreateEmailProvider: "create:email_provider", - UpdateEmailProvider: "update:email_provider", - DeleteEmailProvider: "delete:email_provider", - ReadEntitlements: "read:entitlements", - ReadEventStreams: "read:event_streams", - CreateEventStreams: "create:event_streams", - UpdateEventStreams: "update:event_streams", - DeleteEventStreams: "delete:event_streams", - ReadEventDeliveries: "read:event_deliveries", - UpdateEventDeliveries: "update:event_deliveries", - ReadExtensions: "read:extensions", - ReadFlows: "read:flows", - CreateFlows: "create:flows", - ReadFlowsVaultConnections: "read:flows_vault_connections", - CreateFlowsVaultConnections: "create:flows_vault_connections", - UpdateFlowsVaultConnections: "update:flows_vault_connections", - DeleteFlowsVaultConnections: "delete:flows_vault_connections", - ReadFlowsExecutions: "read:flows_executions", - DeleteFlowsExecutions: "delete:flows_executions", - UpdateFlows: "update:flows", - DeleteFlows: "delete:flows", - ReadForms: "read:forms", - CreateForms: "create:forms", - UpdateForms: "update:forms", - DeleteForms: "delete:forms", - ReadGrants: "read:grants", - DeleteGrants: "delete:grants", - ReadGroups: "read:groups", - ReadGroupMembers: "read:group_members", - CreateGuardianEnrollmentTickets: "create:guardian_enrollment_tickets", - ReadGuardianEnrollments: "read:guardian_enrollments", - DeleteGuardianEnrollments: "delete:guardian_enrollments", - ReadGuardianFactors: "read:guardian_factors", - UpdateGuardianFactors: "update:guardian_factors", - ReadMfaPolicies: "read:mfa_policies", - UpdateMfaPolicies: "update:mfa_policies", - ReadHooks: "read:hooks", - CreateHooks: "create:hooks", - UpdateHooks: "update:hooks", - DeleteHooks: "delete:hooks", - ReadInsights: "read:insights", - ReadStats: "read:stats", - ReadIntegrations: "read:integrations", - CreateIntegrations: "create:integrations", - UpdateIntegrations: "update:integrations", - DeleteIntegrations: "delete:integrations", - CreateUsers: "create:users", - UpdateUsers: "update:users", - ReadCustomSigningKeys: "read:custom_signing_keys", - CreateCustomSigningKeys: "create:custom_signing_keys", - UpdateCustomSigningKeys: "update:custom_signing_keys", - DeleteCustomSigningKeys: "delete:custom_signing_keys", - ReadEncryptionKeys: "read:encryption_keys", - CreateEncryptionKeys: "create:encryption_keys", - UpdateEncryptionKeys: "update:encryption_keys", - DeleteEncryptionKeys: "delete:encryption_keys", - ReadSigningKeys: "read:signing_keys", - CreateSigningKeys: "create:signing_keys", - UpdateSigningKeys: "update:signing_keys", - ReadLogStreams: "read:log_streams", - CreateLogStreams: "create:log_streams", - UpdateLogStreams: "update:log_streams", - DeleteLogStreams: "delete:log_streams", - ReadLogs: "read:logs", - ReadLogsUsers: "read:logs_users", - ReadTenantSettings: "read:tenant_settings", - UpdateTenantSettings: "update:tenant_settings", - ReadNetworkAcls: "read:network_acls", - CreateNetworkAcls: "create:network_acls", - UpdateNetworkAcls: "update:network_acls", - DeleteNetworkAcls: "delete:network_acls", - ReadOrganizations: "read:organizations", - ReadOrganizationsSummary: "read:organizations_summary", - CreateOrganizations: "create:organizations", - CreateOrganizationConnections: "create:organization_connections", - UpdateOrganizations: "update:organizations", - DeleteOrganizations: "delete:organizations", - CreateOrganizationClientGrants: "create:organization_client_grants", - DeleteOrganizationClientGrants: "delete:organization_client_grants", - ReadOrganizationConnections: "read:organization_connections", - UpdateOrganizationConnections: "update:organization_connections", - DeleteOrganizationConnections: "delete:organization_connections", - ReadOrganizationDiscoveryDomains: "read:organization_discovery_domains", - CreateOrganizationDiscoveryDomains: "create:organization_discovery_domains", - UpdateOrganizationDiscoveryDomains: "update:organization_discovery_domains", - DeleteOrganizationDiscoveryDomains: "delete:organization_discovery_domains", - ReadOrganizationInvitations: "read:organization_invitations", - CreateOrganizationInvitations: "create:organization_invitations", - DeleteOrganizationInvitations: "delete:organization_invitations", - ReadOrganizationMembers: "read:organization_members", - CreateOrganizationMembers: "create:organization_members", - DeleteOrganizationMembers: "delete:organization_members", - ReadOrganizationMemberRoles: "read:organization_member_roles", - CreateOrganizationMemberRoles: "create:organization_member_roles", - DeleteOrganizationMemberRoles: "delete:organization_member_roles", - ReadPrompts: "read:prompts", - UpdatePrompts: "update:prompts", - ReadResourceServers: "read:resource_servers", - UpdateResourceServers: "update:resource_servers", - ReadRefreshTokens: "read:refresh_tokens", - DeleteRefreshTokens: "delete:refresh_tokens", - CreateResourceServers: "create:resource_servers", - DeleteResourceServers: "delete:resource_servers", - ReadRoles: "read:roles", - CreateRoles: "create:roles", - UpdateRoles: "update:roles", - DeleteRoles: "delete:roles", - ReadRoleMembers: "read:role_members", - CreateRoleMembers: "create:role_members", - ReadRules: "read:rules", - CreateRules: "create:rules", - UpdateRules: "update:rules", - ReadRulesConfigs: "read:rules_configs", - UpdateRulesConfigs: "update:rules_configs", - DeleteRulesConfigs: "delete:rules_configs", - DeleteRules: "delete:rules", - ReadSecurityMetrics: "read:security_metrics", - ReadSelfServiceProfiles: "read:self_service_profiles", - CreateSelfServiceProfiles: "create:self_service_profiles", - UpdateSelfServiceProfiles: "update:self_service_profiles", - DeleteSelfServiceProfiles: "delete:self_service_profiles", - ReadSelfServiceProfileCustomTexts: "read:self_service_profile_custom_texts", - UpdateSelfServiceProfileCustomTexts: "update:self_service_profile_custom_texts", - CreateSsoAccessTickets: "create:sso_access_tickets", - DeleteSsoAccessTickets: "delete:sso_access_tickets", - ReadSessions: "read:sessions", - DeleteSessions: "delete:sessions", - DeleteTenants: "delete:tenants", - RunChecks: "run:checks", - ReadChecks: "read:checks", - ReadTenantFeatureFlags: "read:tenant_feature_flags", - ReadTenantInvitations: "read:tenant_invitations", - CreateTenantInvitations: "create:tenant_invitations", - UpdateTenantInvitations: "update:tenant_invitations", - DeleteTenantInvitations: "delete:tenant_invitations", - ReadTenantMembers: "read:tenant_members", - UpdateTenantMembers: "update:tenant_members", - DeleteTenantMembers: "delete:tenant_members", - ReadOwners: "read:owners", - DeleteOwners: "delete:owners", - CreateUserTickets: "create:user_tickets", - ReadTokenExchangeProfiles: "read:token_exchange_profiles", - CreateTokenExchangeProfiles: "create:token_exchange_profiles", - UpdateTokenExchangeProfiles: "update:token_exchange_profiles", - DeleteTokenExchangeProfiles: "delete:token_exchange_profiles", - ReadEntityCounts: "read:entity_counts", - ReadUserAttributeProfiles: "read:user_attribute_profiles", - CreateUserAttributeProfiles: "create:user_attribute_profiles", - UpdateUserAttributeProfiles: "update:user_attribute_profiles", - DeleteUserAttributeProfiles: "delete:user_attribute_profiles", - ReadUserIdpTokens: "read:user_idp_tokens", - ReadCurrentUser: "read:current_user", - UpdateUsersAppMetadata: "update:users_app_metadata", - UpdateCurrentUserMetadata: "update:current_user_metadata", - DeleteCurrentUser: "delete:current_user", - ReadUserApplicationPasswords: "read:user_application_passwords", - CreateUserApplicationPasswords: "create:user_application_passwords", - DeleteUserApplicationPasswords: "delete:user_application_passwords", - ReadAuthenticationMethods: "read:authentication_methods", - UpdateAuthenticationMethods: "update:authentication_methods", - CreateAuthenticationMethods: "create:authentication_methods", - DeleteAuthenticationMethods: "delete:authentication_methods", - ReadFederatedConnectionsTokens: "read:federated_connections_tokens", - DeleteFederatedConnectionsTokens: "delete:federated_connections_tokens", - UpdateCurrentUserIdentities: "update:current_user_identities", - DeleteRoleMembers: "delete:role_members", - ReadVdcsTemplates: "read:vdcs_templates", - CreateVdcsTemplates: "create:vdcs_templates", - UpdateVdcsTemplates: "update:vdcs_templates", DeleteVdcsTemplates: "delete:vdcs_templates", } as const; +export type OauthScope = (typeof OauthScope)[keyof typeof OauthScope]; diff --git a/src/management/api/types/Organization.ts b/src/management/api/types/Organization.ts index bcc57d0983..939b514bc6 100644 --- a/src/management/api/types/Organization.ts +++ b/src/management/api/types/Organization.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationBranding.ts b/src/management/api/types/OrganizationBranding.ts index c881b8397e..1a8ad71a87 100644 --- a/src/management/api/types/OrganizationBranding.ts +++ b/src/management/api/types/OrganizationBranding.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationBrandingColors.ts b/src/management/api/types/OrganizationBrandingColors.ts index f7013aa6cc..c321b9cf6b 100644 --- a/src/management/api/types/OrganizationBrandingColors.ts +++ b/src/management/api/types/OrganizationBrandingColors.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Color scheme used to customize the login pages. diff --git a/src/management/api/types/OrganizationClientGrant.ts b/src/management/api/types/OrganizationClientGrant.ts index 998973f7be..96e262f83f 100644 --- a/src/management/api/types/OrganizationClientGrant.ts +++ b/src/management/api/types/OrganizationClientGrant.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationConnection.ts b/src/management/api/types/OrganizationConnection.ts index e195bf32aa..1ba696e489 100644 --- a/src/management/api/types/OrganizationConnection.ts +++ b/src/management/api/types/OrganizationConnection.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationConnectionInformation.ts b/src/management/api/types/OrganizationConnectionInformation.ts index b183d0dc8e..458ad42f49 100644 --- a/src/management/api/types/OrganizationConnectionInformation.ts +++ b/src/management/api/types/OrganizationConnectionInformation.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface OrganizationConnectionInformation { /** The name of the enabled connection. */ diff --git a/src/management/api/types/OrganizationEnabledConnection.ts b/src/management/api/types/OrganizationEnabledConnection.ts index 349433640f..706990393f 100644 --- a/src/management/api/types/OrganizationEnabledConnection.ts +++ b/src/management/api/types/OrganizationEnabledConnection.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationInvitation.ts b/src/management/api/types/OrganizationInvitation.ts index a8c1af7e58..587df603f1 100644 --- a/src/management/api/types/OrganizationInvitation.ts +++ b/src/management/api/types/OrganizationInvitation.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationInvitationInvitee.ts b/src/management/api/types/OrganizationInvitationInvitee.ts index 86c60f244c..0b0c8c549e 100644 --- a/src/management/api/types/OrganizationInvitationInvitee.ts +++ b/src/management/api/types/OrganizationInvitationInvitee.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface OrganizationInvitationInvitee { /** The invitee's email. */ diff --git a/src/management/api/types/OrganizationInvitationInviter.ts b/src/management/api/types/OrganizationInvitationInviter.ts index 815ee69959..f98276a59a 100644 --- a/src/management/api/types/OrganizationInvitationInviter.ts +++ b/src/management/api/types/OrganizationInvitationInviter.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface OrganizationInvitationInviter { /** The inviter's name. */ diff --git a/src/management/api/types/OrganizationMember.ts b/src/management/api/types/OrganizationMember.ts index ee782c764c..5e47ccaa28 100644 --- a/src/management/api/types/OrganizationMember.ts +++ b/src/management/api/types/OrganizationMember.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/OrganizationMemberRole.ts b/src/management/api/types/OrganizationMemberRole.ts index 73e4cf897b..3ab54a3a2e 100644 --- a/src/management/api/types/OrganizationMemberRole.ts +++ b/src/management/api/types/OrganizationMemberRole.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface OrganizationMemberRole { /** ID for this role. */ diff --git a/src/management/api/types/OrganizationMetadata.ts b/src/management/api/types/OrganizationMetadata.ts index 4972f96cdd..068db67adc 100644 --- a/src/management/api/types/OrganizationMetadata.ts +++ b/src/management/api/types/OrganizationMetadata.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed. */ -export type OrganizationMetadata = Record; +export type OrganizationMetadata = Record; diff --git a/src/management/api/types/OrganizationUsageEnum.ts b/src/management/api/types/OrganizationUsageEnum.ts index 9d79b69e75..6366efe410 100644 --- a/src/management/api/types/OrganizationUsageEnum.ts +++ b/src/management/api/types/OrganizationUsageEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines whether organizations can be used with client credentials exchanges for this grant. - */ -export type OrganizationUsageEnum = "deny" | "allow" | "require"; +/** Defines whether organizations can be used with client credentials exchanges for this grant. */ export const OrganizationUsageEnum = { Deny: "deny", Allow: "allow", Require: "require", } as const; +export type OrganizationUsageEnum = (typeof OrganizationUsageEnum)[keyof typeof OrganizationUsageEnum]; diff --git a/src/management/api/types/PartialGroupsEnum.ts b/src/management/api/types/PartialGroupsEnum.ts index 67ca02984c..04cadea63d 100644 --- a/src/management/api/types/PartialGroupsEnum.ts +++ b/src/management/api/types/PartialGroupsEnum.ts @@ -1,19 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Name of the prompt. - */ -export type PartialGroupsEnum = - | "login" - | "login-id" - | "login-password" - | "login-passwordless" - | "signup" - | "signup-id" - | "signup-password" - | "customized-consent"; +/** Name of the prompt. */ export const PartialGroupsEnum = { Login: "login", LoginId: "login-id", @@ -24,3 +11,4 @@ export const PartialGroupsEnum = { SignupPassword: "signup-password", CustomizedConsent: "customized-consent", } as const; +export type PartialGroupsEnum = (typeof PartialGroupsEnum)[keyof typeof PartialGroupsEnum]; diff --git a/src/management/api/types/PartialPhoneTemplateContent.ts b/src/management/api/types/PartialPhoneTemplateContent.ts index 1e29801376..02b604b32d 100644 --- a/src/management/api/types/PartialPhoneTemplateContent.ts +++ b/src/management/api/types/PartialPhoneTemplateContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PatchClientCredentialResponseContent.ts b/src/management/api/types/PatchClientCredentialResponseContent.ts index 8fd91744d5..28657b31b2 100644 --- a/src/management/api/types/PatchClientCredentialResponseContent.ts +++ b/src/management/api/types/PatchClientCredentialResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PatchSupplementalSignalsResponseContent.ts b/src/management/api/types/PatchSupplementalSignalsResponseContent.ts index 8f5de48bac..353f52ec86 100644 --- a/src/management/api/types/PatchSupplementalSignalsResponseContent.ts +++ b/src/management/api/types/PatchSupplementalSignalsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface PatchSupplementalSignalsResponseContent { /** Indicates if incoming Akamai Headers should be processed */ diff --git a/src/management/api/types/PermissionRequestPayload.ts b/src/management/api/types/PermissionRequestPayload.ts index a4fef73016..96edc243d9 100644 --- a/src/management/api/types/PermissionRequestPayload.ts +++ b/src/management/api/types/PermissionRequestPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface PermissionRequestPayload { /** Resource server (API) identifier that this permission is for. */ diff --git a/src/management/api/types/PermissionsResponsePayload.ts b/src/management/api/types/PermissionsResponsePayload.ts index e0d85b8068..3b8626706d 100644 --- a/src/management/api/types/PermissionsResponsePayload.ts +++ b/src/management/api/types/PermissionsResponsePayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface PermissionsResponsePayload { /** Resource server (API) identifier that this permission is for. */ diff --git a/src/management/api/types/PhoneAttribute.ts b/src/management/api/types/PhoneAttribute.ts index 3cf5c6f6d5..1db6d9a404 100644 --- a/src/management/api/types/PhoneAttribute.ts +++ b/src/management/api/types/PhoneAttribute.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PhoneProviderChannelEnum.ts b/src/management/api/types/PhoneProviderChannelEnum.ts index 6f5b69d520..6dbc8270d0 100644 --- a/src/management/api/types/PhoneProviderChannelEnum.ts +++ b/src/management/api/types/PhoneProviderChannelEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * This depicts the type of notifications this provider can receive. diff --git a/src/management/api/types/PhoneProviderConfiguration.ts b/src/management/api/types/PhoneProviderConfiguration.ts index 95ccdf1984..ac3bd0898b 100644 --- a/src/management/api/types/PhoneProviderConfiguration.ts +++ b/src/management/api/types/PhoneProviderConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PhoneProviderCredentials.ts b/src/management/api/types/PhoneProviderCredentials.ts index fd7006ac04..27fd25fef2 100644 --- a/src/management/api/types/PhoneProviderCredentials.ts +++ b/src/management/api/types/PhoneProviderCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PhoneProviderDeliveryMethodEnum.ts b/src/management/api/types/PhoneProviderDeliveryMethodEnum.ts index daf5c2f61d..799c22a4cd 100644 --- a/src/management/api/types/PhoneProviderDeliveryMethodEnum.ts +++ b/src/management/api/types/PhoneProviderDeliveryMethodEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The delivery method for the notification - */ -export type PhoneProviderDeliveryMethodEnum = "text" | "voice"; +/** The delivery method for the notification */ export const PhoneProviderDeliveryMethodEnum = { Text: "text", Voice: "voice", } as const; +export type PhoneProviderDeliveryMethodEnum = + (typeof PhoneProviderDeliveryMethodEnum)[keyof typeof PhoneProviderDeliveryMethodEnum]; diff --git a/src/management/api/types/PhoneProviderNameEnum.ts b/src/management/api/types/PhoneProviderNameEnum.ts index 4dfdd72285..cc02e20dbf 100644 --- a/src/management/api/types/PhoneProviderNameEnum.ts +++ b/src/management/api/types/PhoneProviderNameEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Name of the phone notification provider - */ -export type PhoneProviderNameEnum = "twilio" | "custom"; +/** Name of the phone notification provider */ export const PhoneProviderNameEnum = { Twilio: "twilio", Custom: "custom", } as const; +export type PhoneProviderNameEnum = (typeof PhoneProviderNameEnum)[keyof typeof PhoneProviderNameEnum]; diff --git a/src/management/api/types/PhoneProviderSchemaMasked.ts b/src/management/api/types/PhoneProviderSchemaMasked.ts index 87ea8b4271..d5ae5b7ed7 100644 --- a/src/management/api/types/PhoneProviderSchemaMasked.ts +++ b/src/management/api/types/PhoneProviderSchemaMasked.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PhoneTemplate.ts b/src/management/api/types/PhoneTemplate.ts index 52bd4c80a8..b5b8f490ef 100644 --- a/src/management/api/types/PhoneTemplate.ts +++ b/src/management/api/types/PhoneTemplate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PhoneTemplateBody.ts b/src/management/api/types/PhoneTemplateBody.ts index a077cd0908..ebb59a0637 100644 --- a/src/management/api/types/PhoneTemplateBody.ts +++ b/src/management/api/types/PhoneTemplateBody.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface PhoneTemplateBody { /** Content of the phone template for text notifications */ diff --git a/src/management/api/types/PhoneTemplateContent.ts b/src/management/api/types/PhoneTemplateContent.ts index 407d9a98a3..4673dfead9 100644 --- a/src/management/api/types/PhoneTemplateContent.ts +++ b/src/management/api/types/PhoneTemplateContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PhoneTemplateNotificationTypeEnum.ts b/src/management/api/types/PhoneTemplateNotificationTypeEnum.ts index 1117dd2425..169a351c33 100644 --- a/src/management/api/types/PhoneTemplateNotificationTypeEnum.ts +++ b/src/management/api/types/PhoneTemplateNotificationTypeEnum.ts @@ -1,13 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type PhoneTemplateNotificationTypeEnum = - | "otp_verify" - | "otp_enroll" - | "change_password" - | "blocked_account" - | "password_breach"; export const PhoneTemplateNotificationTypeEnum = { OtpVerify: "otp_verify", OtpEnroll: "otp_enroll", @@ -15,3 +7,5 @@ export const PhoneTemplateNotificationTypeEnum = { BlockedAccount: "blocked_account", PasswordBreach: "password_breach", } as const; +export type PhoneTemplateNotificationTypeEnum = + (typeof PhoneTemplateNotificationTypeEnum)[keyof typeof PhoneTemplateNotificationTypeEnum]; diff --git a/src/management/api/types/PostClientCredentialResponseContent.ts b/src/management/api/types/PostClientCredentialResponseContent.ts index a6c2857a68..461b223cc6 100644 --- a/src/management/api/types/PostClientCredentialResponseContent.ts +++ b/src/management/api/types/PostClientCredentialResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PreferredAuthenticationMethodEnum.ts b/src/management/api/types/PreferredAuthenticationMethodEnum.ts index 7efc5b6865..0c2ef52dce 100644 --- a/src/management/api/types/PreferredAuthenticationMethodEnum.ts +++ b/src/management/api/types/PreferredAuthenticationMethodEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Applies to phone authentication methods only. The preferred communication method. - */ -export type PreferredAuthenticationMethodEnum = "voice" | "sms"; +/** Applies to phone authentication methods only. The preferred communication method. */ export const PreferredAuthenticationMethodEnum = { Voice: "voice", Sms: "sms", } as const; +export type PreferredAuthenticationMethodEnum = + (typeof PreferredAuthenticationMethodEnum)[keyof typeof PreferredAuthenticationMethodEnum]; diff --git a/src/management/api/types/PrivateKeyJwt.ts b/src/management/api/types/PrivateKeyJwt.ts index 8ffba3a905..672e1eb85f 100644 --- a/src/management/api/types/PrivateKeyJwt.ts +++ b/src/management/api/types/PrivateKeyJwt.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PrivateKeyJwtCredentials.ts b/src/management/api/types/PrivateKeyJwtCredentials.ts index a4d3e0a1e9..8eb6c11ef3 100644 --- a/src/management/api/types/PrivateKeyJwtCredentials.ts +++ b/src/management/api/types/PrivateKeyJwtCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PromptGroupNameEnum.ts b/src/management/api/types/PromptGroupNameEnum.ts index c14585b7b1..703a7d5846 100644 --- a/src/management/api/types/PromptGroupNameEnum.ts +++ b/src/management/api/types/PromptGroupNameEnum.ts @@ -1,46 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Name of the prompt. - */ -export type PromptGroupNameEnum = - | "login" - | "login-id" - | "login-password" - | "login-passwordless" - | "login-email-verification" - | "signup" - | "signup-id" - | "signup-password" - | "phone-identifier-enrollment" - | "phone-identifier-challenge" - | "email-identifier-challenge" - | "reset-password" - | "custom-form" - | "consent" - | "customized-consent" - | "logout" - | "mfa-push" - | "mfa-otp" - | "mfa-voice" - | "mfa-phone" - | "mfa-webauthn" - | "mfa-sms" - | "mfa-email" - | "mfa-recovery-code" - | "mfa" - | "status" - | "device-flow" - | "email-verification" - | "email-otp-challenge" - | "organizations" - | "invitation" - | "common" - | "passkeys" - | "captcha" - | "brute-force-protection"; +/** Name of the prompt */ export const PromptGroupNameEnum = { Login: "login", LoginId: "login-id", @@ -77,4 +37,6 @@ export const PromptGroupNameEnum = { Passkeys: "passkeys", Captcha: "captcha", BruteForceProtection: "brute-force-protection", + AsyncApprovalFlow: "async-approval-flow", } as const; +export type PromptGroupNameEnum = (typeof PromptGroupNameEnum)[keyof typeof PromptGroupNameEnum]; diff --git a/src/management/api/types/PromptLanguageEnum.ts b/src/management/api/types/PromptLanguageEnum.ts index 2da908ba8e..ed9f0eec8b 100644 --- a/src/management/api/types/PromptLanguageEnum.ts +++ b/src/management/api/types/PromptLanguageEnum.ts @@ -1,92 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Language to update. - */ -export type PromptLanguageEnum = - | "am" - | "ar" - | "ar-EG" - | "ar-SA" - | "az" - | "bg" - | "bn" - | "bs" - | "ca-ES" - | "cnr" - | "cs" - | "cy" - | "da" - | "de" - | "el" - | "en" - | "en-CA" - | "es" - | "es-419" - | "es-AR" - | "es-MX" - | "et" - | "eu-ES" - | "fa" - | "fi" - | "fr" - | "fr-CA" - | "fr-FR" - | "gl-ES" - | "gu" - | "he" - | "hi" - | "hr" - | "hu" - | "hy" - | "id" - | "is" - | "it" - | "ja" - | "ka" - | "kk" - | "kn" - | "ko" - | "lt" - | "lv" - | "mk" - | "ml" - | "mn" - | "mr" - | "ms" - | "my" - | "nb" - | "nl" - | "nn" - | "no" - | "pa" - | "pl" - | "pt" - | "pt-BR" - | "pt-PT" - | "ro" - | "ru" - | "sk" - | "sl" - | "so" - | "sq" - | "sr" - | "sv" - | "sw" - | "ta" - | "te" - | "th" - | "tl" - | "tr" - | "uk" - | "ur" - | "vi" - | "zgh" - | "zh-CN" - | "zh-HK" - | "zh-TW"; +/** Language to update. */ export const PromptLanguageEnum = { Am: "am", Ar: "ar", @@ -170,3 +84,4 @@ export const PromptLanguageEnum = { ZhHk: "zh-HK", ZhTw: "zh-TW", } as const; +export type PromptLanguageEnum = (typeof PromptLanguageEnum)[keyof typeof PromptLanguageEnum]; diff --git a/src/management/api/types/PublicKeyCredential.ts b/src/management/api/types/PublicKeyCredential.ts index e17eaaa4c9..308c0950d7 100644 --- a/src/management/api/types/PublicKeyCredential.ts +++ b/src/management/api/types/PublicKeyCredential.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/PublicKeyCredentialAlgorithmEnum.ts b/src/management/api/types/PublicKeyCredentialAlgorithmEnum.ts index 9b294518c6..2b318b002f 100644 --- a/src/management/api/types/PublicKeyCredentialAlgorithmEnum.ts +++ b/src/management/api/types/PublicKeyCredentialAlgorithmEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Algorithm which will be used with the credential. Can be one of RS256, RS384, PS256. If not specified, RS256 will be used. Applies to `public_key` credential type. - */ -export type PublicKeyCredentialAlgorithmEnum = "RS256" | "RS384" | "PS256"; +/** Algorithm which will be used with the credential. Can be one of RS256, RS384, PS256. If not specified, RS256 will be used. Applies to `public_key` credential type. */ export const PublicKeyCredentialAlgorithmEnum = { Rs256: "RS256", Rs384: "RS384", Ps256: "PS256", } as const; +export type PublicKeyCredentialAlgorithmEnum = + (typeof PublicKeyCredentialAlgorithmEnum)[keyof typeof PublicKeyCredentialAlgorithmEnum]; diff --git a/src/management/api/types/PublicKeyCredentialTypeEnum.ts b/src/management/api/types/PublicKeyCredentialTypeEnum.ts index 4934a84dbf..1250f5fb0d 100644 --- a/src/management/api/types/PublicKeyCredentialTypeEnum.ts +++ b/src/management/api/types/PublicKeyCredentialTypeEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Credential type. Supported types: public_key. diff --git a/src/management/api/types/RefreshTokenDate.ts b/src/management/api/types/RefreshTokenDate.ts index c9aa666c76..bd06d2fc47 100644 --- a/src/management/api/types/RefreshTokenDate.ts +++ b/src/management/api/types/RefreshTokenDate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/RefreshTokenDateObject.ts b/src/management/api/types/RefreshTokenDateObject.ts index c1e15f92e3..4f4fc1204f 100644 --- a/src/management/api/types/RefreshTokenDateObject.ts +++ b/src/management/api/types/RefreshTokenDateObject.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The date and time when the refresh token was created diff --git a/src/management/api/types/RefreshTokenDevice.ts b/src/management/api/types/RefreshTokenDevice.ts index ecb4695e54..e23fc4f243 100644 --- a/src/management/api/types/RefreshTokenDevice.ts +++ b/src/management/api/types/RefreshTokenDevice.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Device used while issuing/exchanging the refresh token diff --git a/src/management/api/types/RefreshTokenExpirationTypeEnum.ts b/src/management/api/types/RefreshTokenExpirationTypeEnum.ts index 86235dd518..fb50464e08 100644 --- a/src/management/api/types/RefreshTokenExpirationTypeEnum.ts +++ b/src/management/api/types/RefreshTokenExpirationTypeEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Refresh token expiration types, one of: expiring, non-expiring - */ -export type RefreshTokenExpirationTypeEnum = "expiring" | "non-expiring"; +/** Refresh token expiration types, one of: expiring, non-expiring */ export const RefreshTokenExpirationTypeEnum = { Expiring: "expiring", NonExpiring: "non-expiring", } as const; +export type RefreshTokenExpirationTypeEnum = + (typeof RefreshTokenExpirationTypeEnum)[keyof typeof RefreshTokenExpirationTypeEnum]; diff --git a/src/management/api/types/RefreshTokenResourceServer.ts b/src/management/api/types/RefreshTokenResourceServer.ts index ced66c717e..2c99661e08 100644 --- a/src/management/api/types/RefreshTokenResourceServer.ts +++ b/src/management/api/types/RefreshTokenResourceServer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RefreshTokenResourceServer { /** Resource server ID */ diff --git a/src/management/api/types/RefreshTokenResponseContent.ts b/src/management/api/types/RefreshTokenResponseContent.ts index f656f72b52..8717159084 100644 --- a/src/management/api/types/RefreshTokenResponseContent.ts +++ b/src/management/api/types/RefreshTokenResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -15,7 +13,7 @@ export interface RefreshTokenResponseContent { device?: Management.RefreshTokenDevice; /** ID of the client application granted with this refresh token */ client_id?: string; - session_id?: Management.RefreshTokenSessionId | undefined; + 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 */ diff --git a/src/management/api/types/RefreshTokenRotationTypeEnum.ts b/src/management/api/types/RefreshTokenRotationTypeEnum.ts index 5b48f18f50..35782972b1 100644 --- a/src/management/api/types/RefreshTokenRotationTypeEnum.ts +++ b/src/management/api/types/RefreshTokenRotationTypeEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Refresh token rotation types, one of: rotating, non-rotating - */ -export type RefreshTokenRotationTypeEnum = "rotating" | "non-rotating"; +/** Refresh token rotation types, one of: rotating, non-rotating */ export const RefreshTokenRotationTypeEnum = { Rotating: "rotating", NonRotating: "non-rotating", } as const; +export type RefreshTokenRotationTypeEnum = + (typeof RefreshTokenRotationTypeEnum)[keyof typeof RefreshTokenRotationTypeEnum]; diff --git a/src/management/api/types/RefreshTokenSessionId.ts b/src/management/api/types/RefreshTokenSessionId.ts index 3fc69644c6..ca62ec95fe 100644 --- a/src/management/api/types/RefreshTokenSessionId.ts +++ b/src/management/api/types/RefreshTokenSessionId.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * ID of the authenticated session used to obtain this refresh-token */ -export type RefreshTokenSessionId = string | undefined; +export type RefreshTokenSessionId = (string | null) | undefined; diff --git a/src/management/api/types/RegenerateUsersRecoveryCodeResponseContent.ts b/src/management/api/types/RegenerateUsersRecoveryCodeResponseContent.ts index d7d79b7ddf..d4cf26dc9e 100644 --- a/src/management/api/types/RegenerateUsersRecoveryCodeResponseContent.ts +++ b/src/management/api/types/RegenerateUsersRecoveryCodeResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RegenerateUsersRecoveryCodeResponseContent { /** New account recovery code. */ diff --git a/src/management/api/types/ResetPhoneTemplateRequestContent.ts b/src/management/api/types/ResetPhoneTemplateRequestContent.ts index 967db259e5..dd8aa9702f 100644 --- a/src/management/api/types/ResetPhoneTemplateRequestContent.ts +++ b/src/management/api/types/ResetPhoneTemplateRequestContent.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type ResetPhoneTemplateRequestContent = unknown; diff --git a/src/management/api/types/ResetPhoneTemplateResponseContent.ts b/src/management/api/types/ResetPhoneTemplateResponseContent.ts index 2267bab16a..5e51701ca5 100644 --- a/src/management/api/types/ResetPhoneTemplateResponseContent.ts +++ b/src/management/api/types/ResetPhoneTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServer.ts b/src/management/api/types/ResourceServer.ts index 2af6e5757e..003aece77f 100644 --- a/src/management/api/types/ResourceServer.ts +++ b/src/management/api/types/ResourceServer.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -29,10 +27,10 @@ export interface ResourceServer { /** Whether authorization polices are enforced (true) or unenforced (false). */ enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; - token_encryption?: Management.ResourceServerTokenEncryption; - consent_policy?: Management.ResourceServerConsentPolicyEnum | undefined; + token_encryption?: Management.ResourceServerTokenEncryption | null; + consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; authorization_details?: unknown[]; - proof_of_possession?: Management.ResourceServerProofOfPossession; + proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; /** The client ID of the client that this resource server is linked to */ client_id?: string; diff --git a/src/management/api/types/ResourceServerConsentPolicyEnum.ts b/src/management/api/types/ResourceServerConsentPolicyEnum.ts index a3951dbbc7..11535856a2 100644 --- a/src/management/api/types/ResourceServerConsentPolicyEnum.ts +++ b/src/management/api/types/ResourceServerConsentPolicyEnum.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type ResourceServerConsentPolicyEnum = string | undefined; +export type ResourceServerConsentPolicyEnum = ("transactional-authorization-with-mfa" | null) | undefined; diff --git a/src/management/api/types/ResourceServerProofOfPossession.ts b/src/management/api/types/ResourceServerProofOfPossession.ts index 87ce7e2bae..4789feaf43 100644 --- a/src/management/api/types/ResourceServerProofOfPossession.ts +++ b/src/management/api/types/ResourceServerProofOfPossession.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServerProofOfPossessionMechanismEnum.ts b/src/management/api/types/ResourceServerProofOfPossessionMechanismEnum.ts index c854a4b43f..6e5849969b 100644 --- a/src/management/api/types/ResourceServerProofOfPossessionMechanismEnum.ts +++ b/src/management/api/types/ResourceServerProofOfPossessionMechanismEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Intended mechanism for Proof-of-Possession - */ -export type ResourceServerProofOfPossessionMechanismEnum = "mtls" | "dpop"; +/** Intended mechanism for Proof-of-Possession */ export const ResourceServerProofOfPossessionMechanismEnum = { Mtls: "mtls", Dpop: "dpop", } as const; +export type ResourceServerProofOfPossessionMechanismEnum = + (typeof ResourceServerProofOfPossessionMechanismEnum)[keyof typeof ResourceServerProofOfPossessionMechanismEnum]; diff --git a/src/management/api/types/ResourceServerScope.ts b/src/management/api/types/ResourceServerScope.ts index 2200c40a26..0358d3eb1d 100644 --- a/src/management/api/types/ResourceServerScope.ts +++ b/src/management/api/types/ResourceServerScope.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ResourceServerScope { /** Value of this scope. */ diff --git a/src/management/api/types/ResourceServerSubjectTypeAuthorization.ts b/src/management/api/types/ResourceServerSubjectTypeAuthorization.ts index 723ab84b0b..9b9dd4fbaa 100644 --- a/src/management/api/types/ResourceServerSubjectTypeAuthorization.ts +++ b/src/management/api/types/ResourceServerSubjectTypeAuthorization.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServerSubjectTypeAuthorizationClient.ts b/src/management/api/types/ResourceServerSubjectTypeAuthorizationClient.ts index d96268e493..2a159269e8 100644 --- a/src/management/api/types/ResourceServerSubjectTypeAuthorizationClient.ts +++ b/src/management/api/types/ResourceServerSubjectTypeAuthorizationClient.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.ts b/src/management/api/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.ts index df225edf1f..a95fca9a1c 100644 --- a/src/management/api/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.ts +++ b/src/management/api/types/ResourceServerSubjectTypeAuthorizationClientPolicyEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the client flows policy for the resource server - */ -export type ResourceServerSubjectTypeAuthorizationClientPolicyEnum = "deny_all" | "require_client_grant"; +/** Defines the client flows policy for the resource server */ export const ResourceServerSubjectTypeAuthorizationClientPolicyEnum = { DenyAll: "deny_all", RequireClientGrant: "require_client_grant", } as const; +export type ResourceServerSubjectTypeAuthorizationClientPolicyEnum = + (typeof ResourceServerSubjectTypeAuthorizationClientPolicyEnum)[keyof typeof ResourceServerSubjectTypeAuthorizationClientPolicyEnum]; diff --git a/src/management/api/types/ResourceServerSubjectTypeAuthorizationUser.ts b/src/management/api/types/ResourceServerSubjectTypeAuthorizationUser.ts index 40494e2bd7..ca409c78b9 100644 --- a/src/management/api/types/ResourceServerSubjectTypeAuthorizationUser.ts +++ b/src/management/api/types/ResourceServerSubjectTypeAuthorizationUser.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.ts b/src/management/api/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.ts index 2266643223..67d1b02dbc 100644 --- a/src/management/api/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.ts +++ b/src/management/api/types/ResourceServerSubjectTypeAuthorizationUserPolicyEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Defines the user flows policy for the resource server - */ -export type ResourceServerSubjectTypeAuthorizationUserPolicyEnum = "allow_all" | "deny_all" | "require_client_grant"; +/** Defines the user flows policy for the resource server */ export const ResourceServerSubjectTypeAuthorizationUserPolicyEnum = { AllowAll: "allow_all", DenyAll: "deny_all", RequireClientGrant: "require_client_grant", } as const; +export type ResourceServerSubjectTypeAuthorizationUserPolicyEnum = + (typeof ResourceServerSubjectTypeAuthorizationUserPolicyEnum)[keyof typeof ResourceServerSubjectTypeAuthorizationUserPolicyEnum]; diff --git a/src/management/api/types/ResourceServerTokenDialectResponseEnum.ts b/src/management/api/types/ResourceServerTokenDialectResponseEnum.ts index b5e3d97b70..cb46ce5327 100644 --- a/src/management/api/types/ResourceServerTokenDialectResponseEnum.ts +++ b/src/management/api/types/ResourceServerTokenDialectResponseEnum.ts @@ -1,18 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Dialect of access tokens that should be issued. `access_token` is a JWT containing standard Auth0 claims; `rfc9068_profile` is a JWT conforming to the IETF JWT Access Token Profile. `access_token_authz` and `rfc9068_profile_authz` additionally include RBAC permissions claims. - */ -export type ResourceServerTokenDialectResponseEnum = - | "access_token" - | "access_token_authz" - | "rfc9068_profile" - | "rfc9068_profile_authz"; +/** Dialect of access tokens that should be issued. `access_token` is a JWT containing standard Auth0 claims; `rfc9068_profile` is a JWT conforming to the IETF JWT Access Token Profile. `access_token_authz` and `rfc9068_profile_authz` additionally include RBAC permissions claims. */ export const ResourceServerTokenDialectResponseEnum = { AccessToken: "access_token", AccessTokenAuthz: "access_token_authz", Rfc9068Profile: "rfc9068_profile", Rfc9068ProfileAuthz: "rfc9068_profile_authz", } as const; +export type ResourceServerTokenDialectResponseEnum = + (typeof ResourceServerTokenDialectResponseEnum)[keyof typeof ResourceServerTokenDialectResponseEnum]; diff --git a/src/management/api/types/ResourceServerTokenDialectSchemaEnum.ts b/src/management/api/types/ResourceServerTokenDialectSchemaEnum.ts index bc5953af26..7f70ab6c65 100644 --- a/src/management/api/types/ResourceServerTokenDialectSchemaEnum.ts +++ b/src/management/api/types/ResourceServerTokenDialectSchemaEnum.ts @@ -1,18 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Dialect of issued access token. `access_token` is a JWT containing standard Auth0 claims; `rfc9068_profile` is a JWT conforming to the IETF JWT Access Token Profile. `access_token_authz` and `rfc9068_profile_authz` additionally include RBAC permissions claims. - */ -export type ResourceServerTokenDialectSchemaEnum = - | "access_token" - | "access_token_authz" - | "rfc9068_profile" - | "rfc9068_profile_authz"; +/** Dialect of issued access token. `access_token` is a JWT containing standard Auth0 claims; `rfc9068_profile` is a JWT conforming to the IETF JWT Access Token Profile. `access_token_authz` and `rfc9068_profile_authz` additionally include RBAC permissions claims. */ export const ResourceServerTokenDialectSchemaEnum = { AccessToken: "access_token", AccessTokenAuthz: "access_token_authz", Rfc9068Profile: "rfc9068_profile", Rfc9068ProfileAuthz: "rfc9068_profile_authz", } as const; +export type ResourceServerTokenDialectSchemaEnum = + (typeof ResourceServerTokenDialectSchemaEnum)[keyof typeof ResourceServerTokenDialectSchemaEnum]; diff --git a/src/management/api/types/ResourceServerTokenEncryption.ts b/src/management/api/types/ResourceServerTokenEncryption.ts index b83f491233..0ddd46a05c 100644 --- a/src/management/api/types/ResourceServerTokenEncryption.ts +++ b/src/management/api/types/ResourceServerTokenEncryption.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServerTokenEncryptionAlgorithmEnum.ts b/src/management/api/types/ResourceServerTokenEncryptionAlgorithmEnum.ts index e617025707..af4496a6aa 100644 --- a/src/management/api/types/ResourceServerTokenEncryptionAlgorithmEnum.ts +++ b/src/management/api/types/ResourceServerTokenEncryptionAlgorithmEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Algorithm used to encrypt the token. - */ -export type ResourceServerTokenEncryptionAlgorithmEnum = "RSA-OAEP-256" | "RSA-OAEP-384" | "RSA-OAEP-512"; +/** Algorithm used to encrypt the token. */ export const ResourceServerTokenEncryptionAlgorithmEnum = { RsaOaep256: "RSA-OAEP-256", RsaOaep384: "RSA-OAEP-384", RsaOaep512: "RSA-OAEP-512", } as const; +export type ResourceServerTokenEncryptionAlgorithmEnum = + (typeof ResourceServerTokenEncryptionAlgorithmEnum)[keyof typeof ResourceServerTokenEncryptionAlgorithmEnum]; diff --git a/src/management/api/types/ResourceServerTokenEncryptionFormatEnum.ts b/src/management/api/types/ResourceServerTokenEncryptionFormatEnum.ts index f5fa666e7f..b0843fcba9 100644 --- a/src/management/api/types/ResourceServerTokenEncryptionFormatEnum.ts +++ b/src/management/api/types/ResourceServerTokenEncryptionFormatEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Format of the encrypted JWT payload. diff --git a/src/management/api/types/ResourceServerTokenEncryptionKey.ts b/src/management/api/types/ResourceServerTokenEncryptionKey.ts index d4b14edd32..bef9a0050c 100644 --- a/src/management/api/types/ResourceServerTokenEncryptionKey.ts +++ b/src/management/api/types/ResourceServerTokenEncryptionKey.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/ResourceServerVerificationKeyPemCertificate.ts b/src/management/api/types/ResourceServerVerificationKeyPemCertificate.ts index 74ccd975a4..87f8250421 100644 --- a/src/management/api/types/ResourceServerVerificationKeyPemCertificate.ts +++ b/src/management/api/types/ResourceServerVerificationKeyPemCertificate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * PEM-encoded certificate diff --git a/src/management/api/types/RevokedSigningKeysResponseContent.ts b/src/management/api/types/RevokedSigningKeysResponseContent.ts index 87fd49845f..c235f36235 100644 --- a/src/management/api/types/RevokedSigningKeysResponseContent.ts +++ b/src/management/api/types/RevokedSigningKeysResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RevokedSigningKeysResponseContent { /** Revoked key certificate */ diff --git a/src/management/api/types/Role.ts b/src/management/api/types/Role.ts index deddce57bc..42a7fe08f4 100644 --- a/src/management/api/types/Role.ts +++ b/src/management/api/types/Role.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface Role { /** ID for this role. */ diff --git a/src/management/api/types/RoleUser.ts b/src/management/api/types/RoleUser.ts index 43c84e8bbb..94a4e7edc4 100644 --- a/src/management/api/types/RoleUser.ts +++ b/src/management/api/types/RoleUser.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RoleUser { /** ID of this user. */ diff --git a/src/management/api/types/RotateClientSecretResponseContent.ts b/src/management/api/types/RotateClientSecretResponseContent.ts index 78802bb44a..8fba4e0258 100644 --- a/src/management/api/types/RotateClientSecretResponseContent.ts +++ b/src/management/api/types/RotateClientSecretResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -36,13 +34,13 @@ export interface RotateClientSecretResponseContent { allowed_clients?: string[]; /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ allowed_logout_urls?: string[]; - session_transfer?: Management.ClientSessionTransferConfiguration; + session_transfer?: Management.ClientSessionTransferConfiguration | null; oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ grant_types?: string[]; jwt_configuration?: Management.ClientJwtConfiguration; signing_keys?: Management.ClientSigningKeys; - encryption_key?: Management.ClientEncryptionKey; + encryption_key?: Management.ClientEncryptionKey | null; /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ sso?: boolean; /** Whether Single Sign On is disabled (true) or enabled (true). Defaults to true. */ @@ -61,29 +59,37 @@ export interface RotateClientSecretResponseContent { form_template?: string; addons?: Management.ClientAddons; token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; client_metadata?: Management.ClientMetadata; mobile?: Management.ClientMobile; /** Initiate login uri, must be https */ initiate_login_uri?: string; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; organization_usage?: Management.ClientOrganizationUsageEnum; organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientAuthenticationMethod; + client_authentication_methods?: Management.ClientAuthenticationMethod | null; /** Makes the use of Pushed Authorization Requests mandatory for this client */ require_pushed_authorization_requests?: boolean; /** Makes the use of Proof-of-Possession mandatory for this client */ require_proof_of_possession?: boolean; signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean; /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; + par_request_expiry?: number | null; token_quota?: Management.TokenQuota; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; /** The identifier of the resource server that this client is linked to. */ resource_server_identifier?: string; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPostConfiguration; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/RotateConnectionKeysRequestContent.ts b/src/management/api/types/RotateConnectionKeysRequestContent.ts index 1d919b7ee3..082c4717ba 100644 --- a/src/management/api/types/RotateConnectionKeysRequestContent.ts +++ b/src/management/api/types/RotateConnectionKeysRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/RotateConnectionKeysSigningAlgEnum.ts b/src/management/api/types/RotateConnectionKeysSigningAlgEnum.ts index c00511020f..1ad1d45cc5 100644 --- a/src/management/api/types/RotateConnectionKeysSigningAlgEnum.ts +++ b/src/management/api/types/RotateConnectionKeysSigningAlgEnum.ts @@ -1,14 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Selected Signing Algorithm - */ -export type RotateConnectionKeysSigningAlgEnum = "RS256" | "RS512" | "PS256" | "ES256"; +/** Selected Signing Algorithm */ export const RotateConnectionKeysSigningAlgEnum = { Rs256: "RS256", Rs512: "RS512", Ps256: "PS256", Es256: "ES256", } as const; +export type RotateConnectionKeysSigningAlgEnum = + (typeof RotateConnectionKeysSigningAlgEnum)[keyof typeof RotateConnectionKeysSigningAlgEnum]; diff --git a/src/management/api/types/RotateConnectionsKeysResponseContent.ts b/src/management/api/types/RotateConnectionsKeysResponseContent.ts index 57e805bac4..ec16f4c86a 100644 --- a/src/management/api/types/RotateConnectionsKeysResponseContent.ts +++ b/src/management/api/types/RotateConnectionsKeysResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/RotateSigningKeysResponseContent.ts b/src/management/api/types/RotateSigningKeysResponseContent.ts index 6a1478d2f2..3683cd034d 100644 --- a/src/management/api/types/RotateSigningKeysResponseContent.ts +++ b/src/management/api/types/RotateSigningKeysResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RotateSigningKeysResponseContent { /** Next key certificate */ diff --git a/src/management/api/types/Rule.ts b/src/management/api/types/Rule.ts index e80f48ec5c..93f78ed5f1 100644 --- a/src/management/api/types/Rule.ts +++ b/src/management/api/types/Rule.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface Rule { /** Name of this rule. */ diff --git a/src/management/api/types/RulesConfig.ts b/src/management/api/types/RulesConfig.ts index c25e71f8ab..56716b3427 100644 --- a/src/management/api/types/RulesConfig.ts +++ b/src/management/api/types/RulesConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface RulesConfig { /** Key for a rules config variable. */ diff --git a/src/management/api/types/ScimMappingItem.ts b/src/management/api/types/ScimMappingItem.ts index 9f149d943e..8d3736b1a8 100644 --- a/src/management/api/types/ScimMappingItem.ts +++ b/src/management/api/types/ScimMappingItem.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ScimMappingItem { /** The field location in the auth0 schema */ diff --git a/src/management/api/types/ScimTokenItem.ts b/src/management/api/types/ScimTokenItem.ts index 473200cc86..f416bc5e8b 100644 --- a/src/management/api/types/ScimTokenItem.ts +++ b/src/management/api/types/ScimTokenItem.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface ScimTokenItem { /** The token's identifier */ diff --git a/src/management/api/types/ScreenGroupNameEnum.ts b/src/management/api/types/ScreenGroupNameEnum.ts index ab720be36f..938b88bb9e 100644 --- a/src/management/api/types/ScreenGroupNameEnum.ts +++ b/src/management/api/types/ScreenGroupNameEnum.ts @@ -1,96 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Name of the screen - */ -export type ScreenGroupNameEnum = - | "login" - | "login-id" - | "login-password" - | "login-passwordless-email-code" - | "login-passwordless-email-link" - | "login-passwordless-sms-otp" - | "login-email-verification" - | "signup" - | "signup-id" - | "signup-password" - | "phone-identifier-enrollment" - | "phone-identifier-challenge" - | "email-identifier-challenge" - | "reset-password-request" - | "reset-password-email" - | "reset-password" - | "reset-password-success" - | "reset-password-error" - | "reset-password-mfa-email-challenge" - | "reset-password-mfa-otp-challenge" - | "reset-password-mfa-phone-challenge" - | "reset-password-mfa-push-challenge-push" - | "reset-password-mfa-recovery-code-challenge" - | "reset-password-mfa-sms-challenge" - | "reset-password-mfa-voice-challenge" - | "reset-password-mfa-webauthn-platform-challenge" - | "reset-password-mfa-webauthn-roaming-challenge" - | "custom-form" - | "consent" - | "customized-consent" - | "logout" - | "logout-complete" - | "logout-aborted" - | "mfa-push-welcome" - | "mfa-push-enrollment-qr" - | "mfa-push-enrollment-code" - | "mfa-push-success" - | "mfa-push-challenge-push" - | "mfa-push-list" - | "mfa-otp-enrollment-qr" - | "mfa-otp-enrollment-code" - | "mfa-otp-challenge" - | "mfa-voice-enrollment" - | "mfa-voice-challenge" - | "mfa-phone-challenge" - | "mfa-phone-enrollment" - | "mfa-webauthn-platform-enrollment" - | "mfa-webauthn-roaming-enrollment" - | "mfa-webauthn-platform-challenge" - | "mfa-webauthn-roaming-challenge" - | "mfa-webauthn-change-key-nickname" - | "mfa-webauthn-enrollment-success" - | "mfa-webauthn-error" - | "mfa-webauthn-not-available-error" - | "mfa-country-codes" - | "mfa-sms-enrollment" - | "mfa-sms-challenge" - | "mfa-sms-list" - | "mfa-email-challenge" - | "mfa-email-list" - | "mfa-recovery-code-enrollment" - | "mfa-recovery-code-challenge-new-code" - | "mfa-recovery-code-challenge" - | "mfa-detect-browser-capabilities" - | "mfa-enroll-result" - | "mfa-login-options" - | "mfa-begin-enroll-options" - | "status" - | "device-code-activation" - | "device-code-activation-allowed" - | "device-code-activation-denied" - | "device-code-confirmation" - | "email-verification-result" - | "email-otp-challenge" - | "organization-selection" - | "organization-picker" - | "pre-login-organization-picker" - | "accept-invitation" - | "redeem-ticket" - | "passkey-enrollment" - | "passkey-enrollment-local" - | "interstitial-captcha" - | "brute-force-protection-unblock" - | "brute-force-protection-unblock-success" - | "brute-force-protection-unblock-failure"; +/** Name of the screen */ export const ScreenGroupNameEnum = { Login: "login", LoginId: "login-id", @@ -177,4 +87,9 @@ export const ScreenGroupNameEnum = { BruteForceProtectionUnblock: "brute-force-protection-unblock", BruteForceProtectionUnblockSuccess: "brute-force-protection-unblock-success", BruteForceProtectionUnblockFailure: "brute-force-protection-unblock-failure", + AsyncApprovalError: "async-approval-error", + AsyncApprovalWrongUser: "async-approval-wrong-user", + AsyncApprovalAccepted: "async-approval-accepted", + AsyncApprovalDenied: "async-approval-denied", } as const; +export type ScreenGroupNameEnum = (typeof ScreenGroupNameEnum)[keyof typeof ScreenGroupNameEnum]; diff --git a/src/management/api/types/SearchEngineVersionsEnum.ts b/src/management/api/types/SearchEngineVersionsEnum.ts index 5a74879040..350c82e294 100644 --- a/src/management/api/types/SearchEngineVersionsEnum.ts +++ b/src/management/api/types/SearchEngineVersionsEnum.ts @@ -1,13 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The version of the search engine - */ -export type SearchEngineVersionsEnum = "v1" | "v2" | "v3"; +/** The version of the search engine */ export const SearchEngineVersionsEnum = { V1: "v1", V2: "v2", V3: "v3", } as const; +export type SearchEngineVersionsEnum = (typeof SearchEngineVersionsEnum)[keyof typeof SearchEngineVersionsEnum]; diff --git a/src/management/api/types/SelfServiceProfile.ts b/src/management/api/types/SelfServiceProfile.ts index 1faff2a2e7..3b52baaeef 100644 --- a/src/management/api/types/SelfServiceProfile.ts +++ b/src/management/api/types/SelfServiceProfile.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -20,4 +18,6 @@ export interface SelfServiceProfile { branding?: Management.SelfServiceProfileBrandingProperties; /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; + /** ID of the user-attribute-profile to associate with this self-service profile. */ + user_attribute_profile_id?: string; } diff --git a/src/management/api/types/SelfServiceProfileAllowedStrategyEnum.ts b/src/management/api/types/SelfServiceProfileAllowedStrategyEnum.ts index 2f01330f3b..172abc68cf 100644 --- a/src/management/api/types/SelfServiceProfileAllowedStrategyEnum.ts +++ b/src/management/api/types/SelfServiceProfileAllowedStrategyEnum.ts @@ -1,16 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SelfServiceProfileAllowedStrategyEnum = - | "oidc" - | "samlp" - | "waad" - | "google-apps" - | "adfs" - | "okta" - | "keycloak-samlp" - | "pingfederate"; export const SelfServiceProfileAllowedStrategyEnum = { Oidc: "oidc", Samlp: "samlp", @@ -21,3 +10,5 @@ export const SelfServiceProfileAllowedStrategyEnum = { KeycloakSamlp: "keycloak-samlp", Pingfederate: "pingfederate", } as const; +export type SelfServiceProfileAllowedStrategyEnum = + (typeof SelfServiceProfileAllowedStrategyEnum)[keyof typeof SelfServiceProfileAllowedStrategyEnum]; diff --git a/src/management/api/types/SelfServiceProfileBranding.ts b/src/management/api/types/SelfServiceProfileBranding.ts index 3f362a8d64..fdac6fae8e 100644 --- a/src/management/api/types/SelfServiceProfileBranding.ts +++ b/src/management/api/types/SelfServiceProfileBranding.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; -export type SelfServiceProfileBranding = Management.SelfServiceProfileBrandingProperties | undefined; +export type SelfServiceProfileBranding = (Management.SelfServiceProfileBrandingProperties | null) | undefined; diff --git a/src/management/api/types/SelfServiceProfileBrandingColors.ts b/src/management/api/types/SelfServiceProfileBrandingColors.ts index 091a14eed9..a5f913324b 100644 --- a/src/management/api/types/SelfServiceProfileBrandingColors.ts +++ b/src/management/api/types/SelfServiceProfileBrandingColors.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SelfServiceProfileBrandingColors { primary: string; diff --git a/src/management/api/types/SelfServiceProfileBrandingProperties.ts b/src/management/api/types/SelfServiceProfileBrandingProperties.ts index 5ba1399d71..020c784308 100644 --- a/src/management/api/types/SelfServiceProfileBrandingProperties.ts +++ b/src/management/api/types/SelfServiceProfileBrandingProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SelfServiceProfileCustomTextLanguageEnum.ts b/src/management/api/types/SelfServiceProfileCustomTextLanguageEnum.ts index 67967c0401..445d46e78e 100644 --- a/src/management/api/types/SelfServiceProfileCustomTextLanguageEnum.ts +++ b/src/management/api/types/SelfServiceProfileCustomTextLanguageEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The language of the custom text. diff --git a/src/management/api/types/SelfServiceProfileCustomTextPageEnum.ts b/src/management/api/types/SelfServiceProfileCustomTextPageEnum.ts index dda16a7081..b396787f93 100644 --- a/src/management/api/types/SelfServiceProfileCustomTextPageEnum.ts +++ b/src/management/api/types/SelfServiceProfileCustomTextPageEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The page where the custom text is shown. diff --git a/src/management/api/types/SelfServiceProfileDescription.ts b/src/management/api/types/SelfServiceProfileDescription.ts index 13dd6f2cc0..51ab671c03 100644 --- a/src/management/api/types/SelfServiceProfileDescription.ts +++ b/src/management/api/types/SelfServiceProfileDescription.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The description of the self-service Profile. */ -export type SelfServiceProfileDescription = string | undefined; +export type SelfServiceProfileDescription = (string | null) | undefined; diff --git a/src/management/api/types/SelfServiceProfileSsoTicketConnectionConfig.ts b/src/management/api/types/SelfServiceProfileSsoTicketConnectionConfig.ts index 44024a2dc6..2cea0d2f8e 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketConnectionConfig.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketConnectionConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -17,5 +15,5 @@ export interface SelfServiceProfileSsoTicketConnectionConfig { /** 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.) */ show_as_button?: boolean; metadata?: Management.ConnectionsMetadata; - options?: Management.SelfServiceProfileSsoTicketConnectionOptions; + options?: Management.SelfServiceProfileSsoTicketConnectionOptions | null; } diff --git a/src/management/api/types/SelfServiceProfileSsoTicketConnectionOptions.ts b/src/management/api/types/SelfServiceProfileSsoTicketConnectionOptions.ts index 8a876d72c4..b0454134c8 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketConnectionOptions.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketConnectionOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -9,8 +7,8 @@ import * as Management from "../index.js"; */ export interface SelfServiceProfileSsoTicketConnectionOptions { /** URL for the icon. Must use HTTPS. */ - icon_url?: string; + icon_url?: string | null; /** List of domain_aliases that can be authenticated in the Identity Provider */ domain_aliases?: string[]; - idpinitiated?: Management.SelfServiceProfileSsoTicketIdpInitiatedOptions; + idpinitiated?: Management.SelfServiceProfileSsoTicketIdpInitiatedOptions | null; } diff --git a/src/management/api/types/SelfServiceProfileSsoTicketDomainAliasesConfig.ts b/src/management/api/types/SelfServiceProfileSsoTicketDomainAliasesConfig.ts index c4e703a8fa..50ca666e1a 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketDomainAliasesConfig.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketDomainAliasesConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SelfServiceProfileSsoTicketDomainVerificationEnum.ts b/src/management/api/types/SelfServiceProfileSsoTicketDomainVerificationEnum.ts index 9a0f60d5e0..1c26805c8c 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketDomainVerificationEnum.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketDomainVerificationEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Whether the end user should complete the domain verification step. Possible values are 'none' (the step is not shown to the user), 'optional' (the user may add a domain alias in the domain verification step) or 'required' (the user must add a domain alias in order to enable the connection). Defaults to 'none'. - */ -export type SelfServiceProfileSsoTicketDomainVerificationEnum = "none" | "optional" | "required"; +/** Whether the end user should complete the domain verification step. Possible values are 'none' (the step is not shown to the user), 'optional' (the user may add a domain alias in the domain verification step) or 'required' (the user must add a domain alias in order to enable the connection). Defaults to 'none'. */ export const SelfServiceProfileSsoTicketDomainVerificationEnum = { None: "none", Optional: "optional", Required: "required", } as const; +export type SelfServiceProfileSsoTicketDomainVerificationEnum = + (typeof SelfServiceProfileSsoTicketDomainVerificationEnum)[keyof typeof SelfServiceProfileSsoTicketDomainVerificationEnum]; diff --git a/src/management/api/types/SelfServiceProfileSsoTicketEnabledOrganization.ts b/src/management/api/types/SelfServiceProfileSsoTicketEnabledOrganization.ts index 4d7f22499d..f39b4b3049 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketEnabledOrganization.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketEnabledOrganization.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SelfServiceProfileSsoTicketEnabledOrganization { /** Organization identifier. */ diff --git a/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.ts b/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.ts index 7b017b573c..7a753910e2 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum.ts @@ -1,13 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The protocol used to connect to the the default application - */ -export type SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum = "samlp" | "wsfed" | "oauth2"; +/** The protocol used to connect to the the default application */ export const SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum = { Samlp: "samlp", Wsfed: "wsfed", Oauth2: "oauth2", } as const; +export type SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum = + (typeof SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum)[keyof typeof SelfServiceProfileSsoTicketIdpInitiatedClientProtocolEnum]; diff --git a/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.ts b/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.ts index ab6a6c8e1a..9d9eac3122 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketIdpInitiatedOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SelfServiceProfileSsoTicketProvisioningConfig.ts b/src/management/api/types/SelfServiceProfileSsoTicketProvisioningConfig.ts index 8f7068cb3f..a371362935 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketProvisioningConfig.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketProvisioningConfig.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -11,5 +9,5 @@ export interface SelfServiceProfileSsoTicketProvisioningConfig { /** The scopes of the SCIM tokens generated during the self-service flow. */ scopes: Management.SelfServiceProfileSsoTicketProvisioningScopeEnum[]; /** Lifetime of the tokens in seconds. Must be greater than 900. If not provided, the tokens don't expire. */ - token_lifetime?: number; + token_lifetime?: number | null; } diff --git a/src/management/api/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.ts b/src/management/api/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.ts index 71f52bd81e..9a9721df41 100644 --- a/src/management/api/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.ts +++ b/src/management/api/types/SelfServiceProfileSsoTicketProvisioningScopeEnum.ts @@ -1,13 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SelfServiceProfileSsoTicketProvisioningScopeEnum = - | "get:users" - | "post:users" - | "put:users" - | "patch:users" - | "delete:users"; export const SelfServiceProfileSsoTicketProvisioningScopeEnum = { GetUsers: "get:users", PostUsers: "post:users", @@ -15,3 +7,5 @@ export const SelfServiceProfileSsoTicketProvisioningScopeEnum = { PatchUsers: "patch:users", DeleteUsers: "delete:users", } as const; +export type SelfServiceProfileSsoTicketProvisioningScopeEnum = + (typeof SelfServiceProfileSsoTicketProvisioningScopeEnum)[keyof typeof SelfServiceProfileSsoTicketProvisioningScopeEnum]; diff --git a/src/management/api/types/SelfServiceProfileUserAttribute.ts b/src/management/api/types/SelfServiceProfileUserAttribute.ts index 055eed0911..cf6b4f136b 100644 --- a/src/management/api/types/SelfServiceProfileUserAttribute.ts +++ b/src/management/api/types/SelfServiceProfileUserAttribute.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SelfServiceProfileUserAttribute { /** Identifier of this attribute. */ diff --git a/src/management/api/types/SelfServiceProfileUserAttributes.ts b/src/management/api/types/SelfServiceProfileUserAttributes.ts index 9d933626ab..f955db1976 100644 --- a/src/management/api/types/SelfServiceProfileUserAttributes.ts +++ b/src/management/api/types/SelfServiceProfileUserAttributes.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; /** * List of attributes to be mapped that will be shown to the user during the SS-SSO flow. */ -export type SelfServiceProfileUserAttributes = Management.SelfServiceProfileUserAttribute[] | undefined; +export type SelfServiceProfileUserAttributes = (Management.SelfServiceProfileUserAttribute[] | null) | undefined; diff --git a/src/management/api/types/SessionAuthenticationSignal.ts b/src/management/api/types/SessionAuthenticationSignal.ts index c04136bf68..d2da2efe38 100644 --- a/src/management/api/types/SessionAuthenticationSignal.ts +++ b/src/management/api/types/SessionAuthenticationSignal.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SessionAuthenticationSignals.ts b/src/management/api/types/SessionAuthenticationSignals.ts index 280c74ebd3..623cd8fa7f 100644 --- a/src/management/api/types/SessionAuthenticationSignals.ts +++ b/src/management/api/types/SessionAuthenticationSignals.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SessionClientMetadata.ts b/src/management/api/types/SessionClientMetadata.ts index e2d3582639..2b0cbe7f6d 100644 --- a/src/management/api/types/SessionClientMetadata.ts +++ b/src/management/api/types/SessionClientMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Client details diff --git a/src/management/api/types/SessionCookieMetadata.ts b/src/management/api/types/SessionCookieMetadata.ts index 3e798ba042..c2fd9f31f8 100644 --- a/src/management/api/types/SessionCookieMetadata.ts +++ b/src/management/api/types/SessionCookieMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SessionCookieMetadataModeEnum.ts b/src/management/api/types/SessionCookieMetadataModeEnum.ts index 5eb8db779d..fc03f68084 100644 --- a/src/management/api/types/SessionCookieMetadataModeEnum.ts +++ b/src/management/api/types/SessionCookieMetadataModeEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * [Private Early Access] The persistence mode of the session cookie. When set to "non-persistent" (ephemeral), the cookie will be deleted when the browser is closed. When set to "persistent", the cookie will be stored until it expires or is deleted by the user. - */ -export type SessionCookieMetadataModeEnum = "non-persistent" | "persistent"; +/** [Private Early Access] The persistence mode of the session cookie. When set to "non-persistent" (ephemeral), the cookie will be deleted when the browser is closed. When set to "persistent", the cookie will be stored until it expires or is deleted by the user. */ export const SessionCookieMetadataModeEnum = { NonPersistent: "non-persistent", Persistent: "persistent", } as const; +export type SessionCookieMetadataModeEnum = + (typeof SessionCookieMetadataModeEnum)[keyof typeof SessionCookieMetadataModeEnum]; diff --git a/src/management/api/types/SessionCookieModeEnum.ts b/src/management/api/types/SessionCookieModeEnum.ts index ad9ceafb3c..fe3fb7029f 100644 --- a/src/management/api/types/SessionCookieModeEnum.ts +++ b/src/management/api/types/SessionCookieModeEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Behavior of the session cookie - */ -export type SessionCookieModeEnum = "persistent" | "non-persistent"; +/** Behavior of the session cookie */ export const SessionCookieModeEnum = { Persistent: "persistent", NonPersistent: "non-persistent", } as const; +export type SessionCookieModeEnum = (typeof SessionCookieModeEnum)[keyof typeof SessionCookieModeEnum]; diff --git a/src/management/api/types/SessionCookieSchema.ts b/src/management/api/types/SessionCookieSchema.ts index c7d2c5df79..38af468250 100644 --- a/src/management/api/types/SessionCookieSchema.ts +++ b/src/management/api/types/SessionCookieSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SessionDate.ts b/src/management/api/types/SessionDate.ts index 95a46db69b..5b3ac09598 100644 --- a/src/management/api/types/SessionDate.ts +++ b/src/management/api/types/SessionDate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type SessionDate = /** diff --git a/src/management/api/types/SessionDeviceMetadata.ts b/src/management/api/types/SessionDeviceMetadata.ts index 9d17ff0dd9..76d06505aa 100644 --- a/src/management/api/types/SessionDeviceMetadata.ts +++ b/src/management/api/types/SessionDeviceMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -10,12 +8,12 @@ import * as Management from "../index.js"; export interface SessionDeviceMetadata { /** First user agent of the device from which this user logged in */ initial_user_agent?: string; - initial_ip?: Management.SessionIp | undefined; + initial_ip?: (Management.SessionIp | undefined) | null; /** First autonomous system number associated with this session */ initial_asn?: string; /** Last user agent of the device from which this user logged in */ last_user_agent?: string; - last_ip?: Management.SessionIp | undefined; + last_ip?: (Management.SessionIp | undefined) | null; /** Last autonomous system number from which this user logged in */ last_asn?: string; /** Accepts any additional properties */ diff --git a/src/management/api/types/SessionIp.ts b/src/management/api/types/SessionIp.ts index a14957215a..c0668a8713 100644 --- a/src/management/api/types/SessionIp.ts +++ b/src/management/api/types/SessionIp.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * First IP address associated with this session */ -export type SessionIp = string | undefined; +export type SessionIp = (string | null) | undefined; diff --git a/src/management/api/types/SessionMetadata.ts b/src/management/api/types/SessionMetadata.ts new file mode 100644 index 0000000000..3446cea13b --- /dev/null +++ b/src/management/api/types/SessionMetadata.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Metadata associated with the session, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed. + */ +export type SessionMetadata = (Record | null) | undefined; diff --git a/src/management/api/types/SessionResponseContent.ts b/src/management/api/types/SessionResponseContent.ts index 696067d008..bdd4898870 100644 --- a/src/management/api/types/SessionResponseContent.ts +++ b/src/management/api/types/SessionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -20,6 +18,7 @@ export interface SessionResponseContent { clients?: Management.SessionClientMetadata[]; authentication?: Management.SessionAuthenticationSignals; cookie?: Management.SessionCookieMetadata; + session_metadata?: (Management.SessionMetadata | undefined) | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/SetCustomSigningKeysResponseContent.ts b/src/management/api/types/SetCustomSigningKeysResponseContent.ts index f169749403..435f6da103 100644 --- a/src/management/api/types/SetCustomSigningKeysResponseContent.ts +++ b/src/management/api/types/SetCustomSigningKeysResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetEmailTemplateResponseContent.ts b/src/management/api/types/SetEmailTemplateResponseContent.ts index 196c8c4211..1429043a70 100644 --- a/src/management/api/types/SetEmailTemplateResponseContent.ts +++ b/src/management/api/types/SetEmailTemplateResponseContent.ts @@ -1,25 +1,23 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface SetEmailTemplateResponseContent { template: Management.EmailTemplateNameEnum; /** Body of the email template. */ - body?: string; + body?: string | null; /** Senders `from` email address. */ - from?: string; + from?: string | null; /** URL to redirect the user to after a successful action. */ - resultUrl?: string; + resultUrl?: string | null; /** Subject line of the email. */ - subject?: string; + subject?: string | null; /** Syntax of the template body. */ - syntax?: string; + syntax?: string | null; /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; + urlLifetimeInSeconds?: number | null; /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ includeEmailInRedirect?: boolean; /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; + enabled?: boolean | null; } diff --git a/src/management/api/types/SetGuardianFactorDuoSettingsResponseContent.ts b/src/management/api/types/SetGuardianFactorDuoSettingsResponseContent.ts index f67400dc49..46b0eed4ea 100644 --- a/src/management/api/types/SetGuardianFactorDuoSettingsResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorDuoSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorDuoSettingsResponseContent { ikey?: string; diff --git a/src/management/api/types/SetGuardianFactorPhoneMessageTypesResponseContent.ts b/src/management/api/types/SetGuardianFactorPhoneMessageTypesResponseContent.ts index 7258e8c7e7..549829765b 100644 --- a/src/management/api/types/SetGuardianFactorPhoneMessageTypesResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorPhoneMessageTypesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetGuardianFactorPhoneTemplatesResponseContent.ts b/src/management/api/types/SetGuardianFactorPhoneTemplatesResponseContent.ts index 3d656fee97..dbe5272dba 100644 --- a/src/management/api/types/SetGuardianFactorPhoneTemplatesResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorPhoneTemplatesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorPhoneTemplatesResponseContent { /** Message sent to the user when they are invited to enroll with a phone number. */ diff --git a/src/management/api/types/SetGuardianFactorResponseContent.ts b/src/management/api/types/SetGuardianFactorResponseContent.ts index 5104f7af3b..1029f79413 100644 --- a/src/management/api/types/SetGuardianFactorResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorResponseContent { /** Whether this factor is enabled (true) or disabled (false). */ diff --git a/src/management/api/types/SetGuardianFactorSmsTemplatesResponseContent.ts b/src/management/api/types/SetGuardianFactorSmsTemplatesResponseContent.ts index e203a5bb8a..bef7b21cc5 100644 --- a/src/management/api/types/SetGuardianFactorSmsTemplatesResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorSmsTemplatesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorSmsTemplatesResponseContent { /** Message sent to the user when they are invited to enroll with a phone number. */ diff --git a/src/management/api/types/SetGuardianFactorsProviderPhoneResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPhoneResponseContent.ts index 08748a378c..795fa63350 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPhoneResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPhoneResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.ts index c38a2c64bf..54ab01fed2 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPhoneTwilioResponseContent.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderPhoneTwilioResponseContent { /** From number */ - from?: string; + from?: string | null; /** Copilot SID */ - messaging_service_sid?: string; + messaging_service_sid?: string | null; /** Twilio Authentication token */ - auth_token?: string; + auth_token?: string | null; /** Twilio SID */ - sid?: string; + sid?: string | null; } diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.ts index a5d98159a1..7a2b28240f 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsRequestContent.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderPushNotificationApnsRequestContent { sandbox?: boolean; - bundle_id?: string; - p12?: string; + bundle_id?: string | null; + p12?: string | null; } diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.ts index 4be17893b4..a4ce80a6e2 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationApnsResponseContent.ts @@ -1,8 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderPushNotificationApnsResponseContent { sandbox?: boolean; - bundle_id?: string; + bundle_id?: string | null; } diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.ts index 128330e62d..4b31ca4b90 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmRequestContent.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderPushNotificationFcmRequestContent { - server_key?: string; + server_key?: string | null; } diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmResponseContent.ts index 38e3c4dbb3..7e79d7085d 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmResponseContent.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type SetGuardianFactorsProviderPushNotificationFcmResponseContent = Record; diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.ts index cb5d9ec74f..8e57bbda1e 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1RequestContent.ts @@ -1,7 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderPushNotificationFcmv1RequestContent { - server_credentials?: string; + server_credentials?: string | null; } diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.ts index 9a35824657..e0827924a1 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type SetGuardianFactorsProviderPushNotificationFcmv1ResponseContent = Record; diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationResponseContent.ts index eb511b225a..530bb76ba4 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.ts index bd1c6b6462..63459dbac4 100644 --- a/src/management/api/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderPushNotificationSnsResponseContent.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderPushNotificationSnsResponseContent { - aws_access_key_id?: string; - aws_secret_access_key?: string; - aws_region?: string; - sns_apns_platform_application_arn?: string; - sns_gcm_platform_application_arn?: string; + aws_access_key_id?: string | null; + aws_secret_access_key?: string | null; + aws_region?: string | null; + sns_apns_platform_application_arn?: string | null; + sns_gcm_platform_application_arn?: string | null; } diff --git a/src/management/api/types/SetGuardianFactorsProviderSmsResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderSmsResponseContent.ts index ba92a3b458..2c8ba403ab 100644 --- a/src/management/api/types/SetGuardianFactorsProviderSmsResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderSmsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetGuardianFactorsProviderSmsTwilioResponseContent.ts b/src/management/api/types/SetGuardianFactorsProviderSmsTwilioResponseContent.ts index bd1cf93ad3..13aad45067 100644 --- a/src/management/api/types/SetGuardianFactorsProviderSmsTwilioResponseContent.ts +++ b/src/management/api/types/SetGuardianFactorsProviderSmsTwilioResponseContent.ts @@ -1,14 +1,12 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetGuardianFactorsProviderSmsTwilioResponseContent { /** From number */ - from?: string; + from?: string | null; /** Copilot SID */ - messaging_service_sid?: string; + messaging_service_sid?: string | null; /** Twilio Authentication token */ - auth_token?: string; + auth_token?: string | null; /** Twilio SID */ - sid?: string; + sid?: string | null; } diff --git a/src/management/api/types/SetGuardianPoliciesRequestContent.ts b/src/management/api/types/SetGuardianPoliciesRequestContent.ts index 93481e54ad..782677dfa3 100644 --- a/src/management/api/types/SetGuardianPoliciesRequestContent.ts +++ b/src/management/api/types/SetGuardianPoliciesRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetGuardianPoliciesResponseContent.ts b/src/management/api/types/SetGuardianPoliciesResponseContent.ts index 1cc5cb29b9..3a6011e138 100644 --- a/src/management/api/types/SetGuardianPoliciesResponseContent.ts +++ b/src/management/api/types/SetGuardianPoliciesResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetNetworkAclsResponseContent.ts b/src/management/api/types/SetNetworkAclsResponseContent.ts index 3890d7fb73..6e10ab77fd 100644 --- a/src/management/api/types/SetNetworkAclsResponseContent.ts +++ b/src/management/api/types/SetNetworkAclsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetPartialsRequestContent.ts b/src/management/api/types/SetPartialsRequestContent.ts index befbea3803..a44f04e43c 100644 --- a/src/management/api/types/SetPartialsRequestContent.ts +++ b/src/management/api/types/SetPartialsRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * An object containing template partials for a group of screens. diff --git a/src/management/api/types/SetRulesConfigResponseContent.ts b/src/management/api/types/SetRulesConfigResponseContent.ts index 63f8ebc760..f4de340933 100644 --- a/src/management/api/types/SetRulesConfigResponseContent.ts +++ b/src/management/api/types/SetRulesConfigResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SetRulesConfigResponseContent { /** Key for a rules config variable. */ diff --git a/src/management/api/types/SetSelfServiceProfileCustomTextRequestContent.ts b/src/management/api/types/SetSelfServiceProfileCustomTextRequestContent.ts index 9962e8f812..bf90628105 100644 --- a/src/management/api/types/SetSelfServiceProfileCustomTextRequestContent.ts +++ b/src/management/api/types/SetSelfServiceProfileCustomTextRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The list of text keys and values to customize the self-service SSO page. Values can be plain text or rich HTML content limited to basic styling tags and hyperlinks. diff --git a/src/management/api/types/SetSelfServiceProfileCustomTextResponseContent.ts b/src/management/api/types/SetSelfServiceProfileCustomTextResponseContent.ts index 1eee754c13..d4df6110f9 100644 --- a/src/management/api/types/SetSelfServiceProfileCustomTextResponseContent.ts +++ b/src/management/api/types/SetSelfServiceProfileCustomTextResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The resulting list of custom text keys and values. diff --git a/src/management/api/types/SetUserAuthenticationMethodResponseContent.ts b/src/management/api/types/SetUserAuthenticationMethodResponseContent.ts index dcd937e096..2eb68ece06 100644 --- a/src/management/api/types/SetUserAuthenticationMethodResponseContent.ts +++ b/src/management/api/types/SetUserAuthenticationMethodResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -25,6 +23,8 @@ export interface SetUserAuthenticationMethodResponseContent { key_id?: string; /** Applies to webauthn authenticators only. The public key. */ public_key?: string; + /** Applies to passkeys only. Authenticator Attestation Globally Unique Identifier. */ + aaguid?: string; /** Applies to webauthn authenticators only. The relying party identifier. */ relying_party_identifier?: string; /** Authentication method creation date */ diff --git a/src/management/api/types/SetUserAuthenticationMethods.ts b/src/management/api/types/SetUserAuthenticationMethods.ts index ee230c6c8d..6a3b6da930 100644 --- a/src/management/api/types/SetUserAuthenticationMethods.ts +++ b/src/management/api/types/SetUserAuthenticationMethods.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetUserAuthenticationMethodsRequestContent.ts b/src/management/api/types/SetUserAuthenticationMethodsRequestContent.ts index a7b7bcfd7d..1c84f179ac 100644 --- a/src/management/api/types/SetUserAuthenticationMethodsRequestContent.ts +++ b/src/management/api/types/SetUserAuthenticationMethodsRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SetsCustomTextsByLanguageRequestContent.ts b/src/management/api/types/SetsCustomTextsByLanguageRequestContent.ts index f8ca4ab2ec..bcdb1cb89f 100644 --- a/src/management/api/types/SetsCustomTextsByLanguageRequestContent.ts +++ b/src/management/api/types/SetsCustomTextsByLanguageRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * An object containing custom dictionaries for a group of screens. diff --git a/src/management/api/types/SigningAlgorithmEnum.ts b/src/management/api/types/SigningAlgorithmEnum.ts index 0ce7229bb2..8b85eced99 100644 --- a/src/management/api/types/SigningAlgorithmEnum.ts +++ b/src/management/api/types/SigningAlgorithmEnum.ts @@ -1,14 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Algorithm used to sign JWTs. Can be `HS256` or `RS256`. `PS256` available via addon. - */ -export type SigningAlgorithmEnum = "HS256" | "RS256" | "RS512" | "PS256"; +/** Algorithm used to sign JWTs. Can be `HS256` or `RS256`. `PS256` available via addon. */ export const SigningAlgorithmEnum = { Hs256: "HS256", Rs256: "RS256", Rs512: "RS512", Ps256: "PS256", } as const; +export type SigningAlgorithmEnum = (typeof SigningAlgorithmEnum)[keyof typeof SigningAlgorithmEnum]; diff --git a/src/management/api/types/SigningKeys.ts b/src/management/api/types/SigningKeys.ts index 9d35035f70..20c65e3a11 100644 --- a/src/management/api/types/SigningKeys.ts +++ b/src/management/api/types/SigningKeys.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SigningKeysDate.ts b/src/management/api/types/SigningKeysDate.ts index 9d8d959723..e19fdfa544 100644 --- a/src/management/api/types/SigningKeysDate.ts +++ b/src/management/api/types/SigningKeysDate.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type SigningKeysDate = /** diff --git a/src/management/api/types/SignupSchema.ts b/src/management/api/types/SignupSchema.ts index 5d8ce64c38..79870ec06d 100644 --- a/src/management/api/types/SignupSchema.ts +++ b/src/management/api/types/SignupSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SignupStatusEnum.ts b/src/management/api/types/SignupStatusEnum.ts index 7c69f55193..b108138177 100644 --- a/src/management/api/types/SignupStatusEnum.ts +++ b/src/management/api/types/SignupStatusEnum.ts @@ -1,10 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SignupStatusEnum = "required" | "optional" | "inactive"; export const SignupStatusEnum = { Required: "required", Optional: "optional", Inactive: "inactive", } as const; +export type SignupStatusEnum = (typeof SignupStatusEnum)[keyof typeof SignupStatusEnum]; diff --git a/src/management/api/types/SignupVerification.ts b/src/management/api/types/SignupVerification.ts index 7f9b9d8402..cc401468af 100644 --- a/src/management/api/types/SignupVerification.ts +++ b/src/management/api/types/SignupVerification.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface SignupVerification { active?: boolean; diff --git a/src/management/api/types/SignupVerified.ts b/src/management/api/types/SignupVerified.ts index 74f2a14c1e..1d994cf740 100644 --- a/src/management/api/types/SignupVerified.ts +++ b/src/management/api/types/SignupVerified.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SupportedLocales.ts b/src/management/api/types/SupportedLocales.ts index 5bf958aeec..ec383091d6 100644 --- a/src/management/api/types/SupportedLocales.ts +++ b/src/management/api/types/SupportedLocales.ts @@ -1,89 +1,5 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SupportedLocales = - | "am" - | "ar" - | "ar-EG" - | "ar-SA" - | "az" - | "bg" - | "bn" - | "bs" - | "ca-ES" - | "cnr" - | "cs" - | "cy" - | "da" - | "de" - | "el" - | "en" - | "en-CA" - | "es" - | "es-419" - | "es-AR" - | "es-MX" - | "et" - | "eu-ES" - | "fa" - | "fi" - | "fr" - | "fr-CA" - | "fr-FR" - | "gl-ES" - | "gu" - | "he" - | "hi" - | "hr" - | "hu" - | "hy" - | "id" - | "is" - | "it" - | "ja" - | "ka" - | "kk" - | "kn" - | "ko" - | "lt" - | "lv" - | "mk" - | "ml" - | "mn" - | "mr" - | "ms" - | "my" - | "nb" - | "nl" - | "nn" - | "no" - | "pa" - | "pl" - | "pt" - | "pt-BR" - | "pt-PT" - | "ro" - | "ru" - | "sk" - | "sl" - | "so" - | "sq" - | "sr" - | "sv" - | "sw" - | "ta" - | "te" - | "th" - | "tl" - | "tr" - | "uk" - | "ur" - | "vi" - | "zgh" - | "zh-CN" - | "zh-HK" - | "zh-TW"; export const SupportedLocales = { Am: "am", Ar: "ar", @@ -167,3 +83,4 @@ export const SupportedLocales = { ZhHk: "zh-HK", ZhTw: "zh-TW", } as const; +export type SupportedLocales = (typeof SupportedLocales)[keyof typeof SupportedLocales]; diff --git a/src/management/api/types/SuspiciousIpThrottlingAllowlist.ts b/src/management/api/types/SuspiciousIpThrottlingAllowlist.ts index 7f37bd4a4b..4a0c7789e2 100644 --- a/src/management/api/types/SuspiciousIpThrottlingAllowlist.ts +++ b/src/management/api/types/SuspiciousIpThrottlingAllowlist.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/SuspiciousIpThrottlingAllowlistItem.ts b/src/management/api/types/SuspiciousIpThrottlingAllowlistItem.ts index d98174c0be..7c17d2f62e 100644 --- a/src/management/api/types/SuspiciousIpThrottlingAllowlistItem.ts +++ b/src/management/api/types/SuspiciousIpThrottlingAllowlistItem.ts @@ -1,5 +1,3 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type SuspiciousIpThrottlingAllowlistItem = string; diff --git a/src/management/api/types/SuspiciousIpThrottlingPreLoginStage.ts b/src/management/api/types/SuspiciousIpThrottlingPreLoginStage.ts index 89d063c677..dbc47e468c 100644 --- a/src/management/api/types/SuspiciousIpThrottlingPreLoginStage.ts +++ b/src/management/api/types/SuspiciousIpThrottlingPreLoginStage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Configuration options that apply before every login attempt. diff --git a/src/management/api/types/SuspiciousIpThrottlingPreUserRegistrationStage.ts b/src/management/api/types/SuspiciousIpThrottlingPreUserRegistrationStage.ts index e1c8158fb1..c25c308b93 100644 --- a/src/management/api/types/SuspiciousIpThrottlingPreUserRegistrationStage.ts +++ b/src/management/api/types/SuspiciousIpThrottlingPreUserRegistrationStage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Configuration options that apply before every user registration attempt. diff --git a/src/management/api/types/SuspiciousIpThrottlingShieldsEnum.ts b/src/management/api/types/SuspiciousIpThrottlingShieldsEnum.ts index faaefd4137..be3f3860e2 100644 --- a/src/management/api/types/SuspiciousIpThrottlingShieldsEnum.ts +++ b/src/management/api/types/SuspiciousIpThrottlingShieldsEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type SuspiciousIpThrottlingShieldsEnum = "block" | "admin_notification"; export const SuspiciousIpThrottlingShieldsEnum = { Block: "block", AdminNotification: "admin_notification", } as const; +export type SuspiciousIpThrottlingShieldsEnum = + (typeof SuspiciousIpThrottlingShieldsEnum)[keyof typeof SuspiciousIpThrottlingShieldsEnum]; diff --git a/src/management/api/types/SuspiciousIpThrottlingStage.ts b/src/management/api/types/SuspiciousIpThrottlingStage.ts index ffa3ad2dbd..09498f85bf 100644 --- a/src/management/api/types/SuspiciousIpThrottlingStage.ts +++ b/src/management/api/types/SuspiciousIpThrottlingStage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TenantOidcLogoutSettings.ts b/src/management/api/types/TenantOidcLogoutSettings.ts index c2647b8857..2de2e59c6d 100644 --- a/src/management/api/types/TenantOidcLogoutSettings.ts +++ b/src/management/api/types/TenantOidcLogoutSettings.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Settings related to OIDC RP-initiated Logout diff --git a/src/management/api/types/TenantSettingsDeviceFlow.ts b/src/management/api/types/TenantSettingsDeviceFlow.ts index e522331b2b..b5382b38ba 100644 --- a/src/management/api/types/TenantSettingsDeviceFlow.ts +++ b/src/management/api/types/TenantSettingsDeviceFlow.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TenantSettingsDeviceFlowCharset.ts b/src/management/api/types/TenantSettingsDeviceFlowCharset.ts index 380103518e..826b430c55 100644 --- a/src/management/api/types/TenantSettingsDeviceFlowCharset.ts +++ b/src/management/api/types/TenantSettingsDeviceFlowCharset.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Character set used to generate a User Code. Can be `base20` or `digits`. - */ -export type TenantSettingsDeviceFlowCharset = "base20" | "digits"; +/** Character set used to generate a User Code. Can be `base20` or `digits`. */ export const TenantSettingsDeviceFlowCharset = { Base20: "base20", Digits: "digits", } as const; +export type TenantSettingsDeviceFlowCharset = + (typeof TenantSettingsDeviceFlowCharset)[keyof typeof TenantSettingsDeviceFlowCharset]; diff --git a/src/management/api/types/TenantSettingsErrorPage.ts b/src/management/api/types/TenantSettingsErrorPage.ts index 0f6b719985..280e9cbd45 100644 --- a/src/management/api/types/TenantSettingsErrorPage.ts +++ b/src/management/api/types/TenantSettingsErrorPage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Error page customization. diff --git a/src/management/api/types/TenantSettingsFlags.ts b/src/management/api/types/TenantSettingsFlags.ts index 46f3f426d3..96a92d4320 100644 --- a/src/management/api/types/TenantSettingsFlags.ts +++ b/src/management/api/types/TenantSettingsFlags.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Flags used to change the behavior of this tenant. diff --git a/src/management/api/types/TenantSettingsGuardianPage.ts b/src/management/api/types/TenantSettingsGuardianPage.ts index 87e36a6f01..bdb04bae7c 100644 --- a/src/management/api/types/TenantSettingsGuardianPage.ts +++ b/src/management/api/types/TenantSettingsGuardianPage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Guardian page customization. diff --git a/src/management/api/types/TenantSettingsMtls.ts b/src/management/api/types/TenantSettingsMtls.ts index 4f25ff7603..05dc09d9c5 100644 --- a/src/management/api/types/TenantSettingsMtls.ts +++ b/src/management/api/types/TenantSettingsMtls.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * mTLS configuration. diff --git a/src/management/api/types/TenantSettingsPasswordPage.ts b/src/management/api/types/TenantSettingsPasswordPage.ts index 12f49bfa7c..0be2d61f5c 100644 --- a/src/management/api/types/TenantSettingsPasswordPage.ts +++ b/src/management/api/types/TenantSettingsPasswordPage.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Change Password page customization. diff --git a/src/management/api/types/TenantSettingsSessions.ts b/src/management/api/types/TenantSettingsSessions.ts index cb47ca9ace..5b5f6974cc 100644 --- a/src/management/api/types/TenantSettingsSessions.ts +++ b/src/management/api/types/TenantSettingsSessions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Sessions related settings for tenant diff --git a/src/management/api/types/TestActionPayload.ts b/src/management/api/types/TestActionPayload.ts index 04158e95b5..720501c6d1 100644 --- a/src/management/api/types/TestActionPayload.ts +++ b/src/management/api/types/TestActionPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The payload for the action. diff --git a/src/management/api/types/TestActionResponseContent.ts b/src/management/api/types/TestActionResponseContent.ts index b71f17bff5..64ac9c4274 100644 --- a/src/management/api/types/TestActionResponseContent.ts +++ b/src/management/api/types/TestActionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TestActionResultPayload.ts b/src/management/api/types/TestActionResultPayload.ts index 6e3df9d974..ec3318f05e 100644 --- a/src/management/api/types/TestActionResultPayload.ts +++ b/src/management/api/types/TestActionResultPayload.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The resulting payload after an action was executed. diff --git a/src/management/api/types/TestCustomDomainResponseContent.ts b/src/management/api/types/TestCustomDomainResponseContent.ts index 42a7a436cc..45e8bdc093 100644 --- a/src/management/api/types/TestCustomDomainResponseContent.ts +++ b/src/management/api/types/TestCustomDomainResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TestCustomDomainResponseContent { /** Result of the operation. */ diff --git a/src/management/api/types/TestEventDataContent.ts b/src/management/api/types/TestEventDataContent.ts index d8a8806ce8..5b753edf2c 100644 --- a/src/management/api/types/TestEventDataContent.ts +++ b/src/management/api/types/TestEventDataContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The raw payload of the test event. diff --git a/src/management/api/types/TokenExchangeProfileResponseContent.ts b/src/management/api/types/TokenExchangeProfileResponseContent.ts index b5dea3c566..cc8954b761 100644 --- a/src/management/api/types/TokenExchangeProfileResponseContent.ts +++ b/src/management/api/types/TokenExchangeProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TokenExchangeProfileTypeEnum.ts b/src/management/api/types/TokenExchangeProfileTypeEnum.ts index 30d0390e8c..4cf68e72e6 100644 --- a/src/management/api/types/TokenExchangeProfileTypeEnum.ts +++ b/src/management/api/types/TokenExchangeProfileTypeEnum.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The type of the profile, which controls how the profile will be executed when receiving a token exchange request. diff --git a/src/management/api/types/TokenQuota.ts b/src/management/api/types/TokenQuota.ts index 0311fe566b..a0caa989de 100644 --- a/src/management/api/types/TokenQuota.ts +++ b/src/management/api/types/TokenQuota.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TokenQuotaClientCredentials.ts b/src/management/api/types/TokenQuotaClientCredentials.ts index 04db2b8a73..fb3f43ce80 100644 --- a/src/management/api/types/TokenQuotaClientCredentials.ts +++ b/src/management/api/types/TokenQuotaClientCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * The token quota configuration diff --git a/src/management/api/types/TokenQuotaConfiguration.ts b/src/management/api/types/TokenQuotaConfiguration.ts index a115a81fb3..3b069acdf2 100644 --- a/src/management/api/types/TokenQuotaConfiguration.ts +++ b/src/management/api/types/TokenQuotaConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TwilioProviderConfiguration.ts b/src/management/api/types/TwilioProviderConfiguration.ts index ce0cc3e017..53c7d08642 100644 --- a/src/management/api/types/TwilioProviderConfiguration.ts +++ b/src/management/api/types/TwilioProviderConfiguration.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/TwilioProviderCredentials.ts b/src/management/api/types/TwilioProviderCredentials.ts index 5e5ecdca64..8f0d82e9bb 100644 --- a/src/management/api/types/TwilioProviderCredentials.ts +++ b/src/management/api/types/TwilioProviderCredentials.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface TwilioProviderCredentials { auth_token: string; diff --git a/src/management/api/types/TwilioProviderDeliveryMethodEnum.ts b/src/management/api/types/TwilioProviderDeliveryMethodEnum.ts index 9305a8a29b..9e3225f65d 100644 --- a/src/management/api/types/TwilioProviderDeliveryMethodEnum.ts +++ b/src/management/api/types/TwilioProviderDeliveryMethodEnum.ts @@ -1,9 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type TwilioProviderDeliveryMethodEnum = "text" | "voice"; export const TwilioProviderDeliveryMethodEnum = { Text: "text", Voice: "voice", } as const; +export type TwilioProviderDeliveryMethodEnum = + (typeof TwilioProviderDeliveryMethodEnum)[keyof typeof TwilioProviderDeliveryMethodEnum]; diff --git a/src/management/api/types/UniversalLoginExperienceEnum.ts b/src/management/api/types/UniversalLoginExperienceEnum.ts index 00d3e5cf75..0fd397d342 100644 --- a/src/management/api/types/UniversalLoginExperienceEnum.ts +++ b/src/management/api/types/UniversalLoginExperienceEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Which login experience to use. Can be `new` or `classic`. - */ -export type UniversalLoginExperienceEnum = "new" | "classic"; +/** Which login experience to use. Can be `new` or `classic`. */ export const UniversalLoginExperienceEnum = { New: "new", Classic: "classic", } as const; +export type UniversalLoginExperienceEnum = + (typeof UniversalLoginExperienceEnum)[keyof typeof UniversalLoginExperienceEnum]; diff --git a/src/management/api/types/UpdateActionBindingsResponseContent.ts b/src/management/api/types/UpdateActionBindingsResponseContent.ts index 16645e51a0..ca7982db16 100644 --- a/src/management/api/types/UpdateActionBindingsResponseContent.ts +++ b/src/management/api/types/UpdateActionBindingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateActionResponseContent.ts b/src/management/api/types/UpdateActionResponseContent.ts index b542e5c613..62486c4653 100644 --- a/src/management/api/types/UpdateActionResponseContent.ts +++ b/src/management/api/types/UpdateActionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateAculResponseContent.ts b/src/management/api/types/UpdateAculResponseContent.ts index d62ba26798..bbfedc7299 100644 --- a/src/management/api/types/UpdateAculResponseContent.ts +++ b/src/management/api/types/UpdateAculResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -9,12 +7,12 @@ export interface UpdateAculResponseContent { /** Context values to make available */ context_configuration?: string[]; /** Override Universal Login default head tags */ - default_head_tags_disabled?: boolean; + default_head_tags_disabled?: boolean | null; /** An array of head tags */ head_tags?: Management.AculHeadTag[]; - filters?: Management.AculFilters; + filters?: Management.AculFilters | null; /** Use page template with ACUL */ - use_page_template?: boolean; + use_page_template?: boolean | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/UpdateBrandingColors.ts b/src/management/api/types/UpdateBrandingColors.ts index 795fd0f9c2..d57d63b92f 100644 --- a/src/management/api/types/UpdateBrandingColors.ts +++ b/src/management/api/types/UpdateBrandingColors.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -9,6 +7,6 @@ import * as Management from "../index.js"; */ export interface UpdateBrandingColors { /** Accent color. */ - primary?: string; + primary?: string | null; page_background?: Management.UpdateBrandingPageBackground; } diff --git a/src/management/api/types/UpdateBrandingFont.ts b/src/management/api/types/UpdateBrandingFont.ts index d20d5dfe4d..1cf54e98c8 100644 --- a/src/management/api/types/UpdateBrandingFont.ts +++ b/src/management/api/types/UpdateBrandingFont.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Custom font settings. */ export interface UpdateBrandingFont { /** URL for the custom font. The URL must point to a font file and not a stylesheet. Must use HTTPS. */ - url?: string; + url?: string | null; } diff --git a/src/management/api/types/UpdateBrandingPageBackground.ts b/src/management/api/types/UpdateBrandingPageBackground.ts index df80f644d6..549bcd748d 100644 --- a/src/management/api/types/UpdateBrandingPageBackground.ts +++ b/src/management/api/types/UpdateBrandingPageBackground.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Page Background Color or Gradient. @@ -15,4 +13,4 @@ * } * */ -export type UpdateBrandingPageBackground = string | undefined | Record | undefined; +export type UpdateBrandingPageBackground = (string | null) | undefined | (Record | null) | undefined; diff --git a/src/management/api/types/UpdateBrandingPhoneProviderResponseContent.ts b/src/management/api/types/UpdateBrandingPhoneProviderResponseContent.ts index e364c0e19a..dd9179d0d6 100644 --- a/src/management/api/types/UpdateBrandingPhoneProviderResponseContent.ts +++ b/src/management/api/types/UpdateBrandingPhoneProviderResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateBrandingResponseContent.ts b/src/management/api/types/UpdateBrandingResponseContent.ts index 83822f94b2..7090c221ae 100644 --- a/src/management/api/types/UpdateBrandingResponseContent.ts +++ b/src/management/api/types/UpdateBrandingResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateBrandingThemeResponseContent.ts b/src/management/api/types/UpdateBrandingThemeResponseContent.ts index d9c0c81d7c..2a4432a7fd 100644 --- a/src/management/api/types/UpdateBrandingThemeResponseContent.ts +++ b/src/management/api/types/UpdateBrandingThemeResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateBreachedPasswordDetectionSettingsResponseContent.ts b/src/management/api/types/UpdateBreachedPasswordDetectionSettingsResponseContent.ts index 6d26cfb794..74408d9e87 100644 --- a/src/management/api/types/UpdateBreachedPasswordDetectionSettingsResponseContent.ts +++ b/src/management/api/types/UpdateBreachedPasswordDetectionSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateBruteForceSettingsResponseContent.ts b/src/management/api/types/UpdateBruteForceSettingsResponseContent.ts index 922c2927d2..368a7479ef 100644 --- a/src/management/api/types/UpdateBruteForceSettingsResponseContent.ts +++ b/src/management/api/types/UpdateBruteForceSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateBruteForceSettingsResponseContent { /** Whether or not brute force attack protections are active. */ @@ -25,20 +23,20 @@ export namespace UpdateBruteForceSettingsResponseContent { export type Shields = Shields.Item[]; export namespace Shields { - export type Item = "block" | "user_notification"; export const Item = { Block: "block", UserNotification: "user_notification", } as const; + export type Item = (typeof Item)[keyof typeof Item]; } /** * Account Lockout: Determines whether or not IP address is used when counting failed attempts. * Possible values: count_per_identifier_and_ip, count_per_identifier. */ - export type Mode = "count_per_identifier_and_ip" | "count_per_identifier"; export const Mode = { CountPerIdentifierAndIp: "count_per_identifier_and_ip", CountPerIdentifier: "count_per_identifier", } as const; + export type Mode = (typeof Mode)[keyof typeof Mode]; } diff --git a/src/management/api/types/UpdateClientGrantResponseContent.ts b/src/management/api/types/UpdateClientGrantResponseContent.ts index 000918c702..4d72481570 100644 --- a/src/management/api/types/UpdateClientGrantResponseContent.ts +++ b/src/management/api/types/UpdateClientGrantResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateClientResponseContent.ts b/src/management/api/types/UpdateClientResponseContent.ts index 368f748f2a..3b47744613 100644 --- a/src/management/api/types/UpdateClientResponseContent.ts +++ b/src/management/api/types/UpdateClientResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -36,13 +34,13 @@ export interface UpdateClientResponseContent { allowed_clients?: string[]; /** Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains. */ allowed_logout_urls?: string[]; - session_transfer?: Management.ClientSessionTransferConfiguration; + session_transfer?: Management.ClientSessionTransferConfiguration | null; oidc_logout?: Management.ClientOidcBackchannelLogoutSettings; /** List of grant types supported for this application. Can include `authorization_code`, `implicit`, `refresh_token`, `client_credentials`, `password`, `http://auth0.com/oauth/grant-type/password-realm`, `http://auth0.com/oauth/grant-type/mfa-oob`, `http://auth0.com/oauth/grant-type/mfa-otp`, `http://auth0.com/oauth/grant-type/mfa-recovery-code`, `urn:openid:params:grant-type:ciba`, `urn:ietf:params:oauth:grant-type:device_code`, and `urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token`. */ grant_types?: string[]; jwt_configuration?: Management.ClientJwtConfiguration; signing_keys?: Management.ClientSigningKeys; - encryption_key?: Management.ClientEncryptionKey; + encryption_key?: Management.ClientEncryptionKey | null; /** Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false). */ sso?: boolean; /** Whether Single Sign On is disabled (true) or enabled (true). Defaults to true. */ @@ -61,29 +59,37 @@ export interface UpdateClientResponseContent { form_template?: string; addons?: Management.ClientAddons; token_endpoint_auth_method?: Management.ClientTokenEndpointAuthMethodEnum; + /** If true, trust that the IP specified in the `auth0-forwarded-for` header is the end-user's IP for brute-force-protection on token endpoint. */ + is_token_endpoint_ip_header_trusted?: boolean; client_metadata?: Management.ClientMetadata; mobile?: Management.ClientMobile; /** Initiate login uri, must be https */ initiate_login_uri?: string; - refresh_token?: Management.ClientRefreshTokenConfiguration; - default_organization?: Management.ClientDefaultOrganization; + refresh_token?: Management.ClientRefreshTokenConfiguration | null; + default_organization?: Management.ClientDefaultOrganization | null; organization_usage?: Management.ClientOrganizationUsageEnum; organization_require_behavior?: Management.ClientOrganizationRequireBehaviorEnum; /** Defines the available methods for organization discovery during the `pre_login_prompt`. Users can discover their organization either by `email`, `organization_name` or both. */ organization_discovery_methods?: Management.ClientOrganizationDiscoveryEnum[]; - client_authentication_methods?: Management.ClientAuthenticationMethod; + client_authentication_methods?: Management.ClientAuthenticationMethod | null; /** Makes the use of Pushed Authorization Requests mandatory for this client */ require_pushed_authorization_requests?: boolean; /** Makes the use of Proof-of-Possession mandatory for this client */ require_proof_of_possession?: boolean; signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId; - compliance_level?: Management.ClientComplianceLevelEnum | undefined; + compliance_level?: Management.ClientComplianceLevelEnum | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean; /** Specifies how long, in seconds, a Pushed Authorization Request URI remains valid */ - par_request_expiry?: number; + par_request_expiry?: number | null; token_quota?: Management.TokenQuota; - my_organization_configuration?: Management.ClientMyOrganizationConfiguration; /** The identifier of the resource server that this client is linked to. */ resource_server_identifier?: string; + async_approval_notification_channels?: Management.ClientAsyncApprovalNotificationsChannelsApiPostConfiguration; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/UpdateConnectionOptions.ts b/src/management/api/types/UpdateConnectionOptions.ts index 00d63ef402..484be4a89c 100644 --- a/src/management/api/types/UpdateConnectionOptions.ts +++ b/src/management/api/types/UpdateConnectionOptions.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -8,25 +6,26 @@ import * as Management from "../index.js"; * The connection's options (depend on the connection strategy). To update these options, the `update:connections_options` scope must be present. To verify your changes, also include the `read:connections_options` scope. If this scope is not specified, you will not be able to review the updated object. */ export interface UpdateConnectionOptions { - validation?: Management.ConnectionValidationOptions; + validation?: Management.ConnectionValidationOptions | null; /** An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist) */ non_persistent_attrs?: string[]; /** Order of precedence for attribute types. If the property is not specified, the default precedence of attributes will be used. */ precedence?: Management.ConnectionIdentifierPrecedenceEnum[]; attributes?: Management.ConnectionAttributes; + /** Set to true to inject context into custom DB scripts (warning: cannot be disabled once enabled) */ enable_script_context?: boolean; /** Set to true to use a legacy user store */ enabledDatabaseCustomization?: boolean; /** Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store */ import_mode?: boolean; customScripts?: Management.ConnectionCustomScripts; - authentication_methods?: Management.ConnectionAuthenticationMethods; - passkey_options?: Management.ConnectionPasskeyOptions; - passwordPolicy?: Management.ConnectionPasswordPolicyEnum | undefined; - password_complexity_options?: Management.ConnectionPasswordComplexityOptions; - password_history?: Management.ConnectionPasswordHistoryOptions; - password_no_personal_info?: Management.ConnectionPasswordNoPersonalInfoOptions; - password_dictionary?: Management.ConnectionPasswordDictionaryOptions; + authentication_methods?: Management.ConnectionAuthenticationMethods | null; + passkey_options?: Management.ConnectionPasskeyOptions | null; + passwordPolicy?: Management.ConnectionPasswordPolicyEnum | null; + password_complexity_options?: Management.ConnectionPasswordComplexityOptions | null; + password_history?: Management.ConnectionPasswordHistoryOptions | null; + password_no_personal_info?: Management.ConnectionPasswordNoPersonalInfoOptions | null; + password_dictionary?: Management.ConnectionPasswordDictionaryOptions | null; api_enable_users?: boolean; basic_profile?: boolean; ext_admin?: boolean; @@ -36,10 +35,10 @@ export interface UpdateConnectionOptions { ext_assigned_plans?: boolean; ext_profile?: boolean; disable_self_service_change_password?: boolean; - upstream_params?: Management.ConnectionUpstreamParams | undefined; + upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; - gateway_authentication?: Management.ConnectionGatewayAuthentication; - federated_connections_access_tokens?: Management.ConnectionFederatedConnectionsAccessTokens; + gateway_authentication?: Management.ConnectionGatewayAuthentication | null; + federated_connections_access_tokens?: Management.ConnectionFederatedConnectionsAccessTokens | null; /** Accepts any additional properties */ [key: string]: any; } diff --git a/src/management/api/types/UpdateConnectionResponseContent.ts b/src/management/api/types/UpdateConnectionResponseContent.ts index 4bbe0a7c54..8c983f7a9b 100644 --- a/src/management/api/types/UpdateConnectionResponseContent.ts +++ b/src/management/api/types/UpdateConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -23,4 +21,6 @@ export interface UpdateConnectionResponseContent { /** Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. */ show_as_button?: boolean; metadata?: Management.ConnectionsMetadata; + authentication?: Management.ConnectionAuthenticationPurpose; + connected_accounts?: Management.ConnectionConnectedAccountsPurpose; } diff --git a/src/management/api/types/UpdateCustomDomainResponseContent.ts b/src/management/api/types/UpdateCustomDomainResponseContent.ts index eb60474638..bfddebad5e 100644 --- a/src/management/api/types/UpdateCustomDomainResponseContent.ts +++ b/src/management/api/types/UpdateCustomDomainResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -15,7 +13,8 @@ export interface UpdateCustomDomainResponseContent { type: Management.CustomDomainTypeEnum; verification: Management.DomainVerification; /** The HTTP header to fetch the client's IP address */ - custom_client_ip_header?: string; + custom_client_ip_header?: string | null; /** The TLS version policy */ tls_policy?: string; + certificate?: Management.DomainCertificate; } diff --git a/src/management/api/types/UpdateEmailProviderResponseContent.ts b/src/management/api/types/UpdateEmailProviderResponseContent.ts index e1890eb151..d90af0ab9f 100644 --- a/src/management/api/types/UpdateEmailProviderResponseContent.ts +++ b/src/management/api/types/UpdateEmailProviderResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateEmailTemplateResponseContent.ts b/src/management/api/types/UpdateEmailTemplateResponseContent.ts index ab5e44a0e5..6342326666 100644 --- a/src/management/api/types/UpdateEmailTemplateResponseContent.ts +++ b/src/management/api/types/UpdateEmailTemplateResponseContent.ts @@ -1,25 +1,23 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface UpdateEmailTemplateResponseContent { template?: Management.EmailTemplateNameEnum; /** Body of the email template. */ - body?: string; + body?: string | null; /** Senders `from` email address. */ - from?: string; + from?: string | null; /** URL to redirect the user to after a successful action. */ - resultUrl?: string; + resultUrl?: string | null; /** Subject line of the email. */ - subject?: string; + subject?: string | null; /** Syntax of the template body. */ - syntax?: string; + syntax?: string | null; /** Lifetime in seconds that the link within the email will be valid for. */ - urlLifetimeInSeconds?: number; + urlLifetimeInSeconds?: number | null; /** Whether the `reset_email` and `verify_email` templates should include the user's email address as the `email` parameter in the returnUrl (true) or whether no email address should be included in the redirect (false). Defaults to true. */ includeEmailInRedirect?: boolean; /** Whether the template is enabled (true) or disabled (false). */ - enabled?: boolean; + enabled?: boolean | null; } diff --git a/src/management/api/types/UpdateEnabledClientConnectionsRequestContent.ts b/src/management/api/types/UpdateEnabledClientConnectionsRequestContent.ts index be0f0ab6af..0c4f230c0d 100644 --- a/src/management/api/types/UpdateEnabledClientConnectionsRequestContent.ts +++ b/src/management/api/types/UpdateEnabledClientConnectionsRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateEnabledClientConnectionsRequestContentItem.ts b/src/management/api/types/UpdateEnabledClientConnectionsRequestContentItem.ts index 75378100a6..45cfd8ab29 100644 --- a/src/management/api/types/UpdateEnabledClientConnectionsRequestContentItem.ts +++ b/src/management/api/types/UpdateEnabledClientConnectionsRequestContentItem.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateEnabledClientConnectionsRequestContentItem { /** The client_id of the client to be the subject to change status */ diff --git a/src/management/api/types/UpdateEventStreamResponseContent.ts b/src/management/api/types/UpdateEventStreamResponseContent.ts index 03f0d94001..9ebf858343 100644 --- a/src/management/api/types/UpdateEventStreamResponseContent.ts +++ b/src/management/api/types/UpdateEventStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateFlowResponseContent.ts b/src/management/api/types/UpdateFlowResponseContent.ts index 4f75fcb8fd..b043c96b8b 100644 --- a/src/management/api/types/UpdateFlowResponseContent.ts +++ b/src/management/api/types/UpdateFlowResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateFlowsVaultConnectionResponseContent.ts b/src/management/api/types/UpdateFlowsVaultConnectionResponseContent.ts index b11643a9b2..e5dce0eac6 100644 --- a/src/management/api/types/UpdateFlowsVaultConnectionResponseContent.ts +++ b/src/management/api/types/UpdateFlowsVaultConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateFlowsVaultConnectionResponseContent { /** Flows Vault Connection identifier. */ diff --git a/src/management/api/types/UpdateFlowsVaultConnectionSetup.ts b/src/management/api/types/UpdateFlowsVaultConnectionSetup.ts index f86b27fa86..d0ec4a50d1 100644 --- a/src/management/api/types/UpdateFlowsVaultConnectionSetup.ts +++ b/src/management/api/types/UpdateFlowsVaultConnectionSetup.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateFormResponseContent.ts b/src/management/api/types/UpdateFormResponseContent.ts index 8556097a94..a1d7f4b5fa 100644 --- a/src/management/api/types/UpdateFormResponseContent.ts +++ b/src/management/api/types/UpdateFormResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateGuardianFactorDuoSettingsResponseContent.ts b/src/management/api/types/UpdateGuardianFactorDuoSettingsResponseContent.ts index 7d1e4cb40b..0c191a5d27 100644 --- a/src/management/api/types/UpdateGuardianFactorDuoSettingsResponseContent.ts +++ b/src/management/api/types/UpdateGuardianFactorDuoSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGuardianFactorDuoSettingsResponseContent { ikey?: string; diff --git a/src/management/api/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.ts b/src/management/api/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.ts index 4a6cdbb3f8..67f7eadb84 100644 --- a/src/management/api/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.ts +++ b/src/management/api/types/UpdateGuardianFactorsProviderPushNotificationSnsResponseContent.ts @@ -1,11 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateGuardianFactorsProviderPushNotificationSnsResponseContent { - aws_access_key_id?: string; - aws_secret_access_key?: string; - aws_region?: string; - sns_apns_platform_application_arn?: string; - sns_gcm_platform_application_arn?: string; + aws_access_key_id?: string | null; + aws_secret_access_key?: string | null; + aws_region?: string | null; + sns_apns_platform_application_arn?: string | null; + sns_gcm_platform_application_arn?: string | null; } diff --git a/src/management/api/types/UpdateHookResponseContent.ts b/src/management/api/types/UpdateHookResponseContent.ts index b3471b59ee..8e08e57ec9 100644 --- a/src/management/api/types/UpdateHookResponseContent.ts +++ b/src/management/api/types/UpdateHookResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateHookSecretRequestContent.ts b/src/management/api/types/UpdateHookSecretRequestContent.ts index de6da85d45..fcf8e23d26 100644 --- a/src/management/api/types/UpdateHookSecretRequestContent.ts +++ b/src/management/api/types/UpdateHookSecretRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Hashmap of key-value pairs where the value must be a string. diff --git a/src/management/api/types/UpdateLogStreamResponseContent.ts b/src/management/api/types/UpdateLogStreamResponseContent.ts index 74ab7e2e92..7e9c7373a1 100644 --- a/src/management/api/types/UpdateLogStreamResponseContent.ts +++ b/src/management/api/types/UpdateLogStreamResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateNetworkAclResponseContent.ts b/src/management/api/types/UpdateNetworkAclResponseContent.ts index 6d44c88f19..fffda37516 100644 --- a/src/management/api/types/UpdateNetworkAclResponseContent.ts +++ b/src/management/api/types/UpdateNetworkAclResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateOrganizationConnectionResponseContent.ts b/src/management/api/types/UpdateOrganizationConnectionResponseContent.ts index ce1f4d9709..5aba9e9372 100644 --- a/src/management/api/types/UpdateOrganizationConnectionResponseContent.ts +++ b/src/management/api/types/UpdateOrganizationConnectionResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateOrganizationResponseContent.ts b/src/management/api/types/UpdateOrganizationResponseContent.ts index 9ba4642fc1..f65d936ada 100644 --- a/src/management/api/types/UpdateOrganizationResponseContent.ts +++ b/src/management/api/types/UpdateOrganizationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdatePhoneTemplateResponseContent.ts b/src/management/api/types/UpdatePhoneTemplateResponseContent.ts index ff5feac132..2fe548fa25 100644 --- a/src/management/api/types/UpdatePhoneTemplateResponseContent.ts +++ b/src/management/api/types/UpdatePhoneTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateResourceServerResponseContent.ts b/src/management/api/types/UpdateResourceServerResponseContent.ts index eb36729ee9..14828206e2 100644 --- a/src/management/api/types/UpdateResourceServerResponseContent.ts +++ b/src/management/api/types/UpdateResourceServerResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -29,10 +27,10 @@ export interface UpdateResourceServerResponseContent { /** Whether authorization polices are enforced (true) or unenforced (false). */ enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; - token_encryption?: Management.ResourceServerTokenEncryption; - consent_policy?: Management.ResourceServerConsentPolicyEnum | undefined; + token_encryption?: Management.ResourceServerTokenEncryption | null; + consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; authorization_details?: unknown[]; - proof_of_possession?: Management.ResourceServerProofOfPossession; + proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; /** The client ID of the client that this resource server is linked to */ client_id?: string; diff --git a/src/management/api/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.ts b/src/management/api/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.ts index 7e51a54dca..89ed9d0811 100644 --- a/src/management/api/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.ts +++ b/src/management/api/types/UpdateRiskAssessmentsSettingsNewDeviceResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateRiskAssessmentsSettingsNewDeviceResponseContent { /** Length of time to remember devices for, in days. */ diff --git a/src/management/api/types/UpdateRiskAssessmentsSettingsResponseContent.ts b/src/management/api/types/UpdateRiskAssessmentsSettingsResponseContent.ts index 2a3ecf271a..e53f50853e 100644 --- a/src/management/api/types/UpdateRiskAssessmentsSettingsResponseContent.ts +++ b/src/management/api/types/UpdateRiskAssessmentsSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateRiskAssessmentsSettingsResponseContent { /** Whether or not risk assessment is enabled. */ diff --git a/src/management/api/types/UpdateRoleResponseContent.ts b/src/management/api/types/UpdateRoleResponseContent.ts index ae7d7fb554..ae52b37d73 100644 --- a/src/management/api/types/UpdateRoleResponseContent.ts +++ b/src/management/api/types/UpdateRoleResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateRoleResponseContent { /** ID for this role. */ diff --git a/src/management/api/types/UpdateRuleResponseContent.ts b/src/management/api/types/UpdateRuleResponseContent.ts index f8f2dc99c4..4f2d93486c 100644 --- a/src/management/api/types/UpdateRuleResponseContent.ts +++ b/src/management/api/types/UpdateRuleResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UpdateRuleResponseContent { /** Name of this rule. */ diff --git a/src/management/api/types/UpdateScimConfigurationResponseContent.ts b/src/management/api/types/UpdateScimConfigurationResponseContent.ts index 4f47385e63..a2a8375629 100644 --- a/src/management/api/types/UpdateScimConfigurationResponseContent.ts +++ b/src/management/api/types/UpdateScimConfigurationResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateSelfServiceProfileResponseContent.ts b/src/management/api/types/UpdateSelfServiceProfileResponseContent.ts index bfc102d908..3c50d6e457 100644 --- a/src/management/api/types/UpdateSelfServiceProfileResponseContent.ts +++ b/src/management/api/types/UpdateSelfServiceProfileResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -20,4 +18,6 @@ export interface UpdateSelfServiceProfileResponseContent { branding?: Management.SelfServiceProfileBrandingProperties; /** List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`] */ allowed_strategies?: Management.SelfServiceProfileAllowedStrategyEnum[]; + /** ID of the user-attribute-profile to associate with this self-service profile. */ + user_attribute_profile_id?: string; } diff --git a/src/management/api/types/UpdateSessionResponseContent.ts b/src/management/api/types/UpdateSessionResponseContent.ts new file mode 100644 index 0000000000..244973a8fe --- /dev/null +++ b/src/management/api/types/UpdateSessionResponseContent.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UpdateSessionResponseContent { + /** The ID of the session */ + id?: string; + /** ID of the user which can be used when interacting with other APIs. */ + user_id?: string; + created_at?: Management.SessionDate; + updated_at?: Management.SessionDate; + authenticated_at?: Management.SessionDate; + idle_expires_at?: Management.SessionDate; + expires_at?: Management.SessionDate; + last_interacted_at?: Management.SessionDate; + device?: Management.SessionDeviceMetadata; + /** List of client details for the session */ + clients?: Management.SessionClientMetadata[]; + authentication?: Management.SessionAuthenticationSignals; + cookie?: Management.SessionCookieMetadata; + session_metadata?: (Management.SessionMetadata | undefined) | null; + /** Accepts any additional properties */ + [key: string]: any; +} diff --git a/src/management/api/types/UpdateSettingsResponseContent.ts b/src/management/api/types/UpdateSettingsResponseContent.ts index cdaaa5b9a2..a70bbdc066 100644 --- a/src/management/api/types/UpdateSettingsResponseContent.ts +++ b/src/management/api/types/UpdateSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.ts b/src/management/api/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.ts index 11a7173e3e..a07e6c79de 100644 --- a/src/management/api/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.ts +++ b/src/management/api/types/UpdateSuspiciousIpThrottlingSettingsResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateTenantSettingsResponseContent.ts b/src/management/api/types/UpdateTenantSettingsResponseContent.ts index b76807648c..f02256a276 100644 --- a/src/management/api/types/UpdateTenantSettingsResponseContent.ts +++ b/src/management/api/types/UpdateTenantSettingsResponseContent.ts @@ -1,19 +1,17 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; export interface UpdateTenantSettingsResponseContent { - change_password?: Management.TenantSettingsPasswordPage; - guardian_mfa_page?: Management.TenantSettingsGuardianPage; + change_password?: Management.TenantSettingsPasswordPage | null; + guardian_mfa_page?: Management.TenantSettingsGuardianPage | null; /** Default audience for API authorization. */ default_audience?: string; /** Name of connection used for password grants at the `/token`endpoint. The following connection types are supported: LDAP, AD, Database Connections, Passwordless, Windows Azure Active Directory, ADFS. */ default_directory?: string; - error_page?: Management.TenantSettingsErrorPage; - device_flow?: Management.TenantSettingsDeviceFlow; - default_token_quota?: Management.DefaultTokenQuota; + error_page?: Management.TenantSettingsErrorPage | null; + device_flow?: Management.TenantSettingsDeviceFlow | null; + default_token_quota?: Management.DefaultTokenQuota | null; flags?: Management.TenantSettingsFlags; /** Friendly name for this tenant. */ friendly_name?: string; @@ -43,8 +41,8 @@ export interface UpdateTenantSettingsResponseContent { default_redirection_uri?: string; /** Supported locales for the user interface. */ enabled_locales?: Management.SupportedLocales[]; - session_cookie?: Management.SessionCookieSchema; - sessions?: Management.TenantSettingsSessions; + session_cookie?: Management.SessionCookieSchema | null; + sessions?: Management.TenantSettingsSessions | null; oidc_logout?: Management.TenantOidcLogoutSettings; /** Whether to accept an organization name instead of an ID on auth endpoints */ allow_organization_name_in_authentication_api?: boolean; @@ -52,9 +50,15 @@ export interface UpdateTenantSettingsResponseContent { customize_mfa_in_postlogin_action?: boolean; /** Supported ACR values */ acr_values_supported?: string[]; - mtls?: Management.TenantSettingsMtls; + mtls?: Management.TenantSettingsMtls | null; /** Enables the use of Pushed Authorization Requests */ pushed_authorization_requests_supported?: boolean; /** Supports iss parameter in authorization responses */ - authorization_response_iss_parameter_supported?: boolean; + authorization_response_iss_parameter_supported?: boolean | null; + /** + * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`). + * If set to true, a confirmation prompt will not be shown. We recommend that this is set to false for improved protection from malicious apps. + * See https://auth0.com/docs/secure/security-guidance/measures-against-app-impersonation for more information. + */ + skip_non_verifiable_callback_uri_confirmation_prompt?: boolean | null; } diff --git a/src/management/api/types/UpdateTokenQuota.ts b/src/management/api/types/UpdateTokenQuota.ts index b2d39800ab..a7c57d9568 100644 --- a/src/management/api/types/UpdateTokenQuota.ts +++ b/src/management/api/types/UpdateTokenQuota.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateUniversalLoginTemplateRequestContent.ts b/src/management/api/types/UpdateUniversalLoginTemplateRequestContent.ts index cec9642c46..f6b75146cf 100644 --- a/src/management/api/types/UpdateUniversalLoginTemplateRequestContent.ts +++ b/src/management/api/types/UpdateUniversalLoginTemplateRequestContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type UpdateUniversalLoginTemplateRequestContent = | string diff --git a/src/management/api/types/UpdateUserAttributeProfileResponseContent.ts b/src/management/api/types/UpdateUserAttributeProfileResponseContent.ts new file mode 100644 index 0000000000..89c907af58 --- /dev/null +++ b/src/management/api/types/UpdateUserAttributeProfileResponseContent.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UpdateUserAttributeProfileResponseContent { + id?: Management.UserAttributeProfileId; + name?: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfileUserId; + user_attributes?: Management.UserAttributeProfileUserAttributes; +} diff --git a/src/management/api/types/UpdateUserAuthenticationMethodResponseContent.ts b/src/management/api/types/UpdateUserAuthenticationMethodResponseContent.ts index 91f9c21801..a75fd0fe71 100644 --- a/src/management/api/types/UpdateUserAuthenticationMethodResponseContent.ts +++ b/src/management/api/types/UpdateUserAuthenticationMethodResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -25,6 +23,8 @@ export interface UpdateUserAuthenticationMethodResponseContent { key_id?: string; /** Applies to webauthn authentication methods only. The public key. */ public_key?: string; + /** Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier. */ + aaguid?: string; /** Applies to webauthn authentication methods only. The relying party identifier. */ relying_party_identifier?: string; /** Authentication method creation date */ diff --git a/src/management/api/types/UpdateUserResponseContent.ts b/src/management/api/types/UpdateUserResponseContent.ts index 2db95bdc8f..bca4aa5b0c 100644 --- a/src/management/api/types/UpdateUserResponseContent.ts +++ b/src/management/api/types/UpdateUserResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UpdateVerifiableCredentialTemplateResponseContent.ts b/src/management/api/types/UpdateVerifiableCredentialTemplateResponseContent.ts index 7c5dbbba34..290f1e9c59 100644 --- a/src/management/api/types/UpdateVerifiableCredentialTemplateResponseContent.ts +++ b/src/management/api/types/UpdateVerifiableCredentialTemplateResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UserAppMetadataSchema.ts b/src/management/api/types/UserAppMetadataSchema.ts index 5eba1b1f07..5e2c60a772 100644 --- a/src/management/api/types/UserAppMetadataSchema.ts +++ b/src/management/api/types/UserAppMetadataSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * User metadata to which this user has read-only access. diff --git a/src/management/api/types/UserAttributeProfile.ts b/src/management/api/types/UserAttributeProfile.ts new file mode 100644 index 0000000000..7bbb62683f --- /dev/null +++ b/src/management/api/types/UserAttributeProfile.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UserAttributeProfile { + id?: Management.UserAttributeProfileId; + name?: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfileUserId; + user_attributes?: Management.UserAttributeProfileUserAttributes; +} diff --git a/src/management/api/types/UserAttributeProfileId.ts b/src/management/api/types/UserAttributeProfileId.ts new file mode 100644 index 0000000000..f8b12fe34a --- /dev/null +++ b/src/management/api/types/UserAttributeProfileId.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * User Attribute Profile identifier. + */ +export type UserAttributeProfileId = string; diff --git a/src/management/api/types/UserAttributeProfileName.ts b/src/management/api/types/UserAttributeProfileName.ts new file mode 100644 index 0000000000..224ae16945 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileName.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The name of the user attribute profile. + */ +export type UserAttributeProfileName = string; diff --git a/src/management/api/types/UserAttributeProfileOidcMapping.ts b/src/management/api/types/UserAttributeProfileOidcMapping.ts new file mode 100644 index 0000000000..4a6fb7aa84 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileOidcMapping.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * OIDC mapping for this attribute + */ +export interface UserAttributeProfileOidcMapping { + /** OIDC mapping field */ + mapping: string; + /** Display name for the OIDC mapping */ + display_name?: string; +} diff --git a/src/management/api/types/UserAttributeProfilePatchUserId.ts b/src/management/api/types/UserAttributeProfilePatchUserId.ts new file mode 100644 index 0000000000..498c7ef91c --- /dev/null +++ b/src/management/api/types/UserAttributeProfilePatchUserId.ts @@ -0,0 +1,5 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export type UserAttributeProfilePatchUserId = (Management.UserAttributeProfileUserId | null) | undefined; diff --git a/src/management/api/types/UserAttributeProfileSamlMapping.ts b/src/management/api/types/UserAttributeProfileSamlMapping.ts new file mode 100644 index 0000000000..444e3629e2 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileSamlMapping.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * SAML mapping override for this strategy + */ +export type UserAttributeProfileSamlMapping = string[]; diff --git a/src/management/api/types/UserAttributeProfileStrategyOverrides.ts b/src/management/api/types/UserAttributeProfileStrategyOverrides.ts new file mode 100644 index 0000000000..5cc23a3a1e --- /dev/null +++ b/src/management/api/types/UserAttributeProfileStrategyOverrides.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Strategy-specific overrides for this attribute + */ +export interface UserAttributeProfileStrategyOverrides { + pingfederate?: Management.UserAttributeProfileStrategyOverridesMapping; + ad?: Management.UserAttributeProfileStrategyOverridesMapping; + adfs?: Management.UserAttributeProfileStrategyOverridesMapping; + waad?: Management.UserAttributeProfileStrategyOverridesMapping; + "google-apps"?: Management.UserAttributeProfileStrategyOverridesMapping; + okta?: Management.UserAttributeProfileStrategyOverridesMapping; + oidc?: Management.UserAttributeProfileStrategyOverridesMapping; + samlp?: Management.UserAttributeProfileStrategyOverridesMapping; +} diff --git a/src/management/api/types/UserAttributeProfileStrategyOverridesMapping.ts b/src/management/api/types/UserAttributeProfileStrategyOverridesMapping.ts new file mode 100644 index 0000000000..accb187a5f --- /dev/null +++ b/src/management/api/types/UserAttributeProfileStrategyOverridesMapping.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UserAttributeProfileStrategyOverridesMapping { + oidc_mapping?: Management.UserAttributeProfileOidcMapping; + saml_mapping?: Management.UserAttributeProfileSamlMapping; + /** SCIM mapping override for this strategy */ + scim_mapping?: string; +} diff --git a/src/management/api/types/UserAttributeProfileStrategyOverridesUserId.ts b/src/management/api/types/UserAttributeProfileStrategyOverridesUserId.ts new file mode 100644 index 0000000000..67ceca4cd1 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileStrategyOverridesUserId.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * Strategy-specific overrides for user ID + */ +export interface UserAttributeProfileStrategyOverridesUserId { + pingfederate?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + ad?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + adfs?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + waad?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + "google-apps"?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + okta?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + oidc?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; + samlp?: Management.UserAttributeProfileStrategyOverridesUserIdMapping; +} diff --git a/src/management/api/types/UserAttributeProfileStrategyOverridesUserIdMapping.ts b/src/management/api/types/UserAttributeProfileStrategyOverridesUserIdMapping.ts new file mode 100644 index 0000000000..5645d1ba89 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileStrategyOverridesUserIdMapping.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UserAttributeProfileStrategyOverridesUserIdMapping { + oidc_mapping?: Management.UserAttributeProfileUserIdOidcStrategyOverrideMapping; + saml_mapping?: Management.UserAttributeProfileSamlMapping; + /** SCIM mapping override for this strategy */ + scim_mapping?: string; +} diff --git a/src/management/api/types/UserAttributeProfileTemplate.ts b/src/management/api/types/UserAttributeProfileTemplate.ts new file mode 100644 index 0000000000..17e4bbec8b --- /dev/null +++ b/src/management/api/types/UserAttributeProfileTemplate.ts @@ -0,0 +1,12 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * The structure of the template, which can be used as the payload for creating or updating a User Attribute Profile. + */ +export interface UserAttributeProfileTemplate { + name?: Management.UserAttributeProfileName; + user_id?: Management.UserAttributeProfileUserId; + user_attributes?: Management.UserAttributeProfileUserAttributes; +} diff --git a/src/management/api/types/UserAttributeProfileTemplateItem.ts b/src/management/api/types/UserAttributeProfileTemplateItem.ts new file mode 100644 index 0000000000..f1715f6c77 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileTemplateItem.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UserAttributeProfileTemplateItem { + /** The id of the template. */ + id?: string; + /** The user-friendly name of the template displayed in the UI. */ + display_name?: string; + template?: Management.UserAttributeProfileTemplate; +} diff --git a/src/management/api/types/UserAttributeProfileUserAttributeAdditionalProperties.ts b/src/management/api/types/UserAttributeProfileUserAttributeAdditionalProperties.ts new file mode 100644 index 0000000000..6e9b8b9cc1 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileUserAttributeAdditionalProperties.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UserAttributeProfileUserAttributeAdditionalProperties { + /** Description of this attribute */ + description: string; + /** Display label for this attribute */ + label: string; + /** Whether this attribute is required in the profile */ + profile_required: boolean; + /** Auth0 mapping for this attribute */ + auth0_mapping: string; + oidc_mapping?: Management.UserAttributeProfileOidcMapping; + saml_mapping?: Management.UserAttributeProfileSamlMapping; + /** SCIM mapping for this attribute */ + scim_mapping?: string; + strategy_overrides?: Management.UserAttributeProfileStrategyOverrides; +} diff --git a/src/management/api/types/UserAttributeProfileUserAttributes.ts b/src/management/api/types/UserAttributeProfileUserAttributes.ts new file mode 100644 index 0000000000..35cc8f2379 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileUserAttributes.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * User attributes configuration map. Keys are attribute names, values are the mapping configuration for each attribute. + */ +export type UserAttributeProfileUserAttributes = Record< + string, + Management.UserAttributeProfileUserAttributeAdditionalProperties +>; diff --git a/src/management/api/types/UserAttributeProfileUserId.ts b/src/management/api/types/UserAttributeProfileUserId.ts new file mode 100644 index 0000000000..1fd8285f1a --- /dev/null +++ b/src/management/api/types/UserAttributeProfileUserId.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +/** + * User ID mapping configuration + */ +export interface UserAttributeProfileUserId { + oidc_mapping?: Management.UserAttributeProfileUserIdOidcMappingEnum; + saml_mapping?: Management.UserAttributeProfileUserIdSamlMapping; + /** SCIM mapping for user ID */ + scim_mapping?: string; + strategy_overrides?: Management.UserAttributeProfileStrategyOverridesUserId; +} diff --git a/src/management/api/types/UserAttributeProfileUserIdOidcMappingEnum.ts b/src/management/api/types/UserAttributeProfileUserIdOidcMappingEnum.ts new file mode 100644 index 0000000000..70cf1a9166 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileUserIdOidcMappingEnum.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * OIDC mapping for user ID + */ +export type UserAttributeProfileUserIdOidcMappingEnum = "sub"; diff --git a/src/management/api/types/UserAttributeProfileUserIdOidcStrategyOverrideMapping.ts b/src/management/api/types/UserAttributeProfileUserIdOidcStrategyOverrideMapping.ts new file mode 100644 index 0000000000..bab84b67da --- /dev/null +++ b/src/management/api/types/UserAttributeProfileUserIdOidcStrategyOverrideMapping.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** OIDC mapping override for this strategy */ +export const UserAttributeProfileUserIdOidcStrategyOverrideMapping = { + Sub: "sub", + Oid: "oid", + Email: "email", +} as const; +export type UserAttributeProfileUserIdOidcStrategyOverrideMapping = + (typeof UserAttributeProfileUserIdOidcStrategyOverrideMapping)[keyof typeof UserAttributeProfileUserIdOidcStrategyOverrideMapping]; diff --git a/src/management/api/types/UserAttributeProfileUserIdSamlMapping.ts b/src/management/api/types/UserAttributeProfileUserIdSamlMapping.ts new file mode 100644 index 0000000000..c23612a6d2 --- /dev/null +++ b/src/management/api/types/UserAttributeProfileUserIdSamlMapping.ts @@ -0,0 +1,6 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * SAML mapping for user ID + */ +export type UserAttributeProfileUserIdSamlMapping = string[]; diff --git a/src/management/api/types/UserAuthenticationMethod.ts b/src/management/api/types/UserAuthenticationMethod.ts index be9c31afe1..1a23d0f63b 100644 --- a/src/management/api/types/UserAuthenticationMethod.ts +++ b/src/management/api/types/UserAuthenticationMethod.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -38,4 +36,8 @@ export interface UserAuthenticationMethod { identity_user_id?: string; /** Applies to passkeys only. The user-agent of the browser used to create the passkey. */ user_agent?: string; + /** Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier. */ + aaguid?: string; + /** Applies to webauthn/passkey authentication methods only. The credential's relying party identifier. */ + relying_party_identifier?: string; } diff --git a/src/management/api/types/UserAuthenticationMethodProperties.ts b/src/management/api/types/UserAuthenticationMethodProperties.ts index 8669932b40..a2a51d75ea 100644 --- a/src/management/api/types/UserAuthenticationMethodProperties.ts +++ b/src/management/api/types/UserAuthenticationMethodProperties.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UserAuthenticationMethodPropertiesEnum.ts b/src/management/api/types/UserAuthenticationMethodPropertiesEnum.ts index 2c894f7e44..4f59b5b184 100644 --- a/src/management/api/types/UserAuthenticationMethodPropertiesEnum.ts +++ b/src/management/api/types/UserAuthenticationMethodPropertiesEnum.ts @@ -1,11 +1,10 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type UserAuthenticationMethodPropertiesEnum = "totp" | "push" | "sms" | "voice"; export const UserAuthenticationMethodPropertiesEnum = { Totp: "totp", Push: "push", Sms: "sms", Voice: "voice", } as const; +export type UserAuthenticationMethodPropertiesEnum = + (typeof UserAuthenticationMethodPropertiesEnum)[keyof typeof UserAuthenticationMethodPropertiesEnum]; diff --git a/src/management/api/types/UserBlockIdentifier.ts b/src/management/api/types/UserBlockIdentifier.ts index 6a4f19a09a..482585f735 100644 --- a/src/management/api/types/UserBlockIdentifier.ts +++ b/src/management/api/types/UserBlockIdentifier.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UserBlockIdentifier { /** Identifier (should be any of an `email`, `username`, or `phone_number`) */ diff --git a/src/management/api/types/UserDateSchema.ts b/src/management/api/types/UserDateSchema.ts index f07e89d30e..ad404d54e4 100644 --- a/src/management/api/types/UserDateSchema.ts +++ b/src/management/api/types/UserDateSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export type UserDateSchema = /** diff --git a/src/management/api/types/UserEnrollmentAuthMethodEnum.ts b/src/management/api/types/UserEnrollmentAuthMethodEnum.ts index ab228bc33f..f04724d1ad 100644 --- a/src/management/api/types/UserEnrollmentAuthMethodEnum.ts +++ b/src/management/api/types/UserEnrollmentAuthMethodEnum.ts @@ -1,16 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Authentication method for this enrollment. Can be `authenticator`, `guardian`, `sms`, `webauthn-roaming`, or `webauthn-platform`. - */ -export type UserEnrollmentAuthMethodEnum = - | "authenticator" - | "guardian" - | "sms" - | "webauthn-platform" - | "webauthn-roaming"; +/** Authentication method for this enrollment. Can be `authenticator`, `guardian`, `sms`, `webauthn-roaming`, or `webauthn-platform`. */ export const UserEnrollmentAuthMethodEnum = { Authenticator: "authenticator", Guardian: "guardian", @@ -18,3 +8,5 @@ export const UserEnrollmentAuthMethodEnum = { WebauthnPlatform: "webauthn-platform", WebauthnRoaming: "webauthn-roaming", } as const; +export type UserEnrollmentAuthMethodEnum = + (typeof UserEnrollmentAuthMethodEnum)[keyof typeof UserEnrollmentAuthMethodEnum]; diff --git a/src/management/api/types/UserEnrollmentStatusEnum.ts b/src/management/api/types/UserEnrollmentStatusEnum.ts index 8aa2073836..64319c0fcf 100644 --- a/src/management/api/types/UserEnrollmentStatusEnum.ts +++ b/src/management/api/types/UserEnrollmentStatusEnum.ts @@ -1,12 +1,8 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * Status of this enrollment. Can be `pending` or `confirmed`. - */ -export type UserEnrollmentStatusEnum = "pending" | "confirmed"; +/** Status of this enrollment. Can be `pending` or `confirmed`. */ export const UserEnrollmentStatusEnum = { Pending: "pending", Confirmed: "confirmed", } as const; +export type UserEnrollmentStatusEnum = (typeof UserEnrollmentStatusEnum)[keyof typeof UserEnrollmentStatusEnum]; diff --git a/src/management/api/types/UserGrant.ts b/src/management/api/types/UserGrant.ts index efb15a84fe..c9bb720dcd 100644 --- a/src/management/api/types/UserGrant.ts +++ b/src/management/api/types/UserGrant.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UserGrant { /** ID of the grant. */ diff --git a/src/management/api/types/UserGroupsResponseSchema.ts b/src/management/api/types/UserGroupsResponseSchema.ts new file mode 100644 index 0000000000..c1451d448b --- /dev/null +++ b/src/management/api/types/UserGroupsResponseSchema.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../index.js"; + +export interface UserGroupsResponseSchema extends Management.Group { + /** Timestamp of when the group membership was added. */ + membership_created_at?: string; +} diff --git a/src/management/api/types/UserId.ts b/src/management/api/types/UserId.ts index 8c232c6bc0..e76637bb58 100644 --- a/src/management/api/types/UserId.ts +++ b/src/management/api/types/UserId.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * user_id of the secondary user account being linked. diff --git a/src/management/api/types/UserIdentity.ts b/src/management/api/types/UserIdentity.ts index 0b0a9c09b9..c5390b2315 100644 --- a/src/management/api/types/UserIdentity.ts +++ b/src/management/api/types/UserIdentity.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UserIdentityProviderEnum.ts b/src/management/api/types/UserIdentityProviderEnum.ts index eaffca9cf5..fc47480ac1 100644 --- a/src/management/api/types/UserIdentityProviderEnum.ts +++ b/src/management/api/types/UserIdentityProviderEnum.ts @@ -1,73 +1,6 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The type of identity provider - */ -export type UserIdentityProviderEnum = - | "ad" - | "adfs" - | "amazon" - | "apple" - | "dropbox" - | "bitbucket" - | "aol" - | "auth0-oidc" - | "auth0" - | "baidu" - | "bitly" - | "box" - | "custom" - | "daccount" - | "dwolla" - | "email" - | "evernote-sandbox" - | "evernote" - | "exact" - | "facebook" - | "fitbit" - | "flickr" - | "github" - | "google-apps" - | "google-oauth2" - | "instagram" - | "ip" - | "line" - | "linkedin" - | "miicard" - | "oauth1" - | "oauth2" - | "office365" - | "oidc" - | "okta" - | "paypal" - | "paypal-sandbox" - | "pingfederate" - | "planningcenter" - | "renren" - | "salesforce-community" - | "salesforce-sandbox" - | "salesforce" - | "samlp" - | "sharepoint" - | "shopify" - | "shop" - | "sms" - | "soundcloud" - | "thecity-sandbox" - | "thecity" - | "thirtysevensignals" - | "twitter" - | "untappd" - | "vkontakte" - | "waad" - | "weibo" - | "windowslive" - | "wordpress" - | "yahoo" - | "yammer" - | "yandex"; +/** The type of identity provider */ export const UserIdentityProviderEnum = { Ad: "ad", Adfs: "adfs", @@ -132,3 +65,4 @@ export const UserIdentityProviderEnum = { Yammer: "yammer", Yandex: "yandex", } as const; +export type UserIdentityProviderEnum = (typeof UserIdentityProviderEnum)[keyof typeof UserIdentityProviderEnum]; diff --git a/src/management/api/types/UserIdentitySchema.ts b/src/management/api/types/UserIdentitySchema.ts index d61dd238df..a500746753 100644 --- a/src/management/api/types/UserIdentitySchema.ts +++ b/src/management/api/types/UserIdentitySchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UserListLogOffsetPaginatedResponseContent.ts b/src/management/api/types/UserListLogOffsetPaginatedResponseContent.ts index b86aa708af..37b8346d21 100644 --- a/src/management/api/types/UserListLogOffsetPaginatedResponseContent.ts +++ b/src/management/api/types/UserListLogOffsetPaginatedResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UserMetadata.ts b/src/management/api/types/UserMetadata.ts index 3d5a1330ce..aa44ed117a 100644 --- a/src/management/api/types/UserMetadata.ts +++ b/src/management/api/types/UserMetadata.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * Data related to the user that does not affect the application's core functionality. diff --git a/src/management/api/types/UserMetadataSchema.ts b/src/management/api/types/UserMetadataSchema.ts index 648b85085a..745199dd2e 100644 --- a/src/management/api/types/UserMetadataSchema.ts +++ b/src/management/api/types/UserMetadataSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. /** * User metadata to which this user has read/write access. diff --git a/src/management/api/types/UserMultifactorProviderEnum.ts b/src/management/api/types/UserMultifactorProviderEnum.ts index 7880a266eb..bf428446ba 100644 --- a/src/management/api/types/UserMultifactorProviderEnum.ts +++ b/src/management/api/types/UserMultifactorProviderEnum.ts @@ -1,12 +1,9 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -/** - * The multi-factor provider. Supported values 'duo' or 'google-authenticator' - */ -export type UserMultifactorProviderEnum = "duo" | "google-authenticator"; +/** The multi-factor provider. Supported values 'duo' or 'google-authenticator' */ export const UserMultifactorProviderEnum = { Duo: "duo", GoogleAuthenticator: "google-authenticator", } as const; +export type UserMultifactorProviderEnum = + (typeof UserMultifactorProviderEnum)[keyof typeof UserMultifactorProviderEnum]; diff --git a/src/management/api/types/UserPermissionSchema.ts b/src/management/api/types/UserPermissionSchema.ts index 1faf10fd18..bff2a7eea8 100644 --- a/src/management/api/types/UserPermissionSchema.ts +++ b/src/management/api/types/UserPermissionSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UserPermissionSchema { /** Resource server (API) identifier that this permission is for. */ diff --git a/src/management/api/types/UserProfileData.ts b/src/management/api/types/UserProfileData.ts index f5481a12d2..459ac24e07 100644 --- a/src/management/api/types/UserProfileData.ts +++ b/src/management/api/types/UserProfileData.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UserProfileData { /** Email address of this user. */ diff --git a/src/management/api/types/UserResponseSchema.ts b/src/management/api/types/UserResponseSchema.ts index 214959c5c7..d020036ca0 100644 --- a/src/management/api/types/UserResponseSchema.ts +++ b/src/management/api/types/UserResponseSchema.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UsernameAllowedTypes.ts b/src/management/api/types/UsernameAllowedTypes.ts index df07a1db45..fee095ffc1 100644 --- a/src/management/api/types/UsernameAllowedTypes.ts +++ b/src/management/api/types/UsernameAllowedTypes.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface UsernameAllowedTypes { email?: boolean; diff --git a/src/management/api/types/UsernameAttribute.ts b/src/management/api/types/UsernameAttribute.ts index 5ba36ce69a..7d5bd059ed 100644 --- a/src/management/api/types/UsernameAttribute.ts +++ b/src/management/api/types/UsernameAttribute.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UsernameValidation.ts b/src/management/api/types/UsernameValidation.ts index 01f1c022e6..08d02ef36b 100644 --- a/src/management/api/types/UsernameValidation.ts +++ b/src/management/api/types/UsernameValidation.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/UsersEnrollment.ts b/src/management/api/types/UsersEnrollment.ts index ee1bda1205..c061db5cca 100644 --- a/src/management/api/types/UsersEnrollment.ts +++ b/src/management/api/types/UsersEnrollment.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/VerifiableCredentialTemplateResponse.ts b/src/management/api/types/VerifiableCredentialTemplateResponse.ts index a3fb8c662b..75d38b2e5e 100644 --- a/src/management/api/types/VerifiableCredentialTemplateResponse.ts +++ b/src/management/api/types/VerifiableCredentialTemplateResponse.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; diff --git a/src/management/api/types/VerificationMethodEnum.ts b/src/management/api/types/VerificationMethodEnum.ts index 1822951f79..cbd57204e1 100644 --- a/src/management/api/types/VerificationMethodEnum.ts +++ b/src/management/api/types/VerificationMethodEnum.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -export type VerificationMethodEnum = "link" | "otp"; export const VerificationMethodEnum = { Link: "link", Otp: "otp", } as const; +export type VerificationMethodEnum = (typeof VerificationMethodEnum)[keyof typeof VerificationMethodEnum]; diff --git a/src/management/api/types/VerifyCustomDomainResponseContent.ts b/src/management/api/types/VerifyCustomDomainResponseContent.ts index 69fbf8d83e..d58995e816 100644 --- a/src/management/api/types/VerifyCustomDomainResponseContent.ts +++ b/src/management/api/types/VerifyCustomDomainResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as Management from "../index.js"; @@ -19,7 +17,8 @@ export interface VerifyCustomDomainResponseContent { origin_domain_name?: string; verification?: Management.DomainVerification; /** The HTTP header to fetch the client's IP address */ - custom_client_ip_header?: string; + custom_client_ip_header?: string | null; /** The TLS version policy */ tls_policy?: string; + certificate?: Management.DomainCertificate; } diff --git a/src/management/api/types/VerifyEmailTicketResponseContent.ts b/src/management/api/types/VerifyEmailTicketResponseContent.ts index dc81827c28..1ce25e1e1f 100644 --- a/src/management/api/types/VerifyEmailTicketResponseContent.ts +++ b/src/management/api/types/VerifyEmailTicketResponseContent.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export interface VerifyEmailTicketResponseContent { /** URL representing the ticket. */ diff --git a/src/management/api/types/index.ts b/src/management/api/types/index.ts index 84d73b2c2f..298a8f9a26 100644 --- a/src/management/api/types/index.ts +++ b/src/management/api/types/index.ts @@ -23,6 +23,11 @@ export * from "./AculClientFilter.js"; export * from "./AculClientFilterById.js"; export * from "./AculClientFilterByMetadata.js"; export * from "./AculClientMetadata.js"; +export * from "./AculConfigsItem.js"; +export * from "./AculConfigs.js"; +export * from "./AculContextConfiguration.js"; +export * from "./AculContextConfigurationItem.js"; +export * from "./AculDefaultHeadTagsDisabled.js"; export * from "./AculDomainFilter.js"; export * from "./AculDomainFilterById.js"; export * from "./AculDomainFilterByMetadata.js"; @@ -30,6 +35,7 @@ export * from "./AculDomainMetadata.js"; export * from "./AculFilters.js"; export * from "./AculHeadTag.js"; export * from "./AculHeadTagAttributes.js"; +export * from "./AculHeadTags.js"; export * from "./AculMatchTypeEnum.js"; export * from "./AculOrganizationFilter.js"; export * from "./AculOrganizationFilterById.js"; @@ -37,11 +43,13 @@ export * from "./AculOrganizationFilterByMetadata.js"; export * from "./AculOrganizationMetadata.js"; export * from "./AculRenderingModeEnum.js"; export * from "./AculResponseContent.js"; +export * from "./AculUsePageTemplate.js"; export * from "./AddOrganizationConnectionResponseContent.js"; export * from "./AnomalyIpFormat.js"; export * from "./AppMetadata.js"; export * from "./AssessorsTypeEnum.js"; export * from "./AssociateOrganizationClientGrantResponseContent.js"; +export * from "./AsyncApprovalNotificationsChannelsEnum.js"; export * from "./AuthenticationMethodTypeEnum.js"; export * from "./AuthenticationTypeEnum.js"; export * from "./BrandingColors.js"; @@ -74,6 +82,7 @@ export * from "./BreachedPasswordDetectionPreUserRegistrationShieldsEnum.js"; export * from "./BreachedPasswordDetectionPreUserRegistrationStage.js"; export * from "./BreachedPasswordDetectionShieldsEnum.js"; export * from "./BreachedPasswordDetectionStage.js"; +export * from "./BulkUpdateAculResponseContent.js"; export * from "./ChangePasswordTicketResponseContent.js"; export * from "./Client.js"; export * from "./ClientAddonAws.js"; @@ -110,6 +119,8 @@ export * from "./ClientAddonZendesk.js"; export * from "./ClientAddonZoom.js"; export * from "./ClientAddons.js"; export * from "./ClientAppTypeEnum.js"; +export * from "./ClientAsyncApprovalNotificationsChannelsApiPatchConfiguration.js"; +export * from "./ClientAsyncApprovalNotificationsChannelsApiPostConfiguration.js"; export * from "./ClientAuthenticationMethod.js"; export * from "./ClientAuthenticationMethodSelfSignedTlsClientAuth.js"; export * from "./ClientAuthenticationMethodTlsClientAuth.js"; @@ -132,9 +143,6 @@ export * from "./ClientMetadata.js"; export * from "./ClientMobile.js"; export * from "./ClientMobileAndroid.js"; export * from "./ClientMobileiOs.js"; -export * from "./ClientMyOrganizationConfiguration.js"; -export * from "./ClientMyOrganizationConfigurationAllowedStrategiesEnum.js"; -export * from "./ClientMyOrganizationDeletionBehaviorEnum.js"; export * from "./ClientOidcBackchannelLogoutInitiators.js"; export * from "./ClientOidcBackchannelLogoutInitiatorsEnum.js"; export * from "./ClientOidcBackchannelLogoutInitiatorsModeEnum.js"; @@ -155,20 +163,94 @@ export * from "./ClientSigningKey.js"; export * from "./ClientSigningKeys.js"; export * from "./ClientTokenEndpointAuthMethodEnum.js"; export * from "./ClientTokenEndpointAuthMethodOrNullEnum.js"; +export * from "./ConnectedAccount.js"; +export * from "./ConnectedAccountAccessTypeEnum.js"; export * from "./ConnectionAttributeIdentifier.js"; export * from "./ConnectionAttributes.js"; export * from "./ConnectionAuthenticationMethods.js"; +export * from "./ConnectionAuthenticationPurpose.js"; +export * from "./ConnectionConnectedAccountsPurpose.js"; export * from "./ConnectionCustomScripts.js"; +export * from "./ConnectionDisplayName.js"; export * from "./ConnectionEnabledClient.js"; +export * from "./ConnectionEnabledClients.js"; export * from "./ConnectionFederatedConnectionsAccessTokens.js"; export * from "./ConnectionForList.js"; export * from "./ConnectionForOrganization.js"; export * from "./ConnectionGatewayAuthentication.js"; +export * from "./ConnectionId.js"; export * from "./ConnectionIdentifierPrecedenceEnum.js"; export * from "./ConnectionIdentityProviderEnum.js"; +export * from "./ConnectionIsDomainConnection.js"; export * from "./ConnectionKey.js"; export * from "./ConnectionKeyUseEnum.js"; +export * from "./ConnectionName.js"; export * from "./ConnectionOptions.js"; +export * from "./ConnectionOptionsAd.js"; +export * from "./ConnectionOptionsAdfs.js"; +export * from "./ConnectionOptionsAol.js"; +export * from "./ConnectionOptionsAmazon.js"; +export * from "./ConnectionOptionsApple.js"; +export * from "./ConnectionOptionsAuth0.js"; +export * from "./ConnectionOptionsAuth0Oidc.js"; +export * from "./ConnectionOptionsAzureAd.js"; +export * from "./ConnectionOptionsBaidu.js"; +export * from "./ConnectionOptionsBitbucket.js"; +export * from "./ConnectionOptionsBitly.js"; +export * from "./ConnectionOptionsBox.js"; +export * from "./ConnectionOptionsCustom.js"; +export * from "./ConnectionOptionsDaccount.js"; +export * from "./ConnectionOptionsDropbox.js"; +export * from "./ConnectionOptionsDwolla.js"; +export * from "./ConnectionOptionsEmail.js"; +export * from "./ConnectionOptionsEvernote.js"; +export * from "./ConnectionOptionsEvernoteCommon.js"; +export * from "./ConnectionOptionsEvernoteSandbox.js"; +export * from "./ConnectionOptionsExact.js"; +export * from "./ConnectionOptionsFacebook.js"; +export * from "./ConnectionOptionsFitbit.js"; +export * from "./ConnectionOptionsFlickr.js"; +export * from "./ConnectionOptionsGitHub.js"; +export * from "./ConnectionOptionsGoogleApps.js"; +export * from "./ConnectionOptionsGoogleOAuth2.js"; +export * from "./ConnectionOptionsIp.js"; +export * from "./ConnectionOptionsInstagram.js"; +export * from "./ConnectionOptionsLine.js"; +export * from "./ConnectionOptionsLinkedin.js"; +export * from "./ConnectionOptionsMiicard.js"; +export * from "./ConnectionOptionsOAuth1.js"; +export * from "./ConnectionOptionsOAuth2.js"; +export * from "./ConnectionOptionsOAuth2Common.js"; +export * from "./ConnectionOptionsOidc.js"; +export * from "./ConnectionOptionsOffice365.js"; +export * from "./ConnectionOptionsOkta.js"; +export * from "./ConnectionOptionsPaypal.js"; +export * from "./ConnectionOptionsPaypalSandbox.js"; +export * from "./ConnectionOptionsPingFederate.js"; +export * from "./ConnectionOptionsPlanningCenter.js"; +export * from "./ConnectionOptionsRenren.js"; +export * from "./ConnectionOptionsSaml.js"; +export * from "./ConnectionOptionsSms.js"; +export * from "./ConnectionOptionsSalesforce.js"; +export * from "./ConnectionOptionsSalesforceCommon.js"; +export * from "./ConnectionOptionsSalesforceCommunity.js"; +export * from "./ConnectionOptionsSalesforceSandbox.js"; +export * from "./ConnectionOptionsSharepoint.js"; +export * from "./ConnectionOptionsShop.js"; +export * from "./ConnectionOptionsShopify.js"; +export * from "./ConnectionOptionsSoundcloud.js"; +export * from "./ConnectionOptionsTheCity.js"; +export * from "./ConnectionOptionsTheCitySandbox.js"; +export * from "./ConnectionOptionsThirtySevenSignals.js"; +export * from "./ConnectionOptionsTwitter.js"; +export * from "./ConnectionOptionsUntappd.js"; +export * from "./ConnectionOptionsVkontakte.js"; +export * from "./ConnectionOptionsWeibo.js"; +export * from "./ConnectionOptionsWindowsLive.js"; +export * from "./ConnectionOptionsWordpress.js"; +export * from "./ConnectionOptionsYahoo.js"; +export * from "./ConnectionOptionsYammer.js"; +export * from "./ConnectionOptionsYandex.js"; export * from "./ConnectionPasskeyAuthenticationMethod.js"; export * from "./ConnectionPasskeyChallengeUiEnum.js"; export * from "./ConnectionPasskeyOptions.js"; @@ -179,7 +261,73 @@ export * from "./ConnectionPasswordHistoryOptions.js"; export * from "./ConnectionPasswordNoPersonalInfoOptions.js"; export * from "./ConnectionPasswordPolicyEnum.js"; export * from "./ConnectionPropertiesOptions.js"; +export * from "./ConnectionRealms.js"; +export * from "./ConnectionRequestCommon.js"; +export * from "./ConnectionResponseCommon.js"; +export * from "./ConnectionResponseContentAd.js"; +export * from "./ConnectionResponseContentAdfs.js"; +export * from "./ConnectionResponseContentAol.js"; +export * from "./ConnectionResponseContentAmazon.js"; +export * from "./ConnectionResponseContentApple.js"; +export * from "./ConnectionResponseContentAuth0.js"; +export * from "./ConnectionResponseContentAuth0Oidc.js"; +export * from "./ConnectionResponseContentAzureAd.js"; +export * from "./ConnectionResponseContentBaidu.js"; +export * from "./ConnectionResponseContentBitbucket.js"; +export * from "./ConnectionResponseContentBitly.js"; +export * from "./ConnectionResponseContentBox.js"; +export * from "./ConnectionResponseContentCustom.js"; +export * from "./ConnectionResponseContentDaccount.js"; +export * from "./ConnectionResponseContentDropbox.js"; +export * from "./ConnectionResponseContentDwolla.js"; +export * from "./ConnectionResponseContentEmail.js"; +export * from "./ConnectionResponseContentEvernote.js"; +export * from "./ConnectionResponseContentEvernoteSandbox.js"; +export * from "./ConnectionResponseContentExact.js"; +export * from "./ConnectionResponseContentFacebook.js"; +export * from "./ConnectionResponseContentFitbit.js"; +export * from "./ConnectionResponseContentFlickr.js"; +export * from "./ConnectionResponseContentGitHub.js"; +export * from "./ConnectionResponseContentGoogleApps.js"; +export * from "./ConnectionResponseContentGoogleOAuth2.js"; +export * from "./ConnectionResponseContentIp.js"; +export * from "./ConnectionResponseContentInstagram.js"; +export * from "./ConnectionResponseContentLine.js"; +export * from "./ConnectionResponseContentLinkedin.js"; +export * from "./ConnectionResponseContentMiicard.js"; +export * from "./ConnectionResponseContentOAuth1.js"; +export * from "./ConnectionResponseContentOAuth2.js"; +export * from "./ConnectionResponseContentOidc.js"; +export * from "./ConnectionResponseContentOffice365.js"; +export * from "./ConnectionResponseContentOkta.js"; +export * from "./ConnectionResponseContentPaypal.js"; +export * from "./ConnectionResponseContentPaypalSandbox.js"; +export * from "./ConnectionResponseContentPingFederate.js"; +export * from "./ConnectionResponseContentPlanningCenter.js"; +export * from "./ConnectionResponseContentRenren.js"; +export * from "./ConnectionResponseContentSaml.js"; +export * from "./ConnectionResponseContentSms.js"; +export * from "./ConnectionResponseContentSalesforce.js"; +export * from "./ConnectionResponseContentSalesforceCommunity.js"; +export * from "./ConnectionResponseContentSalesforceSandbox.js"; +export * from "./ConnectionResponseContentSharepoint.js"; +export * from "./ConnectionResponseContentShop.js"; +export * from "./ConnectionResponseContentShopify.js"; +export * from "./ConnectionResponseContentSoundcloud.js"; +export * from "./ConnectionResponseContentTheCity.js"; +export * from "./ConnectionResponseContentTheCitySandbox.js"; +export * from "./ConnectionResponseContentThirtySevenSignals.js"; +export * from "./ConnectionResponseContentTwitter.js"; +export * from "./ConnectionResponseContentUntappd.js"; +export * from "./ConnectionResponseContentVkontakte.js"; +export * from "./ConnectionResponseContentWeibo.js"; +export * from "./ConnectionResponseContentWindowsLive.js"; +export * from "./ConnectionResponseContentWordpress.js"; +export * from "./ConnectionResponseContentYahoo.js"; +export * from "./ConnectionResponseContentYammer.js"; +export * from "./ConnectionResponseContentYandex.js"; export * from "./ConnectionSetUserRootAttributesEnum.js"; +export * from "./ConnectionShowAsButton.js"; export * from "./ConnectionStrategyEnum.js"; export * from "./ConnectionUpstreamAdditionalProperties.js"; export * from "./ConnectionUpstreamAlias.js"; @@ -194,6 +342,68 @@ export * from "./CreateBrandingPhoneProviderResponseContent.js"; export * from "./CreateBrandingThemeResponseContent.js"; export * from "./CreateClientGrantResponseContent.js"; export * from "./CreateClientResponseContent.js"; +export * from "./CreateConnectionRequestContentAd.js"; +export * from "./CreateConnectionRequestContentAdfs.js"; +export * from "./CreateConnectionRequestContentAol.js"; +export * from "./CreateConnectionRequestContentAmazon.js"; +export * from "./CreateConnectionRequestContentApple.js"; +export * from "./CreateConnectionRequestContentAuth0.js"; +export * from "./CreateConnectionRequestContentAuth0Oidc.js"; +export * from "./CreateConnectionRequestContentAzureAd.js"; +export * from "./CreateConnectionRequestContentBaidu.js"; +export * from "./CreateConnectionRequestContentBitbucket.js"; +export * from "./CreateConnectionRequestContentBitly.js"; +export * from "./CreateConnectionRequestContentBox.js"; +export * from "./CreateConnectionRequestContentCustom.js"; +export * from "./CreateConnectionRequestContentDaccount.js"; +export * from "./CreateConnectionRequestContentDropbox.js"; +export * from "./CreateConnectionRequestContentDwolla.js"; +export * from "./CreateConnectionRequestContentEmail.js"; +export * from "./CreateConnectionRequestContentEvernote.js"; +export * from "./CreateConnectionRequestContentEvernoteSandbox.js"; +export * from "./CreateConnectionRequestContentExact.js"; +export * from "./CreateConnectionRequestContentFacebook.js"; +export * from "./CreateConnectionRequestContentFitbit.js"; +export * from "./CreateConnectionRequestContentFlickr.js"; +export * from "./CreateConnectionRequestContentGitHub.js"; +export * from "./CreateConnectionRequestContentGoogleApps.js"; +export * from "./CreateConnectionRequestContentGoogleOAuth2.js"; +export * from "./CreateConnectionRequestContentIp.js"; +export * from "./CreateConnectionRequestContentInstagram.js"; +export * from "./CreateConnectionRequestContentLine.js"; +export * from "./CreateConnectionRequestContentLinkedin.js"; +export * from "./CreateConnectionRequestContentMiicard.js"; +export * from "./CreateConnectionRequestContentOAuth1.js"; +export * from "./CreateConnectionRequestContentOAuth2.js"; +export * from "./CreateConnectionRequestContentOidc.js"; +export * from "./CreateConnectionRequestContentOffice365.js"; +export * from "./CreateConnectionRequestContentOkta.js"; +export * from "./CreateConnectionRequestContentPaypal.js"; +export * from "./CreateConnectionRequestContentPaypalSandbox.js"; +export * from "./CreateConnectionRequestContentPingFederate.js"; +export * from "./CreateConnectionRequestContentPlanningCenter.js"; +export * from "./CreateConnectionRequestContentRenren.js"; +export * from "./CreateConnectionRequestContentSaml.js"; +export * from "./CreateConnectionRequestContentSms.js"; +export * from "./CreateConnectionRequestContentSalesforce.js"; +export * from "./CreateConnectionRequestContentSalesforceCommunity.js"; +export * from "./CreateConnectionRequestContentSalesforceSandbox.js"; +export * from "./CreateConnectionRequestContentSharepoint.js"; +export * from "./CreateConnectionRequestContentShop.js"; +export * from "./CreateConnectionRequestContentShopify.js"; +export * from "./CreateConnectionRequestContentSoundcloud.js"; +export * from "./CreateConnectionRequestContentTheCity.js"; +export * from "./CreateConnectionRequestContentTheCitySandbox.js"; +export * from "./CreateConnectionRequestContentThirtySevenSignals.js"; +export * from "./CreateConnectionRequestContentTwitter.js"; +export * from "./CreateConnectionRequestContentUntappd.js"; +export * from "./CreateConnectionRequestContentVkontakte.js"; +export * from "./CreateConnectionRequestContentWeibo.js"; +export * from "./CreateConnectionRequestContentWindowsLive.js"; +export * from "./CreateConnectionRequestContentWordpress.js"; +export * from "./CreateConnectionRequestContentYahoo.js"; +export * from "./CreateConnectionRequestContentYammer.js"; +export * from "./CreateConnectionRequestContentYandex.js"; export * from "./CreateConnectionResponseContent.js"; export * from "./CreateCustomDomainResponseContent.js"; export * from "./CreateEmailProviderResponseContent.js"; @@ -311,6 +521,7 @@ export * from "./CreateSelfServiceProfileResponseContent.js"; export * from "./CreateSelfServiceProfileSsoTicketResponseContent.js"; export * from "./CreateTokenExchangeProfileResponseContent.js"; export * from "./CreateTokenQuota.js"; +export * from "./CreateUserAttributeProfileResponseContent.js"; export * from "./CreateUserAuthenticationMethodResponseContent.js"; export * from "./CreateUserResponseContent.js"; export * from "./CreateVerifiableCredentialTemplateResponseContent.js"; @@ -347,9 +558,13 @@ export * from "./DeployActionVersionResponseContent.js"; export * from "./DeviceCredential.js"; export * from "./DeviceCredentialPublicKeyTypeEnum.js"; export * from "./DeviceCredentialTypeEnum.js"; +export * from "./DomainCertificate.js"; +export * from "./DomainCertificateAuthorityEnum.js"; +export * from "./DomainCertificateStatusEnum.js"; export * from "./DomainVerification.js"; export * from "./DomainVerificationMethod.js"; export * from "./DomainVerificationMethodNameEnum.js"; +export * from "./DomainVerificationStatusEnum.js"; export * from "./EmailAttribute.js"; export * from "./EmailMailgunRegionEnum.js"; export * from "./EmailProviderCredentials.js"; @@ -825,7 +1040,6 @@ export * from "./GetFlowRequestParametersHydrateEnum.js"; export * from "./GetFlowResponseContent.js"; export * from "./GetFlowsVaultConnectionResponseContent.js"; export * from "./GetFormResponseContent.js"; -export * from "./GetGroupMembersResponseContent.js"; export * from "./GetGuardianEnrollmentResponseContent.js"; export * from "./GetGuardianFactorDuoSettingsResponseContent.js"; export * from "./GetGuardianFactorPhoneMessageTypesResponseContent.js"; @@ -873,14 +1087,12 @@ export * from "./GetTenantSettingsResponseContent.js"; export * from "./GetTokenExchangeProfileResponseContent.js"; export * from "./GetUniversalLoginTemplate.js"; export * from "./GetUniversalLoginTemplateResponseContent.js"; +export * from "./GetUserAttributeProfileResponseContent.js"; +export * from "./GetUserAttributeProfileTemplateResponseContent.js"; export * from "./GetUserAuthenticationMethodResponseContent.js"; -export * from "./GetUserGroupsResponseContent.js"; export * from "./GetUserResponseContent.js"; export * from "./GetVerifiableCredentialTemplateResponseContent.js"; export * from "./Group.js"; -export * from "./GroupMember.js"; -export * from "./GroupMemberTypeEnum.js"; -export * from "./GroupTypeEnum.js"; export * from "./GuardianEnrollmentDate.js"; export * from "./GuardianEnrollmentFactorEnum.js"; export * from "./GuardianEnrollmentStatus.js"; @@ -942,9 +1154,12 @@ export * from "./ListRulesOffsetPaginatedResponseContent.js"; export * from "./ListSelfServiceProfileCustomTextResponseContent.js"; export * from "./ListSelfServiceProfilesPaginatedResponseContent.js"; export * from "./ListTokenExchangeProfileResponseContent.js"; +export * from "./ListUserAttributeProfileTemplateResponseContent.js"; +export * from "./ListUserAttributeProfilesPaginatedResponseContent.js"; export * from "./ListUserAuthenticationMethodsOffsetPaginatedResponseContent.js"; export * from "./ListUserBlocksByIdentifierResponseContent.js"; export * from "./ListUserBlocksResponseContent.js"; +export * from "./ListUserConnectedAccountsResponseContent.js"; export * from "./ListUserGrantsOffsetPaginatedResponseContent.js"; export * from "./ListUserOrganizationsOffsetPaginatedResponseContent.js"; export * from "./ListUserPermissionsOffsetPaginatedResponseContent.js"; @@ -1129,6 +1344,7 @@ export * from "./SessionCookieSchema.js"; export * from "./SessionDate.js"; export * from "./SessionDeviceMetadata.js"; export * from "./SessionIp.js"; +export * from "./SessionMetadata.js"; export * from "./SessionResponseContent.js"; export * from "./SetCustomSigningKeysResponseContent.js"; export * from "./SetEmailTemplateResponseContent.js"; @@ -1238,15 +1454,35 @@ export * from "./UpdateRoleResponseContent.js"; export * from "./UpdateRuleResponseContent.js"; export * from "./UpdateScimConfigurationResponseContent.js"; export * from "./UpdateSelfServiceProfileResponseContent.js"; +export * from "./UpdateSessionResponseContent.js"; export * from "./UpdateSettingsResponseContent.js"; export * from "./UpdateSuspiciousIpThrottlingSettingsResponseContent.js"; export * from "./UpdateTenantSettingsResponseContent.js"; export * from "./UpdateTokenQuota.js"; export * from "./UpdateUniversalLoginTemplateRequestContent.js"; +export * from "./UpdateUserAttributeProfileResponseContent.js"; export * from "./UpdateUserAuthenticationMethodResponseContent.js"; export * from "./UpdateUserResponseContent.js"; export * from "./UpdateVerifiableCredentialTemplateResponseContent.js"; export * from "./UserAppMetadataSchema.js"; +export * from "./UserAttributeProfile.js"; +export * from "./UserAttributeProfileId.js"; +export * from "./UserAttributeProfileName.js"; +export * from "./UserAttributeProfileOidcMapping.js"; +export * from "./UserAttributeProfilePatchUserId.js"; +export * from "./UserAttributeProfileSamlMapping.js"; +export * from "./UserAttributeProfileStrategyOverrides.js"; +export * from "./UserAttributeProfileStrategyOverridesMapping.js"; +export * from "./UserAttributeProfileStrategyOverridesUserId.js"; +export * from "./UserAttributeProfileStrategyOverridesUserIdMapping.js"; +export * from "./UserAttributeProfileTemplate.js"; +export * from "./UserAttributeProfileTemplateItem.js"; +export * from "./UserAttributeProfileUserAttributeAdditionalProperties.js"; +export * from "./UserAttributeProfileUserAttributes.js"; +export * from "./UserAttributeProfileUserId.js"; +export * from "./UserAttributeProfileUserIdOidcMappingEnum.js"; +export * from "./UserAttributeProfileUserIdOidcStrategyOverrideMapping.js"; +export * from "./UserAttributeProfileUserIdSamlMapping.js"; export * from "./UserAuthenticationMethod.js"; export * from "./UserAuthenticationMethodProperties.js"; export * from "./UserAuthenticationMethodPropertiesEnum.js"; @@ -1255,6 +1491,7 @@ export * from "./UserDateSchema.js"; export * from "./UserEnrollmentAuthMethodEnum.js"; export * from "./UserEnrollmentStatusEnum.js"; export * from "./UserGrant.js"; +export * from "./UserGroupsResponseSchema.js"; export * from "./UserId.js"; export * from "./UserIdentity.js"; export * from "./UserIdentityProviderEnum.js"; diff --git a/src/management/core/auth/AuthProvider.ts b/src/management/core/auth/AuthProvider.ts index 07e0d6ab4c..86f670a857 100644 --- a/src/management/core/auth/AuthProvider.ts +++ b/src/management/core/auth/AuthProvider.ts @@ -1,4 +1,4 @@ -import { AuthRequest } from "./AuthRequest.js"; +import type { AuthRequest } from "./AuthRequest.js"; export interface AuthProvider { getAuthRequest(): Promise; diff --git a/src/management/core/auth/BasicAuth.ts b/src/management/core/auth/BasicAuth.ts index 1c0d883515..a642359100 100644 --- a/src/management/core/auth/BasicAuth.ts +++ b/src/management/core/auth/BasicAuth.ts @@ -18,7 +18,8 @@ export const BasicAuth = { fromAuthorizationHeader: (header: string): BasicAuth => { const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, ""); const decoded = base64Decode(credentials); - const [username, password] = decoded.split(":", 2); + const [username, ...passwordParts] = decoded.split(":"); + const password = passwordParts.length > 0 ? passwordParts.join(":") : undefined; if (username == null || password == null) { throw new Error("Invalid basic auth"); diff --git a/src/management/core/auth/index.ts b/src/management/core/auth/index.ts index 7faab9d3dd..23d31b07bd 100644 --- a/src/management/core/auth/index.ts +++ b/src/management/core/auth/index.ts @@ -1,4 +1,4 @@ -export { AuthProvider } from "./AuthProvider.js"; -export { type AuthRequest } from "./AuthRequest.js"; +export type { AuthProvider } from "./AuthProvider.js"; +export type { AuthRequest } from "./AuthRequest.js"; export { BasicAuth } from "./BasicAuth.js"; export { BearerToken } from "./BearerToken.js"; diff --git a/src/management/core/exports.ts b/src/management/core/exports.ts index e415a8f602..d6a3f3bc75 100644 --- a/src/management/core/exports.ts +++ b/src/management/core/exports.ts @@ -1 +1,2 @@ +export * from "./pagination/exports.js"; export * from "./file/exports.js"; diff --git a/src/management/core/fetcher/APIResponse.ts b/src/management/core/fetcher/APIResponse.ts index dd4b94666f..97ab83c2b1 100644 --- a/src/management/core/fetcher/APIResponse.ts +++ b/src/management/core/fetcher/APIResponse.ts @@ -1,4 +1,4 @@ -import { RawResponse } from "./RawResponse.js"; +import type { RawResponse } from "./RawResponse.js"; /** * The response of an API call. diff --git a/src/management/core/fetcher/BinaryResponse.ts b/src/management/core/fetcher/BinaryResponse.ts index 614cb59b1e..4b4d0e891b 100644 --- a/src/management/core/fetcher/BinaryResponse.ts +++ b/src/management/core/fetcher/BinaryResponse.ts @@ -1,4 +1,4 @@ -import { ResponseWithBody } from "./ResponseWithBody.js"; +import type { ResponseWithBody } from "./ResponseWithBody.js"; export type BinaryResponse = { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */ diff --git a/src/management/core/fetcher/EndpointMetadata.ts b/src/management/core/fetcher/EndpointMetadata.ts new file mode 100644 index 0000000000..998d68f5c2 --- /dev/null +++ b/src/management/core/fetcher/EndpointMetadata.ts @@ -0,0 +1,13 @@ +export type SecuritySchemeKey = string; +/** + * A collection of security schemes, where the key is the name of the security scheme and the value is the list of scopes required for that scheme. + * All schemes in the collection must be satisfied for authentication to be successful. + */ +export type SecuritySchemeCollection = Record; +export type AuthScope = string; +export type EndpointMetadata = { + /** + * An array of security scheme collections. Each collection represents an alternative way to authenticate. + */ + security?: SecuritySchemeCollection[]; +}; diff --git a/src/management/core/fetcher/EndpointSupplier.ts b/src/management/core/fetcher/EndpointSupplier.ts new file mode 100644 index 0000000000..13fe87518a --- /dev/null +++ b/src/management/core/fetcher/EndpointSupplier.ts @@ -0,0 +1,14 @@ +import type { EndpointMetadata } from "./EndpointMetadata.js"; +import { Supplier } from "./Supplier.js"; + +type EndpointSupplierFn = (arg: { endpointMetadata: EndpointMetadata }) => T | Promise; +export type EndpointSupplier = Supplier | EndpointSupplierFn; +export const EndpointSupplier = { + get: async (supplier: EndpointSupplier, arg: { endpointMetadata: EndpointMetadata }): Promise => { + if (typeof supplier === "function") { + return (supplier as EndpointSupplierFn)(arg); + } else { + return supplier; + } + }, +}; diff --git a/src/management/core/fetcher/Fetcher.ts b/src/management/core/fetcher/Fetcher.ts index 9e58ba780a..21fe9b7a98 100644 --- a/src/management/core/fetcher/Fetcher.ts +++ b/src/management/core/fetcher/Fetcher.ts @@ -1,6 +1,8 @@ import { toJson } from "../json.js"; -import { APIResponse } from "./APIResponse.js"; +import type { APIResponse } from "./APIResponse.js"; import { createRequestUrl } from "./createRequestUrl.js"; +import type { EndpointMetadata } from "./EndpointMetadata.js"; +import { EndpointSupplier } from "./EndpointSupplier.js"; import { getErrorResponseBody } from "./getErrorResponseBody.js"; import { getFetchFn } from "./getFetchFn.js"; import { getRequestBody } from "./getRequestBody.js"; @@ -8,7 +10,6 @@ import { getResponseBody } from "./getResponseBody.js"; import { makeRequest } from "./makeRequest.js"; import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js"; import { requestWithRetries } from "./requestWithRetries.js"; -import { Supplier } from "./Supplier.js"; export type FetchFunction = (args: Fetcher.Args) => Promise>; @@ -17,7 +18,7 @@ export declare namespace Fetcher { url: string; method: string; contentType?: string; - headers?: Record | undefined>; + headers?: Record | null | undefined>; queryParameters?: Record; body?: unknown; timeoutMs?: number; @@ -27,6 +28,7 @@ export declare namespace Fetcher { requestType?: "json" | "file" | "bytes"; responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer" | "binary-response"; duplex?: "half"; + endpointMetadata?: EndpointMetadata; } export type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError; @@ -64,7 +66,7 @@ async function getHeaders(args: Fetcher.Args): Promise> { } for (const [key, value] of Object.entries(args.headers)) { - const result = await Supplier.get(value); + const result = await EndpointSupplier.get(value, { endpointMetadata: args.endpointMetadata ?? {} }); if (typeof result === "string") { newHeaders[key] = result; continue; diff --git a/src/management/core/fetcher/HttpResponsePromise.ts b/src/management/core/fetcher/HttpResponsePromise.ts index 026d88f198..692ca7d795 100644 --- a/src/management/core/fetcher/HttpResponsePromise.ts +++ b/src/management/core/fetcher/HttpResponsePromise.ts @@ -1,4 +1,4 @@ -import { WithRawResponse } from "./RawResponse.js"; +import type { WithRawResponse } from "./RawResponse.js"; /** * A promise that returns the parsed response and lets you retrieve the raw response too. diff --git a/src/management/core/fetcher/index.ts b/src/management/core/fetcher/index.ts index a131e346ee..c3bc6da20f 100644 --- a/src/management/core/fetcher/index.ts +++ b/src/management/core/fetcher/index.ts @@ -1,5 +1,7 @@ export type { APIResponse } from "./APIResponse.js"; export type { BinaryResponse } from "./BinaryResponse.js"; +export type { EndpointMetadata } from "./EndpointMetadata.js"; +export { EndpointSupplier } from "./EndpointSupplier.js"; export type { Fetcher, FetchFunction } from "./Fetcher.js"; export { fetcher } from "./Fetcher.js"; export { getHeader } from "./getHeader.js"; diff --git a/src/management/core/fetcher/requestWithRetries.ts b/src/management/core/fetcher/requestWithRetries.ts index add3cce02f..560432ef2f 100644 --- a/src/management/core/fetcher/requestWithRetries.ts +++ b/src/management/core/fetcher/requestWithRetries.ts @@ -3,12 +3,55 @@ const MAX_RETRY_DELAY = 60000; // in milliseconds const DEFAULT_MAX_RETRIES = 2; const JITTER_FACTOR = 0.2; // 20% random jitter -function addJitter(delay: number): number { - // Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR - const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR; +function addPositiveJitter(delay: number): number { + // Generate a random value between 0 and +JITTER_FACTOR + const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR; return delay * jitterMultiplier; } +function addSymmetricJitter(delay: number): number { + // Generate a random value in a JITTER_FACTOR-sized percentage range around delay + const jitterMultiplier = 1 + (Math.random() - 0.5) * JITTER_FACTOR; + return delay * jitterMultiplier; +} + +function getRetryDelayFromHeaders(response: Response, retryAttempt: number): number { + // Check for Retry-After header first (RFC 7231), with no jitter + const retryAfter = response.headers.get("Retry-After"); + if (retryAfter) { + // Parse as number of seconds... + const retryAfterSeconds = parseInt(retryAfter, 10); + if (!isNaN(retryAfterSeconds) && retryAfterSeconds > 0) { + return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY); + } + + // ...or as an HTTP date; both are valid + const retryAfterDate = new Date(retryAfter); + if (!isNaN(retryAfterDate.getTime())) { + const delay = retryAfterDate.getTime() - Date.now(); + if (delay > 0) { + return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY); + } + } + } + + // Then check for industry-standard X-RateLimit-Reset header, with positive jitter + const rateLimitReset = response.headers.get("X-RateLimit-Reset"); + if (rateLimitReset) { + const resetTime = parseInt(rateLimitReset, 10); + if (!isNaN(resetTime)) { + // Assume Unix timestamp in epoch seconds + const delay = resetTime * 1000 - Date.now(); + if (delay > 0) { + return addPositiveJitter(Math.min(delay, MAX_RETRY_DELAY)); + } + } + } + + // Fall back to exponential backoff, with symmetric jitter + return addSymmetricJitter(Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY)); +} + export async function requestWithRetries( requestFn: () => Promise, maxRetries: number = DEFAULT_MAX_RETRIES, @@ -17,13 +60,10 @@ export async function requestWithRetries( for (let i = 0; i < maxRetries; ++i) { if ([408, 429].includes(response.status) || response.status >= 500) { - // Calculate base delay using exponential backoff (in milliseconds) - const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY); - - // Add jitter to the delay - const delayWithJitter = addJitter(baseDelay); + // Get delay with appropriate jitter applied + const delay = getRetryDelayFromHeaders(response, i); - await new Promise((resolve) => setTimeout(resolve, delayWithJitter)); + await new Promise((resolve) => setTimeout(resolve, delay)); response = await requestFn(); } else { break; diff --git a/src/management/core/file/exports.ts b/src/management/core/file/exports.ts index acda03679a..3b0b396757 100644 --- a/src/management/core/file/exports.ts +++ b/src/management/core/file/exports.ts @@ -1 +1 @@ -export { Uploadable } from "./types.js"; +export type { Uploadable } from "./types.js"; diff --git a/src/management/core/file/file.ts b/src/management/core/file/file.ts index bc4b7e5096..9d02c4aa59 100644 --- a/src/management/core/file/file.ts +++ b/src/management/core/file/file.ts @@ -1,4 +1,4 @@ -import { Uploadable } from "./types.js"; +import type { Uploadable } from "./types.js"; export async function toBinaryUploadRequest( file: Uploadable, @@ -20,19 +20,40 @@ export async function toBinaryUploadRequest( return request; } -async function getFileWithMetadata(file: Uploadable): Promise { +export async function toMultipartDataPart( + file: Uploadable, +): Promise<{ data: Uploadable.FileLike; filename?: string; contentType?: string }> { + const { data, filename, contentType } = await getFileWithMetadata(file, { + noSniffFileSize: true, + }); + return { + data, + filename, + contentType, + }; +} + +async function getFileWithMetadata( + file: Uploadable, + { noSniffFileSize }: { noSniffFileSize?: boolean } = {}, +): Promise { if (isFileLike(file)) { - return getFileWithMetadata({ - data: file, - }); + return getFileWithMetadata( + { + data: file, + }, + { noSniffFileSize }, + ); } + if ("path" in file) { const fs = await import("fs"); if (!fs || !fs.createReadStream) { throw new Error("File path uploads are not supported in this environment."); } const data = fs.createReadStream(file.path); - const contentLength = file.contentLength ?? (await tryGetFileSizeFromPath(file.path)); + const contentLength = + file.contentLength ?? (noSniffFileSize === true ? undefined : await tryGetFileSizeFromPath(file.path)); const filename = file.filename ?? getNameFromPath(file.path); return { data, @@ -43,7 +64,11 @@ async function getFileWithMetadata(file: Uploadable): Promise { +async function tryGetContentLengthFromFileLike( + data: Uploadable.FileLike, + { noSniffFileSize }: { noSniffFileSize?: boolean } = {}, +): Promise { if (isBuffer(data)) { return data.length; } @@ -108,6 +136,9 @@ async function tryGetContentLengthFromFileLike(data: Uploadable.FileLike): Promi if (isFile(data)) { return data.size; } + if (noSniffFileSize === true) { + return undefined; + } if (isPathedValue(data)) { return await tryGetFileSizeFromPath(data.path.toString()); } diff --git a/src/management/core/form-data-utils/FormDataWrapper.ts b/src/management/core/form-data-utils/FormDataWrapper.ts index fa1ca9b959..4309f7a346 100644 --- a/src/management/core/form-data-utils/FormDataWrapper.ts +++ b/src/management/core/form-data-utils/FormDataWrapper.ts @@ -1,27 +1,52 @@ import { toJson } from "../../core/json.js"; import { RUNTIME } from "../runtime/index.js"; +import { toMultipartDataPart, type Uploadable } from "../../core/file/index.js"; -type NamedValue = { - name: string; -} & unknown; +interface FormDataRequest { + body: Body; + headers: Record; + duplex?: "half"; +} -type PathedValue = { - path: string | { toString(): string }; -} & unknown; +export async function newFormData(): Promise { + return new FormDataWrapper(); +} + +export class FormDataWrapper { + private fd: FormData = new FormData(); + + public async setup(): Promise { + // noop + } + + public append(key: string, value: unknown): void { + this.fd.append(key, String(value)); + } + + public async appendFile(key: string, value: Uploadable): Promise { + const { data, filename, contentType } = await toMultipartDataPart(value); + const blob = await convertToBlob(data, contentType); + if (filename) { + this.fd.append(key, blob, filename); + } else { + this.fd.append(key, blob); + } + } + + public getRequest(): FormDataRequest { + return { + body: this.fd, + headers: {}, + duplex: "half" as const, + }; + } +} type StreamLike = { read?: () => unknown; pipe?: (dest: unknown) => unknown; } & unknown; -function isNamedValue(value: unknown): value is NamedValue { - return typeof value === "object" && value != null && "name" in value; -} - -function isPathedValue(value: unknown): value is PathedValue { - return typeof value === "object" && value != null && "path" in value; -} - function isStreamLike(value: unknown): value is StreamLike { return typeof value === "object" && value != null && ("read" in value || "pipe" in value); } @@ -38,19 +63,6 @@ function isArrayBufferView(value: unknown): value is ArrayBufferView { return ArrayBuffer.isView(value); } -interface FormDataRequest { - body: Body; - headers: Record; - duplex?: "half"; -} - -function getLastPathSegment(pathStr: string): string { - const lastForwardSlash = pathStr.lastIndexOf("/"); - const lastBackSlash = pathStr.lastIndexOf("\\"); - const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash); - return lastSlashIndex >= 0 ? pathStr.substring(lastSlashIndex + 1) : pathStr; -} - async function streamToBuffer(stream: unknown): Promise { if (RUNTIME.type === "node") { const { Readable } = await import("stream"); @@ -94,83 +106,35 @@ async function streamToBuffer(stream: unknown): Promise { ); } -export async function newFormData(): Promise { - return new FormDataWrapper(); -} - -export class FormDataWrapper { - private fd: FormData = new FormData(); - - public async setup(): Promise { - // noop +async function convertToBlob(value: unknown, contentType?: string): Promise { + if (isStreamLike(value) || isReadableStream(value)) { + const buffer = await streamToBuffer(value); + return new Blob([buffer], { type: contentType }); } - public append(key: string, value: unknown): void { - this.fd.append(key, String(value)); + if (value instanceof Blob) { + return value; } - private getFileName(value: unknown, filename?: string): string | undefined { - if (filename != null) { - return filename; - } - if (isNamedValue(value)) { - return value.name; - } - if (isPathedValue(value) && value.path) { - return getLastPathSegment(value.path.toString()); - } - return undefined; + if (isBuffer(value)) { + return new Blob([value], { type: contentType }); } - private async convertToBlob(value: unknown): Promise { - if (isStreamLike(value) || isReadableStream(value)) { - const buffer = await streamToBuffer(value); - return new Blob([buffer]); - } - - if (value instanceof Blob) { - return value; - } - - if (isBuffer(value)) { - return new Blob([value]); - } - - if (value instanceof ArrayBuffer) { - return new Blob([value]); - } - - if (isArrayBufferView(value)) { - return new Blob([value]); - } - - if (typeof value === "string") { - return new Blob([value]); - } - - if (typeof value === "object" && value !== null) { - return new Blob([toJson(value)], { type: "application/json" }); - } - - return new Blob([String(value)]); + if (value instanceof ArrayBuffer) { + return new Blob([value], { type: contentType }); } - public async appendFile(key: string, value: unknown, fileName?: string): Promise { - fileName = this.getFileName(value, fileName); - const blob = await this.convertToBlob(value); + if (isArrayBufferView(value)) { + return new Blob([value], { type: contentType }); + } - if (fileName) { - this.fd.append(key, blob, fileName); - } else { - this.fd.append(key, blob); - } + if (typeof value === "string") { + return new Blob([value], { type: contentType }); } - public getRequest(): FormDataRequest { - return { - body: this.fd, - headers: {}, - duplex: "half" as const, - }; + if (typeof value === "object" && value !== null) { + return new Blob([toJson(value)], { type: contentType ?? "application/json" }); } + + return new Blob([String(value)], { type: contentType }); } diff --git a/src/management/core/headers.ts b/src/management/core/headers.ts index 561314d2c3..a723d22832 100644 --- a/src/management/core/headers.ts +++ b/src/management/core/headers.ts @@ -1,9 +1,7 @@ -import * as core from "./index.js"; - -export function mergeHeaders( - ...headersArray: (Record | undefined> | 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) @@ -18,10 +16,10 @@ export function mergeHeaders( return result; } -export function mergeOnlyDefinedHeaders( - ...headersArray: (Record | undefined> | 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/Page.ts b/src/management/core/pagination/Page.ts index 307989ef84..d5e0a771e1 100644 --- a/src/management/core/pagination/Page.ts +++ b/src/management/core/pagination/Page.ts @@ -1,18 +1,19 @@ -import { HttpResponsePromise, RawResponse } from "../fetcher/index.js"; +import { HttpResponsePromise, type RawResponse } from "../fetcher/index.js"; /** * A page of results from a paginated API. * * @template T The type of the items in the page. + * @template R The type of the API response. */ -export class Page implements AsyncIterable { +export class Page implements AsyncIterable { public data: T[]; public rawResponse: RawResponse; + public response: R; - private response: unknown; - private _hasNextPage: (response: unknown) => boolean; - private getItems: (response: unknown) => T[]; - private loadNextPage: (response: unknown) => HttpResponsePromise; + private _hasNextPage: (response: R) => boolean; + private getItems: (response: R) => T[]; + private loadNextPage: (response: R) => HttpResponsePromise; constructor({ response, @@ -21,11 +22,11 @@ export class Page implements AsyncIterable { getItems, loadPage, }: { - response: unknown; + response: R; rawResponse: RawResponse; - hasNextPage: (response: unknown) => boolean; - getItems: (response: unknown) => T[]; - loadPage: (response: unknown) => HttpResponsePromise; + hasNextPage: (response: R) => boolean; + getItems: (response: R) => T[]; + loadPage: (response: R) => HttpResponsePromise; }) { this.response = response; this.rawResponse = rawResponse; diff --git a/src/management/core/pagination/Pageable.ts b/src/management/core/pagination/Pageable.ts deleted file mode 100644 index faec86424a..0000000000 --- a/src/management/core/pagination/Pageable.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { RawResponse } from "../fetcher/index.js"; -import { Page } from "./Page.js"; - -export declare namespace Pageable { - interface Args { - response: Response; - rawResponse: RawResponse; - hasNextPage: (response: Response) => boolean; - getItems: (response: Response) => Item[]; - loadPage: (response: Response) => Promise; - } -} - -export class Pageable extends Page { - constructor(args: Pageable.Args) { - super(args as any); - } -} diff --git a/src/management/core/pagination/exports.ts b/src/management/core/pagination/exports.ts new file mode 100644 index 0000000000..d3acc60b07 --- /dev/null +++ b/src/management/core/pagination/exports.ts @@ -0,0 +1 @@ +export type { Page } from "./Page.js"; diff --git a/src/management/core/pagination/index.ts b/src/management/core/pagination/index.ts index b0cd68fa06..7781cbd6e9 100644 --- a/src/management/core/pagination/index.ts +++ b/src/management/core/pagination/index.ts @@ -1,2 +1 @@ export { Page } from "./Page.js"; -export { Pageable } from "./Pageable.js"; diff --git a/src/management/core/url/encodePathParam.ts b/src/management/core/url/encodePathParam.ts new file mode 100644 index 0000000000..19b9012442 --- /dev/null +++ b/src/management/core/url/encodePathParam.ts @@ -0,0 +1,18 @@ +export function encodePathParam(param: unknown): string { + if (param === null) { + return "null"; + } + const typeofParam = typeof param; + switch (typeofParam) { + case "undefined": + return "undefined"; + case "string": + case "number": + case "boolean": + break; + default: + param = String(param); + break; + } + return encodeURIComponent(param as string | number | boolean); +} diff --git a/src/management/core/url/index.ts b/src/management/core/url/index.ts index ed5aa0ff07..f2e0fa2d22 100644 --- a/src/management/core/url/index.ts +++ b/src/management/core/url/index.ts @@ -1,2 +1,3 @@ +export { encodePathParam } from "./encodePathParam.js"; export { join } from "./join.js"; export { toQueryString } from "./qs.js"; diff --git a/src/management/environments.ts b/src/management/environments.ts index 88ae2d55af..9f66cbf23e 100644 --- a/src/management/environments.ts +++ b/src/management/environments.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export const ManagementEnvironment = { Default: "https://%7BTENANT%7D.auth0.com/api/v2", diff --git a/src/management/errors/ManagementError.ts b/src/management/errors/ManagementError.ts index e3727f7d8a..05fd573da4 100644 --- a/src/management/errors/ManagementError.ts +++ b/src/management/errors/ManagementError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import * as core from "../core/index.js"; import { toJson } from "../core/json.js"; diff --git a/src/management/errors/ManagementTimeoutError.ts b/src/management/errors/ManagementTimeoutError.ts index a16a879581..6080ec03b9 100644 --- a/src/management/errors/ManagementTimeoutError.ts +++ b/src/management/errors/ManagementTimeoutError.ts @@ -1,6 +1,4 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. export class ManagementTimeoutError extends Error { constructor(message: string) { diff --git a/src/management/tests/BrowserTestEnvironment.ts b/src/management/tests/BrowserTestEnvironment.ts deleted file mode 100644 index 0f32bf7b0a..0000000000 --- a/src/management/tests/BrowserTestEnvironment.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { TestEnvironment } from "jest-environment-jsdom"; - -class BrowserTestEnvironment extends TestEnvironment { - async setup() { - await super.setup(); - this.global.Request = Request; - this.global.Response = Response; - this.global.ReadableStream = ReadableStream; - this.global.TextEncoder = TextEncoder; - this.global.TextDecoder = TextDecoder; - this.global.FormData = FormData; - this.global.File = File; - this.global.Blob = Blob; - } -} - -export default BrowserTestEnvironment; diff --git a/src/management/tests/mock-server/MockServer.ts b/src/management/tests/mock-server/MockServer.ts index 64f99c1614..6e258f1724 100644 --- a/src/management/tests/mock-server/MockServer.ts +++ b/src/management/tests/mock-server/MockServer.ts @@ -1,7 +1,7 @@ import { RequestHandlerOptions } from "msw"; import type { SetupServer } from "msw/node"; -import { mockEndpointBuilder } from "./mockEndpointBuilder.js"; +import { mockEndpointBuilder } from "./mockEndpointBuilder"; export interface MockServerOptions { baseUrl: string; diff --git a/src/management/tests/mock-server/MockServerPool.ts b/src/management/tests/mock-server/MockServerPool.ts index 920a558f45..22e26c6d71 100644 --- a/src/management/tests/mock-server/MockServerPool.ts +++ b/src/management/tests/mock-server/MockServerPool.ts @@ -1,8 +1,8 @@ import { setupServer } from "msw/node"; -import { fromJson, toJson } from "../../core/json.js"; -import { MockServer } from "./MockServer.js"; -import { randomBaseUrl } from "./randomBaseUrl.js"; +import { fromJson, toJson } from "../../core/json"; +import { MockServer } from "./MockServer"; +import { randomBaseUrl } from "./randomBaseUrl"; const mswServer = setupServer(); interface MockServerOptions { diff --git a/src/management/tests/mock-server/mockEndpointBuilder.ts b/src/management/tests/mock-server/mockEndpointBuilder.ts index eb6dd968cc..85b61746c9 100644 --- a/src/management/tests/mock-server/mockEndpointBuilder.ts +++ b/src/management/tests/mock-server/mockEndpointBuilder.ts @@ -1,9 +1,9 @@ import { DefaultBodyType, HttpHandler, HttpResponse, HttpResponseResolver, http } from "msw"; -import { url } from "../../core/index.js"; -import { toJson } from "../../core/json.js"; -import { withHeaders } from "./withHeaders.js"; -import { withJson } from "./withJson.js"; +import { url } from "../../core"; +import { toJson } from "../../core/json"; +import { withHeaders } from "./withHeaders"; +import { withJson } from "./withJson"; type HttpMethod = "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head"; diff --git a/src/management/tests/mock-server/setup.ts b/src/management/tests/mock-server/setup.ts index d88286151d..c216d6074b 100644 --- a/src/management/tests/mock-server/setup.ts +++ b/src/management/tests/mock-server/setup.ts @@ -1,6 +1,6 @@ import { afterAll, beforeAll } from "@jest/globals"; -import { mockServerPool } from "./MockServerPool.js"; +import { mockServerPool } from "./MockServerPool"; beforeAll(() => { mockServerPool.listen(); diff --git a/src/management/tests/mock-server/withJson.ts b/src/management/tests/mock-server/withJson.ts index 7562e03eed..d687b23645 100644 --- a/src/management/tests/mock-server/withJson.ts +++ b/src/management/tests/mock-server/withJson.ts @@ -1,6 +1,6 @@ import { HttpResponseResolver, passthrough } from "msw"; -import { fromJson, toJson } from "../../core/json.js"; +import { fromJson, toJson } from "../../core/json"; /** * Creates a request matcher that validates if the request JSON body exactly matches the expected object diff --git a/src/management/tests/unit/auth/BasicAuth.test.ts b/src/management/tests/unit/auth/BasicAuth.test.ts index bc082fb45b..0539f0d9cc 100644 --- a/src/management/tests/unit/auth/BasicAuth.test.ts +++ b/src/management/tests/unit/auth/BasicAuth.test.ts @@ -1,4 +1,4 @@ -import { BasicAuth } from "../../../../../src/management/core/auth/BasicAuth.js"; +import { BasicAuth } from "../../../../../src/management/core/auth/BasicAuth"; describe("BasicAuth", () => { describe("toAuthorizationHeader", () => { @@ -18,5 +18,41 @@ describe("BasicAuth", () => { password: "password", }); }); + + it("handles password with colons", () => { + expect(BasicAuth.fromAuthorizationHeader("Basic dXNlcjpwYXNzOndvcmQ=")).toEqual({ + username: "user", + password: "pass:word", + }); + }); + + it("handles empty username and password (just colon)", () => { + expect(BasicAuth.fromAuthorizationHeader("Basic Og==")).toEqual({ + username: "", + password: "", + }); + }); + + it("handles empty username", () => { + expect(BasicAuth.fromAuthorizationHeader("Basic OnBhc3N3b3Jk")).toEqual({ + username: "", + password: "password", + }); + }); + + it("handles empty password", () => { + expect(BasicAuth.fromAuthorizationHeader("Basic dXNlcm5hbWU6")).toEqual({ + username: "username", + password: "", + }); + }); + + it("throws error for completely empty credentials", () => { + expect(() => BasicAuth.fromAuthorizationHeader("Basic ")).toThrow("Invalid basic auth"); + }); + + it("throws error for credentials without colon", () => { + expect(() => BasicAuth.fromAuthorizationHeader("Basic dXNlcm5hbWU=")).toThrow("Invalid basic auth"); + }); }); }); diff --git a/src/management/tests/unit/auth/BearerToken.test.ts b/src/management/tests/unit/auth/BearerToken.test.ts index 288d36ac4c..a10b7dd9d8 100644 --- a/src/management/tests/unit/auth/BearerToken.test.ts +++ b/src/management/tests/unit/auth/BearerToken.test.ts @@ -1,4 +1,4 @@ -import { BearerToken } from "../../../../../src/management/core/auth/BearerToken.js"; +import { BearerToken } from "../../../../../src/management/core/auth/BearerToken"; describe("BearerToken", () => { describe("toAuthorizationHeader", () => { diff --git a/src/management/tests/unit/base64.test.ts b/src/management/tests/unit/base64.test.ts index 5b9e41a25f..3a42594448 100644 --- a/src/management/tests/unit/base64.test.ts +++ b/src/management/tests/unit/base64.test.ts @@ -1,4 +1,4 @@ -import { base64Decode, base64Encode } from "../../../../src/management/core/base64.js"; +import { base64Decode, base64Encode } from "../../../../src/management/core/base64"; describe("base64", () => { describe("base64Encode", () => { diff --git a/src/management/tests/unit/fetcher/Fetcher.test.ts b/src/management/tests/unit/fetcher/Fetcher.test.ts index c6c0ff9a0a..c0d9c62fc9 100644 --- a/src/management/tests/unit/fetcher/Fetcher.test.ts +++ b/src/management/tests/unit/fetcher/Fetcher.test.ts @@ -2,8 +2,8 @@ import fs from "fs"; import stream from "stream"; import { join } from "path"; -import { Fetcher, fetcherImpl } from "../../../../../src/management/core/fetcher/Fetcher.js"; -import type { BinaryResponse } from "../../../../../src/management/core/index.js"; +import { Fetcher, fetcherImpl } from "../../../../../src/management/core/fetcher/Fetcher"; +import type { BinaryResponse } from "../../../../../src/management/core"; describe("Test fetcherImpl", () => { it("should handle successful request", async () => { diff --git a/src/management/tests/unit/fetcher/HttpResponsePromise.test.ts b/src/management/tests/unit/fetcher/HttpResponsePromise.test.ts index c7cd2c2f29..9730ea3550 100644 --- a/src/management/tests/unit/fetcher/HttpResponsePromise.test.ts +++ b/src/management/tests/unit/fetcher/HttpResponsePromise.test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, it, jest } from "@jest/globals"; -import { HttpResponsePromise } from "../../../../../src/management/core/fetcher/HttpResponsePromise.js"; -import { RawResponse, WithRawResponse } from "../../../../../src/management/core/fetcher/RawResponse.js"; +import { HttpResponsePromise } from "../../../../../src/management/core/fetcher/HttpResponsePromise"; +import { RawResponse, WithRawResponse } from "../../../../../src/management/core/fetcher/RawResponse"; describe("HttpResponsePromise", () => { const mockRawResponse: RawResponse = { diff --git a/src/management/tests/unit/fetcher/RawResponse.test.ts b/src/management/tests/unit/fetcher/RawResponse.test.ts index f57cbcdd9d..16e1a689a4 100644 --- a/src/management/tests/unit/fetcher/RawResponse.test.ts +++ b/src/management/tests/unit/fetcher/RawResponse.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "@jest/globals"; -import { toRawResponse } from "../../../../../src/management/core/fetcher/RawResponse.js"; +import { toRawResponse } from "../../../../../src/management/core/fetcher/RawResponse"; describe("RawResponse", () => { describe("toRawResponse", () => { diff --git a/src/management/tests/unit/fetcher/createRequestUrl.test.ts b/src/management/tests/unit/fetcher/createRequestUrl.test.ts index 2fcbe0315b..defbb8c77d 100644 --- a/src/management/tests/unit/fetcher/createRequestUrl.test.ts +++ b/src/management/tests/unit/fetcher/createRequestUrl.test.ts @@ -1,4 +1,4 @@ -import { createRequestUrl } from "../../../../../src/management/core/fetcher/createRequestUrl.js"; +import { createRequestUrl } from "../../../../../src/management/core/fetcher/createRequestUrl"; describe("Test createRequestUrl", () => { it("should return the base URL when no query parameters are provided", () => { diff --git a/src/management/tests/unit/fetcher/getRequestBody.test.ts b/src/management/tests/unit/fetcher/getRequestBody.test.ts index e473ff4715..886d813f47 100644 --- a/src/management/tests/unit/fetcher/getRequestBody.test.ts +++ b/src/management/tests/unit/fetcher/getRequestBody.test.ts @@ -1,5 +1,5 @@ -import { getRequestBody } from "../../../../../src/management/core/fetcher/getRequestBody.js"; -import { RUNTIME } from "../../../../../src/management/core/runtime/index.js"; +import { getRequestBody } from "../../../../../src/management/core/fetcher/getRequestBody"; +import { RUNTIME } from "../../../../../src/management/core/runtime"; describe("Test getRequestBody", () => { it("should stringify body if not FormData in Node environment", async () => { diff --git a/src/management/tests/unit/fetcher/getResponseBody.test.ts b/src/management/tests/unit/fetcher/getResponseBody.test.ts index 30eac64333..5dfe6cb6d8 100644 --- a/src/management/tests/unit/fetcher/getResponseBody.test.ts +++ b/src/management/tests/unit/fetcher/getResponseBody.test.ts @@ -1,5 +1,5 @@ -import { RUNTIME } from "../../../../../src/management/core/runtime/index.js"; -import { getResponseBody } from "../../../../../src/management/core/fetcher/getResponseBody.js"; +import { RUNTIME } from "../../../../../src/management/core/runtime"; +import { getResponseBody } from "../../../../../src/management/core/fetcher/getResponseBody"; describe("Test getResponseBody", () => { it("should handle blob response type", async () => { diff --git a/src/management/tests/unit/fetcher/makeRequest.test.ts b/src/management/tests/unit/fetcher/makeRequest.test.ts index d0bf674f81..4d77a6c950 100644 --- a/src/management/tests/unit/fetcher/makeRequest.test.ts +++ b/src/management/tests/unit/fetcher/makeRequest.test.ts @@ -1,4 +1,4 @@ -import { makeRequest } from "../../../../../src/management/core/fetcher/makeRequest.js"; +import { makeRequest } from "../../../../../src/management/core/fetcher/makeRequest"; describe("Test makeRequest", () => { const mockPostUrl = "https://httpbin.org/post"; diff --git a/src/management/tests/unit/fetcher/requestWithRetries.test.ts b/src/management/tests/unit/fetcher/requestWithRetries.test.ts index 50040e6902..695e5c1929 100644 --- a/src/management/tests/unit/fetcher/requestWithRetries.test.ts +++ b/src/management/tests/unit/fetcher/requestWithRetries.test.ts @@ -1,4 +1,4 @@ -import { requestWithRetries } from "../../../../../src/management/core/fetcher/requestWithRetries.js"; +import { requestWithRetries } from "../../../../../src/management/core/fetcher/requestWithRetries"; describe("requestWithRetries", () => { let mockFetch: jest.Mock; @@ -129,4 +129,107 @@ describe("requestWithRetries", () => { expect(response1.status).toBe(200); expect(response2.status).toBe(200); }); + + it("should respect retry-after header with seconds value", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch + .mockResolvedValueOnce( + new Response("", { + status: 429, + headers: new Headers({ "retry-after": "5" }), + }), + ) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 1); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 5000); // 5 seconds = 5000ms + expect(response.status).toBe(200); + }); + + it("should respect retry-after header with HTTP date value", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + const futureDate = new Date(Date.now() + 3000); // 3 seconds from now + mockFetch + .mockResolvedValueOnce( + new Response("", { + status: 429, + headers: new Headers({ "retry-after": futureDate.toUTCString() }), + }), + ) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 1); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + // Should use the date-based delay (approximately 3000ms, but with jitter) + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Number)); + const actualDelay = setTimeoutSpy.mock.calls[0][1]; + expect(actualDelay).toBeGreaterThan(2000); + expect(actualDelay).toBeLessThan(4000); + expect(response.status).toBe(200); + }); + + it("should respect x-ratelimit-reset header", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + const resetTime = Math.floor((Date.now() + 4000) / 1000); // 4 seconds from now in Unix timestamp + mockFetch + .mockResolvedValueOnce( + new Response("", { + status: 429, + headers: new Headers({ "x-ratelimit-reset": resetTime.toString() }), + }), + ) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 1); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + // Should use the x-ratelimit-reset delay (approximately 4000ms, but with positive jitter) + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), expect.any(Number)); + const actualDelay = setTimeoutSpy.mock.calls[0][1]; + expect(actualDelay).toBeGreaterThan(3000); + expect(actualDelay).toBeLessThan(6000); + expect(response.status).toBe(200); + }); + + it("should cap delay at MAX_RETRY_DELAY for large header values", async () => { + setTimeoutSpy = jest.spyOn(global, "setTimeout").mockImplementation((callback: (args: void) => void) => { + process.nextTick(callback); + return null as any; + }); + + mockFetch + .mockResolvedValueOnce( + new Response("", { + status: 429, + headers: new Headers({ "retry-after": "120" }), // 120 seconds = 120000ms > MAX_RETRY_DELAY (60000ms) + }), + ) + .mockResolvedValueOnce(new Response("", { status: 200 })); + + const responsePromise = requestWithRetries(() => mockFetch(), 1); + await jest.runAllTimersAsync(); + const response = await responsePromise; + + // Should be capped at MAX_RETRY_DELAY (60000ms) with jitter applied + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 60000); // Exactly MAX_RETRY_DELAY since jitter with 0.5 random keeps it at 60000 + expect(response.status).toBe(200); + }); }); diff --git a/src/management/tests/unit/fetcher/signals.test.ts b/src/management/tests/unit/fetcher/signals.test.ts index 2ef4af7dac..a957f16187 100644 --- a/src/management/tests/unit/fetcher/signals.test.ts +++ b/src/management/tests/unit/fetcher/signals.test.ts @@ -1,4 +1,4 @@ -import { anySignal, getTimeoutSignal } from "../../../../../src/management/core/fetcher/signals.js"; +import { anySignal, getTimeoutSignal } from "../../../../../src/management/core/fetcher/signals"; describe("Test getTimeoutSignal", () => { beforeEach(() => { diff --git a/src/management/tests/unit/file/file.test.ts b/src/management/tests/unit/file/file.test.ts index dc2f84a3f7..7bd4f373c6 100644 --- a/src/management/tests/unit/file/file.test.ts +++ b/src/management/tests/unit/file/file.test.ts @@ -1,10 +1,10 @@ import fs from "fs"; import { join } from "path"; import { Readable } from "stream"; -import { toBinaryUploadRequest, Uploadable } from "../../../../../src/management/core/file/index.js"; +import { toBinaryUploadRequest, Uploadable } from "../../../../../src/management/core/file/index"; describe("toBinaryUploadRequest", () => { - const TEST_FILE_PATH = join(__dirname, "test-file.txt"); + const TEST_FILE_PATH = join(__dirname, "..", "test-file.txt"); beforeEach(() => { jest.clearAllMocks(); @@ -394,48 +394,6 @@ describe("toBinaryUploadRequest", () => { "Content-Length": "21", // Should determine from file system (test file is 21 bytes) }); }); - - it("should handle Windows-style paths", async () => { - const input: Uploadable.FromPath = { - path: "C:\\Users\\test\\file.txt", - }; - - // Mock fs methods to avoid actual file system access - const mockStats = { size: 123 }; - const mockReadStream = {} as fs.ReadStream; - - const createReadStreamSpy = jest.spyOn(fs, "createReadStream").mockReturnValue(mockReadStream); - const statSpy = jest.spyOn(fs.promises, "stat").mockResolvedValue(mockStats as fs.Stats); - - const result = await toBinaryUploadRequest(input); - - expect(result.body).toBe(mockReadStream); - expect(result.headers).toEqual({ - "Content-Disposition": 'attachment; filename="file.txt"', // Should extract from Windows path - "Content-Length": "123", - }); - - // Restore mocks - createReadStreamSpy.mockRestore(); - statSpy.mockRestore(); - }); - - it("should handle file path when fs is not available", async () => { - const input: Uploadable.FromPath = { - path: TEST_FILE_PATH, - }; - - // Mock import to simulate environment without fs - const originalImport = jest.requireActual("fs"); - jest.doMock("fs", () => null); - - await expect(toBinaryUploadRequest(input)).rejects.toThrow( - "File path uploads are not supported in this environment.", - ); - - // Restore fs - jest.doMock("fs", () => originalImport); - }); }); describe("ArrayBufferView input", () => { diff --git a/src/management/tests/unit/form-data-utils/encodeAsFormParameter.test.ts b/src/management/tests/unit/form-data-utils/encodeAsFormParameter.test.ts index 4e0a4c88a8..dbea945725 100644 --- a/src/management/tests/unit/form-data-utils/encodeAsFormParameter.test.ts +++ b/src/management/tests/unit/form-data-utils/encodeAsFormParameter.test.ts @@ -1,4 +1,4 @@ -import { encodeAsFormParameter } from "../../../../../src/management/core/form-data-utils/encodeAsFormParameter.js"; +import { encodeAsFormParameter } from "../../../../../src/management/core/form-data-utils/encodeAsFormParameter"; describe("encodeAsFormParameter", () => { describe("Basic functionality", () => { diff --git a/src/management/tests/unit/form-data-utils/formDataWrapper.browser.test.ts b/src/management/tests/unit/form-data-utils/formDataWrapper.browser.test.ts deleted file mode 100644 index d12fa348fd..0000000000 --- a/src/management/tests/unit/form-data-utils/formDataWrapper.browser.test.ts +++ /dev/null @@ -1,378 +0,0 @@ -import { FormDataWrapper, newFormData } from "../../../../../src/management/core/form-data-utils/FormDataWrapper.js"; - -type FormDataRequest = ReturnType["getRequest"]>; - -async function getFormDataInfo(formRequest: FormDataRequest): Promise<{ - hasFile: boolean; - filename?: string; - contentType?: string; - serialized: string; -}> { - const request = new Request("http://localhost", { - ...formRequest, - method: "POST", - }); - const buffer = await request.arrayBuffer(); - const serialized = new TextDecoder().decode(buffer); - - const filenameMatch = serialized.match(/filename="([^"]+)"/); - const filename = filenameMatch ? filenameMatch[1] : undefined; - - const contentTypeMatch = serialized.match(/Content-Type: ([^\r\n]+)/); - const contentType = contentTypeMatch ? contentTypeMatch[1] : undefined; - - return { - hasFile: !!filename, - filename, - contentType, - serialized, - }; -} - -describe("FormDataWrapper - Browser Environment", () => { - let formData: FormDataWrapper; - - beforeEach(async () => { - formData = new FormDataWrapper(); - await formData.setup(); - }); - - describe("Web ReadableStream", () => { - it("serializes Web ReadableStream with filename", async () => { - const stream = new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode("web stream content")); - controller.close(); - }, - }); - - await formData.appendFile("file", stream, "webstream.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="webstream.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("webstream.txt"); - }); - - it("handles empty Web ReadableStream", async () => { - const stream = new ReadableStream({ - start(controller) { - controller.close(); - }, - }); - - await formData.appendFile("file", stream, "empty.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="empty.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("empty.txt"); - }); - }); - - describe("Browser-specific types", () => { - it("serializes Blob with specified filename and content type", async () => { - const blob = new Blob(["file content"], { type: "text/plain" }); - await formData.appendFile("file", blob, "testfile.txt"); - - const { serialized, hasFile, contentType, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="testfile.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("testfile.txt"); - expect(contentType).toBe("text/plain"); - }); - - it("serializes File and preserves filename", async () => { - const file = new File(["file content"], "testfile.txt", { type: "text/plain" }); - await formData.appendFile("file", file); - - const { serialized, hasFile, contentType, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="testfile.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("testfile.txt"); - expect(contentType).toBe("text/plain"); - }); - - it("allows filename override for File objects", async () => { - const file = new File(["file content"], "original.txt", { type: "text/plain" }); - await formData.appendFile("file", file, "override.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="override.txt"'); - expect(serialized).not.toContain('filename="original.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("override.txt"); - }); - }); - - describe("Binary data types", () => { - it("serializes ArrayBuffer with filename", async () => { - const arrayBuffer = new ArrayBuffer(8); - new Uint8Array(arrayBuffer).set([1, 2, 3, 4, 5, 6, 7, 8]); - - await formData.appendFile("file", arrayBuffer, "binary.bin"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="binary.bin"'); - expect(hasFile).toBe(true); - expect(filename).toBe("binary.bin"); - }); - - it("serializes Uint8Array with filename", async () => { - const uint8Array = new Uint8Array([72, 101, 108, 108, 111]); // "Hello" - await formData.appendFile("file", uint8Array, "binary.bin"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="binary.bin"'); - expect(hasFile).toBe(true); - expect(filename).toBe("binary.bin"); - }); - - it("serializes other typed arrays", async () => { - const int16Array = new Int16Array([1000, 2000, 3000]); - await formData.appendFile("file", int16Array, "numbers.bin"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="numbers.bin"'); - expect(hasFile).toBe(true); - expect(filename).toBe("numbers.bin"); - }); - }); - - describe("Text and primitive types", () => { - it("serializes string as regular form field", async () => { - formData.append("text", "test string"); - - const { serialized, hasFile } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="text"'); - expect(serialized).not.toContain("filename="); - expect(serialized).toContain("test string"); - expect(hasFile).toBe(false); - }); - - it("serializes string as file with filename", async () => { - await formData.appendFile("file", "test content", "text.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="text.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("text.txt"); - }); - - it("serializes numbers and booleans as strings", async () => { - formData.append("number", 12345); - formData.append("flag", true); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - expect(serialized).toContain("12345"); - expect(serialized).toContain("true"); - }); - }); - - describe("Object and JSON handling", () => { - it("serializes objects as JSON with filename", async () => { - const obj = { test: "value", nested: { key: "data" } }; - await formData.appendFile("data", obj, "data.json"); - - const { serialized, hasFile, contentType, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="data"'); - expect(serialized).toContain('filename="data.json"'); - expect(serialized).toContain("Content-Type: application/json"); - expect(hasFile).toBe(true); - expect(filename).toBe("data.json"); - expect(contentType).toBe("application/json"); - }); - - it("serializes arrays as JSON", async () => { - const arr = [1, 2, 3, "test"]; - await formData.appendFile("array", arr, "array.json"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="array"'); - expect(serialized).toContain('filename="array.json"'); - expect(hasFile).toBe(true); - expect(filename).toBe("array.json"); - }); - - it("handles null and undefined values", async () => { - formData.append("nullValue", null); - formData.append("undefinedValue", undefined); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - expect(serialized).toContain("null"); - expect(serialized).toContain("undefined"); - }); - }); - - describe("Filename extraction from objects", () => { - it("extracts filename from object with name property", async () => { - const namedValue = { name: "custom-name.txt", data: "content" }; - await formData.appendFile("file", namedValue); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="custom-name.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("custom-name.txt"); - }); - - it("extracts filename from object with path property", async () => { - const pathedValue = { path: "/some/path/file.txt", content: "data" }; - await formData.appendFile("file", pathedValue); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="file.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("file.txt"); - }); - - it("prioritizes explicit filename over object properties", async () => { - const namedValue = { name: "original.txt", data: "content" }; - await formData.appendFile("file", namedValue, "override.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file"'); - expect(serialized).toContain('filename="override.txt"'); - expect(serialized).not.toContain('filename="original.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("override.txt"); - }); - }); - - describe("Edge cases and error handling", () => { - it("handles empty filename gracefully", async () => { - await formData.appendFile("file", "content", ""); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('Content-Disposition: form-data; name="file"'); - expect(serialized).toContain('filename="blob"'); // Default fallback - expect(hasFile).toBe(true); - expect(filename).toBe("blob"); - }); - - it("handles large strings", async () => { - const largeString = "x".repeat(1000); - await formData.appendFile("large", largeString, "large.txt"); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="large"'); - expect(serialized).toContain('filename="large.txt"'); - expect(hasFile).toBe(true); - expect(filename).toBe("large.txt"); - }); - - it("handles unicode content and filenames", async () => { - const unicodeContent = "Hello 世界 🌍 Emoji 🚀"; - const unicodeFilename = "файл-тест-🌟.txt"; - - await formData.appendFile("unicode", unicodeContent, unicodeFilename); - - const { serialized, hasFile, filename } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="unicode"'); - expect(serialized).toContain(`filename="${unicodeFilename}"`); - expect(hasFile).toBe(true); - expect(filename).toBe(unicodeFilename); - }); - - it("handles multiple files in single form", async () => { - await formData.appendFile("file1", "content1", "file1.txt"); - await formData.appendFile("file2", "content2", "file2.txt"); - formData.append("text", "regular field"); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toContain('name="file1"'); - expect(serialized).toContain('filename="file1.txt"'); - - expect(serialized).toContain('name="file2"'); - expect(serialized).toContain('filename="file2.txt"'); - - expect(serialized).toContain('name="text"'); - expect(serialized).not.toContain('filename="text"'); - expect(serialized).toContain("regular field"); - }); - }); - - describe("Request structure", () => { - it("returns correct request structure", async () => { - await formData.appendFile("file", "content", "test.txt"); - - const request = formData.getRequest(); - - expect(request).toHaveProperty("body"); - expect(request).toHaveProperty("headers"); - expect(request).toHaveProperty("duplex"); - expect(request.body).toBeInstanceOf(FormData); - expect(request.headers).toEqual({}); - expect(request.duplex).toBe("half"); - }); - - it("generates proper multipart boundary structure", async () => { - await formData.appendFile("file", "test content", "test.txt"); - formData.append("field", "value"); - - const { serialized } = await getFormDataInfo(formData.getRequest()); - - expect(serialized).toMatch(/------formdata-undici-\w+|------WebKitFormBoundary\w+/); - expect(serialized).toContain("Content-Disposition: form-data;"); - expect(serialized).toMatch(/------formdata-undici-\w+--|------WebKitFormBoundary\w+--/); - }); - }); - - describe("Factory function", () => { - it("returns FormDataWrapper instance", async () => { - const formData = await newFormData(); - expect(formData).toBeInstanceOf(FormDataWrapper); - }); - - it("creates independent instances", async () => { - const formData1 = await newFormData(); - const formData2 = await newFormData(); - - await formData1.setup(); - await formData2.setup(); - - formData1.append("test1", "value1"); - formData2.append("test2", "value2"); - - const request1 = formData1.getRequest() as { body: FormData }; - const request2 = formData2.getRequest() as { body: FormData }; - - const entries1 = Array.from(request1.body.entries()); - const entries2 = Array.from(request2.body.entries()); - - expect(entries1).toHaveLength(1); - expect(entries2).toHaveLength(1); - expect(entries1[0][0]).toBe("test1"); - expect(entries2[0][0]).toBe("test2"); - }); - }); -}); diff --git a/src/management/tests/unit/form-data-utils/formDataWrapper.test.ts b/src/management/tests/unit/form-data-utils/formDataWrapper.test.ts index 560ac8618e..af822ceba0 100644 --- a/src/management/tests/unit/form-data-utils/formDataWrapper.test.ts +++ b/src/management/tests/unit/form-data-utils/formDataWrapper.test.ts @@ -1,7 +1,8 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { Readable } from "stream"; -import { FormDataWrapper, newFormData } from "../../../../../src/management/core/form-data-utils/FormDataWrapper.js"; +import { join } from "path"; import { File, Blob } from "buffer"; +import { FormDataWrapper, newFormData } from "../../../../../src/management/core/form-data-utils/FormDataWrapper"; // Helper function to serialize FormData to string for inspection async function serializeFormData(formData: FormData): Promise { @@ -22,10 +23,38 @@ describe("FormDataWrapper", () => { await formData.setup(); }); + it("Upload file by path", async () => { + await formData.appendFile("file", { + path: join(__dirname, "..", "test-file.txt"), + }); + + const serialized = await serializeFormData(formData.getRequest().body); + + expect(serialized).toContain('Content-Disposition: form-data; name="file"'); + expect(serialized).toContain('filename="test-file.txt"'); + expect(serialized).toContain("This is a test file!"); + }); + + it("Upload file by path with filename", async () => { + await formData.appendFile("file", { + path: join(__dirname, "..", "test-file.txt"), + filename: "custom-file.txt", + }); + + const serialized = await serializeFormData(formData.getRequest().body); + + expect(serialized).toContain('Content-Disposition: form-data; name="file"'); + expect(serialized).toContain('filename="custom-file.txt"'); + expect(serialized).toContain("This is a test file!"); + }); + describe("Stream handling", () => { it("serializes Node.js Readable stream with filename", async () => { const stream = Readable.from(["file content"]); - await formData.appendFile("file", stream, "testfile.txt"); + await formData.appendFile("file", { + data: stream, + filename: "testfile.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); @@ -56,7 +85,10 @@ describe("FormDataWrapper", () => { it("handles empty streams", async () => { const stream = Readable.from([]); - await formData.appendFile("file", stream, "empty.txt"); + await formData.appendFile("file", { + data: stream, + filename: "empty.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="empty.txt"'); @@ -71,7 +103,10 @@ describe("FormDataWrapper", () => { }, }); - await formData.appendFile("file", stream, "webstream.txt"); + await formData.appendFile("file", { + data: stream, + filename: "webstream.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="webstream.txt"'); @@ -85,7 +120,10 @@ describe("FormDataWrapper", () => { }, }); - await formData.appendFile("file", stream, "empty.txt"); + await formData.appendFile("file", { + data: stream, + filename: "empty.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="empty.txt"'); @@ -96,7 +134,10 @@ describe("FormDataWrapper", () => { describe("Blob and File types", () => { it("serializes Blob with specified filename", async () => { const blob = new Blob(["file content"], { type: "text/plain" }); - await formData.appendFile("file", blob, "testfile.txt"); + await formData.appendFile("file", { + data: blob, + filename: "testfile.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="testfile.txt"'); @@ -126,7 +167,10 @@ describe("FormDataWrapper", () => { it("allows filename override for File objects", async () => { if (typeof File !== "undefined") { const file = new File(["file content"], "original.txt", { type: "text/plain" }); - await formData.appendFile("file", file, "override.txt"); + await formData.appendFile("file", { + data: file, + filename: "override.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="override.txt"'); @@ -140,7 +184,10 @@ describe("FormDataWrapper", () => { const arrayBuffer = new ArrayBuffer(8); new Uint8Array(arrayBuffer).set([1, 2, 3, 4, 5, 6, 7, 8]); - await formData.appendFile("file", arrayBuffer, "binary.bin"); + await formData.appendFile("file", { + data: arrayBuffer, + filename: "binary.bin", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="binary.bin"'); @@ -149,7 +196,10 @@ describe("FormDataWrapper", () => { it("serializes Uint8Array with filename", async () => { const uint8Array = new Uint8Array([72, 101, 108, 108, 111]); // "Hello" - await formData.appendFile("file", uint8Array, "binary.bin"); + await formData.appendFile("file", { + data: uint8Array, + filename: "binary.bin", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="binary.bin"'); @@ -158,7 +208,10 @@ describe("FormDataWrapper", () => { it("serializes other typed arrays", async () => { const int16Array = new Int16Array([1000, 2000, 3000]); - await formData.appendFile("file", int16Array, "numbers.bin"); + await formData.appendFile("file", { + data: int16Array, + filename: "numbers.bin", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="numbers.bin"'); @@ -167,7 +220,10 @@ describe("FormDataWrapper", () => { it("serializes Buffer data with filename", async () => { if (typeof Buffer !== "undefined" && typeof Buffer.isBuffer === "function") { const buffer = Buffer.from("test content"); - await formData.appendFile("file", buffer, "test.txt"); + await formData.appendFile("file", { + data: buffer, + filename: "test.txt", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="test.txt"'); @@ -186,14 +242,6 @@ describe("FormDataWrapper", () => { expect(serialized).toContain("test string"); }); - it("serializes string as file with filename", async () => { - await formData.appendFile("file", "test content", "text.txt"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="text.txt"'); - expect(serialized).toContain("test content"); - }); - it("serializes numbers and booleans as strings", async () => { formData.append("number", 12345); formData.append("flag", true); @@ -204,94 +252,26 @@ describe("FormDataWrapper", () => { }); }); - describe("Object and JSON handling", () => { - it("serializes objects as JSON with filename", async () => { - const obj = { test: "value", nested: { key: "data" } }; - await formData.appendFile("data", obj, "data.json"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="data.json"'); - expect(serialized).toContain("Content-Type: application/json"); - expect(serialized).toContain(JSON.stringify(obj)); - }); - - it("serializes arrays as JSON", async () => { - const arr = [1, 2, 3, "test"]; - await formData.appendFile("array", arr, "array.json"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="array.json"'); - expect(serialized).toContain(JSON.stringify(arr)); - }); - - it("handles null and undefined values", async () => { - formData.append("nullValue", null); - formData.append("undefinedValue", undefined); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain("null"); - expect(serialized).toContain("undefined"); - }); - }); - - describe("Filename extraction from objects", () => { - it("extracts filename from object with name property", async () => { - const namedValue = { name: "custom-name.txt", data: "content" }; - await formData.appendFile("file", namedValue); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="custom-name.txt"'); - expect(serialized).toContain(JSON.stringify(namedValue)); - }); - - it("extracts filename from object with path property", async () => { - const pathedValue = { path: "/some/path/file.txt", content: "data" }; - await formData.appendFile("file", pathedValue); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="file.txt"'); - }); - - it("prioritizes explicit filename over object properties", async () => { - const namedValue = { name: "original.txt", data: "content" }; - await formData.appendFile("file", namedValue, "override.txt"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="override.txt"'); - expect(serialized).not.toContain('filename="original.txt"'); - }); - }); - describe("Edge cases and error handling", () => { it("handles empty filename gracefully", async () => { - await formData.appendFile("file", "content", ""); + await formData.appendFile("file", { + data: new Blob(["content"], { type: "text/plain" }), + filename: "", + }); const serialized = await serializeFormData(formData.getRequest().body); expect(serialized).toContain('filename="blob"'); // Default fallback }); - it("handles large strings", async () => { - const largeString = "x".repeat(1000); - await formData.appendFile("large", largeString, "large.txt"); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="large.txt"'); - }); - - it("handles unicode content and filenames", async () => { - const unicodeContent = "Hello 世界 🌍 Emoji 🚀"; - const unicodeFilename = "файл-тест-🌟.txt"; - - await formData.appendFile("unicode", unicodeContent, unicodeFilename); - - const serialized = await serializeFormData(formData.getRequest().body); - expect(serialized).toContain('filename="' + unicodeFilename + '"'); - expect(serialized).toContain(unicodeContent); - }); - it("handles multiple files in single form", async () => { - await formData.appendFile("file1", "content1", "file1.txt"); - await formData.appendFile("file2", "content2", "file2.txt"); + await formData.appendFile("file1", { + data: new Blob(["content1"], { type: "text/plain" }), + filename: "file1.txt", + }); + await formData.appendFile("file2", { + data: new Blob(["content2"], { type: "text/plain" }), + filename: "file2.txt", + }); formData.append("text", "regular field"); const serialized = await serializeFormData(formData.getRequest().body); @@ -305,7 +285,10 @@ describe("FormDataWrapper", () => { describe("Request structure", () => { it("returns correct request structure", async () => { - await formData.appendFile("file", "content", "test.txt"); + await formData.appendFile("file", { + data: new Blob(["content"], { type: "text/plain" }), + filename: "test.txt", + }); const request = formData.getRequest(); @@ -318,7 +301,10 @@ describe("FormDataWrapper", () => { }); it("generates proper multipart boundary structure", async () => { - await formData.appendFile("file", "test content", "test.txt"); + await formData.appendFile("file", { + data: new Blob(["test content"], { type: "text/plain" }), + filename: "test.txt", + }); formData.append("field", "value"); const serialized = await serializeFormData(formData.getRequest().body); diff --git a/src/management/tests/unit/file/test-file.txt b/src/management/tests/unit/test-file.txt similarity index 100% rename from src/management/tests/unit/file/test-file.txt rename to src/management/tests/unit/test-file.txt diff --git a/src/management/tests/unit/url/join.test.ts b/src/management/tests/unit/url/join.test.ts index e6eae99b73..28e842a807 100644 --- a/src/management/tests/unit/url/join.test.ts +++ b/src/management/tests/unit/url/join.test.ts @@ -1,4 +1,4 @@ -import { join } from "../../../../../src/management/core/url/index.js"; +import { join } from "../../../../../src/management/core/url/index"; describe("join", () => { describe("basic functionality", () => { diff --git a/src/management/tests/unit/url/qs.test.ts b/src/management/tests/unit/url/qs.test.ts index e27c585cf2..9390795fbf 100644 --- a/src/management/tests/unit/url/qs.test.ts +++ b/src/management/tests/unit/url/qs.test.ts @@ -1,4 +1,4 @@ -import { toQueryString } from "../../../../../src/management/core/url/index.js"; +import { toQueryString } from "../../../../../src/management/core/url/index"; describe("Test qs toQueryString", () => { describe("Basic functionality", () => { diff --git a/src/management/tests/unit/utils/setObjectProperty.test.ts b/src/management/tests/unit/utils/setObjectProperty.test.ts index 94e769b614..7dfa4085ee 100644 --- a/src/management/tests/unit/utils/setObjectProperty.test.ts +++ b/src/management/tests/unit/utils/setObjectProperty.test.ts @@ -1,4 +1,4 @@ -import { setObjectProperty } from "../../../../../src/management/core/utils/setObjectProperty.js"; +import { setObjectProperty } from "../../../../../src/management/core/utils/setObjectProperty"; interface TestCase { description: string; diff --git a/src/management/tests/wire/actions.test.ts b/src/management/tests/wire/actions.test.ts index 7039db4ebf..6fa1addaae 100644 --- a/src/management/tests/wire/actions.test.ts +++ b/src/management/tests/wire/actions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Actions", () => { - test("list (de854945)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,15 +61,22 @@ describe("Actions", () => { }, ], }; - const page = await client.actions.list(); - expect(expected.actions).toEqual(page.data); + const page = await client.actions.list({ + triggerId: "triggerId", + actionName: "actionName", + deployed: true, + page: 1, + per_page: 1, + installed: true, + }); + expect(expected.actions).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.actions).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +85,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -96,14 +97,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +109,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -128,14 +121,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (8b70817e)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name", supported_triggers: [{ id: "id" }] }; @@ -328,37 +317,10 @@ describe("Actions", () => { }); }); - test("create (a4d1ecb0)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "my-action", - supported_triggers: [ - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, - }; + const rawRequestBody = { name: "my-action", supported_triggers: [{ id: "id" }, { id: "id" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -375,67 +337,19 @@ describe("Actions", () => { supported_triggers: [ { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (4a4c8658)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "my-action", - supported_triggers: [ - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, - }; + const rawRequestBody = { name: "my-action", supported_triggers: [{ id: "id" }, { id: "id" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -452,67 +366,19 @@ describe("Actions", () => { supported_triggers: [ { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (465c9a5c)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "my-action", - supported_triggers: [ - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, - }; + const rawRequestBody = { name: "my-action", supported_triggers: [{ id: "id" }, { id: "id" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -529,67 +395,19 @@ describe("Actions", () => { supported_triggers: [ { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (b0575a28)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "my-action", - supported_triggers: [ - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - { - id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, - }, - ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, - }; + const rawRequestBody = { name: "my-action", supported_triggers: [{ id: "id" }, { id: "id" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -606,37 +424,16 @@ describe("Actions", () => { supported_triggers: [ { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, { id: "id", - version: undefined, - status: undefined, - runtimes: undefined, - default_runtime: undefined, - compatible_triggers: undefined, - binding_policy: undefined, }, ], - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - deploy: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (46076647)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -821,7 +618,7 @@ describe("Actions", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -836,14 +633,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -858,14 +651,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -880,14 +669,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -902,14 +687,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -924,24 +705,22 @@ describe("Actions", () => { await expect(async () => { return await client.actions.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); server.mockEndpoint().delete("/actions/actions/id").respondWith().statusCode(200).build(); - const response = await client.actions.delete("id"); + const response = await client.actions.delete("id", { + force: true, + }); expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -956,14 +735,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -978,14 +753,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1000,14 +771,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1022,14 +789,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1044,14 +807,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (228c94c0)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -1237,17 +996,10 @@ describe("Actions", () => { }); }); - test("update (340b6fa9)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1259,32 +1011,14 @@ describe("Actions", () => { .build(); await expect(async () => { - return await client.actions.update("id", { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.actions.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (49c60989)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1296,32 +1030,14 @@ describe("Actions", () => { .build(); await expect(async () => { - return await client.actions.update("id", { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.actions.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (9ecdcde5)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1333,32 +1049,14 @@ describe("Actions", () => { .build(); await expect(async () => { - return await client.actions.update("id", { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.actions.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (563934f5)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1370,32 +1068,14 @@ describe("Actions", () => { .build(); await expect(async () => { - return await client.actions.update("id", { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.actions.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (af3d152d)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1407,22 +1087,11 @@ describe("Actions", () => { .build(); await expect(async () => { - return await client.actions.update("id", { - name: undefined, - supported_triggers: undefined, - code: undefined, - dependencies: undefined, - runtime: undefined, - secrets: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.actions.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("deploy (3c9d4aa3)", async () => { + test("deploy (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1531,7 +1200,7 @@ describe("Actions", () => { }); }); - test("deploy (fcf9dbd1)", async () => { + test("deploy (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1546,14 +1215,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.deploy("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("deploy (49d52691)", async () => { + test("deploy (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1568,14 +1233,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.deploy("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deploy (2428808d)", async () => { + test("deploy (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1590,14 +1251,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.deploy("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deploy (27b44cb5)", async () => { + test("deploy (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1612,14 +1269,10 @@ describe("Actions", () => { await expect(async () => { return await client.actions.deploy("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("test (fb8827e5)", async () => { + test("test (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { payload: { key: "value" } }; @@ -1645,7 +1298,7 @@ describe("Actions", () => { }); }); - test("test (b097fe50)", async () => { + test("test (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { payload: { payload: { key: "value" } } }; @@ -1667,14 +1320,10 @@ describe("Actions", () => { }, }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("test (9e872578)", async () => { + test("test (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { payload: { payload: { key: "value" } } }; @@ -1696,14 +1345,10 @@ describe("Actions", () => { }, }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("test (3e1e6c7c)", async () => { + test("test (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { payload: { payload: { key: "value" } } }; @@ -1725,14 +1370,10 @@ describe("Actions", () => { }, }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("test (83f74648)", async () => { + test("test (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { payload: { payload: { key: "value" } } }; @@ -1754,10 +1395,6 @@ describe("Actions", () => { }, }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/actions/executions.test.ts b/src/management/tests/wire/actions/executions.test.ts index 47960da74a..c391f60695 100644 --- a/src/management/tests/wire/actions/executions.test.ts +++ b/src/management/tests/wire/actions/executions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Executions", () => { - test("get (1602c59b)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -46,7 +44,7 @@ describe("Executions", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -61,14 +59,10 @@ describe("Executions", () => { await expect(async () => { return await client.actions.executions.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -83,14 +77,10 @@ describe("Executions", () => { await expect(async () => { return await client.actions.executions.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -105,14 +95,10 @@ describe("Executions", () => { await expect(async () => { return await client.actions.executions.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -127,14 +113,10 @@ describe("Executions", () => { await expect(async () => { return await client.actions.executions.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -149,10 +131,6 @@ describe("Executions", () => { await expect(async () => { return await client.actions.executions.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/actions/triggers.test.ts b/src/management/tests/wire/actions/triggers.test.ts index 0519c50f1d..076927f065 100644 --- a/src/management/tests/wire/actions/triggers.test.ts +++ b/src/management/tests/wire/actions/triggers.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Triggers", () => { - test("list (83cbdda0)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -47,7 +45,7 @@ describe("Triggers", () => { }); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -56,14 +54,10 @@ describe("Triggers", () => { await expect(async () => { return await client.actions.triggers.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -72,14 +66,10 @@ describe("Triggers", () => { await expect(async () => { return await client.actions.triggers.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -88,14 +78,10 @@ describe("Triggers", () => { await expect(async () => { return await client.actions.triggers.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -104,10 +90,6 @@ describe("Triggers", () => { await expect(async () => { return await client.actions.triggers.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/actions/triggers/bindings.test.ts b/src/management/tests/wire/actions/triggers/bindings.test.ts index f0546dc695..61f64d3651 100644 --- a/src/management/tests/wire/actions/triggers/bindings.test.ts +++ b/src/management/tests/wire/actions/triggers/bindings.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Bindings", () => { - test("list (156a812f)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -47,15 +45,18 @@ describe("Bindings", () => { }, ], }; - const page = await client.actions.triggers.bindings.list("triggerId"); - expect(expected.bindings).toEqual(page.data); + const page = await client.actions.triggers.bindings.list("triggerId", { + page: 1, + per_page: 1, + }); + expect(expected.bindings).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.bindings).toEqual(nextPage.data); }); - test("list (c6a4d09b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -70,14 +71,10 @@ describe("Bindings", () => { await expect(async () => { return await client.actions.triggers.bindings.list("triggerId"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (ab956d4b)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -92,14 +89,10 @@ describe("Bindings", () => { await expect(async () => { return await client.actions.triggers.bindings.list("triggerId"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (435174f7)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -114,14 +107,10 @@ describe("Bindings", () => { await expect(async () => { return await client.actions.triggers.bindings.list("triggerId"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (6443ac9f)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -136,14 +125,10 @@ describe("Bindings", () => { await expect(async () => { return await client.actions.triggers.bindings.list("triggerId"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("updateMany (2ea09f96)", async () => { + test("updateMany (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -181,10 +166,10 @@ describe("Bindings", () => { }); }); - test("updateMany (effc6602)", async () => { + test("updateMany (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { bindings: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -196,20 +181,14 @@ describe("Bindings", () => { .build(); await expect(async () => { - return await client.actions.triggers.bindings.updateMany("triggerId", { - bindings: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.actions.triggers.bindings.updateMany("triggerId"); + }).rejects.toThrow(Management.BadRequestError); }); - test("updateMany (8fd2f49a)", async () => { + test("updateMany (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { bindings: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -221,20 +200,14 @@ describe("Bindings", () => { .build(); await expect(async () => { - return await client.actions.triggers.bindings.updateMany("triggerId", { - bindings: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.actions.triggers.bindings.updateMany("triggerId"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateMany (47f2615e)", async () => { + test("updateMany (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { bindings: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -246,20 +219,14 @@ describe("Bindings", () => { .build(); await expect(async () => { - return await client.actions.triggers.bindings.updateMany("triggerId", { - bindings: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.actions.triggers.bindings.updateMany("triggerId"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("updateMany (b41a216a)", async () => { + test("updateMany (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { bindings: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -271,13 +238,7 @@ describe("Bindings", () => { .build(); await expect(async () => { - return await client.actions.triggers.bindings.updateMany("triggerId", { - bindings: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.actions.triggers.bindings.updateMany("triggerId"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/actions/versions.test.ts b/src/management/tests/wire/actions/versions.test.ts index 2c2cb8da33..d4719f02e3 100644 --- a/src/management/tests/wire/actions/versions.test.ts +++ b/src/management/tests/wire/actions/versions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Versions", () => { - test("list (9b6673ae)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -69,15 +67,18 @@ describe("Versions", () => { }, ], }; - const page = await client.actions.versions.list("actionId"); - expect(expected.versions).toEqual(page.data); + const page = await client.actions.versions.list("actionId", { + page: 1, + per_page: 1, + }); + expect(expected.versions).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.versions).toEqual(nextPage.data); }); - test("list (4f66e55f)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -92,14 +93,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.list("actionId"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (a73309ef)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -114,14 +111,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.list("actionId"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (352abebb)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -136,14 +129,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.list("actionId"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (5f69aff3)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -158,14 +147,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.list("actionId"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (fe1f28e3)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -274,7 +259,7 @@ describe("Versions", () => { }); }); - test("get (2f818d9f)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -289,14 +274,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.get("actionId", "id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (e858d62f)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -311,14 +292,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.get("actionId", "id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (c30357fb)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -333,14 +310,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.get("actionId", "id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (9605349b)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -355,14 +328,10 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.get("actionId", "id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (429ebe33)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -377,66 +346,28 @@ describe("Versions", () => { await expect(async () => { return await client.actions.versions.get("actionId", "id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("deploy (5f2fffbe)", async () => { + test("deploy (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawResponseBody = { - id: "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d", - action_id: "910b1053-577f-4d81-a8c8-020e7319a38a", - code: "module.exports = () => {}", - dependencies: [ - { name: "name", version: "version", registry_url: "registry_url" }, - { name: "name", version: "version", registry_url: "registry_url" }, - ], + id: "id", + action_id: "action_id", + code: "code", + dependencies: [{ name: "name", version: "version", registry_url: "registry_url" }], deployed: true, - runtime: "node22", - secrets: [ - { name: "mySecret", updated_at: "2024-01-15T09:30:00Z" }, - { name: "mySecret", updated_at: "2024-01-15T09:30:00Z" }, - ], + runtime: "runtime", + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], status: "pending", number: 1.1, - errors: [ - { id: "id", msg: "msg", url: "url" }, - { id: "id", msg: "msg", url: "url" }, - ], + errors: [{ id: "id", msg: "msg", url: "url" }], action: { - id: "910b1053-577f-4d81-a8c8-020e7319a38a", - name: "my-action", - supported_triggers: [ - { - id: "id", - version: "version", - status: "status", - runtimes: ["runtimes", "runtimes"], - default_runtime: "default_runtime", - compatible_triggers: [ - { id: "id", version: "version" }, - { id: "id", version: "version" }, - ], - binding_policy: "trigger-bound", - }, - { - id: "id", - version: "version", - status: "status", - runtimes: ["runtimes", "runtimes"], - default_runtime: "default_runtime", - compatible_triggers: [ - { id: "id", version: "version" }, - { id: "id", version: "version" }, - ], - binding_policy: "trigger-bound", - }, - ], + id: "id", + name: "name", + supported_triggers: [{ id: "id" }], all_changes_deployed: true, created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", @@ -449,24 +380,9 @@ describe("Versions", () => { id: "id", version: "version", status: "status", - runtimes: ["runtimes", "runtimes"], - default_runtime: "default_runtime", - compatible_triggers: [ - { id: "id", version: "version" }, - { id: "id", version: "version" }, - ], - binding_policy: "trigger-bound", - }, - { - id: "id", - version: "version", - status: "status", - runtimes: ["runtimes", "runtimes"], + runtimes: ["runtimes"], default_runtime: "default_runtime", - compatible_triggers: [ - { id: "id", version: "version" }, - { id: "id", version: "version" }, - ], + compatible_triggers: [{ id: "id", version: "version" }], binding_policy: "trigger-bound", }, ], @@ -479,32 +395,23 @@ describe("Versions", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.actions.versions.deploy("id", "actionId", undefined); + const response = await client.actions.versions.deploy("actionId", "id"); expect(response).toEqual({ - id: "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d", - action_id: "910b1053-577f-4d81-a8c8-020e7319a38a", - code: "module.exports = () => {}", + id: "id", + action_id: "action_id", + code: "code", dependencies: [ { name: "name", version: "version", registry_url: "registry_url", }, - { - name: "name", - version: "version", - registry_url: "registry_url", - }, ], deployed: true, - runtime: "node22", + runtime: "runtime", secrets: [ { - name: "mySecret", - updated_at: "2024-01-15T09:30:00Z", - }, - { - name: "mySecret", + name: "name", updated_at: "2024-01-15T09:30:00Z", }, ], @@ -516,51 +423,13 @@ describe("Versions", () => { msg: "msg", url: "url", }, - { - id: "id", - msg: "msg", - url: "url", - }, ], action: { - id: "910b1053-577f-4d81-a8c8-020e7319a38a", - name: "my-action", + id: "id", + name: "name", supported_triggers: [ { id: "id", - version: "version", - status: "status", - runtimes: ["runtimes", "runtimes"], - default_runtime: "default_runtime", - compatible_triggers: [ - { - id: "id", - version: "version", - }, - { - id: "id", - version: "version", - }, - ], - binding_policy: "trigger-bound", - }, - { - id: "id", - version: "version", - status: "status", - runtimes: ["runtimes", "runtimes"], - default_runtime: "default_runtime", - compatible_triggers: [ - { - id: "id", - version: "version", - }, - { - id: "id", - version: "version", - }, - ], - binding_policy: "trigger-bound", }, ], all_changes_deployed: true, @@ -575,35 +444,13 @@ describe("Versions", () => { id: "id", version: "version", status: "status", - runtimes: ["runtimes", "runtimes"], - default_runtime: "default_runtime", - compatible_triggers: [ - { - id: "id", - version: "version", - }, - { - id: "id", - version: "version", - }, - ], - binding_policy: "trigger-bound", - }, - { - id: "id", - version: "version", - status: "status", - runtimes: ["runtimes", "runtimes"], + runtimes: ["runtimes"], default_runtime: "default_runtime", compatible_triggers: [ { id: "id", version: "version", }, - { - id: "id", - version: "version", - }, ], binding_policy: "trigger-bound", }, @@ -611,7 +458,7 @@ describe("Versions", () => { }); }); - test("deploy (b1a577f0)", async () => { + test("deploy (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -625,15 +472,11 @@ describe("Versions", () => { .build(); await expect(async () => { - return await client.actions.versions.deploy("id", "actionId", undefined); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.actions.versions.deploy("actionId", "id", undefined); + }).rejects.toThrow(Management.BadRequestError); }); - test("deploy (8c564298)", async () => { + test("deploy (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -647,15 +490,11 @@ describe("Versions", () => { .build(); await expect(async () => { - return await client.actions.versions.deploy("id", "actionId", undefined); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.actions.versions.deploy("actionId", "id", undefined); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deploy (b251bf9c)", async () => { + test("deploy (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -669,15 +508,11 @@ describe("Versions", () => { .build(); await expect(async () => { - return await client.actions.versions.deploy("id", "actionId", undefined); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.actions.versions.deploy("actionId", "id", undefined); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deploy (9f001568)", async () => { + test("deploy (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -691,11 +526,7 @@ describe("Versions", () => { .build(); await expect(async () => { - return await client.actions.versions.deploy("id", "actionId", undefined); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.actions.versions.deploy("actionId", "id", undefined); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/anomaly/blocks.test.ts b/src/management/tests/wire/anomaly/blocks.test.ts index df29f69acc..7e65467e99 100644 --- a/src/management/tests/wire/anomaly/blocks.test.ts +++ b/src/management/tests/wire/anomaly/blocks.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Blocks", () => { - test("checkIp (c7f0a6bf)", async () => { + test("checkIp (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -17,7 +15,7 @@ describe("Blocks", () => { expect(response).toEqual(undefined); }); - test("checkIp (8fc7d01b)", async () => { + test("checkIp (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -32,14 +30,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.checkIp("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("checkIp (55b74ccb)", async () => { + test("checkIp (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -54,14 +48,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.checkIp("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("checkIp (685d6077)", async () => { + test("checkIp (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -76,14 +66,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.checkIp("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("checkIp (1b190367)", async () => { + test("checkIp (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,14 +84,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.checkIp("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("checkIp (4a92501f)", async () => { + test("checkIp (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -120,14 +102,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.checkIp("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("unblockIp (c7f0a6bf)", async () => { + test("unblockIp (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -137,7 +115,7 @@ describe("Blocks", () => { expect(response).toEqual(undefined); }); - test("unblockIp (8fc7d01b)", async () => { + test("unblockIp (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -152,14 +130,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.unblockIp("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("unblockIp (55b74ccb)", async () => { + test("unblockIp (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -174,14 +148,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.unblockIp("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("unblockIp (685d6077)", async () => { + test("unblockIp (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -196,14 +166,10 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.unblockIp("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("unblockIp (4a92501f)", async () => { + test("unblockIp (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -218,10 +184,6 @@ describe("Blocks", () => { await expect(async () => { return await client.anomaly.blocks.unblockIp("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/attackProtection/breachedPasswordDetection.test.ts b/src/management/tests/wire/attackProtection/breachedPasswordDetection.test.ts index dc71c22f4f..d685223536 100644 --- a/src/management/tests/wire/attackProtection/breachedPasswordDetection.test.ts +++ b/src/management/tests/wire/attackProtection/breachedPasswordDetection.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("BreachedPasswordDetection", () => { - test("get (6e0fd73b)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -43,7 +41,7 @@ describe("BreachedPasswordDetection", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +56,10 @@ describe("BreachedPasswordDetection", () => { await expect(async () => { return await client.attackProtection.breachedPasswordDetection.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +74,10 @@ describe("BreachedPasswordDetection", () => { await expect(async () => { return await client.attackProtection.breachedPasswordDetection.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (ee1e23bf)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -102,14 +92,10 @@ describe("BreachedPasswordDetection", () => { await expect(async () => { return await client.attackProtection.breachedPasswordDetection.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (a8a94978)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -146,16 +132,10 @@ describe("BreachedPasswordDetection", () => { }); }); - test("update (e9a21948)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -167,30 +147,14 @@ describe("BreachedPasswordDetection", () => { .build(); await expect(async () => { - return await client.attackProtection.breachedPasswordDetection.update({ - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.attackProtection.breachedPasswordDetection.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (417344b0)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -202,30 +166,14 @@ describe("BreachedPasswordDetection", () => { .build(); await expect(async () => { - return await client.attackProtection.breachedPasswordDetection.update({ - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.attackProtection.breachedPasswordDetection.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (5e218094)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -237,30 +185,14 @@ describe("BreachedPasswordDetection", () => { .build(); await expect(async () => { - return await client.attackProtection.breachedPasswordDetection.update({ - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.attackProtection.breachedPasswordDetection.update(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (7d3b0da0)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -272,17 +204,7 @@ describe("BreachedPasswordDetection", () => { .build(); await expect(async () => { - return await client.attackProtection.breachedPasswordDetection.update({ - enabled: undefined, - shields: undefined, - admin_notification_frequency: undefined, - method: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.attackProtection.breachedPasswordDetection.update(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/attackProtection/bruteForceProtection.test.ts b/src/management/tests/wire/attackProtection/bruteForceProtection.test.ts index ccbb06ce8f..5063b939dc 100644 --- a/src/management/tests/wire/attackProtection/bruteForceProtection.test.ts +++ b/src/management/tests/wire/attackProtection/bruteForceProtection.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("BruteForceProtection", () => { - test("get (a5438e6)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -36,7 +34,7 @@ describe("BruteForceProtection", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -51,14 +49,10 @@ describe("BruteForceProtection", () => { await expect(async () => { return await client.attackProtection.bruteForceProtection.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -73,14 +67,10 @@ describe("BruteForceProtection", () => { await expect(async () => { return await client.attackProtection.bruteForceProtection.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (ee1e23bf)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -95,14 +85,10 @@ describe("BruteForceProtection", () => { await expect(async () => { return await client.attackProtection.bruteForceProtection.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (19878607)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -132,16 +118,10 @@ describe("BruteForceProtection", () => { }); }); - test("update (bddbaab)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -153,30 +133,14 @@ describe("BruteForceProtection", () => { .build(); await expect(async () => { - return await client.attackProtection.bruteForceProtection.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.attackProtection.bruteForceProtection.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (473ce91b)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -188,30 +152,14 @@ describe("BruteForceProtection", () => { .build(); await expect(async () => { - return await client.attackProtection.bruteForceProtection.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.attackProtection.bruteForceProtection.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (a1e10787)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -223,30 +171,14 @@ describe("BruteForceProtection", () => { .build(); await expect(async () => { - return await client.attackProtection.bruteForceProtection.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.attackProtection.bruteForceProtection.update(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (b0c543ef)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -258,17 +190,7 @@ describe("BruteForceProtection", () => { .build(); await expect(async () => { - return await client.attackProtection.bruteForceProtection.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - mode: undefined, - max_attempts: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.attackProtection.bruteForceProtection.update(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/attackProtection/suspiciousIpThrottling.test.ts b/src/management/tests/wire/attackProtection/suspiciousIpThrottling.test.ts index 6bd9822da7..57305dd744 100644 --- a/src/management/tests/wire/attackProtection/suspiciousIpThrottling.test.ts +++ b/src/management/tests/wire/attackProtection/suspiciousIpThrottling.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("SuspiciousIpThrottling", () => { - test("get (7bb00b70)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -43,7 +41,7 @@ describe("SuspiciousIpThrottling", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +56,10 @@ describe("SuspiciousIpThrottling", () => { await expect(async () => { return await client.attackProtection.suspiciousIpThrottling.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +74,10 @@ describe("SuspiciousIpThrottling", () => { await expect(async () => { return await client.attackProtection.suspiciousIpThrottling.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (ee1e23bf)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -102,14 +92,10 @@ describe("SuspiciousIpThrottling", () => { await expect(async () => { return await client.attackProtection.suspiciousIpThrottling.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (97c82195)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -146,10 +132,10 @@ describe("SuspiciousIpThrottling", () => { }); }); - test("update (9350b555)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { enabled: undefined, shields: undefined, allowlist: undefined, stage: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -161,23 +147,14 @@ describe("SuspiciousIpThrottling", () => { .build(); await expect(async () => { - return await client.attackProtection.suspiciousIpThrottling.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.attackProtection.suspiciousIpThrottling.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (4cd64c45)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { enabled: undefined, shields: undefined, allowlist: undefined, stage: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -189,23 +166,14 @@ describe("SuspiciousIpThrottling", () => { .build(); await expect(async () => { - return await client.attackProtection.suspiciousIpThrottling.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.attackProtection.suspiciousIpThrottling.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (793a1411)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { enabled: undefined, shields: undefined, allowlist: undefined, stage: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -217,23 +185,14 @@ describe("SuspiciousIpThrottling", () => { .build(); await expect(async () => { - return await client.attackProtection.suspiciousIpThrottling.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.attackProtection.suspiciousIpThrottling.update(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (8f63ece9)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { enabled: undefined, shields: undefined, allowlist: undefined, stage: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -245,16 +204,7 @@ describe("SuspiciousIpThrottling", () => { .build(); await expect(async () => { - return await client.attackProtection.suspiciousIpThrottling.update({ - enabled: undefined, - shields: undefined, - allowlist: undefined, - stage: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.attackProtection.suspiciousIpThrottling.update(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/branding.test.ts b/src/management/tests/wire/branding.test.ts index c6af908355..571bbc4aa7 100644 --- a/src/management/tests/wire/branding.test.ts +++ b/src/management/tests/wire/branding.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Branding", () => { - test("get (9ea64d27)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -33,7 +31,7 @@ describe("Branding", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -42,14 +40,10 @@ describe("Branding", () => { await expect(async () => { return await client.branding.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +52,10 @@ describe("Branding", () => { await expect(async () => { return await client.branding.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (ee1e23bf)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -74,14 +64,10 @@ describe("Branding", () => { await expect(async () => { return await client.branding.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (d3c5e108)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -114,10 +100,10 @@ describe("Branding", () => { }); }); - test("update (5e52e217)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { colors: undefined, favicon_url: undefined, logo_url: undefined, font: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -129,23 +115,14 @@ describe("Branding", () => { .build(); await expect(async () => { - return await client.branding.update({ - colors: undefined, - favicon_url: undefined, - logo_url: undefined, - font: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.branding.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (f81560e7)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { colors: undefined, favicon_url: undefined, logo_url: undefined, font: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -157,23 +134,14 @@ describe("Branding", () => { .build(); await expect(async () => { - return await client.branding.update({ - colors: undefined, - favicon_url: undefined, - logo_url: undefined, - font: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.branding.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (e05fcf3)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { colors: undefined, favicon_url: undefined, logo_url: undefined, font: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -185,23 +153,14 @@ describe("Branding", () => { .build(); await expect(async () => { - return await client.branding.update({ - colors: undefined, - favicon_url: undefined, - logo_url: undefined, - font: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.branding.update(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (b6a397eb)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { colors: undefined, favicon_url: undefined, logo_url: undefined, font: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -213,16 +172,7 @@ describe("Branding", () => { .build(); await expect(async () => { - return await client.branding.update({ - colors: undefined, - favicon_url: undefined, - logo_url: undefined, - font: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.branding.update(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/branding/phone/providers.test.ts b/src/management/tests/wire/branding/phone/providers.test.ts index cd9d425b5a..1773507166 100644 --- a/src/management/tests/wire/branding/phone/providers.test.ts +++ b/src/management/tests/wire/branding/phone/providers.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Providers", () => { - test("list (6ab63af)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -33,7 +31,9 @@ describe("Providers", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.branding.phone.providers.list(); + const response = await client.branding.phone.providers.list({ + disabled: true, + }); expect(response).toEqual({ providers: [ { @@ -53,7 +53,7 @@ describe("Providers", () => { }); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -68,14 +68,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +86,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +104,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -134,14 +122,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (b907e20b)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "twilio", credentials: { auth_token: "auth_token" } }; @@ -187,15 +171,10 @@ describe("Providers", () => { }); }); - test("create (b7f42448)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "twilio", - disabled: undefined, - configuration: undefined, - credentials: { auth_token: "x" }, - }; + const rawRequestBody = { name: "twilio", credentials: { auth_token: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -209,28 +188,17 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.create({ name: "twilio", - disabled: undefined, - configuration: undefined, credentials: { auth_token: "x", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (36de0fb0)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "twilio", - disabled: undefined, - configuration: undefined, - credentials: { auth_token: "x" }, - }; + const rawRequestBody = { name: "twilio", credentials: { auth_token: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -244,28 +212,17 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.create({ name: "twilio", - disabled: undefined, - configuration: undefined, credentials: { auth_token: "x", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (c38f4394)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "twilio", - disabled: undefined, - configuration: undefined, - credentials: { auth_token: "x" }, - }; + const rawRequestBody = { name: "twilio", credentials: { auth_token: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -279,28 +236,17 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.create({ name: "twilio", - disabled: undefined, - configuration: undefined, credentials: { auth_token: "x", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (59518a6c)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "twilio", - disabled: undefined, - configuration: undefined, - credentials: { auth_token: "x" }, - }; + const rawRequestBody = { name: "twilio", credentials: { auth_token: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -314,28 +260,17 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.create({ name: "twilio", - disabled: undefined, - configuration: undefined, credentials: { auth_token: "x", }, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (ee2d00a0)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "twilio", - disabled: undefined, - configuration: undefined, - credentials: { auth_token: "x" }, - }; + const rawRequestBody = { name: "twilio", credentials: { auth_token: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -349,20 +284,14 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.create({ name: "twilio", - disabled: undefined, - configuration: undefined, credentials: { auth_token: "x", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (9e4db2b9)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -402,7 +331,7 @@ describe("Providers", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -417,14 +346,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -439,14 +364,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -461,14 +382,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -483,14 +400,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -505,14 +418,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -522,7 +431,7 @@ describe("Providers", () => { expect(response).toEqual(undefined); }); - test("delete (49d52691)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -537,14 +446,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -559,14 +464,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -581,14 +482,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -603,14 +500,10 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (d5fb32ae)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -651,15 +544,10 @@ describe("Providers", () => { }); }); - test("update (c599498d)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -671,28 +559,14 @@ describe("Providers", () => { .build(); await expect(async () => { - return await client.branding.phone.providers.update("id", { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.branding.phone.providers.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (da62947d)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -704,28 +578,14 @@ describe("Providers", () => { .build(); await expect(async () => { - return await client.branding.phone.providers.update("id", { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.branding.phone.providers.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (1aeee49)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -737,28 +597,14 @@ describe("Providers", () => { .build(); await expect(async () => { - return await client.branding.phone.providers.update("id", { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.branding.phone.providers.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (1aeb9aa9)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -770,28 +616,14 @@ describe("Providers", () => { .build(); await expect(async () => { - return await client.branding.phone.providers.update("id", { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.branding.phone.providers.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (41bfa1e1)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -803,28 +635,14 @@ describe("Providers", () => { .build(); await expect(async () => { - return await client.branding.phone.providers.update("id", { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.branding.phone.providers.update("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("update (5c4438e1)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -836,20 +654,11 @@ describe("Providers", () => { .build(); await expect(async () => { - return await client.branding.phone.providers.update("id", { - name: undefined, - disabled: undefined, - credentials: undefined, - configuration: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.branding.phone.providers.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("test (793e0cd8)", async () => { + test("test (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { to: "to" }; @@ -872,10 +681,10 @@ describe("Providers", () => { }); }); - test("test (9a4c89af)", async () => { + test("test (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -889,19 +698,14 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("test (f81cd5bf)", async () => { + test("test (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -915,19 +719,14 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("test (f9f4d20b)", async () => { + test("test (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -941,19 +740,14 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("test (b570c96b)", async () => { + test("test (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -967,19 +761,14 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("test (70fbd503)", async () => { + test("test (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -993,19 +782,14 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("test (9b38c03)", async () => { + test("test (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1019,12 +803,7 @@ describe("Providers", () => { await expect(async () => { return await client.branding.phone.providers.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/branding/phone/templates.test.ts b/src/management/tests/wire/branding/phone/templates.test.ts index 6ccfb9a2a7..7505c58ef2 100644 --- a/src/management/tests/wire/branding/phone/templates.test.ts +++ b/src/management/tests/wire/branding/phone/templates.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Templates", () => { - test("list (828f05db)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -32,7 +30,9 @@ describe("Templates", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.branding.phone.templates.list(); + const response = await client.branding.phone.templates.list({ + disabled: true, + }); expect(response).toEqual({ templates: [ { @@ -48,7 +48,7 @@ describe("Templates", () => { }); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +63,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +81,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +99,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -129,14 +117,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (9bd36397)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -177,10 +161,10 @@ describe("Templates", () => { }); }); - test("create (1516a932)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { type: undefined, disabled: undefined, content: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -192,22 +176,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.create({ - type: undefined, - disabled: undefined, - content: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.branding.phone.templates.create(); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (fb33d08a)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { type: undefined, disabled: undefined, content: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -219,22 +195,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.create({ - type: undefined, - disabled: undefined, - content: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.branding.phone.templates.create(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (a1481a4e)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { type: undefined, disabled: undefined, content: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -246,22 +214,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.create({ - type: undefined, - disabled: undefined, - content: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.branding.phone.templates.create(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (91609346)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { type: undefined, disabled: undefined, content: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -273,22 +233,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.create({ - type: undefined, - disabled: undefined, - content: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.branding.phone.templates.create(); + }).rejects.toThrow(Management.ConflictError); }); - test("create (271466da)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { type: undefined, disabled: undefined, content: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -300,19 +252,11 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.create({ - type: undefined, - disabled: undefined, - content: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.branding.phone.templates.create(); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (a774a254)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -352,7 +296,7 @@ describe("Templates", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -367,14 +311,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -389,14 +329,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -411,14 +347,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -433,14 +365,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -455,14 +383,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -472,7 +396,7 @@ describe("Templates", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -487,14 +411,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -509,14 +429,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -531,14 +447,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -553,14 +465,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -575,14 +483,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (8876e08d)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -623,10 +527,10 @@ describe("Templates", () => { }); }); - test("update (8f28893a)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { content: undefined, disabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -638,21 +542,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.update("id", { - content: undefined, - disabled: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.branding.phone.templates.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (e8b8d2)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { content: undefined, disabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -664,21 +561,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.update("id", { - content: undefined, - disabled: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.branding.phone.templates.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (fcf69a76)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { content: undefined, disabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -690,21 +580,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.update("id", { - content: undefined, - disabled: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.branding.phone.templates.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (9c8db2ae)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { content: undefined, disabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -716,21 +599,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.update("id", { - content: undefined, - disabled: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.branding.phone.templates.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (f439c8c2)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { content: undefined, disabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -742,18 +618,11 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.branding.phone.templates.update("id", { - content: undefined, - disabled: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.branding.phone.templates.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("reset (fb61fe1)", async () => { + test("reset (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -796,7 +665,7 @@ describe("Templates", () => { }); }); - test("reset (cdfab77c)", async () => { + test("reset (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -814,14 +683,10 @@ describe("Templates", () => { return await client.branding.phone.templates.reset("id", { key: "value", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("reset (d04d8304)", async () => { + test("reset (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -839,14 +704,10 @@ describe("Templates", () => { return await client.branding.phone.templates.reset("id", { key: "value", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("reset (9e11d2e8)", async () => { + test("reset (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -864,14 +725,10 @@ describe("Templates", () => { return await client.branding.phone.templates.reset("id", { key: "value", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("reset (46b71c34)", async () => { + test("reset (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -889,14 +746,10 @@ describe("Templates", () => { return await client.branding.phone.templates.reset("id", { key: "value", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("test (e67fdf07)", async () => { + test("test (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { to: "to" }; @@ -918,10 +771,10 @@ describe("Templates", () => { }); }); - test("test (9a4c89af)", async () => { + test("test (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -935,19 +788,14 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("test (f81cd5bf)", async () => { + test("test (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -961,19 +809,14 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("test (f9f4d20b)", async () => { + test("test (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -987,19 +830,14 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("test (b570c96b)", async () => { + test("test (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1013,19 +851,14 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("test (9b38c03)", async () => { + test("test (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { to: "x", delivery_method: undefined }; + const rawRequestBody = { to: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1039,12 +872,7 @@ describe("Templates", () => { await expect(async () => { return await client.branding.phone.templates.test("id", { to: "x", - delivery_method: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/branding/templates.test.ts b/src/management/tests/wire/branding/templates.test.ts index 408fc1ba28..e4dedd0b6a 100644 --- a/src/management/tests/wire/branding/templates.test.ts +++ b/src/management/tests/wire/branding/templates.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Templates", () => { - test("getUniversalLogin (15e1b15e)", async () => { + test("getUniversalLogin (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("Templates", () => { }); }); - test("getUniversalLogin (1e230aeb)", async () => { + test("getUniversalLogin (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.getUniversalLogin(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getUniversalLogin (67cb641b)", async () => { + test("getUniversalLogin (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.getUniversalLogin(); - }).rejects.toThrow( - new Management.PaymentRequiredError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.PaymentRequiredError); }); - test("getUniversalLogin (af841397)", async () => { + test("getUniversalLogin (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.getUniversalLogin(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getUniversalLogin (c29c5807)", async () => { + test("getUniversalLogin (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.getUniversalLogin(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("getUniversalLogin (ee1e23bf)", async () => { + test("getUniversalLogin (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -129,14 +111,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.getUniversalLogin(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("updateUniversalLogin (557afd8d)", async () => { + test("updateUniversalLogin (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -153,7 +131,7 @@ describe("Templates", () => { expect(response).toEqual(undefined); }); - test("updateUniversalLogin (57675741)", async () => { + test("updateUniversalLogin (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -169,14 +147,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.updateUniversalLogin("string"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("updateUniversalLogin (f4b7c941)", async () => { + test("updateUniversalLogin (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -192,14 +166,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.updateUniversalLogin("string"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateUniversalLogin (c4ae8811)", async () => { + test("updateUniversalLogin (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -215,14 +185,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.updateUniversalLogin("string"); - }).rejects.toThrow( - new Management.PaymentRequiredError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.PaymentRequiredError); }); - test("updateUniversalLogin (6382ce7d)", async () => { + test("updateUniversalLogin (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -238,14 +204,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.updateUniversalLogin("string"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("updateUniversalLogin (b4d69145)", async () => { + test("updateUniversalLogin (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -261,14 +223,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.updateUniversalLogin("string"); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("updateUniversalLogin (a6434165)", async () => { + test("updateUniversalLogin (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = "string"; @@ -284,14 +242,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.updateUniversalLogin("string"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("deleteUniversalLogin (5465b825)", async () => { + test("deleteUniversalLogin (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -301,7 +255,7 @@ describe("Templates", () => { expect(response).toEqual(undefined); }); - test("deleteUniversalLogin (1e230aeb)", async () => { + test("deleteUniversalLogin (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -316,14 +270,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.deleteUniversalLogin(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteUniversalLogin (67cb641b)", async () => { + test("deleteUniversalLogin (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -338,14 +288,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.deleteUniversalLogin(); - }).rejects.toThrow( - new Management.PaymentRequiredError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.PaymentRequiredError); }); - test("deleteUniversalLogin (af841397)", async () => { + test("deleteUniversalLogin (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -360,14 +306,10 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.deleteUniversalLogin(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteUniversalLogin (ee1e23bf)", async () => { + test("deleteUniversalLogin (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -382,10 +324,6 @@ describe("Templates", () => { await expect(async () => { return await client.branding.templates.deleteUniversalLogin(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/branding/themes.test.ts b/src/management/tests/wire/branding/themes.test.ts index b52bd5da38..cf2dd3b840 100644 --- a/src/management/tests/wire/branding/themes.test.ts +++ b/src/management/tests/wire/branding/themes.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Themes", () => { - test("create (6c69f93)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -285,7 +283,7 @@ describe("Themes", () => { }); }); - test("create (198de0cc)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -301,10 +299,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -315,14 +310,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -371,10 +364,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -385,14 +375,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -435,14 +423,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (8ce8fcd4)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -458,10 +442,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -472,14 +453,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -528,10 +507,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -542,14 +518,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -592,14 +566,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (952cc9b8)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -615,10 +585,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -629,14 +596,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -685,10 +650,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -699,14 +661,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -749,14 +709,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (4f966b50)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -772,10 +728,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -786,14 +739,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -842,10 +793,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -856,14 +804,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -906,14 +852,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (9a077d84)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -929,10 +871,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -943,14 +882,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -999,10 +936,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -1013,14 +947,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -1063,14 +995,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("getDefault (6419cd01)", async () => { + test("getDefault (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1223,7 +1151,7 @@ describe("Themes", () => { }); }); - test("getDefault (1e230aeb)", async () => { + test("getDefault (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1238,14 +1166,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.getDefault(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getDefault (af841397)", async () => { + test("getDefault (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1260,14 +1184,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.getDefault(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getDefault (c29c5807)", async () => { + test("getDefault (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1282,14 +1202,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.getDefault(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("getDefault (ee1e23bf)", async () => { + test("getDefault (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1304,14 +1220,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.getDefault(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (3d39a7ed)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1464,7 +1376,7 @@ describe("Themes", () => { }); }); - test("get (3692e5c)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1479,14 +1391,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.get("themeId"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (5c1d1520)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1501,14 +1409,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.get("themeId"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e9ce5fd8)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1523,14 +1427,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.get("themeId"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (3019492c)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1545,14 +1445,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.get("themeId"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c8b74ba1)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1562,7 +1458,7 @@ describe("Themes", () => { expect(response).toEqual(undefined); }); - test("delete (3692e5c)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1577,14 +1473,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.delete("themeId"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (5c1d1520)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1599,14 +1491,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.delete("themeId"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e9ce5fd8)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1621,14 +1509,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.delete("themeId"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (3019492c)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1643,14 +1527,10 @@ describe("Themes", () => { await expect(async () => { return await client.branding.themes.delete("themeId"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (8d79fd57)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -1928,7 +1808,7 @@ describe("Themes", () => { }); }); - test("update (9ed9e803)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -1944,10 +1824,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -1958,14 +1835,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -2014,10 +1889,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2028,14 +1900,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -2078,14 +1948,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (7a8df013)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -2101,10 +1967,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2115,14 +1978,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -2171,10 +2032,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2185,14 +2043,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -2235,14 +2091,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (da76e17f)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -2258,10 +2110,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2272,14 +2121,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -2328,10 +2175,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2342,14 +2186,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -2392,14 +2234,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (3b51e3af)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -2415,10 +2253,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2429,14 +2264,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -2485,10 +2318,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2499,14 +2329,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -2549,14 +2377,10 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (eb8c8047)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -2572,10 +2396,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2586,14 +2407,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, size: 1.1 }, buttons_text: { bold: true, size: 1.1 }, @@ -2642,10 +2461,7 @@ describe("Themes", () => { widget_corner_radius: 1.1, }, colors: { - base_focus_color: undefined, - base_hover_color: undefined, body_text: "body_text", - captcha_widget_theme: undefined, error: "error", header: "header", icons: "icons", @@ -2656,14 +2472,12 @@ describe("Themes", () => { links_focused_components: "links_focused_components", primary_button: "primary_button", primary_button_label: "primary_button_label", - read_only_background: undefined, secondary_button_border: "secondary_button_border", secondary_button_label: "secondary_button_label", success: "success", widget_background: "widget_background", widget_border: "widget_border", }, - displayName: undefined, fonts: { body_text: { bold: true, @@ -2706,10 +2520,6 @@ describe("Themes", () => { social_buttons_layout: "bottom", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/clientGrants.test.ts b/src/management/tests/wire/clientGrants.test.ts index dab287fc76..29b0e3e369 100644 --- a/src/management/tests/wire/clientGrants.test.ts +++ b/src/management/tests/wire/clientGrants.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("ClientGrants", () => { - test("list (71245d34)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,15 +43,22 @@ describe("ClientGrants", () => { }, ], }; - const page = await client.clientGrants.list(); - expect(expected.client_grants).toEqual(page.data); + const page = await client.clientGrants.list({ + from: "from", + take: 1, + audience: "audience", + client_id: "client_id", + allow_any_organization: true, + subject_type: "client", + }); + expect(expected.client_grants).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.client_grants).toEqual(nextPage.data); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,14 +67,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +79,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,17 +91,13 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (a5547e74)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { client_id: "client_id", audience: "audience", scope: ["scope"] }; + const rawRequestBody = { client_id: "client_id", audience: "audience" }; const rawResponseBody = { id: "id", client_id: "client_id", @@ -128,7 +121,6 @@ describe("ClientGrants", () => { const response = await client.clientGrants.create({ client_id: "client_id", audience: "audience", - scope: ["scope"], }); expect(response).toEqual({ id: "id", @@ -143,18 +135,10 @@ describe("ClientGrants", () => { }); }); - test("create (7c8d492)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - client_id: "client_id", - audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = { client_id: "client_id", audience: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -169,31 +153,14 @@ describe("ClientGrants", () => { return await client.clientGrants.create({ client_id: "client_id", audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (27cf866a)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - client_id: "client_id", - audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = { client_id: "client_id", audience: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -208,31 +175,14 @@ describe("ClientGrants", () => { return await client.clientGrants.create({ client_id: "client_id", audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (773ce6ae)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - client_id: "client_id", - audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = { client_id: "client_id", audience: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -247,31 +197,14 @@ describe("ClientGrants", () => { return await client.clientGrants.create({ client_id: "client_id", audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (97f841e6)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - client_id: "client_id", - audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = { client_id: "client_id", audience: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -286,31 +219,14 @@ describe("ClientGrants", () => { return await client.clientGrants.create({ client_id: "client_id", audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (89c8f26)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - client_id: "client_id", - audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = { client_id: "client_id", audience: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -325,31 +241,14 @@ describe("ClientGrants", () => { return await client.clientGrants.create({ client_id: "client_id", audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (414d57ba)", async () => { + test("create (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - client_id: "client_id", - audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = { client_id: "client_id", audience: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -364,20 +263,11 @@ describe("ClientGrants", () => { return await client.clientGrants.create({ client_id: "client_id", audience: "x", - organization_usage: undefined, - allow_any_organization: undefined, - scope: ["scope", "scope"], - subject_type: undefined, - authorization_details_types: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -387,7 +277,7 @@ describe("ClientGrants", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -402,14 +292,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -424,14 +310,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -446,14 +328,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -468,14 +346,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.clientGrants.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (4944f99e)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -513,15 +387,10 @@ describe("ClientGrants", () => { }); }); - test("update (c6bee645)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -533,28 +402,14 @@ describe("ClientGrants", () => { .build(); await expect(async () => { - return await client.clientGrants.update("id", { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.clientGrants.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (6d8ad6f5)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -566,28 +421,14 @@ describe("ClientGrants", () => { .build(); await expect(async () => { - return await client.clientGrants.update("id", { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.clientGrants.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (373138c1)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -599,28 +440,14 @@ describe("ClientGrants", () => { .build(); await expect(async () => { - return await client.clientGrants.update("id", { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.clientGrants.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (d394df41)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -632,28 +459,14 @@ describe("ClientGrants", () => { .build(); await expect(async () => { - return await client.clientGrants.update("id", { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.clientGrants.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (11c7a199)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -665,16 +478,7 @@ describe("ClientGrants", () => { .build(); await expect(async () => { - return await client.clientGrants.update("id", { - scope: undefined, - organization_usage: undefined, - allow_any_organization: undefined, - authorization_details_types: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.clientGrants.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/clientGrants/organizations.test.ts b/src/management/tests/wire/clientGrants/organizations.test.ts index e8bbfbdc2a..f628d832e7 100644 --- a/src/management/tests/wire/clientGrants/organizations.test.ts +++ b/src/management/tests/wire/clientGrants/organizations.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Organizations", () => { - test("list (fd56f374)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -38,15 +36,18 @@ describe("Organizations", () => { }, ], }; - const page = await client.clientGrants.organizations.list("id"); - expect(expected.organizations).toEqual(page.data); + const page = await client.clientGrants.organizations.list("id", { + from: "from", + take: 1, + }); + expect(expected.organizations).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.organizations).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -61,14 +62,10 @@ describe("Organizations", () => { await expect(async () => { return await client.clientGrants.organizations.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -83,14 +80,10 @@ describe("Organizations", () => { await expect(async () => { return await client.clientGrants.organizations.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -105,14 +98,10 @@ describe("Organizations", () => { await expect(async () => { return await client.clientGrants.organizations.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -127,10 +116,6 @@ describe("Organizations", () => { await expect(async () => { return await client.clientGrants.organizations.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/clients.test.ts b/src/management/tests/wire/clients.test.ts index eae095ecab..83eaa9a15e 100644 --- a/src/management/tests/wire/clients.test.ts +++ b/src/management/tests/wire/clients.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Clients", () => { - test("list (82bb6102)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -44,6 +42,7 @@ describe("Clients", () => { custom_login_page_preview: "custom_login_page_preview", form_template: "form_template", token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value" }, initiate_login_uri: "initiate_login_uri", refresh_token: { rotation_type: "rotating", expiration_type: "expiring" }, @@ -53,14 +52,12 @@ describe("Clients", () => { organization_discovery_methods: ["email"], require_pushed_authorization_requests: true, require_proof_of_possession: true, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: {} }, - my_organization_configuration: { - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }, ], }; @@ -99,6 +96,7 @@ describe("Clients", () => { custom_login_page_preview: "custom_login_page_preview", form_template: "form_template", token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value", }, @@ -116,28 +114,36 @@ describe("Clients", () => { organization_discovery_methods: ["email"], require_pushed_authorization_requests: true, require_proof_of_possession: true, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: {}, }, - my_organization_configuration: { - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }, ], }; - const page = await client.clients.list(); - expect(expected.clients).toEqual(page.data); + const page = await client.clients.list({ + fields: "fields", + include_fields: true, + page: 1, + per_page: 1, + include_totals: true, + is_global: true, + is_first_party: true, + app_type: "app_type", + q: "q", + }); + expect(expected.clients).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.clients).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -146,14 +152,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -162,14 +164,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -178,14 +176,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -194,14 +188,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (de559b40)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; @@ -224,11 +214,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -345,6 +335,7 @@ describe("Clients", () => { sso_integration: { name: "name", version: "version" }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value" }, mobile: { android: { @@ -375,17 +366,12 @@ describe("Clients", () => { require_pushed_authorization_requests: true, require_proof_of_possession: true, signed_request_object: { required: true, credentials: [{ id: "id" }] }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { enforce: true, per_day: 1, per_hour: 1 } }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }; server .mockEndpoint() @@ -418,11 +404,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -611,6 +597,7 @@ describe("Clients", () => { }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value", }, @@ -674,7 +661,8 @@ describe("Clients", () => { }, ], }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { @@ -683,68 +671,15 @@ describe("Clients", () => { per_hour: 1, }, }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }); }); - test("create (b6910a5d)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -758,110 +693,14 @@ describe("Clients", () => { await expect(async () => { return await client.clients.create({ name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (466d3cd)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -875,110 +714,14 @@ describe("Clients", () => { await expect(async () => { return await client.clients.create({ name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (b9c2ae99)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -992,110 +735,14 @@ describe("Clients", () => { await expect(async () => { return await client.clients.create({ name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (5559a6b1)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1109,110 +756,14 @@ describe("Clients", () => { await expect(async () => { return await client.clients.create({ name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (70fc7571)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1226,60 +777,11 @@ describe("Clients", () => { await expect(async () => { return await client.clients.create({ name: "name", - description: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - grant_types: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - token_quota: undefined, - resource_server_identifier: undefined, - my_organization_configuration: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (46e9ffff)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1302,11 +804,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -1423,6 +925,7 @@ describe("Clients", () => { sso_integration: { name: "name", version: "version" }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value" }, mobile: { android: { @@ -1453,21 +956,19 @@ describe("Clients", () => { require_pushed_authorization_requests: true, require_proof_of_possession: true, signed_request_object: { required: true, credentials: [{ id: "id" }] }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { enforce: true, per_day: 1, per_hour: 1 } }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }; server.mockEndpoint().get("/clients/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.clients.get("id"); + const response = await client.clients.get("id", { + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ client_id: "client_id", tenant: "tenant", @@ -1487,11 +988,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -1680,6 +1181,7 @@ describe("Clients", () => { }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value", }, @@ -1743,7 +1245,8 @@ describe("Clients", () => { }, ], }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { @@ -1752,18 +1255,12 @@ describe("Clients", () => { per_hour: 1, }, }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1772,14 +1269,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1788,14 +1281,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1804,14 +1293,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1820,14 +1305,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1836,14 +1317,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1853,7 +1330,7 @@ describe("Clients", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1862,14 +1339,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1878,14 +1351,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1894,14 +1363,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1910,14 +1375,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (a303213e)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -1940,11 +1401,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -2061,6 +1522,7 @@ describe("Clients", () => { sso_integration: { name: "name", version: "version" }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value" }, mobile: { android: { @@ -2091,17 +1553,12 @@ describe("Clients", () => { require_pushed_authorization_requests: true, require_proof_of_possession: true, signed_request_object: { required: true, credentials: [{ id: "id" }] }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { enforce: true, per_day: 1, per_hour: 1 } }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }; server .mockEndpoint() @@ -2132,11 +1589,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -2325,6 +1782,7 @@ describe("Clients", () => { }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value", }, @@ -2388,7 +1846,8 @@ describe("Clients", () => { }, ], }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { @@ -2397,68 +1856,15 @@ describe("Clients", () => { per_hour: 1, }, }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }); }); - test("update (f06f957e)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -2470,112 +1876,14 @@ describe("Clients", () => { .build(); await expect(async () => { - return await client.clients.update("id", { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.clients.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (46274c86)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -2587,112 +1895,14 @@ describe("Clients", () => { .build(); await expect(async () => { - return await client.clients.update("id", { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.clients.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (7fbb04a)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -2704,112 +1914,14 @@ describe("Clients", () => { .build(); await expect(async () => { - return await client.clients.update("id", { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.clients.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (b21d2782)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -2821,112 +1933,14 @@ describe("Clients", () => { .build(); await expect(async () => { - return await client.clients.update("id", { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.clients.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (f248d2e6)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -2938,62 +1952,11 @@ describe("Clients", () => { .build(); await expect(async () => { - return await client.clients.update("id", { - name: undefined, - description: undefined, - client_secret: undefined, - logo_uri: undefined, - callbacks: undefined, - oidc_logout: undefined, - oidc_backchannel_logout: undefined, - session_transfer: undefined, - allowed_origins: undefined, - web_origins: undefined, - grant_types: undefined, - client_aliases: undefined, - allowed_clients: undefined, - allowed_logout_urls: undefined, - jwt_configuration: undefined, - encryption_key: undefined, - sso: undefined, - cross_origin_authentication: undefined, - cross_origin_loc: undefined, - sso_disabled: undefined, - custom_login_page_on: undefined, - token_endpoint_auth_method: undefined, - app_type: undefined, - is_first_party: undefined, - oidc_conformant: undefined, - custom_login_page: undefined, - custom_login_page_preview: undefined, - token_quota: undefined, - form_template: undefined, - addons: undefined, - client_metadata: undefined, - mobile: undefined, - initiate_login_uri: undefined, - native_social_login: undefined, - refresh_token: undefined, - default_organization: undefined, - organization_usage: undefined, - organization_require_behavior: undefined, - organization_discovery_methods: undefined, - client_authentication_methods: undefined, - require_pushed_authorization_requests: undefined, - require_proof_of_possession: undefined, - signed_request_object: undefined, - compliance_level: undefined, - par_request_expiry: undefined, - my_organization_configuration: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.clients.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("rotateSecret (46e9ffff)", async () => { + test("rotateSecret (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -3016,11 +1979,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -3137,6 +2100,7 @@ describe("Clients", () => { sso_integration: { name: "name", version: "version" }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value" }, mobile: { android: { @@ -3167,17 +2131,12 @@ describe("Clients", () => { require_pushed_authorization_requests: true, require_proof_of_possession: true, signed_request_object: { required: true, credentials: [{ id: "id" }] }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { enforce: true, per_day: 1, per_hour: 1 } }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }; server .mockEndpoint() @@ -3207,11 +2166,11 @@ describe("Clients", () => { allowed_logout_urls: ["allowed_logout_urls"], session_transfer: { can_create_session_transfer_token: true, + enforce_cascade_revocation: true, allowed_authentication_methods: ["cookie"], enforce_device_binding: "ip", allow_refresh_token: true, enforce_online_refresh_tokens: true, - enforce_cascade_revocation: true, }, oidc_logout: { backchannel_logout_urls: ["backchannel_logout_urls"], @@ -3400,6 +2359,7 @@ describe("Clients", () => { }, }, token_endpoint_auth_method: "none", + is_token_endpoint_ip_header_trusted: true, client_metadata: { key: "value", }, @@ -3463,7 +2423,8 @@ describe("Clients", () => { }, ], }, - compliance_level: "compliance_level", + compliance_level: "none", + skip_non_verifiable_callback_uri_confirmation_prompt: true, par_request_expiry: 1, token_quota: { client_credentials: { @@ -3472,18 +2433,12 @@ describe("Clients", () => { per_hour: 1, }, }, - my_organization_configuration: { - connection_profile_id: "connection_profile_id", - user_attribute_profile_id: "user_attribute_profile_id", - allowed_strategies: ["pingfederate"], - connection_deletion_behavior: "allow", - invitation_landing_client_id: "invitation_landing_client_id", - }, resource_server_identifier: "resource_server_identifier", + async_approval_notification_channels: ["guardian-push"], }); }); - test("rotateSecret (fcf9dbd1)", async () => { + test("rotateSecret (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -3498,14 +2453,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.rotateSecret("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("rotateSecret (49d52691)", async () => { + test("rotateSecret (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -3520,14 +2471,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.rotateSecret("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("rotateSecret (2428808d)", async () => { + test("rotateSecret (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -3542,14 +2489,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.rotateSecret("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("rotateSecret (e55ce3fd)", async () => { + test("rotateSecret (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -3564,14 +2507,10 @@ describe("Clients", () => { await expect(async () => { return await client.clients.rotateSecret("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("rotateSecret (27b44cb5)", async () => { + test("rotateSecret (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -3586,10 +2525,6 @@ describe("Clients", () => { await expect(async () => { return await client.clients.rotateSecret("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/clients/connections.test.ts b/src/management/tests/wire/clients/connections.test.ts index f4fc2374ee..aea439a588 100644 --- a/src/management/tests/wire/clients/connections.test.ts +++ b/src/management/tests/wire/clients/connections.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Connections", () => { - test("get (16925a40)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -22,6 +20,8 @@ describe("Connections", () => { realms: ["realms"], is_domain_connection: true, show_as_button: true, + authentication: { active: true }, + connected_accounts: { active: true }, }, ], next: "next", @@ -47,19 +47,30 @@ describe("Connections", () => { realms: ["realms"], is_domain_connection: true, show_as_button: true, + authentication: { + active: true, + }, + connected_accounts: { + active: true, + }, }, ], next: "next", }; - const page = await client.clients.connections.get("id"); - expect(expected.connections).toEqual(page.data); + const page = await client.clients.connections.get("id", { + from: "from", + take: 1, + fields: "fields", + include_fields: true, + }); + expect(expected.connections).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.connections).toEqual(nextPage.data); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -74,14 +85,10 @@ describe("Connections", () => { await expect(async () => { return await client.clients.connections.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -96,14 +103,10 @@ describe("Connections", () => { await expect(async () => { return await client.clients.connections.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -118,14 +121,10 @@ describe("Connections", () => { await expect(async () => { return await client.clients.connections.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -140,14 +139,10 @@ describe("Connections", () => { await expect(async () => { return await client.clients.connections.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -162,10 +157,6 @@ describe("Connections", () => { await expect(async () => { return await client.clients.connections.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/clients/credentials.test.ts b/src/management/tests/wire/clients/credentials.test.ts index bce5a0847f..b05271dc2e 100644 --- a/src/management/tests/wire/clients/credentials.test.ts +++ b/src/management/tests/wire/clients/credentials.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Credentials", () => { - test("list (ec1cd2b5)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -50,7 +48,7 @@ describe("Credentials", () => { ]); }); - test("list (2000e0cf)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +63,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.list("client_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (ad07341b)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -87,14 +81,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.list("client_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (4158c5bb)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -109,14 +99,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.list("client_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (977688d3)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -131,14 +117,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.list("client_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (a42d9a11)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { credential_type: "public_key" }; @@ -180,18 +162,10 @@ describe("Credentials", () => { }); }); - test("create (816cb1e6)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, - }; + const rawRequestBody = { credential_type: "public_key" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -205,32 +179,14 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.create("client_id", { credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (a2f9584e)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, - }; + const rawRequestBody = { credential_type: "public_key" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -244,32 +200,14 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.create("client_id", { credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (b014a0f2)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, - }; + const rawRequestBody = { credential_type: "public_key" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -283,32 +221,14 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.create("client_id", { credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (985718ea)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, - }; + const rawRequestBody = { credential_type: "public_key" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -322,32 +242,14 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.create("client_id", { credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (403cf5ee)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, - }; + const rawRequestBody = { credential_type: "public_key" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -361,21 +263,11 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.create("client_id", { credential_type: "public_key", - name: undefined, - subject_dn: undefined, - pem: undefined, - alg: undefined, - parse_expiry_from_cert: undefined, - expires_at: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (5863c725)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -414,7 +306,7 @@ describe("Credentials", () => { }); }); - test("get (144c20b3)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -429,14 +321,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.get("client_id", "credential_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (6e389f)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -451,14 +339,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.get("client_id", "credential_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (8f052c4f)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -473,14 +357,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.get("client_id", "credential_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (9820b8e7)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -495,14 +375,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.get("client_id", "credential_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (a6af3a93)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -517,7 +393,7 @@ describe("Credentials", () => { expect(response).toEqual(undefined); }); - test("delete (7d8cbea3)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -532,14 +408,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.delete("client_id", "credential_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (144c20b3)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -554,14 +426,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.delete("client_id", "credential_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (6e389f)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -576,14 +444,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.delete("client_id", "credential_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (9820b8e7)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -598,14 +462,10 @@ describe("Credentials", () => { await expect(async () => { return await client.clients.credentials.delete("client_id", "credential_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (8c223a3c)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -645,10 +505,10 @@ describe("Credentials", () => { }); }); - test("update (e7025ec8)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { expires_at: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -660,20 +520,14 @@ describe("Credentials", () => { .build(); await expect(async () => { - return await client.clients.credentials.update("client_id", "credential_id", { - expires_at: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.clients.credentials.update("client_id", "credential_id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (2eafea30)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { expires_at: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -685,20 +539,14 @@ describe("Credentials", () => { .build(); await expect(async () => { - return await client.clients.credentials.update("client_id", "credential_id", { - expires_at: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.clients.credentials.update("client_id", "credential_id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (d931a214)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { expires_at: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -710,20 +558,14 @@ describe("Credentials", () => { .build(); await expect(async () => { - return await client.clients.credentials.update("client_id", "credential_id", { - expires_at: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.clients.credentials.update("client_id", "credential_id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (73108bbc)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { expires_at: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -735,20 +577,14 @@ describe("Credentials", () => { .build(); await expect(async () => { - return await client.clients.credentials.update("client_id", "credential_id", { - expires_at: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.clients.credentials.update("client_id", "credential_id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (89a14720)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { expires_at: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -760,13 +596,7 @@ describe("Credentials", () => { .build(); await expect(async () => { - return await client.clients.credentials.update("client_id", "credential_id", { - expires_at: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.clients.credentials.update("client_id", "credential_id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/connections.test.ts b/src/management/tests/wire/connections.test.ts index 211d16fd81..a07966929c 100644 --- a/src/management/tests/wire/connections.test.ts +++ b/src/management/tests/wire/connections.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Connections", () => { - test("list (6b9db262)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -23,6 +21,8 @@ describe("Connections", () => { realms: ["realms"], is_domain_connection: true, show_as_button: true, + authentication: { active: true }, + connected_accounts: { active: true }, }, ], }; @@ -42,18 +42,30 @@ describe("Connections", () => { realms: ["realms"], is_domain_connection: true, show_as_button: true, + authentication: { + active: true, + }, + connected_accounts: { + active: true, + }, }, ], }; - const page = await client.connections.list(); - expect(expected.connections).toEqual(page.data); + const page = await client.connections.list({ + from: "from", + take: 1, + name: "name", + fields: "fields", + include_fields: true, + }); + expect(expected.connections).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.connections).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,14 +74,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +86,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +98,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -110,14 +110,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (a867ad7f)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name", strategy: "ad" }; @@ -132,6 +128,8 @@ describe("Connections", () => { is_domain_connection: true, show_as_button: true, metadata: { key: "value" }, + authentication: { active: true }, + connected_accounts: { active: true, cross_app_access: true }, }; server .mockEndpoint() @@ -161,23 +159,20 @@ describe("Connections", () => { metadata: { key: "value", }, + authentication: { + active: true, + }, + connected_accounts: { + active: true, + cross_app_access: true, + }, }); }); - test("create (2a64c026)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - display_name: undefined, - strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = { name: "name", strategy: "ad" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -191,36 +186,15 @@ describe("Connections", () => { await expect(async () => { return await client.connections.create({ name: "name", - display_name: undefined, strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (ac738e)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - display_name: undefined, - strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = { name: "name", strategy: "ad" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -234,36 +208,15 @@ describe("Connections", () => { await expect(async () => { return await client.connections.create({ name: "name", - display_name: undefined, strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (41837932)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - display_name: undefined, - strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = { name: "name", strategy: "ad" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -277,36 +230,15 @@ describe("Connections", () => { await expect(async () => { return await client.connections.create({ name: "name", - display_name: undefined, strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (3b15a04a)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - display_name: undefined, - strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = { name: "name", strategy: "ad" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -320,36 +252,15 @@ describe("Connections", () => { await expect(async () => { return await client.connections.create({ name: "name", - display_name: undefined, strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (7f3d7e2e)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "name", - display_name: undefined, - strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = { name: "name", strategy: "ad" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -363,23 +274,12 @@ describe("Connections", () => { await expect(async () => { return await client.connections.create({ name: "name", - display_name: undefined, strategy: "ad", - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (ade89e80)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -394,10 +294,15 @@ describe("Connections", () => { is_domain_connection: true, show_as_button: true, metadata: { key: "value" }, + authentication: { active: true }, + connected_accounts: { active: true, cross_app_access: true }, }; server.mockEndpoint().get("/connections/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.connections.get("id"); + const response = await client.connections.get("id", { + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ name: "name", display_name: "display_name", @@ -413,10 +318,17 @@ describe("Connections", () => { metadata: { key: "value", }, + authentication: { + active: true, + }, + connected_accounts: { + active: true, + cross_app_access: true, + }, }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -425,14 +337,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -441,14 +349,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -457,14 +361,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -473,14 +373,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -489,14 +385,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -506,7 +398,7 @@ describe("Connections", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -515,14 +407,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -531,14 +419,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -547,14 +431,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -563,14 +443,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (cb11b66d)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -585,6 +461,8 @@ describe("Connections", () => { is_domain_connection: true, show_as_button: true, metadata: { key: "value" }, + authentication: { active: true }, + connected_accounts: { active: true, cross_app_access: true }, }; server .mockEndpoint() @@ -611,21 +489,20 @@ describe("Connections", () => { metadata: { key: "value", }, + authentication: { + active: true, + }, + connected_accounts: { + active: true, + cross_app_access: true, + }, }); }); - test("update (9462f765)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -637,34 +514,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.connections.update("id", { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.connections.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (6930bf15)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -676,34 +533,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.connections.update("id", { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.connections.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (dfbc09e1)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -715,34 +552,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.connections.update("id", { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.connections.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (4b2f5761)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -754,34 +571,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.connections.update("id", { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.connections.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (1298ef39)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -793,34 +590,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.connections.update("id", { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.connections.update("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("update (d3277239)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -832,23 +609,11 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.connections.update("id", { - display_name: undefined, - options: undefined, - enabled_clients: undefined, - is_domain_connection: undefined, - show_as_button: undefined, - realms: undefined, - metadata: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.connections.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("checkStatus (c7f0a6bf)", async () => { + test("checkStatus (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -858,7 +623,7 @@ describe("Connections", () => { expect(response).toEqual(undefined); }); - test("checkStatus (fcf9dbd1)", async () => { + test("checkStatus (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -873,14 +638,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.checkStatus("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("checkStatus (49d52691)", async () => { + test("checkStatus (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -895,14 +656,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.checkStatus("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("checkStatus (2428808d)", async () => { + test("checkStatus (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -917,14 +674,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.checkStatus("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("checkStatus (e55ce3fd)", async () => { + test("checkStatus (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -939,14 +692,10 @@ describe("Connections", () => { await expect(async () => { return await client.connections.checkStatus("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("checkStatus (27b44cb5)", async () => { + test("checkStatus (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -961,10 +710,6 @@ describe("Connections", () => { await expect(async () => { return await client.connections.checkStatus("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/connections/clients.test.ts b/src/management/tests/wire/connections/clients.test.ts index d58df845c4..a8ce46cf7a 100644 --- a/src/management/tests/wire/connections/clients.test.ts +++ b/src/management/tests/wire/connections/clients.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Clients", () => { - test("get (e24df5f6)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -28,15 +26,18 @@ describe("Clients", () => { ], next: "next", }; - const page = await client.connections.clients.get("id"); - expect(expected.clients).toEqual(page.data); + const page = await client.connections.clients.get("id", { + take: 1, + from: "from", + }); + expect(expected.clients).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.clients).toEqual(nextPage.data); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -51,14 +52,10 @@ describe("Clients", () => { await expect(async () => { return await client.connections.clients.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -73,14 +70,10 @@ describe("Clients", () => { await expect(async () => { return await client.connections.clients.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -95,14 +88,10 @@ describe("Clients", () => { await expect(async () => { return await client.connections.clients.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -117,14 +106,10 @@ describe("Clients", () => { await expect(async () => { return await client.connections.clients.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -139,14 +124,10 @@ describe("Clients", () => { await expect(async () => { return await client.connections.clients.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (1f0972fc)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [{ client_id: "client_id", status: true }]; @@ -168,7 +149,7 @@ describe("Clients", () => { expect(response).toEqual(undefined); }); - test("update (41c86f41)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [ @@ -196,14 +177,10 @@ describe("Clients", () => { status: true, }, ]); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (4d8ee141)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [ @@ -231,14 +208,10 @@ describe("Clients", () => { status: true, }, ]); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (75dfa67d)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [ @@ -266,14 +239,10 @@ describe("Clients", () => { status: true, }, ]); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (b253166d)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [ @@ -301,14 +270,10 @@ describe("Clients", () => { status: true, }, ]); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (3dad9965)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [ @@ -336,10 +301,6 @@ describe("Clients", () => { status: true, }, ]); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/connections/keys.test.ts b/src/management/tests/wire/connections/keys.test.ts index e3df519ff8..97eb774ded 100644 --- a/src/management/tests/wire/connections/keys.test.ts +++ b/src/management/tests/wire/connections/keys.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Keys", () => { - test("get (cc2eb3d7)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -54,7 +52,7 @@ describe("Keys", () => { ]); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -69,14 +67,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -91,14 +85,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -113,14 +103,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -135,14 +121,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -157,24 +139,20 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("rotate (c26c3c4a)", async () => { + test("rotate (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawResponseBody = { kid: "kid", - cert: "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - pkcs: "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", + cert: "cert", + pkcs: "pkcs", next: true, - fingerprint: "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", - thumbprint: "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", + fingerprint: "fingerprint", + thumbprint: "thumbprint", algorithm: "algorithm", key_use: "encryption", subject_dn: "subject_dn", @@ -187,21 +165,21 @@ describe("Keys", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.connections.keys.rotate("id", undefined); + const response = await client.connections.keys.rotate("id"); expect(response).toEqual({ kid: "kid", - cert: "-----BEGIN CERTIFICATE-----\r\nMIIDDTCCA...YiA0TQhAt8=\r\n-----END CERTIFICATE-----", - pkcs: "-----BEGIN PKCS7-----\r\nMIIDPA....t8xAA==\r\n-----END PKCS7-----", + cert: "cert", + pkcs: "pkcs", next: true, - fingerprint: "CC:FB:DD:D8:9A:B5:DE:1B:F0:CC:36:D2:99:59:21:12:03:DD:A8:25", - thumbprint: "CCFBDDD89AB5DE1BF0CC36D29959211203DDA825", + fingerprint: "fingerprint", + thumbprint: "thumbprint", algorithm: "algorithm", key_use: "encryption", subject_dn: "subject_dn", }); }); - test("rotate (d28f28d8)", async () => { + test("rotate (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -216,14 +194,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.rotate("id", undefined); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("rotate (71ddf280)", async () => { + test("rotate (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -238,14 +212,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.rotate("id", undefined); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("rotate (f10aa4)", async () => { + test("rotate (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -260,14 +230,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.rotate("id", undefined); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("rotate (a7c96c4c)", async () => { + test("rotate (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -282,14 +248,10 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.rotate("id", undefined); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("rotate (10af8930)", async () => { + test("rotate (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -304,10 +266,6 @@ describe("Keys", () => { await expect(async () => { return await client.connections.keys.rotate("id", undefined); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/connections/scimConfiguration.test.ts b/src/management/tests/wire/connections/scimConfiguration.test.ts index 8d3359435f..38538532d8 100644 --- a/src/management/tests/wire/connections/scimConfiguration.test.ts +++ b/src/management/tests/wire/connections/scimConfiguration.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("ScimConfiguration", () => { - test("get (deaae478)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -47,7 +45,7 @@ describe("ScimConfiguration", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,14 +60,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (e55ce3fd)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -84,14 +78,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (c6baf55f)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -101,10 +91,7 @@ describe("ScimConfiguration", () => { strategy: "strategy", tenant_name: "tenant_name", user_id_attribute: "user_id_attribute", - mapping: [ - { auth0: "auth0", scim: "scim" }, - { auth0: "auth0", scim: "scim" }, - ], + mapping: [{ auth0: "auth0", scim: "scim" }], created_at: "created_at", updated_on: "updated_on", }; @@ -116,7 +103,7 @@ describe("ScimConfiguration", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.connections.scimConfiguration.create("id", undefined); + const response = await client.connections.scimConfiguration.create("id"); expect(response).toEqual({ connection_id: "connection_id", connection_name: "connection_name", @@ -128,17 +115,13 @@ describe("ScimConfiguration", () => { auth0: "auth0", scim: "scim", }, - { - auth0: "auth0", - scim: "scim", - }, ], created_at: "created_at", updated_on: "updated_on", }); }); - test("create (5333b51c)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -153,14 +136,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.create("id", undefined); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (ec713c00)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -175,14 +154,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.create("id", undefined); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -192,7 +167,7 @@ describe("ScimConfiguration", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -207,14 +182,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (e55ce3fd)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -229,14 +200,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (d53e2e15)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { user_id_attribute: "user_id_attribute", mapping: [{}] }; @@ -280,16 +247,10 @@ describe("ScimConfiguration", () => { }); }); - test("update (e5c18ae)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id_attribute: "user_id_attribute", - mapping: [ - { auth0: undefined, scim: undefined }, - { auth0: undefined, scim: undefined }, - ], - }; + const rawRequestBody = { user_id_attribute: "user_id_attribute", mapping: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -303,34 +264,15 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.update("id", { user_id_attribute: "user_id_attribute", - mapping: [ - { - auth0: undefined, - scim: undefined, - }, - { - auth0: undefined, - scim: undefined, - }, - ], + mapping: [{}, {}], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (a12fff32)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id_attribute: "user_id_attribute", - mapping: [ - { auth0: undefined, scim: undefined }, - { auth0: undefined, scim: undefined }, - ], - }; + const rawRequestBody = { user_id_attribute: "user_id_attribute", mapping: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -344,25 +286,12 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.update("id", { user_id_attribute: "user_id_attribute", - mapping: [ - { - auth0: undefined, - scim: undefined, - }, - { - auth0: undefined, - scim: undefined, - }, - ], + mapping: [{}, {}], }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("getDefaultMapping (baa4db3e)", async () => { + test("getDefaultMapping (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -386,7 +315,7 @@ describe("ScimConfiguration", () => { }); }); - test("getDefaultMapping (fcf9dbd1)", async () => { + test("getDefaultMapping (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -401,14 +330,10 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.getDefaultMapping("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getDefaultMapping (e55ce3fd)", async () => { + test("getDefaultMapping (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -423,10 +348,6 @@ describe("ScimConfiguration", () => { await expect(async () => { return await client.connections.scimConfiguration.getDefaultMapping("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); }); diff --git a/src/management/tests/wire/connections/scimConfiguration/tokens.test.ts b/src/management/tests/wire/connections/scimConfiguration/tokens.test.ts index e9619fee2a..81f5478487 100644 --- a/src/management/tests/wire/connections/scimConfiguration/tokens.test.ts +++ b/src/management/tests/wire/connections/scimConfiguration/tokens.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Tokens", () => { - test("get (f4f21c24)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -40,7 +38,7 @@ describe("Tokens", () => { ]); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -55,14 +53,10 @@ describe("Tokens", () => { await expect(async () => { return await client.connections.scimConfiguration.tokens.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (e55ce3fd)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -77,14 +71,10 @@ describe("Tokens", () => { await expect(async () => { return await client.connections.scimConfiguration.tokens.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (b46c72ad)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -114,10 +104,10 @@ describe("Tokens", () => { }); }); - test("create (ff486446)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { scopes: undefined, token_lifetime: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -129,21 +119,14 @@ describe("Tokens", () => { .build(); await expect(async () => { - return await client.connections.scimConfiguration.tokens.create("id", { - scopes: undefined, - token_lifetime: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.connections.scimConfiguration.tokens.create("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (5530a34a)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { scopes: undefined, token_lifetime: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -155,21 +138,14 @@ describe("Tokens", () => { .build(); await expect(async () => { - return await client.connections.scimConfiguration.tokens.create("id", { - scopes: undefined, - token_lifetime: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.connections.scimConfiguration.tokens.create("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (8e6474ea)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { scopes: undefined, token_lifetime: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -181,18 +157,11 @@ describe("Tokens", () => { .build(); await expect(async () => { - return await client.connections.scimConfiguration.tokens.create("id", { - scopes: undefined, - token_lifetime: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.connections.scimConfiguration.tokens.create("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("delete (793a239)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -207,7 +176,7 @@ describe("Tokens", () => { expect(response).toEqual(undefined); }); - test("delete (b713f0e0)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -222,14 +191,10 @@ describe("Tokens", () => { await expect(async () => { return await client.connections.scimConfiguration.tokens.delete("id", "tokenId"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (90a18d94)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -244,10 +209,6 @@ describe("Tokens", () => { await expect(async () => { return await client.connections.scimConfiguration.tokens.delete("id", "tokenId"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); }); diff --git a/src/management/tests/wire/connections/users.test.ts b/src/management/tests/wire/connections/users.test.ts index a7193877fe..88234cd7a7 100644 --- a/src/management/tests/wire/connections/users.test.ts +++ b/src/management/tests/wire/connections/users.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Users", () => { - test("deleteByEmail (e544883c)", async () => { + test("deleteByEmail (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -19,7 +17,7 @@ describe("Users", () => { expect(response).toEqual(undefined); }); - test("deleteByEmail (86695fb1)", async () => { + test("deleteByEmail (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -36,14 +34,10 @@ describe("Users", () => { return await client.connections.users.deleteByEmail("id", { email: "email", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("deleteByEmail (c5b92df1)", async () => { + test("deleteByEmail (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -60,14 +54,10 @@ describe("Users", () => { return await client.connections.users.deleteByEmail("id", { email: "email", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteByEmail (ccf05fed)", async () => { + test("deleteByEmail (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -84,14 +74,10 @@ describe("Users", () => { return await client.connections.users.deleteByEmail("id", { email: "email", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteByEmail (a8f4cc95)", async () => { + test("deleteByEmail (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -108,10 +94,6 @@ describe("Users", () => { return await client.connections.users.deleteByEmail("id", { email: "email", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/customDomains.test.ts b/src/management/tests/wire/customDomains.test.ts index 5c104c92ab..52421573f7 100644 --- a/src/management/tests/wire/customDomains.test.ts +++ b/src/management/tests/wire/customDomains.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("CustomDomains", () => { - test("list (5d649b9b)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -19,9 +17,20 @@ describe("CustomDomains", () => { status: "pending_verification", type: "auth0_managed_certs", origin_domain_name: "origin_domain_name", - verification: { methods: [{ name: "cname", record: "record" }] }, + verification: { + methods: [{ name: "cname", record: "record" }], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", + }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }, ]; server.mockEndpoint().get("/custom-domains").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -42,14 +51,23 @@ describe("CustomDomains", () => { record: "record", }, ], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }, ]); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +76,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -74,14 +88,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +100,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (51076508)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { domain: "domain", type: "auth0_managed_certs" }; @@ -107,9 +113,20 @@ describe("CustomDomains", () => { primary: true, status: "pending_verification", type: "auth0_managed_certs", - verification: { methods: [{ name: "cname", record: "record" }] }, + verification: { + methods: [{ name: "cname", record: "record" }], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", + }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }; server .mockEndpoint() @@ -137,22 +154,25 @@ describe("CustomDomains", () => { record: "record", }, ], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }); }); - test("create (fc5b69d7)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - domain: "domain", - type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, - }; + const rawRequestBody = { domain: "domain", type: "auth0_managed_certs" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -167,27 +187,14 @@ describe("CustomDomains", () => { return await client.customDomains.create({ domain: "domain", type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (6ed4ada7)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - domain: "domain", - type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, - }; + const rawRequestBody = { domain: "domain", type: "auth0_managed_certs" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -202,27 +209,14 @@ describe("CustomDomains", () => { return await client.customDomains.create({ domain: "domain", type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (49d6cdb3)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - domain: "domain", - type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, - }; + const rawRequestBody = { domain: "domain", type: "auth0_managed_certs" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -237,27 +231,14 @@ describe("CustomDomains", () => { return await client.customDomains.create({ domain: "domain", type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (dbe89dcb)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - domain: "domain", - type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, - }; + const rawRequestBody = { domain: "domain", type: "auth0_managed_certs" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -272,27 +253,14 @@ describe("CustomDomains", () => { return await client.customDomains.create({ domain: "domain", type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (38d619ab)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - domain: "domain", - type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, - }; + const rawRequestBody = { domain: "domain", type: "auth0_managed_certs" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -307,18 +275,11 @@ describe("CustomDomains", () => { return await client.customDomains.create({ domain: "domain", type: "auth0_managed_certs", - verification_method: undefined, - tls_policy: undefined, - custom_client_ip_header: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (50e36c51)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -329,9 +290,20 @@ describe("CustomDomains", () => { status: "pending_verification", type: "auth0_managed_certs", origin_domain_name: "origin_domain_name", - verification: { methods: [{ name: "cname", record: "record" }] }, + verification: { + methods: [{ name: "cname", record: "record" }], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", + }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }; server.mockEndpoint().get("/custom-domains/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -350,13 +322,22 @@ describe("CustomDomains", () => { record: "record", }, ], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -365,14 +346,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -381,14 +358,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -397,14 +370,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -413,14 +382,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -429,14 +394,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -446,7 +407,7 @@ describe("CustomDomains", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -461,14 +422,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -483,14 +440,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -505,14 +458,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -527,14 +476,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (89c9b9e)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -544,9 +489,20 @@ describe("CustomDomains", () => { primary: true, status: "pending_verification", type: "auth0_managed_certs", - verification: { methods: [{ name: "cname", record: "record" }] }, + verification: { + methods: [{ name: "cname", record: "record" }], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", + }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }; server .mockEndpoint() @@ -571,16 +527,25 @@ describe("CustomDomains", () => { record: "record", }, ], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }); }); - test("update (1ad4fbe6)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { tls_policy: undefined, custom_client_ip_header: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -592,21 +557,14 @@ describe("CustomDomains", () => { .build(); await expect(async () => { - return await client.customDomains.update("id", { - tls_policy: undefined, - custom_client_ip_header: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.customDomains.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (da08224e)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { tls_policy: undefined, custom_client_ip_header: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -618,21 +576,14 @@ describe("CustomDomains", () => { .build(); await expect(async () => { - return await client.customDomains.update("id", { - tls_policy: undefined, - custom_client_ip_header: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.customDomains.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (a0747af2)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { tls_policy: undefined, custom_client_ip_header: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -644,21 +595,14 @@ describe("CustomDomains", () => { .build(); await expect(async () => { - return await client.customDomains.update("id", { - tls_policy: undefined, - custom_client_ip_header: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.customDomains.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (a4a6fee)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { tls_policy: undefined, custom_client_ip_header: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -670,18 +614,11 @@ describe("CustomDomains", () => { .build(); await expect(async () => { - return await client.customDomains.update("id", { - tls_policy: undefined, - custom_client_ip_header: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.customDomains.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("test (d52f7dcb)", async () => { + test("test (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -701,7 +638,7 @@ describe("CustomDomains", () => { }); }); - test("test (fcf9dbd1)", async () => { + test("test (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -716,14 +653,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.test("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("test (49d52691)", async () => { + test("test (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -738,14 +671,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.test("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("test (2428808d)", async () => { + test("test (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -760,14 +689,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.test("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("test (e55ce3fd)", async () => { + test("test (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -782,14 +707,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.test("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("test (3a5dfad5)", async () => { + test("test (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -804,14 +725,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.test("id"); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("verify (4adc706b)", async () => { + test("verify (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -823,9 +740,20 @@ describe("CustomDomains", () => { type: "auth0_managed_certs", cname_api_key: "cname_api_key", origin_domain_name: "origin_domain_name", - verification: { methods: [{ name: "cname", record: "record" }] }, + verification: { + methods: [{ name: "cname", record: "record" }], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", + }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }; server .mockEndpoint() @@ -851,13 +779,22 @@ describe("CustomDomains", () => { record: "record", }, ], + status: "verified", + error_msg: "error_msg", + last_verified_at: "last_verified_at", }, custom_client_ip_header: "custom_client_ip_header", tls_policy: "tls_policy", + certificate: { + status: "provisioning", + error_msg: "error_msg", + certificate_authority: "letsencrypt", + renews_before: "renews_before", + }, }); }); - test("verify (fcf9dbd1)", async () => { + test("verify (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -872,14 +809,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.verify("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("verify (49d52691)", async () => { + test("verify (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -894,14 +827,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.verify("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("verify (2428808d)", async () => { + test("verify (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -916,14 +845,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.verify("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("verify (e55ce3fd)", async () => { + test("verify (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -938,14 +863,10 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.verify("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("verify (27b44cb5)", async () => { + test("verify (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -960,10 +881,6 @@ describe("CustomDomains", () => { await expect(async () => { return await client.customDomains.verify("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/deviceCredentials.test.ts b/src/management/tests/wire/deviceCredentials.test.ts index 7bcbaf498c..1534454876 100644 --- a/src/management/tests/wire/deviceCredentials.test.ts +++ b/src/management/tests/wire/deviceCredentials.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("DeviceCredentials", () => { - test("list (f7f51b7)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,15 +47,24 @@ describe("DeviceCredentials", () => { }, ], }; - const page = await client.deviceCredentials.list(); - expect(expected.device_credentials).toEqual(page.data); + const page = await client.deviceCredentials.list({ + page: 1, + per_page: 1, + include_totals: true, + fields: "fields", + include_fields: true, + user_id: "user_id", + client_id: "client_id", + type: "public_key", + }); + expect(expected.device_credentials).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.device_credentials).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -72,14 +79,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +97,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -116,14 +115,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -138,14 +133,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("createPublicKey (6bf0f16)", async () => { + test("createPublicKey (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -174,16 +165,10 @@ describe("DeviceCredentials", () => { }); }); - test("createPublicKey (4bc65d1b)", async () => { + test("createPublicKey (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - device_name: "x", - type: "public_key", - value: "x", - device_id: "device_id", - client_id: undefined, - }; + const rawRequestBody = { device_name: "x", type: "public_key", value: "x", device_id: "device_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -199,25 +184,14 @@ describe("DeviceCredentials", () => { device_name: "x", value: "x", device_id: "device_id", - client_id: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("createPublicKey (73f319cb)", async () => { + test("createPublicKey (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - device_name: "x", - type: "public_key", - value: "x", - device_id: "device_id", - client_id: undefined, - }; + const rawRequestBody = { device_name: "x", type: "public_key", value: "x", device_id: "device_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -233,25 +207,14 @@ describe("DeviceCredentials", () => { device_name: "x", value: "x", device_id: "device_id", - client_id: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("createPublicKey (43a7f577)", async () => { + test("createPublicKey (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - device_name: "x", - type: "public_key", - value: "x", - device_id: "device_id", - client_id: undefined, - }; + const rawRequestBody = { device_name: "x", type: "public_key", value: "x", device_id: "device_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -267,25 +230,14 @@ describe("DeviceCredentials", () => { device_name: "x", value: "x", device_id: "device_id", - client_id: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("createPublicKey (5a04990f)", async () => { + test("createPublicKey (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - device_name: "x", - type: "public_key", - value: "x", - device_id: "device_id", - client_id: undefined, - }; + const rawRequestBody = { device_name: "x", type: "public_key", value: "x", device_id: "device_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -301,25 +253,14 @@ describe("DeviceCredentials", () => { device_name: "x", value: "x", device_id: "device_id", - client_id: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("createPublicKey (891e351f)", async () => { + test("createPublicKey (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - device_name: "x", - type: "public_key", - value: "x", - device_id: "device_id", - client_id: undefined, - }; + const rawRequestBody = { device_name: "x", type: "public_key", value: "x", device_id: "device_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -335,16 +276,11 @@ describe("DeviceCredentials", () => { device_name: "x", value: "x", device_id: "device_id", - client_id: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -354,7 +290,7 @@ describe("DeviceCredentials", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -369,14 +305,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -391,14 +323,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -413,14 +341,10 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -435,10 +359,6 @@ describe("DeviceCredentials", () => { await expect(async () => { return await client.deviceCredentials.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/emailTemplates.test.ts b/src/management/tests/wire/emailTemplates.test.ts index 44caf776b3..96c6b8ae7b 100644 --- a/src/management/tests/wire/emailTemplates.test.ts +++ b/src/management/tests/wire/emailTemplates.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("EmailTemplates", () => { - test("create (57a851c3)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { template: "verify_email" }; @@ -47,20 +45,10 @@ describe("EmailTemplates", () => { }); }); - test("create (2950673f)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -74,36 +62,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.create({ template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (d5a196cf)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -117,36 +83,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.create({ template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (2fe2da1b)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -160,36 +104,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.create({ template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (87f15e93)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -203,36 +125,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.create({ template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (785c8ed3)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -246,23 +146,11 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.create({ template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (f7f2f263)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -299,7 +187,7 @@ describe("EmailTemplates", () => { }); }); - test("get (7b91a5cf)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -314,14 +202,10 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.get("verify_email"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (fbc4e15f)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -336,14 +220,10 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.get("verify_email"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (5f38062b)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -358,14 +238,10 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.get("verify_email"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (d9541e23)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -380,14 +256,10 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.get("verify_email"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (514c2a72)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { template: "verify_email" }; @@ -427,20 +299,10 @@ describe("EmailTemplates", () => { }); }); - test("set (5ae28ccb)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -454,36 +316,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.set("verify_email", { template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (2e3a953b)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -497,36 +337,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.set("verify_email", { template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (b42c4f27)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -540,36 +358,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.set("verify_email", { template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (ac443757)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -583,36 +379,14 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.set("verify_email", { template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("set (3465cd0f)", async () => { + test("set (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = { template: "verify_email" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -626,23 +400,11 @@ describe("EmailTemplates", () => { await expect(async () => { return await client.emailTemplates.set("verify_email", { template: "verify_email", - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (eaf199e)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -680,20 +442,10 @@ describe("EmailTemplates", () => { }); }); - test("update (2fc11c8a)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -705,38 +457,14 @@ describe("EmailTemplates", () => { .build(); await expect(async () => { - return await client.emailTemplates.update("verify_email", { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.emailTemplates.update("verify_email"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (81cf60e2)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -748,38 +476,14 @@ describe("EmailTemplates", () => { .build(); await expect(async () => { - return await client.emailTemplates.update("verify_email", { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.emailTemplates.update("verify_email"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (2c22746)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -791,38 +495,14 @@ describe("EmailTemplates", () => { .build(); await expect(async () => { - return await client.emailTemplates.update("verify_email", { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.emailTemplates.update("verify_email"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (f30efdfe)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -834,38 +514,14 @@ describe("EmailTemplates", () => { .build(); await expect(async () => { - return await client.emailTemplates.update("verify_email", { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.emailTemplates.update("verify_email"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (f25f3052)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -877,21 +533,7 @@ describe("EmailTemplates", () => { .build(); await expect(async () => { - return await client.emailTemplates.update("verify_email", { - template: undefined, - body: undefined, - from: undefined, - resultUrl: undefined, - subject: undefined, - syntax: undefined, - urlLifetimeInSeconds: undefined, - includeEmailInRedirect: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.emailTemplates.update("verify_email"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/emails/provider.test.ts b/src/management/tests/wire/emails/provider.test.ts index fa99753485..0421b59e9f 100644 --- a/src/management/tests/wire/emails/provider.test.ts +++ b/src/management/tests/wire/emails/provider.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Provider", () => { - test("get (7673666f)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,10 @@ describe("Provider", () => { }; server.mockEndpoint().get("/emails/provider").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.emails.provider.get(); + const response = await client.emails.provider.get({ + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ name: "name", enabled: true, @@ -44,7 +45,7 @@ describe("Provider", () => { }); }); - test("get (c60dd33b)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -53,14 +54,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.get(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (1e230aeb)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -69,14 +66,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +78,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (c29c5807)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -101,14 +90,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.get(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (ee1e23bf)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -117,14 +102,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (84659a02)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "mailgun", credentials: { api_key: "api_key" } }; @@ -173,16 +154,10 @@ describe("Provider", () => { }); }); - test("create (1f714c67)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "mailgun", - enabled: undefined, - default_from_address: undefined, - credentials: { api_key: "x" }, - settings: undefined, - }; + const rawRequestBody = { name: "mailgun", credentials: { api_key: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -196,30 +171,17 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.create({ name: "mailgun", - enabled: undefined, - default_from_address: undefined, credentials: { api_key: "x", }, - settings: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (5c64f77)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "mailgun", - enabled: undefined, - default_from_address: undefined, - credentials: { api_key: "x" }, - settings: undefined, - }; + const rawRequestBody = { name: "mailgun", credentials: { api_key: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -233,30 +195,17 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.create({ name: "mailgun", - enabled: undefined, - default_from_address: undefined, credentials: { api_key: "x", }, - settings: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (8695dd43)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "mailgun", - enabled: undefined, - default_from_address: undefined, - credentials: { api_key: "x" }, - settings: undefined, - }; + const rawRequestBody = { name: "mailgun", credentials: { api_key: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -270,30 +219,17 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.create({ name: "mailgun", - enabled: undefined, - default_from_address: undefined, credentials: { api_key: "x", }, - settings: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (ca42009b)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "mailgun", - enabled: undefined, - default_from_address: undefined, - credentials: { api_key: "x" }, - settings: undefined, - }; + const rawRequestBody = { name: "mailgun", credentials: { api_key: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -307,30 +243,17 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.create({ name: "mailgun", - enabled: undefined, - default_from_address: undefined, credentials: { api_key: "x", }, - settings: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (5d59403b)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "mailgun", - enabled: undefined, - default_from_address: undefined, - credentials: { api_key: "x" }, - settings: undefined, - }; + const rawRequestBody = { name: "mailgun", credentials: { api_key: "x" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -344,21 +267,14 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.create({ name: "mailgun", - enabled: undefined, - default_from_address: undefined, credentials: { api_key: "x", }, - settings: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (5465b825)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -368,7 +284,7 @@ describe("Provider", () => { expect(response).toEqual(undefined); }); - test("delete (c60dd33b)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -383,14 +299,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.delete(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (1e230aeb)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -405,14 +317,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.delete(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (af841397)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -427,14 +335,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.delete(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (c29c5807)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -449,14 +353,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.delete(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (ee1e23bf)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -471,14 +371,10 @@ describe("Provider", () => { await expect(async () => { return await client.emails.provider.delete(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (5152da64)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -522,16 +418,10 @@ describe("Provider", () => { }); }); - test("update (a53d6600)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -543,30 +433,14 @@ describe("Provider", () => { .build(); await expect(async () => { - return await client.emails.provider.update({ - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.emails.provider.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (a0619168)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -578,30 +452,14 @@ describe("Provider", () => { .build(); await expect(async () => { - return await client.emails.provider.update({ - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.emails.provider.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (6452706c)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -613,30 +471,14 @@ describe("Provider", () => { .build(); await expect(async () => { - return await client.emails.provider.update({ - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.emails.provider.update(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (ced159b4)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -648,30 +490,14 @@ describe("Provider", () => { .build(); await expect(async () => { - return await client.emails.provider.update({ - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.emails.provider.update(); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (ec70304)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -683,30 +509,14 @@ describe("Provider", () => { .build(); await expect(async () => { - return await client.emails.provider.update({ - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.emails.provider.update(); + }).rejects.toThrow(Management.ConflictError); }); - test("update (e683a4b8)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -718,17 +528,7 @@ describe("Provider", () => { .build(); await expect(async () => { - return await client.emails.provider.update({ - name: undefined, - enabled: undefined, - default_from_address: undefined, - credentials: undefined, - settings: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.emails.provider.update(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/eventStreams.test.ts b/src/management/tests/wire/eventStreams.test.ts index 858e571d02..1114f81e78 100644 --- a/src/management/tests/wire/eventStreams.test.ts +++ b/src/management/tests/wire/eventStreams.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("EventStreams", () => { - test("list (100aa399)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -30,7 +28,10 @@ describe("EventStreams", () => { ]; server.mockEndpoint().get("/event-streams").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.eventStreams.list(); + const response = await client.eventStreams.list({ + from: "from", + take: 1, + }); expect(response).toEqual([ { id: "id", @@ -53,7 +54,7 @@ describe("EventStreams", () => { ]); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,14 +63,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +75,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +87,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -110,14 +99,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (9827ccfd)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -189,12 +174,10 @@ describe("EventStreams", () => { }); }); - test("create (2da3b91f)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -202,7 +185,6 @@ describe("EventStreams", () => { webhook_authorization: { method: "basic", username: "username" }, }, }, - status: undefined, }; const rawResponseBody = { key: "value" }; server @@ -216,8 +198,6 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.create({ - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -228,21 +208,14 @@ describe("EventStreams", () => { }, }, }, - status: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (3f9ce1af)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -250,7 +223,6 @@ describe("EventStreams", () => { webhook_authorization: { method: "basic", username: "username" }, }, }, - status: undefined, }; const rawResponseBody = { key: "value" }; server @@ -264,8 +236,6 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.create({ - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -276,21 +246,14 @@ describe("EventStreams", () => { }, }, }, - status: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (40154f7b)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -298,7 +261,6 @@ describe("EventStreams", () => { webhook_authorization: { method: "basic", username: "username" }, }, }, - status: undefined, }; const rawResponseBody = { key: "value" }; server @@ -312,8 +274,6 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.create({ - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -324,21 +284,14 @@ describe("EventStreams", () => { }, }, }, - status: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (8c25ddf3)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -346,7 +299,6 @@ describe("EventStreams", () => { webhook_authorization: { method: "basic", username: "username" }, }, }, - status: undefined, }; const rawResponseBody = { key: "value" }; server @@ -360,8 +312,6 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.create({ - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -372,21 +322,14 @@ describe("EventStreams", () => { }, }, }, - status: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (1bf42db3)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -394,7 +337,6 @@ describe("EventStreams", () => { webhook_authorization: { method: "basic", username: "username" }, }, }, - status: undefined, }; const rawResponseBody = { key: "value" }; server @@ -408,8 +350,6 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.create({ - name: undefined, - subscriptions: undefined, destination: { type: "webhook", configuration: { @@ -420,16 +360,11 @@ describe("EventStreams", () => { }, }, }, - status: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (aa29b253)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -475,7 +410,7 @@ describe("EventStreams", () => { }); }); - test("get (49d52691)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -484,14 +419,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -500,14 +431,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -516,14 +443,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -532,14 +455,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -549,7 +468,7 @@ describe("EventStreams", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -564,14 +483,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -586,14 +501,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -608,14 +519,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -630,14 +537,10 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (7058c36)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -690,10 +593,10 @@ describe("EventStreams", () => { }); }); - test("update (5bebf7a0)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subscriptions: undefined, destination: undefined, status: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -705,23 +608,14 @@ describe("EventStreams", () => { .build(); await expect(async () => { - return await client.eventStreams.update("id", { - name: undefined, - subscriptions: undefined, - destination: undefined, - status: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.eventStreams.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (9225bd88)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subscriptions: undefined, destination: undefined, status: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -733,23 +627,14 @@ describe("EventStreams", () => { .build(); await expect(async () => { - return await client.eventStreams.update("id", { - name: undefined, - subscriptions: undefined, - destination: undefined, - status: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.eventStreams.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (63478e0c)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subscriptions: undefined, destination: undefined, status: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -761,23 +646,14 @@ describe("EventStreams", () => { .build(); await expect(async () => { - return await client.eventStreams.update("id", { - name: undefined, - subscriptions: undefined, - destination: undefined, - status: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.eventStreams.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (40634d58)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subscriptions: undefined, destination: undefined, status: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -789,20 +665,11 @@ describe("EventStreams", () => { .build(); await expect(async () => { - return await client.eventStreams.update("id", { - name: undefined, - subscriptions: undefined, - destination: undefined, - status: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.eventStreams.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("test (61d8a8ec)", async () => { + test("test (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { event_type: "user.created" }; @@ -856,10 +723,10 @@ describe("EventStreams", () => { }); }); - test("test (43e25e9b)", async () => { + test("test (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { event_type: "user.created", data: undefined }; + const rawRequestBody = { event_type: "user.created" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -873,19 +740,14 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.test("id", { event_type: "user.created", - data: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("test (fd267907)", async () => { + test("test (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { event_type: "user.created", data: undefined }; + const rawRequestBody = { event_type: "user.created" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -899,19 +761,14 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.test("id", { event_type: "user.created", - data: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("test (2a35cd6f)", async () => { + test("test (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { event_type: "user.created", data: undefined }; + const rawRequestBody = { event_type: "user.created" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -925,12 +782,7 @@ describe("EventStreams", () => { await expect(async () => { return await client.eventStreams.test("id", { event_type: "user.created", - data: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/eventStreams/deliveries.test.ts b/src/management/tests/wire/eventStreams/deliveries.test.ts index 4827fb7c25..91822b9bef 100644 --- a/src/management/tests/wire/eventStreams/deliveries.test.ts +++ b/src/management/tests/wire/eventStreams/deliveries.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Deliveries", () => { - test("list (d5485639)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -36,7 +34,14 @@ describe("Deliveries", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.eventStreams.deliveries.list("id"); + const response = await client.eventStreams.deliveries.list("id", { + statuses: "statuses", + event_types: "event_types", + date_from: "date_from", + date_to: "date_to", + from: "from", + take: 1, + }); expect(response).toEqual([ { id: "id", @@ -61,7 +66,7 @@ describe("Deliveries", () => { ]); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -76,14 +81,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,14 +99,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -120,14 +117,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -142,14 +135,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -164,14 +153,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("getHistory (6ad5f31)", async () => { + test("getHistory (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -222,7 +207,7 @@ describe("Deliveries", () => { }); }); - test("getHistory (5f4af0c0)", async () => { + test("getHistory (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -237,14 +222,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.getHistory("id", "event_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getHistory (656e16e4)", async () => { + test("getHistory (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -259,14 +240,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.getHistory("id", "event_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getHistory (c5167f8c)", async () => { + test("getHistory (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -281,14 +258,10 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.getHistory("id", "event_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("getHistory (248b4f70)", async () => { + test("getHistory (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -303,10 +276,6 @@ describe("Deliveries", () => { await expect(async () => { return await client.eventStreams.deliveries.getHistory("id", "event_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/eventStreams/redeliveries.test.ts b/src/management/tests/wire/eventStreams/redeliveries.test.ts index 7801856a09..efdc27057d 100644 --- a/src/management/tests/wire/eventStreams/redeliveries.test.ts +++ b/src/management/tests/wire/eventStreams/redeliveries.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Redeliveries", () => { - test("create (c82a2e32)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -35,15 +33,10 @@ describe("Redeliveries", () => { }); }); - test("create (14b6d1c6)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -55,28 +48,14 @@ describe("Redeliveries", () => { .build(); await expect(async () => { - return await client.eventStreams.redeliveries.create("id", { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.eventStreams.redeliveries.create("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (cee09d8a)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -88,28 +67,14 @@ describe("Redeliveries", () => { .build(); await expect(async () => { - return await client.eventStreams.redeliveries.create("id", { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.eventStreams.redeliveries.create("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (8d0f2dc2)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -121,28 +86,14 @@ describe("Redeliveries", () => { .build(); await expect(async () => { - return await client.eventStreams.redeliveries.create("id", { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.eventStreams.redeliveries.create("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (d48cdea2)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -154,28 +105,14 @@ describe("Redeliveries", () => { .build(); await expect(async () => { - return await client.eventStreams.redeliveries.create("id", { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.eventStreams.redeliveries.create("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("create (28fea826)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -187,20 +124,11 @@ describe("Redeliveries", () => { .build(); await expect(async () => { - return await client.eventStreams.redeliveries.create("id", { - date_from: undefined, - date_to: undefined, - statuses: undefined, - event_types: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.eventStreams.redeliveries.create("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("createById (77fac59)", async () => { + test("createById (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -210,7 +138,7 @@ describe("Redeliveries", () => { expect(response).toEqual(undefined); }); - test("createById (5f4af0c0)", async () => { + test("createById (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -225,14 +153,10 @@ describe("Redeliveries", () => { await expect(async () => { return await client.eventStreams.redeliveries.createById("id", "event_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("createById (656e16e4)", async () => { + test("createById (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -247,14 +171,10 @@ describe("Redeliveries", () => { await expect(async () => { return await client.eventStreams.redeliveries.createById("id", "event_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("createById (c5167f8c)", async () => { + test("createById (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -269,14 +189,10 @@ describe("Redeliveries", () => { await expect(async () => { return await client.eventStreams.redeliveries.createById("id", "event_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("createById (fd200c7c)", async () => { + test("createById (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -291,14 +207,10 @@ describe("Redeliveries", () => { await expect(async () => { return await client.eventStreams.redeliveries.createById("id", "event_id"); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("createById (248b4f70)", async () => { + test("createById (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -313,10 +225,6 @@ describe("Redeliveries", () => { await expect(async () => { return await client.eventStreams.redeliveries.createById("id", "event_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/flows.test.ts b/src/management/tests/wire/flows.test.ts index 98875f1646..19ff376c88 100644 --- a/src/management/tests/wire/flows.test.ts +++ b/src/management/tests/wire/flows.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Flows", () => { - test("list (ef3ed11d)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,15 +39,20 @@ describe("Flows", () => { }, ], }; - const page = await client.flows.list(); - expect(expected.flows).toEqual(page.data); + const page = await client.flows.list({ + page: 1, + per_page: 1, + include_totals: true, + synchronous: true, + }); + expect(expected.flows).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.flows).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +61,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -74,14 +73,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +85,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -106,14 +97,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (13b8b5e9)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; @@ -170,10 +157,10 @@ describe("Flows", () => { }); }); - test("create (42766a0d)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "x", actions: undefined }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -187,19 +174,14 @@ describe("Flows", () => { await expect(async () => { return await client.flows.create({ name: "x", - actions: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (6688d4fd)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "x", actions: undefined }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -213,19 +195,14 @@ describe("Flows", () => { await expect(async () => { return await client.flows.create({ name: "x", - actions: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (f66822c9)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "x", actions: undefined }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -239,19 +216,14 @@ describe("Flows", () => { await expect(async () => { return await client.flows.create({ name: "x", - actions: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (b0cb561)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "x", actions: undefined }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -265,16 +237,11 @@ describe("Flows", () => { await expect(async () => { return await client.flows.create({ name: "x", - actions: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (fef0f520)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -322,7 +289,7 @@ describe("Flows", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -331,14 +298,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -347,14 +310,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -363,14 +322,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -379,14 +334,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -395,14 +346,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -412,7 +359,7 @@ describe("Flows", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -421,14 +368,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -437,14 +380,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -453,14 +392,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -469,14 +404,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -485,14 +416,10 @@ describe("Flows", () => { await expect(async () => { return await client.flows.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (298cc7db)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -547,10 +474,10 @@ describe("Flows", () => { }); }); - test("update (48bfc8a6)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, actions: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -562,21 +489,14 @@ describe("Flows", () => { .build(); await expect(async () => { - return await client.flows.update("id", { - name: undefined, - actions: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.flows.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (4255956a)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, actions: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -588,21 +508,14 @@ describe("Flows", () => { .build(); await expect(async () => { - return await client.flows.update("id", { - name: undefined, - actions: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.flows.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (54cd0a2)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, actions: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -614,21 +527,14 @@ describe("Flows", () => { .build(); await expect(async () => { - return await client.flows.update("id", { - name: undefined, - actions: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.flows.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (bbe6d786)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, actions: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -640,14 +546,7 @@ describe("Flows", () => { .build(); await expect(async () => { - return await client.flows.update("id", { - name: undefined, - actions: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.flows.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/flows/executions.test.ts b/src/management/tests/wire/flows/executions.test.ts index 3d4359ac84..53ee280a12 100644 --- a/src/management/tests/wire/flows/executions.test.ts +++ b/src/management/tests/wire/flows/executions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Executions", () => { - test("list (3f739f77)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,15 +47,18 @@ describe("Executions", () => { }, ], }; - const page = await client.flows.executions.list("flow_id"); - expect(expected.executions).toEqual(page.data); + const page = await client.flows.executions.list("flow_id", { + from: "from", + take: 1, + }); + expect(expected.executions).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.executions).toEqual(nextPage.data); }); - test("list (bb4487b0)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -72,14 +73,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.list("flow_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (491be158)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +91,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.list("flow_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (f9e16d5c)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -116,14 +109,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.list("flow_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (bc515d28)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -138,14 +127,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.list("flow_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (1f9c2585)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -184,7 +169,7 @@ describe("Executions", () => { }); }); - test("get (e32558df)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -199,14 +184,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.get("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (efb55d6f)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -221,14 +202,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.get("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (70b43e3b)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -243,14 +220,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.get("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (346f2773)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -265,14 +238,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.get("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c9586b1f)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -282,7 +251,7 @@ describe("Executions", () => { expect(response).toEqual(undefined); }); - test("delete (e32558df)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -297,14 +266,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.delete("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (efb55d6f)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -319,14 +284,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.delete("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (70b43e3b)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -341,14 +302,10 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.delete("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (346f2773)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -363,10 +320,6 @@ describe("Executions", () => { await expect(async () => { return await client.flows.executions.delete("flow_id", "execution_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/flows/vault/connections.test.ts b/src/management/tests/wire/flows/vault/connections.test.ts index eabbf4f8d9..12b34667b6 100644 --- a/src/management/tests/wire/flows/vault/connections.test.ts +++ b/src/management/tests/wire/flows/vault/connections.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Connections", () => { - test("list (754f6e5)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -55,15 +53,19 @@ describe("Connections", () => { }, ], }; - const page = await client.flows.vault.connections.list(); - expect(expected.connections).toEqual(page.data); + const page = await client.flows.vault.connections.list({ + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.connections).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.connections).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +80,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -100,14 +98,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -122,14 +116,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -144,20 +134,16 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (36741920)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name", app_id: "ACTIVECAMPAIGN", - setup: { type: "API_KEY", api_key: "api_key" }, + setup: { type: "API_KEY", api_key: "api_key", base_url: "base_url" }, }; const rawResponseBody = { id: "id", @@ -186,6 +172,7 @@ describe("Connections", () => { setup: { type: "API_KEY", api_key: "api_key", + base_url: "base_url", }, }); expect(response).toEqual({ @@ -202,13 +189,13 @@ describe("Connections", () => { }); }); - test("create (36f48611)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", app_id: "ACTIVECAMPAIGN", - setup: { type: "API_KEY", api_key: "api_key", base_url: undefined }, + setup: { type: "API_KEY", api_key: "api_key", base_url: "base_url" }, }; const rawResponseBody = { key: "value" }; server @@ -227,23 +214,19 @@ describe("Connections", () => { setup: { type: "API_KEY", api_key: "api_key", - base_url: undefined, + base_url: "base_url", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (c3d8d3d1)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", app_id: "ACTIVECAMPAIGN", - setup: { type: "API_KEY", api_key: "api_key", base_url: undefined }, + setup: { type: "API_KEY", api_key: "api_key", base_url: "base_url" }, }; const rawResponseBody = { key: "value" }; server @@ -262,23 +245,19 @@ describe("Connections", () => { setup: { type: "API_KEY", api_key: "api_key", - base_url: undefined, + base_url: "base_url", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (991b78cd)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", app_id: "ACTIVECAMPAIGN", - setup: { type: "API_KEY", api_key: "api_key", base_url: undefined }, + setup: { type: "API_KEY", api_key: "api_key", base_url: "base_url" }, }; const rawResponseBody = { key: "value" }; server @@ -297,23 +276,19 @@ describe("Connections", () => { setup: { type: "API_KEY", api_key: "api_key", - base_url: undefined, + base_url: "base_url", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (e49c76f5)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", app_id: "ACTIVECAMPAIGN", - setup: { type: "API_KEY", api_key: "api_key", base_url: undefined }, + setup: { type: "API_KEY", api_key: "api_key", base_url: "base_url" }, }; const rawResponseBody = { key: "value" }; server @@ -332,17 +307,13 @@ describe("Connections", () => { setup: { type: "API_KEY", api_key: "api_key", - base_url: undefined, + base_url: "base_url", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (f8d72295)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -381,7 +352,7 @@ describe("Connections", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -396,14 +367,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -418,14 +385,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -440,14 +403,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -462,14 +421,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -484,14 +439,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -501,7 +452,7 @@ describe("Connections", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -516,14 +467,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -538,14 +485,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -560,14 +503,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -582,14 +521,10 @@ describe("Connections", () => { await expect(async () => { return await client.flows.vault.connections.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (18536db0)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -629,10 +564,10 @@ describe("Connections", () => { }); }); - test("update (e746619)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, setup: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -644,21 +579,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.flows.vault.connections.update("id", { - name: undefined, - setup: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.flows.vault.connections.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (fa7439)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, setup: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -670,21 +598,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.flows.vault.connections.update("id", { - name: undefined, - setup: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.flows.vault.connections.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (6769c55)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, setup: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -696,21 +617,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.flows.vault.connections.update("id", { - name: undefined, - setup: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.flows.vault.connections.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (53e7f325)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, setup: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -722,21 +636,14 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.flows.vault.connections.update("id", { - name: undefined, - setup: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.flows.vault.connections.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (2f8bc75d)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, setup: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -748,14 +655,7 @@ describe("Connections", () => { .build(); await expect(async () => { - return await client.flows.vault.connections.update("id", { - name: undefined, - setup: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.flows.vault.connections.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/forms.test.ts b/src/management/tests/wire/forms.test.ts index 46b101d978..a3a08bd6ef 100644 --- a/src/management/tests/wire/forms.test.ts +++ b/src/management/tests/wire/forms.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Forms", () => { - test("list (ac62b2b)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -43,15 +41,19 @@ describe("Forms", () => { }, ], }; - const page = await client.forms.list(); - expect(expected.forms).toEqual(page.data); + const page = await client.forms.list({ + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.forms).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.forms).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -60,14 +62,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -76,14 +74,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -92,14 +86,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -108,14 +98,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (be2e52c4)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; @@ -223,19 +209,10 @@ describe("Forms", () => { }); }); - test("create (23664f69)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -249,34 +226,14 @@ describe("Forms", () => { await expect(async () => { return await client.forms.create({ name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (e22e6749)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -290,34 +247,14 @@ describe("Forms", () => { await expect(async () => { return await client.forms.create({ name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (f0ea1aa5)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -331,34 +268,14 @@ describe("Forms", () => { await expect(async () => { return await client.forms.create({ name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (e9650aed)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -372,22 +289,11 @@ describe("Forms", () => { await expect(async () => { return await client.forms.create({ name: "x", - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (f0b309fd)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -486,7 +392,7 @@ describe("Forms", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -495,14 +401,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -511,14 +413,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -527,14 +425,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -543,14 +437,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -559,14 +449,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -576,7 +462,7 @@ describe("Forms", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -585,14 +471,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -601,14 +483,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -617,14 +495,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -633,14 +507,10 @@ describe("Forms", () => { await expect(async () => { return await client.forms.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (e44eb82)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -746,19 +616,10 @@ describe("Forms", () => { }); }); - test("update (74a1ba4a)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -770,36 +631,14 @@ describe("Forms", () => { .build(); await expect(async () => { - return await client.forms.update("id", { - name: undefined, - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.forms.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (ceee290e)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -811,36 +650,14 @@ describe("Forms", () => { .build(); await expect(async () => { - return await client.forms.update("id", { - name: undefined, - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.forms.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (f75bec9a)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -852,20 +669,7 @@ describe("Forms", () => { .build(); await expect(async () => { - return await client.forms.update("id", { - name: undefined, - messages: undefined, - languages: undefined, - translations: undefined, - nodes: undefined, - start: undefined, - ending: undefined, - style: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.forms.update("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 6cbc513513..0000000000 --- a/src/management/tests/wire/groups/members.test.ts +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; - -describe("Members", () => { - test("get (2df7c95a)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ 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().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"); - expect(expected.members).toEqual(page.data); - - expect(page.hasNextPage()).toBe(true); - const nextPage = await page.getNextPage(); - expect(expected.members).toEqual(nextPage.data); - }); - - test("get (fcf9dbd1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id/members").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); - }); - - test("get (49d52691)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id/members").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); - }); - - test("get (2428808d)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id/members").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); - }); - - test("get (27b44cb5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/groups/id/members").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.groups.members.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); - }); -}); diff --git a/src/management/tests/wire/guardian/enrollments.test.ts b/src/management/tests/wire/guardian/enrollments.test.ts index 92dadd0e61..b29cb7ed8c 100644 --- a/src/management/tests/wire/guardian/enrollments.test.ts +++ b/src/management/tests/wire/guardian/enrollments.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Enrollments", () => { - test("createTicket (d46530e5)", async () => { + test("createTicket (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { user_id: "user_id" }; @@ -30,17 +28,10 @@ describe("Enrollments", () => { }); }); - test("createTicket (b6270a17)", async () => { + test("createTicket (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -54,30 +45,14 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.createTicket({ user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("createTicket (394388e7)", async () => { + test("createTicket (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -91,30 +66,14 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.createTicket({ user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("createTicket (93b064f3)", async () => { + test("createTicket (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -128,30 +87,14 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.createTicket({ user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("createTicket (781ff5d3)", async () => { + test("createTicket (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -165,20 +108,11 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.createTicket({ user_id: "user_id", - email: undefined, - send_mail: undefined, - email_locale: undefined, - factor: undefined, - allow_multiple_enrollments: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (cdd13147)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -211,7 +145,7 @@ describe("Enrollments", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -226,14 +160,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -248,14 +178,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -270,14 +196,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -287,7 +209,7 @@ describe("Enrollments", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -302,14 +224,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -324,14 +242,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -346,10 +260,6 @@ describe("Enrollments", () => { await expect(async () => { return await client.guardian.enrollments.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/guardian/factors.test.ts b/src/management/tests/wire/guardian/factors.test.ts index 453b8d2674..93f6dab88a 100644 --- a/src/management/tests/wire/guardian/factors.test.ts +++ b/src/management/tests/wire/guardian/factors.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Factors", () => { - test("list (5c86014)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -24,7 +22,7 @@ describe("Factors", () => { ]); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -33,14 +31,10 @@ describe("Factors", () => { await expect(async () => { return await client.guardian.factors.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,14 +43,10 @@ describe("Factors", () => { await expect(async () => { return await client.guardian.factors.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +55,10 @@ describe("Factors", () => { await expect(async () => { return await client.guardian.factors.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (d6324942)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -94,7 +80,7 @@ describe("Factors", () => { }); }); - test("set (cf3e0937)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -112,14 +98,10 @@ describe("Factors", () => { return await client.guardian.factors.set("push-notification", { enabled: true, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (3da86f87)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -137,14 +119,10 @@ describe("Factors", () => { return await client.guardian.factors.set("push-notification", { enabled: true, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (b9afc93)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -162,10 +140,6 @@ describe("Factors", () => { return await client.guardian.factors.set("push-notification", { enabled: true, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/guardian/factors/duo/settings.test.ts b/src/management/tests/wire/guardian/factors/duo/settings.test.ts index 453908ff24..8725ab38cb 100644 --- a/src/management/tests/wire/guardian/factors/duo/settings.test.ts +++ b/src/management/tests/wire/guardian/factors/duo/settings.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../../Client.js"; -import * as Management from "../../../../../api/index.js"; +import { mockServerPool } from "../../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../../Client"; +import * as Management from "../../../../../api/index"; describe("Settings", () => { - test("get (d54b9112)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -28,7 +26,7 @@ describe("Settings", () => { }); }); - test("get (c60dd33b)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -43,14 +41,10 @@ describe("Settings", () => { await expect(async () => { return await client.guardian.factors.duo.settings.get(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (1e230aeb)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +59,10 @@ describe("Settings", () => { await expect(async () => { return await client.guardian.factors.duo.settings.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -87,14 +77,10 @@ describe("Settings", () => { await expect(async () => { return await client.guardian.factors.duo.settings.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (5e0d4d99)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -116,10 +102,10 @@ describe("Settings", () => { }); }); - test("set (687175a9)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { ikey: undefined, skey: undefined, host: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -131,22 +117,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.guardian.factors.duo.settings.set({ - ikey: undefined, - skey: undefined, - host: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.duo.settings.set(); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (88b98f89)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { ikey: undefined, skey: undefined, host: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -158,22 +136,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.guardian.factors.duo.settings.set({ - ikey: undefined, - skey: undefined, - host: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.duo.settings.set(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (1d8c3e5)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { ikey: undefined, skey: undefined, host: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -185,19 +155,11 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.guardian.factors.duo.settings.set({ - ikey: undefined, - skey: undefined, - host: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.duo.settings.set(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (5e0d4d99)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -219,10 +181,10 @@ describe("Settings", () => { }); }); - test("update (687175a9)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { ikey: undefined, skey: undefined, host: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -234,22 +196,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.guardian.factors.duo.settings.update({ - ikey: undefined, - skey: undefined, - host: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.duo.settings.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (88b98f89)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { ikey: undefined, skey: undefined, host: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -261,22 +215,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.guardian.factors.duo.settings.update({ - ikey: undefined, - skey: undefined, - host: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.duo.settings.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (1d8c3e5)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { ikey: undefined, skey: undefined, host: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -288,15 +234,7 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.guardian.factors.duo.settings.update({ - ikey: undefined, - skey: undefined, - host: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.duo.settings.update(); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/guardian/factors/phone.test.ts b/src/management/tests/wire/guardian/factors/phone.test.ts index 3c7e5d6e8d..8565f291f1 100644 --- a/src/management/tests/wire/guardian/factors/phone.test.ts +++ b/src/management/tests/wire/guardian/factors/phone.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Phone", () => { - test("getMessageTypes (373bab06)", async () => { + test("getMessageTypes (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("Phone", () => { }); }); - test("getMessageTypes (c60dd33b)", async () => { + test("getMessageTypes (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getMessageTypes(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getMessageTypes (1e230aeb)", async () => { + test("getMessageTypes (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getMessageTypes(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getMessageTypes (af841397)", async () => { + test("getMessageTypes (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getMessageTypes(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setMessageTypes (86535d57)", async () => { + test("setMessageTypes (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { message_types: ["sms"] }; @@ -114,7 +100,7 @@ describe("Phone", () => { }); }); - test("setMessageTypes (9584c610)", async () => { + test("setMessageTypes (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { message_types: ["sms", "sms"] }; @@ -132,14 +118,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setMessageTypes({ message_types: ["sms", "sms"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("setMessageTypes (f7d88138)", async () => { + test("setMessageTypes (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { message_types: ["sms", "sms"] }; @@ -157,14 +139,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setMessageTypes({ message_types: ["sms", "sms"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setMessageTypes (4c23db3c)", async () => { + test("setMessageTypes (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { message_types: ["sms", "sms"] }; @@ -182,14 +160,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setMessageTypes({ message_types: ["sms", "sms"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setMessageTypes (ec7dd604)", async () => { + test("setMessageTypes (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { message_types: ["sms", "sms"] }; @@ -207,14 +181,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setMessageTypes({ message_types: ["sms", "sms"], }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("getTwilioProvider (86b63684)", async () => { + test("getTwilioProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -241,7 +211,7 @@ describe("Phone", () => { }); }); - test("getTwilioProvider (c60dd33b)", async () => { + test("getTwilioProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -256,14 +226,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getTwilioProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getTwilioProvider (1e230aeb)", async () => { + test("getTwilioProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -278,14 +244,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getTwilioProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getTwilioProvider (af841397)", async () => { + test("getTwilioProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -300,14 +262,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getTwilioProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setTwilioProvider (64fae5af)", async () => { + test("setTwilioProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -335,15 +293,10 @@ describe("Phone", () => { }); }); - test("setTwilioProvider (ca700db5)", async () => { + test("setTwilioProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -355,28 +308,14 @@ describe("Phone", () => { .build(); await expect(async () => { - return await client.guardian.factors.phone.setTwilioProvider({ - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.phone.setTwilioProvider(); + }).rejects.toThrow(Management.BadRequestError); }); - test("setTwilioProvider (2f4ab2a5)", async () => { + test("setTwilioProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -388,28 +327,14 @@ describe("Phone", () => { .build(); await expect(async () => { - return await client.guardian.factors.phone.setTwilioProvider({ - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.phone.setTwilioProvider(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setTwilioProvider (6934b271)", async () => { + test("setTwilioProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -421,20 +346,11 @@ describe("Phone", () => { .build(); await expect(async () => { - return await client.guardian.factors.phone.setTwilioProvider({ - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.phone.setTwilioProvider(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getSelectedProvider (bcb0d021)", async () => { + test("getSelectedProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -453,7 +369,7 @@ describe("Phone", () => { }); }); - test("getSelectedProvider (c60dd33b)", async () => { + test("getSelectedProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -468,14 +384,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getSelectedProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getSelectedProvider (1e230aeb)", async () => { + test("getSelectedProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -490,14 +402,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getSelectedProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getSelectedProvider (af841397)", async () => { + test("getSelectedProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -512,14 +420,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getSelectedProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setProvider (c7bcf6c3)", async () => { + test("setProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -541,7 +445,7 @@ describe("Phone", () => { }); }); - test("setProvider (6d89e675)", async () => { + test("setProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -559,14 +463,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setProvider({ provider: "auth0", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("setProvider (e8607965)", async () => { + test("setProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -584,14 +484,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setProvider({ provider: "auth0", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setProvider (64b1f931)", async () => { + test("setProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -609,14 +505,10 @@ describe("Phone", () => { return await client.guardian.factors.phone.setProvider({ provider: "auth0", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getTemplates (e6b85352)", async () => { + test("getTemplates (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -639,7 +531,7 @@ describe("Phone", () => { }); }); - test("getTemplates (c60dd33b)", async () => { + test("getTemplates (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -654,14 +546,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getTemplates(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getTemplates (1e230aeb)", async () => { + test("getTemplates (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -676,14 +564,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getTemplates(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getTemplates (af841397)", async () => { + test("getTemplates (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -698,14 +582,10 @@ describe("Phone", () => { await expect(async () => { return await client.guardian.factors.phone.getTemplates(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setTemplates (a5593c87)", async () => { + test("setTemplates (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -735,7 +615,7 @@ describe("Phone", () => { }); }); - test("setTemplates (566065d0)", async () => { + test("setTemplates (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -759,14 +639,10 @@ describe("Phone", () => { "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message: "{{code}} is your verification code for {{tenant.friendly_name}}", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("setTemplates (45786cf8)", async () => { + test("setTemplates (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -790,14 +666,10 @@ describe("Phone", () => { "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message: "{{code}} is your verification code for {{tenant.friendly_name}}", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setTemplates (73d7fffc)", async () => { + test("setTemplates (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -821,10 +693,6 @@ describe("Phone", () => { "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message: "{{code}} is your verification code for {{tenant.friendly_name}}", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/guardian/factors/pushNotification.test.ts b/src/management/tests/wire/guardian/factors/pushNotification.test.ts index 37fc284a62..8eabe56070 100644 --- a/src/management/tests/wire/guardian/factors/pushNotification.test.ts +++ b/src/management/tests/wire/guardian/factors/pushNotification.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("PushNotification", () => { - test("getApnsProvider (e71df9aa)", async () => { + test("getApnsProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -28,7 +26,7 @@ describe("PushNotification", () => { }); }); - test("getApnsProvider (c60dd33b)", async () => { + test("getApnsProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -43,14 +41,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getApnsProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getApnsProvider (1e230aeb)", async () => { + test("getApnsProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +59,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getApnsProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getApnsProvider (af841397)", async () => { + test("getApnsProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -87,14 +77,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getApnsProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setApnsProvider (d64d78d4)", async () => { + test("setApnsProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -115,10 +101,10 @@ describe("PushNotification", () => { }); }); - test("setApnsProvider (18893c3f)", async () => { + test("setApnsProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { sandbox: undefined, bundle_id: undefined, p12: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -130,22 +116,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setApnsProvider({ - sandbox: undefined, - bundle_id: undefined, - p12: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setApnsProvider({}); + }).rejects.toThrow(Management.BadRequestError); }); - test("setApnsProvider (2639abcf)", async () => { + test("setApnsProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { sandbox: undefined, bundle_id: undefined, p12: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -157,22 +135,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setApnsProvider({ - sandbox: undefined, - bundle_id: undefined, - p12: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setApnsProvider({}); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setApnsProvider (8bf2f71b)", async () => { + test("setApnsProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { sandbox: undefined, bundle_id: undefined, p12: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -184,19 +154,11 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setApnsProvider({ - sandbox: undefined, - bundle_id: undefined, - p12: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setApnsProvider({}); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setFcmProvider (8093684b)", async () => { + test("setFcmProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -216,10 +178,10 @@ describe("PushNotification", () => { }); }); - test("setFcmProvider (e13a3115)", async () => { + test("setFcmProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { server_key: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -231,20 +193,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmProvider({ - server_key: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setFcmProvider({}); + }).rejects.toThrow(Management.BadRequestError); }); - test("setFcmProvider (7c48e605)", async () => { + test("setFcmProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { server_key: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -256,20 +212,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmProvider({ - server_key: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setFcmProvider({}); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setFcmProvider (875fafd1)", async () => { + test("setFcmProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { server_key: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -281,17 +231,11 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmProvider({ - server_key: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setFcmProvider({}); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setFcmv1Provider (8093684b)", async () => { + test("setFcmv1Provider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -311,10 +255,10 @@ describe("PushNotification", () => { }); }); - test("setFcmv1Provider (d2005a53)", async () => { + test("setFcmv1Provider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { server_credentials: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -326,20 +270,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmv1Provider({ - server_credentials: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setFcmv1Provider({}); + }).rejects.toThrow(Management.BadRequestError); }); - test("setFcmv1Provider (847052a3)", async () => { + test("setFcmv1Provider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { server_credentials: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -351,20 +289,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmv1Provider({ - server_credentials: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setFcmv1Provider({}); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setFcmv1Provider (66e3c94f)", async () => { + test("setFcmv1Provider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { server_credentials: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -376,17 +308,11 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setFcmv1Provider({ - server_credentials: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setFcmv1Provider({}); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getSnsProvider (37487858)", async () => { + test("getSnsProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -415,7 +341,7 @@ describe("PushNotification", () => { }); }); - test("getSnsProvider (c60dd33b)", async () => { + test("getSnsProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -430,14 +356,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getSnsProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getSnsProvider (1e230aeb)", async () => { + test("getSnsProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -452,14 +374,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getSnsProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getSnsProvider (af841397)", async () => { + test("getSnsProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -474,14 +392,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getSnsProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setSnsProvider (283b6363)", async () => { + test("setSnsProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -511,16 +425,10 @@ describe("PushNotification", () => { }); }); - test("setSnsProvider (836aca22)", async () => { + test("setSnsProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -532,30 +440,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setSnsProvider({ - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setSnsProvider(); + }).rejects.toThrow(Management.BadRequestError); }); - test("setSnsProvider (70d3f13a)", async () => { + test("setSnsProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -567,30 +459,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setSnsProvider({ - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setSnsProvider(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setSnsProvider (d9c789fe)", async () => { + test("setSnsProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -602,21 +478,11 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.setSnsProvider({ - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.setSnsProvider(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("updateSnsProvider (283b6363)", async () => { + test("updateSnsProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -646,16 +512,10 @@ describe("PushNotification", () => { }); }); - test("updateSnsProvider (836aca22)", async () => { + test("updateSnsProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -667,30 +527,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateSnsProvider({ - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.updateSnsProvider(); + }).rejects.toThrow(Management.BadRequestError); }); - test("updateSnsProvider (70d3f13a)", async () => { + test("updateSnsProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -702,30 +546,14 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateSnsProvider({ - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.updateSnsProvider(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateSnsProvider (d9c789fe)", async () => { + test("updateSnsProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -737,21 +565,11 @@ describe("PushNotification", () => { .build(); await expect(async () => { - return await client.guardian.factors.pushNotification.updateSnsProvider({ - aws_access_key_id: undefined, - aws_secret_access_key: undefined, - aws_region: undefined, - sns_apns_platform_application_arn: undefined, - sns_gcm_platform_application_arn: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.pushNotification.updateSnsProvider(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getSelectedProvider (23f6cc2)", async () => { + test("getSelectedProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -770,7 +588,7 @@ describe("PushNotification", () => { }); }); - test("getSelectedProvider (c60dd33b)", async () => { + test("getSelectedProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -785,14 +603,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getSelectedProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getSelectedProvider (1e230aeb)", async () => { + test("getSelectedProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -807,14 +621,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getSelectedProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getSelectedProvider (af841397)", async () => { + test("getSelectedProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -829,14 +639,10 @@ describe("PushNotification", () => { await expect(async () => { return await client.guardian.factors.pushNotification.getSelectedProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setProvider (277ecd47)", async () => { + test("setProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "guardian" }; @@ -858,7 +664,7 @@ describe("PushNotification", () => { }); }); - test("setProvider (ccb41335)", async () => { + test("setProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "guardian" }; @@ -876,14 +682,10 @@ describe("PushNotification", () => { return await client.guardian.factors.pushNotification.setProvider({ provider: "guardian", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("setProvider (41db1825)", async () => { + test("setProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "guardian" }; @@ -901,14 +703,10 @@ describe("PushNotification", () => { return await client.guardian.factors.pushNotification.setProvider({ provider: "guardian", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setProvider (9d3e93f1)", async () => { + test("setProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "guardian" }; @@ -926,10 +724,6 @@ describe("PushNotification", () => { return await client.guardian.factors.pushNotification.setProvider({ provider: "guardian", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/guardian/factors/sms.test.ts b/src/management/tests/wire/guardian/factors/sms.test.ts index 185e997896..815530b891 100644 --- a/src/management/tests/wire/guardian/factors/sms.test.ts +++ b/src/management/tests/wire/guardian/factors/sms.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Sms", () => { - test("getTwilioProvider (86b63684)", async () => { + test("getTwilioProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -34,7 +32,7 @@ describe("Sms", () => { }); }); - test("getTwilioProvider (c60dd33b)", async () => { + test("getTwilioProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,14 +47,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getTwilioProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getTwilioProvider (1e230aeb)", async () => { + test("getTwilioProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -71,14 +65,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getTwilioProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getTwilioProvider (af841397)", async () => { + test("getTwilioProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -93,14 +83,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getTwilioProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setTwilioProvider (64fae5af)", async () => { + test("setTwilioProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -128,15 +114,10 @@ describe("Sms", () => { }); }); - test("setTwilioProvider (ca700db5)", async () => { + test("setTwilioProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -148,28 +129,14 @@ describe("Sms", () => { .build(); await expect(async () => { - return await client.guardian.factors.sms.setTwilioProvider({ - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.guardian.factors.sms.setTwilioProvider(); + }).rejects.toThrow(Management.BadRequestError); }); - test("setTwilioProvider (2f4ab2a5)", async () => { + test("setTwilioProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -181,28 +148,14 @@ describe("Sms", () => { .build(); await expect(async () => { - return await client.guardian.factors.sms.setTwilioProvider({ - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.guardian.factors.sms.setTwilioProvider(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setTwilioProvider (6934b271)", async () => { + test("setTwilioProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -214,20 +167,11 @@ describe("Sms", () => { .build(); await expect(async () => { - return await client.guardian.factors.sms.setTwilioProvider({ - from: undefined, - messaging_service_sid: undefined, - auth_token: undefined, - sid: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.guardian.factors.sms.setTwilioProvider(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getSelectedProvider (bcb0d021)", async () => { + test("getSelectedProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -246,7 +190,7 @@ describe("Sms", () => { }); }); - test("getSelectedProvider (c60dd33b)", async () => { + test("getSelectedProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -261,14 +205,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getSelectedProvider(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getSelectedProvider (1e230aeb)", async () => { + test("getSelectedProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -283,14 +223,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getSelectedProvider(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getSelectedProvider (af841397)", async () => { + test("getSelectedProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -305,14 +241,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getSelectedProvider(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setProvider (c7bcf6c3)", async () => { + test("setProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -334,7 +266,7 @@ describe("Sms", () => { }); }); - test("setProvider (6d89e675)", async () => { + test("setProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -352,14 +284,10 @@ describe("Sms", () => { return await client.guardian.factors.sms.setProvider({ provider: "auth0", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("setProvider (e8607965)", async () => { + test("setProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -377,14 +305,10 @@ describe("Sms", () => { return await client.guardian.factors.sms.setProvider({ provider: "auth0", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setProvider (64b1f931)", async () => { + test("setProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { provider: "auth0" }; @@ -402,14 +326,10 @@ describe("Sms", () => { return await client.guardian.factors.sms.setProvider({ provider: "auth0", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getTemplates (e6b85352)", async () => { + test("getTemplates (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -432,7 +352,7 @@ describe("Sms", () => { }); }); - test("getTemplates (c60dd33b)", async () => { + test("getTemplates (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -447,14 +367,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getTemplates(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getTemplates (1e230aeb)", async () => { + test("getTemplates (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -469,14 +385,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getTemplates(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getTemplates (af841397)", async () => { + test("getTemplates (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -491,14 +403,10 @@ describe("Sms", () => { await expect(async () => { return await client.guardian.factors.sms.getTemplates(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("setTemplates (a5593c87)", async () => { + test("setTemplates (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -528,7 +436,7 @@ describe("Sms", () => { }); }); - test("setTemplates (566065d0)", async () => { + test("setTemplates (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -552,14 +460,10 @@ describe("Sms", () => { "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message: "{{code}} is your verification code for {{tenant.friendly_name}}", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("setTemplates (45786cf8)", async () => { + test("setTemplates (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -583,14 +487,10 @@ describe("Sms", () => { "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message: "{{code}} is your verification code for {{tenant.friendly_name}}", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("setTemplates (73d7fffc)", async () => { + test("setTemplates (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -614,10 +514,6 @@ describe("Sms", () => { "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", verification_message: "{{code}} is your verification code for {{tenant.friendly_name}}", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/guardian/policies.test.ts b/src/management/tests/wire/guardian/policies.test.ts index ab49b6986e..da7fd079c3 100644 --- a/src/management/tests/wire/guardian/policies.test.ts +++ b/src/management/tests/wire/guardian/policies.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Policies", () => { - test("list (418a9191)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -18,7 +16,7 @@ describe("Policies", () => { expect(response).toEqual(["all-applications"]); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -27,14 +25,10 @@ describe("Policies", () => { await expect(async () => { return await client.guardian.policies.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -43,14 +37,10 @@ describe("Policies", () => { await expect(async () => { return await client.guardian.policies.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -59,14 +49,10 @@ describe("Policies", () => { await expect(async () => { return await client.guardian.policies.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (20f441fb)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["all-applications"]; @@ -84,7 +70,7 @@ describe("Policies", () => { expect(response).toEqual(["all-applications"]); }); - test("set (95e56043)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["all-applications", "all-applications"]; @@ -100,14 +86,10 @@ describe("Policies", () => { await expect(async () => { return await client.guardian.policies.set(["all-applications", "all-applications"]); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (41e4cb53)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["all-applications", "all-applications"]; @@ -123,14 +105,10 @@ describe("Policies", () => { await expect(async () => { return await client.guardian.policies.set(["all-applications", "all-applications"]); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (736ce4bf)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["all-applications", "all-applications"]; @@ -146,10 +124,6 @@ describe("Policies", () => { await expect(async () => { return await client.guardian.policies.set(["all-applications", "all-applications"]); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); }); diff --git a/src/management/tests/wire/hooks.test.ts b/src/management/tests/wire/hooks.test.ts index 94650f8554..c95d4e7283 100644 --- a/src/management/tests/wire/hooks.test.ts +++ b/src/management/tests/wire/hooks.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Hooks", () => { - test("list (70af6fe5)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,15 +43,22 @@ describe("Hooks", () => { }, ], }; - const page = await client.hooks.list(); - expect(expected.hooks).toEqual(page.data); + const page = await client.hooks.list({ + page: 1, + per_page: 1, + include_totals: true, + enabled: true, + fields: "fields", + triggerId: "credentials-exchange", + }); + expect(expected.hooks).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.hooks).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,14 +67,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +79,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +91,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (c29c5807)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -110,14 +103,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.list(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (ee1e23bf)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -126,14 +115,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (97c3e762)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name", script: "script", triggerId: "credentials-exchange" }; @@ -171,14 +156,12 @@ describe("Hooks", () => { }); }); - test("create (5ac04fde)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }; const rawResponseBody = { key: "value" }; @@ -195,25 +178,17 @@ describe("Hooks", () => { return await client.hooks.create({ name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (7de53de6)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }; const rawResponseBody = { key: "value" }; @@ -230,25 +205,17 @@ describe("Hooks", () => { return await client.hooks.create({ name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (40a063aa)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }; const rawResponseBody = { key: "value" }; @@ -265,25 +232,17 @@ describe("Hooks", () => { return await client.hooks.create({ name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (17150fc2)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }; const rawResponseBody = { key: "value" }; @@ -300,25 +259,17 @@ describe("Hooks", () => { return await client.hooks.create({ name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (5ccab7c6)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }; const rawResponseBody = { key: "value" }; @@ -335,18 +286,12 @@ describe("Hooks", () => { return await client.hooks.create({ name: "my-hook", script: "module.exports = function(client, scope, audience, context, cb) cb(null, access_token); };", - enabled: undefined, - dependencies: undefined, triggerId: "credentials-exchange", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (ee316992)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -360,7 +305,9 @@ describe("Hooks", () => { }; server.mockEndpoint().get("/hooks/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.hooks.get("id"); + const response = await client.hooks.get("id", { + fields: "fields", + }); expect(response).toEqual({ triggerId: "triggerId", id: "id", @@ -373,7 +320,7 @@ describe("Hooks", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -382,14 +329,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -398,14 +341,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -414,14 +353,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -430,14 +365,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -446,14 +377,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -463,7 +390,7 @@ describe("Hooks", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -472,14 +399,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -488,14 +411,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -504,14 +423,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -520,14 +435,10 @@ describe("Hooks", () => { await expect(async () => { return await client.hooks.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (cd2be091)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -561,10 +472,10 @@ describe("Hooks", () => { }); }); - test("update (fdebfe7f)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, script: undefined, enabled: undefined, dependencies: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -576,23 +487,14 @@ describe("Hooks", () => { .build(); await expect(async () => { - return await client.hooks.update("id", { - name: undefined, - script: undefined, - enabled: undefined, - dependencies: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.hooks.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (359a0e0f)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, script: undefined, enabled: undefined, dependencies: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -604,23 +506,14 @@ describe("Hooks", () => { .build(); await expect(async () => { - return await client.hooks.update("id", { - name: undefined, - script: undefined, - enabled: undefined, - dependencies: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.hooks.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (c653e65b)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, script: undefined, enabled: undefined, dependencies: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -632,23 +525,14 @@ describe("Hooks", () => { .build(); await expect(async () => { - return await client.hooks.update("id", { - name: undefined, - script: undefined, - enabled: undefined, - dependencies: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.hooks.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (51ae21fb)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, script: undefined, enabled: undefined, dependencies: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -660,23 +544,14 @@ describe("Hooks", () => { .build(); await expect(async () => { - return await client.hooks.update("id", { - name: undefined, - script: undefined, - enabled: undefined, - dependencies: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.hooks.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (56a732d3)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, script: undefined, enabled: undefined, dependencies: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -688,23 +563,14 @@ describe("Hooks", () => { .build(); await expect(async () => { - return await client.hooks.update("id", { - name: undefined, - script: undefined, - enabled: undefined, - dependencies: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.hooks.update("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("update (b6d13213)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, script: undefined, enabled: undefined, dependencies: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -716,16 +582,7 @@ describe("Hooks", () => { .build(); await expect(async () => { - return await client.hooks.update("id", { - name: undefined, - script: undefined, - enabled: undefined, - dependencies: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.hooks.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/hooks/secrets.test.ts b/src/management/tests/wire/hooks/secrets.test.ts index 8461ba1019..3c1ae0b371 100644 --- a/src/management/tests/wire/hooks/secrets.test.ts +++ b/src/management/tests/wire/hooks/secrets.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Secrets", () => { - test("get (98dc382)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -20,7 +18,7 @@ describe("Secrets", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -29,14 +27,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,14 +39,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -61,14 +51,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -77,14 +63,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -93,14 +75,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (9a91a5a4)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -113,7 +91,7 @@ describe("Secrets", () => { expect(response).toEqual(undefined); }); - test("create (b96eb1bb)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -131,14 +109,10 @@ describe("Secrets", () => { return await client.hooks.secrets.create("id", { string: "string", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (3238896b)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -156,14 +130,10 @@ describe("Secrets", () => { return await client.hooks.secrets.create("id", { string: "string", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (a19ab617)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -181,14 +151,10 @@ describe("Secrets", () => { return await client.hooks.secrets.create("id", { string: "string", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (52e00eaf)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -206,14 +172,10 @@ describe("Secrets", () => { return await client.hooks.secrets.create("id", { string: "string", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (b42aee3f)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -231,14 +193,10 @@ describe("Secrets", () => { return await client.hooks.secrets.create("id", { string: "string", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (cc94739d)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["string"]; @@ -255,7 +213,7 @@ describe("Secrets", () => { expect(response).toEqual(undefined); }); - test("delete (c7ad1713)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["string", "string"]; @@ -271,14 +229,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.delete("id", ["string", "string"]); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (d065e63)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["string", "string"]; @@ -294,14 +248,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.delete("id", ["string", "string"]); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2f30480f)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["string", "string"]; @@ -317,14 +267,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.delete("id", ["string", "string"]); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e146f557)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = ["string", "string"]; @@ -340,14 +286,10 @@ describe("Secrets", () => { await expect(async () => { return await client.hooks.secrets.delete("id", ["string", "string"]); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (9a91a5a4)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -360,7 +302,7 @@ describe("Secrets", () => { expect(response).toEqual(undefined); }); - test("update (2900b4c1)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -378,14 +320,10 @@ describe("Secrets", () => { return await client.hooks.secrets.update("id", { string: "string", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (4aa386c1)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -403,14 +341,10 @@ describe("Secrets", () => { return await client.hooks.secrets.update("id", { string: "string", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (b487c7fd)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -428,14 +362,10 @@ describe("Secrets", () => { return await client.hooks.secrets.update("id", { string: "string", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (332ba3ed)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -453,14 +383,10 @@ describe("Secrets", () => { return await client.hooks.secrets.update("id", { string: "string", }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (8d595ec5)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -478,14 +404,10 @@ describe("Secrets", () => { return await client.hooks.secrets.update("id", { string: "string", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("update (872bd2e5)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -503,10 +425,6 @@ describe("Secrets", () => { return await client.hooks.secrets.update("id", { string: "string", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/jobs.test.ts b/src/management/tests/wire/jobs.test.ts index 7c15c3b271..7a18a50435 100644 --- a/src/management/tests/wire/jobs.test.ts +++ b/src/management/tests/wire/jobs.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Jobs", () => { - test("get (303c5581)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -40,7 +38,7 @@ describe("Jobs", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,14 +47,10 @@ describe("Jobs", () => { await expect(async () => { return await client.jobs.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +59,10 @@ describe("Jobs", () => { await expect(async () => { return await client.jobs.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -81,14 +71,10 @@ describe("Jobs", () => { await expect(async () => { return await client.jobs.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -97,14 +83,10 @@ describe("Jobs", () => { await expect(async () => { return await client.jobs.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -113,10 +95,6 @@ describe("Jobs", () => { await expect(async () => { return await client.jobs.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/jobs/errors.test.ts b/src/management/tests/wire/jobs/errors.test.ts index 4f391db6a1..fab6150d61 100644 --- a/src/management/tests/wire/jobs/errors.test.ts +++ b/src/management/tests/wire/jobs/errors.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Errors", () => { - test("get (49ff3b7e)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -25,7 +23,7 @@ describe("Errors", () => { ]); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -34,14 +32,10 @@ describe("Errors", () => { await expect(async () => { return await client.jobs.errors.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -50,14 +44,10 @@ describe("Errors", () => { await expect(async () => { return await client.jobs.errors.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -66,14 +56,10 @@ describe("Errors", () => { await expect(async () => { return await client.jobs.errors.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -82,14 +68,10 @@ describe("Errors", () => { await expect(async () => { return await client.jobs.errors.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,10 +80,6 @@ describe("Errors", () => { await expect(async () => { return await client.jobs.errors.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/jobs/usersExports.test.ts b/src/management/tests/wire/jobs/usersExports.test.ts index ff6413a00a..cceff26467 100644 --- a/src/management/tests/wire/jobs/usersExports.test.ts +++ b/src/management/tests/wire/jobs/usersExports.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("UsersExports", () => { - test("create (9bd53ff1)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -48,10 +46,10 @@ describe("UsersExports", () => { }); }); - test("create (f557ff6e)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { connection_id: undefined, format: undefined, limit: undefined, fields: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -63,23 +61,14 @@ describe("UsersExports", () => { .build(); await expect(async () => { - return await client.jobs.usersExports.create({ - connection_id: undefined, - format: undefined, - limit: undefined, - fields: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.jobs.usersExports.create(); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (37bbbaf6)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { connection_id: undefined, format: undefined, limit: undefined, fields: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -91,23 +80,14 @@ describe("UsersExports", () => { .build(); await expect(async () => { - return await client.jobs.usersExports.create({ - connection_id: undefined, - format: undefined, - limit: undefined, - fields: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.jobs.usersExports.create(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (4b5391fa)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { connection_id: undefined, format: undefined, limit: undefined, fields: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -119,23 +99,14 @@ describe("UsersExports", () => { .build(); await expect(async () => { - return await client.jobs.usersExports.create({ - connection_id: undefined, - format: undefined, - limit: undefined, - fields: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.jobs.usersExports.create(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (2f18f096)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { connection_id: undefined, format: undefined, limit: undefined, fields: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -147,16 +118,7 @@ describe("UsersExports", () => { .build(); await expect(async () => { - return await client.jobs.usersExports.create({ - connection_id: undefined, - format: undefined, - limit: undefined, - fields: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.jobs.usersExports.create(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/jobs/verificationEmail.test.ts b/src/management/tests/wire/jobs/verificationEmail.test.ts index 3c3f58fdca..3d688808c6 100644 --- a/src/management/tests/wire/jobs/verificationEmail.test.ts +++ b/src/management/tests/wire/jobs/verificationEmail.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("VerificationEmail", () => { - test("create (9e906ea7)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { user_id: "user_id" }; @@ -32,15 +30,10 @@ describe("VerificationEmail", () => { }); }); - test("create (64ecdc13)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, - }; + const rawRequestBody = { user_id: "google-oauth2|1234" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -54,26 +47,14 @@ describe("VerificationEmail", () => { await expect(async () => { return await client.jobs.verificationEmail.create({ user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (63416363)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, - }; + const rawRequestBody = { user_id: "google-oauth2|1234" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -87,26 +68,14 @@ describe("VerificationEmail", () => { await expect(async () => { return await client.jobs.verificationEmail.create({ user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (ca7cd50f)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, - }; + const rawRequestBody = { user_id: "google-oauth2|1234" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -120,26 +89,14 @@ describe("VerificationEmail", () => { await expect(async () => { return await client.jobs.verificationEmail.create({ user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (1e345257)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, - }; + const rawRequestBody = { user_id: "google-oauth2|1234" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -153,14 +110,7 @@ describe("VerificationEmail", () => { await expect(async () => { return await client.jobs.verificationEmail.create({ user_id: "google-oauth2|1234", - client_id: undefined, - identity: undefined, - organization_id: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/keys/customSigning.test.ts b/src/management/tests/wire/keys/customSigning.test.ts index a0a92074b9..ee43103a00 100644 --- a/src/management/tests/wire/keys/customSigning.test.ts +++ b/src/management/tests/wire/keys/customSigning.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("CustomSigning", () => { - test("get (4382a1a8)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,7 +60,7 @@ describe("CustomSigning", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -77,14 +75,10 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -99,14 +93,10 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (c29c5807)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -121,14 +111,10 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.get(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (ee1e23bf)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -143,14 +129,10 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (861bb62b)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { keys: [{ kty: "EC" }] }; @@ -212,45 +194,10 @@ describe("CustomSigning", () => { }); }); - test("set (70e3d361)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - keys: [ - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - ], - }; + const rawRequestBody = { keys: [{ kty: "EC" }, { kty: "EC" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -266,84 +213,19 @@ describe("CustomSigning", () => { keys: [ { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, ], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (5a1d1961)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - keys: [ - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - ], - }; + const rawRequestBody = { keys: [{ kty: "EC" }, { kty: "EC" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -359,84 +241,19 @@ describe("CustomSigning", () => { keys: [ { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, ], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (5ef29f1d)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - keys: [ - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - ], - }; + const rawRequestBody = { keys: [{ kty: "EC" }, { kty: "EC" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -452,84 +269,19 @@ describe("CustomSigning", () => { keys: [ { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, ], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (7a4b7805)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - keys: [ - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - { - kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, - }, - ], - }; + const rawRequestBody = { keys: [{ kty: "EC" }, { kty: "EC" }] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -545,46 +297,16 @@ describe("CustomSigning", () => { keys: [ { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, { kty: "EC", - kid: undefined, - use: undefined, - key_ops: undefined, - alg: undefined, - n: undefined, - e: undefined, - crv: undefined, - x: undefined, - y: undefined, - x5u: undefined, - x5c: undefined, - x5t: undefined, - "x5t#S256": undefined, }, ], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (5465b825)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -594,7 +316,7 @@ describe("CustomSigning", () => { expect(response).toEqual(undefined); }); - test("delete (1e230aeb)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -609,14 +331,10 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.delete(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (af841397)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -631,14 +349,10 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.delete(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (ee1e23bf)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -653,10 +367,6 @@ describe("CustomSigning", () => { await expect(async () => { return await client.keys.customSigning.delete(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/keys/encryption.test.ts b/src/management/tests/wire/keys/encryption.test.ts index 704db4105b..9ec470c823 100644 --- a/src/management/tests/wire/keys/encryption.test.ts +++ b/src/management/tests/wire/keys/encryption.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Encryption", () => { - test("list (915f620d)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,15 +43,19 @@ describe("Encryption", () => { }, ], }; - const page = await client.keys.encryption.list(); - expect(expected.keys).toEqual(page.data); + const page = await client.keys.encryption.list({ + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.keys).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.keys).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -62,14 +64,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +76,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +88,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -110,14 +100,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (ab083345)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "customer-provided-root-key" }; @@ -153,7 +139,7 @@ describe("Encryption", () => { }); }); - test("create (a6419cab)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "customer-provided-root-key" }; @@ -171,14 +157,10 @@ describe("Encryption", () => { return await client.keys.encryption.create({ type: "customer-provided-root-key", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (895d4b1b)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "customer-provided-root-key" }; @@ -196,14 +178,10 @@ describe("Encryption", () => { return await client.keys.encryption.create({ type: "customer-provided-root-key", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (de5c3987)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "customer-provided-root-key" }; @@ -221,14 +199,10 @@ describe("Encryption", () => { return await client.keys.encryption.create({ type: "customer-provided-root-key", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (81f34d1f)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "customer-provided-root-key" }; @@ -246,14 +220,10 @@ describe("Encryption", () => { return await client.keys.encryption.create({ type: "customer-provided-root-key", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (93e395ef)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "customer-provided-root-key" }; @@ -271,14 +241,10 @@ describe("Encryption", () => { return await client.keys.encryption.create({ type: "customer-provided-root-key", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("rekey (5465b825)", async () => { + test("rekey (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -288,7 +254,7 @@ describe("Encryption", () => { expect(response).toEqual(undefined); }); - test("rekey (1e230aeb)", async () => { + test("rekey (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -303,14 +269,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.rekey(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("rekey (af841397)", async () => { + test("rekey (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -325,14 +287,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.rekey(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("rekey (ee1e23bf)", async () => { + test("rekey (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -347,14 +305,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.rekey(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (1af63f15)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -387,7 +341,7 @@ describe("Encryption", () => { }); }); - test("get (72cae724)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -402,14 +356,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.get("kid"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (f918344c)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -424,14 +374,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.get("kid"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (5484d350)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -446,14 +392,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.get("kid"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (a2147888)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -468,14 +410,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.get("kid"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (bd16295c)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -490,14 +428,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.get("kid"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("import (50cdbcce)", async () => { + test("import (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { wrapped_key: "wrapped_key" }; @@ -533,7 +467,7 @@ describe("Encryption", () => { }); }); - test("import (9df2d64d)", async () => { + test("import (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { wrapped_key: "wrapped_key" }; @@ -551,14 +485,10 @@ describe("Encryption", () => { return await client.keys.encryption.import("kid", { wrapped_key: "wrapped_key", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("import (3d94b83d)", async () => { + test("import (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { wrapped_key: "wrapped_key" }; @@ -576,14 +506,10 @@ describe("Encryption", () => { return await client.keys.encryption.import("kid", { wrapped_key: "wrapped_key", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("import (6cc5509)", async () => { + test("import (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { wrapped_key: "wrapped_key" }; @@ -601,14 +527,10 @@ describe("Encryption", () => { return await client.keys.encryption.import("kid", { wrapped_key: "wrapped_key", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("import (8e48d8a1)", async () => { + test("import (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { wrapped_key: "wrapped_key" }; @@ -626,14 +548,10 @@ describe("Encryption", () => { return await client.keys.encryption.import("kid", { wrapped_key: "wrapped_key", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("import (3a29aa1)", async () => { + test("import (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { wrapped_key: "wrapped_key" }; @@ -651,14 +569,10 @@ describe("Encryption", () => { return await client.keys.encryption.import("kid", { wrapped_key: "wrapped_key", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c5b36b65)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -668,7 +582,7 @@ describe("Encryption", () => { expect(response).toEqual(undefined); }); - test("delete (72cae724)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -683,14 +597,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.delete("kid"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (f918344c)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -705,14 +615,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.delete("kid"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (5484d350)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -727,14 +633,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.delete("kid"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (bd16295c)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -749,14 +651,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.delete("kid"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("createPublicWrappingKey (4bee353e)", async () => { + test("createPublicWrappingKey (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -776,7 +674,7 @@ describe("Encryption", () => { }); }); - test("createPublicWrappingKey (72cae724)", async () => { + test("createPublicWrappingKey (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -791,14 +689,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.createPublicWrappingKey("kid"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("createPublicWrappingKey (f918344c)", async () => { + test("createPublicWrappingKey (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -813,14 +707,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.createPublicWrappingKey("kid"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("createPublicWrappingKey (5484d350)", async () => { + test("createPublicWrappingKey (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -835,14 +725,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.createPublicWrappingKey("kid"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("createPublicWrappingKey (a8aaca68)", async () => { + test("createPublicWrappingKey (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -857,14 +743,10 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.createPublicWrappingKey("kid"); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("createPublicWrappingKey (bd16295c)", async () => { + test("createPublicWrappingKey (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -879,10 +761,6 @@ describe("Encryption", () => { await expect(async () => { return await client.keys.encryption.createPublicWrappingKey("kid"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/keys/signing.test.ts b/src/management/tests/wire/keys/signing.test.ts index c2816a7cbe..913d5720ca 100644 --- a/src/management/tests/wire/keys/signing.test.ts +++ b/src/management/tests/wire/keys/signing.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Signing", () => { - test("list (130d94c3)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -48,7 +46,7 @@ describe("Signing", () => { ]); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -57,14 +55,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -73,14 +67,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -89,14 +79,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -105,14 +91,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("rotate (d2cf6a40)", async () => { + test("rotate (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -132,7 +114,7 @@ describe("Signing", () => { }); }); - test("rotate (1e230aeb)", async () => { + test("rotate (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -147,14 +129,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.rotate(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("rotate (af841397)", async () => { + test("rotate (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -169,14 +147,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.rotate(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("rotate (ee1e23bf)", async () => { + test("rotate (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -191,14 +165,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.rotate(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (cec517f3)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -235,7 +205,7 @@ describe("Signing", () => { }); }); - test("get (72cae724)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -244,14 +214,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.get("kid"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (f918344c)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -260,14 +226,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.get("kid"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (5484d350)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -276,14 +238,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.get("kid"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (bd16295c)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -292,14 +250,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.get("kid"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("revoke (b3d3af68)", async () => { + test("revoke (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -319,7 +273,7 @@ describe("Signing", () => { }); }); - test("revoke (f918344c)", async () => { + test("revoke (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -334,14 +288,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.revoke("kid"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("revoke (5484d350)", async () => { + test("revoke (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -356,14 +306,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.revoke("kid"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("revoke (a2147888)", async () => { + test("revoke (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -378,14 +324,10 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.revoke("kid"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("revoke (bd16295c)", async () => { + test("revoke (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -400,10 +342,6 @@ describe("Signing", () => { await expect(async () => { return await client.keys.signing.revoke("kid"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/logStreams.test.ts b/src/management/tests/wire/logStreams.test.ts index 0b13c05298..12a1702e2c 100644 --- a/src/management/tests/wire/logStreams.test.ts +++ b/src/management/tests/wire/logStreams.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("LogStreams", () => { - test("list (45fcfa8b)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -56,7 +54,7 @@ describe("LogStreams", () => { ]); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +63,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -81,14 +75,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (c29c5807)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -97,14 +87,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.list(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -113,14 +99,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (bbc0ceb5)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "http", sink: { httpEndpoint: "httpEndpoint" } }; @@ -182,24 +164,10 @@ describe("LogStreams", () => { }); }); - test("create (dac8f575)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, - httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, - }, - startFrom: undefined, - }; + const rawRequestBody = { type: "http", sink: { httpEndpoint: "httpEndpoint" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -212,45 +180,18 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.create({ - name: undefined, type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, }, - startFrom: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (14865)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, - httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, - }, - startFrom: undefined, - }; + const rawRequestBody = { type: "http", sink: { httpEndpoint: "httpEndpoint" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -263,45 +204,18 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.create({ - name: undefined, type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, }, - startFrom: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (608d6031)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, - httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, - }, - startFrom: undefined, - }; + const rawRequestBody = { type: "http", sink: { httpEndpoint: "httpEndpoint" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -314,45 +228,18 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.create({ - name: undefined, type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, }, - startFrom: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (5750f049)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, - httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, - }, - startFrom: undefined, - }; + const rawRequestBody = { type: "http", sink: { httpEndpoint: "httpEndpoint" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -365,45 +252,18 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.create({ - name: undefined, type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, }, - startFrom: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (6f8e3989)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, - httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, - }, - startFrom: undefined, - }; + const rawRequestBody = { type: "http", sink: { httpEndpoint: "httpEndpoint" } }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -416,28 +276,15 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.create({ - name: undefined, type: "http", - isPriority: undefined, - filters: undefined, - pii_config: undefined, sink: { - httpAuthorization: undefined, - httpContentFormat: undefined, - httpContentType: undefined, httpEndpoint: "httpEndpoint", - httpCustomHeaders: undefined, }, - startFrom: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (e9ced4ed)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -487,7 +334,7 @@ describe("LogStreams", () => { }); }); - test("get (49d52691)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -496,14 +343,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -512,14 +355,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -528,14 +367,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -544,14 +379,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -561,7 +392,7 @@ describe("LogStreams", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -570,14 +401,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -586,14 +413,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -602,14 +425,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -618,14 +437,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -634,14 +449,10 @@ describe("LogStreams", () => { await expect(async () => { return await client.logStreams.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (3653938)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -698,17 +509,10 @@ describe("LogStreams", () => { }); }); - test("update (36a78731)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -720,32 +524,14 @@ describe("LogStreams", () => { .build(); await expect(async () => { - return await client.logStreams.update("id", { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.logStreams.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (20103571)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -757,32 +543,14 @@ describe("LogStreams", () => { .build(); await expect(async () => { - return await client.logStreams.update("id", { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.logStreams.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (bc05b36d)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -794,32 +562,14 @@ describe("LogStreams", () => { .build(); await expect(async () => { - return await client.logStreams.update("id", { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.logStreams.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (78a35815)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -831,18 +581,7 @@ describe("LogStreams", () => { .build(); await expect(async () => { - return await client.logStreams.update("id", { - name: undefined, - status: undefined, - isPriority: undefined, - filters: undefined, - pii_config: undefined, - sink: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.logStreams.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/logs.test.ts b/src/management/tests/wire/logs.test.ts index 40c8aef2ab..f8ad12de2f 100644 --- a/src/management/tests/wire/logs.test.ts +++ b/src/management/tests/wire/logs.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Logs", () => { - test("list (90adf7a2)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -73,15 +71,23 @@ describe("Logs", () => { }, ], }; - const page = await client.logs.list(); - expect(expected.logs).toEqual(page.data); + const page = await client.logs.list({ + page: 1, + per_page: 1, + sort: "sort", + fields: "fields", + include_fields: true, + include_totals: true, + search: "search", + }); + expect(expected.logs).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.logs).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +96,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -106,14 +108,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -122,14 +120,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -138,14 +132,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (3f37566)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -223,7 +213,7 @@ describe("Logs", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -232,14 +222,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -248,14 +234,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -264,14 +246,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -280,14 +258,10 @@ describe("Logs", () => { await expect(async () => { return await client.logs.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -296,10 +270,6 @@ describe("Logs", () => { await expect(async () => { return await client.logs.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/networkAcls.test.ts b/src/management/tests/wire/networkAcls.test.ts index b9ec55cdd4..d29a846e93 100644 --- a/src/management/tests/wire/networkAcls.test.ts +++ b/src/management/tests/wire/networkAcls.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("NetworkAcls", () => { - test("list (f9c0d692)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -48,15 +46,19 @@ describe("NetworkAcls", () => { limit: 1.1, total: 1.1, }; - const page = await client.networkAcls.list(); - expect(expected.network_acls).toEqual(page.data); + const page = await client.networkAcls.list({ + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.network_acls).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.network_acls).toEqual(nextPage.data); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +67,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -81,14 +79,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (c29c5807)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -97,14 +91,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.list(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -113,14 +103,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (ea903a5f)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -144,25 +130,14 @@ describe("NetworkAcls", () => { expect(response).toEqual(undefined); }); - test("create (c2e283a4)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -180,44 +155,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (ee0ff0cc)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -235,44 +187,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (1c23e3d0)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -290,44 +219,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (e59936e8)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -345,44 +251,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (5d4241dc)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -400,44 +283,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (27b83a80)", async () => { + test("create (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -455,26 +315,14 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.InternalServerError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.InternalServerError); }); - test("get (f3f30785)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -553,7 +401,7 @@ describe("NetworkAcls", () => { }); }); - test("get (49d52691)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -562,14 +410,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -578,14 +422,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -594,14 +434,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -610,14 +446,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (1acfd4fb)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -716,25 +548,14 @@ describe("NetworkAcls", () => { }); }); - test("set (17f2ed2a)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -752,44 +573,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (299f5a82)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -807,44 +605,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (57a63466)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -862,44 +637,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (313cc19e)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -917,44 +669,21 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("set (1f543e72)", async () => { + test("set (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { description: "description", active: true, priority: 1.1, - rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, - scope: "management", - }, + rule: { action: {}, scope: "management" }, }; const rawResponseBody = { key: "value" }; server @@ -972,26 +701,14 @@ describe("NetworkAcls", () => { active: true, priority: 1.1, rule: { - action: { - block: undefined, - allow: undefined, - log: undefined, - redirect: undefined, - redirect_uri: undefined, - }, - match: undefined, - not_match: undefined, + action: {}, scope: "management", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1001,7 +718,7 @@ describe("NetworkAcls", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1016,14 +733,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1038,14 +751,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1060,14 +769,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1082,14 +787,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1104,14 +805,10 @@ describe("NetworkAcls", () => { await expect(async () => { return await client.networkAcls.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (bb550618)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -1197,10 +894,10 @@ describe("NetworkAcls", () => { }); }); - test("update (1f4f3271)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { description: undefined, active: undefined, priority: undefined, rule: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1212,23 +909,14 @@ describe("NetworkAcls", () => { .build(); await expect(async () => { - return await client.networkAcls.update("id", { - description: undefined, - active: undefined, - priority: undefined, - rule: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.networkAcls.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (4db2a2b1)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { description: undefined, active: undefined, priority: undefined, rule: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1240,23 +928,14 @@ describe("NetworkAcls", () => { .build(); await expect(async () => { - return await client.networkAcls.update("id", { - description: undefined, - active: undefined, - priority: undefined, - rule: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.networkAcls.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (fa32ecad)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { description: undefined, active: undefined, priority: undefined, rule: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1268,23 +947,14 @@ describe("NetworkAcls", () => { .build(); await expect(async () => { - return await client.networkAcls.update("id", { - description: undefined, - active: undefined, - priority: undefined, - rule: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.networkAcls.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (fa01531d)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { description: undefined, active: undefined, priority: undefined, rule: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1296,23 +966,14 @@ describe("NetworkAcls", () => { .build(); await expect(async () => { - return await client.networkAcls.update("id", { - description: undefined, - active: undefined, - priority: undefined, - rule: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.networkAcls.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (18eac855)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { description: undefined, active: undefined, priority: undefined, rule: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1324,16 +985,7 @@ describe("NetworkAcls", () => { .build(); await expect(async () => { - return await client.networkAcls.update("id", { - description: undefined, - active: undefined, - priority: undefined, - rule: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.networkAcls.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/organizations.test.ts b/src/management/tests/wire/organizations.test.ts index 92fda14407..53ff8bd4f6 100644 --- a/src/management/tests/wire/organizations.test.ts +++ b/src/management/tests/wire/organizations.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Organizations", () => { - test("list (fd97bc6a)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -32,15 +30,19 @@ describe("Organizations", () => { }, ], }; - const page = await client.organizations.list(); - expect(expected.organizations).toEqual(page.data); + const page = await client.organizations.list({ + from: "from", + take: 1, + sort: "sort", + }); + expect(expected.organizations).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.organizations).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,14 +51,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +63,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -81,14 +75,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -97,14 +87,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (80fff006)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; @@ -168,17 +154,10 @@ describe("Organizations", () => { }); }); - test("create (f0d23820)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, - }; + const rawRequestBody = { name: "organization-1" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -192,30 +171,14 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.create({ name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (3add1e08)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, - }; + const rawRequestBody = { name: "organization-1" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -229,30 +192,14 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.create({ name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (2336e28c)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, - }; + const rawRequestBody = { name: "organization-1" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -266,30 +213,14 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.create({ name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (15684d24)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, - }; + const rawRequestBody = { name: "organization-1" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -303,30 +234,14 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.create({ name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (4c3e9d8)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, - }; + const rawRequestBody = { name: "organization-1" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -340,20 +255,11 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.create({ name: "organization-1", - display_name: undefined, - branding: undefined, - metadata: undefined, - enabled_connections: undefined, - token_quota: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("getByName (5b050b8c)", async () => { + test("getByName (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -398,7 +304,7 @@ describe("Organizations", () => { }); }); - test("getByName (864d8157)", async () => { + test("getByName (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -413,14 +319,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.getByName("name"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getByName (bfbba527)", async () => { + test("getByName (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -435,14 +337,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.getByName("name"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getByName (bcdd9133)", async () => { + test("getByName (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -457,14 +355,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.getByName("name"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getByName (3c0d152b)", async () => { + test("getByName (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -479,14 +373,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.getByName("name"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (e278f998)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -525,7 +415,7 @@ describe("Organizations", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -534,14 +424,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -550,14 +436,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -566,14 +448,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (27b44cb5)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -582,14 +460,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -599,7 +473,7 @@ describe("Organizations", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -614,14 +488,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -636,14 +506,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -658,14 +524,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -680,14 +542,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -702,14 +560,10 @@ describe("Organizations", () => { await expect(async () => { return await client.organizations.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (1e678c2f)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -755,16 +609,10 @@ describe("Organizations", () => { }); }); - test("update (175175e8)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -776,30 +624,14 @@ describe("Organizations", () => { .build(); await expect(async () => { - return await client.organizations.update("id", { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.organizations.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (3755d350)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -811,30 +643,14 @@ describe("Organizations", () => { .build(); await expect(async () => { - return await client.organizations.update("id", { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.organizations.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (cd2d7134)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -846,30 +662,14 @@ describe("Organizations", () => { .build(); await expect(async () => { - return await client.organizations.update("id", { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.organizations.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (6df45540)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -881,17 +681,7 @@ describe("Organizations", () => { .build(); await expect(async () => { - return await client.organizations.update("id", { - display_name: undefined, - name: undefined, - branding: undefined, - metadata: undefined, - token_quota: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.organizations.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/organizations/clientGrants.test.ts b/src/management/tests/wire/organizations/clientGrants.test.ts index d83bce3a83..801de9acbb 100644 --- a/src/management/tests/wire/organizations/clientGrants.test.ts +++ b/src/management/tests/wire/organizations/clientGrants.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("ClientGrants", () => { - test("list (712badd5)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -49,15 +47,21 @@ describe("ClientGrants", () => { }, ], }; - const page = await client.organizations.clientGrants.list("id"); - expect(expected.client_grants).toEqual(page.data); + const page = await client.organizations.clientGrants.list("id", { + audience: "audience", + client_id: "client_id", + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.client_grants).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.client_grants).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -72,14 +76,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -94,14 +94,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -116,14 +112,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -138,14 +130,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (91a0f4d4)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -179,7 +167,7 @@ describe("ClientGrants", () => { }); }); - test("create (d9fea040)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -197,14 +185,10 @@ describe("ClientGrants", () => { return await client.organizations.clientGrants.create("id", { grant_id: "grant_id", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (a071fa8)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -222,14 +206,10 @@ describe("ClientGrants", () => { return await client.organizations.clientGrants.create("id", { grant_id: "grant_id", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (6dcd5eac)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -247,14 +227,10 @@ describe("ClientGrants", () => { return await client.organizations.clientGrants.create("id", { grant_id: "grant_id", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (c68e00f4)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -272,14 +248,10 @@ describe("ClientGrants", () => { return await client.organizations.clientGrants.create("id", { grant_id: "grant_id", }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (7fdbab44)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -297,14 +269,10 @@ describe("ClientGrants", () => { return await client.organizations.clientGrants.create("id", { grant_id: "grant_id", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (ebc7dff8)", async () => { + test("create (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { grant_id: "grant_id" }; @@ -322,14 +290,10 @@ describe("ClientGrants", () => { return await client.organizations.clientGrants.create("id", { grant_id: "grant_id", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7c225ed)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -339,7 +303,7 @@ describe("ClientGrants", () => { expect(response).toEqual(undefined); }); - test("delete (ad08b9ee)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -354,14 +318,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.delete("id", "grant_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (e5d01576)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -376,14 +336,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.delete("id", "grant_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (cdfc707a)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -398,14 +354,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.delete("id", "grant_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (1120f272)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -420,14 +372,10 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.delete("id", "grant_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (73fbb716)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -442,10 +390,6 @@ describe("ClientGrants", () => { await expect(async () => { return await client.organizations.clientGrants.delete("id", "grant_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/organizations/enabledConnections.test.ts b/src/management/tests/wire/organizations/enabledConnections.test.ts index 1bf56c4cb5..3e999749fe 100644 --- a/src/management/tests/wire/organizations/enabledConnections.test.ts +++ b/src/management/tests/wire/organizations/enabledConnections.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("EnabledConnections", () => { - test("list (9e9afec2)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,15 +43,19 @@ describe("EnabledConnections", () => { }, ], }; - const page = await client.organizations.enabledConnections.list("id"); - expect(expected.enabled_connections).toEqual(page.data); + const page = await client.organizations.enabledConnections.list("id", { + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.enabled_connections).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.enabled_connections).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -68,14 +70,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +88,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +106,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -134,14 +124,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("add (382c2607)", async () => { + test("add (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection_id: "connection_id" }; @@ -176,15 +162,10 @@ describe("EnabledConnections", () => { }); }); - test("add (668f4ffb)", async () => { + test("add (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = { connection_id: "connection_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -198,26 +179,14 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.add("id", { connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("add (8a865bab)", async () => { + test("add (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = { connection_id: "connection_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -231,26 +200,14 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.add("id", { connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("add (a52a5457)", async () => { + test("add (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = { connection_id: "connection_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -264,26 +221,14 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.add("id", { connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("add (c9afca7f)", async () => { + test("add (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = { connection_id: "connection_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -297,18 +242,11 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.add("id", { connection_id: "connection_id", - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (4775f6)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -340,7 +278,7 @@ describe("EnabledConnections", () => { }); }); - test("get (2508cc35)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -355,14 +293,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.get("id", "connectionId"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (7ee17801)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -377,14 +311,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.get("id", "connectionId"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (45533d9)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -399,14 +329,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.get("id", "connectionId"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (54e78333)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -421,7 +347,7 @@ describe("EnabledConnections", () => { expect(response).toEqual(undefined); }); - test("delete (18fb2e85)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -436,14 +362,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.delete("id", "connectionId"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (2508cc35)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -458,14 +380,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.delete("id", "connectionId"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (7ee17801)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -480,14 +398,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.delete("id", "connectionId"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (45533d9)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -502,14 +416,10 @@ describe("EnabledConnections", () => { await expect(async () => { return await client.organizations.enabledConnections.delete("id", "connectionId"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (70b98bad)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -542,14 +452,10 @@ describe("EnabledConnections", () => { }); }); - test("update (84bdeb84)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -561,26 +467,14 @@ describe("EnabledConnections", () => { .build(); await expect(async () => { - return await client.organizations.enabledConnections.update("id", "connectionId", { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.organizations.enabledConnections.update("id", "connectionId"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (37f38eac)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -592,26 +486,14 @@ describe("EnabledConnections", () => { .build(); await expect(async () => { - return await client.organizations.enabledConnections.update("id", "connectionId", { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.organizations.enabledConnections.update("id", "connectionId"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (77018130)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -623,26 +505,14 @@ describe("EnabledConnections", () => { .build(); await expect(async () => { - return await client.organizations.enabledConnections.update("id", "connectionId", { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.organizations.enabledConnections.update("id", "connectionId"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (e63acfbc)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -654,15 +524,7 @@ describe("EnabledConnections", () => { .build(); await expect(async () => { - return await client.organizations.enabledConnections.update("id", "connectionId", { - assign_membership_on_login: undefined, - is_signup_enabled: undefined, - show_as_button: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.organizations.enabledConnections.update("id", "connectionId"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/organizations/invitations.test.ts b/src/management/tests/wire/organizations/invitations.test.ts index fa9bd78226..171f6a2913 100644 --- a/src/management/tests/wire/organizations/invitations.test.ts +++ b/src/management/tests/wire/organizations/invitations.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Invitations", () => { - test("list (ee28cb44)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -69,15 +67,22 @@ describe("Invitations", () => { }, ], }; - const page = await client.organizations.invitations.list("id"); - expect(expected.invitations).toEqual(page.data); + const page = await client.organizations.invitations.list("id", { + page: 1, + per_page: 1, + include_totals: true, + fields: "fields", + include_fields: true, + sort: "sort", + }); + expect(expected.invitations).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.invitations).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -92,14 +97,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -114,14 +115,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -136,14 +133,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -158,14 +151,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -180,14 +169,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (b5b45b8d)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { inviter: { name: "name" }, invitee: { email: "email" }, client_id: "client_id" }; @@ -249,19 +234,13 @@ describe("Invitations", () => { }); }); - test("create (97e2d76a)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { inviter: { name: "Jane Doe" }, invitee: { email: "john.doe@gmail.com" }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }; const rawResponseBody = { key: "value" }; server @@ -282,33 +261,17 @@ describe("Invitations", () => { email: "john.doe@gmail.com", }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (aafe4c2)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { inviter: { name: "Jane Doe" }, invitee: { email: "john.doe@gmail.com" }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }; const rawResponseBody = { key: "value" }; server @@ -329,33 +292,17 @@ describe("Invitations", () => { email: "john.doe@gmail.com", }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (168577a6)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { inviter: { name: "Jane Doe" }, invitee: { email: "john.doe@gmail.com" }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }; const rawResponseBody = { key: "value" }; server @@ -376,33 +323,17 @@ describe("Invitations", () => { email: "john.doe@gmail.com", }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (6ba6dbde)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { inviter: { name: "Jane Doe" }, invitee: { email: "john.doe@gmail.com" }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }; const rawResponseBody = { key: "value" }; server @@ -423,33 +354,17 @@ describe("Invitations", () => { email: "john.doe@gmail.com", }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (2391d3b2)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { inviter: { name: "Jane Doe" }, invitee: { email: "john.doe@gmail.com" }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }; const rawResponseBody = { key: "value" }; server @@ -470,21 +385,11 @@ describe("Invitations", () => { email: "john.doe@gmail.com", }, client_id: "AaiyAPdpYdesoKnqjj8HJqRn4T5titww", - connection_id: undefined, - app_metadata: undefined, - user_metadata: undefined, - ttl_sec: undefined, - roles: undefined, - send_invitation_email: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (781daf21)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -511,7 +416,10 @@ describe("Invitations", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.organizations.invitations.get("id", "invitation_id"); + const response = await client.organizations.invitations.get("id", "invitation_id", { + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ id: "id", organization_id: "organization_id", @@ -537,7 +445,7 @@ describe("Invitations", () => { }); }); - test("get (26c8f4b7)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -552,14 +460,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.get("id", "invitation_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (ba053b07)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -574,14 +478,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.get("id", "invitation_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (60f3b413)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -596,14 +496,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.get("id", "invitation_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (9583bb73)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -618,14 +514,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.get("id", "invitation_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (640230b)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -640,14 +532,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.get("id", "invitation_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (cfeea1a9)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -662,7 +550,7 @@ describe("Invitations", () => { expect(response).toEqual(undefined); }); - test("delete (ba053b07)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -677,14 +565,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.delete("id", "invitation_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (60f3b413)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -699,14 +583,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.delete("id", "invitation_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (9583bb73)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -721,14 +601,10 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.delete("id", "invitation_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (640230b)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -743,10 +619,6 @@ describe("Invitations", () => { await expect(async () => { return await client.organizations.invitations.delete("id", "invitation_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/organizations/members.test.ts b/src/management/tests/wire/organizations/members.test.ts index 0c761147fa..9cb95eb5b9 100644 --- a/src/management/tests/wire/organizations/members.test.ts +++ b/src/management/tests/wire/organizations/members.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Members", () => { - test("list (4b60a5d4)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -35,15 +33,20 @@ describe("Members", () => { }, ], }; - const page = await client.organizations.members.list("id"); - expect(expected.members).toEqual(page.data); + const page = await client.organizations.members.list("id", { + from: "from", + take: 1, + fields: "fields", + include_fields: true, + }); + expect(expected.members).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.members).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +61,10 @@ describe("Members", () => { await expect(async () => { return await client.organizations.members.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +79,10 @@ describe("Members", () => { await expect(async () => { return await client.organizations.members.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -102,14 +97,10 @@ describe("Members", () => { await expect(async () => { return await client.organizations.members.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -124,14 +115,10 @@ describe("Members", () => { await expect(async () => { return await client.organizations.members.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (d73f6c76)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members"] }; @@ -150,7 +137,7 @@ describe("Members", () => { expect(response).toEqual(undefined); }); - test("create (33b3dc0a)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -168,14 +155,10 @@ describe("Members", () => { return await client.organizations.members.create("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (da310062)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -193,14 +176,10 @@ describe("Members", () => { return await client.organizations.members.create("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (2b93d2c6)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -218,14 +197,10 @@ describe("Members", () => { return await client.organizations.members.create("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (dacf93d2)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -243,14 +218,10 @@ describe("Members", () => { return await client.organizations.members.create("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (d73f6c76)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members"] }; @@ -269,7 +240,7 @@ describe("Members", () => { expect(response).toEqual(undefined); }); - test("delete (33b3dc0a)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -287,14 +258,10 @@ describe("Members", () => { return await client.organizations.members.delete("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (da310062)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -312,14 +279,10 @@ describe("Members", () => { return await client.organizations.members.delete("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2b93d2c6)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -337,14 +300,10 @@ describe("Members", () => { return await client.organizations.members.delete("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (dacf93d2)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { members: ["members", "members"] }; @@ -362,10 +321,6 @@ describe("Members", () => { return await client.organizations.members.delete("id", { members: ["members", "members"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/organizations/members/roles.test.ts b/src/management/tests/wire/organizations/members/roles.test.ts index 1e5427ee03..4ccc27b05c 100644 --- a/src/management/tests/wire/organizations/members/roles.test.ts +++ b/src/management/tests/wire/organizations/members/roles.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Roles", () => { - test("list (41699e00)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -37,15 +35,19 @@ describe("Roles", () => { }, ], }; - const page = await client.organizations.members.roles.list("id", "user_id"); - expect(expected.roles).toEqual(page.data); + const page = await client.organizations.members.roles.list("id", "user_id", { + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.roles).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.roles).toEqual(nextPage.data); }); - test("list (969d85db)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -60,14 +62,10 @@ describe("Roles", () => { await expect(async () => { return await client.organizations.members.roles.list("id", "user_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (94c14e8b)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -82,14 +80,10 @@ describe("Roles", () => { await expect(async () => { return await client.organizations.members.roles.list("id", "user_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (d7235037)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -104,14 +98,10 @@ describe("Roles", () => { await expect(async () => { return await client.organizations.members.roles.list("id", "user_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (932bb4df)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -126,14 +116,10 @@ describe("Roles", () => { await expect(async () => { return await client.organizations.members.roles.list("id", "user_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("assign (5807efb4)", async () => { + test("assign (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles"] }; @@ -152,7 +138,7 @@ describe("Roles", () => { expect(response).toEqual(undefined); }); - test("assign (14c36ac6)", async () => { + test("assign (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -170,14 +156,10 @@ describe("Roles", () => { return await client.organizations.members.roles.assign("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("assign (f8cc74ae)", async () => { + test("assign (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -195,14 +177,10 @@ describe("Roles", () => { return await client.organizations.members.roles.assign("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("assign (1c9529d2)", async () => { + test("assign (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -220,14 +198,10 @@ describe("Roles", () => { return await client.organizations.members.roles.assign("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("assign (2d5c8b6a)", async () => { + test("assign (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -245,14 +219,10 @@ describe("Roles", () => { return await client.organizations.members.roles.assign("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("assign (40dda6ce)", async () => { + test("assign (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -270,14 +240,10 @@ describe("Roles", () => { return await client.organizations.members.roles.assign("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (5807efb4)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles"] }; @@ -296,7 +262,7 @@ describe("Roles", () => { expect(response).toEqual(undefined); }); - test("delete (14c36ac6)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -314,14 +280,10 @@ describe("Roles", () => { return await client.organizations.members.roles.delete("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (f8cc74ae)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -339,14 +301,10 @@ describe("Roles", () => { return await client.organizations.members.roles.delete("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (1c9529d2)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -364,14 +322,10 @@ describe("Roles", () => { return await client.organizations.members.roles.delete("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (40dda6ce)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -389,10 +343,6 @@ describe("Roles", () => { return await client.organizations.members.roles.delete("id", "user_id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/prompts.test.ts b/src/management/tests/wire/prompts.test.ts index 33c2854d01..130ef50a2a 100644 --- a/src/management/tests/wire/prompts.test.ts +++ b/src/management/tests/wire/prompts.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Prompts", () => { - test("getSettings (f5ddf969)", async () => { + test("getSettings (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("Prompts", () => { }); }); - test("getSettings (1e230aeb)", async () => { + test("getSettings (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -35,14 +33,10 @@ describe("Prompts", () => { await expect(async () => { return await client.prompts.getSettings(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getSettings (af841397)", async () => { + test("getSettings (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -51,14 +45,10 @@ describe("Prompts", () => { await expect(async () => { return await client.prompts.getSettings(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getSettings (ee1e23bf)", async () => { + test("getSettings (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -67,14 +57,10 @@ describe("Prompts", () => { await expect(async () => { return await client.prompts.getSettings(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("updateSettings (30a8300c)", async () => { + test("updateSettings (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -100,14 +86,10 @@ describe("Prompts", () => { }); }); - test("updateSettings (7c7fd6ea)", async () => { + test("updateSettings (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -119,26 +101,14 @@ describe("Prompts", () => { .build(); await expect(async () => { - return await client.prompts.updateSettings({ - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.prompts.updateSettings(); + }).rejects.toThrow(Management.BadRequestError); }); - test("updateSettings (a2cbc442)", async () => { + test("updateSettings (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -150,26 +120,14 @@ describe("Prompts", () => { .build(); await expect(async () => { - return await client.prompts.updateSettings({ - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.prompts.updateSettings(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("updateSettings (ee1b6326)", async () => { + test("updateSettings (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -181,26 +139,14 @@ describe("Prompts", () => { .build(); await expect(async () => { - return await client.prompts.updateSettings({ - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.prompts.updateSettings(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("updateSettings (150a7732)", async () => { + test("updateSettings (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -212,15 +158,7 @@ describe("Prompts", () => { .build(); await expect(async () => { - return await client.prompts.updateSettings({ - universal_login_experience: undefined, - identifier_first: undefined, - webauthn_platform_first_factor: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.prompts.updateSettings(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/prompts/customText.test.ts b/src/management/tests/wire/prompts/customText.test.ts index e6ea34970e..8fed158813 100644 --- a/src/management/tests/wire/prompts/customText.test.ts +++ b/src/management/tests/wire/prompts/customText.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("CustomText", () => { - test("get (6ef6159b)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("CustomText", () => { }); }); - test("get (1f7a9e8c)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("CustomText", () => { await expect(async () => { return await client.prompts.customText.get("login", "am"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (be2f9494)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("CustomText", () => { await expect(async () => { return await client.prompts.customText.get("login", "am"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (e4f57178)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("CustomText", () => { await expect(async () => { return await client.prompts.customText.get("login", "am"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (fc7f030)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("CustomText", () => { await expect(async () => { return await client.prompts.customText.get("login", "am"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (23494044)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -129,14 +111,10 @@ describe("CustomText", () => { await expect(async () => { return await client.prompts.customText.get("login", "am"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (d717a6a1)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -155,7 +133,7 @@ describe("CustomText", () => { expect(response).toEqual(undefined); }); - test("set (2810180)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -175,14 +153,10 @@ describe("CustomText", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (ea030ce8)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -202,14 +176,10 @@ describe("CustomText", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (18df57ec)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -229,14 +199,10 @@ describe("CustomText", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (f3830438)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -256,10 +222,6 @@ describe("CustomText", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/prompts/partials.test.ts b/src/management/tests/wire/prompts/partials.test.ts index 029b38ea69..a424142fc9 100644 --- a/src/management/tests/wire/prompts/partials.test.ts +++ b/src/management/tests/wire/prompts/partials.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Partials", () => { - test("get (f45698c9)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("Partials", () => { }); }); - test("get (765aaf41)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("Partials", () => { await expect(async () => { return await client.prompts.partials.get("login"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (ab312141)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("Partials", () => { await expect(async () => { return await client.prompts.partials.get("login"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (c4cbe67d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("Partials", () => { await expect(async () => { return await client.prompts.partials.get("login"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (7231566d)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("Partials", () => { await expect(async () => { return await client.prompts.partials.get("login"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (a95dd965)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -129,14 +111,10 @@ describe("Partials", () => { await expect(async () => { return await client.prompts.partials.get("login"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (b58c3a4b)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -155,7 +133,7 @@ describe("Partials", () => { expect(response).toEqual(undefined); }); - test("set (67356a97)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -175,14 +153,10 @@ describe("Partials", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (c86b0967)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -202,14 +176,10 @@ describe("Partials", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (69ccd973)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -229,14 +199,10 @@ describe("Partials", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (2a143c6b)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: { key: "value" } }; @@ -256,10 +222,6 @@ describe("Partials", () => { key: "value", }, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/prompts/rendering.test.ts b/src/management/tests/wire/prompts/rendering.test.ts index 37121ae158..edd9d23224 100644 --- a/src/management/tests/wire/prompts/rendering.test.ts +++ b/src/management/tests/wire/prompts/rendering.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Rendering", () => { - test("list (50ff3a1)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,15 +39,24 @@ describe("Rendering", () => { limit: 1.1, total: 1.1, }; - const page = await client.prompts.rendering.list(); - expect(expected.configs).toEqual(page.data); + const page = await client.prompts.rendering.list({ + fields: "fields", + include_fields: true, + page: 1, + per_page: 1, + include_totals: true, + prompt: "prompt", + screen: "screen", + rendering_mode: "advanced", + }); + expect(expected.configs).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.configs).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -58,14 +65,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -74,14 +77,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (67cb641b)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +89,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.list(); - }).rejects.toThrow( - new Management.PaymentRequiredError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.PaymentRequiredError); }); - test("list (af841397)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -106,14 +101,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -122,14 +113,258 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (f450973f)", async () => { + test("bulkUpdate (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + configs: [{ prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}] }], + }; + const rawResponseBody = { + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + context_configuration: ["context_configuration"], + default_head_tags_disabled: true, + head_tags: [{}], + use_page_template: true, + }, + ], + }; + server + .mockEndpoint() + .patch("/prompts/rendering") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}], + }, + ], + }); + expect(response).toEqual({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + context_configuration: ["context_configuration"], + default_head_tags_disabled: true, + head_tags: [{}], + use_page_template: true, + }, + ], + }); + }); + + test("bulkUpdate (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + configs: [ + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + ], + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/prompts/rendering") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + ], + }); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("bulkUpdate (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + configs: [ + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + ], + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/prompts/rendering") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + ], + }); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("bulkUpdate (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + configs: [ + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + ], + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/prompts/rendering") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(402) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + ], + }); + }).rejects.toThrow(Management.PaymentRequiredError); + }); + + test("bulkUpdate (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + configs: [ + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + ], + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/prompts/rendering") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + ], + }); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("bulkUpdate (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + configs: [ + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + { prompt: "login", screen: "login", rendering_mode: "advanced", head_tags: [{}, {}] }, + ], + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/prompts/rendering") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.prompts.rendering.bulkUpdate({ + configs: [ + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + { + prompt: "login", + screen: "login", + rendering_mode: "advanced", + head_tags: [{}, {}], + }, + ], + }); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -193,7 +428,7 @@ describe("Rendering", () => { }); }); - test("get (b549b753)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -208,14 +443,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.get("login", "login"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (8a4aefa3)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -230,14 +461,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.get("login", "login"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (12a5dcf3)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -252,14 +479,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.get("login", "login"); - }).rejects.toThrow( - new Management.PaymentRequiredError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.PaymentRequiredError); }); - test("get (189ae4f)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -274,14 +497,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.get("login", "login"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (f4a7aeff)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -296,14 +515,10 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.get("login", "login"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (fb9ff497)", async () => { + test("get (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -318,17 +533,13 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.get("login", "login"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (c47cbe54)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = {}; + const rawRequestBody = { rendering_mode: "advanced", head_tags: [{}] }; const rawResponseBody = { rendering_mode: "advanced", context_configuration: ["context_configuration"], @@ -351,7 +562,10 @@ describe("Rendering", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.prompts.rendering.update("login", "login"); + const response = await client.prompts.rendering.update("login", "login", { + rendering_mode: "advanced", + head_tags: [{}], + }); expect(response).toEqual({ rendering_mode: "advanced", context_configuration: ["context_configuration"], @@ -384,17 +598,10 @@ describe("Rendering", () => { }); }); - test("update (ee9afc03)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, - }; + const rawRequestBody = { rendering_mode: "advanced", head_tags: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -407,31 +614,16 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.update("login", "login", { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, + rendering_mode: "advanced", + head_tags: [{}, {}], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (e2bc0413)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, - }; + const rawRequestBody = { rendering_mode: "advanced", head_tags: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -444,31 +636,16 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.update("login", "login", { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, + rendering_mode: "advanced", + head_tags: [{}, {}], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (58367d23)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, - }; + const rawRequestBody = { rendering_mode: "advanced", head_tags: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -481,31 +658,16 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.update("login", "login", { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, + rendering_mode: "advanced", + head_tags: [{}, {}], }); - }).rejects.toThrow( - new Management.PaymentRequiredError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.PaymentRequiredError); }); - test("update (cbb157f)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, - }; + const rawRequestBody = { rendering_mode: "advanced", head_tags: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -518,31 +680,16 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.update("login", "login", { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, + rendering_mode: "advanced", + head_tags: [{}, {}], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (e573f447)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, - }; + const rawRequestBody = { rendering_mode: "advanced", head_tags: [{}, {}] }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -555,17 +702,9 @@ describe("Rendering", () => { await expect(async () => { return await client.prompts.rendering.update("login", "login", { - rendering_mode: undefined, - context_configuration: undefined, - default_head_tags_disabled: undefined, - head_tags: undefined, - filters: undefined, - use_page_template: undefined, + rendering_mode: "advanced", + head_tags: [{}, {}], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/refreshTokens.test.ts b/src/management/tests/wire/refreshTokens.test.ts index 728684355e..c350a15903 100644 --- a/src/management/tests/wire/refreshTokens.test.ts +++ b/src/management/tests/wire/refreshTokens.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("RefreshTokens", () => { - test("get (bb8b7958)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -61,7 +59,7 @@ describe("RefreshTokens", () => { }); }); - test("get (49d52691)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -70,14 +68,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -86,14 +80,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -102,14 +92,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -118,14 +104,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -135,7 +117,7 @@ describe("RefreshTokens", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -150,14 +132,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -172,14 +150,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -194,14 +168,10 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -216,10 +186,6 @@ describe("RefreshTokens", () => { await expect(async () => { return await client.refreshTokens.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/resourceServers.test.ts b/src/management/tests/wire/resourceServers.test.ts index 9f42372841..f85f301b8b 100644 --- a/src/management/tests/wire/resourceServers.test.ts +++ b/src/management/tests/wire/resourceServers.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("ResourceServers", () => { - test("list (e4c6d332)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -34,7 +32,7 @@ describe("ResourceServers", () => { format: "compact-nested-jwe", encryption_key: { alg: "RSA-OAEP-256", pem: "pem" }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", proof_of_possession: { mechanism: "mtls", required: true }, client_id: "client_id", }, @@ -72,7 +70,7 @@ describe("ResourceServers", () => { pem: "pem", }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", proof_of_possession: { mechanism: "mtls", required: true, @@ -81,15 +79,20 @@ describe("ResourceServers", () => { }, ], }; - const page = await client.resourceServers.list(); - expect(expected.resource_servers).toEqual(page.data); + const page = await client.resourceServers.list({ + page: 1, + per_page: 1, + include_totals: true, + include_fields: true, + }); + expect(expected.resource_servers).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.resource_servers).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,14 +101,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -114,14 +113,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -130,14 +125,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -146,14 +137,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (fa7bdae3)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { identifier: "identifier" }; @@ -175,7 +162,7 @@ describe("ResourceServers", () => { format: "compact-nested-jwe", encryption_key: { name: "name", alg: "RSA-OAEP-256", kid: "kid", pem: "pem" }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", authorization_details: [{ key: "value" }], proof_of_possession: { mechanism: "mtls", required: true }, subject_type_authorization: { user: { policy: "allow_all" }, client: { policy: "deny_all" } }, @@ -221,7 +208,7 @@ describe("ResourceServers", () => { pem: "pem", }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", authorization_details: [ { key: "value", @@ -243,26 +230,10 @@ describe("ResourceServers", () => { }); }); - test("create (4df46d08)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = { identifier: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -275,49 +246,15 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.create({ - name: undefined, identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (34bf1770)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = { identifier: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -330,49 +267,15 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.create({ - name: undefined, identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (40bbc954)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = { identifier: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -385,49 +288,15 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.create({ - name: undefined, identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (3bddf72c)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = { identifier: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -440,49 +309,15 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.create({ - name: undefined, identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (c5932c60)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = { identifier: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -495,30 +330,12 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.create({ - name: undefined, identifier: "x", - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (77862bce)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -540,7 +357,7 @@ describe("ResourceServers", () => { format: "compact-nested-jwe", encryption_key: { name: "name", alg: "RSA-OAEP-256", kid: "kid", pem: "pem" }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", authorization_details: [{ key: "value" }], proof_of_possession: { mechanism: "mtls", required: true }, subject_type_authorization: { user: { policy: "allow_all" }, client: { policy: "deny_all" } }, @@ -554,7 +371,9 @@ describe("ResourceServers", () => { .jsonBody(rawResponseBody) .build(); - const response = await client.resourceServers.get("id"); + const response = await client.resourceServers.get("id", { + include_fields: true, + }); expect(response).toEqual({ id: "id", name: "name", @@ -583,7 +402,7 @@ describe("ResourceServers", () => { pem: "pem", }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", authorization_details: [ { key: "value", @@ -605,7 +424,7 @@ describe("ResourceServers", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -620,14 +439,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -642,14 +457,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -664,14 +475,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -686,14 +493,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -708,14 +511,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -725,7 +524,7 @@ describe("ResourceServers", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -740,14 +539,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -762,14 +557,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -784,14 +575,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -806,14 +593,10 @@ describe("ResourceServers", () => { await expect(async () => { return await client.resourceServers.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (ec083829)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -835,7 +618,7 @@ describe("ResourceServers", () => { format: "compact-nested-jwe", encryption_key: { name: "name", alg: "RSA-OAEP-256", kid: "kid", pem: "pem" }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", authorization_details: [{ key: "value" }], proof_of_possession: { mechanism: "mtls", required: true }, subject_type_authorization: { user: { policy: "allow_all" }, client: { policy: "deny_all" } }, @@ -879,7 +662,7 @@ describe("ResourceServers", () => { pem: "pem", }, }, - consent_policy: "consent_policy", + consent_policy: "transactional-authorization-with-mfa", authorization_details: [ { key: "value", @@ -901,25 +684,10 @@ describe("ResourceServers", () => { }); }); - test("update (b2a43384)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -931,48 +699,14 @@ describe("ResourceServers", () => { .build(); await expect(async () => { - return await client.resourceServers.update("id", { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.resourceServers.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (67fbd6ac)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -984,48 +718,14 @@ describe("ResourceServers", () => { .build(); await expect(async () => { - return await client.resourceServers.update("id", { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.resourceServers.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (45530930)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1037,48 +737,14 @@ describe("ResourceServers", () => { .build(); await expect(async () => { - return await client.resourceServers.update("id", { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.resourceServers.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (f1f5c648)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1090,48 +756,14 @@ describe("ResourceServers", () => { .build(); await expect(async () => { - return await client.resourceServers.update("id", { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.resourceServers.update("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("update (9f64d7bc)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1143,26 +775,7 @@ describe("ResourceServers", () => { .build(); await expect(async () => { - return await client.resourceServers.update("id", { - name: undefined, - scopes: undefined, - signing_alg: undefined, - signing_secret: undefined, - skip_consent_for_verifiable_first_party_clients: undefined, - allow_offline_access: undefined, - token_lifetime: undefined, - token_dialect: undefined, - enforce_policies: undefined, - token_encryption: undefined, - consent_policy: undefined, - authorization_details: undefined, - proof_of_possession: undefined, - subject_type_authorization: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.resourceServers.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/riskAssessments/settings.test.ts b/src/management/tests/wire/riskAssessments/settings.test.ts index 5c6cbfac56..735d340d3f 100644 --- a/src/management/tests/wire/riskAssessments/settings.test.ts +++ b/src/management/tests/wire/riskAssessments/settings.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Settings", () => { - test("get (97b70605)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("Settings", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("Settings", () => { await expect(async () => { return await client.riskAssessments.settings.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("Settings", () => { await expect(async () => { return await client.riskAssessments.settings.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (c29c5807)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("Settings", () => { await expect(async () => { return await client.riskAssessments.settings.get(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (ee1e23bf)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("Settings", () => { await expect(async () => { return await client.riskAssessments.settings.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (848114e7)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -136,7 +118,7 @@ describe("Settings", () => { }); }); - test("update (10a4ec10)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -154,14 +136,10 @@ describe("Settings", () => { return await client.riskAssessments.settings.update({ enabled: true, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (104e2738)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -179,14 +157,10 @@ describe("Settings", () => { return await client.riskAssessments.settings.update({ enabled: true, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (b2bdf13c)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -204,14 +178,10 @@ describe("Settings", () => { return await client.riskAssessments.settings.update({ enabled: true, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (e2aa1c04)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -229,14 +199,10 @@ describe("Settings", () => { return await client.riskAssessments.settings.update({ enabled: true, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (c812cb08)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { enabled: true }; @@ -254,10 +220,6 @@ describe("Settings", () => { return await client.riskAssessments.settings.update({ enabled: true, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/riskAssessments/settings/newDevice.test.ts b/src/management/tests/wire/riskAssessments/settings/newDevice.test.ts index cd0935593c..5e3906f1b0 100644 --- a/src/management/tests/wire/riskAssessments/settings/newDevice.test.ts +++ b/src/management/tests/wire/riskAssessments/settings/newDevice.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("NewDevice", () => { - test("get (f381a5d0)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("NewDevice", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("NewDevice", () => { await expect(async () => { return await client.riskAssessments.settings.newDevice.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("NewDevice", () => { await expect(async () => { return await client.riskAssessments.settings.newDevice.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (c29c5807)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("NewDevice", () => { await expect(async () => { return await client.riskAssessments.settings.newDevice.get(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (ee1e23bf)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("NewDevice", () => { await expect(async () => { return await client.riskAssessments.settings.newDevice.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (e553fc9f)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { remember_for: 1 }; @@ -136,7 +118,7 @@ describe("NewDevice", () => { }); }); - test("update (f8784eeb)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { remember_for: 1 }; @@ -154,14 +136,10 @@ describe("NewDevice", () => { return await client.riskAssessments.settings.newDevice.update({ remember_for: 1, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (be40b95b)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { remember_for: 1 }; @@ -179,14 +157,10 @@ describe("NewDevice", () => { return await client.riskAssessments.settings.newDevice.update({ remember_for: 1, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (3f5904c7)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { remember_for: 1 }; @@ -204,14 +178,10 @@ describe("NewDevice", () => { return await client.riskAssessments.settings.newDevice.update({ remember_for: 1, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (dd25c377)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { remember_for: 1 }; @@ -229,14 +199,10 @@ describe("NewDevice", () => { return await client.riskAssessments.settings.newDevice.update({ remember_for: 1, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (4da8702f)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { remember_for: 1 }; @@ -254,10 +220,6 @@ describe("NewDevice", () => { return await client.riskAssessments.settings.newDevice.update({ remember_for: 1, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/roles.test.ts b/src/management/tests/wire/roles.test.ts index d738adb119..405529f6bc 100644 --- a/src/management/tests/wire/roles.test.ts +++ b/src/management/tests/wire/roles.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Roles", () => { - test("list (5a81804c)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -31,15 +29,20 @@ describe("Roles", () => { }, ], }; - const page = await client.roles.list(); - expect(expected.roles).toEqual(page.data); + const page = await client.roles.list({ + per_page: 1, + page: 1, + include_totals: true, + name_filter: "name_filter", + }); + expect(expected.roles).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.roles).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -48,14 +51,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -64,14 +63,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +75,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -96,14 +87,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (6f2a529d)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; @@ -127,10 +114,10 @@ describe("Roles", () => { }); }); - test("create (ddbc439e)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name", description: undefined }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -144,19 +131,14 @@ describe("Roles", () => { await expect(async () => { return await client.roles.create({ name: "name", - description: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (890d21a6)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name", description: undefined }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -170,19 +152,14 @@ describe("Roles", () => { await expect(async () => { return await client.roles.create({ name: "name", - description: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (40e4966a)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name", description: undefined }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -196,19 +173,14 @@ describe("Roles", () => { await expect(async () => { return await client.roles.create({ name: "name", - description: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (519de886)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: "name", description: undefined }; + const rawRequestBody = { name: "name" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -222,16 +194,11 @@ describe("Roles", () => { await expect(async () => { return await client.roles.create({ name: "name", - description: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (bdb4286c)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -246,7 +213,7 @@ describe("Roles", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -255,14 +222,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -271,14 +234,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -287,14 +246,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -303,14 +258,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -319,14 +270,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -336,7 +283,7 @@ describe("Roles", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -345,14 +292,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -361,14 +304,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -377,14 +316,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -393,14 +328,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -409,14 +340,10 @@ describe("Roles", () => { await expect(async () => { return await client.roles.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (aafcfdbb)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -438,10 +365,10 @@ describe("Roles", () => { }); }); - test("update (5865e616)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, description: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -453,21 +380,14 @@ describe("Roles", () => { .build(); await expect(async () => { - return await client.roles.update("id", { - name: undefined, - description: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.roles.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (69b6a6be)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, description: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -479,21 +399,14 @@ describe("Roles", () => { .build(); await expect(async () => { - return await client.roles.update("id", { - name: undefined, - description: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.roles.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (fe39eb62)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, description: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -505,21 +418,14 @@ describe("Roles", () => { .build(); await expect(async () => { - return await client.roles.update("id", { - name: undefined, - description: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.roles.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (29b3609e)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, description: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -531,14 +437,7 @@ describe("Roles", () => { .build(); await expect(async () => { - return await client.roles.update("id", { - name: undefined, - description: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.roles.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/roles/permissions.test.ts b/src/management/tests/wire/roles/permissions.test.ts index a063edbe20..c3d0882d4b 100644 --- a/src/management/tests/wire/roles/permissions.test.ts +++ b/src/management/tests/wire/roles/permissions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Permissions", () => { - test("list (13f93d13)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,15 +43,19 @@ describe("Permissions", () => { }, ], }; - const page = await client.roles.permissions.list("id"); - expect(expected.permissions).toEqual(page.data); + const page = await client.roles.permissions.list("id", { + per_page: 1, + page: 1, + include_totals: true, + }); + expect(expected.permissions).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.permissions).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -68,14 +70,10 @@ describe("Permissions", () => { await expect(async () => { return await client.roles.permissions.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +88,10 @@ describe("Permissions", () => { await expect(async () => { return await client.roles.permissions.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +106,10 @@ describe("Permissions", () => { await expect(async () => { return await client.roles.permissions.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -134,14 +124,10 @@ describe("Permissions", () => { await expect(async () => { return await client.roles.permissions.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -156,14 +142,10 @@ describe("Permissions", () => { await expect(async () => { return await client.roles.permissions.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("add (7044cab6)", async () => { + test("add (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -191,7 +173,7 @@ describe("Permissions", () => { expect(response).toEqual(undefined); }); - test("add (4cfc2db5)", async () => { + test("add (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -223,14 +205,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("add (dd1ed2a5)", async () => { + test("add (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -262,14 +240,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("add (9d65d271)", async () => { + test("add (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -301,14 +275,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("add (fa8483c9)", async () => { + test("add (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -340,14 +310,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (7044cab6)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -375,7 +341,7 @@ describe("Permissions", () => { expect(response).toEqual(undefined); }); - test("delete (4cfc2db5)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -407,14 +373,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (dd1ed2a5)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -446,14 +408,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (9d65d271)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -485,14 +443,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (fa8483c9)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -524,10 +478,6 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).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 5c38578edb..9868446e91 100644 --- a/src/management/tests/wire/roles/users.test.ts +++ b/src/management/tests/wire/roles/users.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Users", () => { - test("list (a50e7b46)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -28,15 +26,18 @@ describe("Users", () => { }, ], }; - const page = await client.roles.users.list("id"); - expect(expected.users).toEqual(page.data); + const page = await client.roles.users.list("id", { + from: "from", + take: 1, + }); + expect(expected.users).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.users).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,14 +46,10 @@ describe("Users", () => { await expect(async () => { return await client.roles.users.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -61,14 +58,10 @@ describe("Users", () => { await expect(async () => { return await client.roles.users.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -77,14 +70,10 @@ describe("Users", () => { await expect(async () => { return await client.roles.users.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -93,14 +82,10 @@ describe("Users", () => { await expect(async () => { return await client.roles.users.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -109,14 +94,10 @@ describe("Users", () => { await expect(async () => { return await client.roles.users.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("assign (804bd334)", async () => { + test("assign (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { users: ["users"] }; @@ -129,7 +110,7 @@ describe("Users", () => { expect(response).toEqual(undefined); }); - test("assign (92bce2fb)", async () => { + test("assign (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { users: ["users", "users"] }; @@ -147,14 +128,10 @@ describe("Users", () => { return await client.roles.users.assign("id", { users: ["users", "users"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("assign (27beaeab)", async () => { + test("assign (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { users: ["users", "users"] }; @@ -172,14 +149,10 @@ describe("Users", () => { return await client.roles.users.assign("id", { users: ["users", "users"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("assign (4b0df57)", async () => { + test("assign (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { users: ["users", "users"] }; @@ -197,14 +170,10 @@ describe("Users", () => { return await client.roles.users.assign("id", { users: ["users", "users"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("assign (947472c7)", async () => { + test("assign (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { users: ["users", "users"] }; @@ -222,14 +191,10 @@ describe("Users", () => { return await client.roles.users.assign("id", { users: ["users", "users"], }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("assign (f207057f)", async () => { + test("assign (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { users: ["users", "users"] }; @@ -247,10 +212,6 @@ describe("Users", () => { return await client.roles.users.assign("id", { users: ["users", "users"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/rules.test.ts b/src/management/tests/wire/rules.test.ts index fad7cc2b4c..0743695465 100644 --- a/src/management/tests/wire/rules.test.ts +++ b/src/management/tests/wire/rules.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Rules", () => { - test("list (1ae5ed17)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -34,15 +32,22 @@ describe("Rules", () => { }, ], }; - const page = await client.rules.list(); - expect(expected.rules).toEqual(page.data); + const page = await client.rules.list({ + page: 1, + per_page: 1, + include_totals: true, + enabled: true, + fields: "fields", + include_fields: true, + }); + expect(expected.rules).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.rules).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -51,14 +56,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -67,14 +68,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -83,14 +80,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (c29c5807)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -99,14 +92,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.list(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (ee1e23bf)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -115,14 +104,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (91e8ac5e)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name", script: "script" }; @@ -150,14 +135,12 @@ describe("Rules", () => { }); }); - test("create (dbb6f79e)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }; const rawResponseBody = { key: "value" }; server @@ -173,24 +156,16 @@ describe("Rules", () => { return await client.rules.create({ name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (511cd5a6)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }; const rawResponseBody = { key: "value" }; server @@ -206,24 +181,16 @@ describe("Rules", () => { return await client.rules.create({ name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (7b236a6a)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }; const rawResponseBody = { key: "value" }; server @@ -239,24 +206,16 @@ describe("Rules", () => { return await client.rules.create({ name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (b1c11a82)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }; const rawResponseBody = { key: "value" }; server @@ -272,24 +231,16 @@ describe("Rules", () => { return await client.rules.create({ name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (6629fc86)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }; const rawResponseBody = { key: "value" }; server @@ -305,24 +256,21 @@ describe("Rules", () => { return await client.rules.create({ name: "my-rule", script: "function (user, context, callback) {\n callback(null, user, context);\n}", - order: undefined, - enabled: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (79e6671)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawResponseBody = { name: "name", id: "id", enabled: true, script: "script", order: 1.1, stage: "stage" }; server.mockEndpoint().get("/rules/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.rules.get("id"); + const response = await client.rules.get("id", { + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ name: "name", id: "id", @@ -333,7 +281,7 @@ describe("Rules", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -342,14 +290,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -358,14 +302,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -374,14 +314,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -390,14 +326,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -406,14 +338,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -423,7 +351,7 @@ describe("Rules", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -432,14 +360,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -448,14 +372,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -464,14 +384,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -480,14 +396,10 @@ describe("Rules", () => { await expect(async () => { return await client.rules.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (1cf03bc8)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -512,10 +424,10 @@ describe("Rules", () => { }); }); - test("update (440e5d22)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { script: undefined, name: undefined, order: undefined, enabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -527,23 +439,14 @@ describe("Rules", () => { .build(); await expect(async () => { - return await client.rules.update("id", { - script: undefined, - name: undefined, - order: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.rules.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (ac02443a)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { script: undefined, name: undefined, order: undefined, enabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -555,23 +458,14 @@ describe("Rules", () => { .build(); await expect(async () => { - return await client.rules.update("id", { - script: undefined, - name: undefined, - order: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.rules.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (d43414fe)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { script: undefined, name: undefined, order: undefined, enabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -583,23 +477,14 @@ describe("Rules", () => { .build(); await expect(async () => { - return await client.rules.update("id", { - script: undefined, - name: undefined, - order: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.rules.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (3b836436)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { script: undefined, name: undefined, order: undefined, enabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -611,23 +496,14 @@ describe("Rules", () => { .build(); await expect(async () => { - return await client.rules.update("id", { - script: undefined, - name: undefined, - order: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.rules.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (47722876)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { script: undefined, name: undefined, order: undefined, enabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -639,23 +515,14 @@ describe("Rules", () => { .build(); await expect(async () => { - return await client.rules.update("id", { - script: undefined, - name: undefined, - order: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.rules.update("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("update (60d540a)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { script: undefined, name: undefined, order: undefined, enabled: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -667,16 +534,7 @@ describe("Rules", () => { .build(); await expect(async () => { - return await client.rules.update("id", { - script: undefined, - name: undefined, - order: undefined, - enabled: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.rules.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/rulesConfigs.test.ts b/src/management/tests/wire/rulesConfigs.test.ts index 3c53eb1f7d..7e3354bb47 100644 --- a/src/management/tests/wire/rulesConfigs.test.ts +++ b/src/management/tests/wire/rulesConfigs.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("RulesConfigs", () => { - test("list (5b55c5d4)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -22,7 +20,7 @@ describe("RulesConfigs", () => { ]); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -31,14 +29,10 @@ describe("RulesConfigs", () => { await expect(async () => { return await client.rulesConfigs.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -47,14 +41,10 @@ describe("RulesConfigs", () => { await expect(async () => { return await client.rulesConfigs.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +53,10 @@ describe("RulesConfigs", () => { await expect(async () => { return await client.rulesConfigs.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (7f189c41)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { value: "value" }; @@ -93,7 +79,7 @@ describe("RulesConfigs", () => { }); }); - test("set (a8a98e16)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { value: "MY_RULES_CONFIG_VALUE" }; @@ -111,14 +97,10 @@ describe("RulesConfigs", () => { return await client.rulesConfigs.set("key", { value: "MY_RULES_CONFIG_VALUE", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (d3e6269a)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { value: "MY_RULES_CONFIG_VALUE" }; @@ -136,14 +118,10 @@ describe("RulesConfigs", () => { return await client.rulesConfigs.set("key", { value: "MY_RULES_CONFIG_VALUE", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (40a589b6)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { value: "MY_RULES_CONFIG_VALUE" }; @@ -161,14 +139,10 @@ describe("RulesConfigs", () => { return await client.rulesConfigs.set("key", { value: "MY_RULES_CONFIG_VALUE", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (691434e5)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -178,7 +152,7 @@ describe("RulesConfigs", () => { expect(response).toEqual(undefined); }); - test("delete (9d49a705)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -193,14 +167,10 @@ describe("RulesConfigs", () => { await expect(async () => { return await client.rulesConfigs.delete("key"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (252058d1)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -215,14 +185,10 @@ describe("RulesConfigs", () => { await expect(async () => { return await client.rulesConfigs.delete("key"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (c68086a9)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -237,10 +203,6 @@ describe("RulesConfigs", () => { await expect(async () => { return await client.rulesConfigs.delete("key"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/selfServiceProfiles.test.ts b/src/management/tests/wire/selfServiceProfiles.test.ts index 51ef311e37..5f812dd026 100644 --- a/src/management/tests/wire/selfServiceProfiles.test.ts +++ b/src/management/tests/wire/selfServiceProfiles.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("SelfServiceProfiles", () => { - test("list (40441ea2)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -24,6 +22,7 @@ describe("SelfServiceProfiles", () => { created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }, ], }; @@ -54,18 +53,23 @@ describe("SelfServiceProfiles", () => { created_at: "2024-01-15T09:30:00Z", updated_at: "2024-01-15T09:30:00Z", allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }, ], }; - const page = await client.selfServiceProfiles.list(); - expect(expected.self_service_profiles).toEqual(page.data); + const page = await client.selfServiceProfiles.list({ + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.self_service_profiles).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.self_service_profiles).toEqual(nextPage.data); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +84,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -102,14 +102,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -124,14 +120,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("list (b3843b57)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -146,14 +138,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.list(); - }).rejects.toThrow( - new Management.InternalServerError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.InternalServerError); }); - test("create (49943880)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; @@ -166,6 +154,7 @@ describe("SelfServiceProfiles", () => { updated_at: "2024-01-15T09:30:00Z", branding: { logo_url: "logo_url", colors: { primary: "primary" } }, allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }; server .mockEndpoint() @@ -199,19 +188,14 @@ describe("SelfServiceProfiles", () => { }, }, allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }); }); - test("create (c38151ae)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -225,28 +209,14 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.create({ name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (e3bb4d36)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -260,28 +230,14 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.create({ name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (1b132d3a)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -295,28 +251,14 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.create({ name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (3cd929d2)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -330,28 +272,14 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.create({ name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (f005c6d6)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -365,28 +293,14 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.create({ name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (aac7387a)", async () => { + test("create (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = { name: "x" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -400,19 +314,11 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.create({ name: "x", - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, }); - }).rejects.toThrow( - new Management.InternalServerError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.InternalServerError); }); - test("get (b4c6f943)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -425,6 +331,7 @@ describe("SelfServiceProfiles", () => { updated_at: "2024-01-15T09:30:00Z", branding: { logo_url: "logo_url", colors: { primary: "primary" } }, allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }; server .mockEndpoint() @@ -455,10 +362,11 @@ describe("SelfServiceProfiles", () => { }, }, allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -473,14 +381,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -495,14 +399,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -517,14 +417,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -539,14 +435,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -561,14 +453,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (ac63661d)", async () => { + test("get (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -583,14 +471,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.get("id"); - }).rejects.toThrow( - new Management.InternalServerError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.InternalServerError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -600,7 +484,7 @@ describe("SelfServiceProfiles", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -615,14 +499,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -637,14 +517,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -659,14 +535,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -681,14 +553,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (ac63661d)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -703,14 +571,10 @@ describe("SelfServiceProfiles", () => { await expect(async () => { return await client.selfServiceProfiles.delete("id"); - }).rejects.toThrow( - new Management.InternalServerError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.InternalServerError); }); - test("update (c9a49abe)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -723,6 +587,7 @@ describe("SelfServiceProfiles", () => { updated_at: "2024-01-15T09:30:00Z", branding: { logo_url: "logo_url", colors: { primary: "primary" } }, allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }; server .mockEndpoint() @@ -754,19 +619,14 @@ describe("SelfServiceProfiles", () => { }, }, allowed_strategies: ["oidc"], + user_attribute_profile_id: "user_attribute_profile_id", }); }); - test("update (85d34a3e)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -778,30 +638,14 @@ describe("SelfServiceProfiles", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.update("id", { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (1f8b8f46)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -813,30 +657,14 @@ describe("SelfServiceProfiles", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.update("id", { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (80f6970a)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -848,30 +676,14 @@ describe("SelfServiceProfiles", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.update("id", { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (d82a5342)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -883,30 +695,14 @@ describe("SelfServiceProfiles", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.update("id", { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (340839a6)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -918,30 +714,14 @@ describe("SelfServiceProfiles", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.update("id", { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (7067734a)", async () => { + test("update (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -953,17 +733,7 @@ describe("SelfServiceProfiles", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.update("id", { - name: undefined, - description: undefined, - branding: undefined, - allowed_strategies: undefined, - user_attributes: undefined, - }); - }).rejects.toThrow( - new Management.InternalServerError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.update("id"); + }).rejects.toThrow(Management.InternalServerError); }); }); diff --git a/src/management/tests/wire/selfServiceProfiles/customText.test.ts b/src/management/tests/wire/selfServiceProfiles/customText.test.ts index 097c2c4bba..d02d07587f 100644 --- a/src/management/tests/wire/selfServiceProfiles/customText.test.ts +++ b/src/management/tests/wire/selfServiceProfiles/customText.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("CustomText", () => { - test("list (97e7b9b0)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("CustomText", () => { }); }); - test("list (36f536d9)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("CustomText", () => { await expect(async () => { return await client.selfServiceProfiles.customText.list("id", "en", "get-started"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2a2f3075)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("CustomText", () => { await expect(async () => { return await client.selfServiceProfiles.customText.list("id", "en", "get-started"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (a42220c5)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("CustomText", () => { await expect(async () => { return await client.selfServiceProfiles.customText.list("id", "en", "get-started"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (1e5b3afd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("CustomText", () => { await expect(async () => { return await client.selfServiceProfiles.customText.list("id", "en", "get-started"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (5f17d7af)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { key: "value" }; @@ -136,7 +118,7 @@ describe("CustomText", () => { }); }); - test("set (704ac143)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -154,14 +136,10 @@ describe("CustomText", () => { return await client.selfServiceProfiles.customText.set("id", "en", "get-started", { string: "string", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (94e9766f)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -179,14 +157,10 @@ describe("CustomText", () => { return await client.selfServiceProfiles.customText.set("id", "en", "get-started", { string: "string", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (d060e91f)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -204,14 +178,10 @@ describe("CustomText", () => { return await client.selfServiceProfiles.customText.set("id", "en", "get-started", { string: "string", }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("set (cf2eda37)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { string: "string" }; @@ -229,10 +199,6 @@ describe("CustomText", () => { return await client.selfServiceProfiles.customText.set("id", "en", "get-started", { string: "string", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/selfServiceProfiles/ssoTicket.test.ts b/src/management/tests/wire/selfServiceProfiles/ssoTicket.test.ts index c350031e79..8be7531488 100644 --- a/src/management/tests/wire/selfServiceProfiles/ssoTicket.test.ts +++ b/src/management/tests/wire/selfServiceProfiles/ssoTicket.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("SsoTicket", () => { - test("create (e8e0410f)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -27,18 +25,10 @@ describe("SsoTicket", () => { }); }); - test("create (beaeebc4)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -50,34 +40,14 @@ describe("SsoTicket", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.ssoTicket.create("id", { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.ssoTicket.create("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (f783ccec)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -89,34 +59,14 @@ describe("SsoTicket", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.ssoTicket.create("id", { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.ssoTicket.create("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (7607ae70)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -128,34 +78,14 @@ describe("SsoTicket", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.ssoTicket.create("id", { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.ssoTicket.create("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (484e01fc)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -167,23 +97,11 @@ describe("SsoTicket", () => { .build(); await expect(async () => { - return await client.selfServiceProfiles.ssoTicket.create("id", { - connection_id: undefined, - connection_config: undefined, - enabled_clients: undefined, - enabled_organizations: undefined, - ttl_sec: undefined, - domain_aliases_config: undefined, - provisioning_config: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.selfServiceProfiles.ssoTicket.create("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("revoke (489f5f99)", async () => { + test("revoke (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -198,7 +116,7 @@ describe("SsoTicket", () => { expect(response).toEqual(undefined); }); - test("revoke (7b7425a0)", async () => { + test("revoke (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -213,14 +131,10 @@ describe("SsoTicket", () => { await expect(async () => { return await client.selfServiceProfiles.ssoTicket.revoke("profileId", "id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("revoke (326e0144)", async () => { + test("revoke (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -235,14 +149,10 @@ describe("SsoTicket", () => { await expect(async () => { return await client.selfServiceProfiles.ssoTicket.revoke("profileId", "id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("revoke (e228e50)", async () => { + test("revoke (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -257,10 +167,6 @@ describe("SsoTicket", () => { await expect(async () => { return await client.selfServiceProfiles.ssoTicket.revoke("profileId", "id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/sessions.test.ts b/src/management/tests/wire/sessions.test.ts index e4c3ea4b1a..5b96509b50 100644 --- a/src/management/tests/wire/sessions.test.ts +++ b/src/management/tests/wire/sessions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Sessions", () => { - test("get (6555b945)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -31,6 +29,7 @@ describe("Sessions", () => { clients: [{ client_id: "client_id" }], authentication: { methods: [{}] }, cookie: { mode: "non-persistent" }, + session_metadata: { key: "value" }, }; server.mockEndpoint().get("/sessions/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -63,10 +62,13 @@ describe("Sessions", () => { cookie: { mode: "non-persistent", }, + session_metadata: { + key: "value", + }, }); }); - test("get (49d52691)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -75,14 +77,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -91,14 +89,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +101,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -123,14 +113,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -140,7 +126,7 @@ describe("Sessions", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -149,14 +135,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -165,14 +147,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -181,14 +159,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -197,14 +171,175 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("update (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + id: "id", + user_id: "user_id", + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + authenticated_at: "2024-01-15T09:30:00Z", + idle_expires_at: "2024-01-15T09:30:00Z", + expires_at: "2024-01-15T09:30:00Z", + last_interacted_at: "2024-01-15T09:30:00Z", + device: { + initial_user_agent: "initial_user_agent", + initial_ip: "initial_ip", + initial_asn: "initial_asn", + last_user_agent: "last_user_agent", + last_ip: "last_ip", + last_asn: "last_asn", + }, + clients: [{ client_id: "client_id" }], + authentication: { methods: [{}] }, + cookie: { mode: "non-persistent" }, + session_metadata: { key: "value" }, + }; + server + .mockEndpoint() + .patch("/sessions/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.sessions.update("id"); + expect(response).toEqual({ + id: "id", + user_id: "user_id", + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + authenticated_at: "2024-01-15T09:30:00Z", + idle_expires_at: "2024-01-15T09:30:00Z", + expires_at: "2024-01-15T09:30:00Z", + last_interacted_at: "2024-01-15T09:30:00Z", + device: { + initial_user_agent: "initial_user_agent", + initial_ip: "initial_ip", + initial_asn: "initial_asn", + last_user_agent: "last_user_agent", + last_ip: "last_ip", + last_asn: "last_asn", + }, + clients: [ + { + client_id: "client_id", + }, + ], + authentication: { + methods: [{}], + }, + cookie: { + mode: "non-persistent", + }, + session_metadata: { key: "value", - }), - ); + }, + }); }); - test("revoke (c7f0a6bf)", async () => { + test("update (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sessions/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sessions.update("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("update (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sessions/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sessions.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("update (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sessions/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sessions.update("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("update (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sessions/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sessions.update("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("update (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/sessions/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.sessions.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("revoke (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -214,7 +349,7 @@ describe("Sessions", () => { expect(response).toEqual(undefined); }); - test("revoke (fcf9dbd1)", async () => { + test("revoke (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -229,14 +364,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.revoke("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("revoke (49d52691)", async () => { + test("revoke (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -251,14 +382,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.revoke("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("revoke (2428808d)", async () => { + test("revoke (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -273,14 +400,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.revoke("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("revoke (e55ce3fd)", async () => { + test("revoke (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -295,14 +418,10 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.revoke("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("revoke (27b44cb5)", async () => { + test("revoke (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -317,10 +436,6 @@ describe("Sessions", () => { await expect(async () => { return await client.sessions.revoke("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/stats.test.ts b/src/management/tests/wire/stats.test.ts index d0f473f6bc..bb2d20788a 100644 --- a/src/management/tests/wire/stats.test.ts +++ b/src/management/tests/wire/stats.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Stats", () => { - test("getActiveUsersCount (b5165cec)", async () => { + test("getActiveUsersCount (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -24,7 +22,7 @@ describe("Stats", () => { expect(response).toEqual(1.1); }); - test("getActiveUsersCount (1e230aeb)", async () => { + test("getActiveUsersCount (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -39,14 +37,10 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getActiveUsersCount(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getActiveUsersCount (af841397)", async () => { + test("getActiveUsersCount (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -61,14 +55,10 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getActiveUsersCount(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getActiveUsersCount (ee1e23bf)", async () => { + test("getActiveUsersCount (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -83,14 +73,10 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getActiveUsersCount(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("getDaily (66ffcc23)", async () => { + test("getDaily (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -106,7 +92,10 @@ describe("Stats", () => { ]; server.mockEndpoint().get("/stats/daily").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.stats.getDaily(); + const response = await client.stats.getDaily({ + from: "from", + to: "to", + }); expect(response).toEqual([ { date: "date", @@ -119,7 +108,7 @@ describe("Stats", () => { ]); }); - test("getDaily (c60dd33b)", async () => { + test("getDaily (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -128,14 +117,10 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getDaily(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("getDaily (1e230aeb)", async () => { + test("getDaily (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -144,14 +129,10 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getDaily(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("getDaily (af841397)", async () => { + test("getDaily (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -160,14 +141,10 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getDaily(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("getDaily (ee1e23bf)", async () => { + test("getDaily (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -176,10 +153,6 @@ describe("Stats", () => { await expect(async () => { return await client.stats.getDaily(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/supplementalSignals.test.ts b/src/management/tests/wire/supplementalSignals.test.ts index 79e9530de4..6339f05e56 100644 --- a/src/management/tests/wire/supplementalSignals.test.ts +++ b/src/management/tests/wire/supplementalSignals.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("SupplementalSignals", () => { - test("get (92136e5c)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -26,7 +24,7 @@ describe("SupplementalSignals", () => { }); }); - test("get (1e230aeb)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -41,14 +39,10 @@ describe("SupplementalSignals", () => { await expect(async () => { return await client.supplementalSignals.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +57,10 @@ describe("SupplementalSignals", () => { await expect(async () => { return await client.supplementalSignals.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (c29c5807)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +75,10 @@ describe("SupplementalSignals", () => { await expect(async () => { return await client.supplementalSignals.get(); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (ee1e23bf)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +93,10 @@ describe("SupplementalSignals", () => { await expect(async () => { return await client.supplementalSignals.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("patch (43e5c24b)", async () => { + test("patch (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { akamai_enabled: true }; @@ -136,7 +118,7 @@ describe("SupplementalSignals", () => { }); }); - test("patch (b8842b47)", async () => { + test("patch (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { akamai_enabled: true }; @@ -154,14 +136,10 @@ describe("SupplementalSignals", () => { return await client.supplementalSignals.patch({ akamai_enabled: true, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("patch (abfb3753)", async () => { + test("patch (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { akamai_enabled: true }; @@ -179,14 +157,10 @@ describe("SupplementalSignals", () => { return await client.supplementalSignals.patch({ akamai_enabled: true, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("patch (a382dab3)", async () => { + test("patch (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { akamai_enabled: true }; @@ -204,14 +178,10 @@ describe("SupplementalSignals", () => { return await client.supplementalSignals.patch({ akamai_enabled: true, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("patch (596794b)", async () => { + test("patch (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { akamai_enabled: true }; @@ -229,10 +199,6 @@ describe("SupplementalSignals", () => { return await client.supplementalSignals.patch({ akamai_enabled: true, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/tenants/settings.test.ts b/src/management/tests/wire/tenants/settings.test.ts index e8215f09da..efde20a842 100644 --- a/src/management/tests/wire/tenants/settings.test.ts +++ b/src/management/tests/wire/tenants/settings.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Settings", () => { - test("get (e4f93e66)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -73,10 +71,14 @@ describe("Settings", () => { mtls: { enable_endpoint_aliases: true }, pushed_authorization_requests_supported: true, authorization_response_iss_parameter_supported: true, + skip_non_verifiable_callback_uri_confirmation_prompt: true, }; server.mockEndpoint().get("/tenants/settings").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.tenants.settings.get(); + const response = await client.tenants.settings.get({ + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ change_password: { enabled: true, @@ -167,10 +169,11 @@ describe("Settings", () => { }, pushed_authorization_requests_supported: true, authorization_response_iss_parameter_supported: true, + skip_non_verifiable_callback_uri_confirmation_prompt: true, }); }); - test("get (c60dd33b)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -179,14 +182,10 @@ describe("Settings", () => { await expect(async () => { return await client.tenants.settings.get(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (1e230aeb)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -195,14 +194,10 @@ describe("Settings", () => { await expect(async () => { return await client.tenants.settings.get(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (af841397)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -211,14 +206,10 @@ describe("Settings", () => { await expect(async () => { return await client.tenants.settings.get(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (ee1e23bf)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -227,14 +218,10 @@ describe("Settings", () => { await expect(async () => { return await client.tenants.settings.get(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (8969b2c1)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -300,6 +287,7 @@ describe("Settings", () => { mtls: { enable_endpoint_aliases: true }, pushed_authorization_requests_supported: true, authorization_response_iss_parameter_supported: true, + skip_non_verifiable_callback_uri_confirmation_prompt: true, }; server .mockEndpoint() @@ -401,44 +389,14 @@ describe("Settings", () => { }, pushed_authorization_requests_supported: true, authorization_response_iss_parameter_supported: true, + skip_non_verifiable_callback_uri_confirmation_prompt: true, }); }); - test("update (c3027d90)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -450,80 +408,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.tenants.settings.update({ - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.tenants.settings.update(); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (967318b8)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -535,80 +427,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.tenants.settings.update({ - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.tenants.settings.update(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (ad473ebc)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -620,80 +446,14 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.tenants.settings.update({ - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.tenants.settings.update(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (5524f088)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -705,42 +465,7 @@ describe("Settings", () => { .build(); await expect(async () => { - return await client.tenants.settings.update({ - change_password: undefined, - device_flow: undefined, - guardian_mfa_page: undefined, - default_audience: undefined, - default_directory: undefined, - error_page: undefined, - default_token_quota: undefined, - flags: undefined, - friendly_name: undefined, - picture_url: undefined, - support_email: undefined, - support_url: undefined, - allowed_logout_urls: undefined, - session_lifetime: undefined, - idle_session_lifetime: undefined, - ephemeral_session_lifetime: undefined, - idle_ephemeral_session_lifetime: undefined, - sandbox_version: undefined, - legacy_sandbox_version: undefined, - default_redirection_uri: undefined, - enabled_locales: undefined, - session_cookie: undefined, - sessions: undefined, - oidc_logout: undefined, - customize_mfa_in_postlogin_action: undefined, - allow_organization_name_in_authentication_api: undefined, - acr_values_supported: undefined, - mtls: undefined, - pushed_authorization_requests_supported: undefined, - authorization_response_iss_parameter_supported: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.tenants.settings.update(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/tickets.test.ts b/src/management/tests/wire/tickets.test.ts index 8eb1c6f7f3..665d789d52 100644 --- a/src/management/tests/wire/tickets.test.ts +++ b/src/management/tests/wire/tickets.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Tickets", () => { - test("verifyEmail (8eec3f8f)", async () => { + test("verifyEmail (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { user_id: "user_id" }; @@ -29,18 +27,10 @@ describe("Tickets", () => { }); }); - test("verifyEmail (e828e90d)", async () => { + test("verifyEmail (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -53,33 +43,15 @@ describe("Tickets", () => { await expect(async () => { return await client.tickets.verifyEmail({ - result_url: undefined, user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("verifyEmail (425913fd)", async () => { + test("verifyEmail (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -92,33 +64,15 @@ describe("Tickets", () => { await expect(async () => { return await client.tickets.verifyEmail({ - result_url: undefined, user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("verifyEmail (93e079c9)", async () => { + test("verifyEmail (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -131,33 +85,15 @@ describe("Tickets", () => { await expect(async () => { return await client.tickets.verifyEmail({ - result_url: undefined, user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("verifyEmail (d4b76229)", async () => { + test("verifyEmail (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -170,33 +106,15 @@ describe("Tickets", () => { await expect(async () => { return await client.tickets.verifyEmail({ - result_url: undefined, user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("verifyEmail (7d127c61)", async () => { + test("verifyEmail (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, - }; + const rawRequestBody = { user_id: "user_id" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -209,22 +127,12 @@ describe("Tickets", () => { await expect(async () => { return await client.tickets.verifyEmail({ - result_url: undefined, user_id: "user_id", - client_id: undefined, - organization_id: undefined, - ttl_sec: undefined, - includeEmailInRedirect: undefined, - identity: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("changePassword (9982f3f9)", async () => { + test("changePassword (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -244,20 +152,10 @@ describe("Tickets", () => { }); }); - test("changePassword (b1708264)", async () => { + test("changePassword (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -269,38 +167,14 @@ describe("Tickets", () => { .build(); await expect(async () => { - return await client.tickets.changePassword({ - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.tickets.changePassword(); + }).rejects.toThrow(Management.BadRequestError); }); - test("changePassword (c8264b8c)", async () => { + test("changePassword (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -312,38 +186,14 @@ describe("Tickets", () => { .build(); await expect(async () => { - return await client.tickets.changePassword({ - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.tickets.changePassword(); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("changePassword (307e8490)", async () => { + test("changePassword (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -355,38 +205,14 @@ describe("Tickets", () => { .build(); await expect(async () => { - return await client.tickets.changePassword({ - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.tickets.changePassword(); + }).rejects.toThrow(Management.ForbiddenError); }); - test("changePassword (66e68fc8)", async () => { + test("changePassword (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -398,38 +224,14 @@ describe("Tickets", () => { .build(); await expect(async () => { - return await client.tickets.changePassword({ - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.tickets.changePassword(); + }).rejects.toThrow(Management.NotFoundError); }); - test("changePassword (aae02b9c)", async () => { + test("changePassword (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -441,21 +243,7 @@ describe("Tickets", () => { .build(); await expect(async () => { - return await client.tickets.changePassword({ - result_url: undefined, - user_id: undefined, - client_id: undefined, - organization_id: undefined, - connection_id: undefined, - email: undefined, - ttl_sec: undefined, - mark_email_as_verified: undefined, - includeEmailInRedirect: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.tickets.changePassword(); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/tokenExchangeProfiles.test.ts b/src/management/tests/wire/tokenExchangeProfiles.test.ts index 3746b70c60..014ff2eb4c 100644 --- a/src/management/tests/wire/tokenExchangeProfiles.test.ts +++ b/src/management/tests/wire/tokenExchangeProfiles.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("TokenExchangeProfiles", () => { - test("list (561e5c5)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -47,15 +45,18 @@ describe("TokenExchangeProfiles", () => { }, ], }; - const page = await client.tokenExchangeProfiles.list(); - expect(expected.token_exchange_profiles).toEqual(page.data); + const page = await client.tokenExchangeProfiles.list({ + from: "from", + take: 1, + }); + expect(expected.token_exchange_profiles).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.token_exchange_profiles).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -70,14 +71,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -92,14 +89,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -114,14 +107,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -136,14 +125,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (25d7f9ac)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -186,7 +171,7 @@ describe("TokenExchangeProfiles", () => { }); }); - test("create (7231a783)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -211,14 +196,10 @@ describe("TokenExchangeProfiles", () => { subject_token_type: "mandarin", action_id: "x", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (c5948f93)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -243,14 +224,10 @@ describe("TokenExchangeProfiles", () => { subject_token_type: "mandarin", action_id: "x", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (10758cff)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -275,14 +252,10 @@ describe("TokenExchangeProfiles", () => { subject_token_type: "mandarin", action_id: "x", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (ba2f1057)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -307,14 +280,10 @@ describe("TokenExchangeProfiles", () => { subject_token_type: "mandarin", action_id: "x", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (8bf9e3c7)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -339,14 +308,10 @@ describe("TokenExchangeProfiles", () => { subject_token_type: "mandarin", action_id: "x", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (9cbce963)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -379,7 +344,7 @@ describe("TokenExchangeProfiles", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -394,14 +359,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -416,14 +377,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -438,14 +395,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -460,14 +413,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -482,14 +431,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -499,7 +444,7 @@ describe("TokenExchangeProfiles", () => { expect(response).toEqual(undefined); }); - test("delete (49d52691)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -514,14 +459,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -536,14 +477,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -558,14 +495,10 @@ describe("TokenExchangeProfiles", () => { await expect(async () => { return await client.tokenExchangeProfiles.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (6c0883f0)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -582,10 +515,10 @@ describe("TokenExchangeProfiles", () => { expect(response).toEqual(undefined); }); - test("update (9f8e975a)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subject_token_type: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -597,21 +530,14 @@ describe("TokenExchangeProfiles", () => { .build(); await expect(async () => { - return await client.tokenExchangeProfiles.update("id", { - name: undefined, - subject_token_type: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.tokenExchangeProfiles.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (d4ddabf2)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subject_token_type: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -623,21 +549,14 @@ describe("TokenExchangeProfiles", () => { .build(); await expect(async () => { - return await client.tokenExchangeProfiles.update("id", { - name: undefined, - subject_token_type: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.tokenExchangeProfiles.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (c12d8c16)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subject_token_type: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -649,21 +568,14 @@ describe("TokenExchangeProfiles", () => { .build(); await expect(async () => { - return await client.tokenExchangeProfiles.update("id", { - name: undefined, - subject_token_type: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.tokenExchangeProfiles.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (e8dff74e)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subject_token_type: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -675,21 +587,14 @@ describe("TokenExchangeProfiles", () => { .build(); await expect(async () => { - return await client.tokenExchangeProfiles.update("id", { - name: undefined, - subject_token_type: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.tokenExchangeProfiles.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (6ebf60e2)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, subject_token_type: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -701,14 +606,7 @@ describe("TokenExchangeProfiles", () => { .build(); await expect(async () => { - return await client.tokenExchangeProfiles.update("id", { - name: undefined, - subject_token_type: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.tokenExchangeProfiles.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/userAttributeProfiles.test.ts b/src/management/tests/wire/userAttributeProfiles.test.ts new file mode 100644 index 0000000000..79360a42b9 --- /dev/null +++ b/src/management/tests/wire/userAttributeProfiles.test.ts @@ -0,0 +1,900 @@ +// This file was auto-generated by Fern from our API Definition. + +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; + +describe("UserAttributeProfiles", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "next", + user_attribute_profiles: [ + { + id: "id", + name: "name", + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + }, + }, + }, + ], + }; + server + .mockEndpoint() + .get("/user-attribute-profiles") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const expected = { + next: "next", + user_attribute_profiles: [ + { + id: "id", + name: "name", + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + }, + }, + }, + ], + }; + const page = await client.userAttributeProfiles.list({ + from: "from", + take: 1, + }); + + expect(expected.user_attribute_profiles).toEqual(page.data); + expect(page.hasNextPage()).toBe(true); + const nextPage = await page.getNextPage(); + expect(expected.user_attribute_profiles).toEqual(nextPage.data); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.list(); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.list(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.list(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.list(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("create (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + name: "name", + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + }, + }, + }; + const rawResponseBody = { + id: "id", + name: "name", + user_id: { oidc_mapping: "sub", saml_mapping: ["saml_mapping"], scim_mapping: "scim_mapping" }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + oidc_mapping: { mapping: "mapping" }, + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + }, + }; + server + .mockEndpoint() + .post("/user-attribute-profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.userAttributeProfiles.create({ + name: "name", + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + }, + }, + }); + expect(response).toEqual({ + id: "id", + name: "name", + user_id: { + oidc_mapping: "sub", + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + oidc_mapping: { + mapping: "mapping", + }, + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + }, + }); + }); + + test("create (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + name: "x", + user_attributes: { + user_attributes: { description: "x", label: "x", profile_required: true, auth0_mapping: "x" }, + }, + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/user-attribute-profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.create({ + name: "x", + user_attributes: { + user_attributes: { + description: "x", + label: "x", + profile_required: true, + auth0_mapping: "x", + }, + }, + }); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("create (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + name: "x", + user_attributes: { + user_attributes: { description: "x", label: "x", profile_required: true, auth0_mapping: "x" }, + }, + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/user-attribute-profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.create({ + name: "x", + user_attributes: { + user_attributes: { + description: "x", + label: "x", + profile_required: true, + auth0_mapping: "x", + }, + }, + }); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("create (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + name: "x", + user_attributes: { + user_attributes: { description: "x", label: "x", profile_required: true, auth0_mapping: "x" }, + }, + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/user-attribute-profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.create({ + name: "x", + user_attributes: { + user_attributes: { + description: "x", + label: "x", + profile_required: true, + auth0_mapping: "x", + }, + }, + }); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("create (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + name: "x", + user_attributes: { + user_attributes: { description: "x", label: "x", profile_required: true, auth0_mapping: "x" }, + }, + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/user-attribute-profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.create({ + name: "x", + user_attributes: { + user_attributes: { + description: "x", + label: "x", + profile_required: true, + auth0_mapping: "x", + }, + }, + }); + }).rejects.toThrow(Management.ConflictError); + }); + + test("create (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = { + name: "x", + user_attributes: { + user_attributes: { description: "x", label: "x", profile_required: true, auth0_mapping: "x" }, + }, + }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/user-attribute-profiles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.create({ + name: "x", + user_attributes: { + user_attributes: { + description: "x", + label: "x", + profile_required: true, + auth0_mapping: "x", + }, + }, + }); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("listTemplates (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { user_attribute_profile_templates: [{ id: "id", display_name: "display_name" }] }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.userAttributeProfiles.listTemplates(); + expect(response).toEqual({ + user_attribute_profile_templates: [ + { + id: "id", + display_name: "display_name", + }, + ], + }); + }); + + test("listTemplates (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.listTemplates(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("listTemplates (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.listTemplates(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("listTemplates (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.listTemplates(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("getTemplate (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + display_name: "display_name", + template: { + name: "name", + user_id: { oidc_mapping: "sub", saml_mapping: ["saml_mapping"], scim_mapping: "scim_mapping" }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + }, + }, + }, + }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.userAttributeProfiles.getTemplate("id"); + expect(response).toEqual({ + id: "id", + display_name: "display_name", + template: { + name: "name", + user_id: { + oidc_mapping: "sub", + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + }, + }, + }, + }); + }); + + test("getTemplate (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates/id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.getTemplate("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("getTemplate (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates/id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.getTemplate("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("getTemplate (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates/id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.getTemplate("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("getTemplate (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/templates/id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.getTemplate("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + name: "name", + user_id: { oidc_mapping: "sub", saml_mapping: ["saml_mapping"], scim_mapping: "scim_mapping" }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + oidc_mapping: { mapping: "mapping" }, + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + }, + }; + server + .mockEndpoint() + .get("/user-attribute-profiles/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.userAttributeProfiles.get("id"); + expect(response).toEqual({ + id: "id", + name: "name", + user_id: { + oidc_mapping: "sub", + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + oidc_mapping: { + mapping: "mapping", + }, + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + }, + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.get("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.get("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.get("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/user-attribute-profiles/id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.get("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("delete (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + server.mockEndpoint().delete("/user-attribute-profiles/id").respondWith().statusCode(200).build(); + + const response = await client.userAttributeProfiles.delete("id"); + expect(response).toEqual(undefined); + }); + + test("delete (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/user-attribute-profiles/id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.delete("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("delete (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/user-attribute-profiles/id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.delete("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("delete (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/user-attribute-profiles/id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.delete("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("update (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + id: "id", + name: "name", + user_id: { oidc_mapping: "sub", saml_mapping: ["saml_mapping"], scim_mapping: "scim_mapping" }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + oidc_mapping: { mapping: "mapping" }, + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + }, + }; + server + .mockEndpoint() + .patch("/user-attribute-profiles/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.userAttributeProfiles.update("id"); + expect(response).toEqual({ + id: "id", + name: "name", + user_id: { + oidc_mapping: "sub", + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + user_attributes: { + key: { + description: "description", + label: "label", + profile_required: true, + auth0_mapping: "auth0_mapping", + oidc_mapping: { + mapping: "mapping", + }, + saml_mapping: ["saml_mapping"], + scim_mapping: "scim_mapping", + }, + }, + }); + }); + + test("update (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/user-attribute-profiles/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.update("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("update (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/user-attribute-profiles/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("update (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/user-attribute-profiles/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.update("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("update (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/user-attribute-profiles/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.userAttributeProfiles.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); +}); diff --git a/src/management/tests/wire/userBlocks.test.ts b/src/management/tests/wire/userBlocks.test.ts index b97d3f80f2..1ea9da4fff 100644 --- a/src/management/tests/wire/userBlocks.test.ts +++ b/src/management/tests/wire/userBlocks.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("UserBlocks", () => { - test("listByIdentifier (137a3a1)", async () => { + test("listByIdentifier (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -16,6 +14,7 @@ describe("UserBlocks", () => { const response = await client.userBlocks.listByIdentifier({ identifier: "identifier", + consider_brute_force_enablement: true, }); expect(response).toEqual({ blocked_for: [ @@ -28,7 +27,7 @@ describe("UserBlocks", () => { }); }); - test("listByIdentifier (8ff0f92b)", async () => { + test("listByIdentifier (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -39,14 +38,10 @@ describe("UserBlocks", () => { return await client.userBlocks.listByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("listByIdentifier (cd5cc79b)", async () => { + test("listByIdentifier (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -57,14 +52,10 @@ describe("UserBlocks", () => { return await client.userBlocks.listByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("listByIdentifier (47c90a07)", async () => { + test("listByIdentifier (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -75,14 +66,10 @@ describe("UserBlocks", () => { return await client.userBlocks.listByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("listByIdentifier (74b96e6f)", async () => { + test("listByIdentifier (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -93,14 +80,10 @@ describe("UserBlocks", () => { return await client.userBlocks.listByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("deleteByIdentifier (fad59358)", async () => { + test("deleteByIdentifier (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,7 +95,7 @@ describe("UserBlocks", () => { expect(response).toEqual(undefined); }); - test("deleteByIdentifier (8ff0f92b)", async () => { + test("deleteByIdentifier (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -123,14 +106,10 @@ describe("UserBlocks", () => { return await client.userBlocks.deleteByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("deleteByIdentifier (cd5cc79b)", async () => { + test("deleteByIdentifier (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -141,14 +120,10 @@ describe("UserBlocks", () => { return await client.userBlocks.deleteByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteByIdentifier (47c90a07)", async () => { + test("deleteByIdentifier (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -159,14 +134,10 @@ describe("UserBlocks", () => { return await client.userBlocks.deleteByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteByIdentifier (74b96e6f)", async () => { + test("deleteByIdentifier (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -177,21 +148,19 @@ describe("UserBlocks", () => { return await client.userBlocks.deleteByIdentifier({ identifier: "identifier", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("list (f83b3582)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawResponseBody = { blocked_for: [{ identifier: "identifier", ip: "ip", connection: "connection" }] }; server.mockEndpoint().get("/user-blocks/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.userBlocks.list("id"); + const response = await client.userBlocks.list("id", { + consider_brute_force_enablement: true, + }); expect(response).toEqual({ blocked_for: [ { @@ -203,7 +172,7 @@ describe("UserBlocks", () => { }); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -212,14 +181,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -228,14 +193,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -244,14 +205,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -260,14 +217,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -276,14 +229,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -293,7 +242,7 @@ describe("UserBlocks", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -302,14 +251,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -318,14 +263,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -334,14 +275,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (e55ce3fd)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -350,14 +287,10 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.delete("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (27b44cb5)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -366,10 +299,6 @@ describe("UserBlocks", () => { await expect(async () => { return await client.userBlocks.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/userGrants.test.ts b/src/management/tests/wire/userGrants.test.ts index beaa53b149..1f36a87909 100644 --- a/src/management/tests/wire/userGrants.test.ts +++ b/src/management/tests/wire/userGrants.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("UserGrants", () => { - test("list (4d23fb60)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -33,15 +31,22 @@ describe("UserGrants", () => { }, ], }; - const page = await client.userGrants.list(); - expect(expected.grants).toEqual(page.data); + const page = await client.userGrants.list({ + per_page: 1, + page: 1, + include_totals: true, + user_id: "user_id", + client_id: "client_id", + audience: "audience", + }); + expect(expected.grants).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.grants).toEqual(nextPage.data); }); - test("list (1e230aeb)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -50,14 +55,10 @@ describe("UserGrants", () => { await expect(async () => { return await client.userGrants.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -66,14 +67,10 @@ describe("UserGrants", () => { await expect(async () => { return await client.userGrants.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -82,14 +79,10 @@ describe("UserGrants", () => { await expect(async () => { return await client.userGrants.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("deleteByUserId (2e32e0de)", async () => { + test("deleteByUserId (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -101,7 +94,7 @@ describe("UserGrants", () => { expect(response).toEqual(undefined); }); - test("deleteByUserId (7b2d7d97)", async () => { + test("deleteByUserId (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +105,10 @@ describe("UserGrants", () => { return await client.userGrants.deleteByUserId({ user_id: "user_id", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteByUserId (4be330e3)", async () => { + test("deleteByUserId (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -130,14 +119,10 @@ describe("UserGrants", () => { return await client.userGrants.deleteByUserId({ user_id: "user_id", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteByUserId (3dccc8db)", async () => { + test("deleteByUserId (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -148,14 +133,10 @@ describe("UserGrants", () => { return await client.userGrants.deleteByUserId({ user_id: "user_id", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -165,7 +146,7 @@ describe("UserGrants", () => { expect(response).toEqual(undefined); }); - test("delete (49d52691)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -174,14 +155,10 @@ describe("UserGrants", () => { await expect(async () => { return await client.userGrants.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -190,14 +167,10 @@ describe("UserGrants", () => { await expect(async () => { return await client.userGrants.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -206,10 +179,6 @@ describe("UserGrants", () => { await expect(async () => { return await client.userGrants.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users.test.ts b/src/management/tests/wire/users.test.ts index b43d17d665..98081e911e 100644 --- a/src/management/tests/wire/users.test.ts +++ b/src/management/tests/wire/users.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../Client.js"; -import * as Management from "../../api/index.js"; +import { mockServerPool } from "../mock-server/MockServerPool"; +import { ManagementClient } from "../../Client"; +import * as Management from "../../api/index"; describe("Users", () => { - test("list (b0e097d6)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -79,15 +77,26 @@ describe("Users", () => { }, ], }; - const page = await client.users.list(); - expect(expected.users).toEqual(page.data); + const page = await client.users.list({ + page: 1, + per_page: 1, + include_totals: true, + sort: "sort", + connection: "connection", + fields: "fields", + include_fields: true, + q: "q", + search_engine: "v1", + primary_order: true, + }); + expect(expected.users).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.users).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -96,14 +105,10 @@ describe("Users", () => { await expect(async () => { return await client.users.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +117,10 @@ describe("Users", () => { await expect(async () => { return await client.users.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -128,14 +129,10 @@ describe("Users", () => { await expect(async () => { return await client.users.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -144,14 +141,10 @@ describe("Users", () => { await expect(async () => { return await client.users.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("list (ea690e77)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -160,14 +153,10 @@ describe("Users", () => { await expect(async () => { return await client.users.list(); - }).rejects.toThrow( - new Management.ServiceUnavailableError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ServiceUnavailableError); }); - test("create (3f57f229)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection: "connection" }; @@ -255,28 +244,10 @@ describe("Users", () => { }); }); - test("create (bbe91a5e)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, - connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, - }; + const rawRequestBody = { connection: "Initial-Connection" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -289,53 +260,15 @@ describe("Users", () => { await expect(async () => { return await client.users.create({ - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (db95a866)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, - connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, - }; + const rawRequestBody = { connection: "Initial-Connection" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -348,53 +281,15 @@ describe("Users", () => { await expect(async () => { return await client.users.create({ - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (6963d22a)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, - connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, - }; + const rawRequestBody = { connection: "Initial-Connection" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -407,53 +302,15 @@ describe("Users", () => { await expect(async () => { return await client.users.create({ - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (a9bd6a42)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, - connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, - }; + const rawRequestBody = { connection: "Initial-Connection" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -466,53 +323,15 @@ describe("Users", () => { await expect(async () => { return await client.users.create({ - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (d8f10e46)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, - connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, - }; + const rawRequestBody = { connection: "Initial-Connection" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -525,32 +344,12 @@ describe("Users", () => { await expect(async () => { return await client.users.create({ - email: undefined, - phone_number: undefined, - user_metadata: undefined, - blocked: undefined, - email_verified: undefined, - phone_verified: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - user_id: undefined, connection: "Initial-Connection", - password: undefined, - verify_email: undefined, - username: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("listUsersByEmail (8748f898)", async () => { + test("listUsersByEmail (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -582,6 +381,8 @@ describe("Users", () => { server.mockEndpoint().get("/users-by-email").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.users.listUsersByEmail({ + fields: "fields", + include_fields: true, email: "email", }); expect(response).toEqual([ @@ -615,7 +416,7 @@ describe("Users", () => { ]); }); - test("listUsersByEmail (e6be3cf3)", async () => { + test("listUsersByEmail (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -626,14 +427,10 @@ describe("Users", () => { return await client.users.listUsersByEmail({ email: "email", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("listUsersByEmail (2c08d543)", async () => { + test("listUsersByEmail (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -644,14 +441,10 @@ describe("Users", () => { return await client.users.listUsersByEmail({ email: "email", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("listUsersByEmail (653daa6f)", async () => { + test("listUsersByEmail (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -662,14 +455,10 @@ describe("Users", () => { return await client.users.listUsersByEmail({ email: "email", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("listUsersByEmail (c8264e37)", async () => { + test("listUsersByEmail (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -680,14 +469,10 @@ describe("Users", () => { return await client.users.listUsersByEmail({ email: "email", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (a23655ca)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -726,7 +511,10 @@ describe("Users", () => { }; server.mockEndpoint().get("/users/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); - const response = await client.users.get("id"); + const response = await client.users.get("id", { + fields: "fields", + include_fields: true, + }); expect(response).toEqual({ user_id: "user_id", email: "email", @@ -766,7 +554,7 @@ describe("Users", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -775,14 +563,10 @@ describe("Users", () => { await expect(async () => { return await client.users.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -791,14 +575,10 @@ describe("Users", () => { await expect(async () => { return await client.users.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -807,14 +587,10 @@ describe("Users", () => { await expect(async () => { return await client.users.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -823,14 +599,10 @@ describe("Users", () => { await expect(async () => { return await client.users.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -839,14 +611,10 @@ describe("Users", () => { await expect(async () => { return await client.users.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -856,7 +624,7 @@ describe("Users", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -865,14 +633,10 @@ describe("Users", () => { await expect(async () => { return await client.users.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -881,14 +645,10 @@ describe("Users", () => { await expect(async () => { return await client.users.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -897,14 +657,10 @@ describe("Users", () => { await expect(async () => { return await client.users.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -913,14 +669,10 @@ describe("Users", () => { await expect(async () => { return await client.users.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (7f1fb89d)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -1006,29 +758,10 @@ describe("Users", () => { }); }); - test("update (3ec2e463)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1040,56 +773,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.update("id", { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.users.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (3033d373)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1101,56 +792,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.update("id", { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.users.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (41bbe75f)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1162,56 +811,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.update("id", { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.users.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (d4cf930f)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1223,56 +830,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.update("id", { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.users.update("id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (db2da1a7)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1284,34 +849,11 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.update("id", { - blocked: undefined, - email_verified: undefined, - email: undefined, - phone_number: undefined, - phone_verified: undefined, - user_metadata: undefined, - app_metadata: undefined, - given_name: undefined, - family_name: undefined, - name: undefined, - nickname: undefined, - picture: undefined, - verify_email: undefined, - verify_phone_number: undefined, - password: undefined, - connection: undefined, - client_id: undefined, - username: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.users.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("regenerateRecoveryCode (3a393578)", async () => { + test("regenerateRecoveryCode (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1330,7 +872,7 @@ describe("Users", () => { }); }); - test("regenerateRecoveryCode (fcf9dbd1)", async () => { + test("regenerateRecoveryCode (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1345,14 +887,10 @@ describe("Users", () => { await expect(async () => { return await client.users.regenerateRecoveryCode("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("regenerateRecoveryCode (49d52691)", async () => { + test("regenerateRecoveryCode (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1367,14 +905,10 @@ describe("Users", () => { await expect(async () => { return await client.users.regenerateRecoveryCode("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("regenerateRecoveryCode (2428808d)", async () => { + test("regenerateRecoveryCode (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1389,14 +923,10 @@ describe("Users", () => { await expect(async () => { return await client.users.regenerateRecoveryCode("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("regenerateRecoveryCode (e55ce3fd)", async () => { + test("regenerateRecoveryCode (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1411,14 +941,10 @@ describe("Users", () => { await expect(async () => { return await client.users.regenerateRecoveryCode("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("revokeAccess (6c0883f0)", async () => { + test("revokeAccess (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -1435,10 +961,10 @@ describe("Users", () => { expect(response).toEqual(undefined); }); - test("revokeAccess (3fb3e5a0)", async () => { + test("revokeAccess (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { session_id: undefined, preserve_refresh_tokens: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1450,21 +976,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.revokeAccess("id", { - session_id: undefined, - preserve_refresh_tokens: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.users.revokeAccess("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("revokeAccess (88c52b88)", async () => { + test("revokeAccess (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { session_id: undefined, preserve_refresh_tokens: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1476,21 +995,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.revokeAccess("id", { - session_id: undefined, - preserve_refresh_tokens: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.users.revokeAccess("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("revokeAccess (2e30ac0c)", async () => { + test("revokeAccess (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { session_id: undefined, preserve_refresh_tokens: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1502,21 +1014,14 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.revokeAccess("id", { - session_id: undefined, - preserve_refresh_tokens: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.users.revokeAccess("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("revokeAccess (ac6e4b58)", async () => { + test("revokeAccess (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { session_id: undefined, preserve_refresh_tokens: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1528,14 +1033,7 @@ describe("Users", () => { .build(); await expect(async () => { - return await client.users.revokeAccess("id", { - session_id: undefined, - preserve_refresh_tokens: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.users.revokeAccess("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/authenticationMethods.test.ts b/src/management/tests/wire/users/authenticationMethods.test.ts index 42ccb9158a..8f05f08ef1 100644 --- a/src/management/tests/wire/users/authenticationMethods.test.ts +++ b/src/management/tests/wire/users/authenticationMethods.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("AuthenticationMethods", () => { - test("list (f6a276c9)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -35,6 +33,8 @@ describe("AuthenticationMethods", () => { credential_backed_up: true, identity_user_id: "identity_user_id", user_agent: "user_agent", + aaguid: "aaguid", + relying_party_identifier: "relying_party_identifier", }, ], }; @@ -70,18 +70,24 @@ describe("AuthenticationMethods", () => { credential_backed_up: true, identity_user_id: "identity_user_id", user_agent: "user_agent", + aaguid: "aaguid", + relying_party_identifier: "relying_party_identifier", }, ], }; - const page = await client.users.authenticationMethods.list("id"); - expect(expected.authenticators).toEqual(page.data); + const page = await client.users.authenticationMethods.list("id", { + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.authenticators).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.authenticators).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -96,14 +102,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -118,14 +120,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -140,14 +138,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -162,14 +156,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -184,14 +174,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (4484867a)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { type: "phone" }; @@ -206,6 +192,7 @@ describe("AuthenticationMethods", () => { preferred_authentication_method: "voice", key_id: "key_id", public_key: "public_key", + aaguid: "aaguid", relying_party_identifier: "relying_party_identifier", created_at: "2024-01-15T09:30:00Z", }; @@ -237,25 +224,16 @@ describe("AuthenticationMethods", () => { preferred_authentication_method: "voice", key_id: "key_id", public_key: "public_key", + aaguid: "aaguid", relying_party_identifier: "relying_party_identifier", created_at: "2024-01-15T09:30:00Z", }); }); - test("create (ae666d0)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, - }; + const rawRequestBody = { type: "phone" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -269,36 +247,14 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.create("id", { type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (8300adf8)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, - }; + const rawRequestBody = { type: "phone" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -312,36 +268,14 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.create("id", { type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (686c28fc)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, - }; + const rawRequestBody = { type: "phone" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -355,36 +289,14 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.create("id", { type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (1dcd23c4)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, - }; + const rawRequestBody = { type: "phone" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -398,36 +310,14 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.create("id", { type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("create (e4e63e54)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, - }; + const rawRequestBody = { type: "phone" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -441,36 +331,14 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.create("id", { type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (6f5ccac8)", async () => { + test("create (7)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, - }; + const rawRequestBody = { type: "phone" }; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -484,23 +352,11 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.create("id", { type: "phone", - name: undefined, - totp_secret: undefined, - phone_number: undefined, - email: undefined, - preferred_authentication_method: undefined, - key_id: undefined, - public_key: undefined, - relying_party_identifier: undefined, }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("set (2ea23b4f)", async () => { + test("set (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = [{ type: "phone" }]; @@ -516,6 +372,7 @@ describe("AuthenticationMethods", () => { preferred_authentication_method: "voice", key_id: "key_id", public_key: "public_key", + aaguid: "aaguid", relying_party_identifier: "relying_party_identifier", created_at: "2024-01-15T09:30:00Z", }, @@ -546,33 +403,17 @@ describe("AuthenticationMethods", () => { preferred_authentication_method: "voice", key_id: "key_id", public_key: "public_key", + aaguid: "aaguid", relying_party_identifier: "relying_party_identifier", created_at: "2024-01-15T09:30:00Z", }, ]); }); - test("set (d6db401b)", async () => { + test("set (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = [ - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - ]; + const rawRequestBody = [{ type: "phone" }, { type: "phone" }]; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -587,49 +428,18 @@ describe("AuthenticationMethods", () => { return await client.users.authenticationMethods.set("id", [ { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, ]); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("set (1086bccb)", async () => { + test("set (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = [ - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - ]; + const rawRequestBody = [{ type: "phone" }, { type: "phone" }]; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -644,49 +454,18 @@ describe("AuthenticationMethods", () => { return await client.users.authenticationMethods.set("id", [ { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, ]); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("set (219a5077)", async () => { + test("set (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = [ - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - ]; + const rawRequestBody = [{ type: "phone" }, { type: "phone" }]; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -701,49 +480,18 @@ describe("AuthenticationMethods", () => { return await client.users.authenticationMethods.set("id", [ { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, ]); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("set (9f555c0f)", async () => { + test("set (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = [ - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - ]; + const rawRequestBody = [{ type: "phone" }, { type: "phone" }]; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -758,49 +506,18 @@ describe("AuthenticationMethods", () => { return await client.users.authenticationMethods.set("id", [ { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, ]); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("set (8c1e401f)", async () => { + test("set (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = [ - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - { - type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, - }, - ]; + const rawRequestBody = [{ type: "phone" }, { type: "phone" }]; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -815,29 +532,15 @@ describe("AuthenticationMethods", () => { return await client.users.authenticationMethods.set("id", [ { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, { type: "phone", - preferred_authentication_method: undefined, - name: undefined, - phone_number: undefined, - email: undefined, - totp_secret: undefined, }, ]); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("deleteAll (c7f0a6bf)", async () => { + test("deleteAll (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -847,7 +550,7 @@ describe("AuthenticationMethods", () => { expect(response).toEqual(undefined); }); - test("deleteAll (fcf9dbd1)", async () => { + test("deleteAll (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -862,14 +565,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.deleteAll("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("deleteAll (49d52691)", async () => { + test("deleteAll (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -884,14 +583,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.deleteAll("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteAll (2428808d)", async () => { + test("deleteAll (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -906,14 +601,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.deleteAll("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteAll (27b44cb5)", async () => { + test("deleteAll (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -928,14 +619,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.deleteAll("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (de81e963)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -958,6 +645,8 @@ describe("AuthenticationMethods", () => { credential_backed_up: true, identity_user_id: "identity_user_id", user_agent: "user_agent", + aaguid: "aaguid", + relying_party_identifier: "relying_party_identifier", }; server .mockEndpoint() @@ -992,10 +681,12 @@ describe("AuthenticationMethods", () => { credential_backed_up: true, identity_user_id: "identity_user_id", user_agent: "user_agent", + aaguid: "aaguid", + relying_party_identifier: "relying_party_identifier", }); }); - test("get (7f9e01a0)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1010,14 +701,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.get("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (996e4788)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1032,14 +719,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.get("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (5df7280c)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1054,14 +737,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.get("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (79163d54)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1076,14 +755,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.get("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (abbc8758)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1098,14 +773,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.get("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (ec2f2501)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1120,7 +791,7 @@ describe("AuthenticationMethods", () => { expect(response).toEqual(undefined); }); - test("delete (7f9e01a0)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1135,14 +806,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.delete("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (996e4788)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1157,14 +824,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.delete("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (5df7280c)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1179,14 +842,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.delete("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (79163d54)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1201,14 +860,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.delete("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (abbc8758)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -1223,14 +878,10 @@ describe("AuthenticationMethods", () => { await expect(async () => { return await client.users.authenticationMethods.delete("id", "authentication_method_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (bdd8d44e)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -1245,6 +896,7 @@ describe("AuthenticationMethods", () => { preferred_authentication_method: "voice", key_id: "key_id", public_key: "public_key", + aaguid: "aaguid", relying_party_identifier: "relying_party_identifier", created_at: "2024-01-15T09:30:00Z", }; @@ -1274,15 +926,16 @@ describe("AuthenticationMethods", () => { preferred_authentication_method: "voice", key_id: "key_id", public_key: "public_key", + aaguid: "aaguid", relying_party_identifier: "relying_party_identifier", created_at: "2024-01-15T09:30:00Z", }); }); - test("update (26e458c5)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, preferred_authentication_method: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1294,21 +947,14 @@ describe("AuthenticationMethods", () => { .build(); await expect(async () => { - return await client.users.authenticationMethods.update("id", "authentication_method_id", { - name: undefined, - preferred_authentication_method: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.users.authenticationMethods.update("id", "authentication_method_id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (8eb1e975)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, preferred_authentication_method: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1320,21 +966,14 @@ describe("AuthenticationMethods", () => { .build(); await expect(async () => { - return await client.users.authenticationMethods.update("id", "authentication_method_id", { - name: undefined, - preferred_authentication_method: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.users.authenticationMethods.update("id", "authentication_method_id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (ea1b8f41)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, preferred_authentication_method: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1346,21 +985,14 @@ describe("AuthenticationMethods", () => { .build(); await expect(async () => { - return await client.users.authenticationMethods.update("id", "authentication_method_id", { - name: undefined, - preferred_authentication_method: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.users.authenticationMethods.update("id", "authentication_method_id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (edb089c1)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, preferred_authentication_method: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1372,21 +1004,14 @@ describe("AuthenticationMethods", () => { .build(); await expect(async () => { - return await client.users.authenticationMethods.update("id", "authentication_method_id", { - name: undefined, - preferred_authentication_method: undefined, - }); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + return await client.users.authenticationMethods.update("id", "authentication_method_id"); + }).rejects.toThrow(Management.NotFoundError); }); - test("update (ad436019)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { name: undefined, preferred_authentication_method: undefined }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1398,14 +1023,7 @@ describe("AuthenticationMethods", () => { .build(); await expect(async () => { - return await client.users.authenticationMethods.update("id", "authentication_method_id", { - name: undefined, - preferred_authentication_method: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.users.authenticationMethods.update("id", "authentication_method_id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/authenticators.test.ts b/src/management/tests/wire/users/authenticators.test.ts index 83a8f8c9c1..89a1d3a07e 100644 --- a/src/management/tests/wire/users/authenticators.test.ts +++ b/src/management/tests/wire/users/authenticators.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Authenticators", () => { - test("deleteAll (c7f0a6bf)", async () => { + test("deleteAll (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -17,7 +15,7 @@ describe("Authenticators", () => { expect(response).toEqual(undefined); }); - test("deleteAll (fcf9dbd1)", async () => { + test("deleteAll (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -32,14 +30,10 @@ describe("Authenticators", () => { await expect(async () => { return await client.users.authenticators.deleteAll("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("deleteAll (49d52691)", async () => { + test("deleteAll (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -54,14 +48,10 @@ describe("Authenticators", () => { await expect(async () => { return await client.users.authenticators.deleteAll("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteAll (2428808d)", async () => { + test("deleteAll (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -76,14 +66,10 @@ describe("Authenticators", () => { await expect(async () => { return await client.users.authenticators.deleteAll("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteAll (27b44cb5)", async () => { + test("deleteAll (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,10 +84,6 @@ describe("Authenticators", () => { await expect(async () => { return await client.users.authenticators.deleteAll("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/connectedAccounts.test.ts b/src/management/tests/wire/users/connectedAccounts.test.ts new file mode 100644 index 0000000000..d489efa536 --- /dev/null +++ b/src/management/tests/wire/users/connectedAccounts.test.ts @@ -0,0 +1,132 @@ +// This file was auto-generated by Fern from our API Definition. + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; + +describe("ConnectedAccounts", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + connected_accounts: [ + { + id: "id", + connection: "connection", + connection_id: "connection_id", + strategy: "strategy", + access_type: "offline", + scopes: ["scopes"], + created_at: "2024-01-15T09:30:00Z", + expires_at: "2024-01-15T09:30:00Z", + }, + ], + next: "next", + }; + server + .mockEndpoint() + .get("/users/id/connected-accounts") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const expected = { + connected_accounts: [ + { + id: "id", + connection: "connection", + connection_id: "connection_id", + strategy: "strategy", + access_type: "offline", + scopes: ["scopes"], + created_at: "2024-01-15T09:30:00Z", + expires_at: "2024-01-15T09:30:00Z", + }, + ], + next: "next", + }; + const page = await client.users.connectedAccounts.list("id", { + from: "from", + take: 1, + }); + + expect(expected.connected_accounts).toEqual(page.data); + expect(page.hasNextPage()).toBe(true); + const nextPage = await page.getNextPage(); + expect(expected.connected_accounts).toEqual(nextPage.data); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/users/id/connected-accounts") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.users.connectedAccounts.list("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/users/id/connected-accounts") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.users.connectedAccounts.list("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/users/id/connected-accounts") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.users.connectedAccounts.list("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/users/id/connected-accounts") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.users.connectedAccounts.list("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); +}); diff --git a/src/management/tests/wire/users/enrollments.test.ts b/src/management/tests/wire/users/enrollments.test.ts index d0e5b8661d..8ad22aceee 100644 --- a/src/management/tests/wire/users/enrollments.test.ts +++ b/src/management/tests/wire/users/enrollments.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Enrollments", () => { - test("get (b63dc92a)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -48,7 +46,7 @@ describe("Enrollments", () => { ]); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -63,14 +61,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.users.enrollments.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -85,14 +79,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.users.enrollments.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -107,14 +97,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.users.enrollments.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -129,14 +115,10 @@ describe("Enrollments", () => { await expect(async () => { return await client.users.enrollments.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -151,10 +133,6 @@ describe("Enrollments", () => { await expect(async () => { return await client.users.enrollments.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/federatedConnectionsTokensets.test.ts b/src/management/tests/wire/users/federatedConnectionsTokensets.test.ts index d3117971f0..f02655917e 100644 --- a/src/management/tests/wire/users/federatedConnectionsTokensets.test.ts +++ b/src/management/tests/wire/users/federatedConnectionsTokensets.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("FederatedConnectionsTokensets", () => { - test("list (2d063f90)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -42,7 +40,7 @@ describe("FederatedConnectionsTokensets", () => { ]); }); - test("list (49d52691)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -57,14 +55,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -79,14 +73,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -101,14 +91,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -123,14 +109,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (f07aa4b1)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -145,7 +127,7 @@ describe("FederatedConnectionsTokensets", () => { expect(response).toEqual(undefined); }); - test("delete (6a5961c3)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -160,14 +142,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.delete("id", "tokenset_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (a49c2cd3)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -182,14 +160,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.delete("id", "tokenset_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (94ae223f)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -204,14 +178,10 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.delete("id", "tokenset_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (276da807)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -226,10 +196,6 @@ describe("FederatedConnectionsTokensets", () => { await expect(async () => { return await client.users.federatedConnectionsTokensets.delete("id", "tokenset_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); 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 48dffb7eb5..0000000000 --- a/src/management/tests/wire/users/groups.test.ts +++ /dev/null @@ -1,119 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; - -describe("Groups", () => { - test("get (8ba651e5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ 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", - }; - server.mockEndpoint().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", - }, - ], - next: "next", - }; - const page = await client.users.groups.get("id"); - expect(expected.groups).toEqual(page.data); - - expect(page.hasNextPage()).toBe(true); - const nextPage = await page.getNextPage(); - expect(expected.groups).toEqual(nextPage.data); - }); - - test("get (fcf9dbd1)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/users/id/groups").respondWith().statusCode(400).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); - }); - - test("get (49d52691)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/users/id/groups").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); - }); - - test("get (2428808d)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/users/id/groups").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); - }); - - test("get (27b44cb5)", async () => { - const server = mockServerPool.createServer(); - const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - - const rawResponseBody = { key: "value" }; - server.mockEndpoint().get("/users/id/groups").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); - - await expect(async () => { - return await client.users.groups.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); - }); -}); diff --git a/src/management/tests/wire/users/identities.test.ts b/src/management/tests/wire/users/identities.test.ts index 866947137c..78e492a40b 100644 --- a/src/management/tests/wire/users/identities.test.ts +++ b/src/management/tests/wire/users/identities.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Identities", () => { - test("link (e5a12ebf)", async () => { + test("link (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -65,15 +63,10 @@ describe("Identities", () => { ]); }); - test("link (e4f14932)", async () => { + test("link (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -85,28 +78,14 @@ describe("Identities", () => { .build(); await expect(async () => { - return await client.users.identities.link("id", { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.users.identities.link("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("link (a6f6708a)", async () => { + test("link (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -118,28 +97,14 @@ describe("Identities", () => { .build(); await expect(async () => { - return await client.users.identities.link("id", { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.users.identities.link("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("link (ea0bba4e)", async () => { + test("link (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -151,28 +116,14 @@ describe("Identities", () => { .build(); await expect(async () => { - return await client.users.identities.link("id", { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.users.identities.link("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("link (5a1f3346)", async () => { + test("link (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -184,28 +135,14 @@ describe("Identities", () => { .build(); await expect(async () => { - return await client.users.identities.link("id", { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.users.identities.link("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("link (871206da)", async () => { + test("link (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -217,20 +154,11 @@ describe("Identities", () => { .build(); await expect(async () => { - return await client.users.identities.link("id", { - provider: undefined, - connection_id: undefined, - user_id: undefined, - link_with: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.users.identities.link("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (b7f67dbe)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -287,7 +215,7 @@ describe("Identities", () => { ]); }); - test("delete (7a3438de)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -302,14 +230,10 @@ describe("Identities", () => { await expect(async () => { return await client.users.identities.delete("id", "ad", "user_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (29a566e6)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -324,14 +248,10 @@ describe("Identities", () => { await expect(async () => { return await client.users.identities.delete("id", "ad", "user_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (e7eb4aa)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -346,14 +266,10 @@ describe("Identities", () => { await expect(async () => { return await client.users.identities.delete("id", "ad", "user_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (f04618c6)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -368,10 +284,6 @@ describe("Identities", () => { await expect(async () => { return await client.users.identities.delete("id", "ad", "user_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/logs.test.ts b/src/management/tests/wire/users/logs.test.ts index d818f34c25..830d2dfc93 100644 --- a/src/management/tests/wire/users/logs.test.ts +++ b/src/management/tests/wire/users/logs.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Logs", () => { - test("list (7884ebac)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -73,15 +71,20 @@ describe("Logs", () => { }, ], }; - const page = await client.users.logs.list("id"); - expect(expected.logs).toEqual(page.data); + const page = await client.users.logs.list("id", { + page: 1, + per_page: 1, + sort: "sort", + include_totals: true, + }); + expect(expected.logs).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.logs).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +93,10 @@ describe("Logs", () => { await expect(async () => { return await client.users.logs.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -106,14 +105,10 @@ describe("Logs", () => { await expect(async () => { return await client.users.logs.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -122,14 +117,10 @@ describe("Logs", () => { await expect(async () => { return await client.users.logs.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -138,10 +129,6 @@ describe("Logs", () => { await expect(async () => { return await client.users.logs.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/multifactor.test.ts b/src/management/tests/wire/users/multifactor.test.ts index f66442288c..4c764a46b1 100644 --- a/src/management/tests/wire/users/multifactor.test.ts +++ b/src/management/tests/wire/users/multifactor.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Multifactor", () => { - test("invalidateRememberBrowser (c7f0a6bf)", async () => { + test("invalidateRememberBrowser (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -22,7 +20,7 @@ describe("Multifactor", () => { expect(response).toEqual(undefined); }); - test("invalidateRememberBrowser (fcf9dbd1)", async () => { + test("invalidateRememberBrowser (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -37,14 +35,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.invalidateRememberBrowser("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("invalidateRememberBrowser (49d52691)", async () => { + test("invalidateRememberBrowser (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -59,14 +53,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.invalidateRememberBrowser("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("invalidateRememberBrowser (2428808d)", async () => { + test("invalidateRememberBrowser (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -81,14 +71,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.invalidateRememberBrowser("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteProvider (be99fa1a)", async () => { + test("deleteProvider (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,7 +84,7 @@ describe("Multifactor", () => { expect(response).toEqual(undefined); }); - test("deleteProvider (35cb7111)", async () => { + test("deleteProvider (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -113,14 +99,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.deleteProvider("id", "duo"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("deleteProvider (24c07ed1)", async () => { + test("deleteProvider (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -135,14 +117,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.deleteProvider("id", "duo"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("deleteProvider (76111bcd)", async () => { + test("deleteProvider (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -157,14 +135,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.deleteProvider("id", "duo"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("deleteProvider (d466323d)", async () => { + test("deleteProvider (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -179,14 +153,10 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.deleteProvider("id", "duo"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("deleteProvider (3e9449f5)", async () => { + test("deleteProvider (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -201,10 +171,6 @@ describe("Multifactor", () => { await expect(async () => { return await client.users.multifactor.deleteProvider("id", "duo"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/organizations.test.ts b/src/management/tests/wire/users/organizations.test.ts index bb3b6d2644..26e4a1f15a 100644 --- a/src/management/tests/wire/users/organizations.test.ts +++ b/src/management/tests/wire/users/organizations.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Organizations", () => { - test("list (a5e2ce8f)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -42,15 +40,19 @@ describe("Organizations", () => { }, ], }; - const page = await client.users.organizations.list("id"); - expect(expected.organizations).toEqual(page.data); + const page = await client.users.organizations.list("id", { + page: 1, + per_page: 1, + include_totals: true, + }); + expect(expected.organizations).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.organizations).toEqual(nextPage.data); }); - test("list (49d52691)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -65,14 +67,10 @@ describe("Organizations", () => { await expect(async () => { return await client.users.organizations.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -87,14 +85,10 @@ describe("Organizations", () => { await expect(async () => { return await client.users.organizations.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -109,10 +103,6 @@ describe("Organizations", () => { await expect(async () => { return await client.users.organizations.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/permissions.test.ts b/src/management/tests/wire/users/permissions.test.ts index be7ecc4470..26741c7a7a 100644 --- a/src/management/tests/wire/users/permissions.test.ts +++ b/src/management/tests/wire/users/permissions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Permissions", () => { - test("list (13f93d13)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -45,15 +43,19 @@ describe("Permissions", () => { }, ], }; - const page = await client.users.permissions.list("id"); - expect(expected.permissions).toEqual(page.data); + const page = await client.users.permissions.list("id", { + per_page: 1, + page: 1, + include_totals: true, + }); + expect(expected.permissions).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.permissions).toEqual(nextPage.data); }); - test("list (fcf9dbd1)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -68,14 +70,10 @@ describe("Permissions", () => { await expect(async () => { return await client.users.permissions.list("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (49d52691)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -90,14 +88,10 @@ describe("Permissions", () => { await expect(async () => { return await client.users.permissions.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -112,14 +106,10 @@ describe("Permissions", () => { await expect(async () => { return await client.users.permissions.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (e55ce3fd)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -134,14 +124,10 @@ describe("Permissions", () => { await expect(async () => { return await client.users.permissions.list("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (27b44cb5)", async () => { + test("list (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -156,14 +142,10 @@ describe("Permissions", () => { await expect(async () => { return await client.users.permissions.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (7044cab6)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -191,7 +173,7 @@ describe("Permissions", () => { expect(response).toEqual(undefined); }); - test("create (4cfc2db5)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -223,14 +205,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (dd1ed2a5)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -262,14 +240,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (9d65d271)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -301,14 +275,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (fa8483c9)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -340,14 +310,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (7044cab6)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -375,7 +341,7 @@ describe("Permissions", () => { expect(response).toEqual(undefined); }); - test("delete (4cfc2db5)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -407,14 +373,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (dd1ed2a5)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -446,14 +408,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (9d65d271)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -485,14 +443,10 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (fa8483c9)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -524,10 +478,6 @@ describe("Permissions", () => { }, ], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).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 fda77584d9..665e288b71 100644 --- a/src/management/tests/wire/users/refreshToken.test.ts +++ b/src/management/tests/wire/users/refreshToken.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("RefreshToken", () => { - test("list (2c39e30)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -53,15 +51,18 @@ describe("RefreshToken", () => { ], next: "next", }; - const page = await client.users.refreshToken.list("user_id"); - expect(expected.tokens).toEqual(page.data); + const page = await client.users.refreshToken.list("user_id", { + from: "from", + take: 1, + }); + expect(expected.tokens).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.tokens).toEqual(nextPage.data); }); - test("list (9cae60ab)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -76,14 +77,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.list("user_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (482be157)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -98,14 +95,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.list("user_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (3abc04c7)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -120,14 +113,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.list("user_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (21a2277f)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -142,14 +131,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.list("user_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (754131a5)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -159,7 +144,7 @@ describe("RefreshToken", () => { expect(response).toEqual(undefined); }); - test("delete (3a7c14fb)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -174,14 +159,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.delete("user_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (9cae60ab)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -196,14 +177,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.delete("user_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (482be157)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -218,14 +195,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.delete("user_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (3abc04c7)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -240,14 +213,10 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.delete("user_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (21a2277f)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -262,10 +231,6 @@ describe("RefreshToken", () => { await expect(async () => { return await client.users.refreshToken.delete("user_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/riskAssessments.test.ts b/src/management/tests/wire/users/riskAssessments.test.ts index b2f7782f52..247903e57a 100644 --- a/src/management/tests/wire/users/riskAssessments.test.ts +++ b/src/management/tests/wire/users/riskAssessments.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("RiskAssessments", () => { - test("clear (f8a5c1d1)", async () => { + test("clear (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection: "connection", assessors: ["new-device"] }; @@ -27,7 +25,7 @@ describe("RiskAssessments", () => { expect(response).toEqual(undefined); }); - test("clear (eab02ea2)", async () => { + test("clear (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection: "x", assessors: ["new-device", "new-device"] }; @@ -46,14 +44,10 @@ describe("RiskAssessments", () => { connection: "x", assessors: ["new-device", "new-device"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("clear (9ffb75ba)", async () => { + test("clear (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection: "x", assessors: ["new-device", "new-device"] }; @@ -72,14 +66,10 @@ describe("RiskAssessments", () => { connection: "x", assessors: ["new-device", "new-device"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("clear (ad2ba27e)", async () => { + test("clear (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection: "x", assessors: ["new-device", "new-device"] }; @@ -98,14 +88,10 @@ describe("RiskAssessments", () => { connection: "x", assessors: ["new-device", "new-device"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("clear (f671b98a)", async () => { + test("clear (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { connection: "x", assessors: ["new-device", "new-device"] }; @@ -124,10 +110,6 @@ describe("RiskAssessments", () => { connection: "x", assessors: ["new-device", "new-device"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/roles.test.ts b/src/management/tests/wire/users/roles.test.ts index 8543adcae6..883647e2b7 100644 --- a/src/management/tests/wire/users/roles.test.ts +++ b/src/management/tests/wire/users/roles.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Roles", () => { - test("list (fd9dd7da)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -31,15 +29,19 @@ describe("Roles", () => { }, ], }; - const page = await client.users.roles.list("id"); - expect(expected.roles).toEqual(page.data); + const page = await client.users.roles.list("id", { + per_page: 1, + page: 1, + include_totals: true, + }); + expect(expected.roles).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.roles).toEqual(nextPage.data); }); - test("list (49d52691)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -48,14 +50,10 @@ describe("Roles", () => { await expect(async () => { return await client.users.roles.list("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (2428808d)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -64,14 +62,10 @@ describe("Roles", () => { await expect(async () => { return await client.users.roles.list("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (27b44cb5)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -80,14 +74,10 @@ describe("Roles", () => { await expect(async () => { return await client.users.roles.list("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("assign (e93e583a)", async () => { + test("assign (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles"] }; @@ -100,7 +90,7 @@ describe("Roles", () => { expect(response).toEqual(undefined); }); - test("assign (722e7098)", async () => { + test("assign (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -118,14 +108,10 @@ describe("Roles", () => { return await client.users.roles.assign("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("assign (d535f640)", async () => { + test("assign (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -143,14 +129,10 @@ describe("Roles", () => { return await client.users.roles.assign("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("assign (13939864)", async () => { + test("assign (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -168,14 +150,10 @@ describe("Roles", () => { return await client.users.roles.assign("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("assign (825ce8f0)", async () => { + test("assign (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -193,14 +171,10 @@ describe("Roles", () => { return await client.users.roles.assign("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (e93e583a)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles"] }; @@ -213,7 +187,7 @@ describe("Roles", () => { expect(response).toEqual(undefined); }); - test("delete (d535f640)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -231,14 +205,10 @@ describe("Roles", () => { return await client.users.roles.delete("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (13939864)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -256,14 +226,10 @@ describe("Roles", () => { return await client.users.roles.delete("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (825ce8f0)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { roles: ["roles", "roles"] }; @@ -281,10 +247,6 @@ describe("Roles", () => { return await client.users.roles.delete("id", { roles: ["roles", "roles"], }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/users/sessions.test.ts b/src/management/tests/wire/users/sessions.test.ts index 89f6676def..e24595d064 100644 --- a/src/management/tests/wire/users/sessions.test.ts +++ b/src/management/tests/wire/users/sessions.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../Client.js"; -import * as Management from "../../../api/index.js"; +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../Client"; +import * as Management from "../../../api/index"; describe("Sessions", () => { - test("list (58320f6e)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -23,6 +21,7 @@ describe("Sessions", () => { expires_at: "2024-01-15T09:30:00Z", last_interacted_at: "2024-01-15T09:30:00Z", clients: [{}], + session_metadata: { key: "value" }, }, ], next: "next", @@ -47,19 +46,25 @@ describe("Sessions", () => { expires_at: "2024-01-15T09:30:00Z", last_interacted_at: "2024-01-15T09:30:00Z", clients: [{}], + session_metadata: { + key: "value", + }, }, ], next: "next", }; - const page = await client.users.sessions.list("user_id"); - expect(expected.sessions).toEqual(page.data); + const page = await client.users.sessions.list("user_id", { + from: "from", + take: 1, + }); + expect(expected.sessions).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.sessions).toEqual(nextPage.data); }); - test("list (9cae60ab)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -74,14 +79,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.list("user_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (482be157)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -96,14 +97,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.list("user_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (3abc04c7)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -118,14 +115,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.list("user_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("list (21a2277f)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -140,14 +133,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.list("user_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (754131a5)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -157,7 +146,7 @@ describe("Sessions", () => { expect(response).toEqual(undefined); }); - test("delete (3a7c14fb)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -172,14 +161,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.delete("user_id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (9cae60ab)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -194,14 +179,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.delete("user_id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (482be157)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -216,14 +197,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.delete("user_id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (3abc04c7)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -238,14 +215,10 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.delete("user_id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("delete (21a2277f)", async () => { + test("delete (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -260,10 +233,6 @@ describe("Sessions", () => { await expect(async () => { return await client.users.sessions.delete("user_id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts b/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts index 2c21066860..3c9936eb01 100644 --- a/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts +++ b/src/management/tests/wire/verifiableCredentials/verification/templates.test.ts @@ -1,13 +1,11 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. -import { mockServerPool } from "../../../mock-server/MockServerPool.js"; -import { ManagementClient } from "../../../../Client.js"; -import * as Management from "../../../../api/index.js"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; +import { ManagementClient } from "../../../../Client"; +import * as Management from "../../../../api/index"; describe("Templates", () => { - test("list (7452f08f)", async () => { + test("list (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -55,15 +53,18 @@ describe("Templates", () => { }, ], }; - const page = await client.verifiableCredentials.verification.templates.list(); - expect(expected.templates).toEqual(page.data); + const page = await client.verifiableCredentials.verification.templates.list({ + from: "from", + take: 1, + }); + expect(expected.templates).toEqual(page.data); expect(page.hasNextPage()).toBe(true); const nextPage = await page.getNextPage(); expect(expected.templates).toEqual(nextPage.data); }); - test("list (c60dd33b)", async () => { + test("list (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -78,14 +79,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.list(); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("list (1e230aeb)", async () => { + test("list (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -100,14 +97,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.list(); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("list (af841397)", async () => { + test("list (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -122,14 +115,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.list(); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("list (ee1e23bf)", async () => { + test("list (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -144,14 +133,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.list(); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("create (4259b620)", async () => { + test("create (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { @@ -209,41 +194,14 @@ describe("Templates", () => { }); }); - test("create (e6d1c4a4)", async () => { + test("create (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", type: "x", dialect: "dialect", - presentation: { - "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, - }, - }, - custom_certificate_authority: undefined, + presentation: { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {} } }, well_known_trusted_issuers: "x", }; const rawResponseBody = { key: "value" }; @@ -263,76 +221,22 @@ describe("Templates", () => { dialect: "dialect", presentation: { "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, + "org.iso.18013.5.1": {}, }, }, - custom_certificate_authority: undefined, well_known_trusted_issuers: "x", }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("create (a7d171cc)", async () => { + test("create (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", type: "x", dialect: "dialect", - presentation: { - "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, - }, - }, - custom_certificate_authority: undefined, + presentation: { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {} } }, well_known_trusted_issuers: "x", }; const rawResponseBody = { key: "value" }; @@ -352,76 +256,22 @@ describe("Templates", () => { dialect: "dialect", presentation: { "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, + "org.iso.18013.5.1": {}, }, }, - custom_certificate_authority: undefined, well_known_trusted_issuers: "x", }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("create (fe134cd0)", async () => { + test("create (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", type: "x", dialect: "dialect", - presentation: { - "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, - }, - }, - custom_certificate_authority: undefined, + presentation: { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {} } }, well_known_trusted_issuers: "x", }; const rawResponseBody = { key: "value" }; @@ -441,76 +291,22 @@ describe("Templates", () => { dialect: "dialect", presentation: { "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, + "org.iso.18013.5.1": {}, }, }, - custom_certificate_authority: undefined, well_known_trusted_issuers: "x", }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("create (570b17e8)", async () => { + test("create (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", type: "x", dialect: "dialect", - presentation: { - "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, - }, - }, - custom_certificate_authority: undefined, + presentation: { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {} } }, well_known_trusted_issuers: "x", }; const rawResponseBody = { key: "value" }; @@ -530,76 +326,22 @@ describe("Templates", () => { dialect: "dialect", presentation: { "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, + "org.iso.18013.5.1": {}, }, }, - custom_certificate_authority: undefined, well_known_trusted_issuers: "x", }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ConflictError); }); - test("create (93203adc)", async () => { + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "x", type: "x", dialect: "dialect", - presentation: { - "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, - }, - }, - custom_certificate_authority: undefined, + presentation: { "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": {} } }, well_known_trusted_issuers: "x", }; const rawResponseBody = { key: "value" }; @@ -619,42 +361,15 @@ describe("Templates", () => { dialect: "dialect", presentation: { "org.iso.18013.5.1.mDL": { - "org.iso.18013.5.1": { - family_name: undefined, - given_name: undefined, - birth_date: undefined, - issue_date: undefined, - expiry_date: undefined, - issuing_country: undefined, - issuing_authority: undefined, - portrait: undefined, - driving_privileges: undefined, - resident_address: undefined, - portrait_capture_date: undefined, - age_in_years: undefined, - age_birth_year: undefined, - issuing_jurisdiction: undefined, - nationality: undefined, - resident_city: undefined, - resident_state: undefined, - resident_postal_code: undefined, - resident_country: undefined, - family_name_national_character: undefined, - given_name_national_character: undefined, - }, + "org.iso.18013.5.1": {}, }, }, - custom_certificate_authority: undefined, well_known_trusted_issuers: "x", }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("get (ca2a3e16)", async () => { + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -695,7 +410,7 @@ describe("Templates", () => { }); }); - test("get (fcf9dbd1)", async () => { + test("get (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -710,14 +425,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.get("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("get (49d52691)", async () => { + test("get (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -732,14 +443,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.get("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("get (2428808d)", async () => { + test("get (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -754,14 +461,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.get("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("get (e55ce3fd)", async () => { + test("get (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -776,14 +479,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.get("id"); - }).rejects.toThrow( - new Management.NotFoundError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.NotFoundError); }); - test("get (27b44cb5)", async () => { + test("get (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -798,14 +497,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.get("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("delete (c7f0a6bf)", async () => { + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -820,7 +515,7 @@ describe("Templates", () => { expect(response).toEqual(undefined); }); - test("delete (fcf9dbd1)", async () => { + test("delete (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -835,14 +530,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.delete("id"); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.BadRequestError); }); - test("delete (49d52691)", async () => { + test("delete (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -857,14 +548,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.delete("id"); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("delete (2428808d)", async () => { + test("delete (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -879,14 +566,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.delete("id"); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.ForbiddenError); }); - test("delete (27b44cb5)", async () => { + test("delete (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); @@ -901,14 +584,10 @@ describe("Templates", () => { await expect(async () => { return await client.verifiableCredentials.verification.templates.delete("id"); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + }).rejects.toThrow(Management.TooManyRequestsError); }); - test("update (5bc46ab5)", async () => { + test("update (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); const rawRequestBody = {}; @@ -950,17 +629,10 @@ describe("Templates", () => { }); }); - test("update (bdb2fc50)", async () => { + test("update (2)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -972,32 +644,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.verifiableCredentials.verification.templates.update("id", { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }); - }).rejects.toThrow( - new Management.BadRequestError({ - key: "value", - }), - ); + return await client.verifiableCredentials.verification.templates.update("id"); + }).rejects.toThrow(Management.BadRequestError); }); - test("update (f15da378)", async () => { + test("update (3)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1009,32 +663,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.verifiableCredentials.verification.templates.update("id", { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }); - }).rejects.toThrow( - new Management.UnauthorizedError({ - key: "value", - }), - ); + return await client.verifiableCredentials.verification.templates.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); }); - test("update (d3351a7c)", async () => { + test("update (4)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1046,32 +682,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.verifiableCredentials.verification.templates.update("id", { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }); - }).rejects.toThrow( - new Management.ForbiddenError({ - key: "value", - }), - ); + return await client.verifiableCredentials.verification.templates.update("id"); + }).rejects.toThrow(Management.ForbiddenError); }); - test("update (ef4f43d4)", async () => { + test("update (5)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1083,32 +701,14 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.verifiableCredentials.verification.templates.update("id", { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }); - }).rejects.toThrow( - new Management.ConflictError({ - key: "value", - }), - ); + return await client.verifiableCredentials.verification.templates.update("id"); + }).rejects.toThrow(Management.ConflictError); }); - test("update (b488d448)", async () => { + test("update (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ token: "test", environment: server.baseUrl }); - const rawRequestBody = { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }; + const rawRequestBody = {}; const rawResponseBody = { key: "value" }; server .mockEndpoint() @@ -1120,18 +720,7 @@ describe("Templates", () => { .build(); await expect(async () => { - return await client.verifiableCredentials.verification.templates.update("id", { - name: undefined, - type: undefined, - dialect: undefined, - presentation: undefined, - well_known_trusted_issuers: undefined, - version: undefined, - }); - }).rejects.toThrow( - new Management.TooManyRequestsError({ - key: "value", - }), - ); + return await client.verifiableCredentials.verification.templates.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); }); }); diff --git a/yarn.lock b/yarn.lock index dd8d5c8c6c..0f2c2cd843 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,24 +12,24 @@ picocolors "^1.1.1" "@babel/compat-data@^7.27.2": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.4.tgz#96fdf1af1b8859c8474ab39c295312bfb7c24b04" - integrity sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw== + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" + integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.4.tgz#12a550b8794452df4c8b084f95003bce1742d496" - integrity sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA== + 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.3" + "@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.4" + "@babel/parser" "^7.28.5" "@babel/template" "^7.27.2" - "@babel/traverse" "^7.28.4" - "@babel/types" "^7.28.4" + "@babel/traverse" "^7.28.5" + "@babel/types" "^7.28.5" "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" @@ -37,13 +37,13 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.28.3", "@babel/generator@^7.7.2": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.3.tgz#9626c1741c650cbac39121694a0f2d7451b8ef3e" - integrity sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw== +"@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== dependencies: - "@babel/parser" "^7.28.3" - "@babel/types" "^7.28.2" + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" "@jridgewell/gen-mapping" "^0.3.12" "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" @@ -91,10 +91,10 @@ 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": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8" - integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.27.1", "@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== "@babel/helper-validator-option@^7.27.1": version "7.27.1" @@ -109,12 +109,12 @@ "@babel/template" "^7.27.2" "@babel/types" "^7.28.4" -"@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.3", "@babel/parser@^7.28.4": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.4.tgz#da25d4643532890932cc03f7705fe19637e03fa8" - integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg== +"@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== dependencies: - "@babel/types" "^7.28.4" + "@babel/types" "^7.28.5" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -244,26 +244,26 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" -"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.4": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.4.tgz#8d456101b96ab175d487249f60680221692b958b" - integrity sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ== +"@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== dependencies: "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.3" + "@babel/generator" "^7.28.5" "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.4" + "@babel/parser" "^7.28.5" "@babel/template" "^7.27.2" - "@babel/types" "^7.28.4" + "@babel/types" "^7.28.5" 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.3.3": - version "7.28.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a" - integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q== +"@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== dependencies: "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" @@ -292,28 +292,37 @@ eslint-visitor-keys "^3.4.3" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": - version "4.12.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" - integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + version "4.12.2" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== -"@eslint/config-array@^0.21.0": - version "0.21.0" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.0.tgz#abdbcbd16b124c638081766392a4d6b509f72636" - integrity sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ== +"@eslint/config-array@^0.21.1": + version "0.21.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713" + integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA== dependencies: - "@eslint/object-schema" "^2.1.6" + "@eslint/object-schema" "^2.1.7" debug "^4.3.1" minimatch "^3.1.2" -"@eslint/config-helpers@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.3.1.tgz#d316e47905bd0a1a931fa50e669b9af4104d1617" - integrity sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA== +"@eslint/config-helpers@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" + integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== + dependencies: + "@eslint/core" "^0.17.0" + +"@eslint/core@^0.16.0": + version "0.16.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.16.0.tgz#490254f275ba9667ddbab344f4f0a6b7a7bd7209" + integrity sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q== + dependencies: + "@types/json-schema" "^7.0.15" -"@eslint/core@^0.15.2": - version "0.15.2" - resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.15.2.tgz#59386327d7862cc3603ebc7c78159d2dcc4a868f" - integrity sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg== +"@eslint/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" + integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ== dependencies: "@types/json-schema" "^7.0.15" @@ -332,33 +341,33 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.35.0", "@eslint/js@^9.32.0": - version "9.35.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.35.0.tgz#ffbc7e13cf1204db18552e9cd9d4a8e17c692d07" - integrity sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw== +"@eslint/js@9.38.0", "@eslint/js@^9.32.0": + version "9.38.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.38.0.tgz#f7aa9c7577577f53302c1d795643589d7709ebd1" + integrity sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A== -"@eslint/object-schema@^2.1.6": - version "2.1.6" - resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f" - integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== +"@eslint/object-schema@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" + integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== -"@eslint/plugin-kit@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz#fd8764f0ee79c8ddab4da65460c641cefee017c5" - integrity sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w== +"@eslint/plugin-kit@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" + integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== dependencies: - "@eslint/core" "^0.15.2" + "@eslint/core" "^0.17.0" levn "^0.4.1" "@gerrit0/mini-shiki@^3.12.0": - version "3.12.2" - resolved "https://registry.yarnpkg.com/@gerrit0/mini-shiki/-/mini-shiki-3.12.2.tgz#228b6ab36a0fb8a7912fabe26059c9e820630fc7" - integrity sha512-HKZPmO8OSSAAo20H2B3xgJdxZaLTwtlMwxg0967scnrDlPwe6j5+ULGHyIqwgTbFCn9yv/ff8CmfWZLE9YKBzA== - dependencies: - "@shikijs/engine-oniguruma" "^3.12.2" - "@shikijs/langs" "^3.12.2" - "@shikijs/themes" "^3.12.2" - "@shikijs/types" "^3.12.2" + version "3.14.0" + resolved "https://registry.yarnpkg.com/@gerrit0/mini-shiki/-/mini-shiki-3.14.0.tgz#ba66291e151b909cf96515e1cf6cba38748e4b62" + integrity sha512-c5X8fwPLOtUS8TVdqhynz9iV0GlOtFUT1ppXYzUUlEXe4kbZ/mvMT8wXoT8kCwUka+zsiloq7sD3pZ3+QVTuNQ== + dependencies: + "@shikijs/engine-oniguruma" "^3.14.0" + "@shikijs/langs" "^3.14.0" + "@shikijs/themes" "^3.14.0" + "@shikijs/types" "^3.14.0" "@shikijs/vscode-textmate" "^10.0.2" "@humanfs/core@^0.19.1": @@ -384,42 +393,42 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== -"@inquirer/ansi@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.0.tgz#29525c673caf36c12e719712830705b9c31f0462" - integrity sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA== +"@inquirer/ansi@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.1.tgz#994f7dd16a00c547a7b110e04bf4f4eca1857929" + integrity sha512-yqq0aJW/5XPhi5xOAL1xRCpe1eh8UFVgYFpFsjEqmIR8rKLyP+HINvFXwUaxYICflJrVlxnp7lLN6As735kVpw== "@inquirer/confirm@^5.0.0": - version "5.1.18" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.18.tgz#0b76e5082d834c0e3528023705b867fc1222d535" - integrity sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw== + version "5.1.19" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.19.tgz#bf28b420898999eb7479ab55623a3fbaf1453ff4" + integrity sha512-wQNz9cfcxrtEnUyG5PndC8g3gZ7lGDBzmWiXZkX8ot3vfZ+/BLjR8EvyGX4YzQLeVqtAlY/YScZpW7CW8qMoDQ== dependencies: - "@inquirer/core" "^10.2.2" - "@inquirer/type" "^3.0.8" + "@inquirer/core" "^10.3.0" + "@inquirer/type" "^3.0.9" -"@inquirer/core@^10.2.2": - version "10.2.2" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.2.2.tgz#d31eb50ba0c76b26e7703c2c0d1d0518144c23ab" - integrity sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA== +"@inquirer/core@^10.3.0": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.3.0.tgz#342e4fd62cbd33ea62089364274995dbec1f2ffe" + integrity sha512-Uv2aPPPSK5jeCplQmQ9xadnFx2Zhj9b5Dj7bU6ZeCdDNNY11nhYy4btcSdtDguHqCT2h5oNeQTcUNSGGLA7NTA== dependencies: - "@inquirer/ansi" "^1.0.0" - "@inquirer/figures" "^1.0.13" - "@inquirer/type" "^3.0.8" + "@inquirer/ansi" "^1.0.1" + "@inquirer/figures" "^1.0.14" + "@inquirer/type" "^3.0.9" cli-width "^4.1.0" mute-stream "^2.0.0" signal-exit "^4.1.0" wrap-ansi "^6.2.0" yoctocolors-cjs "^2.1.2" -"@inquirer/figures@^1.0.13": - version "1.0.13" - resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.13.tgz#ad0afd62baab1c23175115a9b62f511b6a751e45" - integrity sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw== +"@inquirer/figures@^1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.14.tgz#12a7bfd344a83ae6cc5d6004b389ed11f6db6be4" + integrity sha512-DbFgdt+9/OZYFM+19dbpXOSeAstPy884FPy1KjDu4anWwymZeOYhMY1mdFri172htv6mvc/uvIAAi7b7tvjJBQ== -"@inquirer/type@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.8.tgz#efc293ba0ed91e90e6267f1aacc1c70d20b8b4e8" - integrity sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw== +"@inquirer/type@^3.0.9": + version "3.0.9" + resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.9.tgz#f7f9696e9276e4e1ae9332767afb9199992e31d9" + integrity sha512-QPaNt/nmE2bLGQa9b7wwyRJoLZ7pN6rcyXvzU0YCmivmJyq1BVo94G98tStRWkoD1RgDX5C+dPlhhHzNdu/W/w== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -672,9 +681,9 @@ "@jridgewell/sourcemap-codec" "^1.4.14" "@mswjs/interceptors@^0.39.1", "@mswjs/interceptors@^0.39.5": - version "0.39.6" - resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.39.6.tgz#44094a578f20da4749d1a0eaf3cdb7973604004b" - integrity sha512-bndDP83naYYkfayr/qhBHMhk0YGwS1iv6vaEGcr0SQbO0IZtbOPqjKjds/WcG+bJA+1T5vCx6kprKOzn5Bg+Vw== + version "0.39.8" + resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.39.8.tgz#0a2cf4cf26a731214ca4156273121f67dff7ebf8" + integrity sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA== dependencies: "@open-draft/deferred-promise" "^2.2.0" "@open-draft/logger" "^0.3.0" @@ -732,32 +741,32 @@ resolved "https://registry.yarnpkg.com/@publint/pack/-/pack-0.1.2.tgz#1b9a9567423262093e4a73e77697b65bf622f8c9" integrity sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw== -"@shikijs/engine-oniguruma@^3.12.2": - version "3.12.2" - resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-3.12.2.tgz#3314a43666d751f80c0d1fc584029a3074af4e9a" - integrity sha512-hozwnFHsLvujK4/CPVHNo3Bcg2EsnG8krI/ZQ2FlBlCRpPZW4XAEQmEwqegJsypsTAN9ehu2tEYe30lYKSZW/w== +"@shikijs/engine-oniguruma@^3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-3.14.0.tgz#562bcce2f69cc65c92bcf2ccb637b2a7021f3d7b" + integrity sha512-TNcYTYMbJyy+ZjzWtt0bG5y4YyMIWC2nyePz+CFMWqm+HnZZyy9SWMgo8Z6KBJVIZnx8XUXS8U2afO6Y0g1Oug== dependencies: - "@shikijs/types" "3.12.2" + "@shikijs/types" "3.14.0" "@shikijs/vscode-textmate" "^10.0.2" -"@shikijs/langs@^3.12.2": - version "3.12.2" - resolved "https://registry.yarnpkg.com/@shikijs/langs/-/langs-3.12.2.tgz#f41f1e0eb940c5c41f1017f8765be969e74a0c9b" - integrity sha512-bVx5PfuZHDSHoBal+KzJZGheFuyH4qwwcwG/n+MsWno5cTlKmaNtTsGzJpHYQ8YPbB5BdEdKU1rga5/6JGY8ww== +"@shikijs/langs@^3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@shikijs/langs/-/langs-3.14.0.tgz#71e6ca44e661b405209eb63d4449b57b9de529d0" + integrity sha512-DIB2EQY7yPX1/ZH7lMcwrK5pl+ZkP/xoSpUzg9YC8R+evRCCiSQ7yyrvEyBsMnfZq4eBzLzBlugMyTAf13+pzg== dependencies: - "@shikijs/types" "3.12.2" + "@shikijs/types" "3.14.0" -"@shikijs/themes@^3.12.2": - version "3.12.2" - resolved "https://registry.yarnpkg.com/@shikijs/themes/-/themes-3.12.2.tgz#e4b9b636669658576cdc532ebe1c405cadba6272" - integrity sha512-fTR3QAgnwYpfGczpIbzPjlRnxyONJOerguQv1iwpyQZ9QXX4qy/XFQqXlf17XTsorxnHoJGbH/LXBvwtqDsF5A== +"@shikijs/themes@^3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@shikijs/themes/-/themes-3.14.0.tgz#2b516c19caf63f78f81f5df9c087800c3b2c7404" + integrity sha512-fAo/OnfWckNmv4uBoUu6dSlkcBc+SA1xzj5oUSaz5z3KqHtEbUypg/9xxgJARtM6+7RVm0Q6Xnty41xA1ma1IA== dependencies: - "@shikijs/types" "3.12.2" + "@shikijs/types" "3.14.0" -"@shikijs/types@3.12.2", "@shikijs/types@^3.12.2": - version "3.12.2" - resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-3.12.2.tgz#8f7f02a1fd67a93470aac9409d072880b3148612" - integrity sha512-K5UIBzxCyv0YoxN3LMrKB9zuhp1bV+LgewxuVwHdl4Gz5oePoUFrr9EfgJlGlDeXCU1b/yhdnXeuRvAnz8HN8Q== +"@shikijs/types@3.14.0", "@shikijs/types@^3.14.0": + version "3.14.0" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-3.14.0.tgz#4e666f8d31e319494daf23efcc19a32a5fdaa341" + integrity sha512-bQGgC6vrY8U/9ObG1Z/vTro+uclbjjD/uG58RvfxKZVD5p9Yc1ka3tVyEFy7BNJLzxuWyHH5NWynP9zZZS59eQ== dependencies: "@shikijs/vscode-textmate" "^10.0.2" "@types/hast" "^3.0.4" @@ -906,16 +915,16 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "24.4.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.4.0.tgz#4ca9168c016a55ab15b7765ad1674ab807489600" - integrity sha512-gUuVEAK4/u6F9wRLznPUU4WGUacSEBDPoC2TrBkw3GAnOLHBL45QdfHOXp1kJ4ypBGLxTOB+t7NJLpKoC3gznQ== + version "24.9.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.9.2.tgz#90ded2422dbfcafcf72080f28975adc21366148d" + integrity sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA== dependencies: - undici-types "~7.11.0" + undici-types "~7.16.0" "@types/node@^18.19.70": - version "18.19.124" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.124.tgz#6f49e4fab8274910691a900e8a14316cbf3c7a31" - integrity sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ== + version "18.19.130" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.130.tgz#da4c6324793a79defb7a62cba3947ec5add00d59" + integrity sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg== dependencies: undici-types "~5.26.4" @@ -945,85 +954,85 @@ integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.33" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" - integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + version "17.0.34" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.34.tgz#1c2f9635b71d5401827373a01ce2e8a7670ea839" + integrity sha512-KExbHVa92aJpw9WDQvzBaGVE2/Pz+pLZQloT2hjL8IqsZnV62rlPOYvNnLmf/L2dyllfVUOVBj64M0z/46eR2A== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^8.38.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.43.0.tgz#4d730c2becd8e47ef76e59f68aee0fb560927cfc" - integrity sha512-8tg+gt7ENL7KewsKMKDHXR1vm8tt9eMxjJBYINf6swonlWgkYn5NwyIgXpbbDxTNU5DgpDFfj95prcTq2clIQQ== + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz#dc4ab93ee3d7e6c8e38820a0d6c7c93c7183e2dc" + integrity sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.43.0" - "@typescript-eslint/type-utils" "8.43.0" - "@typescript-eslint/utils" "8.43.0" - "@typescript-eslint/visitor-keys" "8.43.0" + "@typescript-eslint/scope-manager" "8.46.2" + "@typescript-eslint/type-utils" "8.46.2" + "@typescript-eslint/utils" "8.46.2" + "@typescript-eslint/visitor-keys" "8.46.2" graphemer "^1.4.0" ignore "^7.0.0" natural-compare "^1.4.0" ts-api-utils "^2.1.0" "@typescript-eslint/parser@^8.38.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.43.0.tgz#4024159925e7671f1782bdd3498bdcfbd48f9137" - integrity sha512-B7RIQiTsCBBmY+yW4+ILd6mF5h1FUwJsVvpqkrgpszYifetQ2Ke+Z4u6aZh0CblkUGIdR59iYVyXqqZGkZ3aBw== - dependencies: - "@typescript-eslint/scope-manager" "8.43.0" - "@typescript-eslint/types" "8.43.0" - "@typescript-eslint/typescript-estree" "8.43.0" - "@typescript-eslint/visitor-keys" "8.43.0" + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.46.2.tgz#dd938d45d581ac8ffa9d8a418a50282b306f7ebf" + integrity sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g== + dependencies: + "@typescript-eslint/scope-manager" "8.46.2" + "@typescript-eslint/types" "8.46.2" + "@typescript-eslint/typescript-estree" "8.46.2" + "@typescript-eslint/visitor-keys" "8.46.2" debug "^4.3.4" -"@typescript-eslint/project-service@8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.43.0.tgz#958dbaa16fbd1e81d46ab86e139f6276757140f8" - integrity sha512-htB/+D/BIGoNTQYffZw4uM4NzzuolCoaA/BusuSIcC8YjmBYQioew5VUZAYdAETPjeed0hqCaW7EHg+Robq8uw== +"@typescript-eslint/project-service@8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.46.2.tgz#ab2f02a0de4da6a7eeb885af5e059be57819d608" + integrity sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.43.0" - "@typescript-eslint/types" "^8.43.0" + "@typescript-eslint/tsconfig-utils" "^8.46.2" + "@typescript-eslint/types" "^8.46.2" debug "^4.3.4" -"@typescript-eslint/scope-manager@8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.43.0.tgz#009ebc09cc6e7e0dd67898a0e9a70d295361c6b9" - integrity sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg== +"@typescript-eslint/scope-manager@8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz#7d37df2493c404450589acb3b5d0c69cc0670a88" + integrity sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA== dependencies: - "@typescript-eslint/types" "8.43.0" - "@typescript-eslint/visitor-keys" "8.43.0" + "@typescript-eslint/types" "8.46.2" + "@typescript-eslint/visitor-keys" "8.46.2" -"@typescript-eslint/tsconfig-utils@8.43.0", "@typescript-eslint/tsconfig-utils@^8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.43.0.tgz#e6721dba183d61769a90ffdad202aebc383b18c8" - integrity sha512-ALC2prjZcj2YqqL5X/bwWQmHA2em6/94GcbB/KKu5SX3EBDOsqztmmX1kMkvAJHzxk7TazKzJfFiEIagNV3qEA== +"@typescript-eslint/tsconfig-utils@8.46.2", "@typescript-eslint/tsconfig-utils@^8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz#d110451cb93bbd189865206ea37ef677c196828c" + integrity sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag== -"@typescript-eslint/type-utils@8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.43.0.tgz#29ea2e34eeae5b8e9fe4f4730c5659fa330aa04e" - integrity sha512-qaH1uLBpBuBBuRf8c1mLJ6swOfzCXryhKND04Igr4pckzSEW9JX5Aw9AgW00kwfjWJF0kk0ps9ExKTfvXfw4Qg== +"@typescript-eslint/type-utils@8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz#802d027864e6fb752e65425ed09f3e089fb4d384" + integrity sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA== dependencies: - "@typescript-eslint/types" "8.43.0" - "@typescript-eslint/typescript-estree" "8.43.0" - "@typescript-eslint/utils" "8.43.0" + "@typescript-eslint/types" "8.46.2" + "@typescript-eslint/typescript-estree" "8.46.2" + "@typescript-eslint/utils" "8.46.2" debug "^4.3.4" ts-api-utils "^2.1.0" -"@typescript-eslint/types@8.43.0", "@typescript-eslint/types@^8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.43.0.tgz#00d34a5099504eb1b263e022cc17c4243ff2302e" - integrity sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw== +"@typescript-eslint/types@8.46.2", "@typescript-eslint/types@^8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.46.2.tgz#2bad7348511b31e6e42579820e62b73145635763" + integrity sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ== -"@typescript-eslint/typescript-estree@8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.43.0.tgz#39e5d431239b4d90787072ae0c2290cbd3e0a562" - integrity sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw== +"@typescript-eslint/typescript-estree@8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz#ab547a27e4222bb6a3281cb7e98705272e2c7d08" + integrity sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ== dependencies: - "@typescript-eslint/project-service" "8.43.0" - "@typescript-eslint/tsconfig-utils" "8.43.0" - "@typescript-eslint/types" "8.43.0" - "@typescript-eslint/visitor-keys" "8.43.0" + "@typescript-eslint/project-service" "8.46.2" + "@typescript-eslint/tsconfig-utils" "8.46.2" + "@typescript-eslint/types" "8.46.2" + "@typescript-eslint/visitor-keys" "8.46.2" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -1031,22 +1040,22 @@ semver "^7.6.0" ts-api-utils "^2.1.0" -"@typescript-eslint/utils@8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.43.0.tgz#5c391133a52f8500dfdabd7026be72a537d7b59e" - integrity sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g== +"@typescript-eslint/utils@8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.46.2.tgz#b313d33d67f9918583af205bd7bcebf20f231732" + integrity sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg== dependencies: "@eslint-community/eslint-utils" "^4.7.0" - "@typescript-eslint/scope-manager" "8.43.0" - "@typescript-eslint/types" "8.43.0" - "@typescript-eslint/typescript-estree" "8.43.0" + "@typescript-eslint/scope-manager" "8.46.2" + "@typescript-eslint/types" "8.46.2" + "@typescript-eslint/typescript-estree" "8.46.2" -"@typescript-eslint/visitor-keys@8.43.0": - version "8.43.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.43.0.tgz#633d3414afec3cf0a0e4583e1575f4101ef51d30" - integrity sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw== +"@typescript-eslint/visitor-keys@8.46.2": + version "8.46.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz#803fa298948c39acf810af21bdce6f8babfa9738" + integrity sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w== dependencies: - "@typescript-eslint/types" "8.43.0" + "@typescript-eslint/types" "8.46.2" eslint-visitor-keys "^4.2.1" "@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": @@ -1264,9 +1273,9 @@ ansi-escapes@^4.2.1: type-fest "^0.21.3" ansi-escapes@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.1.0.tgz#91983a524b64e49f8e46fb962bfb7f375ced2ad5" - integrity sha512-YdhtCd19sKRKfAAUsrcC1wzm4JuzJoiX4pOJqIoW2qmKj5WzG/dL8uUJ0361zaXtHqK7gEhOwtAtz7t3Yq3X5g== + version "7.1.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.1.1.tgz#fdd39427a7e5a26233e48a8b4366351629ffea1b" + integrity sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q== dependencies: environment "^1.0.0" @@ -1323,9 +1332,9 @@ asynckit@^0.4.0: integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== "auth0-legacy@npm:auth0@^4.27.0": - version "4.30.0" - resolved "https://registry.yarnpkg.com/auth0/-/auth0-4.30.0.tgz#aa18f09373e04f3c904cc3109b0d2fb0e093e7a6" - integrity sha512-mDV0ojKKfNGwG/Sm06RUhHrkrA5A/dLyK7dAyZDuBMF+7n27OzyZycArmLx/aQpXXD3W+W2Vu8BcDtwBXqmi7Q== + version "4.33.0" + resolved "https://registry.yarnpkg.com/auth0/-/auth0-4.33.0.tgz#c93c8435880639c1d40a30e99572a011482896fd" + integrity sha512-+zRMFXakIpKudDJKGzwlsYp6LC91J9w7hMz9k9d/qRmGbfqkJeqp3wPmKV7GqAcprfUr9fWCJH3XFFxzJV2jow== dependencies: jose "^4.13.2" undici-types "^6.15.0" @@ -1399,10 +1408,10 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -baseline-browser-mapping@^2.8.2: - version "2.8.4" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.4.tgz#e553e12272c4965682743705efd8b4b4cf0d709b" - integrity sha512-L+YvJwGAgwJBV1p6ffpSTa2KRc69EeeYGYjRVWKs0GKrK+LON0GC0gV+rKSNtALEDvMDqkvCFq9r1r94/Gjwxw== +baseline-browser-mapping@^2.8.19: + version "2.8.21" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz#2f9cccde871bfa4aec9dbf92d0ee746e4f1892e4" + integrity sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q== brace-expansion@^1.1.7: version "1.1.12" @@ -1426,16 +1435,16 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" -browserslist@^4.24.0: - version "4.26.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.26.0.tgz#035ca84b4ff312a3c6a7014a77beb83456a882dd" - integrity sha512-P9go2WrP9FiPwLv3zqRD/Uoxo0RSHjzFCiQz7d4vbmwNqQFo9T9WCeP/Qn5EbcKQY6DBbkxEXNcpJOmncNrb7A== +browserslist@^4.24.0, browserslist@^4.26.3: + version "4.27.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.27.0.tgz#755654744feae978fbb123718b2f139bc0fa6697" + integrity sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw== dependencies: - baseline-browser-mapping "^2.8.2" - caniuse-lite "^1.0.30001741" - electron-to-chromium "^1.5.218" - node-releases "^2.0.21" - update-browserslist-db "^1.1.3" + baseline-browser-mapping "^2.8.19" + caniuse-lite "^1.0.30001751" + electron-to-chromium "^1.5.238" + node-releases "^2.0.26" + update-browserslist-db "^1.1.4" bs-logger@^0.2.6: version "0.2.6" @@ -1479,10 +1488,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001741: - version "1.0.30001741" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001741.tgz#67fb92953edc536442f3c9da74320774aa523143" - integrity sha512-QGUGitqsc8ARjLdgAfxETDhRbJ0REsP6O3I96TAth/mVjh2cYzN2u+3AzPP3aVSm2FehEItaJw1xd+IGBXWeSw== +caniuse-lite@^1.0.30001751: + version "1.0.30001751" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz#dacd5d9f4baeea841641640139d2b2a4df4226ad" + integrity sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1492,11 +1501,6 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^5.6.0: - version "5.6.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea" - integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA== - char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -1525,9 +1529,9 @@ cli-cursor@^5.0.0: restore-cursor "^5.0.0" cli-truncate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-5.0.0.tgz#ce06d96ab246c35402ebfd12cf799828b24b53e4" - integrity sha512-ds7u02fPOOBpcUl2VSjLF3lfnAik9u7Zt0BTaaAQlT5RtABALl4cvpJHthXx+rM50J4gSfXKPH5Tix/tfdefUQ== + version "5.1.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-5.1.1.tgz#455476face9904d94b7d11e98d9adbca15292ea5" + integrity sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A== dependencies: slice-ansi "^7.1.0" string-width "^8.0.0" @@ -1552,9 +1556,9 @@ co@^4.6.0: integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" - integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== + version "1.0.3" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz#cc1f01eb8d02298cbc9a437c74c70ab4e5210b80" + integrity sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw== color-convert@^2.0.1: version "2.0.1" @@ -1580,10 +1584,10 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^14.0.0: - version "14.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-14.0.1.tgz#2f9225c19e6ebd0dc4404dd45821b2caa17ea09b" - integrity sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A== +commander@^14.0.1: + version "14.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-14.0.2.tgz#b71fd37fe4069e4c3c7c13925252ada4eba14e8e" + integrity sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ== commander@^2.20.0: version "2.20.3" @@ -1653,7 +1657,7 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.4.1: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.4.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== @@ -1711,10 +1715,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.218: - version "1.5.218" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.218.tgz#921042a011a98a4620853c9d391ab62bcc124400" - integrity sha512-uwwdN0TUHs8u6iRgN8vKeWZMRll4gBkz+QMqdS7DDe49uiK68/UX92lFb61oiFPrpYZNeZIqa4bA7O6Aiasnzg== +electron-to-chromium@^1.5.238: + version "1.5.243" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.243.tgz#b13b4a046f49f46574d643d4e2ec2ea33ce8cfe7" + integrity sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g== emittery@^0.13.1: version "0.13.1" @@ -1722,9 +1726,9 @@ emittery@^0.13.1: integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^10.3.0: - version "10.5.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.5.0.tgz#be23498b9e39db476226d8e81e467f39aca26b78" - integrity sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg== + version "10.6.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.6.0.tgz#bf3d6e8f7f8fd22a65d9703475bc0147357a6b0d" + integrity sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A== emoji-regex@^8.0.0: version "8.0.0" @@ -1755,9 +1759,9 @@ environment@^1.0.0: integrity sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + version "1.3.4" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== dependencies: is-arrayish "^0.2.1" @@ -1859,23 +1863,22 @@ eslint-visitor-keys@^4.2.1: integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== eslint@^9.32.0: - version "9.35.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.35.0.tgz#7a89054b7b9ee1dfd1b62035d8ce75547773f47e" - integrity sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg== + version "9.38.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.38.0.tgz#3957d2af804e5cf6cc503c618f60acc71acb2e7e" + integrity sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw== dependencies: "@eslint-community/eslint-utils" "^4.8.0" "@eslint-community/regexpp" "^4.12.1" - "@eslint/config-array" "^0.21.0" - "@eslint/config-helpers" "^0.3.1" - "@eslint/core" "^0.15.2" + "@eslint/config-array" "^0.21.1" + "@eslint/config-helpers" "^0.4.1" + "@eslint/core" "^0.16.0" "@eslint/eslintrc" "^3.3.1" - "@eslint/js" "9.35.0" - "@eslint/plugin-kit" "^0.3.5" + "@eslint/js" "9.38.0" + "@eslint/plugin-kit" "^0.4.0" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" "@humanwhocodes/retry" "^0.4.2" "@types/estree" "^1.0.6" - "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.6" @@ -2343,7 +2346,7 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.16.0: +is-core-module@^2.16.1: version "2.16.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4" integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w== @@ -2960,11 +2963,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lilconfig@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4" - integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw== - lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" @@ -2978,25 +2976,22 @@ linkify-it@^5.0.0: uc.micro "^2.0.0" lint-staged@^16.1.4: - version "16.1.6" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-16.1.6.tgz#b0830df339a71f4207979a47c7be8ab0f38543ad" - integrity sha512-U4kuulU3CKIytlkLlaHcGgKscNfJPNTiDF2avIUGFCv7K95/DCYQ7Ra62ydeRWmgQGg9zJYw2dzdbztwJlqrow== - dependencies: - chalk "^5.6.0" - commander "^14.0.0" - debug "^4.4.1" - lilconfig "^3.1.3" - listr2 "^9.0.3" + version "16.2.6" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-16.2.6.tgz#760675e80f4b53337083d3f8bdecdd1f88079bf5" + integrity sha512-s1gphtDbV4bmW1eylXpVMk2u7is7YsrLl8hzrtvC70h4ByhcMLZFY01Fx05ZUDNuv1H8HO4E+e2zgejV1jVwNw== + dependencies: + commander "^14.0.1" + listr2 "^9.0.5" micromatch "^4.0.8" - nano-spawn "^1.0.2" + nano-spawn "^2.0.0" pidtree "^0.6.0" string-argv "^0.3.2" yaml "^2.8.1" -listr2@^9.0.3: - version "9.0.4" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-9.0.4.tgz#2916e633ae6e09d1a3f981172937ac1c5a8fa64f" - integrity sha512-1wd/kpAdKRLwv7/3OKC8zZ5U8e/fajCfWMxacUvB79S5nLrYGPtUI/8chMQhn3LQjsRVErTb9i1ECAwW0ZIHnQ== +listr2@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-9.0.5.tgz#92df7c4416a6da630eb9ef46da469b70de97b316" + integrity sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g== dependencies: cli-truncate "^5.0.0" colorette "^2.0.20" @@ -3006,9 +3001,9 @@ listr2@^9.0.3: wrap-ansi "^9.0.0" loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.1.tgz#6c76ed29b0ccce9af379208299f07f876de737e3" + integrity sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q== locate-path@^5.0.0: version "5.0.0" @@ -3167,7 +3162,7 @@ ms@^2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msw@^2.8.4: +msw@2.11.2: version "2.11.2" resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.2.tgz#622d83855f456a5f93b1528f6eb6f4c0114623c3" integrity sha512-MI54hLCsrMwiflkcqlgYYNJJddY5/+S0SnONvhv1owOplvqohKSQyGejpNdUGyCwgs4IH7PqaNbPw/sKOEze9Q== @@ -3197,10 +3192,10 @@ mute-stream@^2.0.0: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-2.0.0.tgz#a5446fc0c512b71c83c44d908d5c7b7b4c493b2b" integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA== -nano-spawn@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/nano-spawn/-/nano-spawn-1.0.3.tgz#ef8d89a275eebc8657e67b95fc312a6527a05b8d" - integrity sha512-jtpsQDetTnvS2Ts1fiRdci5rx0VYws5jGyC+4IYOTnIQ/wwdf6JdomlHBwqC3bJYOvaKu0C2GSZ1A60anrYpaA== +nano-spawn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/nano-spawn/-/nano-spawn-2.0.0.tgz#f1250434c09ae18870d4f729fc54b406cf85a3e1" + integrity sha512-tacvGzUY5o2D8CBh2rrwxyNojUsZNU2zjNTzKQrkgGJQTbGAfArVWXSKMBokBeeg6C7OLRGUEyoFlYbfeWQIqw== natural-compare@^1.4.0: version "1.4.0" @@ -3226,10 +3221,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.21: - version "2.0.21" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.21.tgz#f59b018bc0048044be2d4c4c04e4c8b18160894c" - integrity sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw== +node-releases@^2.0.26: + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== normalize-path@^3.0.0: version "3.0.0" @@ -3319,10 +3314,10 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-manager-detector@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-1.3.0.tgz#b42d641c448826e03c2b354272456a771ce453c0" - integrity sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ== +package-manager-detector@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/package-manager-detector/-/package-manager-detector-1.5.0.tgz#8dcf7b78554047ddf5da453e6ba07ebc915c507e" + integrity sha512-uBj69dVlYe/+wxj8JOpr97XfsxH/eumMt6HqjNTmJDf/6NO9s+0uxeOneIz3AsPt2m6y9PqzDzd3ATcU17MNfw== parent-module@^1.0.0: version "1.0.1" @@ -3412,10 +3407,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.4.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" - integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== +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== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" @@ -3447,12 +3442,12 @@ psl@^1.1.33: punycode "^2.3.1" publint@^0.3.12: - version "0.3.12" - resolved "https://registry.yarnpkg.com/publint/-/publint-0.3.12.tgz#c15154f9b67812c92d4bef7cf29d093a5d18ff39" - integrity sha512-1w3MMtL9iotBjm1mmXtG3Nk06wnq9UhGNRpQ2j6n1Zq7YAD6gnxMMZMIxlRPAydVjVbjSm+n0lhwqsD1m4LD5w== + version "0.3.15" + resolved "https://registry.yarnpkg.com/publint/-/publint-0.3.15.tgz#1f14793fb0cea14ad1dce2c524e9de6f6d64c311" + integrity sha512-xPbRAPW+vqdiaKy5sVVY0uFAu3LaviaPO3pZ9FaRx59l9+U/RKR1OEbLhkug87cwiVKxPXyB4txsv5cad67u+A== dependencies: "@publint/pack" "^0.1.2" - package-manager-detector "^1.1.0" + package-manager-detector "^1.3.0" picocolors "^1.1.1" sade "^1.8.1" @@ -3531,11 +3526,11 @@ resolve.exports@^2.0.0: integrity sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A== resolve@^1.20.0: - version "1.22.10" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39" - integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w== + version "1.22.11" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.11.tgz#aad857ce1ffb8bfa9b0b1ac29f1156383f68c262" + integrity sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ== dependencies: - is-core-module "^2.16.0" + is-core-module "^2.16.1" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -3593,10 +3588,10 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -schema-utils@^4.3.0, schema-utils@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.2.tgz#0c10878bf4a73fd2b1dfd14b9462b26788c806ae" - integrity sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ== +schema-utils@^4.3.0, schema-utils@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.3.tgz#5b1850912fa31df90716963d45d9121fdfc09f46" + integrity sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA== dependencies: "@types/json-schema" "^7.0.9" ajv "^8.9.0" @@ -3608,10 +3603,10 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.7.2: - version "7.7.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58" - integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== +semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.7.3: + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== serialize-javascript@^6.0.2: version "6.0.2" @@ -3807,10 +3802,10 @@ synckit@^0.11.7: dependencies: "@pkgr/core" "^0.2.9" -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.3.tgz#4b67b635b2d97578a06a2713d2f04800c237e99b" - integrity sha512-ZL6DDuAlRlLGghwcfmSn9sK3Hr6ArtyudlSAiCqQ6IfE+b+HHbydbYDIG15IfS5do+7XQQBdBiubF/cV2dnDzg== +tapable@^2.2.0, tapable@^2.3.0: + version "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.14" @@ -3842,17 +3837,17 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -tldts-core@^7.0.14: - version "7.0.14" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.14.tgz#eb49edf8a39a37a2372ffc22f82d6ac725ace6cd" - integrity sha512-viZGNK6+NdluOJWwTO9olaugx0bkKhscIdriQQ+lNNhwitIKvb+SvhbYgnCz6j9p7dX3cJntt4agQAKMXLjJ5g== +tldts-core@^7.0.17: + version "7.0.17" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.17.tgz#dadfee3750dd272ed219d7367beb7cbb2ff29eb8" + integrity sha512-DieYoGrP78PWKsrXr8MZwtQ7GLCUeLxihtjC1jZsW1DnvSMdKPitJSe8OSYDM2u5H6g3kWJZpePqkp43TfLh0g== tldts@^7.0.5: - version "7.0.14" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.14.tgz#5dc352e087c12978b7d1d36d8a346496e04dca72" - integrity sha512-lMNHE4aSI3LlkMUMicTmAG3tkkitjOQGDTFboPJwAg2kJXKP1ryWEyqujktg5qhrFZOkk5YFzgkxg3jErE+i5w== + version "7.0.17" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.17.tgz#a6cdc067b9e80ea05f3be471c0ea410688cc78b2" + integrity sha512-Y1KQBgDd/NUc+LfOtKS6mNsC9CCaH+m2P1RoIZy7RAPo3C3/t8X45+zgut31cRZtZ3xKPjfn3TkGTrctC2TQIQ== dependencies: - tldts-core "^7.0.14" + tldts-core "^7.0.17" tmpl@1.0.5: version "1.0.5" @@ -3896,9 +3891,9 @@ ts-api-utils@^2.1.0: integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ== ts-jest@^29.3.4: - version "29.4.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.1.tgz#42d33beb74657751d315efb9a871fe99e3b9b519" - integrity sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw== + version "29.4.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.5.tgz#a6b0dc401e521515d5342234be87f1ca96390a6f" + integrity sha512-HO3GyiWn2qvTQA4kTgjDcXiMwYQt68a1Y8+JuLRVpdIzm+UOLSHgl/XqR4c6nzJkq5rOkjc02O2I7P7l/Yof0Q== dependencies: bs-logger "^0.2.6" fast-json-stable-stringify "^2.1.0" @@ -3906,7 +3901,7 @@ ts-jest@^29.3.4: json5 "^2.2.3" lodash.memoize "^4.1.2" make-error "^1.3.6" - semver "^7.7.2" + semver "^7.7.3" type-fest "^4.41.0" yargs-parser "^21.1.1" @@ -3944,14 +3939,14 @@ type-fest@^4.26.1, type-fest@^4.41.0: integrity sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA== typedoc-plugin-missing-exports@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-4.1.0.tgz#e4c0697c7b44921366169fce219f858b2ebf79e6" - integrity sha512-p1M5jXnEbQ4qqy0erJz41BBZEDb8XDrbLjndlH4RhYEcymbdQr0xLF6yUw1GWBrhSIfkU98m3BELMAiQh+R1zA== + version "4.1.2" + resolved "https://registry.yarnpkg.com/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-4.1.2.tgz#a125a679782082caad123e8b086b4ac9b28d08da" + integrity sha512-WNoeWX9+8X3E3riuYPduilUTFefl1K+Z+5bmYqNeH5qcWjtnTRMbRzGdEQ4XXn1WEO4WCIlU0vf46Ca2y/mspg== typedoc@^0.28.7: - version "0.28.13" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.28.13.tgz#8f348898c33242be190e5d395d43758cf14c650c" - integrity sha512-dNWY8msnYB2a+7Audha+aTF1Pu3euiE7ySp53w8kEsXoYw7dMouV5A1UsTUY345aB152RHnmRMDiovuBi7BD+w== + version "0.28.14" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.28.14.tgz#f48d650efc983b5cb3034b3b0e986b1702074326" + integrity sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA== dependencies: "@gerrit0/mini-shiki" "^3.12.0" lunr "^2.3.9" @@ -3984,10 +3979,10 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~7.11.0: - version "7.11.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.11.0.tgz#075798115d0bbc4e4fc7c173f38727ca66bfb592" - integrity sha512-kt1ZriHTi7MU+Z/r9DOdAI3ONdaR3M3csEaRc6ewa4f4dTvX4cQCbJ4NkEn0ohE4hHtq85+PhPSTY+pO/1PwgA== +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== undici@^7.12.0: version "7.16.0" @@ -3999,10 +3994,10 @@ universalify@^0.2.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== -update-browserslist-db@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420" - integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw== +update-browserslist-db@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz#7802aa2ae91477f255b86e0e46dbc787a206ad4a" + integrity sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A== dependencies: escalade "^3.2.0" picocolors "^1.1.1" @@ -4055,7 +4050,7 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -watchpack@^2.4.1: +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== @@ -4074,9 +4069,9 @@ webpack-sources@^3.3.3: integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== webpack@^5.97.1: - version "5.101.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.101.3.tgz#3633b2375bb29ea4b06ffb1902734d977bc44346" - integrity sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A== + version "5.102.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.102.1.tgz#1003a3024741a96ba99c37431938bf61aad3d988" + integrity sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.8" @@ -4086,7 +4081,7 @@ webpack@^5.97.1: "@webassemblyjs/wasm-parser" "^1.14.1" acorn "^8.15.0" acorn-import-phases "^1.0.3" - browserslist "^4.24.0" + browserslist "^4.26.3" chrome-trace-event "^1.0.2" enhanced-resolve "^5.17.3" es-module-lexer "^1.2.1" @@ -4098,10 +4093,10 @@ webpack@^5.97.1: loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" - schema-utils "^4.3.2" - tapable "^2.1.1" + schema-utils "^4.3.3" + tapable "^2.3.0" terser-webpack-plugin "^5.3.11" - watchpack "^2.4.1" + watchpack "^2.4.4" webpack-sources "^3.3.3" whatwg-encoding@^2.0.0: