PingOneClient overview
PingOne Users HTTP Client
Provides functions for managing PingOne users via the PingOne Management API. Includes operations for creating, reading, updating, deleting, and verifying users.
Added in v0.0.1
Table of contents
- API Client
- createPingOneUser
- deletePingOneMfaDevice
- deletePingOneUser
- listPingOneMfaDevices
- listPingOneUserSessions
- listPingOneUsers
- readPingOneUser
- recoverPingOneUserPassword
- resetPingOneUserPassword
- revokePingOneUserSession
- setPingOneUserPassword
- updatePingOneUser
- updatePingOneUserAccount
- updatePingOneUserMfa
- updatePingOneUserStatus
- verifyPingOneUser
API Client
createPingOneUser
Creates a user in PingOne via API
Makes a POST request to the PingOne Users API to create a new user account. The request is validated against the PingOneCreateUserRequest schema and the response is validated against the PingOneCreateUserResponse schema.
Signature
export declare const createPingOneUser: <S extends Schema.Schema.Type<typeof PingOneCreateUserRequest>>({
envId,
token,
userData
}: CreateUserPayload<S>) => Effect.Effect<
{
readonly department?: string
readonly locales?: readonly string[]
readonly username: string
readonly email: string
readonly name?: { readonly given?: string; readonly family?: string }
readonly id: string
readonly population: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt: string
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly mfaEnabled: boolean
readonly updatedAt: string
readonly account?: { readonly status?: string; readonly canAuthenticate?: boolean }
readonly identityProvider?: { readonly type: string }
readonly verifyStatus?: string
readonly _links?: { readonly [x: string]: unknown }
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
deletePingOneMfaDevice
Delete an MFA device for a user in PingOne via API
Makes a DELETE request to remove a specific MFA device from a user’s account.
Signature
export declare const deletePingOneMfaDevice: ({
envId,
token,
userId,
deviceId
}: DeleteMfaDevicePayload) => Effect.Effect<
{ readonly status: string; readonly id: string },
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService
>
Added in v0.0.1
deletePingOneUser
Deletes a user from PingOne
Makes a DELETE request to permanently remove a user from the PingOne environment. This operation cannot be undone. Returns undefined on success (HTTP 204 No Content).
Signature
export declare const deletePingOneUser: ({
envId,
token,
userId
}: DeleteUserPayload) => Effect.Effect<any, PingOneApiError | HttpClientError, HttpClient | CredentialService>
Added in v0.0.1
listPingOneMfaDevices
List MFA devices for a user in PingOne via API
Makes a GET request to retrieve all MFA devices registered for a user.
Signature
export declare const listPingOneMfaDevices: ({
envId,
token,
userId,
limit
}: ListMfaDevicesPayload) => Effect.Effect<
{
readonly _links?: { readonly self?: { readonly href: string }; readonly next?: { readonly href: string } }
readonly _embedded: {
readonly devices: readonly {
readonly status?: string
readonly name?: string
readonly id: string
readonly createdAt: string
readonly updatedAt: string
readonly type: string
readonly nickname?: string
}[]
}
readonly count?: number
readonly size?: number
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
listPingOneUserSessions
List user sessions in PingOne via API
Makes a GET request to retrieve all active sessions for a user.
Signature
export declare const listPingOneUserSessions: ({
envId,
token,
userId,
limit
}: ListUserSessionsPayload) => Effect.Effect<
{
readonly _links?: { readonly self?: { readonly href: string }; readonly next?: { readonly href: string } }
readonly _embedded: {
readonly sessions: readonly {
readonly id: string
readonly createdAt: string
readonly expiresAt?: string
readonly lastUsedAt?: string
readonly application?: { readonly name?: string; readonly id: string }
}[]
}
readonly count?: number
readonly size?: number
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
listPingOneUsers
Lists users from PingOne with optional filtering and pagination
Makes a GET request to retrieve a list of users from the PingOne API. Supports SCIM filtering for searching users and pagination via limit parameter.
Signature
export declare const listPingOneUsers: ({
envId,
token,
limit,
filter
}: ListUsersPayload) => Effect.Effect<
{
readonly _links?: { readonly self?: { readonly href: string }; readonly next?: { readonly href: string } }
readonly _embedded: {
readonly users: readonly {
readonly department?: string
readonly locales?: readonly string[]
readonly username: string
readonly email: string
readonly name?: { readonly given?: string; readonly family?: string }
readonly id: string
readonly population: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt: string
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly mfaEnabled: boolean
readonly updatedAt: string
readonly account?: { readonly status?: string; readonly canAuthenticate?: boolean }
readonly identityProvider?: { readonly type: string }
readonly verifyStatus?: string
readonly _links?: { readonly [x: string]: unknown }
}[]
}
readonly count?: number
readonly size?: number
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
readPingOneUser
Reads a user from PingOne by ID
Makes a GET request to retrieve user information from the PingOne API. The request includes the expand=population query parameter to include full population details in the response.
Signature
export declare const readPingOneUser: ({
envId,
token,
userId
}: ReadUserPayload) => Effect.Effect<
{
readonly department?: string
readonly locales?: readonly string[]
readonly username: string
readonly email: string
readonly name?: { readonly given?: string; readonly family?: string }
readonly id: string
readonly population: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt: string
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly mfaEnabled: boolean
readonly updatedAt: string
readonly account?: { readonly status?: string; readonly canAuthenticate?: boolean }
readonly identityProvider?: { readonly type: string }
readonly verifyStatus?: string
readonly _links?: { readonly [x: string]: unknown }
},
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService | CacheService
>
Added in v0.0.1
recoverPingOneUserPassword
Initiates a password recovery flow for a user
Makes a POST request to trigger a password recovery flow. PingOne will send a recovery code/link to the user’s email address. This is a self-service operation that users can initiate themselves.
Signature
export declare const recoverPingOneUserPassword: <S extends Schema.Schema.Type<typeof PingOnePasswordResetRequest>>({
envId,
token,
resetData
}: PasswordResetPayload<S>) => Effect.Effect<
{ readonly status: string; readonly id: string },
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
resetPingOneUserPassword
Initiates a password reset flow (admin-initiated)
Similar to password recovery but initiated by an administrator rather than the user. Makes a POST request to trigger a password reset flow. PingOne will send a reset code/link to the specified email address.
Signature
export declare const resetPingOneUserPassword: <S extends Schema.Schema.Type<typeof PingOnePasswordResetRequest>>({
envId,
token,
resetData
}: PasswordResetPayload<S>) => Effect.Effect<
{ readonly status: string; readonly id: string },
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
revokePingOneUserSession
Revoke a user session in PingOne via API
Makes a DELETE request to revoke a specific user session.
Signature
export declare const revokePingOneUserSession: ({
envId,
token,
userId,
sessionId
}: RevokeUserSessionPayload) => Effect.Effect<
{ readonly status: string; readonly id: string },
PingOneApiError | HttpClientError | ParseError,
HttpClient | CredentialService
>
Added in v0.0.1
setPingOneUserPassword
Sets a user’s password in PingOne
Makes a PUT request to set or update a user’s password. Can optionally require the user to change their password on next login by setting forceChange to true.
Signature
export declare const setPingOneUserPassword: <S extends Schema.Schema.Type<typeof PingOneSetPasswordRequest>>({
envId,
token,
userId,
passwordData
}: SetPasswordPayload<S>) => Effect.Effect<
{
readonly status: string
readonly environment: { readonly id: string }
readonly user: { readonly id: string }
readonly passwordPolicy: { readonly id: string }
readonly lastChangedAt: string
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
updatePingOneUser
Updates a user in PingOne via API
Makes a PATCH request to update an existing user’s information. Only provided fields will be updated; omitted fields remain unchanged. The request is validated against the PingOneUpdateUserRequest schema.
Signature
export declare const updatePingOneUser: <S extends Schema.Schema.Type<typeof PingOneUpdateUserRequest>>({
envId,
token,
userId,
userData
}: UpdateUserPayload<S>) => Effect.Effect<
{
readonly username?: string
readonly email?: string
readonly name?: {
readonly given?: string
readonly family?: string
readonly formatted?: string
readonly middle?: string
readonly honorificPrefix?: string
readonly honorificSuffix?: string
}
readonly id: string
readonly population: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt: string
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly mfaEnabled: boolean
readonly updatedAt: string
readonly type?: string
readonly nickname?: string
readonly title?: string
readonly preferredLanguage?: string
readonly locale?: string
readonly primaryPhone?: string
readonly mobilePhone?: string
readonly photo?: { readonly href: string }
readonly address?: {
readonly region?: string
readonly streetAddress?: string
readonly locality?: string
readonly postalCode?: string
readonly countryCode?: string
}
readonly accountId?: string
readonly timezone?: string
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
updatePingOneUserAccount
Update a user’s account authentication status in PingOne via API
Makes a PATCH request to update the user’s account.canAuthenticate status. Setting canAuthenticate to false effectively locks the user account.
Signature
export declare const updatePingOneUserAccount: ({
envId,
token,
userId,
canAuthenticate
}: UpdateUserAccountPayload) => Effect.Effect<
{
readonly id: string
readonly environment: { readonly id: string }
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly updatedAt: string
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
updatePingOneUserMfa
Update a user’s MFA enabled status in PingOne via API
Makes a PATCH request to update the user’s mfaEnabled status.
Signature
export declare const updatePingOneUserMfa: ({
envId,
token,
userId,
mfaEnabled
}: UpdateUserMfaPayload) => Effect.Effect<
{
readonly id: string
readonly environment: { readonly id: string }
readonly mfaEnabled: boolean
readonly updatedAt: string
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
updatePingOneUserStatus
Enable a user in PingOne via API
Makes a PATCH request to update the user’s enabled status to true.
Signature
export declare const updatePingOneUserStatus: ({
envId,
token,
userId,
enabled
}: UpdateUserStatusPayload) => Effect.Effect<
{
readonly id: string
readonly environment: { readonly id: string }
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly updatedAt: string
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1
verifyPingOneUser
Verifies a user account in PingOne with a verification code
Makes a POST request with a special content type to verify a user’s account using a verification code (typically 6 digits) sent to the user’s email. Upon successful verification, the user’s lifecycle status is updated to ACCOUNT_OK.
Signature
export declare const verifyPingOneUser: <S extends Schema.Schema.Type<typeof PingOneVerifyUserRequest>>({
envId,
token,
userId,
verificationData
}: VerifyUserPayload<S>) => Effect.Effect<
{
readonly department?: string
readonly locales?: readonly string[]
readonly username: string
readonly email: string
readonly name?: { readonly given?: string; readonly family?: string }
readonly id: string
readonly population: { readonly id: string }
readonly environment: { readonly id: string }
readonly createdAt: string
readonly enabled: boolean
readonly lifecycle: { readonly status: string }
readonly mfaEnabled: boolean
readonly updatedAt: string
readonly account?: { readonly status?: string; readonly canAuthenticate?: boolean }
readonly identityProvider?: { readonly type: string }
readonly verifyStatus?: string
readonly _links?: { readonly [x: string]: unknown }
},
PingOneApiError | HttpClientError | ParseError | HttpBodyError,
HttpClient | CredentialService
>
Added in v0.0.1