GroupClient overview
PingOne Groups HTTP Client
Provides functions for managing PingOne groups via the PingOne Management API. Includes operations for creating, reading, updating, and deleting groups, as well as managing group memberships.
Added in v0.0.1
Table of contents
API Client
addGroupMember
Adds a user to a group in PingOne
Makes a POST request to add a user as a member of a group. Returns undefined on success (HTTP 201 Created).
Signature
export declare const addGroupMember: ({
envId,
token,
groupId,
userId
}: AddGroupMemberPayload) => Effect.Effect<any, PingOneApiError | HttpClientError, HttpClient | CredentialService>
Added in v0.0.1
createGroup
Creates a group in PingOne via API
Makes a POST request to the PingOne Groups API to create a new group. The request is validated against the PingOneCreateGroupRequest schema and the response is validated against the PingOneCreateGroupResponse schema.
Signature
export declare const createGroup: <S extends Schema.Schema.Type<typeof PingOneCreateGroupRequest>>({
envId,
token,
groupData
}: CreateGroupPayload<S>) => Effect.Effect<
{
readonly name: string
readonly id: string
readonly population?: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt?: string
readonly updatedAt?: string
readonly _links?: { readonly [x: string]: unknown }
readonly description?: string
readonly userFilter?: string
readonly externalId?: string
readonly custom?: boolean
readonly totalMemberCounts?: { readonly directMembers: number; readonly totalMembers: number }
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
deleteGroup
Deletes a group from PingOne
Makes a DELETE request to permanently remove a group from the PingOne environment. This operation cannot be undone. Returns undefined on success (HTTP 204 No Content).
Signature
export declare const deleteGroup: ({
envId,
token,
groupId
}: DeleteGroupPayload) => Effect.Effect<any, PingOneApiError | HttpClientError, HttpClient | CredentialService>
Added in v0.0.1
listGroupMembers
Lists members of a group in PingOne
Makes a GET request to retrieve the list of users who are members of a group. Supports pagination via the limit parameter.
Signature
export declare const listGroupMembers: ({
envId,
token,
groupId,
limit
}: ListGroupMembersPayload) => Effect.Effect<
{
readonly _links?: { readonly self?: { readonly href: string }; readonly next?: { readonly href: string } }
readonly _embedded: {
readonly users: readonly {
readonly id: string
readonly _links?: { readonly self?: { readonly href: string } }
}[]
}
readonly count?: number
readonly size?: number
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
listGroups
Lists groups from PingOne with optional filtering and pagination
Makes a GET request to retrieve a list of groups from the PingOne API. Supports filtering, pagination, and expansion of related resources.
Signature
export declare const listGroups: ({
envId,
token,
limit,
filter,
expand
}: ListGroupsPayload) => Effect.Effect<
{
readonly _links?: { readonly self?: { readonly href: string }; readonly next?: { readonly href: string } }
readonly _embedded: {
readonly groups: readonly {
readonly name: string
readonly id: string
readonly population?: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt?: string
readonly updatedAt?: string
readonly _links?: { readonly [x: string]: unknown }
readonly description?: string
readonly userFilter?: string
readonly externalId?: string
readonly custom?: boolean
readonly totalMemberCounts?: { readonly directMembers: number; readonly totalMembers: number }
}[]
}
readonly count?: number
readonly size?: number
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
readGroup
Reads a group from PingOne by ID
Makes a GET request to retrieve group information from the PingOne API. Supports optional expansion of related resources.
Signature
export declare const readGroup: ({
envId,
token,
groupId,
expand
}: ReadGroupPayload) => Effect.Effect<
{
readonly name: string
readonly id: string
readonly population?: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt?: string
readonly updatedAt?: string
readonly _links?: { readonly [x: string]: unknown }
readonly description?: string
readonly userFilter?: string
readonly externalId?: string
readonly custom?: boolean
readonly totalMemberCounts?: { readonly directMembers: number; readonly totalMembers: number }
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
removeGroupMember
Removes a user from a group in PingOne
Makes a DELETE request to remove a user’s membership from a group. Returns undefined on success (HTTP 204 No Content).
Signature
export declare const removeGroupMember: ({
envId,
token,
groupId,
userId
}: RemoveGroupMemberPayload) => Effect.Effect<any, PingOneApiError | HttpClientError, HttpClient | CredentialService>
Added in v0.0.1
updateGroup
Updates a group in PingOne via API
Makes a PATCH request to update an existing group’s information. Only provided fields will be updated; omitted fields remain unchanged. The request is validated against the PingOneUpdateGroupRequest schema.
Signature
export declare const updateGroup: <S extends Schema.Schema.Type<typeof PingOneUpdateGroupRequest>>({
envId,
token,
groupId,
groupData
}: UpdateGroupPayload<S>) => Effect.Effect<
{
readonly name: string
readonly id: string
readonly population?: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt?: string
readonly updatedAt?: string
readonly _links?: { readonly [x: string]: unknown }
readonly description?: string
readonly userFilter?: string
readonly externalId?: string
readonly custom?: boolean
readonly totalMemberCounts?: { readonly directMembers: number; readonly totalMembers: number }
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1