import { type ExistingManifestContextOptions } from "./existing-manifest-context.js"; import type { ManifestFunction } from "./manifest-function.js"; import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.js"; /** * Initialization properties for {@link SduiPage}. */ export interface SduiPageProps { /** * Unique identifier for this page within the package (e.g. `'gym_today_schedule'`). * * Required. */ sduiPageId: string; /** * Display name shown as the tab label in the app (e.g. `'Today\'s schedule'`). * * Required. */ name: string; /** * The function that renders this page. Pass a live {@link ManifestFunction} reference, * or a raw api_name string for functions defined outside this manifest. * * Required. */ function: ManifestFunction | string; } /** * Defines an SDUI page and registers it with the manifest. * * An SDUI page is a custom UI surface backed by a {@link ManifestFunction}. It appears * as a tab in a Rippling {@link App}. You would normally define SDUI pages after the * functions they reference, then pass them to an `App` via `pages`. * * @example * ```ts * const todaySchedulePage = new SduiPage(manifest, { * sduiPageId: 'gym_today_schedule', * name: 'Today\'s schedule', * function: todayScheduleFn, * }); * const memberListPage = new SduiPage(manifest, { * sduiPageId: 'gym_members', * name: 'Members', * function: memberListFn, * }); * * new App(manifest, { * apiName: 'gym_membership_management_app', * name: 'Gym Membership Management', * pages: [memberListPage, todaySchedulePage], * }); * ``` * * @see {@link ManifestFunction} — provides the handler that renders this page. * @see {@link App} — hosts this page as a tab via `pages`. */ export declare class SduiPage { static readonly componentType: "SDUI_PAGE"; static toDeletionIdentifier(sduiPageId: string): ManifestComponentDeletion; private readonly _sduiPageId; private readonly _name; private readonly _functionApiName; /** * @param scope - The manifest to register this page with. * @param props - Initialization properties. * @throws {Error} If `sduiPageId`, `name`, or `function` is missing. */ constructor(scope: ManifestScope, props: SduiPageProps); /** * Loads this SDUI page from the active existing-manifest JSON context. */ static loadFromExisting(sduiPageId: string, options?: ExistingManifestContextOptions): SduiPage; /** @internal Hydrates an SDUI page from existing manifest wire JSON. */ static _fromExistingComponent(scope: ManifestScope, component: Record, resolveFunction: (apiName: string) => ManifestFunction): SduiPage; /** * Returns the unique page identifier (e.g. `'gym_today_schedule'`). */ getSduiPageId(): string; /** * Returns the display name (tab label) of this page. */ getName(): string; /** * Returns the api_name of the function backing this page. */ getFunctionApiName(): string; /** * Serializes this SDUI page to the wire format consumed by the manifest install endpoint. * * @returns A plain object with `type: 'SDUI_PAGE'`. */ toDict(): Record; } //# sourceMappingURL=sdui-page.d.ts.map