Socket
Socket
Sign inDemoInstall

remult

Package Overview
Dependencies
5
Maintainers
2
Versions
540
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.25.7-exp.3 to 0.25.7-exp.4

2

esm/graphql.js

@@ -423,3 +423,3 @@ import { getRelationFieldInfo } from './internals.js';

const item = myRepo.fromJson(orig);
let { toRepo, returnNull, returnUndefined } = getRepositoryInternals(myRepo).getFocusedRelationRepo(myRepo.fields.find(f), item);
let { toRepo, returnNull, returnUndefined } = getRepositoryInternals(myRepo)._getFocusedRelationRepo(myRepo.fields.find(f), item);
if (returnNull || returnUndefined)

@@ -426,0 +426,0 @@ return null;

@@ -70,3 +70,3 @@ import { dbNamesOf, isDbReadonly, shouldNotCreateField, } from '../src/filter/filter-consumer-bridge-to-sql-request.js';

b._addWhere = false;
await (await getRepositoryInternals(repo).translateWhereToFilter(condition)).__applyToConsumer(b);
await (await getRepositoryInternals(repo)._translateWhereToFilter(condition)).__applyToConsumer(b);
let r = await b.resolveWhere();

@@ -73,0 +73,0 @@ return (knex) => r.forEach((y) => y(knex));

@@ -55,3 +55,3 @@ import { ObjectId, } from 'mongodb';

b._addWhere = false;
await (await getRepositoryInternals(repo).translateWhereToFilter(condition)).__applyToConsumer(b);
await (await getRepositoryInternals(repo)._translateWhereToFilter(condition)).__applyToConsumer(b);
let r = await b.resolveWhere();

@@ -58,0 +58,0 @@ return r;

@@ -31,3 +31,3 @@ import { getEntityRef } from './remult3/getEntityRef.js';

return null;
return getRepositoryInternals(this.repository).getCachedByIdAsync(id, false);
return getRepositoryInternals(this.repository)._getCachedByIdAsync(id, false);
}

