import { APIResource } from "../core/resource.js"; import * as BusinessPartnersAPI from "./business-partners.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; /** * An application by a candidate to a specific job requisition */ export declare class ApplicationSubmissions extends APIResource { /** * Poll a receipt returned by application submission to discover creation status. * On SUCCEEDED, retain application_id and candidate_id for recruiting status * queries. Only the submitting integration in the same company can read the * receipt. Requires candidate-applications.read or * candidate-applications.read-write. UNKNOWN indicates an interrupted worker or no * update for an hour; the application may still be created. Continue checking this * receipt and do not automatically submit with a new key. Receipts and their * idempotency keys are retained indefinitely with no automatic expiry. The receipt * remains queryable and the key continues to replay it; UNKNOWN does not expire * either. * * @example HTTP * Representative request and response shapes. * ``` * GET /application-submissions/{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; /** * Accepts an application for asynchronous processing and returns the full * ApplicationSubmission receipt, including id, status, result IDs, and timestamps. * Poll GET /application-submissions/{id}/ for creation status and result IDs. * Supply Idempotency-Key (1-255 characters) to replay the same receipt after a * lost response. Reusing a key with a different payload returns HTTP 409. * Concurrent requests with the same key and payload return the same receipt and * enqueue creation once. Receipts and their idempotency keys are retained * indefinitely with no automatic expiry. The same key continues to replay its * receipt; use a new key for a new submission. The one-hour UNKNOWN threshold does * not expire the receipt or key. When job_post_id is supplied, it must belong to * job_id, the authenticated company, and the same Recruiting installation. * Duplicate submissions for the same candidate and job are matched to the existing * active application; when job_post_id is supplied, duplicate matching is scoped * to that job post, so the same candidate can apply to multiple posts under one * requisition. After creation, use GET /candidate-applications/ to track * recruiting status. * * @example HTTP * Representative request and response shapes. * ``` * POST /application-submissions/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "candidate": { * "email": "dev@stainless.com", * "first_name": "first_name", * "last_name": "last_name", * "phone_number": "phone_number" * }, * "job_id": "job_id" * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "2025-01-01T00:00:00Z", * "updated_at": "2025-01-01T00:00:00Z", * "status": "QUEUED", * "application_id": "string", * "candidate_id": "string", * "outcome": "CREATED", * "error_code": "PROCESSING_INTERRUPTED" * } * ``` */ create(params: ApplicationSubmissionCreateParams, options?: RequestOptions): APIPromise; } /** * Meta information for the response. */ export interface ApplicationSubmissionRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * QUEUED or PROCESSING until creation completes; SUCCEEDED includes result IDs; * FAILED means creation exhausted retries. UNKNOWN means processing was * interrupted or no update was received for an hour; creation may still complete. * Do not resubmit with a new key automatically. */ status: 'QUEUED' | 'PROCESSING' | 'SUCCEEDED' | 'FAILED' | 'UNKNOWN'; /** * Record update date */ updated_at: string; /** * Created or matched application ID */ application_id?: string | null; /** * Created or matched candidate ID */ candidate_id?: string | null; /** * Safe machine-readable failure code. PROCESSING_INTERRUPTED means a worker was * interrupted and creation may still complete; APPLICATION_CREATION_FAILED means * creation exhausted retries. Null when no worker failure has been recorded, * including when UNKNOWN is caused only by a stale receipt. */ error_code?: 'PROCESSING_INTERRUPTED' | 'APPLICATION_CREATION_FAILED' | null; /** * CREATED when this submission created the application; MATCHED when it reused an * existing application. Null until successful, or for older receipts without a * recorded outcome. */ outcome?: 'CREATED' | 'MATCHED' | null; } /** * Creation outcome for one submission, separate from the application's recruiting * status. */ export interface ApplicationSubmissionCreateResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * QUEUED or PROCESSING until creation completes; SUCCEEDED includes result IDs; * FAILED means creation exhausted retries. UNKNOWN means processing was * interrupted or no update was received for an hour; creation may still complete. * Do not resubmit with a new key automatically. */ status: 'QUEUED' | 'PROCESSING' | 'SUCCEEDED' | 'FAILED' | 'UNKNOWN'; /** * Record update date */ updated_at: string; /** * Created or matched application ID */ application_id?: string | null; /** * Created or matched candidate ID */ candidate_id?: string | null; /** * Safe machine-readable failure code. PROCESSING_INTERRUPTED means a worker was * interrupted and creation may still complete; APPLICATION_CREATION_FAILED means * creation exhausted retries. Null when no worker failure has been recorded, * including when UNKNOWN is caused only by a stale receipt. */ error_code?: 'PROCESSING_INTERRUPTED' | 'APPLICATION_CREATION_FAILED' | null; /** * CREATED when this submission created the application; MATCHED when it reused an * existing application. Null until successful, or for older receipts without a * recorded outcome. */ outcome?: 'CREATED' | 'MATCHED' | null; } export interface ApplicationSubmissionCreateParams { /** * Body param */ candidate: ApplicationSubmissionCreateParams.Candidate; /** * Body param: Job requisition identifier. */ job_id: string; /** * Body param: Optional free-text name of the candidate's current employer, for * example 'Acme Inc.'. Supply the employer name, not a Rippling company ID. No * field-specific maximum length is enforced. */ current_company?: string; /** * Body param: Optional location-specific job post identifier belonging to job_id. */ job_post_id?: string; /** * Body param: Optional free-text description of the candidate's current location, * for example 'Seattle, WA, US'. Supply a string, not a structured address or Work * Location ID. No field-specific maximum length is enforced. */ location?: string; /** * Body param: Optional S3 or CDN URL of a resume already uploaded through Rippling * Recruiting's file-upload flow. The file must be in permitted Recruiting storage * for the authenticated company or a shared Recruiting upload area. Supply * resume_file_extension with a supported MIME type; otherwise the resume is * ignored. Base64 file contents and arbitrary external URLs are not accepted. */ resume?: string; /** * Body param: MIME type of the supplied resume, rather than a filename extension. * Supported values: application/pdf, application/msword, * application/vnd.openxmlformats-officedocument.wordprocessingml.document, * text/plain, video/mp4, video/webm. Required to attach a supplied resume; a * missing or unsupported value causes the resume to be ignored. */ resume_file_extension?: string; /** * Body param: Optional identifier of a role in the authenticated company. */ sourcing_credit?: string; /** * Header param: Reuse this key with the same request body to retrieve the same * submission receipt. Omitting it creates a new receipt for each request. */ 'Idempotency-Key'?: string; } export declare namespace ApplicationSubmissionCreateParams { interface Candidate { /** * Candidate's email address. */ email: string; /** * Candidate's first name. */ first_name: string; /** * Candidate's last name. */ last_name: string; /** * Candidate phone number in E.164 format. */ phone_number: string; } } export declare namespace ApplicationSubmissions { export { type ApplicationSubmissionRetrieveResponse as ApplicationSubmissionRetrieveResponse, type ApplicationSubmissionCreateResponse as ApplicationSubmissionCreateResponse, type ApplicationSubmissionCreateParams as ApplicationSubmissionCreateParams, }; } //# sourceMappingURL=application-submissions.d.ts.map