UNPKG

@compas/store

Version:

Postgres & S3-compatible wrappers for common things

248 lines (247 loc) 17.9 kB
/** * Postgres based file storage. * * @param {import("../common/types.js").StoreFileInput|any} value * @returns {Either<import("../common/types.js").StoreFile, ValidatorErrorMap>} */ export function validateStoreFile(value: import("../common/types.js").StoreFileInput | any): Either<import("../common/types.js").StoreFile, ValidatorErrorMap>; /** * User definable, optional object to store whatever you want * * @param {import("../common/types.js").StoreFileMetaInput|any} value * @returns {Either<import("../common/types.js").StoreFileMeta, ValidatorErrorMap>} */ export function validateStoreFileMeta(value: import("../common/types.js").StoreFileMetaInput | any): Either<import("../common/types.js").StoreFileMeta, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileWhere|any} value * @returns {Either<import("../common/types.js").StoreFileWhereValidated, ValidatorErrorMap>} */ export function validateStoreFileWhereValidated(value: import("../common/types.js").StoreFileWhere | any): Either<import("../common/types.js").StoreFileWhereValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileOrderBy|any} value * @returns {Either<import("../common/types.js").StoreFileOrderBy, ValidatorErrorMap>} */ export function validateStoreFileOrderBy(value: import("../common/types.js").StoreFileOrderBy | any): Either<import("../common/types.js").StoreFileOrderBy, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileOrderBySpec|any} value * @returns {Either<import("../common/types.js").StoreFileOrderBySpec, ValidatorErrorMap>} */ export function validateStoreFileOrderBySpec(value: import("../common/types.js").StoreFileOrderBySpec | any): Either<import("../common/types.js").StoreFileOrderBySpec, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileQueryBuilder|any} value * @returns {Either<import("../common/types.js").StoreFileQueryBuilderValidated, ValidatorErrorMap>} */ export function validateStoreFileQueryBuilderValidated(value: import("../common/types.js").StoreFileQueryBuilder | any): Either<import("../common/types.js").StoreFileQueryBuilderValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileReturning|any} value * @returns {Either<import("../common/types.js").StoreFileReturning, ValidatorErrorMap>} */ export function validateStoreFileReturning(value: import("../common/types.js").StoreFileReturning | any): Either<import("../common/types.js").StoreFileReturning, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileInsert|any} value * @returns {Either<import("../common/types.js").StoreFileInsertValidated, ValidatorErrorMap>} */ export function validateStoreFileInsertValidated(value: import("../common/types.js").StoreFileInsert | any): Either<import("../common/types.js").StoreFileInsertValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileInsertPartial|any} value * @returns {Either<import("../common/types.js").StoreFileInsertPartialValidated, ValidatorErrorMap>} */ export function validateStoreFileInsertPartialValidated(value: import("../common/types.js").StoreFileInsertPartial | any): Either<import("../common/types.js").StoreFileInsertPartialValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileUpdate|any} value * @returns {Either<import("../common/types.js").StoreFileUpdateValidated, ValidatorErrorMap>} */ export function validateStoreFileUpdateValidated(value: import("../common/types.js").StoreFileUpdate | any): Either<import("../common/types.js").StoreFileUpdateValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileUpdatePartial|any} value * @returns {Either<import("../common/types.js").StoreFileUpdatePartialValidated, ValidatorErrorMap>} */ export function validateStoreFileUpdatePartialValidated(value: import("../common/types.js").StoreFileUpdatePartial | any): Either<import("../common/types.js").StoreFileUpdatePartialValidated, ValidatorErrorMap>; /** * Postgres based job queue. *Use {@link queueWorkerAddJob} to insert new jobs in to the queue and {@link *queueWorkerRegisterCronJobs} for all your recurring jobs. Use {@link queueWorkerCreate} as a way *to pick up jobs. * * @param {import("../common/types.js").StoreJobInput|any} value * @returns {Either<import("../common/types.js").StoreJob, ValidatorErrorMap>} */ export function validateStoreJob(value: import("../common/types.js").StoreJobInput | any): Either<import("../common/types.js").StoreJob, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobWhere|any} value * @returns {Either<import("../common/types.js").StoreJobWhereValidated, ValidatorErrorMap>} */ export function validateStoreJobWhereValidated(value: import("../common/types.js").StoreJobWhere | any): Either<import("../common/types.js").StoreJobWhereValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobOrderBy|any} value * @returns {Either<import("../common/types.js").StoreJobOrderBy, ValidatorErrorMap>} */ export function validateStoreJobOrderBy(value: import("../common/types.js").StoreJobOrderBy | any): Either<import("../common/types.js").StoreJobOrderBy, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobOrderBySpec|any} value * @returns {Either<import("../common/types.js").StoreJobOrderBySpec, ValidatorErrorMap>} */ export function validateStoreJobOrderBySpec(value: import("../common/types.js").StoreJobOrderBySpec | any): Either<import("../common/types.js").StoreJobOrderBySpec, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobQueryBuilder|any} value * @returns {Either<import("../common/types.js").StoreJobQueryBuilderValidated, ValidatorErrorMap>} */ export function validateStoreJobQueryBuilderValidated(value: import("../common/types.js").StoreJobQueryBuilder | any): Either<import("../common/types.js").StoreJobQueryBuilderValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobReturning|any} value * @returns {Either<import("../common/types.js").StoreJobReturning, ValidatorErrorMap>} */ export function validateStoreJobReturning(value: import("../common/types.js").StoreJobReturning | any): Either<import("../common/types.js").StoreJobReturning, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobInsert|any} value * @returns {Either<import("../common/types.js").StoreJobInsertValidated, ValidatorErrorMap>} */ export function validateStoreJobInsertValidated(value: import("../common/types.js").StoreJobInsert | any): Either<import("../common/types.js").StoreJobInsertValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobInsertPartial|any} value * @returns {Either<import("../common/types.js").StoreJobInsertPartialValidated, ValidatorErrorMap>} */ export function validateStoreJobInsertPartialValidated(value: import("../common/types.js").StoreJobInsertPartial | any): Either<import("../common/types.js").StoreJobInsertPartialValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobUpdate|any} value * @returns {Either<import("../common/types.js").StoreJobUpdateValidated, ValidatorErrorMap>} */ export function validateStoreJobUpdateValidated(value: import("../common/types.js").StoreJobUpdate | any): Either<import("../common/types.js").StoreJobUpdateValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreJobUpdatePartial|any} value * @returns {Either<import("../common/types.js").StoreJobUpdatePartialValidated, ValidatorErrorMap>} */ export function validateStoreJobUpdatePartialValidated(value: import("../common/types.js").StoreJobUpdatePartial | any): Either<import("../common/types.js").StoreJobUpdatePartialValidated, ValidatorErrorMap>; /** * Session data store, used by 'sessionStore\*' functions. * * @param {import("../common/types.js").StoreSessionStoreInput|any} value * @returns {Either<import("../common/types.js").StoreSessionStore, ValidatorErrorMap>} */ export function validateStoreSessionStore(value: import("../common/types.js").StoreSessionStoreInput | any): Either<import("../common/types.js").StoreSessionStore, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreWhere|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreWhereValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreWhereValidated(value: import("../common/types.js").StoreSessionStoreWhere | any): Either<import("../common/types.js").StoreSessionStoreWhereValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenWhere|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenWhereValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenWhereValidated(value: import("../common/types.js").StoreSessionStoreTokenWhere | any): Either<import("../common/types.js").StoreSessionStoreTokenWhereValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreOrderBy|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreOrderBy, ValidatorErrorMap>} */ export function validateStoreSessionStoreOrderBy(value: import("../common/types.js").StoreSessionStoreOrderBy | any): Either<import("../common/types.js").StoreSessionStoreOrderBy, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreOrderBySpec|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreOrderBySpec, ValidatorErrorMap>} */ export function validateStoreSessionStoreOrderBySpec(value: import("../common/types.js").StoreSessionStoreOrderBySpec | any): Either<import("../common/types.js").StoreSessionStoreOrderBySpec, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreQueryBuilder|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreQueryBuilderValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreQueryBuilderValidated(value: import("../common/types.js").StoreSessionStoreQueryBuilder | any): Either<import("../common/types.js").StoreSessionStoreQueryBuilderValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreReturning|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreReturning, ValidatorErrorMap>} */ export function validateStoreSessionStoreReturning(value: import("../common/types.js").StoreSessionStoreReturning | any): Either<import("../common/types.js").StoreSessionStoreReturning, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenQueryBuilder|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenQueryBuilderValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenQueryBuilderValidated(value: import("../common/types.js").StoreSessionStoreTokenQueryBuilder | any): Either<import("../common/types.js").StoreSessionStoreTokenQueryBuilderValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenOrderBy|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenOrderBy, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenOrderBy(value: import("../common/types.js").StoreSessionStoreTokenOrderBy | any): Either<import("../common/types.js").StoreSessionStoreTokenOrderBy, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenOrderBySpec|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenOrderBySpec, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenOrderBySpec(value: import("../common/types.js").StoreSessionStoreTokenOrderBySpec | any): Either<import("../common/types.js").StoreSessionStoreTokenOrderBySpec, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenReturning|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenReturning, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenReturning(value: import("../common/types.js").StoreSessionStoreTokenReturning | any): Either<import("../common/types.js").StoreSessionStoreTokenReturning, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreInsert|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreInsertValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreInsertValidated(value: import("../common/types.js").StoreSessionStoreInsert | any): Either<import("../common/types.js").StoreSessionStoreInsertValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreInsertPartial|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreInsertPartialValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreInsertPartialValidated(value: import("../common/types.js").StoreSessionStoreInsertPartial | any): Either<import("../common/types.js").StoreSessionStoreInsertPartialValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreUpdate|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreUpdateValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreUpdateValidated(value: import("../common/types.js").StoreSessionStoreUpdate | any): Either<import("../common/types.js").StoreSessionStoreUpdateValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreUpdatePartial|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreUpdatePartialValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreUpdatePartialValidated(value: import("../common/types.js").StoreSessionStoreUpdatePartial | any): Either<import("../common/types.js").StoreSessionStoreUpdatePartialValidated, ValidatorErrorMap>; /** * Store all tokens that belong to a session. * * @param {import("../common/types.js").StoreSessionStoreTokenInput|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreToken, ValidatorErrorMap>} */ export function validateStoreSessionStoreToken(value: import("../common/types.js").StoreSessionStoreTokenInput | any): Either<import("../common/types.js").StoreSessionStoreToken, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenInsert|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenInsertValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenInsertValidated(value: import("../common/types.js").StoreSessionStoreTokenInsert | any): Either<import("../common/types.js").StoreSessionStoreTokenInsertValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenInsertPartial|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenInsertPartialValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenInsertPartialValidated(value: import("../common/types.js").StoreSessionStoreTokenInsertPartial | any): Either<import("../common/types.js").StoreSessionStoreTokenInsertPartialValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenUpdate|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenUpdateValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenUpdateValidated(value: import("../common/types.js").StoreSessionStoreTokenUpdate | any): Either<import("../common/types.js").StoreSessionStoreTokenUpdateValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreSessionStoreTokenUpdatePartial|any} value * @returns {Either<import("../common/types.js").StoreSessionStoreTokenUpdatePartialValidated, ValidatorErrorMap>} */ export function validateStoreSessionStoreTokenUpdatePartialValidated(value: import("../common/types.js").StoreSessionStoreTokenUpdatePartial | any): Either<import("../common/types.js").StoreSessionStoreTokenUpdatePartialValidated, ValidatorErrorMap>; /** * @param {import("../common/types.js").StoreFileResponseInput|any} value * @returns {Either<import("../common/types.js").StoreFileResponse, ValidatorErrorMap>} */ export function validateStoreFileResponse(value: import("../common/types.js").StoreFileResponseInput | any): Either<import("../common/types.js").StoreFileResponse, ValidatorErrorMap>; /** * Set as '.query(T.reference("store", "imageTransformOptions"))' of routes that use * 'sendTransformedImage'. * * @param {import("../common/types.js").StoreImageTransformOptionsInput|any} value * @returns {Either<import("../common/types.js").StoreImageTransformOptions, ValidatorErrorMap>} */ export function validateStoreImageTransformOptions(value: import("../common/types.js").StoreImageTransformOptionsInput | any): Either<import("../common/types.js").StoreImageTransformOptions, ValidatorErrorMap>; /** * Set as '.query(T.reference("store", "secureImageTransformOptions"))' of routes that use * 'sendTransformedImage' and 'fileVerifyAccessToken'. * * @param {import("../common/types.js").StoreSecureImageTransformOptionsInput|any} value * @returns {Either<import("../common/types.js").StoreSecureImageTransformOptions, ValidatorErrorMap>} */ export function validateStoreSecureImageTransformOptions(value: import("../common/types.js").StoreSecureImageTransformOptionsInput | any): Either<import("../common/types.js").StoreSecureImageTransformOptions, ValidatorErrorMap>; export type Either<T, E> = { value: T; error?: never; } | { value?: never; error: E; }; export type ValidatorErrorMap = Record<string, any | undefined>;