import { APIResource } from "../core/resource.mjs"; import * as BusinessPartnerGroupsAPI from "./business-partner-groups.mjs"; import * as WorkersAPI from "./workers.mjs"; import * as SupergroupsAPI from "./supergroups/supergroups.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../core/pagination.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; /** * Business partners of the company */ export declare class BusinessPartners extends APIResource { /** * A list of business partners. * * - Requires: `API Tier 1` * - Filterable fields: `worker_id`, `business_partner_group_id` * - Expandable fields: `business_partner_group`, `worker`, `client_group` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /business-partners/?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", * "business_partner_group_id": "string", * "business_partner_group": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "domain": "HR", * "default_business_partner_id": "string", * "default_business_partner": {} * }, * "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": [] * }, * "client_group_id": "string", * "client_group": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "display_name": "string", * "name": "string", * "app_owner_id": "string", * "group_type": "string", * "sub_group_type": "string", * "read_only": "string", * "description": "string", * "parent": "string", * "mutually_exclusive_key": "string", * "cumulatively_exhaustive_default": "string", * "include_terminated": "string", * "allow_non_employees": "string", * "can_override_role_states": "string", * "priority": "string", * "is_invisible": "string", * "ignore_prov_group_matching": "string" * }, * "client_group_member_count": 0 * } * ], * "next_link": "string" * } * ``` */ list(query?: BusinessPartnerListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new business partner * * @example HTTP * Representative request and response shapes. * ``` * POST /business-partners/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "business_partner_group_id": "business_partner_group_id", * "worker_id": "worker_id" * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "business_partner_group_id": "string", * "business_partner_group": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "is_manager": false, * "manager_id": "string", * "manager": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "legal_entity_id": "string", * "legal_entity": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": 0, * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": { * "type": "REMOTE", * "work_location_id": "string" * }, * "employment_type_id": "string", * "employment_type": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "label": "string" * }, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "teams_id": [ * "string" * ], * "teams": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * } * ], * "title": "string", * "title_effective_date": "string", * "level_id": "string", * "level": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "parent_id": "string", * "parent": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "global_level": 0, * "description": "string" * }, * "job_function_id": "string", * "job_function": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "termination_details": { * "type": "VOLUNTARY", * "reason": "string" * }, * "pay_schedule_id": "string", * "work_schedule": {}, * "compensation_grade": { * "id": "string", * "label": "string" * }, * "original_start_date": "string", * "custom_fields": [ * null * ], * "country_fields": { * "us": { * "ssn": "string" * }, * "ca": { * "sin": "string" * }, * "nz": { * "ird_number": "string" * } * }, * "business_partners_id": [ * "string" * ], * "business_partners": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "business_partner_group_id": "string", * "business_partner_group": {}, * "worker_id": "string", * "worker": {}, * "client_group_id": "string", * "client_group": {}, * "client_group_member_count": "string" * } * ] * }, * "client_group_id": "string", * "client_group": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "display_name": "string", * "name": "string", * "app_owner_id": "string", * "group_type": "string", * "sub_group_type": "string", * "read_only": false, * "description": "string", * "parent": "string", * "mutually_exclusive_key": "string", * "cumulatively_exhaustive_default": false, * "include_terminated": false, * "allow_non_employees": false, * "can_override_role_states": false, * "priority": 0, * "is_invisible": false, * "ignore_prov_group_matching": false * }, * "client_group_member_count": 0 * } * ``` */ create(body: BusinessPartnerCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific business partner * * @example HTTP * Representative request and response shapes. * ``` * GET /business-partners/{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?: BusinessPartnerRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Delete a business partner * * @example HTTP * Representative request and response shapes. * ``` * DELETE /business-partners/{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 BusinessPartnersPageCursorURL = PageCursorURL; export interface BusinessPartner { /** * Identifier field */ id: string; /** * Identifier of business partner group the business parter is a part of */ business_partner_group_id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Identifier of worker who is the business partner */ worker_id: string; /** * Business partner group the business partner is a part of * * Expandable field */ business_partner_group?: BusinessPartnerGroupsAPI.BusinessPartnerGroup; /** * Group of workers associated with the business partner * * Expandable field */ client_group?: SupergroupsAPI.Supergroup; /** * Identifier of group of workers associated with the business partner */ client_group_id?: string; /** * Number of workers associated with the business partner */ client_group_member_count?: number; /** * Worker who is the business partner * * Expandable field */ worker?: WorkersAPI.Worker; } /** * Meta information for the response. */ export interface Meta { __meta?: Meta._Meta; } export declare namespace Meta { interface _Meta { redacted_fields?: Array<_Meta.RedactedField>; } namespace _Meta { /** * Info about the redacted fields. */ interface RedactedField { /** * The name for the redacted field */ name?: string; /** * The reason for the redaction */ reason?: string; } } } /** * Meta information for the response. */ export interface BusinessPartnerRetrieveResponse extends Meta, BusinessPartner { } export interface BusinessPartnerListParams { 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 BusinessPartnerCreateParams { /** * Identifier of business partner group the business parter is a part of */ business_partner_group_id: string; /** * Identifier of worker who is the business partner */ worker_id: string; } export interface BusinessPartnerRetrieveParams { expand?: string; } export declare namespace BusinessPartners { export { type BusinessPartner as BusinessPartner, type Meta as Meta, type BusinessPartnerRetrieveResponse as BusinessPartnerRetrieveResponse, type BusinessPartnersPageCursorURL as BusinessPartnersPageCursorURL, type BusinessPartnerListParams as BusinessPartnerListParams, type BusinessPartnerCreateParams as BusinessPartnerCreateParams, type BusinessPartnerRetrieveParams as BusinessPartnerRetrieveParams, }; } //# sourceMappingURL=business-partners.d.mts.map