Interface Organization
-
- All Implemented Interfaces:
public interface OrganizationThe Organization interface provides methods for retrieving, updating, and deleting the current authenticated user's organization and creating, updating, deleting, reactivating, and searching an organizations members
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classOrganization.UpdateOrganizationParametersData class used for wrapping parameters used for making an Organization update call
public interfaceOrganization.OrganizationMembersAn interface that provides methods for performing create, update, delete, reactivate, and search operations on an Organization's members
-
Method Summary
Modifier and Type Method Description abstract UnitonChange(Function1<StytchObjectInfo<OrganizationData>, Unit> callback)Assign a callback that will be called when the organization data changes abstract StytchResult<OrganizationResponseData>get()Wraps Stytch’s organization/me endpoint. abstract Unitget(Function1<StytchResult<OrganizationResponseData>, Unit> callback)Wraps Stytch’s organization/me endpoint. abstract CompletableFuture<StytchResult<OrganizationResponseData>>getCompletable()Wraps Stytch’s organization/me endpoint. abstract OrganizationDatagetSync()Get member from memory without network call abstract StytchResult<OrganizationUpdateResponseData>update(Organization.UpdateOrganizationParameters parameters)Updates the Organization of the logged-in member. abstract Unitupdate(Organization.UpdateOrganizationParameters parameters, Function1<StytchResult<OrganizationUpdateResponseData>, Unit> callback)Updates the Organization of the logged-in member. abstract CompletableFuture<StytchResult<OrganizationUpdateResponseData>>updateCompletable(Organization.UpdateOrganizationParameters parameters)Updates the Organization of the logged-in member. abstract StytchResult<OrganizationDeleteResponseData>delete()Deletes the Organization of the logged-in member. abstract Unitdelete(Function1<StytchResult<OrganizationDeleteResponseData>, Unit> callback)Deletes the Organization of the logged-in member. abstract CompletableFuture<StytchResult<OrganizationDeleteResponseData>>deleteCompletable()Deletes the Organization of the logged-in member. abstract StateFlow<StytchObjectInfo<OrganizationData>>getOnChange()Exposes a flow of organization data abstract Organization.OrganizationMembersgetMembers()Public variable that exposes an instance of Organization. -
-
Method Detail
-
onChange
abstract Unit onChange(Function1<StytchObjectInfo<OrganizationData>, Unit> callback)
Assign a callback that will be called when the organization data changes
-
get
abstract StytchResult<OrganizationResponseData> get()
Wraps Stytch’s organization/me endpoint.
- Returns:
OrganizationResponse
-
get
abstract Unit get(Function1<StytchResult<OrganizationResponseData>, Unit> callback)
Wraps Stytch’s organization/me endpoint.
- Parameters:
callback- a callback that receives an OrganizationResponse
-
getCompletable
abstract CompletableFuture<StytchResult<OrganizationResponseData>> getCompletable()
Wraps Stytch’s organization/me endpoint.
- Returns:
OrganizationResponse
-
getSync
abstract OrganizationData getSync()
Get member from memory without network call
- Returns:
locally stored Organization
-
update
abstract StytchResult<OrganizationUpdateResponseData> update(Organization.UpdateOrganizationParameters parameters)
Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.
- Parameters:
parameters- the parameters required for updating an organization- Returns:
UpdateOrganizationResponse
-
update
abstract Unit update(Organization.UpdateOrganizationParameters parameters, Function1<StytchResult<OrganizationUpdateResponseData>, Unit> callback)
Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.
- Parameters:
parameters- the parameters required for updating an organizationcallback- a callback that receives an UpdateOrganizationResponse
-
updateCompletable
abstract CompletableFuture<StytchResult<OrganizationUpdateResponseData>> updateCompletable(Organization.UpdateOrganizationParameters parameters)
Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.
- Parameters:
parameters- the parameters required for updating an organization- Returns:
UpdateOrganizationResponse
-
delete
abstract StytchResult<OrganizationDeleteResponseData> delete()
Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted
- Returns:
DeleteOrganizationResponse
-
delete
abstract Unit delete(Function1<StytchResult<OrganizationDeleteResponseData>, Unit> callback)
Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted
- Parameters:
callback- a callback that receives a DeleteOrganizationResponse
-
deleteCompletable
abstract CompletableFuture<StytchResult<OrganizationDeleteResponseData>> deleteCompletable()
Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted
- Returns:
DeleteOrganizationResponse
-
getOnChange
abstract StateFlow<StytchObjectInfo<OrganizationData>> getOnChange()
Exposes a flow of organization data
-
getMembers
abstract Organization.OrganizationMembers getMembers()
Public variable that exposes an instance of Organization.Members
-
-
-
-