// 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 CustomApps extends APIResource { /** * A list of CustomApp. * * - Requires: `Custom Apps Platform API` */ list(options?: RequestOptions): PagePromise { return this._client.getAPIList('/custom-apps/', PageCursorURL, options); } /** * Create a new CustomApp */ create(body: CustomAppCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/custom-apps/', { body, ...options }); } /** * Retrieve a specific CustomApp */ retrieve(id: string, options?: RequestOptions): APIPromise { return this._client.get(path`/custom-apps/${id}/`, options); } /** * Update a specific CustomApp. */ update( id: string, body: CustomAppUpdateParams, options?: RequestOptions, ): APIPromise { return this._client.patch(path`/custom-apps/${id}/`, { body, ...options }); } /** * Delete a CustomApp */ delete(id: string, options?: RequestOptions): APIPromise { return this._client.delete(path`/custom-apps/${id}/`, { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } } export type CustomAppListResponsesPageCursorURL = PageCursorURL; export interface CustomAppListResponse { /** * The unique api name of the custom app */ api_name: string; /** * The display name of the custom app */ name: string; /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The description of the custom app */ description?: string; /** * The icon URL of the custom app */ icon?: string; /** * The pages of the custom app */ pages?: Array; /** * Record update date */ updated_at?: string; } export namespace CustomAppListResponse { /** * Summary of a page attached to a custom app. */ export interface Page { /** * The unique name of the page within the app */ api_name?: string; /** * The ID of the canvas instance backing this page (canvas_page only) */ canvas_instance_id?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function rendering this page (sdui_page only) */ function_id?: string; /** * The type of page (e.g. 'canvas_page', 'sdui_page', 'object_page') */ page_type?: string; /** * The ID of the SDUI page instance (sdui_page only) */ sdui_page_id?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } } export interface CustomAppCreateResponse { /** * The unique api name of the custom app */ api_name: string; /** * The display name of the custom app */ name: string; /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The description of the custom app */ description?: string; /** * The icon URL of the custom app */ icon?: string; /** * The pages of the custom app */ pages?: Array; /** * Record update date */ updated_at?: string; } export namespace CustomAppCreateResponse { /** * Summary of a page attached to a custom app. */ export interface Page { /** * The unique name of the page within the app */ api_name?: string; /** * The ID of the canvas instance backing this page (canvas_page only) */ canvas_instance_id?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function rendering this page (sdui_page only) */ function_id?: string; /** * The type of page (e.g. 'canvas_page', 'sdui_page', 'object_page') */ page_type?: string; /** * The ID of the SDUI page instance (sdui_page only) */ sdui_page_id?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } } /** * Meta information for the response. */ export interface CustomAppRetrieveResponse extends BusinessPartnersAPI.Meta { /** * The unique api name of the custom app */ api_name: string; /** * The display name of the custom app */ name: string; /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The description of the custom app */ description?: string; /** * The icon URL of the custom app */ icon?: string; /** * The pages of the custom app */ pages?: Array; /** * Record update date */ updated_at?: string; } export namespace CustomAppRetrieveResponse { /** * Summary of a page attached to a custom app. */ export interface Page { /** * The unique name of the page within the app */ api_name?: string; /** * The ID of the canvas instance backing this page (canvas_page only) */ canvas_instance_id?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function rendering this page (sdui_page only) */ function_id?: string; /** * The type of page (e.g. 'canvas_page', 'sdui_page', 'object_page') */ page_type?: string; /** * The ID of the SDUI page instance (sdui_page only) */ sdui_page_id?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } } export interface CustomAppUpdateResponse { /** * The unique api name of the custom app */ api_name: string; /** * The display name of the custom app */ name: string; /** * Identifier field */ id?: string; /** * Record creation date */ created_at?: string; /** * The description of the custom app */ description?: string; /** * The icon URL of the custom app */ icon?: string; /** * The pages of the custom app */ pages?: Array; /** * Record update date */ updated_at?: string; } export namespace CustomAppUpdateResponse { /** * Summary of a page attached to a custom app. */ export interface Page { /** * The unique name of the page within the app */ api_name?: string; /** * The ID of the canvas instance backing this page (canvas_page only) */ canvas_instance_id?: string; /** * The ID of the role that created the page */ created_by?: string; /** * The ID of the Rippling Function rendering this page (sdui_page only) */ function_id?: string; /** * The type of page (e.g. 'canvas_page', 'sdui_page', 'object_page') */ page_type?: string; /** * The ID of the SDUI page instance (sdui_page only) */ sdui_page_id?: string; /** * The ID of the role that last modified the page */ updated_by?: string; } } export interface CustomAppCreateParams { /** * The unique api name of the custom app */ api_name: string; /** * The display name of the custom app */ name: string; /** * The description of the custom app */ description?: string; } export interface CustomAppUpdateParams { /** * The unique api name of the custom app */ api_name: string; /** * The display name of the custom app */ name: string; /** * The description of the custom app */ description?: string; } export declare namespace CustomApps { export { type CustomAppListResponse as CustomAppListResponse, type CustomAppCreateResponse as CustomAppCreateResponse, type CustomAppRetrieveResponse as CustomAppRetrieveResponse, type CustomAppUpdateResponse as CustomAppUpdateResponse, type CustomAppListResponsesPageCursorURL as CustomAppListResponsesPageCursorURL, type CustomAppCreateParams as CustomAppCreateParams, type CustomAppUpdateParams as CustomAppUpdateParams, }; }