import { NowIncludeShape } from '../now-include-plugin'; import { type Record, Shape, type Diagnostics, type Factory, CallExpressionShape } from '@servicenow/sdk-build-core'; /** * Shared toShape implementation for SPWidget and SPHeaderFooter */ export declare function createWidgetToShape(record: Record, descendants: { query: (table: string) => Record[]; }, callee: 'SPWidget' | 'SPHeaderFooter', tablePrefix?: string, includeStaticField?: boolean): Promise<{ success: boolean; value: CallExpressionShape; }>; /** * Creates a NowIncludeShape with a custom file path suffix and extension */ export declare function createIncludeShape(record: Record, content: string | Shape, suffix: string, extension: 'js' | 'html' | 'scss', folderName: string, tablePrefix?: string): Promise; export declare const DEFAULT_ORDER = 100; /** * Shared toRecord implementation for SPWidget and SPHeaderFooter */ export declare function createWidgetToRecord(callExpression: CallExpressionShape, { diagnostics, factory, config, }: { diagnostics: Diagnostics; factory: Factory; config: { scope: string; }; }, options: { callee: 'SPWidget' | 'SPHeaderFooter'; table: 'sp_widget' | 'sp_header_footer'; includeStaticField?: boolean; getDefaultClientScript: (controller: string) => string; defaultServerScript: string; defaultLinkScript: string; defaultHtmlTemplate: string; }): Promise<{ success: boolean; value: Record; }>; /** * Converts a roles Shape (array of strings, Role() expressions, or Record references) * to a deduplicated comma-separated string of role names. * @param rolesShape - Shape containing the roles array * @param diagnostics - Optional diagnostics for reporting invalid role entries * @returns Comma-separated string of unique role names, or empty string if no roles */ export declare function getRolesString(rolesShape: Shape, diagnostics?: Diagnostics): string; export declare function getIncludeRecords(shape: Shape, parentId: Shape, factory: Factory, m2mTable: string, includeTable: string, parentTable: string, diagnostics: Diagnostics): Promise; /** * Serializes widgetParameters for sp_instance (page widget instances). * Platform behavior: SP Designer stores ALL values as strings (booleans as "true"/"false"). */ export declare function serializeWidgetParametersForPage(v: Shape): Shape | string; /** * Serializes widgetParameters for sp_instance_menu (menu widget instances). * Platform behavior: Menu widget parameters preserve native types (booleans as true/false). */ export declare function serializeWidgetParametersForMenu(v: Shape): Shape | string;