diff --git a/reference.md b/reference.md index 0b72536e9..331eda382 100644 --- a/reference.md +++ b/reference.md @@ -783,6 +783,70 @@ await client.clientGrants.create({ +
client.clientGrants.get(id) -> Management.GetClientGrantResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve a single client grant, including the +scopes associated with the application/API pair. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.clientGrants.get("id"); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `string` β€” The ID of the client grant to retrieve. + +
+
+ +
+
+ +**requestOptions:** `ClientGrantsClient.RequestOptions` + +
+
+
+
+ +
+
+
+
client.clientGrants.delete(id) -> void
@@ -2020,7 +2084,9 @@ const response = page.response;
-Creates a new connection according to the JSON object received in body.
+Creates a new connection according to the JSON object received in body. + +Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.
@@ -2162,6 +2228,8 @@ await client.connections.get("id", { Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. +Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name. +
@@ -2971,6 +3039,7 @@ When refresh token rotation is enabled, the endpoint becomes consistent. For mor ```typescript await client.deviceCredentials.createPublicKey({ device_name: "device_name", + type: "public_key", value: "value", device_id: "device_id", }); @@ -9448,6 +9517,7 @@ await client.tokenExchangeProfiles.create({ name: "name", subject_token_type: "subject_token_type", action_id: "action_id", + type: "custom_authentication", }); ``` @@ -11399,9 +11469,9 @@ await client.actions.executions.get("id");
-## Actions Triggers +## Actions Modules -
client.actions.triggers.list() -> Management.ListActionTriggersResponseContent +
client.actions.modules.list({ ...params }) -> core.Page
@@ -11413,7 +11483,7 @@ await client.actions.executions.get("id");
-Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound. +Retrieve a paginated list of all Actions Modules with optional filtering and totals.
@@ -11429,7 +11499,25 @@ Retrieve the set of triggers currently available within actions. A trigger is an
```typescript -await client.actions.triggers.list(); +const pageableResponse = await client.actions.modules.list({ + 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.modules.list({ + page: 1, + per_page: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; ```
@@ -11445,7 +11533,15 @@ await client.actions.triggers.list();
-**requestOptions:** `TriggersClient.RequestOptions` +**request:** `Management.GetActionModulesRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11456,9 +11552,7 @@ await client.actions.triggers.list();
-## Actions Triggers Bindings - -
client.actions.triggers.bindings.list(triggerId, { ...params }) -> core.Page +
client.actions.modules.create({ ...params }) -> Management.CreateActionModuleResponseContent
@@ -11470,7 +11564,7 @@ await client.actions.triggers.list();
-Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. +Create a new Actions Module for reusable code across actions.
@@ -11486,25 +11580,10 @@ Retrieve the actions that are bound to a trigger. Once an action is created and
```typescript -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", { - page: 1, - per_page: 1, +await client.actions.modules.create({ + name: "name", + code: "code", }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; ```
@@ -11520,15 +11599,7 @@ const response = page.response;
-**triggerId:** `Management.ActionTriggerTypeEnum` β€” An actions extensibility point. - -
-
- -
-
- -**request:** `Management.ListActionTriggerBindingsRequestParameters` +**request:** `Management.CreateActionModuleRequestContent`
@@ -11536,7 +11607,7 @@ const response = page.response;
-**requestOptions:** `BindingsClient.RequestOptions` +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11547,7 +11618,7 @@ const response = page.response;
-
client.actions.triggers.bindings.updateMany(triggerId, { ...params }) -> Management.UpdateActionBindingsResponseContent +
client.actions.modules.get(id) -> Management.GetActionModuleResponseContent
@@ -11559,7 +11630,7 @@ const response = page.response;
-Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. +Retrieve details of a specific Actions Module by its unique identifier.
@@ -11575,7 +11646,7 @@ Update the actions that are bound (i.e. attached) to a trigger. Once an action i
```typescript -await client.actions.triggers.bindings.updateMany("triggerId"); +await client.actions.modules.get("id"); ```
@@ -11591,15 +11662,7 @@ await client.actions.triggers.bindings.updateMany("triggerId");
-**triggerId:** `Management.ActionTriggerTypeEnum` β€” An actions extensibility point. - -
-
- -
-
- -**request:** `Management.UpdateActionBindingsRequestContent` +**id:** `string` β€” The ID of the action module to retrieve.
@@ -11607,7 +11670,7 @@ await client.actions.triggers.bindings.updateMany("triggerId");
-**requestOptions:** `BindingsClient.RequestOptions` +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11618,9 +11681,7 @@ await client.actions.triggers.bindings.updateMany("triggerId");
-## Anomaly Blocks - -
client.anomaly.blocks.checkIp(id) -> void +
client.actions.modules.delete(id) -> void
@@ -11632,7 +11693,7 @@ await client.actions.triggers.bindings.updateMany("triggerId");
-Check if the given IP address is blocked via the Suspicious IP Throttling due to multiple suspicious attempts. +Permanently delete an Actions Module. This will fail if the module is still in use by any actions.
@@ -11648,7 +11709,7 @@ Check if the given IP address is blocked via the @@ -11664,7 +11725,7 @@ await client.anomaly.blocks.checkIp("id");
-**id:** `Management.AnomalyIpFormat` β€” IP address to check. +**id:** `string` β€” The ID of the Actions Module to delete.
@@ -11672,7 +11733,7 @@ await client.anomaly.blocks.checkIp("id");
-**requestOptions:** `BlocksClient.RequestOptions` +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11683,7 +11744,7 @@ await client.anomaly.blocks.checkIp("id");
-
client.anomaly.blocks.unblockIp(id) -> void +
client.actions.modules.update(id, { ...params }) -> Management.UpdateActionModuleResponseContent
@@ -11695,7 +11756,7 @@ await client.anomaly.blocks.checkIp("id");
-Remove a block imposed by Suspicious IP Throttling for the given IP address. +Update properties of an existing Actions Module, such as code, dependencies, or secrets.
@@ -11711,7 +11772,7 @@ Remove a block imposed by @@ -11727,7 +11788,7 @@ await client.anomaly.blocks.unblockIp("id");
-**id:** `Management.AnomalyIpFormat` β€” IP address to unblock. +**id:** `string` β€” The ID of the action module to update.
@@ -11735,7 +11796,15 @@ await client.anomaly.blocks.unblockIp("id");
-**requestOptions:** `BlocksClient.RequestOptions` +**request:** `Management.UpdateActionModuleRequestContent` + +
+
+ +
+
+ +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11746,9 +11815,7 @@ await client.anomaly.blocks.unblockIp("id");
-## AttackProtection BotDetection - -
client.attackProtection.botDetection.get() -> Management.GetBotDetectionSettingsResponseContent +
client.actions.modules.listActions(id, { ...params }) -> core.Page
@@ -11760,7 +11827,7 @@ await client.anomaly.blocks.unblockIp("id");
-Get the Bot Detection configuration of your tenant. +Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module.
@@ -11776,7 +11843,25 @@ Get the Bot Detection configuration of your tenant.
```typescript -await client.attackProtection.botDetection.get(); +const pageableResponse = await client.actions.modules.listActions("id", { + 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.modules.listActions("id", { + page: 1, + per_page: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; ```
@@ -11792,7 +11877,23 @@ await client.attackProtection.botDetection.get();
-**requestOptions:** `BotDetectionClient.RequestOptions` +**id:** `string` β€” The unique ID of the module. + +
+
+ +
+
+ +**request:** `Management.GetActionModuleActionsRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11803,7 +11904,7 @@ await client.attackProtection.botDetection.get();
-
client.attackProtection.botDetection.update({ ...params }) -> Management.UpdateBotDetectionSettingsResponseContent +
client.actions.modules.rollback(id, { ...params }) -> Management.RollbackActionModuleResponseContent
@@ -11815,7 +11916,7 @@ await client.attackProtection.botDetection.get();
-Update the Bot Detection configuration of your tenant. +Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft.
@@ -11831,7 +11932,9 @@ Update the Bot Detection configuration of your tenant.
```typescript -await client.attackProtection.botDetection.update(); +await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", +}); ```
@@ -11847,7 +11950,7 @@ await client.attackProtection.botDetection.update();
-**request:** `Management.UpdateBotDetectionSettingsRequestContent` +**id:** `string` β€” The unique ID of the module to roll back.
@@ -11855,7 +11958,15 @@ await client.attackProtection.botDetection.update();
-**requestOptions:** `BotDetectionClient.RequestOptions` +**request:** `Management.RollbackActionModuleRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `ModulesClient.RequestOptions`
@@ -11866,9 +11977,9 @@ await client.attackProtection.botDetection.update();
-## AttackProtection BreachedPasswordDetection +## Actions Triggers -
client.attackProtection.breachedPasswordDetection.get() -> Management.GetBreachedPasswordDetectionSettingsResponseContent +
client.actions.triggers.list() -> Management.ListActionTriggersResponseContent
@@ -11880,7 +11991,7 @@ await client.attackProtection.botDetection.update();
-Retrieve details of the Breached Password Detection configuration of your tenant. +Retrieve the set of triggers currently available within actions. A trigger is an extensibility point to which actions can be bound.
@@ -11896,7 +12007,7 @@ Retrieve details of the Breached Password Detection configuration of your tenant
```typescript -await client.attackProtection.breachedPasswordDetection.get(); +await client.actions.triggers.list(); ```
@@ -11912,7 +12023,7 @@ await client.attackProtection.breachedPasswordDetection.get();
-**requestOptions:** `BreachedPasswordDetectionClient.RequestOptions` +**requestOptions:** `TriggersClient.RequestOptions`
@@ -11923,7 +12034,9 @@ await client.attackProtection.breachedPasswordDetection.get();
-
client.attackProtection.breachedPasswordDetection.update({ ...params }) -> Management.UpdateBreachedPasswordDetectionSettingsResponseContent +## Actions Modules Versions + +
client.actions.modules.versions.list(id) -> Management.GetActionModuleVersionsResponseContent
@@ -11935,7 +12048,7 @@ await client.attackProtection.breachedPasswordDetection.get();
-Update details of the Breached Password Detection configuration of your tenant. +List all published versions of a specific Actions Module.
@@ -11951,7 +12064,7 @@ Update details of the Breached Password Detection configuration of your tenant.
```typescript -await client.attackProtection.breachedPasswordDetection.update(); +await client.actions.modules.versions.list("id"); ```
@@ -11967,7 +12080,7 @@ await client.attackProtection.breachedPasswordDetection.update();
-**request:** `Management.UpdateBreachedPasswordDetectionSettingsRequestContent` +**id:** `string` β€” The unique ID of the module.
@@ -11975,7 +12088,7 @@ await client.attackProtection.breachedPasswordDetection.update();
-**requestOptions:** `BreachedPasswordDetectionClient.RequestOptions` +**requestOptions:** `VersionsClient.RequestOptions`
@@ -11986,9 +12099,7 @@ await client.attackProtection.breachedPasswordDetection.update();
-## AttackProtection BruteForceProtection - -
client.attackProtection.bruteForceProtection.get() -> Management.GetBruteForceSettingsResponseContent +
client.actions.modules.versions.create(id) -> Management.CreateActionModuleVersionResponseContent
@@ -12000,7 +12111,7 @@ await client.attackProtection.breachedPasswordDetection.update();
-Retrieve details of the Brute-force Protection configuration of your tenant. +Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development.
@@ -12016,7 +12127,7 @@ Retrieve details of the Brute-force Protection configuration of your tenant.
```typescript -await client.attackProtection.bruteForceProtection.get(); +await client.actions.modules.versions.create("id"); ```
@@ -12032,7 +12143,15 @@ await client.attackProtection.bruteForceProtection.get();
-**requestOptions:** `BruteForceProtectionClient.RequestOptions` +**id:** `string` β€” The ID of the action module to create a version for. + +
+
+ +
+
+ +**requestOptions:** `VersionsClient.RequestOptions`
@@ -12043,7 +12162,7 @@ await client.attackProtection.bruteForceProtection.get();
-
client.attackProtection.bruteForceProtection.update({ ...params }) -> Management.UpdateBruteForceSettingsResponseContent +
client.actions.modules.versions.get(id, versionId) -> Management.GetActionModuleVersionResponseContent
@@ -12055,7 +12174,7 @@ await client.attackProtection.bruteForceProtection.get();
-Update the Brute-force Protection configuration of your tenant. +Retrieve the details of a specific, immutable version of an Actions Module.
@@ -12071,7 +12190,7 @@ Update the Brute-force Protection configuration of your tenant.
```typescript -await client.attackProtection.bruteForceProtection.update(); +await client.actions.modules.versions.get("id", "versionId"); ```
@@ -12087,7 +12206,7 @@ await client.attackProtection.bruteForceProtection.update();
-**request:** `Management.UpdateBruteForceSettingsRequestContent` +**id:** `string` β€” The unique ID of the module.
@@ -12095,7 +12214,15 @@ await client.attackProtection.bruteForceProtection.update();
-**requestOptions:** `BruteForceProtectionClient.RequestOptions` +**versionId:** `string` β€” The unique ID of the module version to retrieve. + +
+
+ +
+
+ +**requestOptions:** `VersionsClient.RequestOptions`
@@ -12106,9 +12233,9 @@ await client.attackProtection.bruteForceProtection.update();
-## AttackProtection Captcha +## Actions Triggers Bindings -
client.attackProtection.captcha.get() -> Management.GetAttackProtectionCaptchaResponseContent +
client.actions.triggers.bindings.list(triggerId, { ...params }) -> core.Page
@@ -12120,7 +12247,657 @@ await client.attackProtection.bruteForceProtection.update();
-Get the CAPTCHA configuration for your client. +Retrieve the actions that are bound to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The list of actions returned reflects the order in which they will be executed during the appropriate flow. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +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", { + page: 1, + per_page: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**triggerId:** `Management.ActionTriggerTypeEnum` β€” An actions extensibility point. + +
+
+ +
+
+ +**request:** `Management.ListActionTriggerBindingsRequestParameters` + +
+
+ +
+
+ +**requestOptions:** `BindingsClient.RequestOptions` + +
+
+
+
+ + + +
+ +
client.actions.triggers.bindings.updateMany(triggerId, { ...params }) -> Management.UpdateActionBindingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update the actions that are bound (i.e. attached) to a trigger. Once an action is created and deployed, it must be attached (i.e. bound) to a trigger so that it will be executed as part of a flow. The order in which the actions are provided will determine the order in which they are executed. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.actions.triggers.bindings.updateMany("triggerId"); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**triggerId:** `Management.ActionTriggerTypeEnum` β€” An actions extensibility point. + +
+
+ +
+
+ +**request:** `Management.UpdateActionBindingsRequestContent` + +
+
+ +
+
+ +**requestOptions:** `BindingsClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Anomaly Blocks + +
client.anomaly.blocks.checkIp(id) -> void +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Check if the given IP address is blocked via the Suspicious IP Throttling due to multiple suspicious attempts. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.anomaly.blocks.checkIp("id"); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `Management.AnomalyIpFormat` β€” IP address to check. + +
+
+ +
+
+ +**requestOptions:** `BlocksClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.anomaly.blocks.unblockIp(id) -> void +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Remove a block imposed by Suspicious IP Throttling for the given IP address. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.anomaly.blocks.unblockIp("id"); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `Management.AnomalyIpFormat` β€” IP address to unblock. + +
+
+ +
+
+ +**requestOptions:** `BlocksClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AttackProtection BotDetection + +
client.attackProtection.botDetection.get() -> Management.GetBotDetectionSettingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get the Bot Detection configuration of your tenant. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.botDetection.get(); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**requestOptions:** `BotDetectionClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.attackProtection.botDetection.update({ ...params }) -> Management.UpdateBotDetectionSettingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update the Bot Detection configuration of your tenant. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.botDetection.update(); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**request:** `Management.UpdateBotDetectionSettingsRequestContent` + +
+
+ +
+
+ +**requestOptions:** `BotDetectionClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AttackProtection BreachedPasswordDetection + +
client.attackProtection.breachedPasswordDetection.get() -> Management.GetBreachedPasswordDetectionSettingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve details of the Breached Password Detection configuration of your tenant. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.breachedPasswordDetection.get(); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**requestOptions:** `BreachedPasswordDetectionClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.attackProtection.breachedPasswordDetection.update({ ...params }) -> Management.UpdateBreachedPasswordDetectionSettingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update details of the Breached Password Detection configuration of your tenant. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.breachedPasswordDetection.update(); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**request:** `Management.UpdateBreachedPasswordDetectionSettingsRequestContent` + +
+
+ +
+
+ +**requestOptions:** `BreachedPasswordDetectionClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AttackProtection BruteForceProtection + +
client.attackProtection.bruteForceProtection.get() -> Management.GetBruteForceSettingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve details of the Brute-force Protection configuration of your tenant. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.bruteForceProtection.get(); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**requestOptions:** `BruteForceProtectionClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.attackProtection.bruteForceProtection.update({ ...params }) -> Management.UpdateBruteForceSettingsResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Update the Brute-force Protection configuration of your tenant. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.attackProtection.bruteForceProtection.update(); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**request:** `Management.UpdateBruteForceSettingsRequestContent` + +
+
+ +
+
+ +**requestOptions:** `BruteForceProtectionClient.RequestOptions` + +
+
+
+
+ +
+
+
+ +## AttackProtection Captcha + +
client.attackProtection.captcha.get() -> Management.GetAttackProtectionCaptchaResponseContent +
+
+ +#### πŸ“ Description + +
+
+ +
+
+ +Get the CAPTCHA configuration for your client.
@@ -14307,9 +15084,9 @@ const response = page.response;
-## Connections Clients +## Connections DirectoryProvisioning -
client.connections.clients.get(id, { ...params }) -> core.Page +
client.connections.directoryProvisioning.list({ ...params }) -> core.Page
@@ -14321,9 +15098,7 @@ const response = page.response;
-Retrieve all clients that have the specified connection enabled. - -Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining. +Retrieve a list of directory provisioning configurations of a tenant.
@@ -14339,18 +15114,18 @@ Retrieve all clients that have the specified
-**id:** `string` β€” The id of the connection for which enabled clients are to be retrieved +**request:** `Management.ListDirectoryProvisioningsRequestParameters`
@@ -14381,15 +15156,70 @@ const response = page.response;
-**request:** `Management.GetConnectionEnabledClientsRequestParameters` +**requestOptions:** `DirectoryProvisioningClient.RequestOptions` + +
+
+ + +
+
client.connections.directoryProvisioning.get(id) -> Management.GetDirectoryProvisioningResponseContent
-**requestOptions:** `ClientsClient.RequestOptions` +#### πŸ“ Description + +
+
+ +
+
+ +Retrieve the directory provisioning configuration of a connection. + +
+
+
+
+ +#### πŸ”Œ Usage + +
+
+ +
+
+ +```typescript +await client.connections.directoryProvisioning.get("id"); +``` + +
+
+
+
+ +#### βš™οΈ Parameters + +
+
+ +
+
+ +**id:** `string` β€” The id of the connection to retrieve its directory provisioning configuration + +
+
+ +
+
+ +**requestOptions:** `DirectoryProvisioningClient.RequestOptions`
@@ -14400,10 +15230,25 @@ const response = page.response;
-
client.connections.clients.update(id, { ...params }) -> void +
client.connections.directoryProvisioning.create(id, { ...params }) -> Management.CreateDirectoryProvisioningResponseContent +
+
+ +#### πŸ“ Description + +
+
+
+Create a directory provisioning configuration for a connection. + +
+
+
+
+ #### πŸ”Œ Usage
@@ -14413,12 +15258,7 @@ const response = page.response;
```typescript -await client.connections.clients.update("id", [ - { - client_id: "client_id", - status: true, - }, -]); +await client.connections.directoryProvisioning.create("id"); ```
@@ -14434,7 +15274,7 @@ await client.connections.clients.update("id", [
-**id:** `string` β€” The id of the connection to modify +**id:** `string` β€” The id of the connection to create its directory provisioning configuration
@@ -14442,7 +15282,7 @@ await client.connections.clients.update("id", [
-**request:** `Management.UpdateEnabledClientConnectionsRequestContent` +**request:** `Management.CreateDirectoryProvisioningRequestContent | null`
@@ -14450,7 +15290,7 @@ await client.connections.clients.update("id", [
-**requestOptions:** `ClientsClient.RequestOptions` +**requestOptions:** `DirectoryProvisioningClient.RequestOptions`
@@ -14461,9 +15301,7 @@ await client.connections.clients.update("id", [
-## Connections DirectoryProvisioning - -
client.connections.directoryProvisioning.get(id) -> Management.GetDirectoryProvisioningResponseContent +
client.connections.directoryProvisioning.delete(id) -> void
@@ -14475,7 +15313,7 @@ await client.connections.clients.update("id", [
-Retrieve the directory provisioning configuration of a connection. +Delete the directory provisioning configuration of a connection.
@@ -14491,7 +15329,7 @@ Retrieve the directory provisioning configuration of a connection.
```typescript -await client.connections.directoryProvisioning.get("id"); +await client.connections.directoryProvisioning.delete("id"); ```
@@ -14507,7 +15345,7 @@ await client.connections.directoryProvisioning.get("id");
-**id:** `string` β€” The id of the connection to retrieve its directory provisioning configuration +**id:** `string` β€” The id of the connection to delete its directory provisioning configuration
@@ -14526,7 +15364,7 @@ await client.connections.directoryProvisioning.get("id");
-
client.connections.directoryProvisioning.create(id, { ...params }) -> Management.CreateDirectoryProvisioningResponseContent +
client.connections.directoryProvisioning.update(id, { ...params }) -> Management.UpdateDirectoryProvisioningResponseContent
@@ -14538,7 +15376,7 @@ await client.connections.directoryProvisioning.get("id");
-Create a directory provisioning configuration for a connection. +Update the directory provisioning configuration of a connection.
@@ -14554,7 +15392,7 @@ Create a directory provisioning configuration for a connection.
```typescript -await client.connections.directoryProvisioning.create("id"); +await client.connections.directoryProvisioning.update("id"); ```
@@ -14578,7 +15416,7 @@ await client.connections.directoryProvisioning.create("id");
-**request:** `Management.CreateDirectoryProvisioningRequestContent | null` +**request:** `Management.UpdateDirectoryProvisioningRequestContent | null`
@@ -14597,7 +15435,7 @@ await client.connections.directoryProvisioning.create("id");
-
client.connections.directoryProvisioning.delete(id) -> void +
client.connections.directoryProvisioning.getDefaultMapping(id) -> Management.GetDirectoryProvisioningDefaultMappingResponseContent
@@ -14609,7 +15447,7 @@ await client.connections.directoryProvisioning.create("id");
-Delete the directory provisioning configuration of a connection. +Retrieve the directory provisioning default attribute mapping of a connection.
@@ -14625,7 +15463,7 @@ Delete the directory provisioning configuration of a connection.
```typescript -await client.connections.directoryProvisioning.delete("id"); +await client.connections.directoryProvisioning.getDefaultMapping("id"); ```
@@ -14641,7 +15479,7 @@ await client.connections.directoryProvisioning.delete("id");
-**id:** `string` β€” The id of the connection to delete its directory provisioning configuration +**id:** `string` β€” The id of the connection to retrieve its directory provisioning configuration
@@ -14660,7 +15498,9 @@ await client.connections.directoryProvisioning.delete("id");
-
client.connections.directoryProvisioning.update(id, { ...params }) -> Management.UpdateDirectoryProvisioningResponseContent +## Connections Clients + +
client.connections.clients.get(id, { ...params }) -> core.Page
@@ -14672,7 +15512,9 @@ await client.connections.directoryProvisioning.delete("id");
-Update the directory provisioning configuration of a connection. +Retrieve all clients that have the specified connection enabled. + +Note: The first time you call this endpoint, omit the from parameter. If there are more results, a next value is included in the response. You can use this for subsequent API calls. When next is no longer included in the response, no further results are remaining.
@@ -14688,7 +15530,25 @@ Update the directory provisioning configuration of a connection.
```typescript -await client.connections.directoryProvisioning.update("id"); +const pageableResponse = await client.connections.clients.get("id", { + take: 1, + from: "from", +}); +for await (const item of pageableResponse) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.connections.clients.get("id", { + take: 1, + from: "from", +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; ```
@@ -14704,7 +15564,7 @@ await client.connections.directoryProvisioning.update("id");
-**id:** `string` β€” The id of the connection to create its directory provisioning configuration +**id:** `string` β€” The id of the connection for which enabled clients are to be retrieved
@@ -14712,7 +15572,7 @@ await client.connections.directoryProvisioning.update("id");
-**request:** `Management.UpdateDirectoryProvisioningRequestContent | null` +**request:** `Management.GetConnectionEnabledClientsRequestParameters`
@@ -14720,7 +15580,7 @@ await client.connections.directoryProvisioning.update("id");
-**requestOptions:** `DirectoryProvisioningClient.RequestOptions` +**requestOptions:** `ClientsClient.RequestOptions`
@@ -14731,11 +15591,11 @@ await client.connections.directoryProvisioning.update("id");
-
client.connections.directoryProvisioning.getDefaultMapping(id) -> Management.GetDirectoryProvisioningDefaultMappingResponseContent +
client.connections.clients.update(id, { ...params }) -> void
-#### πŸ“ Description +#### πŸ”Œ Usage
@@ -14743,14 +15603,21 @@ await client.connections.directoryProvisioning.update("id");
-Retrieve the directory provisioning default attribute mapping of a connection. +```typescript +await client.connections.clients.update("id", [ + { + client_id: "client_id", + status: true, + }, +]); +```
-#### πŸ”Œ Usage +#### βš™οΈ Parameters
@@ -14758,24 +15625,15 @@ Retrieve the directory provisioning default attribute mapping of a connection.
-```typescript -await client.connections.directoryProvisioning.getDefaultMapping("id"); -``` +**id:** `string` β€” The id of the connection to modify
-
-
- -#### βš™οΈ Parameters
-
-
- -**id:** `string` β€” The id of the connection to retrieve its directory provisioning configuration +**request:** `Management.UpdateEnabledClientConnectionsRequestContent`
@@ -14783,7 +15641,7 @@ await client.connections.directoryProvisioning.getDefaultMapping("id");
-**requestOptions:** `DirectoryProvisioningClient.RequestOptions` +**requestOptions:** `ClientsClient.RequestOptions`
@@ -20692,7 +21550,7 @@ const response = page.response;
-Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). +Create a new discovery domain for an organization.
diff --git a/src/management/api/errors/PreconditionFailedError.ts b/src/management/api/errors/PreconditionFailedError.ts new file mode 100644 index 000000000..da589c834 --- /dev/null +++ b/src/management/api/errors/PreconditionFailedError.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as core from "../../core/index.js"; +import * as errors from "../../errors/index.js"; + +export class PreconditionFailedError extends errors.ManagementError { + constructor(body?: unknown, rawResponse?: core.RawResponse) { + super({ + message: "PreconditionFailedError", + statusCode: 412, + body: body, + rawResponse: rawResponse, + }); + Object.setPrototypeOf(this, new.target.prototype); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = this.constructor.name; + } +} diff --git a/src/management/api/errors/index.ts b/src/management/api/errors/index.ts index c9361996f..fdd99fc8e 100644 --- a/src/management/api/errors/index.ts +++ b/src/management/api/errors/index.ts @@ -5,6 +5,7 @@ export * from "./ForbiddenError.js"; export * from "./InternalServerError.js"; export * from "./NotFoundError.js"; export * from "./PaymentRequiredError.js"; +export * from "./PreconditionFailedError.js"; export * from "./ServiceUnavailableError.js"; export * from "./TooManyRequestsError.js"; export * from "./UnauthorizedError.js"; diff --git a/src/management/api/requests/requests.ts b/src/management/api/requests/requests.ts index 7d269b1bb..27dd17dd6 100644 --- a/src/management/api/requests/requests.ts +++ b/src/management/api/requests/requests.ts @@ -137,7 +137,7 @@ export interface ListClientGrantsRequestParameters { 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. */ + /** The type of application access the client grant allows. */ subject_type?: Management.ClientGrantSubjectTypeEnum | null; } @@ -159,8 +159,10 @@ export interface CreateClientGrantRequestContent { /** 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. */ + /** Types of authorization_details allowed for this client grant. */ authorization_details_types?: string[]; + /** If enabled, all scopes configured on the resource server are allowed for this grant. */ + allow_all_scopes?: boolean; } /** @@ -173,8 +175,10 @@ export interface UpdateClientGrantRequestContent { 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. */ + /** Types of authorization_details allowed for this client grant. */ authorization_details_types?: string[]; + /** If enabled, all scopes configured on the resource server are allowed for this grant. */ + allow_all_scopes?: boolean | null; } /** @@ -569,6 +573,8 @@ export interface CreateCustomDomainRequestContent { tls_policy?: Management.CustomDomainTlsPolicyEnum; custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined; domain_metadata?: Management.DomainMetadata; + /** Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not provided, the full domain will be used. */ + relying_party_identifier?: string; } /** @@ -579,6 +585,8 @@ export interface UpdateCustomDomainRequestContent { tls_policy?: Management.CustomDomainTlsPolicyEnum; custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined; domain_metadata?: Management.DomainMetadata; + /** Relying Party ID (rpId) to be used for Passkeys on this custom domain. Set to null to remove the rpId and fall back to using the full domain. */ + relying_party_identifier?: string | null; } /** @@ -617,6 +625,7 @@ export interface ListDeviceCredentialsRequestParameters { * @example * { * device_name: "device_name", + * type: "public_key", * value: "value", * device_id: "device_id" * } @@ -624,6 +633,7 @@ export interface ListDeviceCredentialsRequestParameters { export interface CreatePublicKeyDeviceCredentialRequestContent { /** Name for this device easily recognized by owner. */ device_name: string; + type: Management.DeviceCredentialPublicKeyTypeEnum; /** Base64 encoded string containing the credential. */ value: string; /** Unique identifier for the device. Recommend using Android_ID on Android and identifierForVendor. */ @@ -763,7 +773,7 @@ export interface FlowsListRequest { /** 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)[]; + hydrate?: (Management.FlowsListRequestHydrateItem | null) | (Management.FlowsListRequestHydrateItem | null)[]; /** flag to filter by sync/async flows */ synchronous?: boolean | null; } @@ -1237,7 +1247,7 @@ export interface CreateResourceServerRequestContent { /** 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; + consent_policy?: Management.ResourceServerConsentPolicyEnum | null; authorization_details?: unknown[]; proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; @@ -1276,7 +1286,7 @@ export interface UpdateResourceServerRequestContent { /** Whether authorization policies are enforced (true) or not enforced (false). */ enforce_policies?: boolean; token_encryption?: Management.ResourceServerTokenEncryption | null; - consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + consent_policy?: Management.ResourceServerConsentPolicyEnum | null; authorization_details?: unknown[]; proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; @@ -1563,7 +1573,8 @@ export interface TokenExchangeProfilesListRequest { * { * name: "name", * subject_token_type: "subject_token_type", - * action_id: "action_id" + * action_id: "action_id", + * type: "custom_authentication" * } */ export interface CreateTokenExchangeProfileRequestContent { @@ -1573,6 +1584,7 @@ export interface CreateTokenExchangeProfileRequestContent { 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; + type: Management.TokenExchangeProfileTypeEnum; } /** @@ -1850,6 +1862,80 @@ export interface ListActionVersionsRequestParameters { per_page?: number | null; } +/** + * @example + * { + * page: 1, + * per_page: 1 + * } + */ +export interface GetActionModulesRequestParameters { + /** 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; +} + +/** + * @example + * { + * name: "name", + * code: "code" + * } + */ +export interface CreateActionModuleRequestContent { + /** The name of the action module. */ + name: string; + /** The source code of the action module. */ + code: string; + /** The secrets to associate with the action module. */ + secrets?: Management.ActionModuleSecretRequest[]; + /** The npm dependencies of the action module. */ + dependencies?: Management.ActionModuleDependencyRequest[]; + /** The API version of the module. */ + api_version?: string; + /** Whether to publish the module immediately after creation. */ + publish?: boolean; +} + +/** + * @example + * {} + */ +export interface UpdateActionModuleRequestContent { + /** The source code of the action module. */ + code?: string; + /** The secrets to associate with the action module. */ + secrets?: Management.ActionModuleSecretRequest[]; + /** The npm dependencies of the action module. */ + dependencies?: Management.ActionModuleDependencyRequest[]; +} + +/** + * @example + * { + * page: 1, + * per_page: 1 + * } + */ +export interface GetActionModuleActionsRequestParameters { + /** Page index of the results to return. First page is 0. */ + page?: number | null; + /** Number of results per page. */ + per_page?: number | null; +} + +/** + * @example + * { + * module_version_id: "module_version_id" + * } + */ +export interface RollbackActionModuleRequestParameters { + /** The unique ID of the module version to roll back to. */ + module_version_id: string; +} + /** * @example * { @@ -2315,6 +2401,20 @@ export interface ConnectionsGetRequest { include_fields?: boolean | null; } +/** + * @example + * { + * from: "from", + * take: 1 + * } + */ +export interface ListDirectoryProvisioningsRequestParameters { + /** Optional Id from which to start selection. */ + from?: string | null; + /** Number of results per page. Defaults to 50. */ + take?: number | null; +} + /** * @example * { @@ -2473,7 +2573,9 @@ export interface ExecutionsListRequest { */ export interface ExecutionsGetRequest { /** Hydration param */ - hydrate?: ("debug" | null) | ("debug" | null)[]; + hydrate?: + | (Management.flows.ExecutionsGetRequestHydrateItem | null) + | (Management.flows.ExecutionsGetRequestHydrateItem | null)[]; } /** @@ -2909,7 +3011,7 @@ export interface CreateOrganizationDiscoveryDomainRequestContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status?: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this discovery domain should be used for organization discovery. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; } @@ -2919,7 +3021,7 @@ export interface CreateOrganizationDiscoveryDomainRequestContent { */ export interface UpdateOrganizationDiscoveryDomainRequestContent { status?: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this discovery domain should be used for organization discovery. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; } diff --git a/src/management/api/resources/actions/client/Client.ts b/src/management/api/resources/actions/client/Client.ts index fa09980b7..fbc1ebf9e 100644 --- a/src/management/api/resources/actions/client/Client.ts +++ b/src/management/api/resources/actions/client/Client.ts @@ -9,6 +9,7 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode import * as errors from "../../../../errors/index.js"; import * as Management from "../../../index.js"; import { ExecutionsClient } from "../resources/executions/client/Client.js"; +import { ModulesClient } from "../resources/modules/client/Client.js"; import { TriggersClient } from "../resources/triggers/client/Client.js"; import { VersionsClient } from "../resources/versions/client/Client.js"; @@ -22,6 +23,7 @@ export class ActionsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _versions: VersionsClient | undefined; protected _executions: ExecutionsClient | undefined; + protected _modules: ModulesClient | undefined; protected _triggers: TriggersClient | undefined; constructor(options: ActionsClient.Options) { @@ -36,6 +38,10 @@ export class ActionsClient { return (this._executions ??= new ExecutionsClient(this._options)); } + public get modules(): ModulesClient { + return (this._modules ??= new ModulesClient(this._options)); + } + public get triggers(): TriggersClient { return (this._triggers ??= new TriggersClient(this._options)); } diff --git a/src/management/api/resources/actions/resources/index.ts b/src/management/api/resources/actions/resources/index.ts index 60054fdef..5fbbef59a 100644 --- a/src/management/api/resources/actions/resources/index.ts +++ b/src/management/api/resources/actions/resources/index.ts @@ -1,3 +1,4 @@ export * as executions from "./executions/index.js"; +export * as modules from "./modules/index.js"; export * as triggers from "./triggers/index.js"; export * as versions from "./versions/index.js"; diff --git a/src/management/api/resources/actions/resources/modules/client/Client.ts b/src/management/api/resources/actions/resources/modules/client/Client.ts new file mode 100644 index 000000000..a036ba070 --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/client/Client.ts @@ -0,0 +1,676 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; +import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js"; +import * as core from "../../../../../../core/index.js"; +import { mergeHeaders } from "../../../../../../core/headers.js"; +import * as environments from "../../../../../../environments.js"; +import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.js"; +import * as errors from "../../../../../../errors/index.js"; +import * as Management from "../../../../../index.js"; +import { VersionsClient } from "../resources/versions/client/Client.js"; + +export declare namespace ModulesClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class ModulesClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + protected _versions: VersionsClient | undefined; + + constructor(options: ModulesClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + public get versions(): VersionsClient { + return (this._versions ??= new VersionsClient(this._options)); + } + + /** + * Retrieve a paginated list of all Actions Modules with optional filtering and totals. + * + * @param {Management.GetActionModulesRequestParameters} request + * @param {ModulesClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.actions.modules.list({ + * page: 1, + * per_page: 1 + * }) + */ + public async list( + request: Management.GetActionModulesRequestParameters = {}, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const list = core.HttpResponsePromise.interceptFunction( + async ( + request: Management.GetActionModulesRequestParameters, + ): Promise> => { + const { page = 0, per_page: perPage = 50 } = request; + const _queryParams: Record = {}; + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; + } + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; + } + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "actions/modules", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetActionModulesResponseContent, + rawResponse: _response.rawResponse, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 401: + throw new Management.UnauthorizedError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError( + _response.error.body as unknown, + _response.rawResponse, + ); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/actions/modules"); + }, + ); + let _offset = request?.page != null ? request?.page : 0; + const dataWithRawResponse = await list(request).withRawResponse(); + return new core.Page({ + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => (response?.modules ?? []).length >= Math.floor(request?.per_page ?? 50), + getItems: (response) => response?.modules ?? [], + loadPage: (_response) => { + _offset += 1; + return list(core.setObjectProperty(request, "page", _offset)); + }, + }); + } + + /** + * Create a new Actions Module for reusable code across actions. + * + * @param {Management.CreateActionModuleRequestContent} request + * @param {ModulesClient.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.actions.modules.create({ + * name: "name", + * code: "code" + * }) + */ + public create( + request: Management.CreateActionModuleRequestContent, + requestOptions?: ModulesClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Management.CreateActionModuleRequestContent, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "actions/modules", + ), + 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, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.CreateActionModuleResponseContent, + 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, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/actions/modules"); + } + + /** + * Retrieve details of a specific Actions Module by its unique identifier. + * + * @param {string} id - The ID of the action module to retrieve. + * @param {ModulesClient.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.actions.modules.get("id") + */ + public get( + id: string, + requestOptions?: ModulesClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + } + + private async __get( + id: string, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetActionModuleResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}"); + } + + /** + * Permanently delete an Actions Module. This will fail if the module is still in use by any actions. + * + * @param {string} id - The ID of the Actions Module to delete. + * @param {ModulesClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.PreconditionFailedError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.actions.modules.delete("id") + */ + public delete(id: string, requestOptions?: ModulesClient.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions)); + } + + private async __delete( + id: string, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${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, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: undefined, 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 412: + throw new Management.PreconditionFailedError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/actions/modules/{id}"); + } + + /** + * Update properties of an existing Actions Module, such as code, dependencies, or secrets. + * + * @param {string} id - The ID of the action module to update. + * @param {Management.UpdateActionModuleRequestContent} request + * @param {ModulesClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.ConflictError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.actions.modules.update("id") + */ + public update( + id: string, + request: Management.UpdateActionModuleRequestContent = {}, + requestOptions?: ModulesClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions)); + } + + private async __update( + id: string, + request: Management.UpdateActionModuleRequestContent = {}, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: request, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.UpdateActionModuleResponseContent, + 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 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, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/actions/modules/{id}"); + } + + /** + * Lists all actions that are using a specific Actions Module, showing which deployed action versions reference this Actions Module. + * + * @param {string} id - The unique ID of the module. + * @param {Management.GetActionModuleActionsRequestParameters} request + * @param {ModulesClient.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.actions.modules.listActions("id", { + * page: 1, + * per_page: 1 + * }) + */ + public async listActions( + id: string, + request: Management.GetActionModuleActionsRequestParameters = {}, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const list = core.HttpResponsePromise.interceptFunction( + async ( + request: Management.GetActionModuleActionsRequestParameters, + ): Promise> => { + const { page = 0, per_page: perPage = 50 } = request; + const _queryParams: Record = {}; + if (page !== undefined) { + _queryParams["page"] = page?.toString() ?? null; + } + if (perPage !== undefined) { + _queryParams["per_page"] = perPage?.toString() ?? null; + } + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}/actions`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetActionModuleActionsResponseContent, + rawResponse: _response.rawResponse, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 401: + throw new Management.UnauthorizedError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError( + _response.error.body as unknown, + _response.rawResponse, + ); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/actions/modules/{id}/actions", + ); + }, + ); + let _offset = request?.page != null ? request?.page : 0; + const dataWithRawResponse = await list(request).withRawResponse(); + return new core.Page({ + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => (response?.actions ?? []).length >= Math.floor(request?.per_page ?? 50), + getItems: (response) => response?.actions ?? [], + loadPage: (_response) => { + _offset += 1; + return list(core.setObjectProperty(request, "page", _offset)); + }, + }); + } + + /** + * Rolls back an Actions Module's draft to a previously created version. This action copies the code, dependencies, and secrets from the specified version into the current draft. + * + * @param {string} id - The unique ID of the module to roll back. + * @param {Management.RollbackActionModuleRequestParameters} request + * @param {ModulesClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.ConflictError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.actions.modules.rollback("id", { + * module_version_id: "module_version_id" + * }) + */ + public rollback( + id: string, + request: Management.RollbackActionModuleRequestParameters, + requestOptions?: ModulesClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__rollback(id, request, requestOptions)); + } + + private async __rollback( + id: string, + request: Management.RollbackActionModuleRequestParameters, + requestOptions?: ModulesClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}/rollback`, + ), + 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, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.RollbackActionModuleResponseContent, + 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 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, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/actions/modules/{id}/rollback", + ); + } +} diff --git a/src/management/api/resources/actions/resources/modules/client/index.ts b/src/management/api/resources/actions/resources/modules/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/management/api/resources/actions/resources/modules/index.ts b/src/management/api/resources/actions/resources/modules/index.ts new file mode 100644 index 000000000..9eb1192dc --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/index.ts @@ -0,0 +1,2 @@ +export * from "./client/index.js"; +export * from "./resources/index.js"; diff --git a/src/management/api/resources/actions/resources/modules/resources/index.ts b/src/management/api/resources/actions/resources/modules/resources/index.ts new file mode 100644 index 000000000..2e28ce2ff --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/resources/index.ts @@ -0,0 +1 @@ +export * as versions from "./versions/index.js"; diff --git a/src/management/api/resources/actions/resources/modules/resources/versions/client/Client.ts b/src/management/api/resources/actions/resources/modules/resources/versions/client/Client.ts new file mode 100644 index 000000000..869e110c0 --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/resources/versions/client/Client.ts @@ -0,0 +1,288 @@ +// This file was auto-generated by Fern from our API Definition. + +import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js"; +import { + normalizeClientOptionsWithAuth, + type NormalizedClientOptionsWithAuth, +} from "../../../../../../../../BaseClient.js"; +import * as core from "../../../../../../../../core/index.js"; +import { mergeHeaders } from "../../../../../../../../core/headers.js"; +import * as environments from "../../../../../../../../environments.js"; +import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.js"; +import * as errors from "../../../../../../../../errors/index.js"; +import * as Management from "../../../../../../../index.js"; + +export declare namespace VersionsClient { + export type Options = BaseClientOptions; + + export interface RequestOptions extends BaseRequestOptions {} +} + +export class VersionsClient { + protected readonly _options: NormalizedClientOptionsWithAuth; + + constructor(options: VersionsClient.Options) { + this._options = normalizeClientOptionsWithAuth(options); + } + + /** + * List all published versions of a specific Actions Module. + * + * @param {string} id - The unique ID of the module. + * @param {VersionsClient.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.actions.modules.versions.list("id") + */ + public list( + id: string, + requestOptions?: VersionsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions)); + } + + private async __list( + id: string, + requestOptions?: VersionsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}/versions`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetActionModuleVersionsResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/actions/modules/{id}/versions", + ); + } + + /** + * Creates a new immutable version of an Actions Module from the current draft version. This publishes the draft as a new version that can be referenced by actions, while maintaining the existing draft for continued development. + * + * @param {string} id - The ID of the action module to create a version for. + * @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.ConflictError} + * @throws {@link Management.PreconditionFailedError} + * + * @example + * await client.actions.modules.versions.create("id") + */ + public create( + id: string, + requestOptions?: VersionsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(id, requestOptions)); + } + + private async __create( + id: string, + requestOptions?: VersionsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}/versions`, + ), + method: "POST", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.CreateActionModuleVersionResponseContent, + 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 409: + throw new Management.ConflictError(_response.error.body as unknown, _response.rawResponse); + case 412: + throw new Management.PreconditionFailedError( + _response.error.body as unknown, + _response.rawResponse, + ); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/actions/modules/{id}/versions", + ); + } + + /** + * Retrieve the details of a specific, immutable version of an Actions Module. + * + * @param {string} id - The unique ID of the module. + * @param {string} versionId - The unique ID of the module version to retrieve. + * @param {VersionsClient.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.actions.modules.versions.get("id", "versionId") + */ + public get( + id: string, + versionId: string, + requestOptions?: VersionsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(id, versionId, requestOptions)); + } + + private async __get( + id: string, + versionId: string, + requestOptions?: VersionsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `actions/modules/${core.url.encodePathParam(id)}/versions/${core.url.encodePathParam(versionId)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetActionModuleVersionResponseContent, + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError(_response.error.body as unknown, _response.rawResponse); + case 401: + throw new Management.UnauthorizedError(_response.error.body as unknown, _response.rawResponse); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 404: + throw new Management.NotFoundError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/actions/modules/{id}/versions/{versionId}", + ); + } +} diff --git a/src/management/api/resources/actions/resources/modules/resources/versions/client/index.ts b/src/management/api/resources/actions/resources/modules/resources/versions/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/resources/versions/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/management/api/resources/actions/resources/modules/resources/versions/index.ts b/src/management/api/resources/actions/resources/modules/resources/versions/index.ts new file mode 100644 index 000000000..914b8c3c7 --- /dev/null +++ b/src/management/api/resources/actions/resources/modules/resources/versions/index.ts @@ -0,0 +1 @@ +export * from "./client/index.js"; diff --git a/src/management/api/resources/clientGrants/client/Client.ts b/src/management/api/resources/clientGrants/client/Client.ts index b17cd7b2e..c0c9f17ad 100644 --- a/src/management/api/resources/clientGrants/client/Client.ts +++ b/src/management/api/resources/clientGrants/client/Client.ts @@ -239,6 +239,83 @@ export class ClientGrantsClient { return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/client-grants"); } + /** + * Retrieve a single client grant, including the + * scopes associated with the application/API pair. + * + * @param {string} id - The ID of the client grant to retrieve. + * @param {ClientGrantsClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.NotFoundError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.clientGrants.get("id") + */ + public get( + id: string, + requestOptions?: ClientGrantsClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions)); + } + + private async __get( + id: string, + requestOptions?: ClientGrantsClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + `client-grants/${core.url.encodePathParam(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.GetClientGrantResponseContent, + 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, + }); + } + } + + return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/client-grants/{id}"); + } + /** * Delete the Client Credential Flow from your machine-to-machine application. * diff --git a/src/management/api/resources/connections/client/Client.ts b/src/management/api/resources/connections/client/Client.ts index 540fc581c..14726e845 100644 --- a/src/management/api/resources/connections/client/Client.ts +++ b/src/management/api/resources/connections/client/Client.ts @@ -22,8 +22,8 @@ export declare namespace ConnectionsClient { export class ConnectionsClient { protected readonly _options: NormalizedClientOptionsWithAuth; - protected _clients: ClientsClient | undefined; protected _directoryProvisioning: DirectoryProvisioningClient | undefined; + protected _clients: ClientsClient | undefined; protected _keys: KeysClient | undefined; protected _scimConfiguration: ScimConfigurationClient | undefined; protected _users: UsersClient | undefined; @@ -32,14 +32,14 @@ export class ConnectionsClient { this._options = normalizeClientOptionsWithAuth(options); } - public get clients(): ClientsClient { - return (this._clients ??= new ClientsClient(this._options)); - } - public get directoryProvisioning(): DirectoryProvisioningClient { return (this._directoryProvisioning ??= new DirectoryProvisioningClient(this._options)); } + public get clients(): ClientsClient { + return (this._clients ??= new ClientsClient(this._options)); + } + public get keys(): KeysClient { return (this._keys ??= new KeysClient(this._options)); } @@ -197,7 +197,9 @@ export class ConnectionsClient { } /** - * Creates a new connection according to the JSON object received in body.
+ * Creates a new connection according to the JSON object received in body. + * + * Note: If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results. * * @param {Management.CreateConnectionRequestContent} request * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration. @@ -379,6 +381,8 @@ export class ConnectionsClient { /** * Removes a specific connection from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate. * + * Note: If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent create connection requests, if they use an identical connection name. + * * @param {string} id - The id of the connection to delete * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/management/api/resources/connections/resources/directoryProvisioning/client/Client.ts b/src/management/api/resources/connections/resources/directoryProvisioning/client/Client.ts index ae08bf413..f1b025abf 100644 --- a/src/management/api/resources/connections/resources/directoryProvisioning/client/Client.ts +++ b/src/management/api/resources/connections/resources/directoryProvisioning/client/Client.ts @@ -28,6 +28,115 @@ export class DirectoryProvisioningClient { return (this._synchronizations ??= new SynchronizationsClient(this._options)); } + /** + * Retrieve a list of directory provisioning configurations of a tenant. + * + * @param {Management.ListDirectoryProvisioningsRequestParameters} request + * @param {DirectoryProvisioningClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Management.BadRequestError} + * @throws {@link Management.UnauthorizedError} + * @throws {@link Management.ForbiddenError} + * @throws {@link Management.TooManyRequestsError} + * + * @example + * await client.connections.directoryProvisioning.list({ + * from: "from", + * take: 1 + * }) + */ + public async list( + request: Management.ListDirectoryProvisioningsRequestParameters = {}, + requestOptions?: DirectoryProvisioningClient.RequestOptions, + ): Promise> { + const list = core.HttpResponsePromise.interceptFunction( + async ( + request: Management.ListDirectoryProvisioningsRequestParameters, + ): Promise> => { + const { from: from_, take = 50 } = request; + const _queryParams: Record = {}; + if (from_ !== undefined) { + _queryParams["from"] = from_; + } + if (take !== undefined) { + _queryParams["take"] = take?.toString() ?? null; + } + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.ManagementEnvironment.Default, + "connections-directory-provisionings", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: _response.body as Management.ListDirectoryProvisioningsResponseContent, + rawResponse: _response.rawResponse, + }; + } + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 400: + throw new Management.BadRequestError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 401: + throw new Management.UnauthorizedError( + _response.error.body as unknown, + _response.rawResponse, + ); + case 403: + throw new Management.ForbiddenError(_response.error.body as unknown, _response.rawResponse); + case 429: + throw new Management.TooManyRequestsError( + _response.error.body as unknown, + _response.rawResponse, + ); + default: + throw new errors.ManagementError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + } + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/connections-directory-provisionings", + ); + }, + ); + const dataWithRawResponse = await list(request).withRawResponse(); + return new core.Page({ + response: dataWithRawResponse.data, + rawResponse: dataWithRawResponse.rawResponse, + hasNextPage: (response) => + response?.next != null && !(typeof response?.next === "string" && response?.next === ""), + getItems: (response) => response?.directory_provisionings ?? [], + loadPage: (response) => { + return list(core.setObjectProperty(request, "from", response?.next)); + }, + }); + } + /** * Retrieve the directory provisioning configuration of a connection. * diff --git a/src/management/api/resources/deviceCredentials/client/Client.ts b/src/management/api/resources/deviceCredentials/client/Client.ts index 600174de9..e5490d3c9 100644 --- a/src/management/api/resources/deviceCredentials/client/Client.ts +++ b/src/management/api/resources/deviceCredentials/client/Client.ts @@ -181,6 +181,7 @@ export class DeviceCredentialsClient { * @example * await client.deviceCredentials.createPublicKey({ * device_name: "device_name", + * type: "public_key", * value: "value", * device_id: "device_id" * }) @@ -214,7 +215,7 @@ export class DeviceCredentialsClient { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: { ...request, type: "public_key" }, + body: request, timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, diff --git a/src/management/api/resources/flows/index.ts b/src/management/api/resources/flows/index.ts index 9eb1192dc..0ef16e763 100644 --- a/src/management/api/resources/flows/index.ts +++ b/src/management/api/resources/flows/index.ts @@ -1,2 +1,3 @@ export * from "./client/index.js"; export * from "./resources/index.js"; +export * from "./types/index.js"; diff --git a/src/management/api/resources/flows/resources/executions/index.ts b/src/management/api/resources/flows/resources/executions/index.ts index 914b8c3c7..d9adb1af9 100644 --- a/src/management/api/resources/flows/resources/executions/index.ts +++ b/src/management/api/resources/flows/resources/executions/index.ts @@ -1 +1,2 @@ export * from "./client/index.js"; +export * from "./types/index.js"; diff --git a/src/management/api/resources/flows/resources/executions/types/index.ts b/src/management/api/resources/flows/resources/executions/types/index.ts new file mode 100644 index 000000000..a0c4ebf25 --- /dev/null +++ b/src/management/api/resources/flows/resources/executions/types/index.ts @@ -0,0 +1 @@ +export * from "./types.js"; diff --git a/src/management/api/resources/flows/resources/executions/types/types.ts b/src/management/api/resources/flows/resources/executions/types/types.ts new file mode 100644 index 000000000..2729ee094 --- /dev/null +++ b/src/management/api/resources/flows/resources/executions/types/types.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const ExecutionsGetRequestHydrateItem = { + Debug: "debug", +} as const; +export type ExecutionsGetRequestHydrateItem = + (typeof ExecutionsGetRequestHydrateItem)[keyof typeof ExecutionsGetRequestHydrateItem]; diff --git a/src/management/api/resources/flows/resources/index.ts b/src/management/api/resources/flows/resources/index.ts index be9a7f291..dba385d4c 100644 --- a/src/management/api/resources/flows/resources/index.ts +++ b/src/management/api/resources/flows/resources/index.ts @@ -1,2 +1,3 @@ export * as executions from "./executions/index.js"; +export * from "./executions/types/index.js"; export * as vault from "./vault/index.js"; diff --git a/src/management/api/resources/flows/types/index.ts b/src/management/api/resources/flows/types/index.ts new file mode 100644 index 000000000..a0c4ebf25 --- /dev/null +++ b/src/management/api/resources/flows/types/index.ts @@ -0,0 +1 @@ +export * from "./types.js"; diff --git a/src/management/api/resources/flows/types/types.ts b/src/management/api/resources/flows/types/types.ts new file mode 100644 index 000000000..d2a307964 --- /dev/null +++ b/src/management/api/resources/flows/types/types.ts @@ -0,0 +1,7 @@ +// This file was auto-generated by Fern from our API Definition. + +export const FlowsListRequestHydrateItem = { + FormCount: "form_count", +} as const; +export type FlowsListRequestHydrateItem = + (typeof FlowsListRequestHydrateItem)[keyof typeof FlowsListRequestHydrateItem]; diff --git a/src/management/api/resources/index.ts b/src/management/api/resources/index.ts index e63df53f0..76649261f 100644 --- a/src/management/api/resources/index.ts +++ b/src/management/api/resources/index.ts @@ -13,6 +13,7 @@ export * as emailTemplates from "./emailTemplates/index.js"; export * as eventStreams from "./eventStreams/index.js"; export * from "./eventStreams/types/index.js"; export * as flows from "./flows/index.js"; +export * from "./flows/types/index.js"; export * as forms from "./forms/index.js"; export * as groups from "./groups/index.js"; export * as guardian from "./guardian/index.js"; diff --git a/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts b/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts index d37d704e7..9c251ae40 100644 --- a/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts +++ b/src/management/api/resources/organizations/resources/discoveryDomains/client/Client.ts @@ -142,7 +142,7 @@ export class DiscoveryDomainsClient { } /** - * Update the verification status and/or use_for_organization_discovery for an organization discovery domain. The status field must be either pending or verified. The use_for_organization_discovery field can be true or false (default: true). + * Create a new discovery domain for an organization. * * @param {string} id - ID of the organization. * @param {Management.CreateOrganizationDiscoveryDomainRequestContent} request diff --git a/src/management/api/resources/roles/client/Client.ts b/src/management/api/resources/roles/client/Client.ts index 2f1ffea80..f204834f1 100644 --- a/src/management/api/resources/roles/client/Client.ts +++ b/src/management/api/resources/roles/client/Client.ts @@ -165,6 +165,7 @@ export class RolesClient { * @throws {@link Management.BadRequestError} * @throws {@link Management.UnauthorizedError} * @throws {@link Management.ForbiddenError} + * @throws {@link Management.ConflictError} * @throws {@link Management.TooManyRequestsError} * * @example @@ -220,6 +221,8 @@ export class RolesClient { 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: diff --git a/src/management/api/resources/tokenExchangeProfiles/client/Client.ts b/src/management/api/resources/tokenExchangeProfiles/client/Client.ts index 570655285..4e3f04e9f 100644 --- a/src/management/api/resources/tokenExchangeProfiles/client/Client.ts +++ b/src/management/api/resources/tokenExchangeProfiles/client/Client.ts @@ -164,7 +164,8 @@ export class TokenExchangeProfilesClient { * await client.tokenExchangeProfiles.create({ * name: "name", * subject_token_type: "subject_token_type", - * action_id: "action_id" + * action_id: "action_id", + * type: "custom_authentication" * }) */ public create( @@ -196,7 +197,7 @@ export class TokenExchangeProfilesClient { contentType: "application/json", queryParameters: requestOptions?.queryParams, requestType: "json", - body: { ...request, type: "custom_authentication" }, + body: request, timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, abortSignal: requestOptions?.abortSignal, diff --git a/src/management/api/types/types.ts b/src/management/api/types/types.ts index 77c022d8a..c766752d1 100644 --- a/src/management/api/types/types.ts +++ b/src/management/api/types/types.ts @@ -138,15 +138,15 @@ export const OauthScope = { /** * Create Connections */ CreateConnections: "create:connections", + /** + * Read Directory Provisionings */ + ReadDirectoryProvisionings: "read:directory_provisionings", /** * Update Connections */ UpdateConnections: "update:connections", /** * Delete Connections */ DeleteConnections: "delete:connections", - /** - * Read Directory Provisionings */ - ReadDirectoryProvisionings: "read:directory_provisionings", /** * Create Directory Provisionings */ CreateDirectoryProvisionings: "create:directory_provisionings", @@ -327,6 +327,9 @@ export const OauthScope = { /** * Read Group Members */ ReadGroupMembers: "read:group_members", + /** + * Read Group Roles */ + ReadGroupRoles: "read:group_roles", /** * Create Group Roles */ CreateGroupRoles: "create:group_roles", @@ -947,6 +950,56 @@ export const ActionExecutionStatusEnum = { } as const; export type ActionExecutionStatusEnum = (typeof ActionExecutionStatusEnum)[keyof typeof ActionExecutionStatusEnum]; +export interface ActionModuleAction { + /** The unique ID of the action. */ + action_id?: string; + /** The name of the action. */ + action_name?: string; + /** The ID of the module version this action is using. */ + module_version_id?: string; + /** The version number of the module this action is using. */ + module_version_number?: number; + /** The triggers that this action supports. */ + supported_triggers?: Management.ActionTrigger[]; +} + +export interface ActionModuleDependency { + /** The name of the npm dependency. */ + name?: string; + /** The version of the npm dependency. */ + version?: string; +} + +export interface ActionModuleDependencyRequest { + /** The name of the npm dependency. */ + name: string; + /** The version of the npm dependency. */ + version: string; +} + +export interface ActionModuleListItem { + /** The unique ID of the module. */ + id?: string; + /** The name of the module. */ + name?: string; + /** The source code from the module's draft version. */ + code?: string; + /** The npm dependencies from the module's draft version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The secrets from the module's draft version (names and timestamps only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** The number of deployed actions using this module. */ + actions_using_module_total?: number; + /** Whether all draft changes have been published as a version. */ + all_changes_published?: boolean; + /** The version number of the latest published version. Omitted if no versions have been published. */ + latest_version_number?: number; + /** Timestamp when the module was created. */ + created_at?: string; + /** Timestamp when the module was last updated. */ + updated_at?: string; +} + /** * Reference to a module and its version used by an action. */ @@ -961,6 +1014,55 @@ export interface ActionModuleReference { module_version_number?: number; } +export interface ActionModuleSecret { + /** The name of the secret. */ + name?: string; + /** The time when the secret was last updated. */ + updated_at?: string; +} + +export interface ActionModuleSecretRequest { + /** The name of the secret. */ + name: string; + /** The value of the secret. */ + value: string; +} + +export interface ActionModuleVersion { + /** The unique ID for this version. */ + id?: string; + /** The ID of the parent module. */ + module_id?: string; + /** The sequential version number. */ + version_number?: number; + /** The exact source code that was published with this version. */ + code?: string; + /** Secrets available to this version (name and updated_at only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** Dependencies locked to this version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The timestamp when this version was created. */ + created_at?: string; +} + +/** + * The latest published version as a reference object. Omitted if no versions have been published. + */ +export interface ActionModuleVersionReference { + /** The unique ID of the version. */ + id?: string; + /** The version number. */ + version_number?: number; + /** The source code from this version. */ + code?: string; + /** The npm dependencies from this version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The secrets from this version (names and timestamps only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** Timestamp when the version was created. */ + created_at?: string; +} + export interface ActionSecretRequest { /** The name of the particular secret, e.g. API_KEY. */ name?: string; @@ -1244,7 +1346,10 @@ export type AnomalyIpFormat = string; */ export type AppMetadata = Record; -export type AssessorsTypeEnum = "new-device"; +export const AssessorsTypeEnum = { + NewDevice: "new-device", +} as const; +export type AssessorsTypeEnum = (typeof AssessorsTypeEnum)[keyof typeof AssessorsTypeEnum]; export interface AssociateOrganizationClientGrantResponseContent { /** ID of the client grant. */ @@ -1808,7 +1913,11 @@ export interface CertificateSubjectDnCredential { pem?: string; } -export type CertificateSubjectDnCredentialTypeEnum = "cert_subject_dn"; +export const CertificateSubjectDnCredentialTypeEnum = { + CertSubjectDn: "cert_subject_dn", +} as const; +export type CertificateSubjectDnCredentialTypeEnum = + (typeof CertificateSubjectDnCredentialTypeEnum)[keyof typeof CertificateSubjectDnCredentialTypeEnum]; /** * The user's identity. If you set this value, you must also send the user_id parameter. @@ -2507,7 +2616,11 @@ export interface ClientDefaultOrganization { flows: Management.ClientDefaultOrganizationFlowsEnum[]; } -export type ClientDefaultOrganizationFlowsEnum = "client_credentials"; +export const ClientDefaultOrganizationFlowsEnum = { + ClientCredentials: "client_credentials", +} as const; +export type ClientDefaultOrganizationFlowsEnum = + (typeof ClientDefaultOrganizationFlowsEnum)[keyof typeof ClientDefaultOrganizationFlowsEnum]; /** * Encryption used for WsFed responses with this client. @@ -2561,11 +2674,13 @@ export interface ClientGrantResponseContent { /** If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ is_system?: boolean; 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. */ + /** Types of authorization_details allowed for this client grant. */ authorization_details_types?: string[]; + /** If enabled, all scopes configured on the resource server are allowed for this grant. */ + allow_all_scopes?: boolean; } -/** 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. */ +/** The type of application access the client grant allows. */ export const ClientGrantSubjectTypeEnum = { Client: "client", User: "user", @@ -2857,7 +2972,11 @@ export interface ClientTokenExchangeConfigurationOrNull { allow_any_profile_of_type?: Management.ClientTokenExchangeTypeEnum[]; } -export type ClientTokenExchangeTypeEnum = "custom_authentication"; +export const ClientTokenExchangeTypeEnum = { + CustomAuthentication: "custom_authentication", +} as const; +export type ClientTokenExchangeTypeEnum = + (typeof ClientTokenExchangeTypeEnum)[keyof typeof ClientTokenExchangeTypeEnum]; export interface ConnectedAccount { /** The unique identifier for the connected account. */ @@ -2877,10 +2996,12 @@ export interface ConnectedAccount { expires_at?: string; } -/** - * The access type for the connected account. - */ -export type ConnectedAccountAccessTypeEnum = "offline"; +/** The access type for the connected account. */ +export const ConnectedAccountAccessTypeEnum = { + Offline: "offline", +} as const; +export type ConnectedAccountAccessTypeEnum = + (typeof ConnectedAccountAccessTypeEnum)[keyof typeof ConnectedAccountAccessTypeEnum]; /** * A list of the Authentication Context Class References that this OP supports @@ -2902,6 +3023,21 @@ export type ConnectionAdminAccessTokenGoogleApps = string; */ export type ConnectionAdminRefreshTokenGoogleApps = string; +/** + * IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication (managed by the AD Connector agent). + */ +export type ConnectionAgentIpad = string; + +/** + * When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent). + */ +export type ConnectionAgentModeAd = boolean; + +/** + * Version identifier of the installed AD connector agent software (managed by the AD Connector agent). + */ +export type ConnectionAgentVersionAd = string; + /** * List of allowed audiences in the ID token for Google Native Social Login */ @@ -2931,7 +3067,7 @@ export interface ConnectionAttributeIdentifier { export type ConnectionAttributeMapAttributes = Record; /** - * Mapping of claims received from the identity provider (IdP) + * Configuration for mapping claims from the identity provider to Auth0 user profile attributes. Allows customizing which IdP claims populate user fields and how they are transformed. */ export interface ConnectionAttributeMapOidc { attributes?: Management.ConnectionAttributeMapAttributes; @@ -3004,11 +3140,16 @@ export type ConnectionAuthorizationEndpoint = string; export type ConnectionAuthorizationEndpointOAuth2 = Management.ConnectionAuthorizationEndpoint; /** - * Indicates whether brute force protection is enabled. + * Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures. */ export type ConnectionBruteForceProtection = boolean; -export type ConnectionCalculatedThumbprintSaml = Management.ConnectionSha1ThumbprintSaml; +export type ConnectionCalculatedThumbprintSaml = Management.ConnectionSha1Thumbprint; + +/** + * Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent). + */ +export type ConnectionCertsAd = string[]; /** * JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0 [OpenID.Core]. If omitted, the implementation supports only normal Claims. @@ -3037,6 +3178,11 @@ export type ConnectionClientId = string; export type ConnectionClientIdAzureAd = Management.ConnectionClientId; +/** + * Your Facebook App ID. You can find this in your [Facebook Developers Console](https://developers.facebook.com/apps) under the App Settings section. + */ +export type ConnectionClientIdFacebook = Management.ConnectionClientId; + /** * Your Google OAuth 2.0 client ID. You can find this in your [Google Cloud Console](https://console.cloud.google.com/apis/credentials) under the OAuth 2.0 Client IDs section. */ @@ -3045,7 +3191,7 @@ export type ConnectionClientIdGoogleApps = Management.ConnectionClientId; /** * Your Google OAuth 2.0 client ID. You can find this in your [Google Cloud Console](https://console.cloud.google.com/apis/credentials) under the OAuth 2.0 Client IDs section. */ -export type ConnectionClientIdGoogleOAuth2 = (string | null) | undefined; +export type ConnectionClientIdGoogleOAuth2 = string; export type ConnectionClientIdOAuth2 = Management.ConnectionClientId; @@ -3066,6 +3212,11 @@ export type ConnectionClientSecret = string; */ export type ConnectionClientSecretAzureAd = string; +/** + * Your Facebook App Secret. You can find this in your [Facebook Developers Console](https://developers.facebook.com/apps) under the App Settings section. + */ +export type ConnectionClientSecretFacebook = Management.ConnectionClientSecret; + /** * Your Google OAuth 2.0 client secret. You can find this in your [Google Cloud Console](https://console.cloud.google.com/apis/credentials) under the OAuth 2.0 Client IDs section. */ @@ -3074,7 +3225,7 @@ export type ConnectionClientSecretGoogleApps = Management.ConnectionClientSecret /** * Your Google OAuth 2.0 client secret. You can find this in your [Google Cloud Console](https://console.cloud.google.com/apis/credentials) under the OAuth 2.0 Client IDs section. */ -export type ConnectionClientSecretGoogleOAuth2 = (string | null) | undefined; +export type ConnectionClientSecretGoogleOAuth2 = string; export type ConnectionClientSecretOAuth2 = Management.ConnectionClientSecret; @@ -3103,7 +3254,7 @@ export interface ConnectionConnectedAccountsPurpose { } /** - * PKCE configuration for the connection + * OAuth 2.0 PKCE (Proof Key for Code Exchange) settings. PKCE enhances security for public clients by preventing authorization code interception attacks. 'auto' (recommended) uses the strongest method supported by the IdP. */ export interface ConnectionConnectionSettings { pkce?: Management.ConnectionConnectionSettingsPkceEnum; @@ -3147,9 +3298,18 @@ export interface ConnectionCustomScripts { export type ConnectionDebugSaml = boolean; /** - * Private key in PEM format used to decrypt encrypted SAML Assertions received from the identity provider. Required when the identity provider encrypts assertions for enhanced security. Can be a string (PEM) or an object with key-value pairs. + * Private key used to decrypt encrypted SAML Assertions received from the identity provider. Required when the identity provider encrypts assertions for enhanced security. Can be a string (PEM) or an object with key-value pairs. */ -export type ConnectionDecryptionKeySaml = string; +export type ConnectionDecryptionKeySaml = + /** + * Key pair with 'key' and 'cert' properties. */ + | { + cert?: string | undefined; + key?: string | undefined; + } + /** + * Private key in PEM format. */ + | string; /** * The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. @@ -3175,7 +3335,7 @@ export type ConnectionDigestAlgorithmSaml = Management.ConnectionDigestAlgorithm export type ConnectionDisableSelfServiceChangePassword = boolean; /** - * Set to true to disable signups + * When true, prevents new user registration through this connection. Existing users can still authenticate. Useful for invite-only applications or during user migration. */ export type ConnectionDisableSignup = boolean; @@ -3185,7 +3345,7 @@ export type ConnectionDisableSignup = boolean; export type ConnectionDisableSignupSms = Management.ConnectionDisableSignup; /** - * OIDC discovery URL. Discovery runs only when connection.options.oidc_metadata is empty and a discovery_url is provided. + * URL of the identity provider's OIDC Discovery endpoint (/.well-known/openid-configuration). When provided and oidc_metadata is empty, Auth0 automatically retrieves the provider's configuration including endpoints and supported features. */ export type ConnectionDiscoveryUrl = Management.ConnectionHttpsUrlWithHttpFallback255; @@ -3200,10 +3360,15 @@ export type ConnectionDisplayName = string; export type ConnectionDisplayValuesSupported = string[]; /** - * Domain aliases for the connection + * Email domains associated with this connection for Home Realm Discovery (HRD). When a user's email matches one of these domains, they are automatically routed to this connection during authentication. */ export type ConnectionDomainAliases = Management.ConnectionDomainAliasesItemsOne[]; +/** + * List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters + */ +export type ConnectionDomainAliasesAd = string[]; + /** * Alternative domain names associated with this Azure AD tenant. Allows users from multiple verified domains to authenticate through this connection. Can be an array of domain strings. */ @@ -3239,7 +3404,15 @@ export interface ConnectionEmailEmail { from?: Management.ConnectionEmailFromEmail; subject?: Management.ConnectionEmailSubjectEmail; /** Email template syntax type */ - syntax?: "liquid"; + syntax?: ConnectionEmailEmail.Syntax; +} + +export namespace ConnectionEmailEmail { + /** Email template syntax type */ + export const Syntax = { + Liquid: "liquid", + } as const; + export type Syntax = (typeof Syntax)[keyof typeof Syntax]; } /** @@ -3502,6 +3675,9 @@ export type ConnectionHttpsUrlWithHttpFallback255 = Management.ConnectionHttpsUr */ export type ConnectionIconUrl = string; +/** + * URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ export type ConnectionIconUrlAdfs = Management.ConnectionIconUrl; /** @@ -3509,8 +3685,14 @@ export type ConnectionIconUrlAdfs = Management.ConnectionIconUrl; */ export type ConnectionIconUrlAzureAd = Management.ConnectionIconUrl; +/** + * URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ export type ConnectionIconUrlGoogleApps = Management.ConnectionIconUrl; +/** + * URL for the connection icon displayed in Auth0 login pages. Accepts HTTPS URLs. Used for visual branding in authentication flows. + */ export type ConnectionIconUrlGoogleOAuth2 = Management.ConnectionIconUrl; /** @@ -3651,10 +3833,15 @@ export type ConnectionIdentityProviderEnum = (typeof ConnectionIdentityProviderEnum)[keyof typeof ConnectionIdentityProviderEnum]; /** - * Enable this if you have a legacy user store and you want to gradually migrate those users to the Auth0 user store + * Enables lazy migration mode for importing users from an external database. When a user authenticates, their credentials are validated against the legacy store, then the user is created in Auth0 for future logins. */ export type ConnectionImportMode = boolean; +/** + * Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication. + */ +export type ConnectionIpsAd = 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.) */ @@ -3781,7 +3968,31 @@ export type ConnectionOptions = Record; /** * Options for the 'ad' connection */ -export type ConnectionOptionsAd = Record; +export interface ConnectionOptionsAd extends Management.ConnectionOptionsCommon { + agentIP?: Management.ConnectionAgentIpad; + agentMode?: Management.ConnectionAgentModeAd; + agentVersion?: Management.ConnectionAgentVersionAd; + brute_force_protection?: Management.ConnectionBruteForceProtection; + /** Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint */ + certAuth?: boolean; + certs?: Management.ConnectionCertsAd; + /** When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory */ + disable_cache?: boolean; + /** When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets */ + disable_self_service_change_password?: boolean; + domain_aliases?: Management.ConnectionDomainAliasesAd; + icon_url?: Management.ConnectionIconUrl; + ips?: Management.ConnectionIpsAd; + /** Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges */ + kerberos?: boolean; + set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; + signInEndpoint?: Management.ConnectionSignInEndpointAd; + tenant_domain?: Management.ConnectionTenantDomainAd; + thumbprints?: Management.ConnectionThumbprintsAd; + upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'adfs' connection @@ -3794,7 +4005,6 @@ export interface ConnectionOptionsAdfs extends Management.ConnectionOptionsCommo entityId?: string; fedMetadataXml?: Management.ConnectionMetadataXmlAdfs; icon_url?: Management.ConnectionIconUrlAdfs; - /** Previous certificate thumbprints kept for rollover compatibility. */ prev_thumbprints?: Management.ConnectionThumbprints; set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; should_trust_email_verified_connection?: Management.ConnectionShouldTrustEmailVerifiedConnectionEnum; @@ -3808,9 +4018,21 @@ export interface ConnectionOptionsAdfs extends Management.ConnectionOptionsCommo [key: string]: any; } -export type ConnectionOptionsAol = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'aol' connection + */ +export interface ConnectionOptionsAol extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsAmazon = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'amazon' connection + */ +export interface ConnectionOptionsAmazon extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'apple' connection @@ -3870,7 +4092,12 @@ export interface ConnectionOptionsAuth0 extends Management.ConnectionOptionsComm /** * Options for the 'auth0-oidc' connection */ -export type ConnectionOptionsAuth0Oidc = Record; +export interface ConnectionOptionsAuth0Oidc { + client_id?: Management.ConnectionClientId; + client_secret?: Management.ConnectionClientSecret; + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'waad' connection @@ -3990,13 +4217,37 @@ export interface ConnectionOptionsAzureAd extends Management.ConnectionOptionsCo [key: string]: any; } -export type ConnectionOptionsBaidu = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'baidu' connection + */ +export interface ConnectionOptionsBaidu extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsBitbucket = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'bitbucket' connection + */ +export interface ConnectionOptionsBitbucket extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsBitly = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'bitly' connection + */ +export interface ConnectionOptionsBitly extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsBox = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'box' connection + */ +export interface ConnectionOptionsBox extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Common attributes for connection options including non-persistent attributes and Cross App Access @@ -4050,8 +4301,7 @@ export interface ConnectionOptionsCommonSaml { signSAMLRequest?: Management.ConnectionSignSamlRequestSaml; signatureAlgorithm?: Management.ConnectionSignatureAlgorithmSaml; tenant_domain?: Management.ConnectionTenantDomainSaml; - /** SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. */ - thumbprints?: Management.ConnectionSha1ThumbprintRelaxedValidationSaml[]; + thumbprints?: Management.ConnectionThumbprintsSaml; upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; } @@ -4060,16 +4310,34 @@ export interface ConnectionOptionsCommonSaml { */ export type ConnectionOptionsCustom = Record; -export type ConnectionOptionsDaccount = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'daccount' connection + */ +export interface ConnectionOptionsDaccount extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * When true, enables DEFLATE compression for SAML requests sent via HTTP-Redirect binding. */ export type ConnectionOptionsDeflateSaml = boolean; -export type ConnectionOptionsDropbox = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'dropbox' connection + */ +export interface ConnectionOptionsDropbox extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsDwolla = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'dwolla' connection + */ +export interface ConnectionOptionsDwolla extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'email' connection @@ -4086,33 +4354,141 @@ export interface ConnectionOptionsEmail extends Management.ConnectionOptionsComm [key: string]: any; } -export type ConnectionOptionsEvernote = Management.ConnectionOptionsEvernoteCommon; - -export type ConnectionOptionsEvernoteCommon = Record; - -export type ConnectionOptionsEvernoteSandbox = Management.ConnectionOptionsEvernoteCommon; +/** + * Options for the evernote family of connections + */ +export interface ConnectionOptionsEvernote extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsExact = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'exact' connection + */ +export interface ConnectionOptionsExact extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'facebook' connection */ -export type ConnectionOptionsFacebook = Record; +export interface ConnectionOptionsFacebook extends Management.ConnectionOptionsCommon { + client_id?: Management.ConnectionClientIdFacebook; + client_secret?: Management.ConnectionClientSecretFacebook; + freeform_scopes?: Management.ConnectionScopeArrayFacebook; + upstream_params?: Management.ConnectionUpstreamParamsFacebook; + scope?: Management.ConnectionScopeFacebook; + set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; + /** Grants permission to both read and manage ads for ad accounts you own or have been granted access to by the owner. By default, your app may only access ad accounts owned by admins of the app when in developer mode. */ + ads_management?: boolean; + /** Grants access to the Ads Insights API to pull ads report information for ad accounts you own or have been granted access to by the owner of other ad accounts. */ + ads_read?: boolean; + /** Provides access to a social context. Deprecated on April 30th, 2019. */ + allow_context_profile_field?: boolean; + /** Grants permission to read and write with the Business Manager API. */ + business_management?: boolean; + /** Grants permission to access a person's primary email address. */ + email?: boolean; + /** Grants permission to publicly available group member information. */ + groups_access_member_info?: boolean; + /** Grants permission to retrieve all the information captured within a lead. */ + leads_retrieval?: boolean; + /** Enables your app to read a person's notifications and mark them as read. This permission does not let you send notifications to a person. Deprecated in Graph API v2.3. */ + manage_notifications?: boolean; + /** Grants permission to retrieve Page Access Tokens for the Pages and Apps that the person administers. Apps need both manage_pages and publish_pages to be able to publish as a Page. */ + manage_pages?: boolean; + /** Allows the app to perform POST and DELETE operations on endpoints used for managing a Page's Call To Action buttons. */ + pages_manage_cta?: boolean; + /** Grants permission to manage Instant Articles on behalf of Facebook Pages administered by people using your app. */ + pages_manage_instant_articles?: boolean; + /** Grants permission to send and receive messages through a Facebook Page. */ + pages_messaging?: boolean; + /** Grants permission to use the phone number messaging feature. */ + pages_messaging_phone_number?: boolean; + /** Grants permission to send messages using Facebook Pages at any time after the first user interaction. Your app may only send advertising or promotional content through sponsored messages or within 24 hours of user interaction. */ + pages_messaging_subscriptions?: boolean; + /** Grants access to show the list of the Pages that a person manages. */ + pages_show_list?: boolean; + /** Provides access to a user's public profile information including id, first_name, last_name, middle_name, name, name_format, picture, and short_name. This is the most basic permission and is required by Facebook. */ + public_profile?: boolean; + /** Allows your app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. Deprecated on August 1st, 2018. */ + publish_actions?: boolean; + /** Grants permission to publish posts, comments, and like Pages managed by a person using your app. Your app must also have manage_pages to publish as a Page. */ + publish_pages?: boolean; + /** Grants permission to post content into a group on behalf of a user who has granted the app this permission. */ + publish_to_groups?: boolean; + /** Grants permission to publish live videos to the app User's timeline. */ + publish_video?: boolean; + /** Grants read-only access to the Audience Network Insights data for Apps the person owns. */ + read_audience_network_insights?: boolean; + /** Grants read-only access to the Insights data for Pages, Apps, and web domains the person owns. */ + read_insights?: boolean; + /** Provides the ability to read the messages in a person's Facebook Inbox through the inbox edge and the thread node. Deprecated in Graph API v2.3. */ + read_mailbox?: boolean; + /** Grants permission to read from the Page Inboxes of the Pages managed by a person. This permission is often used alongside the manage_pages permission. */ + read_page_mailboxes?: boolean; + /** Provides access to read the posts in a person's News Feed, or the posts on their Profile. Deprecated in Graph API v2.3. */ + read_stream?: boolean; + /** Grants permission to access a person's age range. */ + user_age_range?: boolean; + /** Grants permission to access a person's birthday. */ + user_birthday?: boolean; + /** Grants read-only access to the Events a person is a host of or has RSVPed to. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. */ + user_events?: boolean; + /** Grants permission to access a list of friends that also use said app. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. */ + user_friends?: boolean; + /** Grants permission to access a person's gender. */ + user_gender?: boolean; + /** Enables your app to read the Groups a person is a member of through the groups edge on the User object. Deprecated in Graph API v2.3. */ + user_groups?: boolean; + /** Grants permission to access a person's hometown location set in their User Profile. */ + user_hometown?: boolean; + /** Grants permission to access the list of all Facebook Pages that a person has liked. */ + user_likes?: boolean; + /** Grants permission to access the Facebook Profile URL of the user of your app. */ + user_link?: boolean; + /** Provides access to a person's current city through the location field on the User object. The current city is set by a person on their Profile. */ + user_location?: boolean; + /** Enables your app to read the Groups a person is an admin of through the groups edge on the User object. Deprecated in Graph API v3.0. */ + user_managed_groups?: boolean; + /** Provides access to the photos a person has uploaded or been tagged in. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. */ + user_photos?: boolean; + /** Provides access to the posts on a person's Timeline including their own posts, posts they are tagged in, and posts other people make on their Timeline. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. */ + user_posts?: boolean; + /** Provides access to a person's statuses. These are posts on Facebook which don't include links, videos or photos. Deprecated in Graph API v2.3. */ + user_status?: boolean; + /** Provides access to the Places a person has been tagged at in photos, videos, statuses and links. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. */ + user_tagged_places?: boolean; + /** Provides access to the videos a person has uploaded or been tagged in. This permission is restricted to a limited set of partners and usage requires prior approval by Facebook. */ + user_videos?: boolean; + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'fitbit' connection */ -export type ConnectionOptionsFitbit = Record; +export interface ConnectionOptionsFitbit extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'flickr' connection */ -export type ConnectionOptionsFlickr = Record; +export interface ConnectionOptionsFlickr extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'github' connection */ -export type ConnectionOptionsGitHub = Record; +export interface ConnectionOptionsGitHub extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'google-apps' connection @@ -4155,9 +4531,16 @@ export interface ConnectionOptionsGoogleApps extends Management.ConnectionOption * Options for the 'google-oauth2' connection */ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOptionsCommon { + allowed_audiences?: Management.ConnectionAllowedAudiencesGoogleOAuth2; + client_id?: Management.ConnectionClientIdGoogleOAuth2; + client_secret?: Management.ConnectionClientSecretGoogleOAuth2; + freeform_scopes?: Management.ConnectionFreeformScopesGoogleOAuth2; + icon_url?: Management.ConnectionIconUrlGoogleOAuth2; + scope?: Management.ConnectionScopeGoogleOAuth2; + set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; + upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; /** View and manage user's ad applications, ad units, and channels in AdSense */ adsense_management?: boolean; - allowed_audiences?: Management.ConnectionAllowedAudiencesGoogleOAuth2; /** View user's configuration information and reports */ analytics?: boolean; /** View and manage user's posts and blogs on Blogger and Blogger comments */ @@ -4174,8 +4557,6 @@ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOpti calendar_settings_readonly?: boolean; /** Read access to user's chrome web store */ chrome_web_store?: boolean; - client_id?: (Management.ConnectionClientIdGoogleOAuth2 | undefined) | null; - client_secret?: (Management.ConnectionClientSecretGoogleOAuth2 | undefined) | null; /** Full access to the authenticated user's contacts */ contacts?: boolean; /** Full access to the authenticated user's contacts */ @@ -4218,7 +4599,6 @@ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOpti drive_scripts?: boolean; /** Email and verified email flag */ email?: boolean; - freeform_scopes?: Management.ConnectionFreeformScopesGoogleOAuth2; /** Full access to the account's mailboxes, including permanent deletion of threads and messages */ gmail?: boolean; /** Read all resources and their metadataβ€”no write operations */ @@ -4253,7 +4633,6 @@ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOpti google_drive_files?: boolean; /** Associate user with its public Google profile */ google_plus?: boolean; - icon_url?: Management.ConnectionIconUrlGoogleOAuth2; /** View and manage user's best-available current location and location history in Google Latitude */ latitude_best?: boolean; /** View and manage user's city-level current location and location history in Google Latitude */ @@ -4268,15 +4647,12 @@ export interface ConnectionOptionsGoogleOAuth2 extends Management.ConnectionOpti picasa_web?: boolean; /** Name, public profile URL, photo, country, language, and timezone */ profile?: boolean; - scope?: Management.ConnectionScopeGoogleOAuth2; - set_user_root_attributes?: Management.ConnectionSetUserRootAttributesEnum; /** View and manage user's sites on Google Sites */ sites?: boolean; /** Full access to create, edit, organize, and delete all your tasks */ tasks?: boolean; /** Read-only access to view your tasks and task lists */ tasks_readonly?: boolean; - upstream_params?: (Management.ConnectionUpstreamParams | undefined) | null; /** View, manage and view statistics user's short URLs */ url_shortener?: boolean; /** View and manage user's sites and messages, view keywords */ @@ -4324,21 +4700,48 @@ export interface ConnectionOptionsIdpinitiatedSaml { enabled?: boolean; } -export type ConnectionOptionsInstagram = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'instagram' connection + */ +export interface ConnectionOptionsInstagram extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsLine = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'line' connection + */ +export interface ConnectionOptionsLine extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'linkedin' connection */ -export type ConnectionOptionsLinkedin = Record; +export interface ConnectionOptionsLinkedin extends Management.ConnectionOptionsOAuth2Common { + strategy_version?: Management.ConnectionStrategyVersionEnumLinkedin; + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsMiicard = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'miicard' connection + */ +export interface ConnectionOptionsMiicard extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'oauth1' connection */ -export type ConnectionOptionsOAuth1 = Record; +export interface ConnectionOptionsOAuth1 { + client_id?: Management.ConnectionClientId; + client_secret?: Management.ConnectionClientSecret; + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'oauth2' connection @@ -4433,14 +4836,19 @@ export interface ConnectionOptionsOidcMetadata { /** * Options for the 'office365' connection */ -export type ConnectionOptionsOffice365 = Record; +export interface ConnectionOptionsOffice365 { + client_id?: Management.ConnectionClientId; + client_secret?: Management.ConnectionClientSecret; + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'okta' connection */ export interface ConnectionOptionsOkta - extends Management.ConnectionOptionsCommonOidc, - Management.ConnectionOptionsCommon { + extends Management.ConnectionOptionsCommon, + Management.ConnectionOptionsCommonOidc { attribute_map?: Management.ConnectionAttributeMapOkta; domain?: Management.ConnectionDomainOkta; type?: Management.ConnectionTypeEnumOkta; @@ -4448,9 +4856,13 @@ export interface ConnectionOptionsOkta [key: string]: any; } -export type ConnectionOptionsPaypal = Management.ConnectionOptionsOAuth2Common; - -export type ConnectionOptionsPaypalSandbox = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the paypal family of connections + */ +export interface ConnectionOptionsPaypal extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'pingfederate' connection @@ -4467,9 +4879,18 @@ export interface ConnectionOptionsPingFederate /** * Options for the 'planningcenter' connection */ -export type ConnectionOptionsPlanningCenter = Record; +export interface ConnectionOptionsPlanningCenter extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsRenren = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'renren' connection + */ +export interface ConnectionOptionsRenren extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'samlp' connection @@ -4521,54 +4942,126 @@ export interface ConnectionOptionsSms extends Management.ConnectionOptionsCommon [key: string]: any; } -export type ConnectionOptionsSalesforce = Management.ConnectionOptionsSalesforceCommon; - -export type ConnectionOptionsSalesforceCommon = Record; - -export type ConnectionOptionsSalesforceCommunity = Management.ConnectionOptionsSalesforceCommon; - -export type ConnectionOptionsSalesforceSandbox = Management.ConnectionOptionsSalesforceCommon; - -export type ConnectionOptionsSharepoint = Management.ConnectionOptionsOAuth2Common; - /** - * Options for the 'shop' connection + * Options for the salesforce family of connections */ -export type ConnectionOptionsShop = Record; - -export type ConnectionOptionsShopify = Management.ConnectionOptionsOAuth2Common; +export interface ConnectionOptionsSalesforce extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsSoundcloud = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'sharepoint' connection + */ +export interface ConnectionOptionsSharepoint extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} + +/** + * Options for the 'shop' connection + */ +export interface ConnectionOptionsShop extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsTheCity = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'shopify' connection + */ +export interface ConnectionOptionsShopify extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsTheCitySandbox = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'soundcloud' connection + */ +export interface ConnectionOptionsSoundcloud extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsThirtySevenSignals = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'thirtysevensignals' connection + */ +export interface ConnectionOptionsThirtySevenSignals extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'twitter' connection */ -export type ConnectionOptionsTwitter = Record; +export interface ConnectionOptionsTwitter extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsUntappd = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'untappd' connection + */ +export interface ConnectionOptionsUntappd extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsVkontakte = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'vkontakte' connection + */ +export interface ConnectionOptionsVkontakte extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsWeibo = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'weibo' connection + */ +export interface ConnectionOptionsWeibo extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Options for the 'windowslive' connection */ -export type ConnectionOptionsWindowsLive = Record; +export interface ConnectionOptionsWindowsLive extends Management.ConnectionOptionsOAuth2Common { + strategy_version?: Management.ConnectionStrategyVersionEnumWindowsLive; + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsWordpress = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'wordpress' connection + */ +export interface ConnectionOptionsWordpress extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsYahoo = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'yahoo' connection + */ +export interface ConnectionOptionsYahoo extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsYammer = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'yammer' connection + */ +export interface ConnectionOptionsYammer extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} -export type ConnectionOptionsYandex = Management.ConnectionOptionsOAuth2Common; +/** + * Options for the 'yandex' connection + */ +export interface ConnectionOptionsYandex extends Management.ConnectionOptionsOAuth2Common { + /** Accepts any additional properties */ + [key: string]: any; +} /** * Passkey authentication enablement @@ -4842,12 +5335,7 @@ export type ConnectionProviderEnumSms = (typeof ConnectionProviderEnumSms)[keyof export type ConnectionProviderSms = Management.ConnectionProviderEnumSms; /** - * A ticket used for provisioning the connection - */ -export type ConnectionProvisioningTicket = string; - -/** - * A ticket used for provisioning the connection + * A ticket URL used for provisioning the connection */ export type ConnectionProvisioningTicketUrl = string; @@ -4859,7 +5347,7 @@ export type ConnectionRealmFallback = boolean; /** * Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm. */ -export type ConnectionRealmsAuth0 = string[]; +export type ConnectionRealms = string[]; /** * The URL where Auth0 will send SAML authentication requests (the Identity Provider's SSO URL). Must be a valid HTTPS URL. @@ -4910,519 +5398,927 @@ export type ConnectionRequiresUsername = boolean; export interface ConnectionResponseCommon extends Management.CreateConnectionCommon { id?: Management.ConnectionId; + realms?: Management.ConnectionRealms; } /** * Response for connections with strategy=ad */ export interface ConnectionResponseContentAd extends Management.ConnectionResponseCommon { - strategy: "ad"; + strategy: ConnectionResponseContentAd.Strategy; options?: Management.ConnectionOptionsAd; + provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; +} + +export namespace ConnectionResponseContentAd { + export const Strategy = { + Ad: "ad", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=adfs */ export interface ConnectionResponseContentAdfs extends Management.ConnectionResponseCommon { - strategy: "adfs"; + strategy: ConnectionResponseContentAdfs.Strategy; options?: Management.ConnectionOptionsAdfs; + provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentAdfs { + export const Strategy = { + Adfs: "adfs", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=aol */ export interface ConnectionResponseContentAol extends Management.ConnectionResponseCommon { - strategy: "aol"; + strategy: ConnectionResponseContentAol.Strategy; options?: Management.ConnectionOptionsAol; } +export namespace ConnectionResponseContentAol { + export const Strategy = { + Aol: "aol", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=amazon */ export interface ConnectionResponseContentAmazon extends Management.ConnectionResponseCommon { - strategy: "amazon"; + strategy: ConnectionResponseContentAmazon.Strategy; options?: Management.ConnectionOptionsAmazon; } +export namespace ConnectionResponseContentAmazon { + export const Strategy = { + Amazon: "amazon", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=apple */ export interface ConnectionResponseContentApple extends Management.ConnectionResponseCommon { - strategy: "apple"; + strategy: ConnectionResponseContentApple.Strategy; options?: Management.ConnectionOptionsApple; } +export namespace ConnectionResponseContentApple { + export const Strategy = { + Apple: "apple", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=auth0 */ export interface ConnectionResponseContentAuth0 extends Management.ConnectionResponseCommon { - strategy: "auth0"; + strategy: ConnectionResponseContentAuth0.Strategy; options?: Management.ConnectionOptionsAuth0; - realms?: Management.ConnectionRealmsAuth0; +} + +export namespace ConnectionResponseContentAuth0 { + export const Strategy = { + Auth0: "auth0", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=auth0-oidc */ export interface ConnectionResponseContentAuth0Oidc extends Management.ConnectionResponseCommon { - strategy: "auth0-oidc"; + strategy: ConnectionResponseContentAuth0Oidc.Strategy; options?: Management.ConnectionOptionsAuth0Oidc; } +export namespace ConnectionResponseContentAuth0Oidc { + export const Strategy = { + Auth0Oidc: "auth0-oidc", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=waad */ export interface ConnectionResponseContentAzureAd extends Management.ConnectionResponseCommon { - strategy: "waad"; + strategy: ConnectionResponseContentAzureAd.Strategy; options?: Management.ConnectionOptionsAzureAd; - provisioning_ticket?: Management.ConnectionProvisioningTicket; provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; - strategy_version?: Management.ConnectionStrategyVersionEnumAzureAd; +} + +export namespace ConnectionResponseContentAzureAd { + export const Strategy = { + Waad: "waad", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=baidu */ export interface ConnectionResponseContentBaidu extends Management.ConnectionResponseCommon { - strategy: "baidu"; + strategy: ConnectionResponseContentBaidu.Strategy; options?: Management.ConnectionOptionsBaidu; } +export namespace ConnectionResponseContentBaidu { + export const Strategy = { + Baidu: "baidu", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=bitbucket */ export interface ConnectionResponseContentBitbucket extends Management.ConnectionResponseCommon { - strategy: "bitbucket"; + strategy: ConnectionResponseContentBitbucket.Strategy; options?: Management.ConnectionOptionsBitbucket; } +export namespace ConnectionResponseContentBitbucket { + export const Strategy = { + Bitbucket: "bitbucket", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=bitly */ export interface ConnectionResponseContentBitly extends Management.ConnectionResponseCommon { - strategy: "bitly"; + strategy: ConnectionResponseContentBitly.Strategy; options?: Management.ConnectionOptionsBitly; } +export namespace ConnectionResponseContentBitly { + export const Strategy = { + Bitly: "bitly", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=box */ export interface ConnectionResponseContentBox extends Management.ConnectionResponseCommon { - strategy: "box"; + strategy: ConnectionResponseContentBox.Strategy; options?: Management.ConnectionOptionsBox; } +export namespace ConnectionResponseContentBox { + export const Strategy = { + Box: "box", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=custom */ export interface ConnectionResponseContentCustom extends Management.ConnectionResponseCommon { - strategy: "custom"; + strategy: ConnectionResponseContentCustom.Strategy; options?: Management.ConnectionOptionsCustom; + provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; +} + +export namespace ConnectionResponseContentCustom { + export const Strategy = { + Custom: "custom", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=daccount */ export interface ConnectionResponseContentDaccount extends Management.ConnectionResponseCommon { - strategy: "daccount"; + strategy: ConnectionResponseContentDaccount.Strategy; options?: Management.ConnectionOptionsDaccount; } +export namespace ConnectionResponseContentDaccount { + export const Strategy = { + Daccount: "daccount", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=dropbox */ export interface ConnectionResponseContentDropbox extends Management.ConnectionResponseCommon { - strategy: "dropbox"; + strategy: ConnectionResponseContentDropbox.Strategy; options?: Management.ConnectionOptionsDropbox; } +export namespace ConnectionResponseContentDropbox { + export const Strategy = { + Dropbox: "dropbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=dwolla */ export interface ConnectionResponseContentDwolla extends Management.ConnectionResponseCommon { - strategy: "dwolla"; + strategy: ConnectionResponseContentDwolla.Strategy; options?: Management.ConnectionOptionsDwolla; } +export namespace ConnectionResponseContentDwolla { + export const Strategy = { + Dwolla: "dwolla", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=email */ export interface ConnectionResponseContentEmail extends Management.ConnectionResponseCommon { - strategy: "email"; + strategy: ConnectionResponseContentEmail.Strategy; options?: Management.ConnectionOptionsEmail; } +export namespace ConnectionResponseContentEmail { + export const Strategy = { + Email: "email", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=evernote */ export interface ConnectionResponseContentEvernote extends Management.ConnectionResponseCommon { - strategy: "evernote"; + strategy: ConnectionResponseContentEvernote.Strategy; options?: Management.ConnectionOptionsEvernote; } +export namespace ConnectionResponseContentEvernote { + export const Strategy = { + Evernote: "evernote", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=evernote-sandbox */ export interface ConnectionResponseContentEvernoteSandbox extends Management.ConnectionResponseCommon { - strategy: "evernote-sandbox"; - options?: Management.ConnectionOptionsEvernoteSandbox; + strategy: ConnectionResponseContentEvernoteSandbox.Strategy; + options?: Management.ConnectionOptionsEvernote; +} + +export namespace ConnectionResponseContentEvernoteSandbox { + export const Strategy = { + EvernoteSandbox: "evernote-sandbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=exact */ export interface ConnectionResponseContentExact extends Management.ConnectionResponseCommon { - strategy: "exact"; + strategy: ConnectionResponseContentExact.Strategy; options?: Management.ConnectionOptionsExact; } +export namespace ConnectionResponseContentExact { + export const Strategy = { + Exact: "exact", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=facebook */ export interface ConnectionResponseContentFacebook extends Management.ConnectionResponseCommon { - strategy: "facebook"; + strategy: ConnectionResponseContentFacebook.Strategy; options?: Management.ConnectionOptionsFacebook; } +export namespace ConnectionResponseContentFacebook { + export const Strategy = { + Facebook: "facebook", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=fitbit */ export interface ConnectionResponseContentFitbit extends Management.ConnectionResponseCommon { - strategy: "fitbit"; + strategy: ConnectionResponseContentFitbit.Strategy; options?: Management.ConnectionOptionsFitbit; } +export namespace ConnectionResponseContentFitbit { + export const Strategy = { + Fitbit: "fitbit", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=flickr */ export interface ConnectionResponseContentFlickr extends Management.ConnectionResponseCommon { - strategy: "flickr"; + strategy: ConnectionResponseContentFlickr.Strategy; options?: Management.ConnectionOptionsFlickr; } +export namespace ConnectionResponseContentFlickr { + export const Strategy = { + Flickr: "flickr", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=github */ export interface ConnectionResponseContentGitHub extends Management.ConnectionResponseCommon { - strategy: "github"; + strategy: ConnectionResponseContentGitHub.Strategy; options?: Management.ConnectionOptionsGitHub; } +export namespace ConnectionResponseContentGitHub { + export const Strategy = { + Github: "github", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=google-apps */ export interface ConnectionResponseContentGoogleApps extends Management.ConnectionResponseCommon { - strategy: "google-apps"; + strategy: ConnectionResponseContentGoogleApps.Strategy; options?: Management.ConnectionOptionsGoogleApps; + provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentGoogleApps { + export const Strategy = { + GoogleApps: "google-apps", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=google-oauth2 */ export interface ConnectionResponseContentGoogleOAuth2 extends Management.ConnectionResponseCommon { - strategy: "google-oauth2"; + strategy: ConnectionResponseContentGoogleOAuth2.Strategy; options?: Management.ConnectionOptionsGoogleOAuth2; } +export namespace ConnectionResponseContentGoogleOAuth2 { + export const Strategy = { + GoogleOauth2: "google-oauth2", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=ip */ export interface ConnectionResponseContentIp extends Management.ConnectionResponseCommon { - strategy: "ip"; + strategy: ConnectionResponseContentIp.Strategy; options?: Management.ConnectionOptionsIp; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentIp { + export const Strategy = { + Ip: "ip", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=instagram */ export interface ConnectionResponseContentInstagram extends Management.ConnectionResponseCommon { - strategy: "instagram"; + strategy: ConnectionResponseContentInstagram.Strategy; options?: Management.ConnectionOptionsInstagram; } +export namespace ConnectionResponseContentInstagram { + export const Strategy = { + Instagram: "instagram", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=line */ export interface ConnectionResponseContentLine extends Management.ConnectionResponseCommon { - strategy: "line"; + strategy: ConnectionResponseContentLine.Strategy; options?: Management.ConnectionOptionsLine; } +export namespace ConnectionResponseContentLine { + export const Strategy = { + Line: "line", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=linkedin */ export interface ConnectionResponseContentLinkedin extends Management.ConnectionResponseCommon { - strategy: "linkedin"; + strategy: ConnectionResponseContentLinkedin.Strategy; options?: Management.ConnectionOptionsLinkedin; } +export namespace ConnectionResponseContentLinkedin { + export const Strategy = { + Linkedin: "linkedin", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=miicard */ export interface ConnectionResponseContentMiicard extends Management.ConnectionResponseCommon { - strategy: "miicard"; + strategy: ConnectionResponseContentMiicard.Strategy; options?: Management.ConnectionOptionsMiicard; } +export namespace ConnectionResponseContentMiicard { + export const Strategy = { + Miicard: "miicard", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=oauth1 */ export interface ConnectionResponseContentOAuth1 extends Management.ConnectionResponseCommon { - strategy: "oauth1"; + strategy: ConnectionResponseContentOAuth1.Strategy; options?: Management.ConnectionOptionsOAuth1; } +export namespace ConnectionResponseContentOAuth1 { + export const Strategy = { + Oauth1: "oauth1", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=oauth2 */ export interface ConnectionResponseContentOAuth2 extends Management.ConnectionResponseCommon { - strategy: "oauth2"; + strategy: ConnectionResponseContentOAuth2.Strategy; options?: Management.ConnectionOptionsOAuth2; } +export namespace ConnectionResponseContentOAuth2 { + export const Strategy = { + Oauth2: "oauth2", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=oidc */ export interface ConnectionResponseContentOidc extends Management.ConnectionResponseCommon { - strategy: "oidc"; + strategy: ConnectionResponseContentOidc.Strategy; options?: Management.ConnectionOptionsOidc; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentOidc { + export const Strategy = { + Oidc: "oidc", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=office365 */ export interface ConnectionResponseContentOffice365 extends Management.ConnectionResponseCommon { - strategy: "office365"; + strategy: ConnectionResponseContentOffice365.Strategy; options?: Management.ConnectionOptionsOffice365; + provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentOffice365 { + export const Strategy = { + Office365: "office365", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=okta */ export interface ConnectionResponseContentOkta extends Management.ConnectionResponseCommon { - strategy: "okta"; + strategy: ConnectionResponseContentOkta.Strategy; options?: Management.ConnectionOptionsOkta; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentOkta { + export const Strategy = { + Okta: "okta", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=paypal */ export interface ConnectionResponseContentPaypal extends Management.ConnectionResponseCommon { - strategy: "paypal"; + strategy: ConnectionResponseContentPaypal.Strategy; options?: Management.ConnectionOptionsPaypal; } +export namespace ConnectionResponseContentPaypal { + export const Strategy = { + Paypal: "paypal", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=paypal-sandbox */ export interface ConnectionResponseContentPaypalSandbox extends Management.ConnectionResponseCommon { - strategy: "paypal-sandbox"; - options?: Management.ConnectionOptionsPaypalSandbox; + strategy: ConnectionResponseContentPaypalSandbox.Strategy; + options?: Management.ConnectionOptionsPaypal; +} + +export namespace ConnectionResponseContentPaypalSandbox { + export const Strategy = { + PaypalSandbox: "paypal-sandbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=pingfederate */ export interface ConnectionResponseContentPingFederate extends Management.ConnectionResponseCommon { - strategy: "pingfederate"; + strategy: ConnectionResponseContentPingFederate.Strategy; options?: Management.ConnectionOptionsPingFederate; provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentPingFederate { + export const Strategy = { + Pingfederate: "pingfederate", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=planningcenter */ export interface ConnectionResponseContentPlanningCenter extends Management.ConnectionResponseCommon { - strategy: "planningcenter"; + strategy: ConnectionResponseContentPlanningCenter.Strategy; options?: Management.ConnectionOptionsPlanningCenter; } +export namespace ConnectionResponseContentPlanningCenter { + export const Strategy = { + Planningcenter: "planningcenter", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=renren */ export interface ConnectionResponseContentRenren extends Management.ConnectionResponseCommon { - strategy: "renren"; + strategy: ConnectionResponseContentRenren.Strategy; options?: Management.ConnectionOptionsRenren; } +export namespace ConnectionResponseContentRenren { + export const Strategy = { + Renren: "renren", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=samlp */ export interface ConnectionResponseContentSaml extends Management.ConnectionResponseCommon { - strategy: "samlp"; + strategy: ConnectionResponseContentSaml.Strategy; options?: Management.ConnectionOptionsSaml; + provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentSaml { + export const Strategy = { + Samlp: "samlp", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=sms */ export interface ConnectionResponseContentSms extends Management.ConnectionResponseCommon { - strategy: "sms"; + strategy: ConnectionResponseContentSms.Strategy; options?: Management.ConnectionOptionsSms; } +export namespace ConnectionResponseContentSms { + export const Strategy = { + Sms: "sms", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=salesforce */ export interface ConnectionResponseContentSalesforce extends Management.ConnectionResponseCommon { - strategy: "salesforce"; + strategy: ConnectionResponseContentSalesforce.Strategy; options?: Management.ConnectionOptionsSalesforce; } +export namespace ConnectionResponseContentSalesforce { + export const Strategy = { + Salesforce: "salesforce", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=salesforce-community */ export interface ConnectionResponseContentSalesforceCommunity extends Management.ConnectionResponseCommon { - strategy: "salesforce-community"; - options?: Management.ConnectionOptionsSalesforceCommunity; + strategy: ConnectionResponseContentSalesforceCommunity.Strategy; + options?: Management.ConnectionOptionsSalesforce; +} + +export namespace ConnectionResponseContentSalesforceCommunity { + export const Strategy = { + SalesforceCommunity: "salesforce-community", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=salesforce-sandbox */ export interface ConnectionResponseContentSalesforceSandbox extends Management.ConnectionResponseCommon { - strategy: "salesforce-sandbox"; - options?: Management.ConnectionOptionsSalesforceSandbox; + strategy: ConnectionResponseContentSalesforceSandbox.Strategy; + options?: Management.ConnectionOptionsSalesforce; +} + +export namespace ConnectionResponseContentSalesforceSandbox { + export const Strategy = { + SalesforceSandbox: "salesforce-sandbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=sharepoint */ export interface ConnectionResponseContentSharepoint extends Management.ConnectionResponseCommon { - strategy: "sharepoint"; + strategy: ConnectionResponseContentSharepoint.Strategy; options?: Management.ConnectionOptionsSharepoint; show_as_button?: Management.ConnectionShowAsButton; } +export namespace ConnectionResponseContentSharepoint { + export const Strategy = { + Sharepoint: "sharepoint", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=shop */ export interface ConnectionResponseContentShop extends Management.ConnectionResponseCommon { - strategy: "shop"; + strategy: ConnectionResponseContentShop.Strategy; options?: Management.ConnectionOptionsShop; } +export namespace ConnectionResponseContentShop { + export const Strategy = { + Shop: "shop", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=shopify */ export interface ConnectionResponseContentShopify extends Management.ConnectionResponseCommon { - strategy: "shopify"; + strategy: ConnectionResponseContentShopify.Strategy; options?: Management.ConnectionOptionsShopify; } +export namespace ConnectionResponseContentShopify { + export const Strategy = { + Shopify: "shopify", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=soundcloud */ export interface ConnectionResponseContentSoundcloud extends Management.ConnectionResponseCommon { - strategy: "soundcloud"; + strategy: ConnectionResponseContentSoundcloud.Strategy; options?: Management.ConnectionOptionsSoundcloud; } -/** - * Response for connections with strategy=thecity - */ -export interface ConnectionResponseContentTheCity extends Management.ConnectionResponseCommon { - strategy: "thecity"; - options?: Management.ConnectionOptionsTheCity; -} - -/** - * Response for connections with strategy=thecity-sandbox - */ -export interface ConnectionResponseContentTheCitySandbox extends Management.ConnectionResponseCommon { - strategy: "thecity-sandbox"; - options?: Management.ConnectionOptionsTheCitySandbox; +export namespace ConnectionResponseContentSoundcloud { + export const Strategy = { + Soundcloud: "soundcloud", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Response for connections with strategy=thirtysevensignals */ export interface ConnectionResponseContentThirtySevenSignals extends Management.ConnectionResponseCommon { - strategy: "thirtysevensignals"; + strategy: ConnectionResponseContentThirtySevenSignals.Strategy; options?: Management.ConnectionOptionsThirtySevenSignals; } +export namespace ConnectionResponseContentThirtySevenSignals { + export const Strategy = { + Thirtysevensignals: "thirtysevensignals", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=twitter */ export interface ConnectionResponseContentTwitter extends Management.ConnectionResponseCommon { - strategy: "twitter"; + strategy: ConnectionResponseContentTwitter.Strategy; options?: Management.ConnectionOptionsTwitter; } +export namespace ConnectionResponseContentTwitter { + export const Strategy = { + Twitter: "twitter", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=untappd */ export interface ConnectionResponseContentUntappd extends Management.ConnectionResponseCommon { - strategy: "untappd"; + strategy: ConnectionResponseContentUntappd.Strategy; options?: Management.ConnectionOptionsUntappd; } +export namespace ConnectionResponseContentUntappd { + export const Strategy = { + Untappd: "untappd", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=vkontakte */ export interface ConnectionResponseContentVkontakte extends Management.ConnectionResponseCommon { - strategy: "vkontakte"; + strategy: ConnectionResponseContentVkontakte.Strategy; options?: Management.ConnectionOptionsVkontakte; } +export namespace ConnectionResponseContentVkontakte { + export const Strategy = { + Vkontakte: "vkontakte", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=weibo */ export interface ConnectionResponseContentWeibo extends Management.ConnectionResponseCommon { - strategy: "weibo"; + strategy: ConnectionResponseContentWeibo.Strategy; options?: Management.ConnectionOptionsWeibo; } +export namespace ConnectionResponseContentWeibo { + export const Strategy = { + Weibo: "weibo", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=windowslive */ export interface ConnectionResponseContentWindowsLive extends Management.ConnectionResponseCommon { - strategy: "windowslive"; + strategy: ConnectionResponseContentWindowsLive.Strategy; options?: Management.ConnectionOptionsWindowsLive; } +export namespace ConnectionResponseContentWindowsLive { + export const Strategy = { + Windowslive: "windowslive", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=wordpress */ export interface ConnectionResponseContentWordpress extends Management.ConnectionResponseCommon { - strategy: "wordpress"; + strategy: ConnectionResponseContentWordpress.Strategy; options?: Management.ConnectionOptionsWordpress; } +export namespace ConnectionResponseContentWordpress { + export const Strategy = { + Wordpress: "wordpress", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=yahoo */ export interface ConnectionResponseContentYahoo extends Management.ConnectionResponseCommon { - strategy: "yahoo"; + strategy: ConnectionResponseContentYahoo.Strategy; options?: Management.ConnectionOptionsYahoo; } +export namespace ConnectionResponseContentYahoo { + export const Strategy = { + Yahoo: "yahoo", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=yammer */ export interface ConnectionResponseContentYammer extends Management.ConnectionResponseCommon { - strategy: "yammer"; + strategy: ConnectionResponseContentYammer.Strategy; options?: Management.ConnectionOptionsYammer; } +export namespace ConnectionResponseContentYammer { + export const Strategy = { + Yammer: "yammer", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Response for connections with strategy=yandex */ export interface ConnectionResponseContentYandex extends Management.ConnectionResponseCommon { - strategy: "yandex"; + strategy: ConnectionResponseContentYandex.Strategy; options?: Management.ConnectionOptionsYandex; } +export namespace ConnectionResponseContentYandex { + export const Strategy = { + Yandex: "yandex", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * A list of the OAuth 2.0 response_mode values that this OP supports. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"] */ @@ -5438,11 +6334,21 @@ export type ConnectionResponseTypesSupported = string[]; */ export type ConnectionScopeArray = Management.ConnectionScopeItem[]; +/** + * Array of custom OAuth 2.0 scopes to request during authentication. + */ +export type ConnectionScopeArrayFacebook = Management.ConnectionScopeItem[]; + /** * OAuth 2.0 scopes to request from Azure AD during authentication. Each scope represents a permission (e.g., 'User.Read', 'Group.Read.All'). Only applies with Microsoft Identity Platform v2.0. See Microsoft Graph permissions reference for available scopes. */ export type ConnectionScopeAzureAd = string[]; +/** + * Computed comma-separated OAuth scope string sent to Facebook. + */ +export type ConnectionScopeFacebook = string; + /** * Additional OAuth scopes requested beyond the default `email profile` scopes; ignored unless `allow_setting_login_scopes` is true. */ @@ -5469,7 +6375,7 @@ export type ConnectionScopeItemGoogleApps = string; export type ConnectionScopeOAuth2 = string | string[]; /** - * Space-separated list of scopes requested during /authorize. Must contain openid, typically contains 'openid profile email' + * Space-separated list of OAuth 2.0 scopes requested during authorization. Must include 'openid' (required by OIDC spec). Common values: 'openid profile email'. Additional scopes depend on the identity provider. */ export type ConnectionScopeOidc = string; @@ -5489,7 +6395,7 @@ export interface ConnectionScriptsOAuth2 { } /** - * whether to send a nonce to the identity provider when `type=back_channel` + * When true and type is 'back_channel', includes a cryptographic nonce in authorization requests to prevent replay attacks. The identity provider must include this nonce in the ID token for validation. */ export type ConnectionSendBackChannelNonce = boolean; @@ -5504,15 +6410,10 @@ export const ConnectionSetUserRootAttributesEnum = { export type ConnectionSetUserRootAttributesEnum = (typeof ConnectionSetUserRootAttributesEnum)[keyof typeof ConnectionSetUserRootAttributesEnum]; -/** - * SHA-1 thumbprint allowing standard format or relaxed legacy hex string. - */ -export type ConnectionSha1ThumbprintRelaxedValidationSaml = Management.ConnectionSha1ThumbprintSaml; - /** * SHA-1 thumbprint of the certificate */ -export type ConnectionSha1ThumbprintSaml = string; +export type ConnectionSha1Thumbprint = string; /** Choose how Auth0 sets the email_verified field in the user profile. */ export const ConnectionShouldTrustEmailVerifiedConnectionEnum = { @@ -5527,6 +6428,11 @@ export type ConnectionShouldTrustEmailVerifiedConnectionEnum = */ export type ConnectionShowAsButton = boolean; +/** + * The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent). + */ +export type ConnectionSignInEndpointAd = Management.ConnectionHttpsUrlWithHttpFallback255; + /** * Passive Requestor (WS-Fed) sign-in endpoint discovered from metadata or provided explicitly. */ @@ -5658,9 +6564,14 @@ export const ConnectionStrategyEnum = { export type ConnectionStrategyEnum = (typeof ConnectionStrategyEnum)[keyof typeof ConnectionStrategyEnum]; /** - * Strategy version + * Version number of the linkedin strategy implementation. + */ +export type ConnectionStrategyVersionEnumLinkedin = number; + +/** + * Version number of the windowslive strategy implementation. */ -export type ConnectionStrategyVersionEnumAzureAd = number; +export type ConnectionStrategyVersionEnumWindowsLive = number; /** * A list of the Subject Identifier types that this OP supports. Valid types include pairwise and public @@ -5685,6 +6596,11 @@ export type ConnectionTemplateSyntaxEnumSms = */ export type ConnectionTenantDomain = string; +/** + * Primary AD domain hint used for HRD and discovery. + */ +export type ConnectionTenantDomainAd = string; + export type ConnectionTenantDomainAzureAdOne = string; /** @@ -5704,9 +6620,19 @@ export type ConnectionTenantIdAzureAd = string; */ export type ConnectionThumbprints = string[]; +/** + * Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent. + */ +export type ConnectionThumbprintsAd = Management.ConnectionSha1Thumbprint[]; + +/** + * SHA-1 thumbprints (fingerprints) of the identity provider's signing certificates. Automatically computed from signingCert during connection creation. Each thumbprint must be a 40-character hexadecimal string. + */ +export type ConnectionThumbprintsSaml = Management.ConnectionSha1Thumbprint[]; + export type ConnectionTokenEndpoint = Management.ConnectionHttpsUrlWithHttpFallback255; -/** Requested Client Authentication method for the Token Endpoint. */ +/** Authentication method used at the identity provider's token endpoint. 'client_secret_post' sends credentials in the request body; 'private_key_jwt' uses a signed JWT assertion for enhanced security. */ export const ConnectionTokenEndpointAuthMethodEnum = { ClientSecretPost: "client_secret_post", PrivateKeyJwt: "private_key_jwt", @@ -5791,17 +6717,18 @@ export type ConnectionTwilioSidSms = string; */ export type ConnectionTwilioTokenSms = string; -/** Connection type */ +/** OIDC communication channel type. 'back_channel' (confidential client) exchanges tokens server-side for stronger security; 'front_channel' handles responses in the browser. */ export const ConnectionTypeEnumOidc = { BackChannel: "back_channel", FrontChannel: "front_channel", } as const; export type ConnectionTypeEnumOidc = (typeof ConnectionTypeEnumOidc)[keyof typeof ConnectionTypeEnumOidc]; -/** - * Connection type - */ -export type ConnectionTypeEnumOkta = "back_channel"; +/** Connection type */ +export const ConnectionTypeEnumOkta = { + BackChannel: "back_channel", +} as const; +export type ConnectionTypeEnumOkta = (typeof ConnectionTypeEnumOkta)[keyof typeof ConnectionTypeEnumOkta]; /** * Languages and scripts supported for the user interface, represented as a JSON array of BCP47 [RFC5646] language tag values. @@ -5842,6 +6769,11 @@ export type ConnectionUpstreamParams = export type ConnectionUpstreamParamsAdfs = ((Management.ConnectionUpstreamParams | undefined) | null) | undefined; +/** + * Options for adding parameters in the request to the upstream IdP. See https://auth0.com/docs/authenticate/identity-providers/pass-parameters-to-idps + */ +export type ConnectionUpstreamParamsFacebook = Record; + export interface ConnectionUpstreamValue { value?: string; } @@ -5918,6 +6850,47 @@ export type ConnectionWaadProtocolEnumAzureAd = */ export type ConnectionsMetadata = Record; +export interface CreateActionModuleResponseContent { + /** The unique ID of the module. */ + id?: string; + /** The name of the module. */ + name?: string; + /** The source code from the module's draft version. */ + code?: string; + /** The npm dependencies from the module's draft version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The secrets from the module's draft version (names and timestamps only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** The number of deployed actions using this module. */ + actions_using_module_total?: number; + /** Whether all draft changes have been published as a version. */ + all_changes_published?: boolean; + /** The version number of the latest published version. Omitted if no versions have been published. */ + latest_version_number?: number; + /** Timestamp when the module was created. */ + created_at?: string; + /** Timestamp when the module was last updated. */ + updated_at?: string; + latest_version?: Management.ActionModuleVersionReference; +} + +export interface CreateActionModuleVersionResponseContent { + /** The unique ID for this version. */ + id?: string; + /** The ID of the parent module. */ + module_id?: string; + /** The sequential version number. */ + version_number?: number; + /** The exact source code that was published with this version. */ + code?: string; + /** Secrets available to this version (name and updated_at only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** Dependencies locked to this version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The timestamp when this version was created. */ + created_at?: string; +} + export interface CreateActionResponseContent { /** The unique ID of the action. */ id?: string; @@ -6009,8 +6982,10 @@ export interface CreateClientGrantResponseContent { /** If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ is_system?: boolean; 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. */ + /** Types of authorization_details allowed for this client grant. */ authorization_details_types?: string[]; + /** If enabled, all scopes configured on the resource server are allowed for this grant. */ + allow_all_scopes?: boolean; } export interface CreateClientResponseContent { @@ -6125,511 +7100,913 @@ export interface CreateConnectionProfileResponseContent { * Create a connection with strategy=ad */ export interface CreateConnectionRequestContentAd extends Management.CreateConnectionCommon { - strategy: "ad"; + strategy: CreateConnectionRequestContentAd.Strategy; options?: Management.ConnectionOptionsAd; } +export namespace CreateConnectionRequestContentAd { + export const Strategy = { + Ad: "ad", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=adfs */ export interface CreateConnectionRequestContentAdfs extends Management.CreateConnectionCommon { - strategy: "adfs"; + strategy: CreateConnectionRequestContentAdfs.Strategy; options?: Management.ConnectionOptionsAdfs; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentAdfs { + export const Strategy = { + Adfs: "adfs", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=aol */ export interface CreateConnectionRequestContentAol extends Management.CreateConnectionCommon { - strategy: "aol"; + strategy: CreateConnectionRequestContentAol.Strategy; options?: Management.ConnectionOptionsAol; } +export namespace CreateConnectionRequestContentAol { + export const Strategy = { + Aol: "aol", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=amazon */ export interface CreateConnectionRequestContentAmazon extends Management.CreateConnectionCommon { - strategy: "amazon"; + strategy: CreateConnectionRequestContentAmazon.Strategy; options?: Management.ConnectionOptionsAmazon; } +export namespace CreateConnectionRequestContentAmazon { + export const Strategy = { + Amazon: "amazon", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=apple */ export interface CreateConnectionRequestContentApple extends Management.CreateConnectionCommon { - strategy: "apple"; + strategy: CreateConnectionRequestContentApple.Strategy; options?: Management.ConnectionOptionsApple; } +export namespace CreateConnectionRequestContentApple { + export const Strategy = { + Apple: "apple", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=auth0 */ export interface CreateConnectionRequestContentAuth0 extends Management.CreateConnectionCommon { - strategy: "auth0"; + strategy: CreateConnectionRequestContentAuth0.Strategy; options?: Management.ConnectionOptionsAuth0; - realms?: Management.ConnectionRealmsAuth0; + realms?: Management.ConnectionRealms; +} + +export namespace CreateConnectionRequestContentAuth0 { + export const Strategy = { + Auth0: "auth0", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Create a connection with strategy=auth0-oidc */ export interface CreateConnectionRequestContentAuth0Oidc extends Management.CreateConnectionCommon { - strategy: "auth0-oidc"; + strategy: CreateConnectionRequestContentAuth0Oidc.Strategy; options?: Management.ConnectionOptionsAuth0Oidc; } +export namespace CreateConnectionRequestContentAuth0Oidc { + export const Strategy = { + Auth0Oidc: "auth0-oidc", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=waad */ export interface CreateConnectionRequestContentAzureAd extends Management.CreateConnectionCommon { - strategy: "waad"; + strategy: CreateConnectionRequestContentAzureAd.Strategy; options?: Management.ConnectionOptionsAzureAd; - provisioning_ticket?: Management.ConnectionProvisioningTicket; - provisioning_ticket_url?: Management.ConnectionProvisioningTicketUrl; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentAzureAd { + export const Strategy = { + Waad: "waad", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=baidu */ export interface CreateConnectionRequestContentBaidu extends Management.CreateConnectionCommon { - strategy: "baidu"; + strategy: CreateConnectionRequestContentBaidu.Strategy; options?: Management.ConnectionOptionsBaidu; } +export namespace CreateConnectionRequestContentBaidu { + export const Strategy = { + Baidu: "baidu", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=bitbucket */ export interface CreateConnectionRequestContentBitbucket extends Management.CreateConnectionCommon { - strategy: "bitbucket"; + strategy: CreateConnectionRequestContentBitbucket.Strategy; options?: Management.ConnectionOptionsBitbucket; } +export namespace CreateConnectionRequestContentBitbucket { + export const Strategy = { + Bitbucket: "bitbucket", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=bitly */ export interface CreateConnectionRequestContentBitly extends Management.CreateConnectionCommon { - strategy: "bitly"; + strategy: CreateConnectionRequestContentBitly.Strategy; options?: Management.ConnectionOptionsBitly; } +export namespace CreateConnectionRequestContentBitly { + export const Strategy = { + Bitly: "bitly", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=box */ export interface CreateConnectionRequestContentBox extends Management.CreateConnectionCommon { - strategy: "box"; + strategy: CreateConnectionRequestContentBox.Strategy; options?: Management.ConnectionOptionsBox; } +export namespace CreateConnectionRequestContentBox { + export const Strategy = { + Box: "box", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=custom */ export interface CreateConnectionRequestContentCustom extends Management.CreateConnectionCommon { - strategy: "custom"; + strategy: CreateConnectionRequestContentCustom.Strategy; options?: Management.ConnectionOptionsCustom; } +export namespace CreateConnectionRequestContentCustom { + export const Strategy = { + Custom: "custom", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=daccount */ export interface CreateConnectionRequestContentDaccount extends Management.CreateConnectionCommon { - strategy: "daccount"; + strategy: CreateConnectionRequestContentDaccount.Strategy; options?: Management.ConnectionOptionsDaccount; } +export namespace CreateConnectionRequestContentDaccount { + export const Strategy = { + Daccount: "daccount", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=dropbox */ export interface CreateConnectionRequestContentDropbox extends Management.CreateConnectionCommon { - strategy: "dropbox"; + strategy: CreateConnectionRequestContentDropbox.Strategy; options?: Management.ConnectionOptionsDropbox; } +export namespace CreateConnectionRequestContentDropbox { + export const Strategy = { + Dropbox: "dropbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=dwolla */ export interface CreateConnectionRequestContentDwolla extends Management.CreateConnectionCommon { - strategy: "dwolla"; + strategy: CreateConnectionRequestContentDwolla.Strategy; options?: Management.ConnectionOptionsDwolla; } +export namespace CreateConnectionRequestContentDwolla { + export const Strategy = { + Dwolla: "dwolla", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=email */ export interface CreateConnectionRequestContentEmail extends Management.CreateConnectionCommon { - strategy: "email"; + strategy: CreateConnectionRequestContentEmail.Strategy; options?: Management.ConnectionOptionsEmail; } +export namespace CreateConnectionRequestContentEmail { + export const Strategy = { + Email: "email", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=evernote */ export interface CreateConnectionRequestContentEvernote extends Management.CreateConnectionCommon { - strategy: "evernote"; + strategy: CreateConnectionRequestContentEvernote.Strategy; options?: Management.ConnectionOptionsEvernote; } +export namespace CreateConnectionRequestContentEvernote { + export const Strategy = { + Evernote: "evernote", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=evernote-sandbox */ export interface CreateConnectionRequestContentEvernoteSandbox extends Management.CreateConnectionCommon { - strategy: "evernote-sandbox"; - options?: Management.ConnectionOptionsEvernoteSandbox; + strategy: CreateConnectionRequestContentEvernoteSandbox.Strategy; + options?: Management.ConnectionOptionsEvernote; +} + +export namespace CreateConnectionRequestContentEvernoteSandbox { + export const Strategy = { + EvernoteSandbox: "evernote-sandbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Create a connection with strategy=exact */ export interface CreateConnectionRequestContentExact extends Management.CreateConnectionCommon { - strategy: "exact"; + strategy: CreateConnectionRequestContentExact.Strategy; options?: Management.ConnectionOptionsExact; } +export namespace CreateConnectionRequestContentExact { + export const Strategy = { + Exact: "exact", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=facebook */ export interface CreateConnectionRequestContentFacebook extends Management.CreateConnectionCommon { - strategy: "facebook"; + strategy: CreateConnectionRequestContentFacebook.Strategy; options?: Management.ConnectionOptionsFacebook; } +export namespace CreateConnectionRequestContentFacebook { + export const Strategy = { + Facebook: "facebook", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=fitbit */ export interface CreateConnectionRequestContentFitbit extends Management.CreateConnectionCommon { - strategy: "fitbit"; + strategy: CreateConnectionRequestContentFitbit.Strategy; options?: Management.ConnectionOptionsFitbit; } +export namespace CreateConnectionRequestContentFitbit { + export const Strategy = { + Fitbit: "fitbit", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=flickr */ export interface CreateConnectionRequestContentFlickr extends Management.CreateConnectionCommon { - strategy: "flickr"; + strategy: CreateConnectionRequestContentFlickr.Strategy; options?: Management.ConnectionOptionsFlickr; } +export namespace CreateConnectionRequestContentFlickr { + export const Strategy = { + Flickr: "flickr", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=github */ export interface CreateConnectionRequestContentGitHub extends Management.CreateConnectionCommon { - strategy: "github"; + strategy: CreateConnectionRequestContentGitHub.Strategy; options?: Management.ConnectionOptionsGitHub; } +export namespace CreateConnectionRequestContentGitHub { + export const Strategy = { + Github: "github", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=google-apps */ export interface CreateConnectionRequestContentGoogleApps extends Management.CreateConnectionCommon { - strategy: "google-apps"; + strategy: CreateConnectionRequestContentGoogleApps.Strategy; options?: Management.ConnectionOptionsGoogleApps; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentGoogleApps { + export const Strategy = { + GoogleApps: "google-apps", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=google-oauth2 */ export interface CreateConnectionRequestContentGoogleOAuth2 extends Management.CreateConnectionCommon { - strategy: "google-oauth2"; + strategy: CreateConnectionRequestContentGoogleOAuth2.Strategy; options?: Management.ConnectionOptionsGoogleOAuth2; } +export namespace CreateConnectionRequestContentGoogleOAuth2 { + export const Strategy = { + GoogleOauth2: "google-oauth2", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=ip */ export interface CreateConnectionRequestContentIp extends Management.CreateConnectionCommon { - strategy: "ip"; + strategy: CreateConnectionRequestContentIp.Strategy; options?: Management.ConnectionOptionsIp; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentIp { + export const Strategy = { + Ip: "ip", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=instagram */ export interface CreateConnectionRequestContentInstagram extends Management.CreateConnectionCommon { - strategy: "instagram"; + strategy: CreateConnectionRequestContentInstagram.Strategy; options?: Management.ConnectionOptionsInstagram; } +export namespace CreateConnectionRequestContentInstagram { + export const Strategy = { + Instagram: "instagram", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=line */ export interface CreateConnectionRequestContentLine extends Management.CreateConnectionCommon { - strategy: "line"; + strategy: CreateConnectionRequestContentLine.Strategy; options?: Management.ConnectionOptionsLine; } +export namespace CreateConnectionRequestContentLine { + export const Strategy = { + Line: "line", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=linkedin */ export interface CreateConnectionRequestContentLinkedin extends Management.CreateConnectionCommon { - strategy: "linkedin"; + strategy: CreateConnectionRequestContentLinkedin.Strategy; options?: Management.ConnectionOptionsLinkedin; } +export namespace CreateConnectionRequestContentLinkedin { + export const Strategy = { + Linkedin: "linkedin", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=miicard */ export interface CreateConnectionRequestContentMiicard extends Management.CreateConnectionCommon { - strategy: "miicard"; + strategy: CreateConnectionRequestContentMiicard.Strategy; options?: Management.ConnectionOptionsMiicard; } +export namespace CreateConnectionRequestContentMiicard { + export const Strategy = { + Miicard: "miicard", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=oauth1 */ export interface CreateConnectionRequestContentOAuth1 extends Management.CreateConnectionCommon { - strategy: "oauth1"; + strategy: CreateConnectionRequestContentOAuth1.Strategy; options?: Management.ConnectionOptionsOAuth1; } +export namespace CreateConnectionRequestContentOAuth1 { + export const Strategy = { + Oauth1: "oauth1", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=oauth2 */ export interface CreateConnectionRequestContentOAuth2 extends Management.CreateConnectionCommon { - strategy: "oauth2"; + strategy: CreateConnectionRequestContentOAuth2.Strategy; options?: Management.ConnectionOptionsOAuth2; } +export namespace CreateConnectionRequestContentOAuth2 { + export const Strategy = { + Oauth2: "oauth2", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=oidc */ export interface CreateConnectionRequestContentOidc extends Management.CreateConnectionCommon { - strategy: "oidc"; + strategy: CreateConnectionRequestContentOidc.Strategy; options?: Management.ConnectionOptionsOidc; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentOidc { + export const Strategy = { + Oidc: "oidc", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=office365 */ export interface CreateConnectionRequestContentOffice365 extends Management.CreateConnectionCommon { - strategy: "office365"; + strategy: CreateConnectionRequestContentOffice365.Strategy; options?: Management.ConnectionOptionsOffice365; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentOffice365 { + export const Strategy = { + Office365: "office365", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=okta */ export interface CreateConnectionRequestContentOkta extends Management.CreateConnectionCommon { - strategy: "okta"; + strategy: CreateConnectionRequestContentOkta.Strategy; options?: Management.ConnectionOptionsOkta; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentOkta { + export const Strategy = { + Okta: "okta", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=paypal */ export interface CreateConnectionRequestContentPaypal extends Management.CreateConnectionCommon { - strategy: "paypal"; + strategy: CreateConnectionRequestContentPaypal.Strategy; options?: Management.ConnectionOptionsPaypal; } +export namespace CreateConnectionRequestContentPaypal { + export const Strategy = { + Paypal: "paypal", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=paypal-sandbox */ export interface CreateConnectionRequestContentPaypalSandbox extends Management.CreateConnectionCommon { - strategy: "paypal-sandbox"; - options?: Management.ConnectionOptionsPaypalSandbox; + strategy: CreateConnectionRequestContentPaypalSandbox.Strategy; + options?: Management.ConnectionOptionsPaypal; +} + +export namespace CreateConnectionRequestContentPaypalSandbox { + export const Strategy = { + PaypalSandbox: "paypal-sandbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Create a connection with strategy=pingfederate */ export interface CreateConnectionRequestContentPingFederate extends Management.CreateConnectionCommon { - strategy: "pingfederate"; + strategy: CreateConnectionRequestContentPingFederate.Strategy; options?: Management.ConnectionOptionsPingFederate; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentPingFederate { + export const Strategy = { + Pingfederate: "pingfederate", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=planningcenter */ export interface CreateConnectionRequestContentPlanningCenter extends Management.CreateConnectionCommon { - strategy: "planningcenter"; + strategy: CreateConnectionRequestContentPlanningCenter.Strategy; options?: Management.ConnectionOptionsPlanningCenter; } +export namespace CreateConnectionRequestContentPlanningCenter { + export const Strategy = { + Planningcenter: "planningcenter", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=renren */ export interface CreateConnectionRequestContentRenren extends Management.CreateConnectionCommon { - strategy: "renren"; + strategy: CreateConnectionRequestContentRenren.Strategy; options?: Management.ConnectionOptionsRenren; } +export namespace CreateConnectionRequestContentRenren { + export const Strategy = { + Renren: "renren", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=samlp */ export interface CreateConnectionRequestContentSaml extends Management.CreateConnectionCommon { - strategy: "samlp"; + strategy: CreateConnectionRequestContentSaml.Strategy; options?: Management.ConnectionOptionsSaml; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentSaml { + export const Strategy = { + Samlp: "samlp", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=sms */ export interface CreateConnectionRequestContentSms extends Management.CreateConnectionCommon { - strategy: "sms"; + strategy: CreateConnectionRequestContentSms.Strategy; options?: Management.ConnectionOptionsSms; } +export namespace CreateConnectionRequestContentSms { + export const Strategy = { + Sms: "sms", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=salesforce */ export interface CreateConnectionRequestContentSalesforce extends Management.CreateConnectionCommon { - strategy: "salesforce"; + strategy: CreateConnectionRequestContentSalesforce.Strategy; options?: Management.ConnectionOptionsSalesforce; } +export namespace CreateConnectionRequestContentSalesforce { + export const Strategy = { + Salesforce: "salesforce", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=salesforce-community */ export interface CreateConnectionRequestContentSalesforceCommunity extends Management.CreateConnectionCommon { - strategy: "salesforce-community"; - options?: Management.ConnectionOptionsSalesforceCommunity; + strategy: CreateConnectionRequestContentSalesforceCommunity.Strategy; + options?: Management.ConnectionOptionsSalesforce; +} + +export namespace CreateConnectionRequestContentSalesforceCommunity { + export const Strategy = { + SalesforceCommunity: "salesforce-community", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Create a connection with strategy=salesforce-sandbox */ export interface CreateConnectionRequestContentSalesforceSandbox extends Management.CreateConnectionCommon { - strategy: "salesforce-sandbox"; - options?: Management.ConnectionOptionsSalesforceSandbox; + strategy: CreateConnectionRequestContentSalesforceSandbox.Strategy; + options?: Management.ConnectionOptionsSalesforce; +} + +export namespace CreateConnectionRequestContentSalesforceSandbox { + export const Strategy = { + SalesforceSandbox: "salesforce-sandbox", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Create a connection with strategy=sharepoint */ export interface CreateConnectionRequestContentSharepoint extends Management.CreateConnectionCommon { - strategy: "sharepoint"; + strategy: CreateConnectionRequestContentSharepoint.Strategy; options?: Management.ConnectionOptionsSharepoint; show_as_button?: Management.ConnectionShowAsButton; } +export namespace CreateConnectionRequestContentSharepoint { + export const Strategy = { + Sharepoint: "sharepoint", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=shop */ export interface CreateConnectionRequestContentShop extends Management.CreateConnectionCommon { - strategy: "shop"; + strategy: CreateConnectionRequestContentShop.Strategy; options?: Management.ConnectionOptionsShop; } +export namespace CreateConnectionRequestContentShop { + export const Strategy = { + Shop: "shop", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=shopify */ export interface CreateConnectionRequestContentShopify extends Management.CreateConnectionCommon { - strategy: "shopify"; + strategy: CreateConnectionRequestContentShopify.Strategy; options?: Management.ConnectionOptionsShopify; } +export namespace CreateConnectionRequestContentShopify { + export const Strategy = { + Shopify: "shopify", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=soundcloud */ export interface CreateConnectionRequestContentSoundcloud extends Management.CreateConnectionCommon { - strategy: "soundcloud"; + strategy: CreateConnectionRequestContentSoundcloud.Strategy; options?: Management.ConnectionOptionsSoundcloud; } -/** - * Create a connection with strategy=thecity - */ -export interface CreateConnectionRequestContentTheCity extends Management.CreateConnectionCommon { - strategy: "thecity"; - options?: Management.ConnectionOptionsTheCity; -} - -/** - * Create a connection with strategy=thecity-sandbox - */ -export interface CreateConnectionRequestContentTheCitySandbox extends Management.CreateConnectionCommon { - strategy: "thecity-sandbox"; - options?: Management.ConnectionOptionsTheCitySandbox; +export namespace CreateConnectionRequestContentSoundcloud { + export const Strategy = { + Soundcloud: "soundcloud", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; } /** * Create a connection with strategy=thirtysevensignals */ export interface CreateConnectionRequestContentThirtySevenSignals extends Management.CreateConnectionCommon { - strategy: "thirtysevensignals"; + strategy: CreateConnectionRequestContentThirtySevenSignals.Strategy; options?: Management.ConnectionOptionsThirtySevenSignals; } +export namespace CreateConnectionRequestContentThirtySevenSignals { + export const Strategy = { + Thirtysevensignals: "thirtysevensignals", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=twitter */ export interface CreateConnectionRequestContentTwitter extends Management.CreateConnectionCommon { - strategy: "twitter"; + strategy: CreateConnectionRequestContentTwitter.Strategy; options?: Management.ConnectionOptionsTwitter; } +export namespace CreateConnectionRequestContentTwitter { + export const Strategy = { + Twitter: "twitter", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=untappd */ export interface CreateConnectionRequestContentUntappd extends Management.CreateConnectionCommon { - strategy: "untappd"; + strategy: CreateConnectionRequestContentUntappd.Strategy; options?: Management.ConnectionOptionsUntappd; } +export namespace CreateConnectionRequestContentUntappd { + export const Strategy = { + Untappd: "untappd", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=vkontakte */ export interface CreateConnectionRequestContentVkontakte extends Management.CreateConnectionCommon { - strategy: "vkontakte"; + strategy: CreateConnectionRequestContentVkontakte.Strategy; options?: Management.ConnectionOptionsVkontakte; } +export namespace CreateConnectionRequestContentVkontakte { + export const Strategy = { + Vkontakte: "vkontakte", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=weibo */ export interface CreateConnectionRequestContentWeibo extends Management.CreateConnectionCommon { - strategy: "weibo"; + strategy: CreateConnectionRequestContentWeibo.Strategy; options?: Management.ConnectionOptionsWeibo; } +export namespace CreateConnectionRequestContentWeibo { + export const Strategy = { + Weibo: "weibo", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=windowslive */ export interface CreateConnectionRequestContentWindowsLive extends Management.CreateConnectionCommon { - strategy: "windowslive"; + strategy: CreateConnectionRequestContentWindowsLive.Strategy; options?: Management.ConnectionOptionsWindowsLive; } +export namespace CreateConnectionRequestContentWindowsLive { + export const Strategy = { + Windowslive: "windowslive", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=wordpress */ export interface CreateConnectionRequestContentWordpress extends Management.CreateConnectionCommon { - strategy: "wordpress"; + strategy: CreateConnectionRequestContentWordpress.Strategy; options?: Management.ConnectionOptionsWordpress; } +export namespace CreateConnectionRequestContentWordpress { + export const Strategy = { + Wordpress: "wordpress", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=yahoo */ export interface CreateConnectionRequestContentYahoo extends Management.CreateConnectionCommon { - strategy: "yahoo"; + strategy: CreateConnectionRequestContentYahoo.Strategy; options?: Management.ConnectionOptionsYahoo; } +export namespace CreateConnectionRequestContentYahoo { + export const Strategy = { + Yahoo: "yahoo", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=yammer */ export interface CreateConnectionRequestContentYammer extends Management.CreateConnectionCommon { - strategy: "yammer"; + strategy: CreateConnectionRequestContentYammer.Strategy; options?: Management.ConnectionOptionsYammer; } +export namespace CreateConnectionRequestContentYammer { + export const Strategy = { + Yammer: "yammer", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + /** * Create a connection with strategy=yandex */ export interface CreateConnectionRequestContentYandex extends Management.CreateConnectionCommon { - strategy: "yandex"; + strategy: CreateConnectionRequestContentYandex.Strategy; options?: Management.ConnectionOptionsYandex; } +export namespace CreateConnectionRequestContentYandex { + export const Strategy = { + Yandex: "yandex", + } as const; + export type Strategy = (typeof Strategy)[keyof typeof Strategy]; +} + export interface CreateConnectionResponseContent { /** The name of the connection */ name?: string; @@ -6660,6 +8037,8 @@ export interface CreateCustomDomainResponseContent { domain: string; /** Whether this is a primary domain (true) or not (false). */ primary: boolean; + /** Whether this is the default custom domain (true) or not (false). */ + is_default?: boolean; status: Management.CustomDomainStatusFilterEnum; type: Management.CustomDomainTypeEnum; verification: Management.DomainVerification; @@ -6669,6 +8048,8 @@ export interface CreateCustomDomainResponseContent { tls_policy?: string; domain_metadata?: Management.DomainMetadata; certificate?: Management.DomainCertificate; + /** Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. */ + relying_party_identifier?: string; } export interface CreateDirectoryProvisioningRequestContent { @@ -7509,7 +8890,7 @@ export interface CreateOrganizationDiscoveryDomainResponseContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; @@ -7614,7 +8995,7 @@ export interface CreateResourceServerResponseContent { enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; token_encryption?: Management.ResourceServerTokenEncryption | null; - consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + consent_policy?: Management.ResourceServerConsentPolicyEnum | null; authorization_details?: unknown[]; proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; @@ -7889,6 +9270,8 @@ export interface CustomDomain { tls_policy?: string; domain_metadata?: Management.DomainMetadata; certificate?: Management.DomainCertificate; + /** Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. */ + relying_party_identifier?: string; } export type CustomDomainCustomClientIpHeader = (Management.CustomDomainCustomClientIpHeaderEnum | null) | undefined; @@ -7921,10 +9304,11 @@ export const CustomDomainStatusFilterEnum = { export type CustomDomainStatusFilterEnum = (typeof CustomDomainStatusFilterEnum)[keyof typeof CustomDomainStatusFilterEnum]; -/** - * Custom domain TLS policy. Must be `recommended`, includes TLS 1.2. - */ -export type CustomDomainTlsPolicyEnum = "recommended"; +/** Custom domain TLS policy. Must be `recommended`, includes TLS 1.2. */ +export const CustomDomainTlsPolicyEnum = { + Recommended: "recommended", +} as const; +export type CustomDomainTlsPolicyEnum = (typeof CustomDomainTlsPolicyEnum)[keyof typeof CustomDomainTlsPolicyEnum]; /** Custom domain provisioning type. Can be `auth0_managed_certs` or `self_managed_certs`. */ export const CustomDomainTypeEnum = { @@ -7933,10 +9317,12 @@ export const CustomDomainTypeEnum = { } as const; export type CustomDomainTypeEnum = (typeof CustomDomainTypeEnum)[keyof typeof CustomDomainTypeEnum]; -/** - * Custom domain verification method. Must be `txt`. - */ -export type CustomDomainVerificationMethodEnum = "txt"; +/** Custom domain verification method. Must be `txt`. */ +export const CustomDomainVerificationMethodEnum = { + Txt: "txt", +} as const; +export type CustomDomainVerificationMethodEnum = + (typeof CustomDomainVerificationMethodEnum)[keyof typeof CustomDomainVerificationMethodEnum]; export interface CustomProviderConfiguration { delivery_methods: Management.CustomProviderDeliveryMethodEnum[]; @@ -8004,7 +9390,11 @@ export interface CustomSigningKeyJwk { "x5t#S256"?: string; } -export type CustomSigningKeyOperationEnum = "verify"; +export const CustomSigningKeyOperationEnum = { + Verify: "verify", +} as const; +export type CustomSigningKeyOperationEnum = + (typeof CustomSigningKeyOperationEnum)[keyof typeof CustomSigningKeyOperationEnum]; /** Key type */ export const CustomSigningKeyTypeEnum = { @@ -8013,10 +9403,11 @@ export const CustomSigningKeyTypeEnum = { } as const; export type CustomSigningKeyTypeEnum = (typeof CustomSigningKeyTypeEnum)[keyof typeof CustomSigningKeyTypeEnum]; -/** - * Key use - */ -export type CustomSigningKeyUseEnum = "sig"; +/** Key use */ +export const CustomSigningKeyUseEnum = { + Sig: "sig", +} as const; +export type CustomSigningKeyUseEnum = (typeof CustomSigningKeyUseEnum)[keyof typeof CustomSigningKeyUseEnum]; export interface DailyStats { /** Date these events occurred in ISO 8601 format. */ @@ -8166,10 +9557,12 @@ export interface DeviceCredential { client_id?: string; } -/** - * Type of credential. Must be `public_key`. - */ -export type DeviceCredentialPublicKeyTypeEnum = "public_key"; +/** Type of credential. Must be `public_key`. */ +export const DeviceCredentialPublicKeyTypeEnum = { + PublicKey: "public_key", +} as const; +export type DeviceCredentialPublicKeyTypeEnum = + (typeof DeviceCredentialPublicKeyTypeEnum)[keyof typeof DeviceCredentialPublicKeyTypeEnum]; /** 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 = { @@ -8179,6 +9572,29 @@ export const DeviceCredentialTypeEnum = { } as const; export type DeviceCredentialTypeEnum = (typeof DeviceCredentialTypeEnum)[keyof typeof DeviceCredentialTypeEnum]; +export interface DirectoryProvisioning { + /** The connection's identifier */ + connection_id: string; + /** The connection's name */ + connection_name: string; + /** The connection's strategy */ + strategy: string; + /** The mapping between Auth0 and IDP user attributes */ + mapping: Management.DirectoryProvisioningMappingItem[]; + /** Whether periodic automatic synchronization is enabled */ + synchronize_automatically: boolean; + /** The timestamp at which the directory provisioning configuration was created */ + created_at: string; + /** The timestamp at which the directory provisioning configuration was last updated */ + updated_at: string; + /** The timestamp at which the connection was last synchronized */ + last_synchronization_at?: string; + /** The status of the last synchronization */ + last_synchronization_status?: string; + /** The error message of the last synchronization, if any */ + last_synchronization_error?: string; +} + export interface DirectoryProvisioningMappingItem { /** The field location in the Auth0 schema */ auth0: string; @@ -8272,10 +9688,11 @@ export interface EmailAttribute { signup?: Management.SignupVerified; } -/** - * Set to eu if your domain is provisioned to use Mailgun's EU region. Otherwise, set to null. - */ -export type EmailMailgunRegionEnum = "eu"; +/** Set to eu if your domain is provisioned to use Mailgun's EU region. Otherwise, set to null. */ +export const EmailMailgunRegionEnum = { + Eu: "eu", +} as const; +export type EmailMailgunRegionEnum = (typeof EmailMailgunRegionEnum)[keyof typeof EmailMailgunRegionEnum]; /** * Credentials required to use the provider. @@ -8354,10 +9771,11 @@ export type EmailProviderSettings = Record; */ export type EmailSmtpHost = string; -/** - * 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 = "eu"; +/** Set to eu to use SparkPost service hosted in Western Europe. To use SparkPost hosted in North America, set it to null. */ +export const EmailSparkPostRegionEnum = { + Eu: "eu", +} as const; +export type EmailSparkPostRegionEnum = (typeof EmailSparkPostRegionEnum)[keyof typeof EmailSparkPostRegionEnum]; /** * Specific provider setting @@ -8407,10 +9825,12 @@ export interface EncryptionKey { public_key?: string; } -/** - * Encryption algorithm that shall be used to wrap your key material - */ -export type EncryptionKeyPublicWrappingAlgorithm = "CKM_RSA_AES_KEY_WRAP"; +/** Encryption algorithm that shall be used to wrap your key material */ +export const EncryptionKeyPublicWrappingAlgorithm = { + CkmRsaAesKeyWrap: "CKM_RSA_AES_KEY_WRAP", +} as const; +export type EncryptionKeyPublicWrappingAlgorithm = + (typeof EncryptionKeyPublicWrappingAlgorithm)[keyof typeof EncryptionKeyPublicWrappingAlgorithm]; /** Key state */ export const EncryptionKeyState = { @@ -8443,7 +9863,11 @@ export interface EventStreamActionDestination { configuration: Management.EventStreamActionConfiguration; } -export type EventStreamActionDestinationTypeEnum = "action"; +export const EventStreamActionDestinationTypeEnum = { + Action: "action", +} as const; +export type EventStreamActionDestinationTypeEnum = + (typeof EventStreamActionDestinationTypeEnum)[keyof typeof EventStreamActionDestinationTypeEnum]; export interface EventStreamActionResponseContent { /** Unique identifier for the event stream. */ @@ -8525,10 +9949,12 @@ export const EventStreamDeliveryEventTypeEnum = { export type EventStreamDeliveryEventTypeEnum = (typeof EventStreamDeliveryEventTypeEnum)[keyof typeof EventStreamDeliveryEventTypeEnum]; -/** - * Delivery status - */ -export type EventStreamDeliveryStatusEnum = "failed"; +/** Delivery status */ +export const EventStreamDeliveryStatusEnum = { + Failed: "failed", +} as const; +export type EventStreamDeliveryStatusEnum = + (typeof EventStreamDeliveryStatusEnum)[keyof typeof EventStreamDeliveryStatusEnum]; export type EventStreamDestinationPatch = | Management.EventStreamWebhookDestination @@ -8592,7 +10018,11 @@ export interface EventStreamEventBridgeDestination { configuration: Management.EventStreamEventBridgeConfiguration; } -export type EventStreamEventBridgeDestinationTypeEnum = "eventbridge"; +export const EventStreamEventBridgeDestinationTypeEnum = { + Eventbridge: "eventbridge", +} as const; +export type EventStreamEventBridgeDestinationTypeEnum = + (typeof EventStreamEventBridgeDestinationTypeEnum)[keyof typeof EventStreamEventBridgeDestinationTypeEnum]; export interface EventStreamEventBridgeResponseContent { /** Unique identifier for the event stream. */ @@ -8687,10 +10117,12 @@ export interface EventStreamWebhookBasicAuth { username: string; } -/** - * Type of authorization. - */ -export type EventStreamWebhookBasicAuthMethodEnum = "basic"; +/** Type of authorization. */ +export const EventStreamWebhookBasicAuthMethodEnum = { + Basic: "basic", +} as const; +export type EventStreamWebhookBasicAuthMethodEnum = + (typeof EventStreamWebhookBasicAuthMethodEnum)[keyof typeof EventStreamWebhookBasicAuthMethodEnum]; /** * Bearer Authorization for HTTP requests (e.g., 'Bearer token'). @@ -8699,10 +10131,12 @@ export interface EventStreamWebhookBearerAuth { method: Management.EventStreamWebhookBearerAuthMethodEnum; } -/** - * Type of authorization. - */ -export type EventStreamWebhookBearerAuthMethodEnum = "bearer"; +/** Type of authorization. */ +export const EventStreamWebhookBearerAuthMethodEnum = { + Bearer: "bearer", +} as const; +export type EventStreamWebhookBearerAuthMethodEnum = + (typeof EventStreamWebhookBearerAuthMethodEnum)[keyof typeof EventStreamWebhookBearerAuthMethodEnum]; /** * Configuration specific to a webhook destination. @@ -8718,7 +10152,11 @@ export interface EventStreamWebhookDestination { configuration: Management.EventStreamWebhookConfiguration; } -export type EventStreamWebhookDestinationTypeEnum = "webhook"; +export const EventStreamWebhookDestinationTypeEnum = { + Webhook: "webhook", +} as const; +export type EventStreamWebhookDestinationTypeEnum = + (typeof EventStreamWebhookDestinationTypeEnum)[keyof typeof EventStreamWebhookDestinationTypeEnum]; export interface EventStreamWebhookResponseContent { /** Unique identifier for the event stream. */ @@ -8830,13 +10268,24 @@ export type FlowActionActivecampaign = export interface FlowActionActivecampaignListContacts { id: string; alias?: string; - type: "ACTIVECAMPAIGN"; - action: "LIST_CONTACTS"; + type: FlowActionActivecampaignListContacts.Type; + action: FlowActionActivecampaignListContacts.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionActivecampaignListContactsParams; } +export namespace FlowActionActivecampaignListContacts { + export const Type = { + Activecampaign: "ACTIVECAMPAIGN", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + ListContacts: "LIST_CONTACTS", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionActivecampaignListContactsParams { connection_id: string; email: string; @@ -8845,13 +10294,24 @@ export interface FlowActionActivecampaignListContactsParams { export interface FlowActionActivecampaignUpsertContact { id: string; alias?: string; - type: "ACTIVECAMPAIGN"; - action: "UPSERT_CONTACT"; + type: FlowActionActivecampaignUpsertContact.Type; + action: FlowActionActivecampaignUpsertContact.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionActivecampaignUpsertContactParams; } +export namespace FlowActionActivecampaignUpsertContact { + export const Type = { + Activecampaign: "ACTIVECAMPAIGN", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + UpsertContact: "UPSERT_CONTACT", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionActivecampaignUpsertContactParams { connection_id: string; email: string; @@ -8871,13 +10331,24 @@ export type FlowActionAirtable = export interface FlowActionAirtableCreateRecord { id: string; alias?: string; - type: "AIRTABLE"; - action: "CREATE_RECORD"; + type: FlowActionAirtableCreateRecord.Type; + action: FlowActionAirtableCreateRecord.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAirtableCreateRecordParams; } +export namespace FlowActionAirtableCreateRecord { + export const Type = { + Airtable: "AIRTABLE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + CreateRecord: "CREATE_RECORD", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAirtableCreateRecordParams { connection_id: string; base_id: string; @@ -8890,13 +10361,24 @@ export type FlowActionAirtableCreateRecordParamsFields = Record export interface FlowActionAirtableListRecords { id: string; alias?: string; - type: "AIRTABLE"; - action: "LIST_RECORDS"; + type: FlowActionAirtableListRecords.Type; + action: FlowActionAirtableListRecords.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAirtableListRecordsParams; } +export namespace FlowActionAirtableListRecords { + export const Type = { + Airtable: "AIRTABLE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + ListRecords: "LIST_RECORDS", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAirtableListRecordsParams { connection_id: string; base_id: string; @@ -8908,13 +10390,24 @@ export interface FlowActionAirtableListRecordsParams { export interface FlowActionAirtableUpdateRecord { id: string; alias?: string; - type: "AIRTABLE"; - action: "UPDATE_RECORD"; + type: FlowActionAirtableUpdateRecord.Type; + action: FlowActionAirtableUpdateRecord.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAirtableUpdateRecordParams; } +export namespace FlowActionAirtableUpdateRecord { + export const Type = { + Airtable: "AIRTABLE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + UpdateRecord: "UPDATE_RECORD", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAirtableUpdateRecordParams { connection_id: string; base_id: string; @@ -8930,18 +10423,31 @@ export type FlowActionAuth0 = | Management.FlowActionAuth0GetUser | Management.FlowActionAuth0UpdateUser | Management.FlowActionAuth0SendRequest - | Management.FlowActionAuth0SendEmail; + | Management.FlowActionAuth0SendEmail + | Management.FlowActionAuth0SendSms + | Management.FlowActionAuth0MakeCall; export interface FlowActionAuth0CreateUser { id: string; alias?: string; - type: "AUTH0"; - action: "CREATE_USER"; + type: FlowActionAuth0CreateUser.Type; + action: FlowActionAuth0CreateUser.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAuth0CreateUserParams; } +export namespace FlowActionAuth0CreateUser { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + CreateUser: "CREATE_USER", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAuth0CreateUserParams { connection_id: string; payload: Management.FlowActionAuth0CreateUserParamsPayload; @@ -8952,28 +10458,80 @@ export type FlowActionAuth0CreateUserParamsPayload = Record; export interface FlowActionAuth0GetUser { id: string; alias?: string; - type: "AUTH0"; - action: "GET_USER"; + type: FlowActionAuth0GetUser.Type; + action: FlowActionAuth0GetUser.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAuth0GetUserParams; } +export namespace FlowActionAuth0GetUser { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + GetUser: "GET_USER", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAuth0GetUserParams { connection_id: string; user_id: string; } +export interface FlowActionAuth0MakeCall { + id: string; + alias?: string; + type: FlowActionAuth0MakeCall.Type; + action: FlowActionAuth0MakeCall.Action; + allow_failure?: boolean; + mask_output?: boolean; + params: Management.FlowActionAuth0MakeCallParams; +} + +export namespace FlowActionAuth0MakeCall { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + MakeCall: "MAKE_CALL", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + +export interface FlowActionAuth0MakeCallParams { + from?: string; + to: string; + message: string; + custom_vars?: Management.FlowActionAuth0MakeCallParamsCustomVars; +} + +export type FlowActionAuth0MakeCallParamsCustomVars = Record; + export interface FlowActionAuth0SendEmail { id: string; alias?: string; - type: "AUTH0"; - action: "SEND_EMAIL"; + type: FlowActionAuth0SendEmail.Type; + action: FlowActionAuth0SendEmail.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAuth0SendEmailParams; } +export namespace FlowActionAuth0SendEmail { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + SendEmail: "SEND_EMAIL", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAuth0SendEmailParams { from?: Management.FlowActionAuth0SendEmailParamsFrom; to: Management.FlowActionAuth0SendEmailParamsTo; @@ -8994,13 +10552,24 @@ export type FlowActionAuth0SendEmailParamsTo = string; export interface FlowActionAuth0SendRequest { id: string; alias?: string; - type: "AUTH0"; - action: "SEND_REQUEST"; + type: FlowActionAuth0SendRequest.Type; + action: FlowActionAuth0SendRequest.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAuth0SendRequestParams; } +export namespace FlowActionAuth0SendRequest { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + SendRequest: "SEND_REQUEST", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAuth0SendRequestParams { connection_id: string; pathname: string; @@ -9041,16 +10610,57 @@ export namespace FlowActionAuth0SendRequestParamsQueryParams { export type Value = number | string; } +export interface FlowActionAuth0SendSms { + id: string; + alias?: string; + type: FlowActionAuth0SendSms.Type; + action: FlowActionAuth0SendSms.Action; + allow_failure?: boolean; + mask_output?: boolean; + params: Management.FlowActionAuth0SendSmsParams; +} + +export namespace FlowActionAuth0SendSms { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + SendSms: "SEND_SMS", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + +export interface FlowActionAuth0SendSmsParams { + from?: string; + to: string; + message: string; + custom_vars?: Management.FlowActionAuth0SendSmsParamsCustomVars; +} + +export type FlowActionAuth0SendSmsParamsCustomVars = Record; + export interface FlowActionAuth0UpdateUser { id: string; alias?: string; - type: "AUTH0"; - action: "UPDATE_USER"; + type: FlowActionAuth0UpdateUser.Type; + action: FlowActionAuth0UpdateUser.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionAuth0UpdateUserParams; } +export namespace FlowActionAuth0UpdateUser { + export const Type = { + Auth0: "AUTH0", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + UpdateUser: "UPDATE_USER", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionAuth0UpdateUserParams { connection_id: string; user_id: string; @@ -9064,13 +10674,24 @@ export type FlowActionBigquery = Management.FlowActionBigqueryInsertRows; export interface FlowActionBigqueryInsertRows { id: string; alias?: string; - type: "BIGQUERY"; - action: "INSERT_ROWS"; + type: FlowActionBigqueryInsertRows.Type; + action: FlowActionBigqueryInsertRows.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionBigqueryInsertRowsParams; } +export namespace FlowActionBigqueryInsertRows { + export const Type = { + Bigquery: "BIGQUERY", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + InsertRows: "INSERT_ROWS", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionBigqueryInsertRowsParams { connection_id: string; dataset_id: string; @@ -9085,13 +10706,24 @@ export type FlowActionClearbit = Management.FlowActionClearbitFindPerson | Manag export interface FlowActionClearbitFindCompany { id: string; alias?: string; - type: "CLEARBIT"; - action: "FIND_COMPANY"; + type: FlowActionClearbitFindCompany.Type; + action: FlowActionClearbitFindCompany.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionClearbitFindCompanyParams; } +export namespace FlowActionClearbitFindCompany { + export const Type = { + Clearbit: "CLEARBIT", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + FindCompany: "FIND_COMPANY", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionClearbitFindCompanyParams { connection_id: string; domain: string; @@ -9100,13 +10732,24 @@ export interface FlowActionClearbitFindCompanyParams { export interface FlowActionClearbitFindPerson { id: string; alias?: string; - type: "CLEARBIT"; - action: "FIND_PERSON"; + type: FlowActionClearbitFindPerson.Type; + action: FlowActionClearbitFindPerson.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionClearbitFindPersonParams; } +export namespace FlowActionClearbitFindPerson { + export const Type = { + Clearbit: "CLEARBIT", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + FindPerson: "FIND_PERSON", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionClearbitFindPersonParams { connection_id: string; email: string; @@ -9117,13 +10760,24 @@ export type FlowActionEmail = Management.FlowActionEmailVerifyEmail; export interface FlowActionEmailVerifyEmail { id: string; alias?: string; - type: "EMAIL"; - action: "VERIFY_EMAIL"; + type: FlowActionEmailVerifyEmail.Type; + action: FlowActionEmailVerifyEmail.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionEmailVerifyEmailParams; } +export namespace FlowActionEmailVerifyEmail { + export const Type = { + Email: "EMAIL", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + VerifyEmail: "VERIFY_EMAIL", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionEmailVerifyEmailParams { email: string; rules?: Management.FlowActionEmailVerifyEmailParamsRules; @@ -9150,13 +10804,24 @@ export type FlowActionFlow = export interface FlowActionFlowBooleanCondition { id: string; alias?: string; - type: "FLOW"; - action: "BOOLEAN_CONDITION"; + type: FlowActionFlowBooleanCondition.Type; + action: FlowActionFlowBooleanCondition.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionFlowBooleanConditionParams; } +export namespace FlowActionFlowBooleanCondition { + export const Type = { + Flow: "FLOW", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + BooleanCondition: "BOOLEAN_CONDITION", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionFlowBooleanConditionParams { then?: Management.FlowAction[]; else?: Management.FlowAction[]; @@ -9165,13 +10830,24 @@ export interface FlowActionFlowBooleanConditionParams { export interface FlowActionFlowDelayFlow { id: string; alias?: string; - type: "FLOW"; - action: "DELAY_FLOW"; + type: FlowActionFlowDelayFlow.Type; + action: FlowActionFlowDelayFlow.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionFlowDelayFlowParams; } +export namespace FlowActionFlowDelayFlow { + export const Type = { + Flow: "FLOW", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + DelayFlow: "DELAY_FLOW", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionFlowDelayFlowParams { number: Management.FlowActionFlowDelayFlowParamsNumber; units?: FlowActionFlowDelayFlowParams.Units; @@ -9192,25 +10868,47 @@ export type FlowActionFlowDelayFlowParamsNumber = number | string; export interface FlowActionFlowDoNothing { id: string; alias?: string; - type: "FLOW"; - action: "DO_NOTHING"; + type: FlowActionFlowDoNothing.Type; + action: FlowActionFlowDoNothing.Action; allow_failure?: boolean; mask_output?: boolean; params?: Management.FlowActionFlowDoNothingParams; } +export namespace FlowActionFlowDoNothing { + export const Type = { + Flow: "FLOW", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + DoNothing: "DO_NOTHING", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionFlowDoNothingParams {} export interface FlowActionFlowErrorMessage { id: string; alias?: string; - type: "FLOW"; - action: "ERROR_MESSAGE"; + type: FlowActionFlowErrorMessage.Type; + action: FlowActionFlowErrorMessage.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionFlowErrorMessageParams; } +export namespace FlowActionFlowErrorMessage { + export const Type = { + Flow: "FLOW", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + ErrorMessage: "ERROR_MESSAGE", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionFlowErrorMessageParams { message: string; } @@ -9218,13 +10916,24 @@ export interface FlowActionFlowErrorMessageParams { export interface FlowActionFlowMapValue { id: string; alias?: string; - type: "FLOW"; - action: "MAP_VALUE"; + type: FlowActionFlowMapValue.Type; + action: FlowActionFlowMapValue.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionFlowMapValueParams; } +export namespace FlowActionFlowMapValue { + export const Type = { + Flow: "FLOW", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + MapValue: "MAP_VALUE", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionFlowMapValueParams { input: Management.FlowActionFlowMapValueParamsInput; cases?: Management.FlowActionFlowMapValueParamsCases; @@ -9246,13 +10955,24 @@ export type FlowActionFlowMapValueParamsInput = string | number; export interface FlowActionFlowReturnJson { id: string; alias?: string; - type: "FLOW"; - action: "RETURN_JSON"; + type: FlowActionFlowReturnJson.Type; + action: FlowActionFlowReturnJson.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionFlowReturnJsonParams; } +export namespace FlowActionFlowReturnJson { + export const Type = { + Flow: "FLOW", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + ReturnJson: "RETURN_JSON", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionFlowReturnJsonParams { payload: Management.FlowActionFlowReturnJsonParamsPayload; } @@ -9264,13 +10984,24 @@ export type FlowActionFlowReturnJsonParamsPayloadObject = Record; export interface FlowActionJsonParseJson { id: string; alias?: string; - type: "JSON"; - action: "PARSE_JSON"; + type: FlowActionJsonParseJson.Type; + action: FlowActionJsonParseJson.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionJsonParseJsonParams; } +export namespace FlowActionJsonParseJson { + export const Type = { + Json: "JSON", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + ParseJson: "PARSE_JSON", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionJsonParseJsonParams { json: string; } @@ -9461,13 +11269,24 @@ export interface FlowActionJsonParseJsonParams { export interface FlowActionJsonSerializeJson { id: string; alias?: string; - type: "JSON"; - action: "SERIALIZE_JSON"; + type: FlowActionJsonSerializeJson.Type; + action: FlowActionJsonSerializeJson.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionJsonSerializeJsonParams; } +export namespace FlowActionJsonSerializeJson { + export const Type = { + Json: "JSON", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + SerializeJson: "SERIALIZE_JSON", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionJsonSerializeJsonParams { object: Management.FlowActionJsonSerializeJsonParamsObject; } @@ -9484,13 +11303,24 @@ export type FlowActionJwt = export interface FlowActionJwtDecodeJwt { id: string; alias?: string; - type: "JWT"; - action: "DECODE_JWT"; + type: FlowActionJwtDecodeJwt.Type; + action: FlowActionJwtDecodeJwt.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionJwtDecodeJwtParams; } +export namespace FlowActionJwtDecodeJwt { + export const Type = { + Jwt: "JWT", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + DecodeJwt: "DECODE_JWT", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionJwtDecodeJwtParams { token: string; } @@ -9498,13 +11328,24 @@ export interface FlowActionJwtDecodeJwtParams { export interface FlowActionJwtSignJwt { id: string; alias?: string; - type: "JWT"; - action: "SIGN_JWT"; + type: FlowActionJwtSignJwt.Type; + action: FlowActionJwtSignJwt.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionJwtSignJwtParams; } +export namespace FlowActionJwtSignJwt { + export const Type = { + Jwt: "JWT", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + SignJwt: "SIGN_JWT", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionJwtSignJwtParams { connection_id: string; payload?: Management.FlowActionJwtSignJwtParamsPayload; @@ -9519,13 +11360,24 @@ export type FlowActionJwtSignJwtParamsPayload = Record; export interface FlowActionJwtVerifyJwt { id: string; alias?: string; - type: "JWT"; - action: "VERIFY_JWT"; + type: FlowActionJwtVerifyJwt.Type; + action: FlowActionJwtVerifyJwt.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionJwtVerifyJwtParams; } +export namespace FlowActionJwtVerifyJwt { + export const Type = { + Jwt: "JWT", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + VerifyJwt: "VERIFY_JWT", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionJwtVerifyJwtParams { connection_id: string; token: string; @@ -9538,13 +11390,24 @@ export type FlowActionMailchimp = Management.FlowActionMailchimpUpsertMember; export interface FlowActionMailchimpUpsertMember { id: string; alias?: string; - type: "MAILCHIMP"; - action: "UPSERT_MEMBER"; + type: FlowActionMailchimpUpsertMember.Type; + action: FlowActionMailchimpUpsertMember.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionMailchimpUpsertMemberParams; } +export namespace FlowActionMailchimpUpsertMember { + export const Type = { + Mailchimp: "MAILCHIMP", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + UpsertMember: "UPSERT_MEMBER", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionMailchimpUpsertMemberParams { connection_id: string; list_id: string; @@ -9564,13 +11427,24 @@ export type FlowActionMailjet = Management.FlowActionMailjetSendEmail; export interface FlowActionMailjetSendEmail { id: string; alias?: string; - type: "MAILJET"; - action: "SEND_EMAIL"; + type: FlowActionMailjetSendEmail.Type; + action: FlowActionMailjetSendEmail.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionMailjetSendEmailParams; } +export namespace FlowActionMailjetSendEmail { + export const Type = { + Mailjet: "MAILJET", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + SendEmail: "SEND_EMAIL", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export type FlowActionMailjetSendEmailParams = | { content: string; @@ -9587,13 +11461,24 @@ export type FlowActionOtp = Management.FlowActionOtpGenerateCode | Management.Fl export interface FlowActionOtpGenerateCode { id: string; alias?: string; - type: "OTP"; - action: "GENERATE_CODE"; + type: FlowActionOtpGenerateCode.Type; + action: FlowActionOtpGenerateCode.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionOtpGenerateCodeParams; } +export namespace FlowActionOtpGenerateCode { + export const Type = { + Otp: "OTP", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + GenerateCode: "GENERATE_CODE", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionOtpGenerateCodeParams { reference: string; length: number; @@ -9602,13 +11487,24 @@ export interface FlowActionOtpGenerateCodeParams { export interface FlowActionOtpVerifyCode { id: string; alias?: string; - type: "OTP"; - action: "VERIFY_CODE"; + type: FlowActionOtpVerifyCode.Type; + action: FlowActionOtpVerifyCode.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionOtpVerifyCodeParams; } +export namespace FlowActionOtpVerifyCode { + export const Type = { + Otp: "OTP", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + VerifyCode: "VERIFY_CODE", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionOtpVerifyCodeParams { reference: string; code: Management.FlowActionOtpVerifyCodeParamsCode; @@ -9624,13 +11520,24 @@ export type FlowActionPipedrive = export interface FlowActionPipedriveAddDeal { id: string; alias?: string; - type: "PIPEDRIVE"; - action: "ADD_DEAL"; + type: FlowActionPipedriveAddDeal.Type; + action: FlowActionPipedriveAddDeal.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionPipedriveAddDealParams; } +export namespace FlowActionPipedriveAddDeal { + export const Type = { + Pipedrive: "PIPEDRIVE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + AddDeal: "ADD_DEAL", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionPipedriveAddDealParams { connection_id: string; title: string; @@ -9655,13 +11562,24 @@ export type FlowActionPipedriveAddDealParamsUserId = string | number; export interface FlowActionPipedriveAddOrganization { id: string; alias?: string; - type: "PIPEDRIVE"; - action: "ADD_ORGANIZATION"; + type: FlowActionPipedriveAddOrganization.Type; + action: FlowActionPipedriveAddOrganization.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionPipedriveAddOrganizationParams; } +export namespace FlowActionPipedriveAddOrganization { + export const Type = { + Pipedrive: "PIPEDRIVE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + AddOrganization: "ADD_ORGANIZATION", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionPipedriveAddOrganizationParams { connection_id: string; name: string; @@ -9676,13 +11594,24 @@ export type FlowActionPipedriveAddOrganizationParamsOwnerId = string | number; export interface FlowActionPipedriveAddPerson { id: string; alias?: string; - type: "PIPEDRIVE"; - action: "ADD_PERSON"; + type: FlowActionPipedriveAddPerson.Type; + action: FlowActionPipedriveAddPerson.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionPipedriveAddPersonParams; } +export namespace FlowActionPipedriveAddPerson { + export const Type = { + Pipedrive: "PIPEDRIVE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + AddPerson: "ADD_PERSON", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionPipedriveAddPersonParams { connection_id: string; name: string; @@ -9708,13 +11637,24 @@ export type FlowActionSalesforce = export interface FlowActionSalesforceCreateLead { id: string; alias?: string; - type: "SALESFORCE"; - action: "CREATE_LEAD"; + type: FlowActionSalesforceCreateLead.Type; + action: FlowActionSalesforceCreateLead.Action; allow_failure?: boolean; mask_output?: boolean; params: Management.FlowActionSalesforceCreateLeadParams; } +export namespace FlowActionSalesforceCreateLead { + export const Type = { + Salesforce: "SALESFORCE", + } as const; + export type Type = (typeof Type)[keyof typeof Type]; + export const Action = { + CreateLead: "CREATE_LEAD", + } as const; + export type Action = (typeof Action)[keyof typeof Action]; +} + export interface FlowActionSalesforceCreateLeadParams { connection_id: string; first_name?: string; @@ -9730,13 +11670,24 @@ export type FlowActionSalesforceCreateLeadParamsPayload = Record; @@ -11020,37 +13302,85 @@ export interface FormFieldTextConfig { max_length?: number; } -export type FormFieldTypeBooleanConst = "BOOLEAN"; +export const FormFieldTypeBooleanConst = { + Boolean: "BOOLEAN", +} as const; +export type FormFieldTypeBooleanConst = (typeof FormFieldTypeBooleanConst)[keyof typeof FormFieldTypeBooleanConst]; -export type FormFieldTypeCardsConst = "CARDS"; +export const FormFieldTypeCardsConst = { + Cards: "CARDS", +} as const; +export type FormFieldTypeCardsConst = (typeof FormFieldTypeCardsConst)[keyof typeof FormFieldTypeCardsConst]; -export type FormFieldTypeChoiceConst = "CHOICE"; +export const FormFieldTypeChoiceConst = { + Choice: "CHOICE", +} as const; +export type FormFieldTypeChoiceConst = (typeof FormFieldTypeChoiceConst)[keyof typeof FormFieldTypeChoiceConst]; -export type FormFieldTypeCustomConst = "CUSTOM"; +export const FormFieldTypeCustomConst = { + Custom: "CUSTOM", +} as const; +export type FormFieldTypeCustomConst = (typeof FormFieldTypeCustomConst)[keyof typeof FormFieldTypeCustomConst]; -export type FormFieldTypeDateConst = "DATE"; +export const FormFieldTypeDateConst = { + Date: "DATE", +} as const; +export type FormFieldTypeDateConst = (typeof FormFieldTypeDateConst)[keyof typeof FormFieldTypeDateConst]; -export type FormFieldTypeDropdownConst = "DROPDOWN"; +export const FormFieldTypeDropdownConst = { + Dropdown: "DROPDOWN", +} as const; +export type FormFieldTypeDropdownConst = (typeof FormFieldTypeDropdownConst)[keyof typeof FormFieldTypeDropdownConst]; -export type FormFieldTypeEmailConst = "EMAIL"; +export const FormFieldTypeEmailConst = { + Email: "EMAIL", +} as const; +export type FormFieldTypeEmailConst = (typeof FormFieldTypeEmailConst)[keyof typeof FormFieldTypeEmailConst]; -export type FormFieldTypeFileConst = "FILE"; +export const FormFieldTypeFileConst = { + File: "FILE", +} as const; +export type FormFieldTypeFileConst = (typeof FormFieldTypeFileConst)[keyof typeof FormFieldTypeFileConst]; -export type FormFieldTypeLegalConst = "LEGAL"; +export const FormFieldTypeLegalConst = { + Legal: "LEGAL", +} as const; +export type FormFieldTypeLegalConst = (typeof FormFieldTypeLegalConst)[keyof typeof FormFieldTypeLegalConst]; -export type FormFieldTypeNumberConst = "NUMBER"; +export const FormFieldTypeNumberConst = { + Number: "NUMBER", +} as const; +export type FormFieldTypeNumberConst = (typeof FormFieldTypeNumberConst)[keyof typeof FormFieldTypeNumberConst]; -export type FormFieldTypePasswordConst = "PASSWORD"; +export const FormFieldTypePasswordConst = { + Password: "PASSWORD", +} as const; +export type FormFieldTypePasswordConst = (typeof FormFieldTypePasswordConst)[keyof typeof FormFieldTypePasswordConst]; -export type FormFieldTypePaymentConst = "PAYMENT"; +export const FormFieldTypePaymentConst = { + Payment: "PAYMENT", +} as const; +export type FormFieldTypePaymentConst = (typeof FormFieldTypePaymentConst)[keyof typeof FormFieldTypePaymentConst]; -export type FormFieldTypeSocialConst = "SOCIAL"; +export const FormFieldTypeSocialConst = { + Social: "SOCIAL", +} as const; +export type FormFieldTypeSocialConst = (typeof FormFieldTypeSocialConst)[keyof typeof FormFieldTypeSocialConst]; -export type FormFieldTypeTelConst = "TEL"; +export const FormFieldTypeTelConst = { + Tel: "TEL", +} as const; +export type FormFieldTypeTelConst = (typeof FormFieldTypeTelConst)[keyof typeof FormFieldTypeTelConst]; -export type FormFieldTypeTextConst = "TEXT"; +export const FormFieldTypeTextConst = { + Text: "TEXT", +} as const; +export type FormFieldTypeTextConst = (typeof FormFieldTypeTextConst)[keyof typeof FormFieldTypeTextConst]; -export type FormFieldTypeUrlConst = "URL"; +export const FormFieldTypeUrlConst = { + Url: "URL", +} as const; +export type FormFieldTypeUrlConst = (typeof FormFieldTypeUrlConst)[keyof typeof FormFieldTypeUrlConst]; export interface FormFieldUrl { id: string; @@ -11117,11 +13447,20 @@ export type FormNodeListNullable = (Management.FormNodeList | null) | undefined; export type FormNodePointer = string | Management.FormEndingNodeId; -export type FormNodeTypeFlowConst = "FLOW"; +export const FormNodeTypeFlowConst = { + Flow: "FLOW", +} as const; +export type FormNodeTypeFlowConst = (typeof FormNodeTypeFlowConst)[keyof typeof FormNodeTypeFlowConst]; -export type FormNodeTypeRouterConst = "ROUTER"; +export const FormNodeTypeRouterConst = { + Router: "ROUTER", +} as const; +export type FormNodeTypeRouterConst = (typeof FormNodeTypeRouterConst)[keyof typeof FormNodeTypeRouterConst]; -export type FormNodeTypeStepConst = "STEP"; +export const FormNodeTypeStepConst = { + Step: "STEP", +} as const; +export type FormNodeTypeStepConst = (typeof FormNodeTypeStepConst)[keyof typeof FormNodeTypeStepConst]; export interface FormRouter { id: string; @@ -11240,11 +13579,23 @@ export interface FormWidgetRecaptchaConfig { secret_key: string; } -export type FormWidgetTypeAuth0VerifiableCredentialsConst = "AUTH0_VERIFIABLE_CREDENTIALS"; +export const FormWidgetTypeAuth0VerifiableCredentialsConst = { + Auth0VerifiableCredentials: "AUTH0_VERIFIABLE_CREDENTIALS", +} as const; +export type FormWidgetTypeAuth0VerifiableCredentialsConst = + (typeof FormWidgetTypeAuth0VerifiableCredentialsConst)[keyof typeof FormWidgetTypeAuth0VerifiableCredentialsConst]; -export type FormWidgetTypeGMapsAddressConst = "GMAPS_ADDRESS"; +export const FormWidgetTypeGMapsAddressConst = { + GmapsAddress: "GMAPS_ADDRESS", +} as const; +export type FormWidgetTypeGMapsAddressConst = + (typeof FormWidgetTypeGMapsAddressConst)[keyof typeof FormWidgetTypeGMapsAddressConst]; -export type FormWidgetTypeRecaptchaConst = "RECAPTCHA"; +export const FormWidgetTypeRecaptchaConst = { + Recaptcha: "RECAPTCHA", +} as const; +export type FormWidgetTypeRecaptchaConst = + (typeof FormWidgetTypeRecaptchaConst)[keyof typeof FormWidgetTypeRecaptchaConst]; export const FormsRequestParametersHydrateEnum = { FlowCount: "flow_count", @@ -11268,6 +13619,74 @@ export interface GetActionExecutionResponseContent { updated_at?: string; } +export interface GetActionModuleActionsResponseContent { + /** A list of action references. */ + actions?: Management.ActionModuleAction[]; + /** The total number of actions using this module. */ + total?: number; + /** The page index of the returned results. */ + page?: number; + /** The number of results requested per page. */ + per_page?: number; +} + +export interface GetActionModuleResponseContent { + /** The unique ID of the module. */ + id?: string; + /** The name of the module. */ + name?: string; + /** The source code from the module's draft version. */ + code?: string; + /** The npm dependencies from the module's draft version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The secrets from the module's draft version (names and timestamps only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** The number of deployed actions using this module. */ + actions_using_module_total?: number; + /** Whether all draft changes have been published as a version. */ + all_changes_published?: boolean; + /** The version number of the latest published version. Omitted if no versions have been published. */ + latest_version_number?: number; + /** Timestamp when the module was created. */ + created_at?: string; + /** Timestamp when the module was last updated. */ + updated_at?: string; + latest_version?: Management.ActionModuleVersionReference; +} + +export interface GetActionModuleVersionResponseContent { + /** The unique ID for this version. */ + id?: string; + /** The ID of the parent module. */ + module_id?: string; + /** The sequential version number. */ + version_number?: number; + /** The exact source code that was published with this version. */ + code?: string; + /** Secrets available to this version (name and updated_at only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** Dependencies locked to this version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The timestamp when this version was created. */ + created_at?: string; +} + +export interface GetActionModuleVersionsResponseContent { + /** A list of ActionsModuleVersion objects. */ + versions?: Management.ActionModuleVersion[]; +} + +export interface GetActionModulesResponseContent { + /** A list of ActionsModule objects. */ + modules?: Management.ActionModuleListItem[]; + /** The total number of modules in the tenant. */ + total?: number; + /** The page index of the returned results. */ + page?: number; + /** The number of results requested per page. */ + per_page?: number; +} + export interface GetActionResponseContent { /** The unique ID of the action. */ id?: string; @@ -11516,6 +13935,27 @@ export interface GetClientCredentialResponseContent { [key: string]: any; } +export interface GetClientGrantResponseContent { + /** ID of the client grant. */ + id?: string; + /** ID of the client. */ + client_id?: string; + /** The audience (API identifier) of this client grant. */ + audience?: string; + /** Scopes allowed for this client grant. */ + scope?: 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; + /** If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ + is_system?: boolean; + subject_type?: Management.ClientGrantSubjectTypeEnum; + /** Types of authorization_details allowed for this client grant. */ + authorization_details_types?: string[]; + /** If enabled, all scopes configured on the resource server are allowed for this grant. */ + allow_all_scopes?: boolean; +} + export interface GetClientResponseContent { /** ID of this client. */ client_id?: string; @@ -11680,6 +14120,8 @@ export interface GetCustomDomainResponseContent { tls_policy?: string; domain_metadata?: Management.DomainMetadata; certificate?: Management.DomainCertificate; + /** Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. */ + relying_party_identifier?: string; } /** @@ -12165,7 +14607,7 @@ export interface GetOrganizationDiscoveryDomainByNameResponseContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; @@ -12179,7 +14621,7 @@ export interface GetOrganizationDiscoveryDomainResponseContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; @@ -12290,7 +14732,7 @@ export interface GetResourceServerResponseContent { enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; token_encryption?: Management.ResourceServerTokenEncryption | null; - consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + consent_policy?: Management.ResourceServerConsentPolicyEnum | null; authorization_details?: unknown[]; proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; @@ -12916,10 +15358,12 @@ export const IdentityProviderEnum = { } as const; export type IdentityProviderEnum = (typeof IdentityProviderEnum)[keyof typeof IdentityProviderEnum]; -/** - * Identity provider name of the identity. Only `auth0` is supported - */ -export type IdentityProviderOnlyAuth0Enum = "auth0"; +/** Identity provider name of the identity. Only `auth0` is supported */ +export const IdentityProviderOnlyAuth0Enum = { + Auth0: "auth0", +} as const; +export type IdentityProviderOnlyAuth0Enum = + (typeof IdentityProviderOnlyAuth0Enum)[keyof typeof IdentityProviderOnlyAuth0Enum]; /** * Encryption key @@ -13199,6 +15643,13 @@ export interface ListDeviceCredentialsOffsetPaginatedResponseContent { device_credentials?: Management.DeviceCredential[]; } +export interface ListDirectoryProvisioningsResponseContent { + /** List of directory provisioning configurations */ + directory_provisionings: Management.DirectoryProvisioning[]; + /** The cursor to be used as the "from" query parameter for the next page of results. */ + next?: string; +} + export interface ListEncryptionKeyOffsetPaginatedResponseContent { /** Page index of the results to return. First page is 0. */ start?: number; @@ -13543,9 +15994,9 @@ export interface LogLocationInfo { /** Full city name in English. */ city_name?: string; /** Global latitude (horizontal) position. */ - latitude?: string; + latitude?: number; /** Global longitude (vertical) position. */ - longitude?: string; + longitude?: number; /** Time zone name as found in the tz database. */ time_zone?: string; /** Continent the country is located within. Can be `AF` (Africa), `AN` (Antarctica), `AS` (Asia), `EU` (Europe), `NA` (North America), `OC` (Oceania) or `SA` (South America). */ @@ -13566,7 +16017,10 @@ export interface LogSecurityContext { [key: string]: any; } -export type LogStreamDatadogEnum = "datadog"; +export const LogStreamDatadogEnum = { + Datadog: "datadog", +} as const; +export type LogStreamDatadogEnum = (typeof LogStreamDatadogEnum)[keyof typeof LogStreamDatadogEnum]; /** Datadog region */ export const LogStreamDatadogRegionEnum = { @@ -13600,7 +16054,10 @@ export interface LogStreamDatadogSink { datadogRegion: Management.LogStreamDatadogRegionEnum; } -export type LogStreamEventBridgeEnum = "eventbridge"; +export const LogStreamEventBridgeEnum = { + Eventbridge: "eventbridge", +} as const; +export type LogStreamEventBridgeEnum = (typeof LogStreamEventBridgeEnum)[keyof typeof LogStreamEventBridgeEnum]; export interface LogStreamEventBridgeResponseSchema { /** The id of the log stream */ @@ -13669,7 +16126,10 @@ export const LogStreamEventBridgeSinkRegionEnum = { export type LogStreamEventBridgeSinkRegionEnum = (typeof LogStreamEventBridgeSinkRegionEnum)[keyof typeof LogStreamEventBridgeSinkRegionEnum]; -export type LogStreamEventGridEnum = "eventgrid"; +export const LogStreamEventGridEnum = { + Eventgrid: "eventgrid", +} as const; +export type LogStreamEventGridEnum = (typeof LogStreamEventGridEnum)[keyof typeof LogStreamEventGridEnum]; /** Azure Region Name */ export const LogStreamEventGridRegionEnum = { @@ -13771,10 +16231,11 @@ export const LogStreamFilterGroupNameEnum = { export type LogStreamFilterGroupNameEnum = (typeof LogStreamFilterGroupNameEnum)[keyof typeof LogStreamFilterGroupNameEnum]; -/** - * Filter type. Currently `category` is the only valid type. - */ -export type LogStreamFilterTypeEnum = "category"; +/** Filter type. Currently `category` is the only valid type. */ +export const LogStreamFilterTypeEnum = { + Category: "category", +} as const; +export type LogStreamFilterTypeEnum = (typeof LogStreamFilterTypeEnum)[keyof typeof LogStreamFilterTypeEnum]; /** HTTP JSON format */ export const LogStreamHttpContentFormatEnum = { @@ -13785,7 +16246,10 @@ export const LogStreamHttpContentFormatEnum = { export type LogStreamHttpContentFormatEnum = (typeof LogStreamHttpContentFormatEnum)[keyof typeof LogStreamHttpContentFormatEnum]; -export type LogStreamHttpEnum = "http"; +export const LogStreamHttpEnum = { + Http: "http", +} as const; +export type LogStreamHttpEnum = (typeof LogStreamHttpEnum)[keyof typeof LogStreamHttpEnum]; export interface LogStreamHttpResponseSchema { /** The id of the log stream */ @@ -13816,7 +16280,10 @@ export interface LogStreamHttpSink { httpCustomHeaders?: Management.HttpCustomHeader[]; } -export type LogStreamMixpanelEnum = "mixpanel"; +export const LogStreamMixpanelEnum = { + Mixpanel: "mixpanel", +} as const; +export type LogStreamMixpanelEnum = (typeof LogStreamMixpanelEnum)[keyof typeof LogStreamMixpanelEnum]; /** Mixpanel Region */ export const LogStreamMixpanelRegionEnum = { @@ -13863,7 +16330,10 @@ export interface LogStreamMixpanelSinkPatch { mixpanelServiceAccountPassword?: string; } -export type LogStreamPiiAlgorithmEnum = "xxhash"; +export const LogStreamPiiAlgorithmEnum = { + Xxhash: "xxhash", +} as const; +export type LogStreamPiiAlgorithmEnum = (typeof LogStreamPiiAlgorithmEnum)[keyof typeof LogStreamPiiAlgorithmEnum]; export interface LogStreamPiiConfig { log_fields: Management.LogStreamPiiLogFieldsEnum[]; @@ -13897,7 +16367,10 @@ export type LogStreamResponseSchema = | Management.LogStreamSegmentResponseSchema | Management.LogStreamMixpanelResponseSchema; -export type LogStreamSegmentEnum = "segment"; +export const LogStreamSegmentEnum = { + Segment: "segment", +} as const; +export type LogStreamSegmentEnum = (typeof LogStreamSegmentEnum)[keyof typeof LogStreamSegmentEnum]; export interface LogStreamSegmentResponseSchema { /** The id of the log stream */ @@ -13934,7 +16407,10 @@ export type LogStreamSinkPatch = | Management.LogStreamSegmentSink | Management.LogStreamMixpanelSinkPatch; -export type LogStreamSplunkEnum = "splunk"; +export const LogStreamSplunkEnum = { + Splunk: "splunk", +} as const; +export type LogStreamSplunkEnum = (typeof LogStreamSplunkEnum)[keyof typeof LogStreamSplunkEnum]; export interface LogStreamSplunkResponseSchema { /** The id of the log stream */ @@ -13972,7 +16448,10 @@ export const LogStreamStatusEnum = { } as const; export type LogStreamStatusEnum = (typeof LogStreamStatusEnum)[keyof typeof LogStreamStatusEnum]; -export type LogStreamSumoEnum = "sumo"; +export const LogStreamSumoEnum = { + Sumo: "sumo", +} as const; +export type LogStreamSumoEnum = (typeof LogStreamSumoEnum)[keyof typeof LogStreamSumoEnum]; export interface LogStreamSumoResponseSchema { /** The id of the log stream */ @@ -14242,7 +16721,7 @@ export interface OrganizationDiscoveryDomain { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; @@ -14416,10 +16895,11 @@ export interface PhoneAttribute { signup?: Management.SignupVerified; } -/** - * This depicts the type of notifications this provider can receive. - */ -export type PhoneProviderChannelEnum = "phone"; +/** This depicts the type of notifications this provider can receive. */ +export const PhoneProviderChannelEnum = { + Phone: "phone", +} as const; +export type PhoneProviderChannelEnum = (typeof PhoneProviderChannelEnum)[keyof typeof PhoneProviderChannelEnum]; export type PhoneProviderConfiguration = | Management.TwilioProviderConfiguration @@ -14678,10 +17158,12 @@ export const PublicKeyCredentialAlgorithmEnum = { export type PublicKeyCredentialAlgorithmEnum = (typeof PublicKeyCredentialAlgorithmEnum)[keyof typeof PublicKeyCredentialAlgorithmEnum]; -/** - * Credential type. Supported types: public_key. - */ -export type PublicKeyCredentialTypeEnum = "public_key"; +/** Credential type. Supported types: public_key. */ +export const PublicKeyCredentialTypeEnum = { + PublicKey: "public_key", +} as const; +export type PublicKeyCredentialTypeEnum = + (typeof PublicKeyCredentialTypeEnum)[keyof typeof PublicKeyCredentialTypeEnum]; export type RefreshTokenDate = /** @@ -14816,7 +17298,7 @@ export interface ResourceServer { enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; token_encryption?: Management.ResourceServerTokenEncryption | null; - consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + consent_policy?: Management.ResourceServerConsentPolicyEnum | null; authorization_details?: unknown[]; proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; @@ -14824,7 +17306,11 @@ export interface ResourceServer { client_id?: string; } -export type ResourceServerConsentPolicyEnum = ("transactional-authorization-with-mfa" | null) | undefined; +export const ResourceServerConsentPolicyEnum = { + TransactionalAuthorizationWithMfa: "transactional-authorization-with-mfa", +} as const; +export type ResourceServerConsentPolicyEnum = + (typeof ResourceServerConsentPolicyEnum)[keyof typeof ResourceServerConsentPolicyEnum]; /** * Proof-of-Possession configuration for access tokens @@ -14851,7 +17337,7 @@ export interface ResourceServerScope { } /** - * Defines application access permission for a resource server. Use of this field is subject to the applicable Free Trial terms in Okta’s Master Subscription Agreement. + * Defines application access permission for a resource server */ export interface ResourceServerSubjectTypeAuthorization { user?: Management.ResourceServerSubjectTypeAuthorizationUser; @@ -14927,10 +17413,12 @@ export const ResourceServerTokenEncryptionAlgorithmEnum = { export type ResourceServerTokenEncryptionAlgorithmEnum = (typeof ResourceServerTokenEncryptionAlgorithmEnum)[keyof typeof ResourceServerTokenEncryptionAlgorithmEnum]; -/** - * Format of the encrypted JWT payload. - */ -export type ResourceServerTokenEncryptionFormatEnum = "compact-nested-jwe"; +/** Format of the encrypted JWT payload. */ +export const ResourceServerTokenEncryptionFormatEnum = { + CompactNestedJwe: "compact-nested-jwe", +} as const; +export type ResourceServerTokenEncryptionFormatEnum = + (typeof ResourceServerTokenEncryptionFormatEnum)[keyof typeof ResourceServerTokenEncryptionFormatEnum]; export interface ResourceServerTokenEncryptionKey { /** Name of the encryption key. */ @@ -14976,6 +17464,30 @@ export interface RoleUser { email?: string; } +export interface RollbackActionModuleResponseContent { + /** The unique ID of the module. */ + id?: string; + /** The name of the module. */ + name?: string; + /** The source code from the module's draft version. */ + code?: string; + /** The npm dependencies from the module's draft version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The secrets from the module's draft version (names and timestamps only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** The number of deployed actions using this module. */ + actions_using_module_total?: number; + /** Whether all draft changes have been published as a version. */ + all_changes_published?: boolean; + /** The version number of the latest published version. Omitted if no versions have been published. */ + latest_version_number?: number; + /** Timestamp when the module was created. */ + created_at?: string; + /** Timestamp when the module was last updated. */ + updated_at?: string; + latest_version?: Management.ActionModuleVersionReference; +} + export interface RotateClientSecretResponseContent { /** ID of this client. */ client_id?: string; @@ -15310,15 +17822,19 @@ export interface SelfServiceProfileBrandingProperties { [key: string]: any; } -/** - * The language of the custom text. - */ -export type SelfServiceProfileCustomTextLanguageEnum = "en"; +/** The language of the custom text. */ +export const SelfServiceProfileCustomTextLanguageEnum = { + En: "en", +} as const; +export type SelfServiceProfileCustomTextLanguageEnum = + (typeof SelfServiceProfileCustomTextLanguageEnum)[keyof typeof SelfServiceProfileCustomTextLanguageEnum]; -/** - * The page where the custom text is shown. - */ -export type SelfServiceProfileCustomTextPageEnum = "get-started"; +/** The page where the custom text is shown. */ +export const SelfServiceProfileCustomTextPageEnum = { + GetStarted: "get-started", +} as const; +export type SelfServiceProfileCustomTextPageEnum = + (typeof SelfServiceProfileCustomTextPageEnum)[keyof typeof SelfServiceProfileCustomTextPageEnum]; /** * The description of the self-service Profile. @@ -16140,10 +18656,12 @@ export interface TokenExchangeProfileResponseContent { [key: string]: any; } -/** - * The type of the profile, which controls how the profile will be executed when receiving a token exchange request. - */ -export type TokenExchangeProfileTypeEnum = "custom_authentication"; +/** The type of the profile, which controls how the profile will be executed when receiving a token exchange request. */ +export const TokenExchangeProfileTypeEnum = { + CustomAuthentication: "custom_authentication", +} as const; +export type TokenExchangeProfileTypeEnum = + (typeof TokenExchangeProfileTypeEnum)[keyof typeof TokenExchangeProfileTypeEnum]; export interface TokenQuota { client_credentials: Management.TokenQuotaClientCredentials; @@ -16197,6 +18715,30 @@ export interface UpdateActionBindingsResponseContent { bindings?: Management.ActionBinding[]; } +export interface UpdateActionModuleResponseContent { + /** The unique ID of the module. */ + id?: string; + /** The name of the module. */ + name?: string; + /** The source code from the module's draft version. */ + code?: string; + /** The npm dependencies from the module's draft version. */ + dependencies?: Management.ActionModuleDependency[]; + /** The secrets from the module's draft version (names and timestamps only, values never returned). */ + secrets?: Management.ActionModuleSecret[]; + /** The number of deployed actions using this module. */ + actions_using_module_total?: number; + /** Whether all draft changes have been published as a version. */ + all_changes_published?: boolean; + /** The version number of the latest published version. Omitted if no versions have been published. */ + latest_version_number?: number; + /** Timestamp when the module was created. */ + created_at?: string; + /** Timestamp when the module was last updated. */ + updated_at?: string; + latest_version?: Management.ActionModuleVersionReference; +} + export interface UpdateActionResponseContent { /** The unique ID of the action. */ id?: string; @@ -16413,8 +18955,10 @@ export interface UpdateClientGrantResponseContent { /** If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly. */ is_system?: boolean; 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. */ + /** Types of authorization_details allowed for this client grant. */ authorization_details_types?: string[]; + /** If enabled, all scopes configured on the resource server are allowed for this grant. */ + allow_all_scopes?: boolean; } export interface UpdateClientResponseContent { @@ -16603,7 +19147,7 @@ export interface UpdateConnectionRequestContentApple extends Management.Connecti */ export interface UpdateConnectionRequestContentAuth0 extends Management.ConnectionCommon { options?: Management.ConnectionOptionsAuth0; - realms?: Management.ConnectionRealmsAuth0; + realms?: Management.ConnectionRealms; } /** @@ -16695,7 +19239,7 @@ export interface UpdateConnectionRequestContentEvernote extends Management.Conne * Update a connection with strategy=evernote-sandbox */ export interface UpdateConnectionRequestContentEvernoteSandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsEvernoteSandbox; + options?: Management.ConnectionOptionsEvernote; } /** @@ -16833,7 +19377,7 @@ export interface UpdateConnectionRequestContentPaypal extends Management.Connect * Update a connection with strategy=paypal-sandbox */ export interface UpdateConnectionRequestContentPaypalSandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsPaypalSandbox; + options?: Management.ConnectionOptionsPaypal; } /** @@ -16884,14 +19428,14 @@ export interface UpdateConnectionRequestContentSalesforce extends Management.Con * Update a connection with strategy=salesforce-community */ export interface UpdateConnectionRequestContentSalesforceCommunity extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSalesforceCommunity; + options?: Management.ConnectionOptionsSalesforce; } /** * Update a connection with strategy=salesforce-sandbox */ export interface UpdateConnectionRequestContentSalesforceSandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsSalesforceSandbox; + options?: Management.ConnectionOptionsSalesforce; } /** @@ -16923,20 +19467,6 @@ export interface UpdateConnectionRequestContentSoundcloud extends Management.Con options?: Management.ConnectionOptionsSoundcloud; } -/** - * Update a connection with strategy=thecity - */ -export interface UpdateConnectionRequestContentTheCity extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsTheCity; -} - -/** - * Update a connection with strategy=thecity-sandbox - */ -export interface UpdateConnectionRequestContentTheCitySandbox extends Management.ConnectionCommon { - options?: Management.ConnectionOptionsTheCitySandbox; -} - /** * Update a connection with strategy=thirtysevensignals */ @@ -17048,6 +19578,8 @@ export interface UpdateCustomDomainResponseContent { tls_policy?: string; domain_metadata?: Management.DomainMetadata; certificate?: Management.DomainCertificate; + /** Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not present, the full domain will be used. */ + relying_party_identifier?: string; } export interface UpdateDirectoryProvisioningRequestContent { @@ -17275,7 +19807,7 @@ export interface UpdateOrganizationDiscoveryDomainResponseContent { /** The domain name to associate with the organization e.g. acme.com. */ domain: string; status: Management.OrganizationDiscoveryDomainStatus; - /** Indicates whether this domain should be used for organization discovery. Note: This field is only returned when the ss_org_dove_enabled feature flag is enabled for the tenant. */ + /** Indicates whether this domain should be used for organization discovery. */ use_for_organization_discovery?: boolean; /** A unique token generated for the discovery domain. This must be placed in a DNS TXT record at the location specified by the verification_host field to prove domain ownership. */ verification_txt: string; @@ -17356,7 +19888,7 @@ export interface UpdateResourceServerResponseContent { enforce_policies?: boolean; token_dialect?: Management.ResourceServerTokenDialectResponseEnum; token_encryption?: Management.ResourceServerTokenEncryption | null; - consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null; + consent_policy?: Management.ResourceServerConsentPolicyEnum | null; authorization_details?: unknown[]; proof_of_possession?: Management.ResourceServerProofOfPossession | null; subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization; @@ -17787,10 +20319,12 @@ export interface UserAttributeProfileUserId { strategy_overrides?: Management.UserAttributeProfileStrategyOverridesUserId; } -/** - * OIDC mapping for user ID - */ -export type UserAttributeProfileUserIdOidcMappingEnum = "sub"; +/** OIDC mapping for user ID */ +export const UserAttributeProfileUserIdOidcMappingEnum = { + Sub: "sub", +} as const; +export type UserAttributeProfileUserIdOidcMappingEnum = + (typeof UserAttributeProfileUserIdOidcMappingEnum)[keyof typeof UserAttributeProfileUserIdOidcMappingEnum]; /** OIDC mapping override for this strategy */ export const UserAttributeProfileUserIdOidcStrategyOverrideMapping = { @@ -18233,4 +20767,8 @@ export interface X509CertificateCredential { pem: string; } -export type X509CertificateCredentialTypeEnum = "x509_cert"; +export const X509CertificateCredentialTypeEnum = { + X509Cert: "x509_cert", +} as const; +export type X509CertificateCredentialTypeEnum = + (typeof X509CertificateCredentialTypeEnum)[keyof typeof X509CertificateCredentialTypeEnum]; diff --git a/src/management/tests/wire/actions/modules.test.ts b/src/management/tests/wire/actions/modules.test.ts new file mode 100644 index 000000000..c541c3245 --- /dev/null +++ b/src/management/tests/wire/actions/modules.test.ts @@ -0,0 +1,1111 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../../../api/index"; +import { ManagementClient } from "../../../Client"; +import { mockServerPool } from "../../mock-server/MockServerPool"; + +describe("ModulesClient", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + modules: [ + { + id: "id", + name: "name", + code: "code", + dependencies: [{}], + secrets: [{}], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + total: 1, + page: 1, + per_page: 1, + }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const expected = { + modules: [ + { + id: "id", + name: "name", + code: "code", + dependencies: [{}], + secrets: [{}], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + total: 1, + page: 1, + per_page: 1, + }; + const page = await client.actions.modules.list({ + page: 1, + per_page: 1, + }); + + expect(expected.modules).toEqual(page.data); + expect(page.hasNextPage()).toBe(true); + const nextPage = await page.getNextPage(); + expect(expected.modules).toEqual(nextPage.data); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.list(); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.list(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.list(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.list(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("create (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name", code: "code" }; + const rawResponseBody = { + id: "id", + name: "name", + code: "code", + dependencies: [{ name: "name", version: "version" }], + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }; + server + .mockEndpoint() + .post("/actions/modules") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.create({ + name: "name", + code: "code", + }); + expect(response).toEqual({ + id: "id", + name: "name", + code: "code", + dependencies: [ + { + name: "name", + version: "version", + }, + ], + secrets: [ + { + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("create (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name", code: "code" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.create({ + name: "name", + code: "code", + }); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("create (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name", code: "code" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.create({ + name: "name", + code: "code", + }); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("create (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name", code: "code" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.create({ + name: "name", + code: "code", + }); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("create (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name", code: "code" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.create({ + name: "name", + code: "code", + }); + }).rejects.toThrow(Management.ConflictError); + }); + + test("create (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name", code: "code" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.create({ + name: "name", + code: "code", + }); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + name: "name", + code: "code", + dependencies: [{ name: "name", version: "version" }], + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }; + server + .mockEndpoint() + .get("/actions/modules/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.get("id"); + expect(response).toEqual({ + id: "id", + name: "name", + code: "code", + dependencies: [ + { + name: "name", + version: "version", + }, + ], + secrets: [ + { + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.get("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.get("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.get("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.get("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("get (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.get("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("delete (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + server.mockEndpoint().delete("/actions/modules/id").respondWith().statusCode(200).build(); + + const response = await client.actions.modules.delete("id"); + expect(response).toEqual(undefined); + }); + + test("delete (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/actions/modules/id") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.delete("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("delete (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/actions/modules/id") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.delete("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("delete (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/actions/modules/id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.delete("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("delete (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/actions/modules/id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.delete("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("delete (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/actions/modules/id") + .respondWith() + .statusCode(412) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.delete("id"); + }).rejects.toThrow(Management.PreconditionFailedError); + }); + + test("delete (7)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .delete("/actions/modules/id") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.delete("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("update (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + id: "id", + name: "name", + code: "code", + dependencies: [{ name: "name", version: "version" }], + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.update("id"); + expect(response).toEqual({ + id: "id", + name: "name", + code: "code", + dependencies: [ + { + name: "name", + version: "version", + }, + ], + secrets: [ + { + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("update (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.update("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("update (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.update("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("update (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.update("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("update (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.update("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("update (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.update("id"); + }).rejects.toThrow(Management.ConflictError); + }); + + test("update (7)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .patch("/actions/modules/id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.update("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("listActions (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + actions: [ + { + action_id: "action_id", + action_name: "action_name", + module_version_id: "module_version_id", + module_version_number: 1, + supported_triggers: [{ id: "id" }], + }, + ], + total: 1, + page: 1, + per_page: 1, + }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules/id/actions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const expected = { + actions: [ + { + action_id: "action_id", + action_name: "action_name", + module_version_id: "module_version_id", + module_version_number: 1, + supported_triggers: [ + { + id: "id", + }, + ], + }, + ], + total: 1, + page: 1, + per_page: 1, + }; + const page = await client.actions.modules.listActions("id", { + page: 1, + per_page: 1, + }); + + expect(expected.actions).toEqual(page.data); + expect(page.hasNextPage()).toBe(true); + const nextPage = await page.getNextPage(); + expect(expected.actions).toEqual(nextPage.data); + }); + + test("listActions (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules/id/actions") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.listActions("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("listActions (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules/id/actions") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.listActions("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("listActions (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules/id/actions") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.listActions("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("listActions (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules/id/actions") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.listActions("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("listActions (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/actions/modules/id/actions") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.listActions("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("rollback (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { + id: "id", + name: "name", + code: "code", + dependencies: [{ name: "name", version: "version" }], + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + expect(response).toEqual({ + id: "id", + name: "name", + code: "code", + dependencies: [ + { + name: "name", + version: "version", + }, + ], + secrets: [ + { + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + actions_using_module_total: 1, + all_changes_published: true, + latest_version_number: 1, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + latest_version: { + id: "id", + version_number: 1, + code: "code", + dependencies: [{}], + secrets: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + }); + }); + + test("rollback (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("rollback (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("rollback (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("rollback (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("rollback (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + }).rejects.toThrow(Management.ConflictError); + }); + + test("rollback (7)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { module_version_id: "module_version_id" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/rollback") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.rollback("id", { + module_version_id: "module_version_id", + }); + }).rejects.toThrow(Management.TooManyRequestsError); + }); +}); diff --git a/src/management/tests/wire/actions/modules/versions.test.ts b/src/management/tests/wire/actions/modules/versions.test.ts new file mode 100644 index 000000000..dce2984db --- /dev/null +++ b/src/management/tests/wire/actions/modules/versions.test.ts @@ -0,0 +1,422 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Management from "../../../../api/index"; +import { ManagementClient } from "../../../../Client"; +import { mockServerPool } from "../../../mock-server/MockServerPool"; + +describe("VersionsClient", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + versions: [ + { + id: "id", + module_id: "module_id", + version_number: 1, + code: "code", + secrets: [{}], + dependencies: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + ], + }; + server + .mockEndpoint() + .get("/actions/modules/id/versions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.versions.list("id"); + expect(response).toEqual({ + versions: [ + { + id: "id", + module_id: "module_id", + version_number: 1, + code: "code", + secrets: [{}], + dependencies: [{}], + created_at: "2024-01-15T09:30:00Z", + }, + ], + }); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.list("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.list("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.list("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.list("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("list (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.list("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + + test("create (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + module_id: "module_id", + version_number: 1, + code: "code", + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], + dependencies: [{ name: "name", version: "version" }], + created_at: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.versions.create("id"); + expect(response).toEqual({ + id: "id", + module_id: "module_id", + version_number: 1, + code: "code", + secrets: [ + { + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + dependencies: [ + { + name: "name", + version: "version", + }, + ], + created_at: "2024-01-15T09:30:00Z", + }); + }); + + test("create (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.create("id"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("create (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.create("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("create (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.create("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("create (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.create("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("create (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.create("id"); + }).rejects.toThrow(Management.ConflictError); + }); + + test("create (7)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/actions/modules/id/versions") + .respondWith() + .statusCode(412) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.create("id"); + }).rejects.toThrow(Management.PreconditionFailedError); + }); + + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + module_id: "module_id", + version_number: 1, + code: "code", + secrets: [{ name: "name", updated_at: "2024-01-15T09:30:00Z" }], + dependencies: [{ name: "name", version: "version" }], + created_at: "2024-01-15T09:30:00Z", + }; + server + .mockEndpoint() + .get("/actions/modules/id/versions/versionId") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.actions.modules.versions.get("id", "versionId"); + expect(response).toEqual({ + id: "id", + module_id: "module_id", + version_number: 1, + code: "code", + secrets: [ + { + name: "name", + updated_at: "2024-01-15T09:30:00Z", + }, + ], + dependencies: [ + { + name: "name", + version: "version", + }, + ], + created_at: "2024-01-15T09:30:00Z", + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions/versionId") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.get("id", "versionId"); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions/versionId") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.get("id", "versionId"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions/versionId") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.get("id", "versionId"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions/versionId") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.get("id", "versionId"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("get (6)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/actions/modules/id/versions/versionId") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.actions.modules.versions.get("id", "versionId"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); +}); diff --git a/src/management/tests/wire/clientGrants.test.ts b/src/management/tests/wire/clientGrants.test.ts index 846c2f595..a5f5a5303 100644 --- a/src/management/tests/wire/clientGrants.test.ts +++ b/src/management/tests/wire/clientGrants.test.ts @@ -22,6 +22,7 @@ describe("ClientGrantsClient", () => { is_system: true, subject_type: "client", authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, }, ], }; @@ -46,6 +47,7 @@ describe("ClientGrantsClient", () => { is_system: true, subject_type: "client", authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, }, ], }; @@ -132,6 +134,7 @@ describe("ClientGrantsClient", () => { is_system: true, subject_type: "client", authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, }; server .mockEndpoint() @@ -156,6 +159,7 @@ describe("ClientGrantsClient", () => { is_system: true, subject_type: "client", authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, }); }); @@ -291,6 +295,87 @@ describe("ClientGrantsClient", () => { }).rejects.toThrow(Management.TooManyRequestsError); }); + test("get (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "id", + client_id: "client_id", + audience: "audience", + scope: ["scope"], + organization_usage: "deny", + allow_any_organization: true, + is_system: true, + subject_type: "client", + authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, + }; + server.mockEndpoint().get("/client-grants/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); + + const response = await client.clientGrants.get("id"); + expect(response).toEqual({ + id: "id", + client_id: "client_id", + audience: "audience", + scope: ["scope"], + organization_usage: "deny", + allow_any_organization: true, + is_system: true, + subject_type: "client", + authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, + }); + }); + + test("get (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server.mockEndpoint().get("/client-grants/id").respondWith().statusCode(401).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.clientGrants.get("id"); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("get (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server.mockEndpoint().get("/client-grants/id").respondWith().statusCode(403).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.clientGrants.get("id"); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("get (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server.mockEndpoint().get("/client-grants/id").respondWith().statusCode(404).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.clientGrants.get("id"); + }).rejects.toThrow(Management.NotFoundError); + }); + + test("get (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server.mockEndpoint().get("/client-grants/id").respondWith().statusCode(429).jsonBody(rawResponseBody).build(); + + await expect(async () => { + return await client.clientGrants.get("id"); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + test("delete (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); @@ -387,6 +472,7 @@ describe("ClientGrantsClient", () => { is_system: true, subject_type: "client", authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, }; server .mockEndpoint() @@ -408,6 +494,7 @@ describe("ClientGrantsClient", () => { is_system: true, subject_type: "client", authorization_details_types: ["authorization_details_types"], + allow_all_scopes: true, }); }); diff --git a/src/management/tests/wire/connections/directoryProvisioning.test.ts b/src/management/tests/wire/connections/directoryProvisioning.test.ts index 5ab3461f9..36a102057 100644 --- a/src/management/tests/wire/connections/directoryProvisioning.test.ts +++ b/src/management/tests/wire/connections/directoryProvisioning.test.ts @@ -5,6 +5,140 @@ import { ManagementClient } from "../../../Client"; import { mockServerPool } from "../../mock-server/MockServerPool"; describe("DirectoryProvisioningClient", () => { + test("list (1)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + directory_provisionings: [ + { + connection_id: "connection_id", + connection_name: "connection_name", + strategy: "strategy", + mapping: [{ auth0: "auth0", idp: "idp" }], + synchronize_automatically: true, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + last_synchronization_at: "2024-01-15T09:30:00Z", + last_synchronization_status: "last_synchronization_status", + last_synchronization_error: "last_synchronization_error", + }, + ], + next: "next", + }; + server + .mockEndpoint({ once: false }) + .get("/connections-directory-provisionings") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const expected = { + directory_provisionings: [ + { + connection_id: "connection_id", + connection_name: "connection_name", + strategy: "strategy", + mapping: [ + { + auth0: "auth0", + idp: "idp", + }, + ], + synchronize_automatically: true, + created_at: "2024-01-15T09:30:00Z", + updated_at: "2024-01-15T09:30:00Z", + last_synchronization_at: "2024-01-15T09:30:00Z", + last_synchronization_status: "last_synchronization_status", + last_synchronization_error: "last_synchronization_error", + }, + ], + next: "next", + }; + const page = await client.connections.directoryProvisioning.list({ + from: "from", + take: 1, + }); + + expect(expected.directory_provisionings).toEqual(page.data); + expect(page.hasNextPage()).toBe(true); + const nextPage = await page.getNextPage(); + expect(expected.directory_provisionings).toEqual(nextPage.data); + }); + + test("list (2)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/connections-directory-provisionings") + .respondWith() + .statusCode(400) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.connections.directoryProvisioning.list(); + }).rejects.toThrow(Management.BadRequestError); + }); + + test("list (3)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/connections-directory-provisionings") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.connections.directoryProvisioning.list(); + }).rejects.toThrow(Management.UnauthorizedError); + }); + + test("list (4)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/connections-directory-provisionings") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.connections.directoryProvisioning.list(); + }).rejects.toThrow(Management.ForbiddenError); + }); + + test("list (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint({ once: false }) + .get("/connections-directory-provisionings") + .respondWith() + .statusCode(429) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.connections.directoryProvisioning.list(); + }).rejects.toThrow(Management.TooManyRequestsError); + }); + test("get (1)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); diff --git a/src/management/tests/wire/customDomains.test.ts b/src/management/tests/wire/customDomains.test.ts index fedc85b8c..dc4a90456 100644 --- a/src/management/tests/wire/customDomains.test.ts +++ b/src/management/tests/wire/customDomains.test.ts @@ -33,6 +33,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }, ]; server.mockEndpoint().get("/custom-domains").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -74,6 +75,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }, ]); }); @@ -122,6 +124,7 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, + is_default: true, status: "pending_verification", type: "auth0_managed_certs", verification: { @@ -139,6 +142,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }; server .mockEndpoint() @@ -157,6 +161,7 @@ describe("CustomDomainsClient", () => { custom_domain_id: "custom_domain_id", domain: "domain", primary: true, + is_default: true, status: "pending_verification", type: "auth0_managed_certs", verification: { @@ -181,6 +186,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }); }); @@ -321,6 +327,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }; server.mockEndpoint().get("/custom-domains/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); @@ -355,6 +362,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }); }); @@ -526,6 +534,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }; server .mockEndpoint() @@ -566,6 +575,7 @@ describe("CustomDomainsClient", () => { certificate_authority: "letsencrypt", renews_before: "renews_before", }, + relying_party_identifier: "relying_party_identifier", }); }); diff --git a/src/management/tests/wire/deviceCredentials.test.ts b/src/management/tests/wire/deviceCredentials.test.ts index 90b50eca2..81cd3ed2c 100644 --- a/src/management/tests/wire/deviceCredentials.test.ts +++ b/src/management/tests/wire/deviceCredentials.test.ts @@ -157,6 +157,7 @@ describe("DeviceCredentialsClient", () => { const response = await client.deviceCredentials.createPublicKey({ device_name: "device_name", + type: "public_key", value: "value", device_id: "device_id", }); @@ -182,6 +183,7 @@ describe("DeviceCredentialsClient", () => { await expect(async () => { return await client.deviceCredentials.createPublicKey({ device_name: "x", + type: "public_key", value: "x", device_id: "device_id", }); @@ -205,6 +207,7 @@ describe("DeviceCredentialsClient", () => { await expect(async () => { return await client.deviceCredentials.createPublicKey({ device_name: "x", + type: "public_key", value: "x", device_id: "device_id", }); @@ -228,6 +231,7 @@ describe("DeviceCredentialsClient", () => { await expect(async () => { return await client.deviceCredentials.createPublicKey({ device_name: "x", + type: "public_key", value: "x", device_id: "device_id", }); @@ -251,6 +255,7 @@ describe("DeviceCredentialsClient", () => { await expect(async () => { return await client.deviceCredentials.createPublicKey({ device_name: "x", + type: "public_key", value: "x", device_id: "device_id", }); @@ -274,6 +279,7 @@ describe("DeviceCredentialsClient", () => { await expect(async () => { return await client.deviceCredentials.createPublicKey({ device_name: "x", + type: "public_key", value: "x", device_id: "device_id", }); diff --git a/src/management/tests/wire/logs.test.ts b/src/management/tests/wire/logs.test.ts index 754215a2c..0e97811bc 100644 --- a/src/management/tests/wire/logs.test.ts +++ b/src/management/tests/wire/logs.test.ts @@ -195,8 +195,8 @@ describe("LogsClient", () => { country_code3: "country_code3", country_name: "country_name", city_name: "city_name", - latitude: "latitude", - longitude: "longitude", + latitude: 1.1, + longitude: 1.1, time_zone: "time_zone", continent_code: "continent_code", }, @@ -235,8 +235,8 @@ describe("LogsClient", () => { country_code3: "country_code3", country_name: "country_name", city_name: "city_name", - latitude: "latitude", - longitude: "longitude", + latitude: 1.1, + longitude: 1.1, time_zone: "time_zone", continent_code: "continent_code", }, diff --git a/src/management/tests/wire/roles.test.ts b/src/management/tests/wire/roles.test.ts index e2b0c157b..c12613a12 100644 --- a/src/management/tests/wire/roles.test.ts +++ b/src/management/tests/wire/roles.test.ts @@ -208,6 +208,27 @@ describe("RolesClient", () => { }); test("create (5)", async () => { + const server = mockServerPool.createServer(); + const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "name" }; + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .post("/roles") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(409) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.roles.create({ + name: "name", + }); + }).rejects.toThrow(Management.ConflictError); + }); + + test("create (6)", async () => { const server = mockServerPool.createServer(); const client = new ManagementClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); const rawRequestBody = { name: "name" }; diff --git a/src/management/tests/wire/tokenExchangeProfiles.test.ts b/src/management/tests/wire/tokenExchangeProfiles.test.ts index ad4952c6d..ea6ffb943 100644 --- a/src/management/tests/wire/tokenExchangeProfiles.test.ts +++ b/src/management/tests/wire/tokenExchangeProfiles.test.ts @@ -159,6 +159,7 @@ describe("TokenExchangeProfilesClient", () => { name: "name", subject_token_type: "subject_token_type", action_id: "action_id", + type: "custom_authentication", }); expect(response).toEqual({ id: "id", @@ -195,6 +196,7 @@ describe("TokenExchangeProfilesClient", () => { name: "Token Exchange Profile 1", subject_token_type: "mandarin", action_id: "x", + type: "custom_authentication", }); }).rejects.toThrow(Management.BadRequestError); }); @@ -223,6 +225,7 @@ describe("TokenExchangeProfilesClient", () => { name: "Token Exchange Profile 1", subject_token_type: "mandarin", action_id: "x", + type: "custom_authentication", }); }).rejects.toThrow(Management.UnauthorizedError); }); @@ -251,6 +254,7 @@ describe("TokenExchangeProfilesClient", () => { name: "Token Exchange Profile 1", subject_token_type: "mandarin", action_id: "x", + type: "custom_authentication", }); }).rejects.toThrow(Management.ForbiddenError); }); @@ -279,6 +283,7 @@ describe("TokenExchangeProfilesClient", () => { name: "Token Exchange Profile 1", subject_token_type: "mandarin", action_id: "x", + type: "custom_authentication", }); }).rejects.toThrow(Management.ConflictError); }); @@ -307,6 +312,7 @@ describe("TokenExchangeProfilesClient", () => { name: "Token Exchange Profile 1", subject_token_type: "mandarin", action_id: "x", + type: "custom_authentication", }); }).rejects.toThrow(Management.TooManyRequestsError); }); diff --git a/yarn.lock b/yarn.lock index c49f722a3..335d51d72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -708,10 +708,10 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA== -"@publint/pack@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@publint/pack/-/pack-0.1.2.tgz#1b9a9567423262093e4a73e77697b65bf622f8c9" - integrity sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw== +"@publint/pack@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@publint/pack/-/pack-0.1.3.tgz#624ee3963e43596e8442c7b86cdfe0b1faf6e674" + integrity sha512-dHDWeutAerz+Z2wFYAce7Y51vd4rbLBfUh0BNnyul4xKoVsPUVJBrOAFsJvtvYBwGFJSqKsxyyHf/7evZ8+Q5Q== "@shikijs/engine-oniguruma@^3.21.0": version "3.21.0" @@ -933,99 +933,99 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^8.38.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.0.tgz#afb966c66a2fdc6158cf81118204a971a36d0fc5" - integrity sha512-eEXsVvLPu8Z4PkFibtuFJLJOTAV/nPdgtSjkGoPpddpFk3/ym2oy97jynY6ic2m6+nc5M8SE1e9v/mHKsulcJg== + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.1.tgz#f6640f6f8749b71d9ab457263939e8932a3c6b46" + integrity sha512-cFYYFZ+oQFi6hUnBTbLRXfTJiaQtYE3t4O692agbBl+2Zy+eqSKWtPjhPXJu1G7j4RLjKgeJPDdq3EqOwmX5Ag== dependencies: "@eslint-community/regexpp" "^4.12.2" - "@typescript-eslint/scope-manager" "8.53.0" - "@typescript-eslint/type-utils" "8.53.0" - "@typescript-eslint/utils" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + "@typescript-eslint/scope-manager" "8.53.1" + "@typescript-eslint/type-utils" "8.53.1" + "@typescript-eslint/utils" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" ignore "^7.0.5" natural-compare "^1.4.0" ts-api-utils "^2.4.0" "@typescript-eslint/parser@^8.38.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.53.0.tgz#d8bed6f12dc74e03751e5f947510ff2b165990c6" - integrity sha512-npiaib8XzbjtzS2N4HlqPvlpxpmZ14FjSJrteZpPxGUaYPlvhzlzUZ4mZyABo0EFrOWnvyd0Xxroq//hKhtAWg== - dependencies: - "@typescript-eslint/scope-manager" "8.53.0" - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/typescript-estree" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.53.1.tgz#58d4a70cc2daee2becf7d4521d65ea1782d6ec68" + integrity sha512-nm3cvFN9SqZGXjmw5bZ6cGmvJSyJPn0wU9gHAZZHDnZl2wF9PhHv78Xf06E0MaNk4zLVHL8hb2/c32XvyJOLQg== + dependencies: + "@typescript-eslint/scope-manager" "8.53.1" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/typescript-estree" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" debug "^4.4.3" -"@typescript-eslint/project-service@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.53.0.tgz#327c67c61c16a1c8b12a440b0779b41eb77cc7df" - integrity sha512-Bl6Gdr7NqkqIP5yP9z1JU///Nmes4Eose6L1HwpuVHwScgDPPuEWbUVhvlZmb8hy0vX9syLk5EGNL700WcBlbg== +"@typescript-eslint/project-service@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.53.1.tgz#4e47856a0b14a1ceb28b0294b4badef3be1e9734" + integrity sha512-WYC4FB5Ra0xidsmlPb+1SsnaSKPmS3gsjIARwbEkHkoWloQmuzcfypljaJcR78uyLA1h8sHdWWPHSLDI+MtNog== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.53.0" - "@typescript-eslint/types" "^8.53.0" + "@typescript-eslint/tsconfig-utils" "^8.53.1" + "@typescript-eslint/types" "^8.53.1" debug "^4.4.3" -"@typescript-eslint/scope-manager@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.53.0.tgz#f922fcbf0d42e72f065297af31779ccf19de9a97" - integrity sha512-kWNj3l01eOGSdVBnfAF2K1BTh06WS0Yet6JUgb9Cmkqaz3Jlu0fdVUjj9UI8gPidBWSMqDIglmEXifSgDT/D0g== +"@typescript-eslint/scope-manager@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.53.1.tgz#6c4b8c82cd45ae3b365afc2373636e166743a8fa" + integrity sha512-Lu23yw1uJMFY8cUeq7JlrizAgeQvWugNQzJp8C3x8Eo5Jw5Q2ykMdiiTB9vBVOOUBysMzmRRmUfwFrZuI2C4SQ== dependencies: - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" -"@typescript-eslint/tsconfig-utils@8.53.0", "@typescript-eslint/tsconfig-utils@^8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.0.tgz#105279d7969a7abdc8345cc9c57cff83cf910f8f" - integrity sha512-K6Sc0R5GIG6dNoPdOooQ+KtvT5KCKAvTcY8h2rIuul19vxH5OTQk7ArKkd4yTzkw66WnNY0kPPzzcmWA+XRmiA== +"@typescript-eslint/tsconfig-utils@8.53.1", "@typescript-eslint/tsconfig-utils@^8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.1.tgz#efe80b8d019cd49e5a1cf46c2eb0cd2733076424" + integrity sha512-qfvLXS6F6b1y43pnf0pPbXJ+YoXIC7HKg0UGZ27uMIemKMKA6XH2DTxsEDdpdN29D+vHV07x/pnlPNVLhdhWiA== -"@typescript-eslint/type-utils@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.53.0.tgz#81a0de5c01fc68f6df0591d03cd8226bda01c91f" - integrity sha512-BBAUhlx7g4SmcLhn8cnbxoxtmS7hcq39xKCgiutL3oNx1TaIp+cny51s8ewnKMpVUKQUGb41RAUWZ9kxYdovuw== +"@typescript-eslint/type-utils@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.53.1.tgz#95de2651a96d580bf5c6c6089ddd694284d558ad" + integrity sha512-MOrdtNvyhy0rHyv0ENzub1d4wQYKb2NmIqG7qEqPWFW7Mpy2jzFC3pQ2yKDvirZB7jypm5uGjF2Qqs6OIqu47w== dependencies: - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/typescript-estree" "8.53.0" - "@typescript-eslint/utils" "8.53.0" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/typescript-estree" "8.53.1" + "@typescript-eslint/utils" "8.53.1" debug "^4.4.3" ts-api-utils "^2.4.0" -"@typescript-eslint/types@8.53.0", "@typescript-eslint/types@^8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.53.0.tgz#1adcad3fa32bc2c4cbf3785ba07a5e3151819efb" - integrity sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ== +"@typescript-eslint/types@8.53.1", "@typescript-eslint/types@^8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.53.1.tgz#101f203f0807a63216cceceedb815fabe21d5793" + integrity sha512-jr/swrr2aRmUAUjW5/zQHbMaui//vQlsZcJKijZf3M26bnmLj8LyZUpj8/Rd6uzaek06OWsqdofN/Thenm5O8A== -"@typescript-eslint/typescript-estree@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.0.tgz#7805b46b7a8ce97e91b7bb56fc8b1ba26ca8ef52" - integrity sha512-pw0c0Gdo7Z4xOG987u3nJ8akL9093yEEKv8QTJ+Bhkghj1xyj8cgPaavlr9rq8h7+s6plUJ4QJYw2gCZodqmGw== +"@typescript-eslint/typescript-estree@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.1.tgz#b6dce2303c9e27e95b8dcd8c325868fff53e488f" + integrity sha512-RGlVipGhQAG4GxV1s34O91cxQ/vWiHJTDHbXRr0li2q/BGg3RR/7NM8QDWgkEgrwQYCvmJV9ichIwyoKCQ+DTg== dependencies: - "@typescript-eslint/project-service" "8.53.0" - "@typescript-eslint/tsconfig-utils" "8.53.0" - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/visitor-keys" "8.53.0" + "@typescript-eslint/project-service" "8.53.1" + "@typescript-eslint/tsconfig-utils" "8.53.1" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/visitor-keys" "8.53.1" debug "^4.4.3" minimatch "^9.0.5" semver "^7.7.3" tinyglobby "^0.2.15" ts-api-utils "^2.4.0" -"@typescript-eslint/utils@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.53.0.tgz#bf0a4e2edaf1afc9abce209fc02f8cab0b74af13" - integrity sha512-XDY4mXTez3Z1iRDI5mbRhH4DFSt46oaIFsLg+Zn97+sYrXACziXSQcSelMybnVZ5pa1P6xYkPr5cMJyunM1ZDA== +"@typescript-eslint/utils@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.53.1.tgz#81fe6c343de288701b774f4d078382f567e6edaa" + integrity sha512-c4bMvGVWW4hv6JmDUEG7fSYlWOl3II2I4ylt0NM+seinYQlZMQIaKaXIIVJWt9Ofh6whrpM+EdDQXKXjNovvrg== dependencies: "@eslint-community/eslint-utils" "^4.9.1" - "@typescript-eslint/scope-manager" "8.53.0" - "@typescript-eslint/types" "8.53.0" - "@typescript-eslint/typescript-estree" "8.53.0" + "@typescript-eslint/scope-manager" "8.53.1" + "@typescript-eslint/types" "8.53.1" + "@typescript-eslint/typescript-estree" "8.53.1" -"@typescript-eslint/visitor-keys@8.53.0": - version "8.53.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.0.tgz#9a785664ddae7e3f7e570ad8166e48dbc9c6cf02" - integrity sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw== +"@typescript-eslint/visitor-keys@8.53.1": + version "8.53.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.1.tgz#405f04959be22b9be364939af8ac19c3649b6eb7" + integrity sha512-oy+wV7xDKFPRyNggmXuZQSBzvoLnpmJs+GhzRhPjrxl2b/jIlyjVokzm47CZCDUdXKr2zd7ZLodPfOBpOPyPlg== dependencies: - "@typescript-eslint/types" "8.53.0" + "@typescript-eslint/types" "8.53.1" eslint-visitor-keys "^4.2.1" "@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": @@ -1799,12 +1799,12 @@ eslint-config-prettier@^10.1.8: integrity sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w== eslint-plugin-prettier@^5.5.3: - version "5.5.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz#9d61c4ea11de5af704d4edf108c82ccfa7f2e61c" - integrity sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg== + version "5.5.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.5.tgz#9eae11593faa108859c26f9a9c367d619a0769c0" + integrity sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw== dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" + prettier-linter-helpers "^1.0.1" + synckit "^0.11.12" eslint-scope@5.1.1: version "5.1.1" @@ -1916,9 +1916,9 @@ esutils@^2.0.2: integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== eventemitter3@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" - integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + version "5.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.4.tgz#a86d66170433712dde814707ac52b5271ceb1feb" + integrity sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw== events@^3.2.0: version "3.3.0" @@ -3345,7 +3345,7 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: +prettier-linter-helpers@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.1.tgz#6a31f88a4bad6c7adda253de12ba4edaea80ebcd" integrity sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg== @@ -3387,11 +3387,11 @@ psl@^1.1.33: punycode "^2.3.1" publint@^0.3.12: - version "0.3.16" - resolved "https://registry.yarnpkg.com/publint/-/publint-0.3.16.tgz#f35af34c0a94c284568de65b09de44fbec651d2a" - integrity sha512-MFqyfRLAExPVZdTQFwkAQELzA8idyXzROVOytg6nEJ/GEypXBUmMGrVaID8cTuzRS1U5L8yTOdOJtMXgFUJAeA== + version "0.3.17" + resolved "https://registry.yarnpkg.com/publint/-/publint-0.3.17.tgz#01d10fa930a168b898c1cf4e8fd4e0fcdbd38f80" + integrity sha512-Q3NLegA9XM6usW+dYQRG1g9uEHiYUzcCVBJDJ7yMcWRqVU9LYZUWdqbwMZfmTCFC5PZLQpLAmhvRcQRl3exqkw== dependencies: - "@publint/pack" "^0.1.2" + "@publint/pack" "^0.1.3" package-manager-detector "^1.6.0" picocolors "^1.1.1" sade "^1.8.1" @@ -3723,10 +3723,10 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.11.7: - version "0.11.11" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.11.tgz#c0b619cf258a97faa209155d9cd1699b5c998cb0" - integrity sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw== +synckit@^0.11.12: + version "0.11.12" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.12.tgz#abe74124264fbc00a48011b0d98bdc1cffb64a7b" + integrity sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ== dependencies: "@pkgr/core" "^0.2.9" @@ -3921,9 +3921,9 @@ undici-types@~7.16.0: integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== undici@^7.12.0: - version "7.18.2" - resolved "https://registry.yarnpkg.com/undici/-/undici-7.18.2.tgz#6cf724ef799a67d94fd55adf66b1e184176efcdf" - integrity sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw== + version "7.19.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-7.19.0.tgz#fd9a3c101c0b084bdcd0a7bbd4d7d7c20e9ea0bf" + integrity sha512-Heho1hJD81YChi+uS2RkSjcVO+EQLmLSyUlHyp7Y/wFbxQaGb4WXVKD073JytrjXJVkSZVzoE2MCSOKugFGtOQ== universalify@^0.2.0: version "0.2.0"