import { APIResource } from "../core/resource.js"; import * as BusinessPartnersAPI from "./business-partners.js"; import * as WorkersAPI from "./workers.js"; import { APIPromise } from "../core/api-promise.js"; import { PageCursorURL, PagePromise } from "../core/pagination.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Device orders (new device shipments, retrievals, etc.) for company workers */ export declare class DeviceOrders extends APIResource { /** * A list of device orders. * * - Requires: `API Tier 1` * - Filterable fields: `worker_id`, `status` * - Expandable fields: `worker` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /device-orders/?filter=filter&expand=expand&order_by=order_by&limit=50&cursor=cursor HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * { * "name": "date_of_birth", * "reason": "Insufficient entitlements" * } * ] * }, * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": {}, * "is_manager": "string", * "manager_id": "string", * "manager": {}, * "legal_entity_id": "string", * "legal_entity": {}, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": "string", * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": {}, * "employment_type_id": "string", * "employment_type": {}, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": {}, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": {}, * "teams_id": [], * "teams": [], * "title": "string", * "title_effective_date": "string", * "level_id": "string", * "level": {}, * "job_function_id": "string", * "job_function": {}, * "termination_details": {}, * "pay_schedule_id": "string", * "work_schedule": {}, * "compensation_grade": {}, * "original_start_date": "string", * "custom_fields": [], * "country_fields": {}, * "business_partners_id": [], * "business_partners": [] * }, * "order_type": "string", * "status": "string", * "warehouse_provider": "string", * "requested_by_id": "string", * "cancel_requested": false, * "completed_at": "string" * } * ], * "next_link": "string" * } * ``` */ list(query?: DeviceOrderListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific device order * * @example HTTP * Representative request and response shapes. * ``` * GET /device-orders/{id}/?expand=expand HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * {} * ] * } * } * ``` */ retrieve(id: string, query?: DeviceOrderRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; } export type DeviceOrderListResponsesPageCursorURL = PageCursorURL; export interface DeviceOrderListResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * True when a cancellation has been requested but not yet completed. */ cancel_requested?: boolean; /** * When the order reached a terminal state (COMPLETED, FAILED, or CANCELED). */ completed_at?: string; /** * The type of hardware order, as reported by the underlying inventory order (for * example: New Device Order, Warehouse Return, Warehouse Order, Add Existing * Device, Assign Device, Empty Order, or Sell Device). */ order_type?: string; /** * The ID of the role that requested the order (often an IT admin). Null if * system-created. */ requested_by_id?: string; /** * The order lifecycle state (InventoryFlowState): CREATED, RUNNING, COMPLETED, * FAILED, CANCELING, CANCELED. */ status?: string; /** * The warehouse / vendor provider servicing the order (e.g. CDW, INGRAMMICRO, * TD_SYNNEX, GROWRK). */ warehouse_provider?: string; /** * The worker the order is for. * * Expandable field */ worker?: WorkersAPI.Worker; /** * The ID of the worker the order is for (the recipient). Null if unassigned. */ worker_id?: string; } /** * Meta information for the response. */ export interface DeviceOrderRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * True when a cancellation has been requested but not yet completed. */ cancel_requested?: boolean; /** * When the order reached a terminal state (COMPLETED, FAILED, or CANCELED). */ completed_at?: string; /** * The type of hardware order, as reported by the underlying inventory order (for * example: New Device Order, Warehouse Return, Warehouse Order, Add Existing * Device, Assign Device, Empty Order, or Sell Device). */ order_type?: string; /** * The ID of the role that requested the order (often an IT admin). Null if * system-created. */ requested_by_id?: string; /** * The order lifecycle state (InventoryFlowState): CREATED, RUNNING, COMPLETED, * FAILED, CANCELING, CANCELED. */ status?: string; /** * The warehouse / vendor provider servicing the order (e.g. CDW, INGRAMMICRO, * TD_SYNNEX, GROWRK). */ warehouse_provider?: string; /** * The worker the order is for. * * Expandable field */ worker?: WorkersAPI.Worker; /** * The ID of the worker the order is for (the recipient). Null if unassigned. */ worker_id?: string; } export interface DeviceOrderListParams { cursor?: string; expand?: string; filter?: string; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; order_by?: string; } export interface DeviceOrderRetrieveParams { expand?: string; } export declare namespace DeviceOrders { export { type DeviceOrderListResponse as DeviceOrderListResponse, type DeviceOrderRetrieveResponse as DeviceOrderRetrieveResponse, type DeviceOrderListResponsesPageCursorURL as DeviceOrderListResponsesPageCursorURL, type DeviceOrderListParams as DeviceOrderListParams, type DeviceOrderRetrieveParams as DeviceOrderRetrieveParams, }; } //# sourceMappingURL=device-orders.d.ts.map