import { APIResource } from "../core/resource.mjs"; import * as BusinessPartnersAPI from "./business-partners.mjs"; import * as Shared from "./shared.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../core/pagination.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; /** * Work locations used by the company */ export declare class WorkLocations extends APIResource { /** * A list of work locations. * * - Requires: `API Tier 1` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /work-locations/?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", * "name": "string", * "address": { * "type": "HOME", * "formatted": "string", * "street_address": "string", * "locality": "string", * "region": "string", * "postal_code": "string", * "country": "AF" * } * } * ], * "next_link": "string" * } * ``` */ list(query?: WorkLocationListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new work location * * @example HTTP * Representative request and response shapes. * ``` * POST /work-locations/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "address": {}, * "name": "name" * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "address": { * "type": "HOME", * "formatted": "string", * "street_address": "string", * "locality": "string", * "region": "string", * "postal_code": "string", * "country": "AF" * } * } * ``` */ create(body: WorkLocationCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific work location * * @example HTTP * Representative request and response shapes. * ``` * GET /work-locations/{id}/ 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, options?: RequestOptions): APIPromise; /** * Update a specific work location. * * @example HTTP * Representative request and response shapes. * ``` * PATCH /work-locations/{id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * {} * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "address": { * "type": "HOME", * "formatted": "string", * "street_address": "string", * "locality": "string", * "region": "string", * "postal_code": "string", * "country": "AF" * } * } * ``` */ update(id: string, body?: WorkLocationUpdateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete a work location * * @example HTTP * Representative request and response shapes. * ``` * DELETE /work-locations/{id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 204 No Content * ``` */ delete(id: string, options?: RequestOptions): APIPromise; } export type WorkLocationsPageCursorURL = PageCursorURL; export interface WorkLocation { /** * Identifier field */ id: string; /** * The address for the work location. */ address: Shared.Address; /** * Record creation date */ created_at: string; /** * The name of the work location. */ name: string; /** * Record update date */ updated_at: string; } /** * Meta information for the response. */ export interface WorkLocationRetrieveResponse extends BusinessPartnersAPI.Meta, WorkLocation { } export interface WorkLocationListParams { cursor?: string; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; order_by?: string; } export interface WorkLocationCreateParams { /** * The address for the work location. */ address: WorkLocationCreateParams.Address; /** * The name of the work location. */ name: string; } export declare namespace WorkLocationCreateParams { /** * The address for the work location. */ interface Address { /** * The country component, pursuant to SCIM RFC 7643 4.1.2. */ country?: Shared.CountryCode; /** * The city or locality component. */ locality?: string; /** * The zip code or postal code component, pursuant to SCIM RFC 7643 4.1.2. */ postal_code?: string; /** * The state or region component, pursuant to SCIM RFC 7643 4.1.2. */ region?: string; /** * The full street address component, which may include house number, street name, * P.O. box, and multi-line extended street address information, pursuant to SCIM * RFC 7643 4.1.2.. */ street_address?: string; /** * The classification of the address. */ type?: 'HOME' | 'WORK' | 'OTHER'; } } export interface WorkLocationUpdateParams { /** * The address for the work location. */ address?: WorkLocationUpdateParams.Address; /** * The name of the work location. */ name?: string; } export declare namespace WorkLocationUpdateParams { /** * The address for the work location. */ interface Address { /** * The country component, pursuant to SCIM RFC 7643 4.1.2. */ country?: Shared.CountryCode; /** * The city or locality component. */ locality?: string; /** * The zip code or postal code component, pursuant to SCIM RFC 7643 4.1.2. */ postal_code?: string; /** * The state or region component, pursuant to SCIM RFC 7643 4.1.2. */ region?: string; /** * The full street address component, which may include house number, street name, * P.O. box, and multi-line extended street address information, pursuant to SCIM * RFC 7643 4.1.2.. */ street_address?: string; /** * The classification of the address. */ type?: 'HOME' | 'WORK' | 'OTHER'; } } export declare namespace WorkLocations { export { type WorkLocation as WorkLocation, type WorkLocationRetrieveResponse as WorkLocationRetrieveResponse, type WorkLocationsPageCursorURL as WorkLocationsPageCursorURL, type WorkLocationListParams as WorkLocationListParams, type WorkLocationCreateParams as WorkLocationCreateParams, type WorkLocationUpdateParams as WorkLocationUpdateParams, }; } //# sourceMappingURL=work-locations.d.mts.map