// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../../core/resource'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; /** * Saved custom object list views visible to the requester */ export class Capabilities extends APIResource { /** * Returns whether the authenticated caller may create private or shared views and * set the company default for this object. Capabilities reflect token consent and * native permissions; mutations independently enforce authorization. This * operation does not modify views or records. * * @example SDK usage * ```ts * const capability = * await client.customObjects.listViews.capabilities.retrieve( * 'custom_object_api_name', * ); * ``` * * @example HTTP * Representative request and response shapes. * ``` * GET /custom-objects/{custom_object_api_name}/list-views/capabilities/ 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 * * { * "can_create_private": false, * "can_create_shared": false, * "can_set_default": false * } * ``` */ retrieve(customObjectAPIName: string, options?: RequestOptions): APIPromise { return this._client.get(path`/custom-objects/${customObjectAPIName}/list-views/capabilities/`, options); } } /** * Permissions to create saved views and choose a company default for a Custom * Object. */ export interface CapabilityRetrieveResponse { /** * Whether the caller may create private views. */ can_create_private: boolean; /** * Whether the caller may create shared views. */ can_create_shared: boolean; /** * Whether the caller may change the company default. */ can_set_default: boolean; } export declare namespace Capabilities { export { type CapabilityRetrieveResponse as CapabilityRetrieveResponse }; }