@stackbit/sdk
Version:
76 lines • 2.03 kB
TypeScript
type FieldPath = (string | number)[];
export declare class CustomError extends Error {
constructor(message: string);
}
export declare class FileNotMatchedModelError extends Error {
filePath: string;
constructor({ filePath }: {
filePath: string;
});
}
export declare class FileMatchedMultipleModelsError extends Error {
filePath: string;
modelNames: string[];
constructor({ filePath, modelNames }: {
filePath: string;
modelNames: string[];
});
}
export declare class FileReadError extends Error {
filePath: string;
error: Error;
constructor({ filePath, error }: {
filePath: string;
error: Error;
});
}
export declare class FolderReadError extends Error {
folderPath: string;
error: Error;
constructor({ folderPath, error }: {
folderPath: string;
error: Error;
});
}
export declare class FileForModelNotFoundError extends Error {
modelName: string;
constructor({ modelName }: {
modelName: string;
});
}
export declare class ModelNotFoundError extends Error {
modelName: string;
fieldPath: FieldPath;
constructor({ modelName, fieldPath }: {
modelName: string;
fieldPath: FieldPath;
});
}
export declare class IllegalModelFieldError extends Error {
modelName: string;
modelType: string;
fieldPath: FieldPath;
constructor({ modelName, modelType, fieldPath }: {
modelName: string;
modelType: string;
fieldPath: FieldPath;
});
}
export declare class ContentValidationError extends Error {
name: 'ContentValidationError';
type: string;
modelName: string;
filePath: string;
value: any;
fieldPath: FieldPath;
constructor({ type, message, modelName, filePath, value, fieldPath }: {
type: string;
message: string;
modelName: string;
filePath: string;
value: any;
fieldPath: FieldPath;
});
}
export {};
//# sourceMappingURL=content-errors.d.ts.map