@binaris/shift-interfaces-node-client
Advanced tools
+286
| import fetch from 'node-fetch'; | ||
| import { RequestInit } from 'node-fetch'; | ||
| import { ClassValidator, ValidationError } from './common'; | ||
| import { Document, Query, ClientContext, Version, Patch, VersionedMaybeObject } from './interfaces'; | ||
| export interface Options extends Pick<RequestInit, 'agent' | 'redirect' | 'follow' | 'compress'> { | ||
| fetchImplementation?: typeof fetch; | ||
| timeoutMs?: number; | ||
| headers?: Record<string, string>; | ||
| } | ||
| export declare class RequestError extends Error { | ||
| /** | ||
| * The original error causing this request to fail | ||
| * Inherits Error in case of network or parse errors | ||
| * In case of an invalid HTTP response it will contain an object with the body/trimmed text of the response | ||
| */ | ||
| readonly cause: any; | ||
| readonly method: string; | ||
| readonly options: any; | ||
| readonly name = "RequestError"; | ||
| constructor(message: string, | ||
| /** | ||
| * The original error causing this request to fail | ||
| * Inherits Error in case of network or parse errors | ||
| * In case of an invalid HTTP response it will contain an object with the body/trimmed text of the response | ||
| */ | ||
| cause: any, method: string, options: any); | ||
| } | ||
| export declare class TimeoutError extends Error { | ||
| readonly method: string; | ||
| readonly options: any; | ||
| readonly name = "TimeoutError"; | ||
| constructor(message: string, method: string, options: any); | ||
| } | ||
| export { ValidationError, }; | ||
| export declare type Context = ClientContext; | ||
| export interface DB { | ||
| get(ctx: ClientContext, key: string): Promise<any>; | ||
| getWithVersion(ctx: ClientContext, key: string): Promise<VersionedMaybeObject>; | ||
| setIfVersion(ctx: ClientContext, key: string, version: Version, value?: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean))): Promise<boolean>; | ||
| poll(ctx: ClientContext, keysToVersions: Array<[string, Version]>): Promise<Array<[string, Array<Patch>]>>; | ||
| create(ctx: ClientContext, key: string, value: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean))): Promise<boolean>; | ||
| remove(ctx: ClientContext, key: string): Promise<boolean>; | ||
| find(ctx: ClientContext, query: Query): Promise<Array<Document>>; | ||
| } | ||
| export declare class DBClient { | ||
| readonly serverUrl: string; | ||
| protected readonly options: Options; | ||
| static readonly methods: string[]; | ||
| static readonly validators: ClassValidator; | ||
| protected readonly props: { | ||
| "get": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": {}; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "getWithVersion": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "setIfVersion": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "poll": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "keysToVersions": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| "items": ({ | ||
| "type": string; | ||
| "$ref"?: undefined; | ||
| } | { | ||
| "$ref": string; | ||
| "type"?: undefined; | ||
| })[]; | ||
| "minItems": number; | ||
| "additionalItems": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "$ref"?: undefined; | ||
| } | { | ||
| "$ref": string; | ||
| "type"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| "items": ({ | ||
| "type": string; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| })[]; | ||
| "minItems": number; | ||
| "additionalItems": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| })[]; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "create": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "remove": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "find": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "query": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| }; | ||
| readonly validators: ClassValidator; | ||
| constructor(serverUrl: string, options?: Options); | ||
| get(ctx: ClientContext, key: string, options?: Options): Promise<any>; | ||
| getWithVersion(ctx: ClientContext, key: string, options?: Options): Promise<VersionedMaybeObject>; | ||
| setIfVersion(ctx: ClientContext, key: string, version: Version, value?: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)), options?: Options): Promise<boolean>; | ||
| poll(ctx: ClientContext, keysToVersions: Array<[string, Version]>, options?: Options): Promise<Array<[string, Array<Patch>]>>; | ||
| create(ctx: ClientContext, key: string, value: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)), options?: Options): Promise<boolean>; | ||
| remove(ctx: ClientContext, key: string, options?: Options): Promise<boolean>; | ||
| find(ctx: ClientContext, query: Query, options?: Options): Promise<Array<Document>>; | ||
| } |
+487
| "use strict"; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| // tslint:disable | ||
| const node_fetch_1 = require("node-fetch"); | ||
| const abort_controller_1 = require("abort-controller"); | ||
| const common_1 = require("./common"); | ||
| exports.ValidationError = common_1.ValidationError; | ||
| const interfaces_1 = require("./interfaces"); | ||
| class RequestError extends Error { | ||
| constructor(message, | ||
| /** | ||
| * The original error causing this request to fail | ||
| * Inherits Error in case of network or parse errors | ||
| * In case of an invalid HTTP response it will contain an object with the body/trimmed text of the response | ||
| */ | ||
| cause, method, options) { | ||
| super(message); | ||
| this.cause = cause; | ||
| this.method = method; | ||
| this.options = options; | ||
| this.name = 'RequestError'; | ||
| } | ||
| } | ||
| exports.RequestError = RequestError; | ||
| class TimeoutError extends Error { | ||
| constructor(message, method, options) { | ||
| super(message); | ||
| this.method = method; | ||
| this.options = options; | ||
| this.name = 'TimeoutError'; | ||
| } | ||
| } | ||
| exports.TimeoutError = TimeoutError; | ||
| class DBClient { | ||
| constructor(serverUrl, options = {}) { | ||
| this.serverUrl = serverUrl; | ||
| this.options = options; | ||
| this.props = interfaces_1.schema.definitions.DB.properties; | ||
| this.validators = DBClient.validators; | ||
| } | ||
| async get(ctx, key, options) { | ||
| const body = { | ||
| ctx, | ||
| key, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/get`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'get', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'get', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.get; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'get', mergedOptions); | ||
| } | ||
| async getWithVersion(ctx, key, options) { | ||
| const body = { | ||
| ctx, | ||
| key, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/getWithVersion`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'getWithVersion', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'getWithVersion', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.getWithVersion; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'getWithVersion', mergedOptions); | ||
| } | ||
| async setIfVersion(ctx, key, version, value, options) { | ||
| const body = { | ||
| ctx, | ||
| key, | ||
| version, | ||
| value, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/setIfVersion`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'setIfVersion', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'setIfVersion', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.setIfVersion; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'setIfVersion', mergedOptions); | ||
| } | ||
| async poll(ctx, keysToVersions, options) { | ||
| const body = { | ||
| ctx, | ||
| keysToVersions, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/poll`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'poll', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'poll', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.poll; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'poll', mergedOptions); | ||
| } | ||
| async create(ctx, key, value, options) { | ||
| const body = { | ||
| ctx, | ||
| key, | ||
| value, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/create`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'create', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'create', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.create; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'create', mergedOptions); | ||
| } | ||
| async remove(ctx, key, options) { | ||
| const body = { | ||
| ctx, | ||
| key, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/remove`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'remove', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'remove', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.remove; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'remove', mergedOptions); | ||
| } | ||
| async find(ctx, query, options) { | ||
| const body = { | ||
| ctx, | ||
| query, | ||
| }; | ||
| const mergedOptions = Object.assign({ serverUrl: this.serverUrl }, this.options, options); | ||
| const { fetchImplementation, timeoutMs, headers, serverUrl } = mergedOptions, fetchOptions = __rest(mergedOptions, ["fetchImplementation", "timeoutMs", "headers", "serverUrl"]); | ||
| const fetchImpl = fetchImplementation || node_fetch_1.default; | ||
| let timeout; | ||
| if (timeoutMs) { | ||
| const controller = new abort_controller_1.default(); | ||
| timeout = setTimeout(() => controller.abort(), timeoutMs); | ||
| fetchOptions.signal = controller.signal; | ||
| } | ||
| let response; | ||
| let responseBody; | ||
| let responseText; | ||
| let isJSON; | ||
| try { | ||
| response = await fetchImpl(`${serverUrl}/find`, Object.assign({}, fetchOptions, { headers: Object.assign({}, headers, { 'Content-Type': 'application/json' }), body: JSON.stringify(body), method: 'POST' })); | ||
| isJSON = (response.headers.get('content-type') || '').startsWith('application/json'); | ||
| if (isJSON) { | ||
| responseBody = await response.json(); | ||
| } | ||
| else { | ||
| responseText = await response.text(); | ||
| } | ||
| } | ||
| catch (err) { | ||
| if (err.message === 'The user aborted a request.') { | ||
| timeout = undefined; | ||
| throw new TimeoutError('Request aborted due to timeout', 'find', mergedOptions); | ||
| } | ||
| throw new RequestError(err.message, err, 'find', mergedOptions); | ||
| } | ||
| finally { | ||
| if (timeout) | ||
| clearTimeout(timeout); | ||
| } | ||
| if (response.status >= 200 && response.status < 300) { | ||
| const validator = this.validators.find; | ||
| const wrapped = { returns: responseBody }; // wrapped for coersion | ||
| if (!validator(wrapped)) { | ||
| throw new common_1.ValidationError('Failed to validate response', validator.errors); | ||
| } | ||
| return wrapped.returns; | ||
| } | ||
| else if (!isJSON) { | ||
| // fall through to throw | ||
| } | ||
| else if (response.status === 400) { | ||
| if (responseBody.name === 'ValidationError') { | ||
| throw new common_1.ValidationError(responseBody.message, responseBody.errors); | ||
| } | ||
| } | ||
| else if (response.status === 500) { | ||
| throw new interfaces_1.InternalServerError(responseBody.message); | ||
| } | ||
| throw new RequestError(`${response.status} - ${response.statusText}`, { responseText: responseText && responseText.slice(0, 256), responseBody }, 'find', mergedOptions); | ||
| } | ||
| } | ||
| DBClient.methods = [ | ||
| 'get', | ||
| 'getWithVersion', | ||
| 'setIfVersion', | ||
| 'poll', | ||
| 'create', | ||
| 'remove', | ||
| 'find', | ||
| ]; | ||
| DBClient.validators = common_1.createReturnTypeValidator(interfaces_1.schema, 'DB'); | ||
| exports.DBClient = DBClient; | ||
| //# sourceMappingURL=client.js.map |
| {"version":3,"file":"client.js","sourceRoot":"","sources":["src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iBAAiB;AACjB,2CAA+B;AAE/B,uDAA+C;AAC/C,qCAAsF;AAgFpF,0BAhFkD,wBAAe,CAgFlD;AA/EjB,6CA8CsB;AAQtB,MAAa,YAAa,SAAQ,KAAK;IAErC,YACE,OAAe;IACf;;;;OAIG;IACa,KAAU,EACV,MAAc,EACd,OAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,UAAK,GAAL,KAAK,CAAK;QACV,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAK;QAVd,SAAI,GAAG,cAAc,CAAC;IAatC,CAAC;CACF;AAfD,oCAeC;AAED,MAAa,YAAa,SAAQ,KAAK;IAErC,YAAY,OAAe,EAAkB,MAAc,EAAkB,OAAY;QACvF,KAAK,CAAC,OAAO,CAAC,CAAC;QAD4B,WAAM,GAAN,MAAM,CAAQ;Q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AAC,EAAE,GAAG,CAAC,EAAE,YAAY,EAAE,EAC1E,MAAM,EACN,aAAa,CAAC,CAAC;IACnB,CAAC;;AA1hBsB,gBAAO,GAAG;IAC/B,KAAK;IACL,gBAAgB;IAChB,cAAc;IACd,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;CACP,CAAC;AACqB,mBAAU,GAAmB,kCAAyB,CAAC,mBAAM,EAAE,IAAI,CAAC,CAAC;AAV9F,4BA4hBC"} |
+24
| import { ValidateFunction } from 'ajv'; | ||
| export declare class ValidationError extends Error { | ||
| errors: any; | ||
| readonly name = "ValidationError"; | ||
| constructor(message: string, errors: any); | ||
| } | ||
| export interface ClassValidator { | ||
| [method: string]: ValidateFunction; | ||
| } | ||
| export declare function createClassValidator(schema: { | ||
| definitions: { | ||
| [key: string]: any; | ||
| }; | ||
| }, className: string, field: string): ClassValidator; | ||
| export declare function createReturnTypeValidator(schema: { | ||
| definitions: { | ||
| [key: string]: any; | ||
| }; | ||
| }, className: string): ClassValidator; | ||
| export declare function createInterfaceValidator(schema: { | ||
| definitions: { | ||
| [key: string]: any; | ||
| }; | ||
| }, ifaceName: string): ValidateFunction; |
+66
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const lodash_1 = require("lodash"); | ||
| const AjvCtor = require("ajv"); | ||
| class ValidationError extends Error { | ||
| constructor(message, errors) { | ||
| super(message); | ||
| this.errors = errors; | ||
| this.name = 'ValidationError'; | ||
| } | ||
| } | ||
| exports.ValidationError = ValidationError; | ||
| function createValidator() { | ||
| const ajv = new AjvCtor({ useDefaults: true, allErrors: true }); | ||
| ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); | ||
| ajv.addKeyword('coerce-date', { | ||
| type: 'string', | ||
| modifying: true, | ||
| valid: true, | ||
| compile: (onOrOff, parentSchema) => { | ||
| if (parentSchema.format !== 'date-time') { | ||
| throw new Error('Format should be date-time when using coerce-date'); | ||
| } | ||
| if (onOrOff !== true) { | ||
| return lodash_1.identity; | ||
| } | ||
| return (v, _dataPath, obj, key) => { | ||
| if (obj === undefined || key === undefined) { | ||
| throw new Error('Cannot coerce a date at root level'); | ||
| } | ||
| obj[key] = new Date(v); | ||
| return true; | ||
| }; | ||
| }, | ||
| }); | ||
| return ajv; | ||
| } | ||
| function createClassValidator(schema, className, field) { | ||
| const ajv = createValidator(); | ||
| for (const [k, v] of Object.entries(schema.definitions)) { | ||
| ajv.addSchema(v, `#/definitions/${k}`); | ||
| } | ||
| return lodash_1.fromPairs(Object.entries(schema.definitions[className].properties).map(([method, s]) => [ | ||
| method, ajv.compile(s.properties[field]), | ||
| ])); | ||
| } | ||
| exports.createClassValidator = createClassValidator; | ||
| function createReturnTypeValidator(schema, className) { | ||
| const ajv = createValidator(); | ||
| for (const [k, v] of Object.entries(schema.definitions)) { | ||
| ajv.addSchema(v, `#/definitions/${k}`); | ||
| } | ||
| return lodash_1.fromPairs(Object.entries(schema.definitions[className].properties).map(([method, s]) => [ | ||
| method, ajv.compile({ properties: lodash_1.pick(s.properties, 'returns') }), | ||
| ])); | ||
| } | ||
| exports.createReturnTypeValidator = createReturnTypeValidator; | ||
| function createInterfaceValidator(schema, ifaceName) { | ||
| const ajv = createValidator(); | ||
| for (const [k, v] of Object.entries(schema.definitions)) { | ||
| ajv.addSchema(v, `#/definitions/${k}`); | ||
| } | ||
| return ajv.compile(schema.definitions[ifaceName]); | ||
| } | ||
| exports.createInterfaceValidator = createInterfaceValidator; | ||
| //# sourceMappingURL=common.js.map |
| {"version":3,"file":"common.js","sourceRoot":"","sources":["src/common.ts"],"names":[],"mappings":";;AAAA,mCAAmD;AAEnD,+BAAgC;AAEhC,MAAa,eAAgB,SAAQ,KAAK;IAExC,YAAY,OAAe,EAAS,MAAW;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;QADmB,WAAM,GAAN,MAAM,CAAK;QAD/B,SAAI,GAAG,iBAAiB,CAAC;IAGzC,CAAC;CACF;AALD,0CAKC;AAMD,SAAS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CAAC,SAAS,CAAC,CAAC,CAAC;AACpD,CAAC;AATD,4DASC"} |
| >>> @binaris/shift-interfaces-node-client | ||
| echo generated code | ||
| generated code |
+1284
| export declare const schema: { | ||
| "$schema": string; | ||
| "definitions": { | ||
| "Comparable": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "Equatable": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "Operation": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| "BaseOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "AddOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": {}; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "RemoveOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "ReplaceOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": {}; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "MoveOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "from": { | ||
| "type": string; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "CopyOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "from": { | ||
| "type": string; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "TestOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": {}; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "GetOperation": { | ||
| "type": string; | ||
| "properties": { | ||
| "op": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": {}; | ||
| "path": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "Serializable": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| "Document": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "PathFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "EqFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "NeFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "ComparableFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "GtFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "GteFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "LtFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "LteFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "description": string; | ||
| "type": string; | ||
| "format": string; | ||
| "coerce-date": boolean; | ||
| } | { | ||
| "type": string[]; | ||
| "description"?: undefined; | ||
| "format"?: undefined; | ||
| "coerce-date"?: undefined; | ||
| })[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "ExistsFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "IsNullFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "MatchesFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "pattern": { | ||
| "type": string; | ||
| }; | ||
| "caseInsensitive": { | ||
| "type": string; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "StartsWithFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "value": { | ||
| "type": string; | ||
| }; | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "AndFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "filters": { | ||
| "type": string; | ||
| "items": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "OrFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "filters": { | ||
| "type": string; | ||
| "items": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "NotFilter": { | ||
| "type": string; | ||
| "properties": { | ||
| "operator": { | ||
| "type": string; | ||
| "enum": string[]; | ||
| }; | ||
| "filter": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "Filter": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| "Direction": { | ||
| "enum": string[]; | ||
| "type": string; | ||
| }; | ||
| "Order": { | ||
| "type": string; | ||
| "properties": { | ||
| "path": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "direction": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "Query": { | ||
| "type": string; | ||
| "properties": { | ||
| "filter": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| "limit": { | ||
| "type": string; | ||
| }; | ||
| "skip": { | ||
| "type": string; | ||
| }; | ||
| "orderBy": { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "ClientContext": { | ||
| "type": string; | ||
| "properties": { | ||
| "auth": { | ||
| "type": string; | ||
| "properties": { | ||
| "v1": { | ||
| "type": string; | ||
| "properties": { | ||
| "appId": { | ||
| "type": string; | ||
| }; | ||
| "apiKey": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "ServerOnlyContext": { | ||
| "type": string; | ||
| "properties": { | ||
| "tags": { | ||
| "type": string; | ||
| "additionalProperties": { | ||
| "type": string; | ||
| }; | ||
| "propertyOrder": never[]; | ||
| }; | ||
| "logLevel": { | ||
| "type": string; | ||
| }; | ||
| "logExtra": { | ||
| "type": string; | ||
| "additionalProperties": {}; | ||
| "propertyOrder": never[]; | ||
| }; | ||
| "sampleRate": { | ||
| "type": string; | ||
| }; | ||
| "debugId": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "UpdateOptions": { | ||
| "type": string; | ||
| "properties": { | ||
| "operationId": { | ||
| "description": string; | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| }; | ||
| "Version": { | ||
| "type": string; | ||
| "properties": { | ||
| "major": { | ||
| "type": string; | ||
| }; | ||
| "minor": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "Patch": { | ||
| "type": string; | ||
| "properties": { | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "operationId": { | ||
| "description": string; | ||
| "type": string; | ||
| }; | ||
| "ops": { | ||
| "type": string; | ||
| "items": { | ||
| "anyOf": { | ||
| "$ref": string; | ||
| }[]; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "KeyedPatches": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| "items": ({ | ||
| "type": string; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| })[]; | ||
| "minItems": number; | ||
| "additionalItems": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| })[]; | ||
| }; | ||
| }; | ||
| }; | ||
| "VersionedObject": { | ||
| "type": string; | ||
| "properties": { | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "VersionedMaybeObject": { | ||
| "type": string; | ||
| "properties": { | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "Patches": { | ||
| "type": string; | ||
| "properties": { | ||
| "patches": { | ||
| "description": string; | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "KeyedVersions": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| "items": ({ | ||
| "type": string; | ||
| "$ref"?: undefined; | ||
| } | { | ||
| "$ref": string; | ||
| "type"?: undefined; | ||
| })[]; | ||
| "minItems": number; | ||
| "additionalItems": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "$ref"?: undefined; | ||
| } | { | ||
| "$ref": string; | ||
| "type"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| }; | ||
| "StoredDocument": { | ||
| "type": string; | ||
| "properties": { | ||
| "updatedAt": { | ||
| "type": string; | ||
| }; | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| "patches": { | ||
| "description": string; | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "Tombstone": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "updatedAt": { | ||
| "type": string; | ||
| }; | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "patches": { | ||
| "description": string; | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "DB": { | ||
| "type": string; | ||
| "properties": { | ||
| "get": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": {}; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "getWithVersion": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "setIfVersion": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| "version": { | ||
| "$ref": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "poll": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "keysToVersions": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| "items": ({ | ||
| "type": string; | ||
| "$ref"?: undefined; | ||
| } | { | ||
| "$ref": string; | ||
| "type"?: undefined; | ||
| })[]; | ||
| "minItems": number; | ||
| "additionalItems": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "$ref"?: undefined; | ||
| } | { | ||
| "$ref": string; | ||
| "type"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| "items": { | ||
| "type": string; | ||
| "items": ({ | ||
| "type": string; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| })[]; | ||
| "minItems": number; | ||
| "additionalItems": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| })[]; | ||
| }; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "create": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| "value": { | ||
| "anyOf": ({ | ||
| "type": string; | ||
| "properties": {}; | ||
| "items"?: undefined; | ||
| } | { | ||
| "type": string; | ||
| "items": {}; | ||
| "properties"?: undefined; | ||
| } | { | ||
| "type": string[]; | ||
| "properties"?: undefined; | ||
| "items"?: undefined; | ||
| })[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "remove": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "key": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "find": { | ||
| "description": string; | ||
| "type": string; | ||
| "properties": { | ||
| "params": { | ||
| "type": string; | ||
| "properties": { | ||
| "query": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| "returns": { | ||
| "type": string; | ||
| "items": { | ||
| "$ref": string; | ||
| }; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| }; | ||
| "propertyOrder": string[]; | ||
| "required": string[]; | ||
| }; | ||
| }; | ||
| }; | ||
| export declare class InternalServerError extends Error { | ||
| readonly name = "InternalServerError"; | ||
| } | ||
| export declare enum Direction { | ||
| ASC = "ASC", | ||
| DESC = "DESC" | ||
| } | ||
| export declare type Comparable = (Date) | ((string) | (number)); | ||
| export declare type Equatable = (Date) | ((string) | (number) | (boolean)); | ||
| export declare type Operation = (AddOperation) | (RemoveOperation) | (ReplaceOperation) | (MoveOperation) | (CopyOperation) | (TestOperation) | (GetOperation); | ||
| export declare type Serializable = ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)); | ||
| export declare type Filter = (EqFilter) | (NeFilter) | (GtFilter) | (GteFilter) | (LtFilter) | (LteFilter) | (ExistsFilter) | (IsNullFilter) | (MatchesFilter) | (StartsWithFilter) | (AndFilter) | (OrFilter) | (NotFilter); | ||
| export interface BaseOperation { | ||
| readonly path: string; | ||
| } | ||
| export interface AddOperation { | ||
| readonly op: "add"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface RemoveOperation { | ||
| readonly op: "remove"; | ||
| readonly path: string; | ||
| } | ||
| export interface ReplaceOperation { | ||
| readonly op: "replace"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface MoveOperation { | ||
| readonly op: "move"; | ||
| readonly from: string; | ||
| readonly path: string; | ||
| } | ||
| export interface CopyOperation { | ||
| readonly op: "copy"; | ||
| readonly from: string; | ||
| readonly path: string; | ||
| } | ||
| export interface TestOperation { | ||
| readonly op: "test"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface GetOperation { | ||
| readonly op: "_get"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface Document { | ||
| readonly key: string; | ||
| readonly value: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)); | ||
| } | ||
| export interface PathFilter { | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface EqFilter { | ||
| readonly operator: "eq"; | ||
| readonly value: (Date) | ((string) | (number) | (boolean)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface NeFilter { | ||
| readonly operator: "ne"; | ||
| readonly value: (Date) | ((string) | (number) | (boolean)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface ComparableFilter { | ||
| readonly value: (Date) | ((string) | (number)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface GtFilter { | ||
| readonly operator: "gt"; | ||
| readonly value: (Date) | ((string) | (number)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface GteFilter { | ||
| readonly operator: "gte"; | ||
| readonly value: (Date) | ((string) | (number)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface LtFilter { | ||
| readonly operator: "lt"; | ||
| readonly value: (Date) | ((string) | (number)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface LteFilter { | ||
| readonly operator: "lte"; | ||
| readonly value: (Date) | ((string) | (number)); | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface ExistsFilter { | ||
| readonly operator: "exists"; | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface IsNullFilter { | ||
| readonly operator: "isNull"; | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface MatchesFilter { | ||
| readonly operator: "matches"; | ||
| readonly pattern: string; | ||
| readonly caseInsensitive: boolean; | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface StartsWithFilter { | ||
| readonly operator: "startsWith"; | ||
| readonly value: string; | ||
| readonly path: Array<string>; | ||
| } | ||
| export interface AndFilter { | ||
| readonly operator: "and"; | ||
| readonly filters: Array<(EqFilter) | (NeFilter) | (GtFilter) | (GteFilter) | (LtFilter) | (LteFilter) | (ExistsFilter) | (IsNullFilter) | (MatchesFilter) | (StartsWithFilter) | (AndFilter) | (OrFilter) | (NotFilter)>; | ||
| } | ||
| export interface OrFilter { | ||
| readonly operator: "or"; | ||
| readonly filters: Array<(EqFilter) | (NeFilter) | (GtFilter) | (GteFilter) | (LtFilter) | (LteFilter) | (ExistsFilter) | (IsNullFilter) | (MatchesFilter) | (StartsWithFilter) | (AndFilter) | (OrFilter) | (NotFilter)>; | ||
| } | ||
| export interface NotFilter { | ||
| readonly operator: "not"; | ||
| readonly filter: (EqFilter) | (NeFilter) | (GtFilter) | (GteFilter) | (LtFilter) | (LteFilter) | (ExistsFilter) | (IsNullFilter) | (MatchesFilter) | (StartsWithFilter) | (AndFilter) | (OrFilter) | (NotFilter); | ||
| } | ||
| export interface Order { | ||
| readonly path: Array<string>; | ||
| readonly direction: Direction; | ||
| } | ||
| export interface Query { | ||
| readonly filter: (EqFilter) | (NeFilter) | (GtFilter) | (GteFilter) | (LtFilter) | (LteFilter) | (ExistsFilter) | (IsNullFilter) | (MatchesFilter) | (StartsWithFilter) | (AndFilter) | (OrFilter) | (NotFilter); | ||
| readonly limit?: number; | ||
| readonly skip?: number; | ||
| readonly orderBy?: Array<Order>; | ||
| } | ||
| export interface ClientContext { | ||
| readonly auth: { | ||
| v1: { | ||
| appId: string; | ||
| apiKey: string; | ||
| }; | ||
| }; | ||
| } | ||
| export interface ServerOnlyContext { | ||
| readonly tags?: {}; | ||
| readonly logLevel?: string; | ||
| readonly logExtra?: {}; | ||
| readonly sampleRate?: number; | ||
| readonly debugId: string; | ||
| } | ||
| export interface UpdateOptions { | ||
| readonly operationId?: string; | ||
| } | ||
| export interface Version { | ||
| readonly major: number; | ||
| readonly minor: number; | ||
| } | ||
| export interface Patch { | ||
| readonly version: Version; | ||
| readonly operationId?: string; | ||
| readonly ops: Array<(AddOperation) | (RemoveOperation) | (ReplaceOperation) | (MoveOperation) | (CopyOperation) | (TestOperation) | (GetOperation)>; | ||
| } | ||
| export interface VersionedObject { | ||
| readonly version: Version; | ||
| readonly value: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)); | ||
| } | ||
| export interface VersionedMaybeObject { | ||
| readonly version: Version; | ||
| readonly value?: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)); | ||
| } | ||
| export interface Patches { | ||
| readonly patches: Array<Patch>; | ||
| } | ||
| export interface StoredDocument { | ||
| readonly updatedAt: number; | ||
| readonly version: Version; | ||
| readonly value: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean)); | ||
| readonly patches: Array<Patch>; | ||
| } | ||
| export interface Tombstone { | ||
| readonly updatedAt: number; | ||
| readonly version: Version; | ||
| readonly patches: Array<Patch>; | ||
| } | ||
| export interface DB { | ||
| get(key: string): Promise<any>; | ||
| getWithVersion(key: string): Promise<VersionedMaybeObject>; | ||
| setIfVersion(key: string, version: Version, value?: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean))): Promise<boolean>; | ||
| poll(keysToVersions: Array<[string, Version]>): Promise<Array<[string, Array<Patch>]>>; | ||
| create(key: string, value: ({}) | (Array<any>) | ((null) | (string) | (number) | (boolean))): Promise<boolean>; | ||
| remove(key: string): Promise<boolean>; | ||
| find(query: Query): Promise<Array<Document>>; | ||
| } |
+1805
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| // tslint:disable | ||
| exports.schema = { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "definitions": { | ||
| "Comparable": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "Equatable": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "Operation": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/AddOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/RemoveOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ReplaceOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MoveOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/CopyOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/TestOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GetOperation" | ||
| } | ||
| ] | ||
| }, | ||
| "BaseOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "path" | ||
| ] | ||
| }, | ||
| "AddOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "add" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "RemoveOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "remove" | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "ReplaceOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "replace" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "MoveOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "move" | ||
| ] | ||
| }, | ||
| "from": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "from", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "from", | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "CopyOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "copy" | ||
| ] | ||
| }, | ||
| "from": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "from", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "from", | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "TestOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "test" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "GetOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "_get" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "Serializable": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "Document": { | ||
| "type": "object", | ||
| "properties": { | ||
| "key": { | ||
| "type": "string" | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "key", | ||
| "value" | ||
| ], | ||
| "required": [ | ||
| "key", | ||
| "value" | ||
| ] | ||
| }, | ||
| "PathFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "path" | ||
| ] | ||
| }, | ||
| "EqFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "eq" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "NeFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "ne" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "ComparableFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "GtFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "gt" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "GteFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "gte" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "LtFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "lt" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "LteFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "lte" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "description": "Enables basic storage and retrieval of dates and times.", | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "coerce-date": true | ||
| }, | ||
| { | ||
| "type": [ | ||
| "string", | ||
| "number" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "ExistsFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "exists" | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path" | ||
| ] | ||
| }, | ||
| "IsNullFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "isNull" | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path" | ||
| ] | ||
| }, | ||
| "MatchesFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "matches" | ||
| ] | ||
| }, | ||
| "pattern": { | ||
| "type": "string" | ||
| }, | ||
| "caseInsensitive": { | ||
| "type": "boolean" | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "pattern", | ||
| "caseInsensitive", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "caseInsensitive", | ||
| "operator", | ||
| "path", | ||
| "pattern" | ||
| ] | ||
| }, | ||
| "StartsWithFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "startsWith" | ||
| ] | ||
| }, | ||
| "value": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "operator", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "AndFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "and" | ||
| ] | ||
| }, | ||
| "filters": { | ||
| "type": "array", | ||
| "items": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/EqFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NeFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ExistsFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/IsNullFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MatchesFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/StartsWithFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/AndFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/OrFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NotFilter" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "filters" | ||
| ], | ||
| "required": [ | ||
| "filters", | ||
| "operator" | ||
| ] | ||
| }, | ||
| "OrFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "or" | ||
| ] | ||
| }, | ||
| "filters": { | ||
| "type": "array", | ||
| "items": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/EqFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NeFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ExistsFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/IsNullFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MatchesFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/StartsWithFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/AndFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/OrFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NotFilter" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "filters" | ||
| ], | ||
| "required": [ | ||
| "filters", | ||
| "operator" | ||
| ] | ||
| }, | ||
| "NotFilter": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operator": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "not" | ||
| ] | ||
| }, | ||
| "filter": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/EqFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NeFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ExistsFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/IsNullFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MatchesFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/StartsWithFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/AndFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/OrFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NotFilter" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operator", | ||
| "filter" | ||
| ], | ||
| "required": [ | ||
| "filter", | ||
| "operator" | ||
| ] | ||
| }, | ||
| "Filter": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/EqFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NeFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ExistsFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/IsNullFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MatchesFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/StartsWithFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/AndFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/OrFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NotFilter" | ||
| } | ||
| ] | ||
| }, | ||
| "Direction": { | ||
| "enum": [ | ||
| "ASC", | ||
| "DESC" | ||
| ], | ||
| "type": "string" | ||
| }, | ||
| "Order": { | ||
| "type": "object", | ||
| "properties": { | ||
| "path": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "direction": { | ||
| "$ref": "#/definitions/Direction" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "path", | ||
| "direction" | ||
| ], | ||
| "required": [ | ||
| "direction", | ||
| "path" | ||
| ] | ||
| }, | ||
| "Query": { | ||
| "type": "object", | ||
| "properties": { | ||
| "filter": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/EqFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NeFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LtFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/LteFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ExistsFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/IsNullFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MatchesFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/StartsWithFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/AndFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/OrFilter" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/NotFilter" | ||
| } | ||
| ] | ||
| }, | ||
| "limit": { | ||
| "type": "number" | ||
| }, | ||
| "skip": { | ||
| "type": "number" | ||
| }, | ||
| "orderBy": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Order" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "filter", | ||
| "limit", | ||
| "skip", | ||
| "orderBy" | ||
| ], | ||
| "required": [ | ||
| "filter" | ||
| ] | ||
| }, | ||
| "ClientContext": { | ||
| "type": "object", | ||
| "properties": { | ||
| "auth": { | ||
| "type": "object", | ||
| "properties": { | ||
| "v1": { | ||
| "type": "object", | ||
| "properties": { | ||
| "appId": { | ||
| "type": "string" | ||
| }, | ||
| "apiKey": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "appId", | ||
| "apiKey" | ||
| ], | ||
| "required": [ | ||
| "apiKey", | ||
| "appId" | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "v1" | ||
| ], | ||
| "required": [ | ||
| "v1" | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "auth" | ||
| ], | ||
| "required": [ | ||
| "auth" | ||
| ] | ||
| }, | ||
| "ServerOnlyContext": { | ||
| "type": "object", | ||
| "properties": { | ||
| "tags": { | ||
| "type": "object", | ||
| "additionalProperties": { | ||
| "type": "string" | ||
| }, | ||
| "propertyOrder": [] | ||
| }, | ||
| "logLevel": { | ||
| "type": "string" | ||
| }, | ||
| "logExtra": { | ||
| "type": "object", | ||
| "additionalProperties": {}, | ||
| "propertyOrder": [] | ||
| }, | ||
| "sampleRate": { | ||
| "type": "number" | ||
| }, | ||
| "debugId": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "tags", | ||
| "logLevel", | ||
| "logExtra", | ||
| "sampleRate", | ||
| "debugId" | ||
| ], | ||
| "required": [ | ||
| "debugId" | ||
| ] | ||
| }, | ||
| "UpdateOptions": { | ||
| "type": "object", | ||
| "properties": { | ||
| "operationId": { | ||
| "description": "Used to mark an update originated from a specific operation (useful for optimistic UI).\nThis is meant to be UUID generated by the client.", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "operationId" | ||
| ] | ||
| }, | ||
| "Version": { | ||
| "type": "object", | ||
| "properties": { | ||
| "major": { | ||
| "type": "number" | ||
| }, | ||
| "minor": { | ||
| "type": "number" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "major", | ||
| "minor" | ||
| ], | ||
| "required": [ | ||
| "major", | ||
| "minor" | ||
| ] | ||
| }, | ||
| "Patch": { | ||
| "type": "object", | ||
| "properties": { | ||
| "version": { | ||
| "$ref": "#/definitions/Version" | ||
| }, | ||
| "operationId": { | ||
| "description": "Used to mark an update originated from a specific operation (useful for optimistic UI).", | ||
| "type": "string" | ||
| }, | ||
| "ops": { | ||
| "type": "array", | ||
| "items": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/AddOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/RemoveOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ReplaceOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MoveOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/CopyOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/TestOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GetOperation" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "version", | ||
| "operationId", | ||
| "ops" | ||
| ], | ||
| "required": [ | ||
| "ops", | ||
| "version" | ||
| ] | ||
| }, | ||
| "KeyedPatches": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "array", | ||
| "items": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| ], | ||
| "minItems": 2, | ||
| "additionalItems": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "VersionedObject": { | ||
| "type": "object", | ||
| "properties": { | ||
| "version": { | ||
| "$ref": "#/definitions/Version" | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "version", | ||
| "value" | ||
| ], | ||
| "required": [ | ||
| "value", | ||
| "version" | ||
| ] | ||
| }, | ||
| "VersionedMaybeObject": { | ||
| "type": "object", | ||
| "properties": { | ||
| "version": { | ||
| "$ref": "#/definitions/Version" | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "version", | ||
| "value" | ||
| ], | ||
| "required": [ | ||
| "version" | ||
| ] | ||
| }, | ||
| "Patches": { | ||
| "type": "object", | ||
| "properties": { | ||
| "patches": { | ||
| "description": "Stores changes made to the document, meant to be used internally by poll().", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "patches" | ||
| ], | ||
| "required": [ | ||
| "patches" | ||
| ] | ||
| }, | ||
| "KeyedVersions": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "array", | ||
| "items": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/Version" | ||
| } | ||
| ], | ||
| "minItems": 2, | ||
| "additionalItems": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/Version" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "StoredDocument": { | ||
| "type": "object", | ||
| "properties": { | ||
| "updatedAt": { | ||
| "type": "number" | ||
| }, | ||
| "version": { | ||
| "$ref": "#/definitions/Version" | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "patches": { | ||
| "description": "Stores changes made to the document, meant to be used internally by poll().", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "updatedAt", | ||
| "version", | ||
| "value", | ||
| "patches" | ||
| ], | ||
| "required": [ | ||
| "patches", | ||
| "updatedAt", | ||
| "value", | ||
| "version" | ||
| ] | ||
| }, | ||
| "Tombstone": { | ||
| "description": "A deleted document in the database, used for updating and for\nstreaming.", | ||
| "type": "object", | ||
| "properties": { | ||
| "updatedAt": { | ||
| "type": "number" | ||
| }, | ||
| "version": { | ||
| "$ref": "#/definitions/Version" | ||
| }, | ||
| "patches": { | ||
| "description": "Stores changes made to the document, meant to be used internally by poll().", | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "updatedAt", | ||
| "version", | ||
| "patches" | ||
| ], | ||
| "required": [ | ||
| "patches", | ||
| "updatedAt", | ||
| "version" | ||
| ] | ||
| }, | ||
| "DB": { | ||
| "type": "object", | ||
| "properties": { | ||
| "get": { | ||
| "description": "Gets a single document.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "key": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "key" | ||
| ], | ||
| "required": [ | ||
| "key" | ||
| ] | ||
| }, | ||
| "returns": {} | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| }, | ||
| "getWithVersion": { | ||
| "description": "Gets a single document and its version. First half of an update cycle.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "key": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "key" | ||
| ], | ||
| "required": [ | ||
| "key" | ||
| ] | ||
| }, | ||
| "returns": { | ||
| "$ref": "#/definitions/VersionedMaybeObject" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| }, | ||
| "setIfVersion": { | ||
| "description": "Updates document at key if version matches. Second half of an update cycle.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "key": { | ||
| "type": "string" | ||
| }, | ||
| "version": { | ||
| "$ref": "#/definitions/Version" | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "key", | ||
| "version", | ||
| "value" | ||
| ], | ||
| "required": [ | ||
| "key", | ||
| "version" | ||
| ] | ||
| }, | ||
| "returns": { | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| }, | ||
| "poll": { | ||
| "description": "Polls on updates to specified keys since specified versions.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "keysToVersions": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "array", | ||
| "items": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/Version" | ||
| } | ||
| ], | ||
| "minItems": 2, | ||
| "additionalItems": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/Version" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "keysToVersions" | ||
| ], | ||
| "required": [ | ||
| "keysToVersions" | ||
| ] | ||
| }, | ||
| "returns": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "array", | ||
| "items": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| ], | ||
| "minItems": 2, | ||
| "additionalItems": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Patch" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| }, | ||
| "create": { | ||
| "description": "Creates a document for a given key.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "key": { | ||
| "type": "string" | ||
| }, | ||
| "value": { | ||
| "anyOf": [ | ||
| { | ||
| "type": "object", | ||
| "properties": {} | ||
| }, | ||
| { | ||
| "type": "array", | ||
| "items": {} | ||
| }, | ||
| { | ||
| "type": [ | ||
| "null", | ||
| "string", | ||
| "number", | ||
| "boolean" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "key", | ||
| "value" | ||
| ], | ||
| "required": [ | ||
| "key", | ||
| "value" | ||
| ] | ||
| }, | ||
| "returns": { | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| }, | ||
| "remove": { | ||
| "description": "Removes the document at key.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "key": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "key" | ||
| ], | ||
| "required": [ | ||
| "key" | ||
| ] | ||
| }, | ||
| "returns": { | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| }, | ||
| "find": { | ||
| "description": "Find documents matching query.", | ||
| "type": "object", | ||
| "properties": { | ||
| "params": { | ||
| "type": "object", | ||
| "properties": { | ||
| "query": { | ||
| "$ref": "#/definitions/Query" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "query" | ||
| ], | ||
| "required": [ | ||
| "query" | ||
| ] | ||
| }, | ||
| "returns": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/Document" | ||
| } | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "params", | ||
| "returns" | ||
| ], | ||
| "required": [ | ||
| "params", | ||
| "returns" | ||
| ] | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "get", | ||
| "getWithVersion", | ||
| "setIfVersion", | ||
| "poll", | ||
| "create", | ||
| "remove", | ||
| "find" | ||
| ], | ||
| "required": [ | ||
| "create", | ||
| "find", | ||
| "get", | ||
| "getWithVersion", | ||
| "poll", | ||
| "remove", | ||
| "setIfVersion" | ||
| ] | ||
| } | ||
| } | ||
| }; | ||
| class InternalServerError extends Error { | ||
| constructor() { | ||
| super(...arguments); | ||
| this.name = 'InternalServerError'; | ||
| } | ||
| } | ||
| exports.InternalServerError = InternalServerError; | ||
| var Direction; | ||
| (function (Direction) { | ||
| Direction["ASC"] = "ASC"; | ||
| Direction["DESC"] = "DESC"; | ||
| })(Direction = exports.Direction || (exports.Direction = {})); | ||
| //# sourceMappingURL=interfaces.js.map |
| {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["src/interfaces.ts"],"names":[],"mappings":";;AAAA,iBAAiB;AACJ,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE,yCAAyC;IACpD,aAAa,EAAE;QACb,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP;oBACE,aAAa,EAAE,yDAAyD;oBACxE,MAAM,EAAE,QAAQ;oBAChB,QAAQ,EAAE,WAAW;oBACrB,aAAa,EAAE,IAAI;iBACpB;gBACD;oBACE,MAAM,EAAE;wBACN,QAAQ;wBACR,QAAQ;qBACT;iBACF;aACF;SACF;QACD,WAAW,EAAE;YACX,OAAO,EAAE;gBACP;oBACE,aAAa,EAAE,yDAAyD;oBACxE,MAAM,EAAE,QAAQ;oBAChB,QAAQ,EAAE,WAAW;oBACrB,aAAa,EAAE,IAAI;iBACpB;gBACD;oBACE,MAAM,EAAE;wBACN,QAAQ;wBACR,QAAQ;wBACR,SAAS;qBACV;iBACF;aACF;SACF;QACD,WAAW,EAAE;YACX,OAAO,EAAE;gBACP;oBACE,MAAM,EAAE,4BAA4B;iBACrC;gBACD;oBACE,MAAM,EAAE,+BAA+B;iBACxC;gBACD;oBACE,MAAM,EAAE,gCAAgC;iBACzC;gBACD;oBACE,MAAM,EAAE,6BAA6B;iBACtC;gBACD;oBACE,MAAM,EAAE,6BAA6B;iBACtC;gBACD;oBACE,MAAM,EAAE,6BAA6B;iBACtC;gBACD;oBACE,MAAM,EAAE,4BAA4B;iBACrC;aACF;SACF;QACD,eAAe,EAAE;YACf,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE;gBACZ,MAAM,EAAE;oBACN,MAAM,EAAE,QAAQ;iBACjB;aACF;YACD,eAAe,EAAE;gBACf,MAAM;aACP;YACD,UAAU,EAAE;gBACV,MAAM;aACP;SACF;QACD,cA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BACF;wBACD,SAAS,EAAE;4BACT,MAAM,EAAE,OAAO;4BACf,OAAO,EAAE;gCACP,MAAM,EAAE,wBAAwB;6BACjC;yBACF;qBACF;oBACD,eAAe,EAAE;wBACf,QAAQ;wBACR,SAAS;qBACV;oBACD,UAAU,EAAE;wBACV,QAAQ;wBACR,SAAS;qBACV;iBACF;aACF;YACD,eAAe,EAAE;gBACf,KAAK;gBACL,gBAAgB;gBAChB,cAAc;gBACd,MAAM;gBACN,QAAQ;gBACR,QAAQ;gBACR,MAAM;aACP;YACD,UAAU,EAAE;gBACV,QAAQ;gBACR,MAAM;gBACN,KAAK;gBACL,gBAAgB;gBAChB,MAAM;gBACN,QAAQ;gBACR,cAAc;aACf;SACF;KACF;CACF,CAAC;AAEF,MAAa,mBAAoB,SAAQ,KAAK;IAA9C;;QACkB,SAAI,GAAG,qBAAqB,CAAC;IAC/C,CAAC;CAAA;AAFD,kDAEC;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"} |
| { | ||
| "files": { | ||
| "common/config/rush/shrinkwrap.yaml": "4c2aabb8b96fc86180ef577520bd7bcab5a0b229" | ||
| }, | ||
| "arguments": "echo generated code " | ||
| } |
+1
-1
@@ -19,3 +19,3 @@ { | ||
| "name": "@binaris/shift-interfaces-node-client", | ||
| "version": "0.4.0-nudb.0", | ||
| "version": "0.4.0-nudb.1", | ||
| "scripts": { | ||
@@ -22,0 +22,0 @@ "lint": "echo generated code", |
+17
-14
@@ -9,2 +9,10 @@ // tslint:disable | ||
| InternalServerError, | ||
| BaseOperation, | ||
| AddOperation, | ||
| RemoveOperation, | ||
| ReplaceOperation, | ||
| MoveOperation, | ||
| CopyOperation, | ||
| TestOperation, | ||
| GetOperation, | ||
| Document, | ||
@@ -39,12 +47,6 @@ PathFilter, | ||
| DB, | ||
| AddOperation_of_any_end, | ||
| RemoveOperation, | ||
| ReplaceOperation_of_any_end, | ||
| MoveOperation, | ||
| CopyOperation, | ||
| TestOperation_of_any_end, | ||
| GetOperation_of_any_end, | ||
| Direction, | ||
| Comparable, | ||
| Equatable, | ||
| Operation, | ||
| Serializable, | ||
@@ -118,2 +120,10 @@ Filter, | ||
| export interface DB { | ||
@@ -671,8 +681,1 @@ get(ctx: ClientContext ,key: string): Promise<any>; | ||
+267
-222
@@ -38,2 +38,217 @@ // tslint:disable | ||
| }, | ||
| "Operation": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/AddOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/RemoveOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ReplaceOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/MoveOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/CopyOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/TestOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GetOperation" | ||
| } | ||
| ] | ||
| }, | ||
| "BaseOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "path" | ||
| ] | ||
| }, | ||
| "AddOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "add" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "RemoveOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "remove" | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "ReplaceOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "replace" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "MoveOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "move" | ||
| ] | ||
| }, | ||
| "from": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "from", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "from", | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "CopyOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "copy" | ||
| ] | ||
| }, | ||
| "from": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "from", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "from", | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "TestOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "test" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "GetOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "_get" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "Serializable": { | ||
@@ -978,3 +1193,3 @@ "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/AddOperation<any>" | ||
| "$ref": "#/definitions/AddOperation" | ||
| }, | ||
@@ -985,3 +1200,3 @@ { | ||
| { | ||
| "$ref": "#/definitions/ReplaceOperation<any>" | ||
| "$ref": "#/definitions/ReplaceOperation" | ||
| }, | ||
@@ -995,6 +1210,6 @@ { | ||
| { | ||
| "$ref": "#/definitions/TestOperation<any>" | ||
| "$ref": "#/definitions/TestOperation" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/GetOperation<any>" | ||
| "$ref": "#/definitions/GetOperation" | ||
| } | ||
@@ -1577,178 +1792,2 @@ ] | ||
| ] | ||
| }, | ||
| "AddOperation<any>": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "add" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "RemoveOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "remove" | ||
| ] | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "ReplaceOperation<any>": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "replace" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "MoveOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "move" | ||
| ] | ||
| }, | ||
| "from": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "from", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "from", | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "CopyOperation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "copy" | ||
| ] | ||
| }, | ||
| "from": { | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "from", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "from", | ||
| "op", | ||
| "path" | ||
| ] | ||
| }, | ||
| "TestOperation<any>": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "test" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| }, | ||
| "GetOperation<any>": { | ||
| "type": "object", | ||
| "properties": { | ||
| "op": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "_get" | ||
| ] | ||
| }, | ||
| "value": {}, | ||
| "path": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "propertyOrder": [ | ||
| "op", | ||
| "value", | ||
| "path" | ||
| ], | ||
| "required": [ | ||
| "op", | ||
| "path", | ||
| "value" | ||
| ] | ||
| } | ||
@@ -1771,2 +1810,4 @@ } | ||
| export type Operation = (AddOperation) | (RemoveOperation) | (ReplaceOperation) | (MoveOperation) | (CopyOperation) | (TestOperation) | (GetOperation); | ||
| export type Serializable = ({ }) | (Array<any>) | ((null) | (string) | (number) | (boolean)); | ||
@@ -1776,2 +1817,47 @@ | ||
| export interface BaseOperation { | ||
| readonly path: string; | ||
| } | ||
| export interface AddOperation { | ||
| readonly op: "add"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface RemoveOperation { | ||
| readonly op: "remove"; | ||
| readonly path: string; | ||
| } | ||
| export interface ReplaceOperation { | ||
| readonly op: "replace"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface MoveOperation { | ||
| readonly op: "move"; | ||
| readonly from: string; | ||
| readonly path: string; | ||
| } | ||
| export interface CopyOperation { | ||
| readonly op: "copy"; | ||
| readonly from: string; | ||
| readonly path: string; | ||
| } | ||
| export interface TestOperation { | ||
| readonly op: "test"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface GetOperation { | ||
| readonly op: "_get"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface Document { | ||
@@ -1901,3 +1987,3 @@ readonly key: string; | ||
| readonly operationId?: string; | ||
| readonly ops: Array<(AddOperation_of_any_end) | (RemoveOperation) | (ReplaceOperation_of_any_end) | (MoveOperation) | (CopyOperation) | (TestOperation_of_any_end) | (GetOperation_of_any_end)>; | ||
| readonly ops: Array<(AddOperation) | (RemoveOperation) | (ReplaceOperation) | (MoveOperation) | (CopyOperation) | (TestOperation) | (GetOperation)>; | ||
| } | ||
@@ -1942,42 +2028,1 @@ | ||
| export interface AddOperation_of_any_end { | ||
| readonly op: "add"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface RemoveOperation { | ||
| readonly op: "remove"; | ||
| readonly path: string; | ||
| } | ||
| export interface ReplaceOperation_of_any_end { | ||
| readonly op: "replace"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface MoveOperation { | ||
| readonly op: "move"; | ||
| readonly from: string; | ||
| readonly path: string; | ||
| } | ||
| export interface CopyOperation { | ||
| readonly op: "copy"; | ||
| readonly from: string; | ||
| readonly path: string; | ||
| } | ||
| export interface TestOperation_of_any_end { | ||
| readonly op: "test"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
| export interface GetOperation_of_any_end { | ||
| readonly op: "_get"; | ||
| readonly value: any; | ||
| readonly path: string; | ||
| } | ||
Sorry, the diff of this file is not supported yet
246504
258.68%17
183.33%6589
154.5%11
22.22%