diff --git a/src/FusionAuth/FusionAuthClient.php b/src/FusionAuth/FusionAuthClient.php index 19943ec..f4e2865 100644 --- a/src/FusionAuth/FusionAuthClient.php +++ b/src/FusionAuth/FusionAuthClient.php @@ -802,6 +802,27 @@ public function createTheme($themeId, $request) ->go(); } + /** + * Adds the application tenants for universal applications. + * + * @param string $applicationId The Id of the application that the universal application tenant belongs to. + * @param string $universalApplicationTenantId (Optional) The Id of the universal application tenant. + * @param array $request The request object that contains all the information used to create the UniversalApplicationTenants. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function createUniversalApplicationTenant($applicationId, $universalApplicationTenantId, $request) + { + return $this->start()->uri("/api/application") + ->urlSegment($applicationId) + ->urlSegment("universal-application-tenant") + ->urlSegment($universalApplicationTenantId) + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Creates a user. You can optionally specify an Id for the user, if not provided one will be generated. * @@ -1474,6 +1495,44 @@ public function deleteTheme($themeId) ->go(); } + /** + * Deletes the universal application tenant. + * + * @param string $applicationId The Id of the application that the UniversalApplicationTenant belongs to. + * @param string $universalApplicationTenantId The Id of the UniversalApplicationTenant to delete. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function deleteUniversalApplicationTenant($applicationId, $universalApplicationTenantId) + { + return $this->start()->uri("/api/application") + ->urlSegment($applicationId) + ->urlSegment("universal-application-tenant") + ->urlSegment($universalApplicationTenantId) + ->delete() + ->go(); + } + + /** + * Removes the specified tenants from the universal application tenants list. + * + * @param string $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. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function deleteUniversalApplicationTenants($applicationId, $tenantIds) + { + return $this->start()->uri("/api/application") + ->urlSegment($applicationId) + ->urlSegment("application-tenant") + ->urlParameter("tenantIds", $tenantIds) + ->delete() + ->go(); + } + /** * Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated * with the user. @@ -4270,6 +4329,25 @@ public function retrieveTwoFactorStatus($userId, $applicationId, $twoFactorTrust ->go(); } + /** + * Retrieves the universal application tenant. + * + * @param string $applicationId The Id of the universal application that tenant is mapped to + * @param string $universalApplicationTenantId The Id of the universal application tenant. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function retrieveUniversalApplicationTenant($applicationId, $universalApplicationTenantId) + { + return $this->start()->uri("/api/application") + ->urlSegment($applicationId) + ->urlSegment("application-tenant") + ->urlSegment($universalApplicationTenantId) + ->get() + ->go(); + } + /** * Retrieves the user for the given Id. * @@ -5216,6 +5294,24 @@ public function searchThemes($request) ->go(); } + /** + * Searches universal application tenants for the specified applicationId and with the specified criteria and pagination. + * + * @param array $request The search criteria and pagination information. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function searchUniversalApplicationTenants($request) + { + return $this->start()->uri("/api/application") + ->urlSegment("universal-application-tenant") + ->urlSegment("search") + ->bodyHandler(new JSONBodyHandler($request)) + ->post() + ->go(); + } + /** * Searches user comments with the specified criteria and pagination. * @@ -6025,6 +6121,27 @@ public function updateTheme($themeId, $request) ->go(); } + /** + * Adds the application tenants for universal applications. + * + * @param string $applicationId The Id of the application that the UniversalApplicationTenant belongs to. + * @param string $universalApplicationTenantId The Id of the universal application tenant. + * @param array $request The request object that contains all the information used to create the UniversalApplicationTenant. + * + * @return ClientResponse The ClientResponse. + * @throws \Exception + */ + public function updateUniversalApplicationTenant($applicationId, $universalApplicationTenantId, $request) + { + return $this->start()->uri("/api/application") + ->urlSegment($applicationId) + ->urlSegment("universal-application-tenant") + ->urlSegment($universalApplicationTenantId) + ->bodyHandler(new JSONBodyHandler($request)) + ->put() + ->go(); + } + /** * Updates the user with the given Id. *