Skip to content

Commit a06d4ca

Browse files
Feat: Added support for Actions Modules API, Connection OTP Authentication and Custom Domain Passkey rpId (#1292)
2 parents 824ebb6 + e0f555e commit a06d4ca

39 files changed

Lines changed: 7432 additions & 923 deletions

File tree

reference.md

Lines changed: 1015 additions & 157 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This file was auto-generated by Fern from our API Definition.
2+
3+
import * as core from "../../core/index.js";
4+
import * as errors from "../../errors/index.js";
5+
6+
export class PreconditionFailedError extends errors.ManagementError {
7+
constructor(body?: unknown, rawResponse?: core.RawResponse) {
8+
super({
9+
message: "PreconditionFailedError",
10+
statusCode: 412,
11+
body: body,
12+
rawResponse: rawResponse,
13+
});
14+
Object.setPrototypeOf(this, new.target.prototype);
15+
if (Error.captureStackTrace) {
16+
Error.captureStackTrace(this, this.constructor);
17+
}
18+
19+
this.name = this.constructor.name;
20+
}
21+
}

src/management/api/errors/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export * from "./ForbiddenError.js";
55
export * from "./InternalServerError.js";
66
export * from "./NotFoundError.js";
77
export * from "./PaymentRequiredError.js";
8+
export * from "./PreconditionFailedError.js";
89
export * from "./ServiceUnavailableError.js";
910
export * from "./TooManyRequestsError.js";
1011
export * from "./UnauthorizedError.js";

src/management/api/requests/requests.ts

Lines changed: 112 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export interface ListClientGrantsRequestParameters {
137137
client_id?: string | null;
138138
/** Optional filter on allow_any_organization. */
139139
allow_any_organization?: Management.ClientGrantAllowAnyOrganizationEnum | null;
140-
/** The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta’s <a href="https://www.okta.com/legal/"> Master Subscription Agreement.</a> */
140+
/** The type of application access the client grant allows. */
141141
subject_type?: Management.ClientGrantSubjectTypeEnum | null;
142142
}
143143

@@ -159,8 +159,10 @@ export interface CreateClientGrantRequestContent {
159159
/** Scopes allowed for this client grant. */
160160
scope?: string[];
161161
subject_type?: Management.ClientGrantSubjectTypeEnum;
162-
/** Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta’s <a href= "https://www.okta.com/legal/"> Master Subscription Agreement.</a> */
162+
/** Types of authorization_details allowed for this client grant. */
163163
authorization_details_types?: string[];
164+
/** If enabled, all scopes configured on the resource server are allowed for this grant. */
165+
allow_all_scopes?: boolean;
164166
}
165167

166168
/**
@@ -173,8 +175,10 @@ export interface UpdateClientGrantRequestContent {
173175
organization_usage?: Management.ClientGrantOrganizationNullableUsageEnum | null;
174176
/** Controls allowing any organization to be used with this grant */
175177
allow_any_organization?: boolean | null;
176-
/** Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta’s <a href= "https://www.okta.com/legal/"> Master Subscription Agreement.</a> */
178+
/** Types of authorization_details allowed for this client grant. */
177179
authorization_details_types?: string[];
180+
/** If enabled, all scopes configured on the resource server are allowed for this grant. */
181+
allow_all_scopes?: boolean | null;
178182
}
179183

180184
/**
@@ -569,6 +573,8 @@ export interface CreateCustomDomainRequestContent {
569573
tls_policy?: Management.CustomDomainTlsPolicyEnum;
570574
custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined;
571575
domain_metadata?: Management.DomainMetadata;
576+
/** Relying Party ID (rpId) to be used for Passkeys on this custom domain. If not provided, the full domain will be used. */
577+
relying_party_identifier?: string;
572578
}
573579

574580
/**
@@ -579,6 +585,8 @@ export interface UpdateCustomDomainRequestContent {
579585
tls_policy?: Management.CustomDomainTlsPolicyEnum;
580586
custom_client_ip_header?: Management.CustomDomainCustomClientIpHeader | undefined;
581587
domain_metadata?: Management.DomainMetadata;
588+
/** 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. */
589+
relying_party_identifier?: string | null;
582590
}
583591