@@ -37,3 +37,3 @@ get(id) {

return null;
const result = getRepositoryInternals(this.repository).getCachedById(id, this.isReferenceRelation);
const result = getRepositoryInternals(this.repository)._getCachedById(id, this.isReferenceRelation);
if (this.isReferenceRelation && !this.storedItem) {

@@ -62,3 +62,3 @@ if (!this.allowNull && (this.id === 0 || this.id === ''))

if (eo && !this.isReferenceRelation) {
getRepositoryInternals(this.repository).addToCache(item);
getRepositoryInternals(this.repository)._addToCache(item);
this.id = eo.getId();

@@ -65,0 +65,0 @@ }

@@ -98,3 +98,3 @@ import { CompoundIdField } from '../CompoundIdField.js';

b._addWhere = false;
await (await getRepositoryInternals(r).translateWhereToFilter(condition)).__applyToConsumer(b);
await (await getRepositoryInternals(r)._translateWhereToFilter(condition)).__applyToConsumer(b);
return await b.resolveWhere();

@@ -101,0 +101,0 @@ }

@@ -85,3 +85,3 @@ import { buildRestDataProvider } from '../buildRestDataProvider.js';

this.runPromise(getRepositoryInternals(repo)
.buildEntityDataProviderFindOptions(options)
._buildEntityDataProviderFindOptions(options)
.then((opts) => {

@@ -88,0 +88,0 @@ if (!alive)

@@ -17,3 +17,3 @@ import { v4 as uuid } from 'uuid';

async setAllItems(result) {
const items = await getRepositoryInternals(this.repo).fromJsonArray(result, this.query.options);
const items = await getRepositoryInternals(this.repo)._fromJsonArray(result, this.query.options);
this.forListeners((listener) => {

@@ -59,3 +59,3 @@ listener(() => {

let x = messages.filter(({ type }) => type == 'add' || type == 'replace');
let loadedItems = await getRepositoryInternals(this.repo).fromJsonArray(x.map((m) => m.data.item), this.query.options);
let loadedItems = await getRepositoryInternals(this.repo)._fromJsonArray(x.map((m) => m.data.item), this.query.options);
for (let index = 0; index < x.length; index++) {

@@ -62,0 +62,0 @@ const element = x[index];

@@ -14,4 +14,8 @@ export {};

//p1 - processError in remult express
//p1 - I think there should be a way to throw a forbidden exception
//p1 - add section to Fields doc, explaining field type in db
//p1 - add section about union type
//p1 - add section about value list field type
//p1 - add section to Fields doc, explaining field type in db
/*y1 - Talk JYC - JYC - add some integrity checks on delete

@@ -22,5 +26,6 @@ - soft delete

*/
//y1 תגיד - updateMany צריך להחזיר את השורות שעודכנו (כמו update או insert) או כמה שורות עודכנו (כמו deleteMany)
/*y1 currency.ts:10 Uncaught TypeError: Currency_1 is not a constructor
// - ValueListFieldType - the decorator gives an error in react vite project - see langulage yedidya
// happens in target 2022, ts<5.1.6
//typescript 5.1.6
@ValueListFieldType()

@@ -41,8 +46,12 @@ export class Currency {

*/
//y1 - admin url!
//y1 - allow api read to also support instance and filter. - problem with promise
//y1 - admin url1 - pocketbase use /_ for the admin
//y1 - consider sql expression gets a dbnames of it's own (that already has the "tableName" defined correctly) maybe also the filter translator
//y1 - talk about modules in init express with entities/controllers,initRequest,initApi
/*y1 - talk about modules in init express with entities/controllers,initRequest,initApi
- support get with backend method, with url search params as the first parameter, & url as second parameter
- support returning redirect, and plain html (For sign in scenarios)
*/
//y1 - tried to upgrade vitest, nuxt tests are failing with loading uuid - sounds familiar?
//y1 - I think that the tests you've setup don't cover next app router - I added to the setup, but not sure where else
//y1 - support get with backend method, with url search params as the first parameter, & url as second parameter
//y1 - talk about the parameter issue with backend methods

@@ -64,25 +73,22 @@ //y1 - select data provider per entity https://discord.com/channels/975754286384418847/976006081748807690/1201415305885397003

//y2 - constraints (@JY)
// remult admin
//p1 - Small thing, I get SvelteKitError: Not found: /vite.svg
//p1 - understand the to many relation for the admin, based on the to one
//p1 - relation from order details to order gave a compound id info - and it is not true - same for the relation to product
//p1 - new row when there are relations, looks funny (see product)
//p1 - the + row in the bottom should extend to the full width
//p1 - need a way to extract the fields from the relation - for generating relation based sql
//p1 - allow conditional admin - like allowed
//p1 - remult-admin doesn't handle primary key that has compound column
//p1 - remult-admin didn't show a update for a table with a uniqua that is numeric
/*p2 remult admin
- Small thing, I get SvelteKitError: Not found: /vite.svg
- understand the to many relation for the admin, based on the to one
- relation from order details to order gave a compound id info - and it is not true - same for the relation to product
- new row when there are relations, looks funny (see product)
- the + row in the bottom should extend to the full width
- need a way to extract the fields from the relation - for generating relation based sql
- allow conditional admin - like allowed
- remult-admin doesn't handle primary key that has compound column
- remult-admin didn't show a update for a table with a uniqua that is numeric
*/
//remult
//p1 - better support union types (status, etc... so it'll work also in filter etc...)
//p1 - add tablename parameter for dbNamesOf
//p1 -check if count doesn't respect allow read (I think)
//p1 - when a tasks table exists in a different schema - we get many errors
//p1 - live query with include
//p1 - adjust angular tutorial starter kit for latest angular (as is in tutorial)
//p2 - I think there should be a way to throw a forbidden exception
//p2 - processError in remult express
//p2 - allow find options preprocessor for api calls, to use for authorization
//p2 - when subscribe is forbidden - the query still runs after the renew process
//p2 - 'update tasks set where id = $1
//p1 - ValueListFieldType - the decorator gives an error in react vite project - see langulage yedidya
//p2 - type metadata.key - to keyof entity - based on cwis input

@@ -102,3 +108,2 @@ //y2 - remove __dirname from tutorials

//y2 - consider multi tenancies
//y2 - allow api read to also support instance and filter. - problem with promise
//p2 - more column types

@@ -105,0 +110,0 @@ //p2 - document validators

@@ -520,3 +520,3 @@ "use strict";

item = myRepo.fromJson(orig);
_a = (0, repository_internals_js_1.getRepositoryInternals)(myRepo).getFocusedRelationRepo(myRepo.fields.find(f), item), toRepo = _a.toRepo, returnNull = _a.returnNull, returnUndefined = _a.returnUndefined;
_a = (0, repository_internals_js_1.getRepositoryInternals)(myRepo)._getFocusedRelationRepo(myRepo.fields.find(f), item), toRepo = _a.toRepo, returnNull = _a.returnNull, returnUndefined = _a.returnUndefined;
if (returnNull || returnUndefined)

@@ -523,0 +523,0 @@ return [2 /*return*/, null];

{
"name": "remult",
"version": "0.25.7-exp.3",
"version": "0.25.7-exp.4",
"description": "A CRUD framework for full-stack TypeScript",

@@ -5,0 +5,0 @@ "homepage": "https://remult.dev",

@@ -115,3 +115,3 @@ "use strict";

b._addWhere = false;
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(repo).translateWhereToFilter(condition)];
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(repo)._translateWhereToFilter(condition)];
case 2: return [4 /*yield*/, (_b.sent()).__applyToConsumer(b)];

@@ -118,0 +118,0 @@ case 3:

@@ -85,3 +85,3 @@ "use strict";

b._addWhere = false;
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(repo).translateWhereToFilter(condition)];
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(repo)._translateWhereToFilter(condition)];
case 2: return [4 /*yield*/, (_b.sent()).__applyToConsumer(b)];

@@ -88,0 +88,0 @@ case 3:

@@ -38,3 +38,3 @@ "use strict";

return null;
return (0, repository_internals_js_1.getRepositoryInternals)(this.repository).getCachedByIdAsync(id, false);
return (0, repository_internals_js_1.getRepositoryInternals)(this.repository)._getCachedByIdAsync(id, false);
};

@@ -44,3 +44,3 @@ LookupColumn.prototype.get = function (id) {

return null;
var result = (0, repository_internals_js_1.getRepositoryInternals)(this.repository).getCachedById(id, this.isReferenceRelation);
var result = (0, repository_internals_js_1.getRepositoryInternals)(this.repository)._getCachedById(id, this.isReferenceRelation);
if (this.isReferenceRelation && !this.storedItem) {

@@ -68,3 +68,3 @@ if (!this.allowNull && (this.id === 0 || this.id === ''))

if (eo && !this.isReferenceRelation) {
(0, repository_internals_js_1.getRepositoryInternals)(this.repository).addToCache(item);
(0, repository_internals_js_1.getRepositoryInternals)(this.repository)._addToCache(item);
this.id = eo.getId();

@@ -71,0 +71,0 @@ }

@@ -173,3 +173,3 @@ "use strict";

b._addWhere = false;
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(r).translateWhereToFilter(condition)];
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(r)._translateWhereToFilter(condition)];
case 3: return [4 /*yield*/, (_d.sent()).__applyToConsumer(b)];

@@ -176,0 +176,0 @@ case 4:

@@ -106,3 +106,3 @@ "use strict";

this.runPromise((0, repository_internals_js_1.getRepositoryInternals)(repo)
.buildEntityDataProviderFindOptions(options)
._buildEntityDataProviderFindOptions(options)
.then(function (opts) {

@@ -109,0 +109,0 @@ if (!alive)

@@ -31,3 +31,3 @@ "use strict";

switch (_a.label) {
case 0: return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(this.repo).fromJsonArray(result, this.query.options)];
case 0: return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(this.repo)._fromJsonArray(result, this.query.options)];
case 1:

@@ -102,3 +102,3 @@ items = _a.sent();

});
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(this.repo).fromJsonArray(x.map(function (m) { return m.data.item; }), this.query.options)];
return [4 /*yield*/, (0, repository_internals_js_1.getRepositoryInternals)(this.repo)._fromJsonArray(x.map(function (m) { return m.data.item; }), this.query.options)];
case 1:

@@ -105,0 +105,0 @@ loadedItems = _a.sent();

@@ -15,4 +15,8 @@ "use strict";

//p1 - processError in remult express
//p1 - I think there should be a way to throw a forbidden exception
//p1 - add section to Fields doc, explaining field type in db
//p1 - add section about union type
//p1 - add section about value list field type
//p1 - add section to Fields doc, explaining field type in db
/*y1 - Talk JYC - JYC - add some integrity checks on delete

@@ -23,5 +27,6 @@ - soft delete

*/
//y1 תגיד - updateMany צריך להחזיר את השורות שעודכנו (כמו update או insert) או כמה שורות עודכנו (כמו deleteMany)
/*y1 currency.ts:10 Uncaught TypeError: Currency_1 is not a constructor
// - ValueListFieldType - the decorator gives an error in react vite project - see langulage yedidya
// happens in target 2022, ts<5.1.6
//typescript 5.1.6
@ValueListFieldType()

@@ -42,8 +47,12 @@ export class Currency {

*/
//y1 - admin url!
//y1 - allow api read to also support instance and filter. - problem with promise
//y1 - admin url1 - pocketbase use /_ for the admin
//y1 - consider sql expression gets a dbnames of it's own (that already has the "tableName" defined correctly) maybe also the filter translator
//y1 - talk about modules in init express with entities/controllers,initRequest,initApi
/*y1 - talk about modules in init express with entities/controllers,initRequest,initApi
- support get with backend method, with url search params as the first parameter, & url as second parameter
- support returning redirect, and plain html (For sign in scenarios)
*/
//y1 - tried to upgrade vitest, nuxt tests are failing with loading uuid - sounds familiar?
//y1 - I think that the tests you've setup don't cover next app router - I added to the setup, but not sure where else
//y1 - support get with backend method, with url search params as the first parameter, & url as second parameter
//y1 - talk about the parameter issue with backend methods

@@ -65,25 +74,22 @@ //y1 - select data provider per entity https://discord.com/channels/975754286384418847/976006081748807690/1201415305885397003

//y2 - constraints (@JY)
// remult admin
//p1 - Small thing, I get SvelteKitError: Not found: /vite.svg
//p1 - understand the to many relation for the admin, based on the to one
//p1 - relation from order details to order gave a compound id info - and it is not true - same for the relation to product
//p1 - new row when there are relations, looks funny (see product)
//p1 - the + row in the bottom should extend to the full width
//p1 - need a way to extract the fields from the relation - for generating relation based sql
//p1 - allow conditional admin - like allowed
//p1 - remult-admin doesn't handle primary key that has compound column
//p1 - remult-admin didn't show a update for a table with a uniqua that is numeric
/*p2 remult admin
- Small thing, I get SvelteKitError: Not found: /vite.svg
- understand the to many relation for the admin, based on the to one
- relation from order details to order gave a compound id info - and it is not true - same for the relation to product
- new row when there are relations, looks funny (see product)
- the + row in the bottom should extend to the full width
- need a way to extract the fields from the relation - for generating relation based sql
- allow conditional admin - like allowed
- remult-admin doesn't handle primary key that has compound column
- remult-admin didn't show a update for a table with a uniqua that is numeric
*/
//remult
//p1 - better support union types (status, etc... so it'll work also in filter etc...)
//p1 - add tablename parameter for dbNamesOf
//p1 -check if count doesn't respect allow read (I think)
//p1 - when a tasks table exists in a different schema - we get many errors
//p1 - live query with include
//p1 - adjust angular tutorial starter kit for latest angular (as is in tutorial)
//p2 - I think there should be a way to throw a forbidden exception
//p2 - processError in remult express
//p2 - allow find options preprocessor for api calls, to use for authorization
//p2 - when subscribe is forbidden - the query still runs after the renew process
//p2 - 'update tasks set where id = $1
//p1 - ValueListFieldType - the decorator gives an error in react vite project - see langulage yedidya
//p2 - type metadata.key - to keyof entity - based on cwis input

@@ -103,3 +109,2 @@ //y2 - remove __dirname from tutorials

//y2 - consider multi tenancies
//y2 - allow api read to also support instance and filter. - problem with promise
//p2 - more column types

@@ -106,0 +111,0 @@ //p2 - document validators

@@ -6,10 +6,10 @@ import type { FieldMetadata } from '../column-interfaces.js';

export interface RepositoryInternal<entityType> {
createAfterFilter(orderBy: EntityOrderBy<entityType>, lastRow: entityType): Promise<EntityFilter<entityType>>;
fromJsonArray(jsonItems: any[], loadOptions: LoadOptions<entityType>): Promise<entityType[]>;
buildEntityDataProviderFindOptions(options: FindOptions<entityType>): Promise<EntityDataProviderFindOptions>;
translateWhereToFilter(where: EntityFilter<entityType>): Promise<Filter>;
getCachedById(id: any, doNotLoadIfNotFound: boolean): entityType;
getCachedByIdAsync(id: any, doNotLoadIfNotFound: boolean): Promise<entityType>;
addToCache(item: entityType): any;
getFocusedRelationRepo(field: FieldMetadata, item: any): {
_createAfterFilter(orderBy: EntityOrderBy<entityType>, lastRow: entityType): Promise<EntityFilter<entityType>>;
_fromJsonArray(jsonItems: any[], loadOptions: LoadOptions<entityType>): Promise<entityType[]>;
_buildEntityDataProviderFindOptions(options: FindOptions<entityType>): Promise<EntityDataProviderFindOptions>;
_translateWhereToFilter(where: EntityFilter<entityType>): Promise<Filter>;
_getCachedById(id: any, doNotLoadIfNotFound: boolean): entityType;
_getCachedByIdAsync(id: any, doNotLoadIfNotFound: boolean): Promise<entityType>;
_addToCache(item: entityType): any;
_getFocusedRelationRepo(field: FieldMetadata, item: any): {
toRepo: Repository<any>;

@@ -16,0 +16,0 @@ returnNull: boolean;

@@ -15,8 +15,8 @@ import type { ClassType } from '../../classType.js';

export declare class RepositoryImplementation<entityType> implements Repository<entityType>, RepositoryInternal<entityType> {
private entity;
remult: Remult;
private dataProvider;
private _entity;
_remult: Remult;
private _dataProvider;
private _info;
private defaultFindOptions?;
notFoundError(id: any): {
private _defaultFindOptions?;
_notFoundError(id: any): {
message: string;

@@ -26,5 +26,5 @@ httpStatusCode: number;

[getInternalKey](): this;
createAfterFilter(orderBy: EntityOrderBy<entityType>, lastRow: entityType): Promise<EntityFilter<entityType>>;
_createAfterFilter(orderBy: EntityOrderBy<entityType>, lastRow: entityType): Promise<EntityFilter<entityType>>;
relations(item: entityType): RepositoryRelations<entityType>;
getFocusedRelationRepo(field: FieldMetadata, item: entityType): {
_getFocusedRelationRepo(field: FieldMetadata, item: entityType): {
toRepo: RepositoryImplementation<any>;

@@ -35,8 +35,8 @@ returnNull: boolean;

private __edp;
private get edp();
constructor(entity: ClassType<entityType>, remult: Remult, dataProvider: DataProvider, _info: EntityFullInfo<entityType>, defaultFindOptions?: FindOptions<entityType>);
idCache: Map<any, any>;
getCachedById(id: any, doNotLoadIfNotFound: boolean): entityType;
getCachedByIdAsync(id: any, doNotLoadIfNotFound: boolean): Promise<entityType>;
addToCache(item: entityType): void;
private get _edp();
constructor(_entity: ClassType<entityType>, _remult: Remult, _dataProvider: DataProvider, _info: EntityFullInfo<entityType>, _defaultFindOptions?: FindOptions<entityType>);
_idCache: Map<any, any>;
_getCachedById(id: any, doNotLoadIfNotFound: boolean): entityType;
_getCachedByIdAsync(id: any, doNotLoadIfNotFound: boolean): Promise<entityType>;
_addToCache(item: entityType): void;
get metadata(): EntityMetadata<entityType>;

@@ -64,12 +64,12 @@ listeners: entityEventListener<entityType>[];

update(originalItem: Partial<MembersOnly<entityType>>, item: Partial<MembersOnly<entityType>>): Promise<entityType>;
private getRefForExistingRow;
private _getRefForExistingRow;
save(item: Partial<MembersOnly<entityType>>[]): Promise<entityType[]>;
save(item: Partial<MembersOnly<entityType>>): Promise<entityType>;
liveQuery(options?: FindOptions<entityType>): LiveQuery<entityType>;
rawFind(options: FindOptions<entityType>, skipOrderByAndLimit: boolean, loader: RelationLoader): Promise<entityType[]>;
_rawFind(options: FindOptions<entityType>, skipOrderByAndLimit: boolean, loader: RelationLoader): Promise<entityType[]>;
find(options: FindOptions<entityType>, skipOrderByAndLimit?: boolean): Promise<entityType[]>;
buildEntityDataProviderFindOptions(options: FindOptions<entityType>): Promise<EntityDataProviderFindOptions>;
fromJsonArray(jsonItems: any[], loadOptions: LoadOptions<entityType>): Promise<entityType[]>;
private loadManyToOneForManyRows;
private mapRawDataToResult;
_buildEntityDataProviderFindOptions(options: FindOptions<entityType>): Promise<EntityDataProviderFindOptions>;
_fromJsonArray(jsonItems: any[], loadOptions: LoadOptions<entityType>): Promise<entityType[]>;
private _loadManyToOneForManyRows;
private _mapRawDataToResult;
toJson(item: entityType | entityType[] | Promise<entityType> | Promise<entityType[]>): any;

@@ -79,10 +79,10 @@ fromJson(json: any, newRow?: boolean): any;

deleteMany(where: EntityFilter<entityType>): Promise<number>;
private cache;
private _cache;
findOne(options?: FindFirstOptions<entityType>, skipOrderByAndLimit?: boolean): Promise<entityType>;
findFirst(where?: EntityFilter<entityType>, options?: FindFirstOptions<entityType>, skipOrderByAndLimit?: boolean): Promise<entityType>;
private fieldsOf;
private _fieldsOf;
create(item?: Partial<MembersOnly<entityType>>): entityType;
fixTypes(item: any): Promise<any>;
_fixTypes(item: any): Promise<any>;
findId(id: any, options?: FindFirstOptionsBase<entityType>): Promise<entityType>;
translateWhereToFilter(where: EntityFilter<entityType>): Promise<Filter>;
_translateWhereToFilter(where: EntityFilter<entityType>): Promise<Filter>;
}

@@ -89,0 +89,0 @@ export type EntityOptionsFactory = (remult: Remult) => EntityOptions;

import type { FieldValidator } from './column-interfaces.js';
import type { ValidateFieldEvent } from './remult3/remult3.js';
export declare class Validators {
static required: Validator<any>;
static unique: Validator<any>;
static required: Validator<unknown>;
static unique: Validator<unknown>;
/**
* @deprecated use `unique` instead - it also runs only on the backend
*/
static uniqueOnBackend: Validator<any>;
static uniqueOnBackend: Validator<unknown>;
static regex: ValidatorWithArgs<string, RegExp> & {

@@ -15,10 +15,10 @@ defaultMessage: ValueValidationMessage<RegExp>;

static url: Validator<string>;
static in: <T>(value: readonly T[], withMessage?: ValueValidationMessage<T[]>) => FieldValidator<any, T> & {
static in: <T>(value: readonly T[], withMessage?: ValueValidationMessage<T[]>) => FieldValidator<unknown, T> & {
withMessage: ValueValidationMessage<T[]>;
};
static notNull: Validator<unknown>;
static enum: ValidatorWithArgs<any, any> & {
defaultMessage: ValueValidationMessage<any>;
static enum: ValidatorWithArgs<unknown, unknown> & {
defaultMessage: ValueValidationMessage<unknown>;
};
static relationExists: Validator<any>;
static relationExists: Validator<unknown>;
static maxLength: ValidatorWithArgs<string, number> & {

@@ -32,3 +32,3 @@ defaultMessage: ValueValidationMessage<number>;

}
export type Validator<valueType> = FieldValidator<any, valueType> & ((message?: ValidationMessage<valueType, undefined>) => FieldValidator<any, valueType>) & {
export type Validator<valueType> = FieldValidator<unknown, valueType> & ((message?: ValidationMessage<valueType, undefined>) => FieldValidator<unknown, valueType>) & {
defaultMessage: ValidationMessage<valueType, undefined>;

@@ -38,3 +38,3 @@ /**

*/
withMessage(message: ValidationMessage<valueType, undefined>): FieldValidator<any, valueType>;
withMessage(message: ValidationMessage<valueType, undefined>): FieldValidator<unknown, valueType>;
};

@@ -41,0 +41,0 @@ export declare function createValidator<valueType>(validate: (entity: any, e: ValidateFieldEvent<any, valueType>) => Promise<boolean | string> | boolean | string, defaultMessage?: ValidationMessage<valueType, undefined>): Validator<valueType>;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc