diff --git a/src/FusionAuthClient.ts b/src/FusionAuthClient.ts index ccda3dc..9bc42c3 100644 --- a/src/FusionAuthClient.ts +++ b/src/FusionAuthClient.ts @@ -710,6 +710,25 @@ export class FusionAuthClient { .go(); } + /** + * Adds the application tenants for universal applications. + * + * @param {UUID} applicationId The Id of the application that the universal application tenant belongs to. + * @param {UUID} universalApplicationTenantId (Optional) The Id of the universal application tenant. + * @param {UniversalApplicationTenantRequest} request The request object that contains all the information used to create the UniversalApplicationTenants. + * @returns {Promise>} + */ + createUniversalApplicationTenant(applicationId: UUID, universalApplicationTenantId: UUID, request: UniversalApplicationTenantRequest): Promise> { + return this.start() + .withUri('/api/application') + .withUriSegment(applicationId) + .withUriSegment("universal-application-tenant") + .withUriSegment(universalApplicationTenantId) + .withJSONBody(request) + .withMethod("POST") + .go(); + } + /** * Creates a user. You can optionally specify an Id for the user, if not provided one will be generated. * @@ -1305,6 +1324,40 @@ export class FusionAuthClient { .go(); } + /** + * Deletes the universal application tenant. + * + * @param {UUID} applicationId The Id of the application that the UniversalApplicationTenant belongs to. + * @param {UUID} universalApplicationTenantId The Id of the UniversalApplicationTenant to delete. + * @returns {Promise>} + */ + deleteUniversalApplicationTenant(applicationId: UUID, universalApplicationTenantId: UUID): Promise> { + return this.start() + .withUri('/api/application') + .withUriSegment(applicationId) + .withUriSegment("universal-application-tenant") + .withUriSegment(universalApplicationTenantId) + .withMethod("DELETE") + .go(); + } + + /** + * Removes the specified tenants from the universal application tenants list. + * + * @param {UUID} applicationId The Id of the universal application that the tenants are linked to. + * @param {Array} tenantIds The Ids of the tenants to delete from the universal application tenants list. + * @returns {Promise>} + */ + deleteUniversalApplicationTenants(applicationId: UUID, tenantIds: Array): Promise> { + return this.start() + .withUri('/api/application') + .withUriSegment(applicationId) + .withUriSegment("application-tenant") + .withParameter('tenantIds', tenantIds) + .withMethod("DELETE") + .go(); + } + /** * Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated * with the user. @@ -3784,6 +3837,23 @@ export class FusionAuthClient { .go(); } + /** + * Retrieves the universal application tenant. + * + * @param {UUID} applicationId The Id of the universal application that tenant is mapped to + * @param {UUID} universalApplicationTenantId The Id of the universal application tenant. + * @returns {Promise>} + */ + retrieveUniversalApplicationTenant(applicationId: UUID, universalApplicationTenantId: UUID): Promise> { + return this.start() + .withUri('/api/application') + .withUriSegment(applicationId) + .withUriSegment("application-tenant") + .withUriSegment(universalApplicationTenantId) + .withMethod("GET") + .go(); + } + /** * Retrieves the user for the given Id. * @@ -4620,6 +4690,22 @@ export class FusionAuthClient { .go(); } + /** + * Searches universal application tenants for the specified applicationId and with the specified criteria and pagination. + * + * @param {UniversalApplicationTenantSearchRequest} request The search criteria and pagination information. + * @returns {Promise>} + */ + searchUniversalApplicationTenants(request: UniversalApplicationTenantSearchRequest): Promise> { + return this.start() + .withUri('/api/application') + .withUriSegment("universal-application-tenant") + .withUriSegment("search") + .withJSONBody(request) + .withMethod("POST") + .go(); + } + /** * Searches user comments with the specified criteria and pagination. * @@ -5342,6 +5428,25 @@ export class FusionAuthClient { .go(); } + /** + * Adds the application tenants for universal applications. + * + * @param {UUID} applicationId The Id of the application that the UniversalApplicationTenant belongs to. + * @param {UUID} universalApplicationTenantId The Id of the universal application tenant. + * @param {UniversalApplicationTenantRequest} request The request object that contains all the information used to create the UniversalApplicationTenant. + * @returns {Promise>} + */ + updateUniversalApplicationTenant(applicationId: UUID, universalApplicationTenantId: UUID, request: UniversalApplicationTenantRequest): Promise> { + return this.start() + .withUri('/api/application') + .withUriSegment(applicationId) + .withUriSegment("universal-application-tenant") + .withUriSegment(universalApplicationTenantId) + .withJSONBody(request) + .withMethod("PUT") + .go(); + } + /** * Updates the user with the given Id. * @@ -5791,6 +5896,7 @@ export interface Application { state?: ObjectState; tenantId?: UUID; themeId?: UUID; + universalConfiguration?: UniversalApplicationConfiguration; unverified?: RegistrationUnverifiedOptions; verificationEmailTemplateId?: UUID; verificationStrategy?: VerificationStrategy; @@ -9337,6 +9443,7 @@ export enum OAuthErrorReason { invalid_target_entity_scope = "invalid_target_entity_scope", invalid_entity_permission_scope = "invalid_entity_permission_scope", invalid_user_id = "invalid_user_id", + invalid_tenant_id = "invalid_tenant_id", grant_type_disabled = "grant_type_disabled", missing_client_id = "missing_client_id", missing_client_secret = "missing_client_secret", @@ -9352,6 +9459,7 @@ export enum OAuthErrorReason { missing_user_code = "missing_user_code", missing_user_id = "missing_user_id", missing_verification_uri = "missing_verification_uri", + missing_tenant_id = "missing_tenant_id", login_prevented = "login_prevented", not_licensed = "not_licensed", user_code_expired = "user_code_expired", @@ -9851,8 +9959,10 @@ export interface ReactorStatus { expiration?: string; licenseAttributes?: Record; licensed?: boolean; + organizationAdminApplication?: ReactorFeatureStatus; scimServer?: ReactorFeatureStatus; threatDetection?: ReactorFeatureStatus; + universalApplication?: ReactorFeatureStatus; webAuthn?: ReactorFeatureStatus; webAuthnPlatformAuthenticators?: ReactorFeatureStatus; webAuthnRoamingAuthenticators?: ReactorFeatureStatus; @@ -11148,6 +11258,74 @@ export interface TwoFactorTrust { startInstant?: number; } +/** + * @author Lyle Schemmerling + */ +export interface UniversalApplicationConfiguration { + global?: boolean; + universal?: boolean; +} + +/** + * An object that represents the mapping between a Universal Application and a Tenant. + * + * @author Lyle Schemmerling + */ +export interface UniversalApplicationTenant { + applicationId?: UUID; + data?: Record; + id?: UUID; + insertInstant?: number; + lastUpdateInstant?: number; + tenantId?: UUID; +} + +/** + * The request object for creating or updating a Universal Application Tenant. + * + * @author Lyle Schemmerling + */ +export interface UniversalApplicationTenantRequest { + universalApplicationTenant?: UniversalApplicationTenant; +} + +/** + * The response object for a single Universal Application Tenant. + * + * @author Lyle Schemmerling + */ +export interface UniversalApplicationTenantResponse { + universalApplicationTenant?: UniversalApplicationTenant; +} + +/** + * @author Lyle Schemmerling + */ +export interface UniversalApplicationTenantSearchCriteria extends BaseSearchCriteria { + applicationId?: UUID; + tenantId?: UUID; + tenantName?: string; +} + +/** + * The request object with the search criteria for Universal Application Tenants. + * + * @author Lyle Schemmerling + */ +export interface UniversalApplicationTenantSearchRequest { + search?: UniversalApplicationTenantSearchCriteria; +} + +/** + * The response object for Universal Application Tenants search results. + * + * @author Lyle Schemmerling + */ +export interface UniversalApplicationTenantSearchResponse { + total?: number; + universalApplicationTenants?: Array; +} + /** * Policy for handling unknown OAuth scopes in the request *