import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class Devices extends APIResource { /** * Register the phone or browser the user is signed in on to receive push * notifications, or refresh a device registered before. Call once after login -- * not per organization; the device receives push from every organization the user * belongs to -- and again whenever the push provider rotates the token. A token * registered earlier by another user moves to this user, so the previous owner * stops receiving push on it. */ create(params: DeviceCreateParams, options?: RequestOptions): APIPromise; /** * Stop sending push notifications to one of the user's devices. Call on logout, * together with the push SDK's own token deletion. Repeating the call for an * already unregistered device succeeds. */ delete(deviceID: string, params?: DeviceDeleteParams | null | undefined, options?: RequestOptions): APIPromise; } /** * The registered device. * * Attributes: device_id (str): ID to send to * `DELETE /notifications/devices/{device_id}` on logout. */ export interface DeviceCreateResponse { /** * ID to send when unregistering the device on logout. */ device_id: string; } export interface DeviceCreateParams { /** * Body param: Push token issued by the provider. */ token: string; /** * Body param: Where the device runs. */ platform: 'ios' | 'android' | 'web'; /** * Body param: App the device registered from, e.g. `glchat` or `catapa`. */ app_id?: string; /** * Body param: App version, e.g. `2.4.0 (231)`. */ app_version?: string | null; /** * Body param: BCP-47 language tag, e.g. `id-ID`. */ locale?: string | null; /** * Body param: Who issued the token. */ provider?: 'fcm'; /** * Body param: IANA time zone, e.g. `Asia/Jakarta`. */ timezone?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface DeviceDeleteParams { 'Accept-Language'?: string; /** * Set to `structured` to receive errors in the structured envelope. Omit it to * keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace Devices { export { type DeviceCreateResponse as DeviceCreateResponse, type DeviceCreateParams as DeviceCreateParams, type DeviceDeleteParams as DeviceDeleteParams, }; } //# sourceMappingURL=devices.d.mts.map