mpp-sdk
Version:
SDK to talk to the Memento Payments Platform
25 lines (24 loc) • 1.06 kB
TypeScript
import { BaseEndpoint } from "./base";
import { Device, DeviceInput, DeviceKey, DeviceKeyInput, DeviceTokenInput } from "../types";
export default class DevicesEndpoint extends BaseEndpoint {
getById(id: string): Promise<import("../types").MPPResult<Device>>;
update(deviceId: string, data: DeviceInput): Promise<import("../types").MPPResult<Device>>;
/**
* createToken creates and attaches a device token to the device
* associated with the authentication token used which is used for
* e.g. push notifications.
* @param data
*/
createToken(data: DeviceTokenInput): Promise<import("../types").MPPResult<Device>>;
/**
* Sets the device key for the device associated with the authentication
* token used.
* @param data
*/
setDeviceKey(data: DeviceKeyInput): Promise<import("../types").MPPResult<never>>;
/**
* Gets the device key for the device associated with the authentication
* token used.
*/
getDeviceKey(): Promise<import("../types").MPPResult<DeviceKey>>;
}