Interface GroupsAPI

interface GroupsAPI {
    clearCache: () => void;
    createGroup: (
        body: GroupPostSchema,
        options?: ApiCallOptions,
    ) => Promise<CreateGroupHttpResponse>;
    deleteGroup: (
        groupId: string,
        options?: ApiCallOptions,
    ) => Promise<DeleteGroupHttpResponse>;
    filterGroups: (
        query: {
            limit?: number;
            next?: string;
            prev?: string;
            sort?: "name" | "-name" | "+name";
        },
        body: Filter,
        options?: ApiCallOptions,
    ) => Promise<FilterGroupsHttpResponse>;
    getGroup: (
        groupId: string,
        options?: ApiCallOptions,
    ) => Promise<GetGroupHttpResponse>;
    getGroups: (
        query: {
            filter?: string;
            limit?: number;
            next?: string;
            prev?: string;
            sort?: string;
            systemGroups?: boolean;
            totalResults?: boolean;
        },
        options?: ApiCallOptions,
    ) => Promise<GetGroupsHttpResponse>;
    getGroupsSettings: (
        options?: ApiCallOptions,
    ) => Promise<GetGroupsSettingsHttpResponse>;
    patchGroup: (
        groupId: string,
        body: GroupPatchSchema,
        options?: ApiCallOptions,
    ) => Promise<PatchGroupHttpResponse>;
    patchGroupsSettings: (
        body: SettingsPatchSchema,
        options?: ApiCallOptions,
    ) => Promise<PatchGroupsSettingsHttpResponse>;
}
Index

Properties

clearCache: () => void

Clears the cache for groups api requests.

Type declaration

    • (): void
    • Clears the cache for groups api requests.

      Returns void

createGroup: (
    body: GroupPostSchema,
    options?: ApiCallOptions,
) => Promise<CreateGroupHttpResponse>

Creates a new group. The maximum number of groups a tenant can have is 10,000. Group names are case-sensitive, and must be unique.

Type declaration

an object with the body content

CreateGroupHttpError

deleteGroup: (
    groupId: string,
    options?: ApiCallOptions,
) => Promise<DeleteGroupHttpResponse>

Deletes the requested group.

Type declaration

The ID of the group to delete.

DeleteGroupHttpError

filterGroups: (
    query: {
        limit?: number;
        next?: string;
        prev?: string;
        sort?: "name" | "-name" | "+name";
    },
    body: Filter,
    options?: ApiCallOptions,
) => Promise<FilterGroupsHttpResponse>

Retrieves a list of groups matching the filter using advanced query string.

Type declaration

    • (
          query: {
              limit?: number;
              next?: string;
              prev?: string;
              sort?: "name" | "-name" | "+name";
          },
          body: Filter,
          options?: ApiCallOptions,
      ): Promise<FilterGroupsHttpResponse>
    • Retrieves a list of groups matching the filter using advanced query string.

      Parameters

      • query: {
            limit?: number;
            next?: string;
            prev?: string;
            sort?: "name" | "-name" | "+name";
        }

        an object with query parameters

        • Optionallimit?: number

          The number of user entries to retrieve.

        • Optionalnext?: string

          Get users with IDs that are higher than the target user ID. Cannot be used in conjunction with prev.

        • Optionalprev?: string

          Get users with IDs that are lower than the target user ID. Cannot be used in conjunction with next.

        • Optionalsort?: "name" | "-name" | "+name"

          The field to sort by, with +/- prefix indicating sort order

      • body: Filter

        an object with the body content

      • Optionaloptions: ApiCallOptions

      Returns Promise<FilterGroupsHttpResponse>

      FilterGroupsHttpError

an object with query parameters

an object with the body content

FilterGroupsHttpError

getGroup: (
    groupId: string,
    options?: ApiCallOptions,
) => Promise<GetGroupHttpResponse>

Returns the requested group.

Type declaration

The group's unique identifier

GetGroupHttpError

getGroups: (
    query: {
        filter?: string;
        limit?: number;
        next?: string;
        prev?: string;
        sort?: string;
        systemGroups?: boolean;
        totalResults?: boolean;
    },
    options?: ApiCallOptions,
) => Promise<GetGroupsHttpResponse>

Returns a list of groups with cursor-based pagination.

Type declaration

    • (
          query: {
              filter?: string;
              limit?: number;
              next?: string;
              prev?: string;
              sort?: string;
              systemGroups?: boolean;
              totalResults?: boolean;
          },
          options?: ApiCallOptions,
      ): Promise<GetGroupsHttpResponse>
    • Returns a list of groups with cursor-based pagination.

      Parameters

      • query: {
            filter?: string;
            limit?: number;
            next?: string;
            prev?: string;
            sort?: string;
            systemGroups?: boolean;
            totalResults?: boolean;
        }

        an object with query parameters

        • Optionalfilter?: string

          The advanced filtering to use for the query. Refer to RFC 7644 for the syntax. Cannot be combined with any of the fields marked as deprecated. All conditional statements within this query parameter are case insensitive.

        • Optionallimit?: number

          The number of groups to retrieve.

        • Optionalnext?: string

          The next page cursor.

        • Optionalprev?: string

          The previous page cursor.

        • Optionalsort?: string

          Optional resource field name to sort on, eg. name. Can be prefixed with +/- to determine order, defaults to (+) ascending.

        • OptionalsystemGroups?: boolean

          Return system groups (e.g. Everyone) instead of regular groups. Cannot be combined with any other query parameters.

        • OptionaltotalResults?: boolean

          Whether to return a total match count in the result. Defaults to false.

      • Optionaloptions: ApiCallOptions

      Returns Promise<GetGroupsHttpResponse>

      GetGroupsHttpError

an object with query parameters

GetGroupsHttpError

getGroupsSettings: (
    options?: ApiCallOptions,
) => Promise<GetGroupsSettingsHttpResponse>

Returns the tenant's group settings, such as whether automatic group creation and IdP group synchronization are enabled or disabled, and roles assigned to system groups.

Type declaration

GetGroupsSettingsHttpError

patchGroup: (
    groupId: string,
    body: GroupPatchSchema,
    options?: ApiCallOptions,
) => Promise<PatchGroupHttpResponse>

Updates the requested group.

Type declaration

The ID of the group to update.

an object with the body content

PatchGroupHttpError

patchGroupsSettings: (
    body: SettingsPatchSchema,
    options?: ApiCallOptions,
) => Promise<PatchGroupsSettingsHttpResponse>

Updates the tenant's group settings, such as whether automatic group creation and IdP group synchronization are enabled or disabled, and roles assigned to system groups.

Type declaration

an object with the body content

PatchGroupsSettingsHttpError