123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- const general = {
- title: 'General request schema',
- type: 'object',
- properties: {
- op: {
- type: 'string',
- enum: ['connect', 'subscribe', 'unsubscribe', 'update']
- }
- },
- required: ['op']
- };
- const connect = {
- title: 'Connect operation schema',
- type: 'object',
- properties: {
- op: 'connect',
- applicationId: {
- type: 'string'
- },
- javascriptKey: {
- type: 'string'
- },
- masterKey: {
- type: 'string'
- },
- clientKey: {
- type: 'string'
- },
- windowsKey: {
- type: 'string'
- },
- restAPIKey: {
- type: 'string'
- },
- sessionToken: {
- type: 'string'
- },
- installationId: {
- type: 'string'
- }
- },
- required: ['op', 'applicationId'],
- additionalProperties: false
- };
- const subscribe = {
- title: 'Subscribe operation schema',
- type: 'object',
- properties: {
- op: 'subscribe',
- requestId: {
- type: 'number'
- },
- query: {
- title: 'Query field schema',
- type: 'object',
- properties: {
- className: {
- type: 'string'
- },
- where: {
- type: 'object'
- },
- keys: {
- type: 'array',
- items: {
- type: 'string'
- },
- minItems: 1,
- uniqueItems: true
- },
- watch: {
- type: 'array',
- items: {
- type: 'string'
- },
- minItems: 1,
- uniqueItems: true
- }
- },
- required: ['where', 'className'],
- additionalProperties: false
- },
- sessionToken: {
- type: 'string'
- }
- },
- required: ['op', 'requestId', 'query'],
- additionalProperties: false
- };
- const update = {
- title: 'Update operation schema',
- type: 'object',
- properties: {
- op: 'update',
- requestId: {
- type: 'number'
- },
- query: {
- title: 'Query field schema',
- type: 'object',
- properties: {
- className: {
- type: 'string'
- },
- where: {
- type: 'object'
- },
- keys: {
- type: 'array',
- items: {
- type: 'string'
- },
- minItems: 1,
- uniqueItems: true
- },
- watch: {
- type: 'array',
- items: {
- type: 'string'
- },
- minItems: 1,
- uniqueItems: true
- }
- },
- required: ['where', 'className'],
- additionalProperties: false
- },
- sessionToken: {
- type: 'string'
- }
- },
- required: ['op', 'requestId', 'query'],
- additionalProperties: false
- };
- const unsubscribe = {
- title: 'Unsubscribe operation schema',
- type: 'object',
- properties: {
- op: 'unsubscribe',
- requestId: {
- type: 'number'
- }
- },
- required: ['op', 'requestId'],
- additionalProperties: false
- };
- const RequestSchema = {
- general: general,
- connect: connect,
- subscribe: subscribe,
- update: update,
- unsubscribe: unsubscribe
- };
- var _default = exports.default = RequestSchema;
|