import type { Version } from './content-source'; import type { FieldType, Field, FieldForType, FieldSpecificProps, FieldSpecificPropsForType } from './model-fields'; import type { StackbitConfig } from './config'; import type { AssetFileField, AssetFileFieldLocalized } from './content-source-document'; import type { DocumentField, DocumentFieldForType, DocumentFieldLocalized, DocumentFieldNonLocalizedForType } from './content-source-document-fields'; export declare function loadJSON(filePath: string): Promise; export declare function getInterfaceVersion(): Promise; export declare function getVersion(options?: { packageJsonPath?: string; contentSourceVersion?: string; }): Promise; export declare function isLocalizedField(field: DocumentField | AssetFileField): field is DocumentFieldLocalized | AssetFileFieldLocalized; /** * Returns non-localized version of a DocumentField for the provided `locale`. * If the `field` is localized, and the provided locale is not present, this * function returns `undefined`. If the `field` is not localized, this function * returns the `field` as-is ignoring the `locale`. * * @example Passing localized field * getLocalizedFieldForLocale({ * type: 'string', * localized: true, * locales: { * en-US: { value: 'Hello' }, * es-ES: { value: 'Hola' }, * fr-FR: { value: 'Bonjour' } * } * }, 'es-ES'); * returns: * { * type: 'string', * value: 'Hola' * } * * @example Passing non-localized field * getLocalizedFieldForLocale({ * type: 'string', * value: 'Hello' * }); * returns: * { * type: 'string', * value: 'Hello' * } * * @param field * @param locale */ export declare function getLocalizedFieldForLocale(field?: DocumentFieldForType, locale?: string): DocumentFieldNonLocalizedForType | undefined; export declare function isOneOfFieldTypes(fieldType: FieldType, fieldTypes: ReadonlyArray): fieldType is T; export declare function isModelFieldOneOfFieldTypes(modelField: Field, fieldTypes: ReadonlyArray): modelField is FieldForType; export declare function isModelFieldSpecificPropsOneOfFieldTypes(modelField: FieldSpecificProps, fieldTypes: ReadonlyArray): modelField is FieldSpecificPropsForType; export declare function isDocumentFieldOneOfFieldTypes(documentField: DocumentField, fieldTypes: ReadonlyArray): documentField is DocumentFieldForType; export declare function defineStackbitConfig(stackbitConfig: StackbitConfig): StackbitConfig; //# sourceMappingURL=utils.d.ts.map