The object that changes the device information.

The device information change can be used to

  • modify the name of the device and/or
  • modify its Firebase registration token or
  • disable push notifications.

If neither name or fcmRegistrationToken are provided, the provided onSuccess callback will be executed when execute is invoked.

Usage example for changing device information:

  [...]
async updateDeviceInformation(
client: MobileAuthenticationClient,
newName: string,
fcmToken: string
): Promise<void> {
await client.operations.deviceInformationChange
.name(newName)
.fcmRegistrationToken(fcmToken)
.onSuccess(() => {
// handle success
})
.onError((_error) => {
// handle error
})
.execute();
}
[...]

Hierarchy

Methods

  • Specifies the new name of the device information.

    This is typically a user-friendly string describing the mobile device where the application is running.

    IMPORTANT
    Do not invoke this method if the name does not need to be updated.

    Parameters

    • name: string

      the new device information name.

    Returns DeviceInformationChange

    a DeviceInformationChange object.

  • Specifies the object that will be invoked if the device information for the user was updated successfully.

    IMPORTANT
    Providing the onSuccess is required.

    Parameters

    • onSuccess: (() => void)

      the function which is invoked on successful update.

        • (): void
        • Returns void

    Returns DeviceInformationChange

    a DeviceInformationChange object.

  • Executes the operation asynchronously.

    Returns Promise<void>

Generated using TypeDoc