584592
/**
@@ -617,13 +625,15 @@ export interface ListDeviceCredentialsRequestParameters {
617625
* @example
618626
* {
619627
* device_name: "device_name",
628+
* type: "public_key",
620629
* value: "value",
621630
* device_id: "device_id"
622631
* }
623632
*/
624633
export interface CreatePublicKeyDeviceCredentialRequestContent {
625634
/** Name for this device easily recognized by owner. */
626635
device_name: string;
636+
type: Management.DeviceCredentialPublicKeyTypeEnum;
627637
/** Base64 encoded string containing the credential. */
628638
value: string;
629639
/** Unique identifier for the device. Recommend using <a href="http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID">Android_ID</a> on Android and <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/instp/UIDevice/identifierForVendor">identifierForVendor</a>. */
@@ -763,7 +773,7 @@ export interface FlowsListRequest {
763773
/** Return results inside an object that contains the total result count (true) or as a direct array of results (false, default). */
764774
include_totals?: boolean | null;
765775
/** hydration param */
766-
hydrate?: ("form_count" | null) | ("form_count" | null)[];
776+
hydrate?: (Management.FlowsListRequestHydrateItem | null) | (Management.FlowsListRequestHydrateItem | null)[];
767777
/** flag to filter by sync/async flows */
768778
synchronous?: boolean | null;
769779
}
@@ -1237,7 +1247,7 @@ export interface CreateResourceServerRequestContent {
12371247
/** Whether to enforce authorization policies (true) or to ignore them (false). */
12381248
enforce_policies?: boolean;
12391249
token_encryption?: Management.ResourceServerTokenEncryption | null;
1240-
consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null;
1250+
consent_policy?: Management.ResourceServerConsentPolicyEnum | null;
12411251
authorization_details?: unknown[];
12421252
proof_of_possession?: Management.ResourceServerProofOfPossession | null;
12431253
subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization;
@@ -1276,7 +1286,7 @@ export interface UpdateResourceServerRequestContent {
12761286
/** Whether authorization policies are enforced (true) or not enforced (false). */
12771287
enforce_policies?: boolean;
12781288
token_encryption?: Management.ResourceServerTokenEncryption | null;
1279-
consent_policy?: (Management.ResourceServerConsentPolicyEnum | undefined) | null;
1289+
consent_policy?: Management.ResourceServerConsentPolicyEnum | null;
12801290
authorization_details?: unknown[];
12811291
proof_of_possession?: Management.ResourceServerProofOfPossession | null;
12821292
subject_type_authorization?: Management.ResourceServerSubjectTypeAuthorization;
@@ -1563,7 +1573,8 @@ export interface TokenExchangeProfilesListRequest {
15631573
* {
15641574
* name: "name",
15651575
* subject_token_type: "subject_token_type",
1566-
* action_id: "action_id"
1576+
* action_id: "action_id",
1577+
* type: "custom_authentication"
15671578
* }
15681579
*/
15691580
export interface CreateTokenExchangeProfileRequestContent {
@@ -1573,6 +1584,7 @@ export interface CreateTokenExchangeProfileRequestContent {
15731584
subject_token_type: string;
15741585
/** 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. */
15751586
action_id: string;
1587+
type: Management.TokenExchangeProfileTypeEnum;
15761588
}
15771589

15781590
/**
@@ -1850,6 +1862,80 @@ export interface ListActionVersionsRequestParameters {
18501862
per_page?: number | null;
18511863
}
18521864

1865+
/**
1866+
* @example
1867+
* {
1868+
* page: 1,
1869+
* per_page: 1
1870+
* }
1871+
*/
1872+
export interface GetActionModulesRequestParameters {
1873+
/** Page index of the results to return. First page is 0. */
1874+
page?: number | null;
1875+
/** Number of results per page. Paging is disabled if parameter not sent. */
1876+
per_page?: number | null;
1877+
}
1878+
1879+
/**
1880+
* @example
1881+
* {
1882+
* name: "name",
1883+
* code: "code"
1884+
* }
1885+
*/
1886+
export interface CreateActionModuleRequestContent {
1887+
/** The name of the action module. */
1888+
name: string;
1889+
/** The source code of the action module. */
1890+
code: string;
1891+
/** The secrets to associate with the action module. */
1892+
secrets?: Management.ActionModuleSecretRequest[];
1893+
/** The npm dependencies of the action module. */
1894+
dependencies?: Management.ActionModuleDependencyRequest[];
1895+
/** The API version of the module. */
1896+
api_version?: string;
1897+
/** Whether to publish the module immediately after creation. */
1898+
publish?: boolean;
1899+
}
1900+
1901+
/**
1902+
* @example
1903+
* {}
1904+
*/
1905+
export interface UpdateActionModuleRequestContent {
1906+
/** The source code of the action module. */
1907+
code?: string;
1908+
/** The secrets to associate with the action module. */
1909+
secrets?: Management.ActionModuleSecretRequest[];
1910+
/** The npm dependencies of the action module. */
1911+
dependencies?: Management.ActionModuleDependencyRequest[];
1912+
}
1913+
1914+
/**
1915+
* @example
1916+
* {
1917+
* page: 1,
1918+
* per_page: 1
1919+
* }
1920+
*/
1921+
export interface GetActionModuleActionsRequestParameters {
1922+
/** Page index of the results to return. First page is 0. */
1923+
page?: number | null;
1924+
/** Number of results per page. */
1925+
per_page?: number | null;
1926+
}
1927+
1928+
/**
1929+
* @example
1930+
* {
1931+
* module_version_id: "module_version_id"
1932+
* }
1933+
*/
1934+
export interface RollbackActionModuleRequestParameters {
1935+
/** The unique ID of the module version to roll back to. */
1936+
module_version_id: string;
1937+
}
1938+
18531939
/**
18541940
* @example
18551941
* {
@@ -2315,6 +2401,20 @@ export interface ConnectionsGetRequest {
23152401
include_fields?: boolean | null;
23162402
}
23172403

2404+
/**
2405+
* @example
2406+
* {
2407+
* from: "from",
2408+
* take: 1
2409+
* }
2410+
*/
2411+
export interface ListDirectoryProvisioningsRequestParameters {
2412+
/** Optional Id from which to start selection. */
2413+
from?: string | null;
2414+
/** Number of results per page. Defaults to 50. */
2415+
take?: number | null;
2416+
}
2417+
23182418
/**
23192419
* @example
23202420
* {
@@ -2473,7 +2573,9 @@ export interface ExecutionsListRequest {
24732573
*/
24742574
export interface ExecutionsGetRequest {
24752575
/** Hydration param */
2476-
hydrate?: ("debug" | null) | ("debug" | null)[];
2576+
hydrate?:
2577+
| (Management.flows.ExecutionsGetRequestHydrateItem | null)
2578+
| (Management.flows.ExecutionsGetRequestHydrateItem | null)[];
24772579
}
24782580

24792581
/**
@@ -2909,7 +3011,7 @@ export interface CreateOrganizationDiscoveryDomainRequestContent {
29093011
/** The domain name to associate with the organization e.g. acme.com. */
29103012
domain: string;
29113013
status?: Management.OrganizationDiscoveryDomainStatus;
2912-
/** Indicates whether this discovery domain should be used for organization discovery. */
3014+
/** Indicates whether this domain should be used for organization discovery. */
29133015
use_for_organization_discovery?: boolean;
29143016
}
29153017

@@ -2919,7 +3021,7 @@ export interface CreateOrganizationDiscoveryDomainRequestContent {
29193021
*/
29203022
export interface UpdateOrganizationDiscoveryDomainRequestContent {
29213023
status?: Management.OrganizationDiscoveryDomainStatus;
2922-
/** Indicates whether this discovery domain should be used for organization discovery. */
3024+
/** Indicates whether this domain should be used for organization discovery. */
29233025
use_for_organization_discovery?: boolean;
29243026
}
29253027

src/management/api/resources/actions/client/Client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
99
import * as errors from "../../../../errors/index.js";
1010
import * as Management from "../../../index.js";
1111
import { ExecutionsClient } from "../resources/executions/client/Client.js";
12+
import { ModulesClient } from "../resources/modules/client/Client.js";
1213
import { TriggersClient } from "../resources/triggers/client/Client.js";
1314
import { VersionsClient } from "../resources/versions/client/Client.js";
1415

@@ -22,6 +23,7 @@ export class ActionsClient {
2223
protected readonly _options: NormalizedClientOptionsWithAuth<ActionsClient.Options>;
2324
protected _versions: VersionsClient | undefined;
2425
protected _executions: ExecutionsClient | undefined;
26+
protected _modules: ModulesClient | undefined;
2527
protected _triggers: TriggersClient | undefined;
2628

2729
constructor(options: ActionsClient.Options) {
@@ -36,6 +38,10 @@ export class ActionsClient {
3638
return (this._executions ??= new ExecutionsClient(this._options));
3739
}
3840

41+
public get modules(): ModulesClient {
42+
return (this._modules ??= new ModulesClient(this._options));
43+
}
44+
3945
public get triggers(): TriggersClient {
4046
return (this._triggers ??= new TriggersClient(this._options));
4147
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * as executions from "./executions/index.js";
2+
export * as modules from "./modules/index.js";
23
export * as triggers from "./triggers/index.js";
34
export * as versions from "./versions/index.js";

0 commit comments

Comments
 (0)