mirror of
https://github.com/appy-one/acebase-server.git
synced 2026-05-25 14:12:16 -06:00
Use types of new acebase-core version
This commit is contained in:
parent
4604866f2d
commit
7fa0e276ac
4 changed files with 4 additions and 7 deletions
|
|
@ -1,12 +1,11 @@
|
|||
import { ISchemaCheckResult, SchemaDefinition, Transport, IAceBaseSchemaInfo } from 'acebase-core';
|
||||
import type { SerializedValue } from 'acebase-core/types/transport';
|
||||
import adminOnly from '../middleware/admin-only';
|
||||
import { RouteInitEnvironment, RouteRequest } from '../shared/env';
|
||||
import { sendError } from '../shared/error';
|
||||
|
||||
export type RequestQuery = null;
|
||||
export type RequestBody = {
|
||||
value: SerializedValue;
|
||||
value: Transport.SerializedValue;
|
||||
partial: boolean;
|
||||
path?: string;
|
||||
schema?: IAceBaseSchemaInfo
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { SchemaValidationError } from 'acebase';
|
||||
import { Transport } from 'acebase-core';
|
||||
import { SerializedValue } from 'acebase-core/types/transport';
|
||||
import { RuleValidationFailCode } from '../rules';
|
||||
import { RouteInitEnvironment, RouteRequest } from '../shared/env';
|
||||
import { sendBadRequestError, sendError, sendUnauthorizedError } from '../shared/error';
|
||||
|
|
@ -11,7 +10,7 @@ export class SetDataError extends Error {
|
|||
}
|
||||
}
|
||||
export type RequestQuery = null;
|
||||
export type RequestBody = SerializedValue; // { val: any; map?: string|Record<string, 'date'|'binary'|'reference'|'regexp'|'array'> };
|
||||
export type RequestBody = Transport.SerializedValue; // { val: any; map?: string|Record<string, 'date'|'binary'|'reference'|'regexp'|'array'> };
|
||||
export type ResponseBody = { success: true } // 200
|
||||
| { code: 'invalid_serialized_value', message: string } // 400
|
||||
| { code: RuleValidationFailCode, message: string } // 403
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { SchemaValidationError } from 'acebase';
|
||||
import { Transport } from 'acebase-core';
|
||||
import { SerializedValue } from 'acebase-core/types/transport';
|
||||
import { RuleValidationFailCode } from '../rules';
|
||||
import { RouteInitEnvironment, RouteRequest } from '../shared/env';
|
||||
import { sendBadRequestError, sendError, sendUnauthorizedError } from '../shared/error';
|
||||
|
|
@ -12,7 +11,7 @@ export class UpdateDataError extends Error {
|
|||
}
|
||||
|
||||
export type RequestQuery = null;
|
||||
export type RequestBody = SerializedValue; //{ val: any; map?: string|Record<string, 'date'|'binary'|'reference'|'regexp'|'array'> };
|
||||
export type RequestBody = Transport.SerializedValue; //{ val: any; map?: string|Record<string, 'date'|'binary'|'reference'|'regexp'|'array'> };
|
||||
export type ResponseBody = { success: true } // 200
|
||||
| { code: 'invalid_serialized_value', message: string } // 400
|
||||
| { code: RuleValidationFailCode, message: string } // 403
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { AceBase } from 'acebase';
|
||||
import { QueryOperator } from 'acebase-core/types/data-reference';
|
||||
import { QueryOperator } from 'acebase-core/dist/types/data-reference';
|
||||
import adminOnly from '../middleware/admin-only';
|
||||
import { RouteInitEnvironment, RouteRequest } from '../shared/env';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue