Files
klz-cables.com/.pnpm-store/v10/files/ef/1234fbd6fb5f85a3e12d456be22142785e13a40e7a3561a797965a460f9a72c84e0e252148f33b9dcd11ef3a609919f723f2bf9a6a78e3781a5e2882428250
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

43 lines
2.3 KiB
Plaintext

import type { I18n } from '@payloadcms/translations';
import type { JSONSchema4, JSONSchema4TypeName } from 'json-schema';
import type { SanitizedCollectionConfig } from '../collections/config/types.js';
import type { SanitizedConfig } from '../config/types.js';
import type { FlattenedField } from '../fields/config/types.js';
import type { SanitizedGlobalConfig } from '../globals/config/types.js';
/**
* Returns a JSON Schema Type with 'null' added if the field is not required.
*/
export declare function withNullableJSONSchemaType(fieldType: JSONSchema4TypeName, isRequired: boolean): JSONSchema4TypeName | JSONSchema4TypeName[];
export declare function fieldsToJSONSchema(
/**
* Used for relationship fields, to determine whether to use a string or number type for the ID.
* While there is a default ID field type set by the db adapter, they can differ on a collection-level
* if they have custom ID fields.
*/
collectionIDFieldTypes: {
[key: string]: 'number' | 'string';
}, fields: FlattenedField[],
/**
* Allows you to define new top-level interfaces that can be re-used in the output schema.
*/
interfaceNameDefinitions: Map<string, JSONSchema4>, config?: SanitizedConfig, i18n?: I18n): {
properties: {
[k: string]: JSONSchema4;
};
required: string[];
};
export declare function entityToJSONSchema(config: SanitizedConfig, entity: SanitizedCollectionConfig | SanitizedGlobalConfig, interfaceNameDefinitions: Map<string, JSONSchema4>, defaultIDType: 'number' | 'text', collectionIDFieldTypes?: {
[key: string]: 'number' | 'string';
}, i18n?: I18n): JSONSchema4;
export declare function fieldsToSelectJSONSchema({ config, fields, interfaceNameDefinitions, }: {
config: SanitizedConfig;
fields: FlattenedField[];
interfaceNameDefinitions: Map<string, JSONSchema4>;
}): JSONSchema4;
export declare function authCollectionToOperationsJSONSchema(config: SanitizedCollectionConfig): JSONSchema4;
export declare function timezonesToJSONSchema(supportedTimezones: SanitizedConfig['admin']['timezones']['supportedTimezones']): JSONSchema4;
/**
* This is used for generating the TypeScript types (payload-types.ts) with the payload generate:types command.
*/
export declare function configToJSONSchema(config: SanitizedConfig, defaultIDType?: 'number' | 'text', i18n?: I18n): JSONSchema4;
//# sourceMappingURL=configToJSONSchema.d.ts.map