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;
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJnZW5lcmFsIiwidGl0bGUiLCJ0eXBlIiwicHJvcGVydGllcyIsIm9wIiwiZW51bSIsInJlcXVpcmVkIiwiY29ubmVjdCIsImFwcGxpY2F0aW9uSWQiLCJqYXZhc2NyaXB0S2V5IiwibWFzdGVyS2V5IiwiY2xpZW50S2V5Iiwid2luZG93c0tleSIsInJlc3RBUElLZXkiLCJzZXNzaW9uVG9rZW4iLCJpbnN0YWxsYXRpb25JZCIsImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiwic3Vic2NyaWJlIiwicmVxdWVzdElkIiwicXVlcnkiLCJjbGFzc05hbWUiLCJ3aGVyZSIsImtleXMiLCJpdGVtcyIsIm1pbkl0ZW1zIiwidW5pcXVlSXRlbXMiLCJ3YXRjaCIsInVwZGF0ZSIsInVuc3Vic2NyaWJlIiwiUmVxdWVzdFNjaGVtYSIsIl9kZWZhdWx0IiwiZXhwb3J0cyIsImRlZmF1bHQiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvTGl2ZVF1ZXJ5L1JlcXVlc3RTY2hlbWEuanMiXSwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgZ2VuZXJhbCA9IHtcbiAgdGl0bGU6ICdHZW5lcmFsIHJlcXVlc3Qgc2NoZW1hJyxcbiAgdHlwZTogJ29iamVjdCcsXG4gIHByb3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G4gIHR5cGU6ICdvYmplY3QnLFxuICBwcm9wZXJ0aWVzOiB7XG4gICAgb3A6ICdzdWJzY3JpYmUnLFxuICAgIHJlcXVlc3RJZDoge1xuICAgICAgdHlwZTogJ251bWJlcicsXG4gICAgfSxcbiAgICBxdWVyeToge1xuICAgICAgdGl0bGU6ICdRdWVyeSBmaWVsZCBzY2hlbWEnLFxuICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgIGNsYXNzTmFtZToge1xuICAgICAgICAgIHR5cGU6ICdzdHJpbmcnLFxuICAgICAgICB9LFxuICAgICAgICB3aGVyZToge1xuICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICB9LFxuICAgICAgICBrZXlzOiB7XG4gICAgICAgICAgdHlwZTogJ2FycmF5JyxcbiAgICAgICAgICBpdGVtczoge1xuICAgICAgICAgICAgdHlwZTogJ3N0cmluZycsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBtaW5JdGVtczogMSxcbiAgICAgICAgICB1bmlxdWVJdGVtczogdHJ1ZSxcbiAgICAgICAgfSxcbiAgICAgICAgd2F0Y2g6IHtcbiAgICAgICAgICB0eXBlOiAnYXJyYXknLFxuICAgICAgICAgIGl0ZW1zOiB7XG4gICAgICAgICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICAgICAgICB9LFxuICAgICAgICAgIG1pbkl0ZW1zOiAxLFxuICAgICAgICAgIHVuaXF1ZUl0ZW1zOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICAgIHJlcXVpcmVkOiBbJ3doZXJlJywgJ2NsYXNzTmFtZSddLFxuICAgICAgYWRkaXRpb25hbFByb3BlcnRpZXM6IGZhbHNlLFxuICAgIH0sXG4gICAgc2Vzc2lvblRva2VuOiB7XG4gICAgICB0eXBlOiAnc3RyaW5nJyxcbiAgICB9LFxuICB9LFxuICByZXF1aXJlZDogWydvcCcsICdyZXF1ZXN0SWQnLCAncX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