// 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 { buildHeaders } from '../internal/headers'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; export class CustomPages extends APIResource { /** * A list of CustomPage. * * - Requires: `Custom Apps Platform API` */ list(options?: RequestOptions): PagePromise { return this._client.getAPIList('/custom-pages/', PageCursorURL, options); } /** * Create a new CustomPage */ create( body: CustomPageCreateParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { return this._client.post('/custom-pages/', { body, ...options }); } /** * Retrieve a specific CustomPage */ retrieve(id: string, options?: RequestOptions): APIPromise { return this._client.get(path`/custom-pages/${id}/`, options); } /** * Update a specific CustomPage. */ update( id: string, body: CustomPageUpdateParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { return this._client.patch(path`/custom-pages/${id}/`, { body, ...options }); } /** * Delete a CustomPage */ delete(id: string, options?: RequestOptions): APIPromise { return this._client.delete(path`/custom-pages/${id}/`, { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } } export type CustomPageListResponsesPageCursorURL = PageCursorURL; export interface CustomPageListResponse { /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function that renders this page */ function_id?: string; /** * The display name of the custom page */ name?: string; /** * Record update date */ updated_at?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } export interface CustomPageCreateResponse { /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function that renders this page */ function_id?: string; /** * The display name of the custom page */ name?: string; /** * Record update date */ updated_at?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } /** * Meta information for the response. */ export interface CustomPageRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function that renders this page */ function_id?: string; /** * The display name of the custom page */ name?: string; /** * Record update date */ updated_at?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } export interface CustomPageUpdateResponse { /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function that renders this page */ function_id?: string; /** * The display name of the custom page */ name?: string; /** * Record update date */ updated_at?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } export interface CustomPageCreateParams { /** * The ID of the Rippling Function that renders this page */ function_id?: string; /** * The display name of the custom page */ name?: string; } export interface CustomPageUpdateParams { /** * The ID of the Rippling Function that renders this page */ function_id?: string; /** * The display name of the custom page */ name?: string; } export declare namespace CustomPages { export { type CustomPageListResponse as CustomPageListResponse, type CustomPageCreateResponse as CustomPageCreateResponse, type CustomPageRetrieveResponse as CustomPageRetrieveResponse, type CustomPageUpdateResponse as CustomPageUpdateResponse, type CustomPageListResponsesPageCursorURL as CustomPageListResponsesPageCursorURL, type CustomPageCreateParams as CustomPageCreateParams, type CustomPageUpdateParams as CustomPageUpdateParams, }; }