// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import * as BusinessPartnersAPI from './business-partners'; import { APIPromise } from '../core/api-promise'; import { PageCursorURL, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; /** * Developer Platform account and team management */ export class ListingSubmissions extends APIResource { /** * List listing submissions. * * - Requires: `Developer Program` * * @example HTTP * Representative request and response shapes. * ``` * GET /listing-submissions/?listing_id=listing_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": [ * { * "name": "date_of_birth", * "reason": "Insufficient entitlements" * } * ] * }, * "results": [ * { * "listing_id": "string", * "submission_id": "string", * "status": "string", * "notes": "string", * "created_at": "string", * "updated_at": "string" * } * ], * "next_link": "string" * } * ``` */ list( query: ListingSubmissionListParams, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/listing-submissions/', PageCursorURL, { query, ...options, }); } /** * Get one listing submission. * * @example HTTP * Representative request and response shapes. * ``` * GET /listing-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 { return this._client.get(path`/listing-submissions/${id}/`, options); } } export type ListingSubmissionListResponsesPageCursorURL = PageCursorURL; export interface ListingSubmissionListResponse { /** * Creation timestamp. */ created_at?: string; /** * The parent listing ID. */ listing_id?: string; /** * The latest submitted notes. */ notes?: string; /** * The submission lifecycle status. */ status?: string; /** * The submitted listing version ID. */ submission_id?: string; /** * Last update timestamp. */ updated_at?: string; } /** * Meta information for the response. */ export interface ListingSubmissionRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Creation timestamp. */ created_at?: string; /** * The parent listing ID. */ listing_id?: string; /** * The latest submitted notes. */ notes?: string; /** * The submission lifecycle status. */ status?: string; /** * The submitted listing version ID. */ submission_id?: string; /** * Last update timestamp. */ updated_at?: string; } export interface ListingSubmissionListParams { /** * The unique identifier of the listing whose submissions should be returned. */ listing_id: string; } export declare namespace ListingSubmissions { export { type ListingSubmissionListResponse as ListingSubmissionListResponse, type ListingSubmissionRetrieveResponse as ListingSubmissionRetrieveResponse, type ListingSubmissionListResponsesPageCursorURL as ListingSubmissionListResponsesPageCursorURL, type ListingSubmissionListParams as ListingSubmissionListParams, }; }