From 3f64ae465ae310658c8a2462fdc3410f596ed91c Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sun, 11 Apr 2021 01:32:33 +0200 Subject: [PATCH 1/5] add typescript --- package-lock.json | 40 +++++++++++++++++++++++++++++++++++++--- package.json | 10 +++++++--- tsconfig.json | 22 ++++++++++++++++++++++ 3 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 tsconfig.json diff --git a/package-lock.json b/package-lock.json index 2fa1258792..bf2a3f79f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4521,6 +4521,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true } } }, @@ -4694,6 +4700,14 @@ "ast-module-types": "^2.7.1", "node-source-walk": "^4.2.0", "typescript": "^3.9.7" + }, + "dependencies": { + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true + } } }, "dicer": { @@ -5980,6 +5994,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true } } }, @@ -8802,6 +8822,12 @@ "requires": { "has-flag": "^4.0.0" } + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true } } }, @@ -10389,6 +10415,14 @@ "ast-module-types": "^2.7.1", "node-source-walk": "^4.2.0", "typescript": "^3.9.7" + }, + "dependencies": { + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true + } } }, "ms": { @@ -12197,9 +12231,9 @@ } }, "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true }, "uc.micro": { diff --git a/package.json b/package.json index b675bef87c..4509b2cf79 100644 --- a/package.json +++ b/package.json @@ -91,13 +91,14 @@ "jsdoc-babel": "0.5.0", "lint-staged": "10.2.3", "madge": "4.0.2", - "mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter", "mock-files-adapter": "file:spec/dependencies/mock-files-adapter", + "mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter", "mongodb-runner": "4.8.1", "mongodb-version-list": "1.0.0", "node-fetch": "2.6.1", "nyc": "15.1.0", "prettier": "2.0.5", + "typescript": "4.2.4", "yaml": "1.10.0" }, "scripts": { @@ -124,7 +125,9 @@ "prettier": "prettier --write '{src,spec}/{**/*,*}.js'", "prepare": "npm run build", "postinstall": "node -p 'require(\"./postinstall.js\")()'", - "madge:circular": "node_modules/.bin/madge ./src --circular" + "madge:circular": "node_modules/.bin/madge ./src --circular", + "pretypes": "npm run build", + "types": "npx typescript" }, "engines": { "node": ">= 8" @@ -155,5 +158,6 @@ "eslint --fix --cache", "git add" ] - } + }, + "types": "./types/index.d.ts" } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000..b04ee88d73 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "include": ["lib/**/*"], + "compilerOptions": { + // Read JS files; normally they are ignored as source files + "allowJs": true, + // Generate d.ts files + "declaration": true, + // Only output d.ts files + "emitDeclarationOnly": true, + // Types destination directory; removing this would place the .d.ts files next to the .js files + "outDir": "types", + // Skip node_modules scan + "skipLibCheck": true, + "types": [], + }, + "exclude": [ + "node_modules", + "./node_modules", + "./node_modules/*", + "./node_modules/@types/node/index.d.ts", + ], +} \ No newline at end of file From ae48ce0ce24c64480f4ba9fbe2b6ffc22e4c740f Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sun, 11 Apr 2021 01:59:20 +0200 Subject: [PATCH 2/5] refactored OAuth1Client to fix typescript error --- src/Adapters/Auth/OAuth1Client.js | 444 +++++++++++++++--------------- 1 file changed, 222 insertions(+), 222 deletions(-) diff --git a/src/Adapters/Auth/OAuth1Client.js b/src/Adapters/Auth/OAuth1Client.js index f622852e9a..9c8e2de697 100644 --- a/src/Adapters/Auth/OAuth1Client.js +++ b/src/Adapters/Auth/OAuth1Client.js @@ -1,231 +1,231 @@ -var https = require('https'), - crypto = require('crypto'); -var Parse = require('parse/node').Parse; - -var OAuth = function (options) { - if (!options) { - throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'No options passed to OAuth'); +const https = require('https'); +const crypto = require('crypto'); +const Parse = require('parse/node').Parse; + +class OAuth { + constructor(options) { + if (!options) { + throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'No options passed to OAuth'); + } + this.consumer_key = options.consumer_key; + this.consumer_secret = options.consumer_secret; + this.auth_token = options.auth_token; + this.auth_token_secret = options.auth_token_secret; + this.host = options.host; + this.oauth_params = options.oauth_params || {}; + this.signatureMethod = 'HMAC-SHA1'; + this.version = '1.0'; } - this.consumer_key = options.consumer_key; - this.consumer_secret = options.consumer_secret; - this.auth_token = options.auth_token; - this.auth_token_secret = options.auth_token_secret; - this.host = options.host; - this.oauth_params = options.oauth_params || {}; -}; -OAuth.prototype.send = function (method, path, params, body) { - var request = this.buildRequest(method, path, params, body); - // Encode the body properly, the current Parse Implementation don't do it properly - return new Promise(function (resolve, reject) { - var httpRequest = https - .request(request, function (res) { - var data = ''; - res.on('data', function (chunk) { - data += chunk; - }); - res.on('end', function () { - data = JSON.parse(data); - resolve(data); + send(method, path, params, body) { + var request = this.buildRequest(method, path, params, body); + // Encode the body properly, the current Parse Implementation don't do it properly + return new Promise(function (resolve, reject) { + var httpRequest = https + .request(request, function (res) { + var data = ''; + res.on('data', function (chunk) { + data += chunk; + }); + res.on('end', function () { + data = JSON.parse(data); + resolve(data); + }); + }) + .on('error', function () { + reject('Failed to make an OAuth request'); }); - }) - .on('error', function () { - reject('Failed to make an OAuth request'); - }); - if (request.body) { - httpRequest.write(request.body); + if (request.body) { + httpRequest.write(request.body); + } + httpRequest.end(); + }); + }; + + buildRequest(method, path, params, body) { + if (path.indexOf('/') != 0) { + path = '/' + path; } - httpRequest.end(); - }); -}; - -OAuth.prototype.buildRequest = function (method, path, params, body) { - if (path.indexOf('/') != 0) { - path = '/' + path; - } - if (params && Object.keys(params).length > 0) { - path += '?' + OAuth.buildParameterString(params); - } - - var request = { - host: this.host, - path: path, - method: method.toUpperCase(), + if (params && Object.keys(params).length > 0) { + path += '?' + OAuth.buildParameterString(params); + } + + var request = { + host: this.host, + path: path, + method: method.toUpperCase(), + }; + + var oauth_params = this.oauth_params || {}; + oauth_params.oauth_consumer_key = this.consumer_key; + if (this.auth_token) { + oauth_params['oauth_token'] = this.auth_token; + } + + request = OAuth.signRequest(request, oauth_params, this.consumer_secret, this.auth_token_secret); + + if (body && Object.keys(body).length > 0) { + request.body = OAuth.buildParameterString(body); + } + return request; }; - - var oauth_params = this.oauth_params || {}; - oauth_params.oauth_consumer_key = this.consumer_key; - if (this.auth_token) { - oauth_params['oauth_token'] = this.auth_token; - } - - request = OAuth.signRequest(request, oauth_params, this.consumer_secret, this.auth_token_secret); - - if (body && Object.keys(body).length > 0) { - request.body = OAuth.buildParameterString(body); - } - return request; -}; - -OAuth.prototype.get = function (path, params) { - return this.send('GET', path, params); -}; - -OAuth.prototype.post = function (path, params, body) { - return this.send('POST', path, params, body); -}; - -/* - Proper string %escape encoding -*/ -OAuth.encode = function (str) { - // discuss at: http://phpjs.org/functions/rawurlencode/ - // original by: Brett Zamir (http://brett-zamir.me) - // input by: travc - // input by: Brett Zamir (http://brett-zamir.me) - // input by: Michael Grier - // input by: Ratheous - // bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // bugfixed by: Brett Zamir (http://brett-zamir.me) - // bugfixed by: Joris - // reimplemented by: Brett Zamir (http://brett-zamir.me) - // reimplemented by: Brett Zamir (http://brett-zamir.me) - // note: This reflects PHP 5.3/6.0+ behavior - // note: Please be aware that this function expects to encode into UTF-8 encoded strings, as found on - // note: pages served as UTF-8 - // example 1: rawurlencode('Kevin van Zonneveld!'); - // returns 1: 'Kevin%20van%20Zonneveld%21' - // example 2: rawurlencode('http://kevin.vanzonneveld.net/'); - // returns 2: 'http%3A%2F%2Fkevin.vanzonneveld.net%2F' - // example 3: rawurlencode('http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a'); - // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a' - - str = (str + '').toString(); - - // Tilde should be allowed unescaped in future versions of PHP (as reflected below), but if you want to reflect current - // PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following. - return encodeURIComponent(str) - .replace(/!/g, '%21') - .replace(/'/g, '%27') - .replace(/\(/g, '%28') - .replace(/\)/g, '%29') - .replace(/\*/g, '%2A'); -}; - -OAuth.signatureMethod = 'HMAC-SHA1'; -OAuth.version = '1.0'; - -/* - Generate a nonce -*/ -OAuth.nonce = function () { - var text = ''; - var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - - for (var i = 0; i < 30; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); - - return text; -}; - -OAuth.buildParameterString = function (obj) { - // Sort keys and encode values - if (obj) { - var keys = Object.keys(obj).sort(); - - // Map key=value, join them by & - return keys + + get(path, params) { + return this.send('GET', path, params); + }; + + post(path, params, body) { + return this.send('POST', path, params, body); + }; + + /* + Proper string %escape encoding + */ + static encode(str) { + // discuss at: http://phpjs.org/functions/rawurlencode/ + // original by: Brett Zamir (http://brett-zamir.me) + // input by: travc + // input by: Brett Zamir (http://brett-zamir.me) + // input by: Michael Grier + // input by: Ratheous + // bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // bugfixed by: Brett Zamir (http://brett-zamir.me) + // bugfixed by: Joris + // reimplemented by: Brett Zamir (http://brett-zamir.me) + // reimplemented by: Brett Zamir (http://brett-zamir.me) + // note: This reflects PHP 5.3/6.0+ behavior + // note: Please be aware that this function expects to encode into UTF-8 encoded strings, as found on + // note: pages served as UTF-8 + // example 1: rawurlencode('Kevin van Zonneveld!'); + // returns 1: 'Kevin%20van%20Zonneveld%21' + // example 2: rawurlencode('http://kevin.vanzonneveld.net/'); + // returns 2: 'http%3A%2F%2Fkevin.vanzonneveld.net%2F' + // example 3: rawurlencode('http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a'); + // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a' + + str = (str + '').toString(); + + // Tilde should be allowed unescaped in future versions of PHP (as reflected below), but if you want to reflect current + // PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following. + return encodeURIComponent(str) + .replace(/!/g, '%21') + .replace(/'/g, '%27') + .replace(/\(/g, '%28') + .replace(/\)/g, '%29') + .replace(/\*/g, '%2A'); + }; + + /* + Generate a nonce + */ + static nonce() { + var text = ''; + var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + for (var i = 0; i < 30; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); + + return text; + }; + + static buildParameterString(obj) { + // Sort keys and encode values + if (obj) { + var keys = Object.keys(obj).sort(); + + // Map key=value, join them by & + return keys + .map(function (key) { + return key + '=' + OAuth.encode(obj[key]); + }) + .join('&'); + } + + return ''; + }; + + /* + Build the signature string from the object + */ + static buildSignatureString(method, url, parameters) { + return [method.toUpperCase(), OAuth.encode(url), OAuth.encode(parameters)].join('&'); + }; + + /* + Retuns encoded HMAC-SHA1 from key and text + */ + static signature(text, key) { + crypto = require('crypto'); + return OAuth.encode(crypto.createHmac('sha1', key).update(text).digest('base64')); + }; + + static signRequest(request, oauth_parameters, consumer_secret, auth_token_secret) { + oauth_parameters = oauth_parameters || {}; + + // Set default values + if (!oauth_parameters.oauth_nonce) { + oauth_parameters.oauth_nonce = OAuth.nonce(); + } + if (!oauth_parameters.oauth_timestamp) { + oauth_parameters.oauth_timestamp = Math.floor(new Date().getTime() / 1000); + } + if (!oauth_parameters.oauth_signature_method) { + oauth_parameters.oauth_signature_method = OAuth.signatureMethod; + } + if (!oauth_parameters.oauth_version) { + oauth_parameters.oauth_version = OAuth.version; + } + + if (!auth_token_secret) { + auth_token_secret = ''; + } + // Force GET method if unset + if (!request.method) { + request.method = 'GET'; + } + + // Collect all the parameters in one signatureParameters object + var signatureParams = {}; + var parametersToMerge = [request.params, request.body, oauth_parameters]; + for (var i in parametersToMerge) { + var parameters = parametersToMerge[i]; + for (var k in parameters) { + signatureParams[k] = parameters[k]; + } + } + + // Create a string based on the parameters + var parameterString = OAuth.buildParameterString(signatureParams); + + // Build the signature string + var url = 'https://' + request.host + '' + request.path; + + var signatureString = OAuth.buildSignatureString(request.method, url, parameterString); + // Hash the signature string + var signatureKey = [OAuth.encode(consumer_secret), OAuth.encode(auth_token_secret)].join('&'); + + var signature = OAuth.signature(signatureString, signatureKey); + + // Set the signature in the params + oauth_parameters.oauth_signature = signature; + if (!request.headers) { + request.headers = {}; + } + + // Set the authorization header + var authHeader = Object.keys(oauth_parameters) + .sort() .map(function (key) { - return key + '=' + OAuth.encode(obj[key]); + var value = oauth_parameters[key]; + return key + '="' + value + '"'; }) - .join('&'); - } - - return ''; -}; - -/* - Build the signature string from the object -*/ - -OAuth.buildSignatureString = function (method, url, parameters) { - return [method.toUpperCase(), OAuth.encode(url), OAuth.encode(parameters)].join('&'); -}; - -/* - Retuns encoded HMAC-SHA1 from key and text -*/ -OAuth.signature = function (text, key) { - crypto = require('crypto'); - return OAuth.encode(crypto.createHmac('sha1', key).update(text).digest('base64')); -}; - -OAuth.signRequest = function (request, oauth_parameters, consumer_secret, auth_token_secret) { - oauth_parameters = oauth_parameters || {}; - - // Set default values - if (!oauth_parameters.oauth_nonce) { - oauth_parameters.oauth_nonce = OAuth.nonce(); - } - if (!oauth_parameters.oauth_timestamp) { - oauth_parameters.oauth_timestamp = Math.floor(new Date().getTime() / 1000); - } - if (!oauth_parameters.oauth_signature_method) { - oauth_parameters.oauth_signature_method = OAuth.signatureMethod; - } - if (!oauth_parameters.oauth_version) { - oauth_parameters.oauth_version = OAuth.version; - } - - if (!auth_token_secret) { - auth_token_secret = ''; - } - // Force GET method if unset - if (!request.method) { - request.method = 'GET'; - } - - // Collect all the parameters in one signatureParameters object - var signatureParams = {}; - var parametersToMerge = [request.params, request.body, oauth_parameters]; - for (var i in parametersToMerge) { - var parameters = parametersToMerge[i]; - for (var k in parameters) { - signatureParams[k] = parameters[k]; - } - } - - // Create a string based on the parameters - var parameterString = OAuth.buildParameterString(signatureParams); - - // Build the signature string - var url = 'https://' + request.host + '' + request.path; - - var signatureString = OAuth.buildSignatureString(request.method, url, parameterString); - // Hash the signature string - var signatureKey = [OAuth.encode(consumer_secret), OAuth.encode(auth_token_secret)].join('&'); - - var signature = OAuth.signature(signatureString, signatureKey); - - // Set the signature in the params - oauth_parameters.oauth_signature = signature; - if (!request.headers) { - request.headers = {}; - } - - // Set the authorization header - var authHeader = Object.keys(oauth_parameters) - .sort() - .map(function (key) { - var value = oauth_parameters[key]; - return key + '="' + value + '"'; - }) - .join(', '); - - request.headers.Authorization = 'OAuth ' + authHeader; - - // Set the content type header - request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - return request; -}; + .join(', '); + + request.headers.Authorization = 'OAuth ' + authHeader; + + // Set the content type header + request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; + return request; + }; +} module.exports = OAuth; From c0aa6ea5a35d19a85dab3e40161a9f9a2e95409e Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sun, 11 Apr 2021 02:08:37 +0200 Subject: [PATCH 3/5] fix lint --- src/Adapters/Auth/OAuth1Client.js | 91 ++++++++++++++++--------------- 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/src/Adapters/Auth/OAuth1Client.js b/src/Adapters/Auth/OAuth1Client.js index 9c8e2de697..7e24856e89 100644 --- a/src/Adapters/Auth/OAuth1Client.js +++ b/src/Adapters/Auth/OAuth1Client.js @@ -40,8 +40,8 @@ class OAuth { } httpRequest.end(); }); - }; - + } + buildRequest(method, path, params, body) { if (path.indexOf('/') != 0) { path = '/' + path; @@ -49,35 +49,40 @@ class OAuth { if (params && Object.keys(params).length > 0) { path += '?' + OAuth.buildParameterString(params); } - + var request = { host: this.host, path: path, method: method.toUpperCase(), }; - + var oauth_params = this.oauth_params || {}; oauth_params.oauth_consumer_key = this.consumer_key; if (this.auth_token) { oauth_params['oauth_token'] = this.auth_token; } - - request = OAuth.signRequest(request, oauth_params, this.consumer_secret, this.auth_token_secret); - + + request = OAuth.signRequest( + request, + oauth_params, + this.consumer_secret, + this.auth_token_secret + ); + if (body && Object.keys(body).length > 0) { request.body = OAuth.buildParameterString(body); } return request; - }; - + } + get(path, params) { return this.send('GET', path, params); - }; - + } + post(path, params, body) { return this.send('POST', path, params, body); - }; - + } + /* Proper string %escape encoding */ @@ -102,9 +107,9 @@ class OAuth { // returns 2: 'http%3A%2F%2Fkevin.vanzonneveld.net%2F' // example 3: rawurlencode('http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a'); // returns 3: 'http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a' - + str = (str + '').toString(); - + // Tilde should be allowed unescaped in future versions of PHP (as reflected below), but if you want to reflect current // PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following. return encodeURIComponent(str) @@ -113,25 +118,26 @@ class OAuth { .replace(/\(/g, '%28') .replace(/\)/g, '%29') .replace(/\*/g, '%2A'); - }; - + } + /* Generate a nonce */ static nonce() { var text = ''; var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; - - for (var i = 0; i < 30; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); - + + for (var i = 0; i < 30; i++) + text += possible.charAt(Math.floor(Math.random() * possible.length)); + return text; - }; - + } + static buildParameterString(obj) { // Sort keys and encode values if (obj) { var keys = Object.keys(obj).sort(); - + // Map key=value, join them by & return keys .map(function (key) { @@ -139,28 +145,27 @@ class OAuth { }) .join('&'); } - + return ''; - }; - + } + /* Build the signature string from the object */ static buildSignatureString(method, url, parameters) { return [method.toUpperCase(), OAuth.encode(url), OAuth.encode(parameters)].join('&'); - }; - + } + /* Retuns encoded HMAC-SHA1 from key and text */ static signature(text, key) { - crypto = require('crypto'); return OAuth.encode(crypto.createHmac('sha1', key).update(text).digest('base64')); - }; - + } + static signRequest(request, oauth_parameters, consumer_secret, auth_token_secret) { oauth_parameters = oauth_parameters || {}; - + // Set default values if (!oauth_parameters.oauth_nonce) { oauth_parameters.oauth_nonce = OAuth.nonce(); @@ -174,7 +179,7 @@ class OAuth { if (!oauth_parameters.oauth_version) { oauth_parameters.oauth_version = OAuth.version; } - + if (!auth_token_secret) { auth_token_secret = ''; } @@ -182,7 +187,7 @@ class OAuth { if (!request.method) { request.method = 'GET'; } - + // Collect all the parameters in one signatureParameters object var signatureParams = {}; var parametersToMerge = [request.params, request.body, oauth_parameters]; @@ -192,25 +197,25 @@ class OAuth { signatureParams[k] = parameters[k]; } } - + // Create a string based on the parameters var parameterString = OAuth.buildParameterString(signatureParams); - + // Build the signature string var url = 'https://' + request.host + '' + request.path; - + var signatureString = OAuth.buildSignatureString(request.method, url, parameterString); // Hash the signature string var signatureKey = [OAuth.encode(consumer_secret), OAuth.encode(auth_token_secret)].join('&'); - + var signature = OAuth.signature(signatureString, signatureKey); - + // Set the signature in the params oauth_parameters.oauth_signature = signature; if (!request.headers) { request.headers = {}; } - + // Set the authorization header var authHeader = Object.keys(oauth_parameters) .sort() @@ -219,13 +224,13 @@ class OAuth { return key + '="' + value + '"'; }) .join(', '); - + request.headers.Authorization = 'OAuth ' + authHeader; - + // Set the content type header request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; return request; - }; + } } module.exports = OAuth; From 17e9866cda8dca6503d93cb30e1e1101514de2cf Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sun, 11 Apr 2021 02:11:06 +0200 Subject: [PATCH 4/5] add types --- types/AccountLockout.d.ts | 54 + types/Adapters/AdapterLoader.d.ts | 26 + .../Adapters/Analytics/AnalyticsAdapter.d.ts | 22 + types/Adapters/Auth/AuthAdapter.d.ts | 7 + types/Adapters/Auth/OAuth1Client.d.ts | 26 + types/Adapters/Auth/apple.d.ts | 2 + types/Adapters/Auth/facebook.d.ts | 2 + types/Adapters/Auth/gcenter.d.ts | 2 + types/Adapters/Auth/github.d.ts | 2 + types/Adapters/Auth/google.d.ts | 2 + types/Adapters/Auth/gpgames.d.ts | 2 + types/Adapters/Auth/httpsRequest.d.ts | 2 + types/Adapters/Auth/index.d.ts | 13 + types/Adapters/Auth/instagram.d.ts | 2 + types/Adapters/Auth/janraincapture.d.ts | 2 + types/Adapters/Auth/janrainengage.d.ts | 2 + types/Adapters/Auth/keycloak.d.ts | 2 + types/Adapters/Auth/ldap.d.ts | 2 + types/Adapters/Auth/line.d.ts | 2 + types/Adapters/Auth/linkedin.d.ts | 2 + types/Adapters/Auth/meetup.d.ts | 2 + types/Adapters/Auth/microsoft.d.ts | 2 + types/Adapters/Auth/oauth2.d.ts | 2 + types/Adapters/Auth/phantauth.d.ts | 2 + types/Adapters/Auth/qq.d.ts | 3 + types/Adapters/Auth/spotify.d.ts | 2 + types/Adapters/Auth/twitter.d.ts | 3 + types/Adapters/Auth/vkontakte.d.ts | 2 + types/Adapters/Auth/wechat.d.ts | 2 + types/Adapters/Auth/weibo.d.ts | 2 + types/Adapters/Cache/CacheAdapter.d.ts | 31 + types/Adapters/Cache/InMemoryCache.d.ts | 14 + .../Adapters/Cache/InMemoryCacheAdapter.d.ts | 12 + types/Adapters/Cache/LRUCache.d.ts | 14 + types/Adapters/Cache/NullCacheAdapter.d.ts | 9 + types/Adapters/Cache/RedisCacheAdapter.d.ts | 16 + types/Adapters/Cache/SchemaCache.d.ts | 14 + types/Adapters/Email/MailAdapter.d.ts | 21 + types/Adapters/Files/FilesAdapter.d.ts | 48 + types/Adapters/Files/GridFSBucketAdapter.d.ts | 27 + types/Adapters/Files/GridStoreAdapter.d.ts | 26 + types/Adapters/Logger/LoggerAdapter.d.ts | 22 + types/Adapters/Logger/WinstonLogger.d.ts | 14 + .../Adapters/Logger/WinstonLoggerAdapter.d.ts | 8 + .../Adapters/MessageQueue/EventEmitterMQ.d.ts | 21 + types/Adapters/PubSub/EventEmitterPubSub.d.ts | 22 + types/Adapters/PubSub/PubSubAdapter.d.ts | 19 + types/Adapters/PubSub/RedisPubSub.d.ts | 14 + types/Adapters/Push/PushAdapter.d.ts | 23 + .../Storage/Mongo/MongoCollection.d.ts | 57 + .../Storage/Mongo/MongoSchemaCollection.d.ts | 53 + .../Storage/Mongo/MongoStorageAdapter.d.ts | 80 ++ .../Storage/Mongo/MongoTransform.d.ts | 39 + .../Storage/Postgres/PostgresClient.d.ts | 5 + .../Postgres/PostgresConfigParser.d.ts | 18 + .../Postgres/PostgresStorageAdapter.d.ts | 127 ++ .../Adapters/Storage/Postgres/sql/index.d.ts | 13 + types/Adapters/Storage/StorageAdapter.d.ts | 0 types/Adapters/WebSocketServer/WSAdapter.d.ts | 11 + .../Adapters/WebSocketServer/WSSAdapter.d.ts | 28 + types/Auth.d.ts | 48 + types/ClientSDK.d.ts | 6 + types/Config.d.ts | 67 + types/Controllers/AdaptableController.d.ts | 13 + types/Controllers/AnalyticsController.d.ts | 19 + types/Controllers/CacheController.d.ts | 31 + types/Controllers/DatabaseController.d.ts | 77 ++ types/Controllers/FilesController.d.ts | 21 + types/Controllers/HooksController.d.ts | 24 + types/Controllers/LiveQueryController.d.ts | 15 + types/Controllers/LoggerController.d.ts | 50 + types/Controllers/ParseGraphQLController.d.ts | 23 + types/Controllers/PushController.d.ts | 32 + types/Controllers/SchemaController.d.ts | 347 +++++ types/Controllers/UserController.d.ts | 46 + types/Controllers/index.d.ts | 47 + types/Controllers/types.d.ts | 0 types/Deprecator/Deprecations.d.ts | 376 ++++++ types/Deprecator/Deprecator.d.ts | 33 + types/GraphQL/ParseGraphQLSchema.d.ts | 56 + types/GraphQL/ParseGraphQLServer.d.ts | 24 + types/GraphQL/helpers/objectsMutations.d.ts | 4 + types/GraphQL/helpers/objectsQueries.d.ts | 18 + .../loaders/defaultGraphQLMutations.d.ts | 2 + .../loaders/defaultGraphQLQueries.d.ts | 2 + .../GraphQL/loaders/defaultGraphQLTypes.d.ts | 226 ++++ types/GraphQL/loaders/defaultRelaySchema.d.ts | 6 + types/GraphQL/loaders/filesMutations.d.ts | 5 + types/GraphQL/loaders/functionsMutations.d.ts | 2 + .../GraphQL/loaders/parseClassMutations.d.ts | 2 + types/GraphQL/loaders/parseClassQueries.d.ts | 2 + types/GraphQL/loaders/parseClassTypes.d.ts | 6 + types/GraphQL/loaders/schemaDirectives.d.ts | 3 + types/GraphQL/loaders/schemaMutations.d.ts | 2 + types/GraphQL/loaders/schemaQueries.d.ts | 3 + types/GraphQL/loaders/schemaTypes.d.ts | 47 + types/GraphQL/loaders/usersMutations.d.ts | 2 + types/GraphQL/loaders/usersQueries.d.ts | 9 + types/GraphQL/parseGraphQLUtils.d.ts | 9 + types/GraphQL/transformers/className.d.ts | 2 + .../GraphQL/transformers/constraintType.d.ts | 2 + types/GraphQL/transformers/inputType.d.ts | 2 + types/GraphQL/transformers/mutation.d.ts | 6 + types/GraphQL/transformers/outputType.d.ts | 2 + types/GraphQL/transformers/query.d.ts | 3 + types/GraphQL/transformers/schemaFields.d.ts | 7 + types/KeyPromiseQueue.d.ts | 7 + types/LiveQuery/Client.d.ts | 26 + types/LiveQuery/Id.d.ts | 8 + types/LiveQuery/ParseCloudCodePublisher.d.ts | 8 + types/LiveQuery/ParseLiveQueryServer.d.ts | 30 + types/LiveQuery/ParsePubSub.d.ts | 5 + types/LiveQuery/ParseWebSocketServer.d.ts | 14 + types/LiveQuery/QueryTools.d.ts | 12 + types/LiveQuery/RequestSchema.d.ts | 206 +++ types/LiveQuery/SessionTokenCache.d.ts | 6 + types/LiveQuery/Subscription.d.ts | 11 + types/LiveQuery/equalObjects.d.ts | 6 + types/Options/Definitions.d.ts | 1197 +++++++++++++++++ types/Options/docs.d.ts | 0 types/Options/index.d.ts | 1 + types/Options/parsers.d.ts | 7 + types/Page.d.ts | 27 + types/ParseMessageQueue.d.ts | 5 + types/ParseServer.d.ts | 50 + types/ParseServerRESTController.d.ts | 12 + types/PromiseRouter.d.ts | 17 + types/Push/PushQueue.d.ts | 9 + types/Push/PushWorker.d.ts | 17 + types/Push/utils.d.ts | 14 + types/RestQuery.d.ts | 39 + types/RestWrite.d.ts | 103 ++ types/Routers/AggregateRouter.d.ts | 13 + types/Routers/AnalyticsRouter.d.ts | 7 + types/Routers/AudiencesRouter.d.ts | 11 + types/Routers/ClassesRouter.d.ts | 30 + types/Routers/CloudCodeRouter.d.ts | 12 + types/Routers/FeaturesRouter.d.ts | 7 + types/Routers/FilesRouter.d.ts | 10 + types/Routers/FunctionsRouter.d.ts | 13 + types/Routers/GlobalConfigRouter.d.ts | 10 + types/Routers/GraphQLRouter.d.ts | 14 + types/Routers/HooksRouter.d.ts | 16 + types/Routers/IAPValidationRouter.d.ts | 10 + types/Routers/InstallationsRouter.d.ts | 10 + types/Routers/LogsRouter.d.ts | 10 + types/Routers/PagesRouter.d.ts | 176 +++ types/Routers/PublicAPIRouter.d.ts | 28 + types/Routers/PurgeRouter.d.ts | 9 + types/Routers/PushRouter.d.ts | 15 + types/Routers/RolesRouter.d.ts | 9 + types/Routers/SchemasRouter.d.ts | 7 + types/Routers/SecurityRouter.d.ts | 9 + types/Routers/SessionsRouter.d.ts | 11 + types/Routers/UsersRouter.d.ts | 31 + types/Security/Check.d.ts | 55 + types/Security/CheckGroup.d.ts | 26 + .../CheckGroups/CheckGroupDatabase.d.ts | 15 + .../CheckGroups/CheckGroupServerConfig.d.ts | 15 + types/Security/CheckGroups/CheckGroups.d.ts | 3 + types/Security/CheckRunner.d.ts | 80 ++ types/StatusHandler.d.ts | 17 + types/TestUtils.d.ts | 6 + types/Utils.d.ts | 91 ++ types/batch.d.ts | 2 + types/cache.d.ts | 5 + .../definitions/parse-live-query-server.d.ts | 60 + types/cli/definitions/parse-server.d.ts | 403 ++++++ types/cli/parse-live-query-server.d.ts | 1 + types/cli/parse-server.d.ts | 1 + types/cli/utils/commander.d.ts | 4 + types/cli/utils/runner.d.ts | 8 + types/cloud-code/HTTPResponse.d.ts | 18 + types/cloud-code/Parse.Cloud.d.ts | 65 + types/cloud-code/httpRequest.d.ts | 50 + types/cryptoUtils.d.ts | 6 + types/defaults.d.ts | 12 + types/deprecated.d.ts | 2 + types/index.d.ts | 22 + types/logger.d.ts | 7 + types/middlewares.d.ts | 15 + types/password.d.ts | 2 + types/request.d.ts | 44 + types/requiredParameter.d.ts | 3 + types/rest.d.ts | 5 + types/triggers.d.ts | 72 + types/vendor/mongodbUrl.d.ts | 25 + 187 files changed, 6178 insertions(+) create mode 100644 types/AccountLockout.d.ts create mode 100644 types/Adapters/AdapterLoader.d.ts create mode 100644 types/Adapters/Analytics/AnalyticsAdapter.d.ts create mode 100644 types/Adapters/Auth/AuthAdapter.d.ts create mode 100644 types/Adapters/Auth/OAuth1Client.d.ts create mode 100644 types/Adapters/Auth/apple.d.ts create mode 100644 types/Adapters/Auth/facebook.d.ts create mode 100644 types/Adapters/Auth/gcenter.d.ts create mode 100644 types/Adapters/Auth/github.d.ts create mode 100644 types/Adapters/Auth/google.d.ts create mode 100644 types/Adapters/Auth/gpgames.d.ts create mode 100644 types/Adapters/Auth/httpsRequest.d.ts create mode 100644 types/Adapters/Auth/index.d.ts create mode 100644 types/Adapters/Auth/instagram.d.ts create mode 100644 types/Adapters/Auth/janraincapture.d.ts create mode 100644 types/Adapters/Auth/janrainengage.d.ts create mode 100644 types/Adapters/Auth/keycloak.d.ts create mode 100644 types/Adapters/Auth/ldap.d.ts create mode 100644 types/Adapters/Auth/line.d.ts create mode 100644 types/Adapters/Auth/linkedin.d.ts create mode 100644 types/Adapters/Auth/meetup.d.ts create mode 100644 types/Adapters/Auth/microsoft.d.ts create mode 100644 types/Adapters/Auth/oauth2.d.ts create mode 100644 types/Adapters/Auth/phantauth.d.ts create mode 100644 types/Adapters/Auth/qq.d.ts create mode 100644 types/Adapters/Auth/spotify.d.ts create mode 100644 types/Adapters/Auth/twitter.d.ts create mode 100644 types/Adapters/Auth/vkontakte.d.ts create mode 100644 types/Adapters/Auth/wechat.d.ts create mode 100644 types/Adapters/Auth/weibo.d.ts create mode 100644 types/Adapters/Cache/CacheAdapter.d.ts create mode 100644 types/Adapters/Cache/InMemoryCache.d.ts create mode 100644 types/Adapters/Cache/InMemoryCacheAdapter.d.ts create mode 100644 types/Adapters/Cache/LRUCache.d.ts create mode 100644 types/Adapters/Cache/NullCacheAdapter.d.ts create mode 100644 types/Adapters/Cache/RedisCacheAdapter.d.ts create mode 100644 types/Adapters/Cache/SchemaCache.d.ts create mode 100644 types/Adapters/Email/MailAdapter.d.ts create mode 100644 types/Adapters/Files/FilesAdapter.d.ts create mode 100644 types/Adapters/Files/GridFSBucketAdapter.d.ts create mode 100644 types/Adapters/Files/GridStoreAdapter.d.ts create mode 100644 types/Adapters/Logger/LoggerAdapter.d.ts create mode 100644 types/Adapters/Logger/WinstonLogger.d.ts create mode 100644 types/Adapters/Logger/WinstonLoggerAdapter.d.ts create mode 100644 types/Adapters/MessageQueue/EventEmitterMQ.d.ts create mode 100644 types/Adapters/PubSub/EventEmitterPubSub.d.ts create mode 100644 types/Adapters/PubSub/PubSubAdapter.d.ts create mode 100644 types/Adapters/PubSub/RedisPubSub.d.ts create mode 100644 types/Adapters/Push/PushAdapter.d.ts create mode 100644 types/Adapters/Storage/Mongo/MongoCollection.d.ts create mode 100644 types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts create mode 100644 types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts create mode 100644 types/Adapters/Storage/Mongo/MongoTransform.d.ts create mode 100644 types/Adapters/Storage/Postgres/PostgresClient.d.ts create mode 100644 types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts create mode 100644 types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts create mode 100644 types/Adapters/Storage/Postgres/sql/index.d.ts create mode 100644 types/Adapters/Storage/StorageAdapter.d.ts create mode 100644 types/Adapters/WebSocketServer/WSAdapter.d.ts create mode 100644 types/Adapters/WebSocketServer/WSSAdapter.d.ts create mode 100644 types/Auth.d.ts create mode 100644 types/ClientSDK.d.ts create mode 100644 types/Config.d.ts create mode 100644 types/Controllers/AdaptableController.d.ts create mode 100644 types/Controllers/AnalyticsController.d.ts create mode 100644 types/Controllers/CacheController.d.ts create mode 100644 types/Controllers/DatabaseController.d.ts create mode 100644 types/Controllers/FilesController.d.ts create mode 100644 types/Controllers/HooksController.d.ts create mode 100644 types/Controllers/LiveQueryController.d.ts create mode 100644 types/Controllers/LoggerController.d.ts create mode 100644 types/Controllers/ParseGraphQLController.d.ts create mode 100644 types/Controllers/PushController.d.ts create mode 100644 types/Controllers/SchemaController.d.ts create mode 100644 types/Controllers/UserController.d.ts create mode 100644 types/Controllers/index.d.ts create mode 100644 types/Controllers/types.d.ts create mode 100644 types/Deprecator/Deprecations.d.ts create mode 100644 types/Deprecator/Deprecator.d.ts create mode 100644 types/GraphQL/ParseGraphQLSchema.d.ts create mode 100644 types/GraphQL/ParseGraphQLServer.d.ts create mode 100644 types/GraphQL/helpers/objectsMutations.d.ts create mode 100644 types/GraphQL/helpers/objectsQueries.d.ts create mode 100644 types/GraphQL/loaders/defaultGraphQLMutations.d.ts create mode 100644 types/GraphQL/loaders/defaultGraphQLQueries.d.ts create mode 100644 types/GraphQL/loaders/defaultGraphQLTypes.d.ts create mode 100644 types/GraphQL/loaders/defaultRelaySchema.d.ts create mode 100644 types/GraphQL/loaders/filesMutations.d.ts create mode 100644 types/GraphQL/loaders/functionsMutations.d.ts create mode 100644 types/GraphQL/loaders/parseClassMutations.d.ts create mode 100644 types/GraphQL/loaders/parseClassQueries.d.ts create mode 100644 types/GraphQL/loaders/parseClassTypes.d.ts create mode 100644 types/GraphQL/loaders/schemaDirectives.d.ts create mode 100644 types/GraphQL/loaders/schemaMutations.d.ts create mode 100644 types/GraphQL/loaders/schemaQueries.d.ts create mode 100644 types/GraphQL/loaders/schemaTypes.d.ts create mode 100644 types/GraphQL/loaders/usersMutations.d.ts create mode 100644 types/GraphQL/loaders/usersQueries.d.ts create mode 100644 types/GraphQL/parseGraphQLUtils.d.ts create mode 100644 types/GraphQL/transformers/className.d.ts create mode 100644 types/GraphQL/transformers/constraintType.d.ts create mode 100644 types/GraphQL/transformers/inputType.d.ts create mode 100644 types/GraphQL/transformers/mutation.d.ts create mode 100644 types/GraphQL/transformers/outputType.d.ts create mode 100644 types/GraphQL/transformers/query.d.ts create mode 100644 types/GraphQL/transformers/schemaFields.d.ts create mode 100644 types/KeyPromiseQueue.d.ts create mode 100644 types/LiveQuery/Client.d.ts create mode 100644 types/LiveQuery/Id.d.ts create mode 100644 types/LiveQuery/ParseCloudCodePublisher.d.ts create mode 100644 types/LiveQuery/ParseLiveQueryServer.d.ts create mode 100644 types/LiveQuery/ParsePubSub.d.ts create mode 100644 types/LiveQuery/ParseWebSocketServer.d.ts create mode 100644 types/LiveQuery/QueryTools.d.ts create mode 100644 types/LiveQuery/RequestSchema.d.ts create mode 100644 types/LiveQuery/SessionTokenCache.d.ts create mode 100644 types/LiveQuery/Subscription.d.ts create mode 100644 types/LiveQuery/equalObjects.d.ts create mode 100644 types/Options/Definitions.d.ts create mode 100644 types/Options/docs.d.ts create mode 100644 types/Options/index.d.ts create mode 100644 types/Options/parsers.d.ts create mode 100644 types/Page.d.ts create mode 100644 types/ParseMessageQueue.d.ts create mode 100644 types/ParseServer.d.ts create mode 100644 types/ParseServerRESTController.d.ts create mode 100644 types/PromiseRouter.d.ts create mode 100644 types/Push/PushQueue.d.ts create mode 100644 types/Push/PushWorker.d.ts create mode 100644 types/Push/utils.d.ts create mode 100644 types/RestQuery.d.ts create mode 100644 types/RestWrite.d.ts create mode 100644 types/Routers/AggregateRouter.d.ts create mode 100644 types/Routers/AnalyticsRouter.d.ts create mode 100644 types/Routers/AudiencesRouter.d.ts create mode 100644 types/Routers/ClassesRouter.d.ts create mode 100644 types/Routers/CloudCodeRouter.d.ts create mode 100644 types/Routers/FeaturesRouter.d.ts create mode 100644 types/Routers/FilesRouter.d.ts create mode 100644 types/Routers/FunctionsRouter.d.ts create mode 100644 types/Routers/GlobalConfigRouter.d.ts create mode 100644 types/Routers/GraphQLRouter.d.ts create mode 100644 types/Routers/HooksRouter.d.ts create mode 100644 types/Routers/IAPValidationRouter.d.ts create mode 100644 types/Routers/InstallationsRouter.d.ts create mode 100644 types/Routers/LogsRouter.d.ts create mode 100644 types/Routers/PagesRouter.d.ts create mode 100644 types/Routers/PublicAPIRouter.d.ts create mode 100644 types/Routers/PurgeRouter.d.ts create mode 100644 types/Routers/PushRouter.d.ts create mode 100644 types/Routers/RolesRouter.d.ts create mode 100644 types/Routers/SchemasRouter.d.ts create mode 100644 types/Routers/SecurityRouter.d.ts create mode 100644 types/Routers/SessionsRouter.d.ts create mode 100644 types/Routers/UsersRouter.d.ts create mode 100644 types/Security/Check.d.ts create mode 100644 types/Security/CheckGroup.d.ts create mode 100644 types/Security/CheckGroups/CheckGroupDatabase.d.ts create mode 100644 types/Security/CheckGroups/CheckGroupServerConfig.d.ts create mode 100644 types/Security/CheckGroups/CheckGroups.d.ts create mode 100644 types/Security/CheckRunner.d.ts create mode 100644 types/StatusHandler.d.ts create mode 100644 types/TestUtils.d.ts create mode 100644 types/Utils.d.ts create mode 100644 types/batch.d.ts create mode 100644 types/cache.d.ts create mode 100644 types/cli/definitions/parse-live-query-server.d.ts create mode 100644 types/cli/definitions/parse-server.d.ts create mode 100644 types/cli/parse-live-query-server.d.ts create mode 100644 types/cli/parse-server.d.ts create mode 100644 types/cli/utils/commander.d.ts create mode 100644 types/cli/utils/runner.d.ts create mode 100644 types/cloud-code/HTTPResponse.d.ts create mode 100644 types/cloud-code/Parse.Cloud.d.ts create mode 100644 types/cloud-code/httpRequest.d.ts create mode 100644 types/cryptoUtils.d.ts create mode 100644 types/defaults.d.ts create mode 100644 types/deprecated.d.ts create mode 100644 types/index.d.ts create mode 100644 types/logger.d.ts create mode 100644 types/middlewares.d.ts create mode 100644 types/password.d.ts create mode 100644 types/request.d.ts create mode 100644 types/requiredParameter.d.ts create mode 100644 types/rest.d.ts create mode 100644 types/triggers.d.ts create mode 100644 types/vendor/mongodbUrl.d.ts diff --git a/types/AccountLockout.d.ts b/types/AccountLockout.d.ts new file mode 100644 index 0000000000..0dfd65517b --- /dev/null +++ b/types/AccountLockout.d.ts @@ -0,0 +1,54 @@ +export var __esModule: boolean; +export default _default; +export class AccountLockout { + constructor(user: any, config: any); + _user: any; + _config: any; + /** + * set _failed_login_count to value + */ + _setFailedLoginCount(value: any): any; + /** + * check if the _failed_login_count field has been set + */ + _isFailedLoginCountSet(): any; + /** + * if _failed_login_count is NOT set then set it to 0 + * else do nothing + */ + _initFailedLoginCount(): any; + /** + * increment _failed_login_count by 1 + */ + _incrementFailedLoginCount(): any; + /** + * if the failed login count is greater than the threshold + * then sets lockout expiration to 'currenttime + accountPolicy.duration', i.e., account is locked out for the next 'accountPolicy.duration' minutes + * else do nothing + */ + _setLockoutExpiration(): any; + /** + * if _account_lockout_expires_at > current_time and _failed_login_count > threshold + * reject with account locked error + * else + * resolve + */ + _notLocked(): any; + /** + * set and/or increment _failed_login_count + * if _failed_login_count > threshold + * set the _account_lockout_expires_at to current_time + accountPolicy.duration + * else + * do nothing + */ + _handleFailedLoginAttempt(): any; + /** + * handle login attempt if the Account Lockout Policy is enabled + */ + handleLoginAttempt(loginSuccessful: any): any; + /** + * Removes the account lockout. + */ + unlockAccount(): any; +} +declare var _default: typeof AccountLockout; diff --git a/types/Adapters/AdapterLoader.d.ts b/types/Adapters/AdapterLoader.d.ts new file mode 100644 index 0000000000..b7e0ff447b --- /dev/null +++ b/types/Adapters/AdapterLoader.d.ts @@ -0,0 +1,26 @@ +export var __esModule: boolean; +export default _default; +/** + * @module AdapterLoader + */ +/** + * @static + * Attempt to load an adapter or fallback to the default. + * @param {Adapter} adapter an adapter + * @param {Adapter} defaultAdapter the default adapter to load + * @param {any} options options to pass to the contstructor + * @returns {Object} the loaded adapter + */ +export function loadAdapter(adapter: any, defaultAdapter: any, options: any): any; +/** + * @module AdapterLoader + */ +/** + * @static + * Attempt to load an adapter or fallback to the default. + * @param {Adapter} adapter an adapter + * @param {Adapter} defaultAdapter the default adapter to load + * @param {any} options options to pass to the contstructor + * @returns {Object} the loaded adapter + */ +declare function _default(adapter: any, defaultAdapter: any, options: any): any; diff --git a/types/Adapters/Analytics/AnalyticsAdapter.d.ts b/types/Adapters/Analytics/AnalyticsAdapter.d.ts new file mode 100644 index 0000000000..d18643f1ae --- /dev/null +++ b/types/Adapters/Analytics/AnalyticsAdapter.d.ts @@ -0,0 +1,22 @@ +export var __esModule: boolean; +export default _default; +/** + * @module Adapters + */ +/** + * @interface AnalyticsAdapter + */ +export class AnalyticsAdapter { + /** + @param {any} parameters: the analytics request body, analytics info will be in the dimensions property + @param {Request} req: the original http request + */ + appOpened(parameters: any, req: Request): Promise<{}>; + /** + @param {String} eventName: the name of the custom eventName + @param {any} parameters: the analytics request body, analytics info will be in the dimensions property + @param {Request} req: the original http request + */ + trackEvent(eventName: string, parameters: any, req: Request): Promise<{}>; +} +declare var _default: typeof AnalyticsAdapter; diff --git a/types/Adapters/Auth/AuthAdapter.d.ts b/types/Adapters/Auth/AuthAdapter.d.ts new file mode 100644 index 0000000000..be24e8b4e3 --- /dev/null +++ b/types/Adapters/Auth/AuthAdapter.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +export default _default; +export class AuthAdapter { + validateAppId(appIds: any, authData: any, options: any): Promise<{}>; + validateAuthData(authData: any, options: any): Promise<{}>; +} +declare var _default: typeof AuthAdapter; diff --git a/types/Adapters/Auth/OAuth1Client.d.ts b/types/Adapters/Auth/OAuth1Client.d.ts new file mode 100644 index 0000000000..3570d94095 --- /dev/null +++ b/types/Adapters/Auth/OAuth1Client.d.ts @@ -0,0 +1,26 @@ +export = OAuth; +declare class OAuth { + static encode(str: any): string; + static nonce(): string; + static buildParameterString(obj: any): string; + static buildSignatureString(method: any, url: any, parameters: any): string; + static signature(text: any, key: any): string; + static signRequest(request: any, oauth_parameters: any, consumer_secret: any, auth_token_secret: any): any; + constructor(options: any); + consumer_key: any; + consumer_secret: any; + auth_token: any; + auth_token_secret: any; + host: any; + oauth_params: any; + signatureMethod: string; + version: string; + send(method: any, path: any, params: any, body: any): Promise; + buildRequest(method: any, path: any, params: any, body: any): { + host: any; + path: any; + method: any; + }; + get(path: any, params: any): Promise; + post(path: any, params: any, body: any): Promise; +} diff --git a/types/Adapters/Auth/apple.d.ts b/types/Adapters/Auth/apple.d.ts new file mode 100644 index 0000000000..d76a44a89d --- /dev/null +++ b/types/Adapters/Auth/apple.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options?: {}): Promise; diff --git a/types/Adapters/Auth/facebook.d.ts b/types/Adapters/Auth/facebook.d.ts new file mode 100644 index 0000000000..b6daba6dde --- /dev/null +++ b/types/Adapters/Auth/facebook.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(appIds: any, authData: any, options: any): Promise; +export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/gcenter.d.ts b/types/Adapters/Auth/gcenter.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/gcenter.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/github.d.ts b/types/Adapters/Auth/github.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/github.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/google.d.ts b/types/Adapters/Auth/google.d.ts new file mode 100644 index 0000000000..d76a44a89d --- /dev/null +++ b/types/Adapters/Auth/google.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options?: {}): Promise; diff --git a/types/Adapters/Auth/gpgames.d.ts b/types/Adapters/Auth/gpgames.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/gpgames.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/httpsRequest.d.ts b/types/Adapters/Auth/httpsRequest.d.ts new file mode 100644 index 0000000000..99babd3b8f --- /dev/null +++ b/types/Adapters/Auth/httpsRequest.d.ts @@ -0,0 +1,2 @@ +export function get(options: any, noJSON?: boolean): Promise; +export function request(options: any, postData: any): Promise; diff --git a/types/Adapters/Auth/index.d.ts b/types/Adapters/Auth/index.d.ts new file mode 100644 index 0000000000..dc650b9092 --- /dev/null +++ b/types/Adapters/Auth/index.d.ts @@ -0,0 +1,13 @@ +declare function _exports(authOptions?: {}, enableAnonymousUsers?: boolean): Readonly<{ + getValidatorForProvider: (provider: any) => (authData: any) => any; + setEnableAnonymousUsers: (enable: any) => void; +}>; +declare namespace _exports { + export { loadAuthAdapter }; +} +export = _exports; +declare function loadAuthAdapter(provider: any, authOptions: any): { + adapter: any; + appIds: any; + providerOptions: any; +}; diff --git a/types/Adapters/Auth/instagram.d.ts b/types/Adapters/Auth/instagram.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/instagram.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/janraincapture.d.ts b/types/Adapters/Auth/janraincapture.d.ts new file mode 100644 index 0000000000..d4e3d662e2 --- /dev/null +++ b/types/Adapters/Auth/janraincapture.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/janrainengage.d.ts b/types/Adapters/Auth/janrainengage.d.ts new file mode 100644 index 0000000000..d4e3d662e2 --- /dev/null +++ b/types/Adapters/Auth/janrainengage.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/keycloak.d.ts b/types/Adapters/Auth/keycloak.d.ts new file mode 100644 index 0000000000..833ddd69f1 --- /dev/null +++ b/types/Adapters/Auth/keycloak.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options?: {}): Promise; diff --git a/types/Adapters/Auth/ldap.d.ts b/types/Adapters/Auth/ldap.d.ts new file mode 100644 index 0000000000..7feb844d85 --- /dev/null +++ b/types/Adapters/Auth/ldap.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/line.d.ts b/types/Adapters/Auth/line.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/line.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/linkedin.d.ts b/types/Adapters/Auth/linkedin.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/linkedin.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/meetup.d.ts b/types/Adapters/Auth/meetup.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/meetup.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/microsoft.d.ts b/types/Adapters/Auth/microsoft.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/microsoft.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/oauth2.d.ts b/types/Adapters/Auth/oauth2.d.ts new file mode 100644 index 0000000000..262070d6a4 --- /dev/null +++ b/types/Adapters/Auth/oauth2.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(appIds: any, authData: any, options: any): Promise; +export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/phantauth.d.ts b/types/Adapters/Auth/phantauth.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/phantauth.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/qq.d.ts b/types/Adapters/Auth/qq.d.ts new file mode 100644 index 0000000000..730a31144e --- /dev/null +++ b/types/Adapters/Auth/qq.d.ts @@ -0,0 +1,3 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; +export function parseResponseData(data: any): any; diff --git a/types/Adapters/Auth/spotify.d.ts b/types/Adapters/Auth/spotify.d.ts new file mode 100644 index 0000000000..97bb118c4c --- /dev/null +++ b/types/Adapters/Auth/spotify.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(appIds: any, authData: any): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/twitter.d.ts b/types/Adapters/Auth/twitter.d.ts new file mode 100644 index 0000000000..bafb8432e7 --- /dev/null +++ b/types/Adapters/Auth/twitter.d.ts @@ -0,0 +1,3 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, options: any): Promise; +export function handleMultipleConfigurations(authData: any, options: any): any; diff --git a/types/Adapters/Auth/vkontakte.d.ts b/types/Adapters/Auth/vkontakte.d.ts new file mode 100644 index 0000000000..9c9f9f46f7 --- /dev/null +++ b/types/Adapters/Auth/vkontakte.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any, params: any): Promise; diff --git a/types/Adapters/Auth/wechat.d.ts b/types/Adapters/Auth/wechat.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/wechat.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/weibo.d.ts b/types/Adapters/Auth/weibo.d.ts new file mode 100644 index 0000000000..20975b334e --- /dev/null +++ b/types/Adapters/Auth/weibo.d.ts @@ -0,0 +1,2 @@ +export function validateAppId(): Promise; +export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Cache/CacheAdapter.d.ts b/types/Adapters/Cache/CacheAdapter.d.ts new file mode 100644 index 0000000000..4821aed196 --- /dev/null +++ b/types/Adapters/Cache/CacheAdapter.d.ts @@ -0,0 +1,31 @@ +export var __esModule: boolean; +/** + * @module Adapters + */ +/** + * @interface CacheAdapter + */ +export class CacheAdapter { + /** + * Get a value in the cache + * @param {String} key Cache key to get + * @return {Promise} that will eventually resolve to the value in the cache. + */ + get(key: string): Promise; + /** + * Set a value in the cache + * @param {String} key Cache key to set + * @param {String} value Value to set the key + * @param {String} ttl Optional TTL + */ + put(key: string, value: string, ttl: string): void; + /** + * Remove a value from the cache. + * @param {String} key Cache key to remove + */ + del(key: string): void; + /** + * Empty a cache + */ + clear(): void; +} diff --git a/types/Adapters/Cache/InMemoryCache.d.ts b/types/Adapters/Cache/InMemoryCache.d.ts new file mode 100644 index 0000000000..6d94f7bb69 --- /dev/null +++ b/types/Adapters/Cache/InMemoryCache.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export default _default; +export class InMemoryCache { + constructor({ ttl }: { + ttl?: number; + }); + ttl: number; + cache: any; + get(key: any): any; + put(key: any, value: any, ttl?: number): void; + del(key: any): void; + clear(): void; +} +declare var _default: typeof InMemoryCache; diff --git a/types/Adapters/Cache/InMemoryCacheAdapter.d.ts b/types/Adapters/Cache/InMemoryCacheAdapter.d.ts new file mode 100644 index 0000000000..50c9a92601 --- /dev/null +++ b/types/Adapters/Cache/InMemoryCacheAdapter.d.ts @@ -0,0 +1,12 @@ +export var __esModule: boolean; +export default _default; +export class InMemoryCacheAdapter { + constructor(ctx: any); + cache: _LRUCache.LRUCache; + get(key: any): Promise; + put(key: any, value: any, ttl: any): Promise; + del(key: any): Promise; + clear(): Promise; +} +declare var _default: typeof InMemoryCacheAdapter; +import _LRUCache = require("./LRUCache"); diff --git a/types/Adapters/Cache/LRUCache.d.ts b/types/Adapters/Cache/LRUCache.d.ts new file mode 100644 index 0000000000..1a91e8b1cb --- /dev/null +++ b/types/Adapters/Cache/LRUCache.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export default _default; +export class LRUCache { + constructor({ ttl, maxSize }: { + ttl?: any; + maxSize?: any; + }); + cache: any; + get(key: any): any; + put(key: any, value: any, ttl?: any): void; + del(key: any): void; + clear(): void; +} +declare var _default: typeof LRUCache; diff --git a/types/Adapters/Cache/NullCacheAdapter.d.ts b/types/Adapters/Cache/NullCacheAdapter.d.ts new file mode 100644 index 0000000000..ddab42e66d --- /dev/null +++ b/types/Adapters/Cache/NullCacheAdapter.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export default _default; +export class NullCacheAdapter { + get(): Promise; + put(): Promise; + del(): Promise; + clear(): Promise; +} +declare var _default: typeof NullCacheAdapter; diff --git a/types/Adapters/Cache/RedisCacheAdapter.d.ts b/types/Adapters/Cache/RedisCacheAdapter.d.ts new file mode 100644 index 0000000000..5f95673f62 --- /dev/null +++ b/types/Adapters/Cache/RedisCacheAdapter.d.ts @@ -0,0 +1,16 @@ +export var __esModule: boolean; +export default _default; +export class RedisCacheAdapter { + constructor(redisCtx: any, ttl?: number); + ttl: number; + client: any; + queue: _KeyPromiseQueue.KeyPromiseQueue; + handleShutdown(): Promise; + get(key: any): any; + put(key: any, value: any, ttl?: number): any; + del(key: any): any; + clear(): any; + getAllKeys(): Promise; +} +declare var _default: typeof RedisCacheAdapter; +import _KeyPromiseQueue = require("../../KeyPromiseQueue"); diff --git a/types/Adapters/Cache/SchemaCache.d.ts b/types/Adapters/Cache/SchemaCache.d.ts new file mode 100644 index 0000000000..2c503cfe19 --- /dev/null +++ b/types/Adapters/Cache/SchemaCache.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export default _default; +declare namespace _default { + function all(): any[]; + function all(): any[]; + function get(className: any): any; + function get(className: any): any; + function put(allSchema: any): void; + function put(allSchema: any): void; + function del(className: any): void; + function del(className: any): void; + function clear(): void; + function clear(): void; +} diff --git a/types/Adapters/Email/MailAdapter.d.ts b/types/Adapters/Email/MailAdapter.d.ts new file mode 100644 index 0000000000..524f32232f --- /dev/null +++ b/types/Adapters/Email/MailAdapter.d.ts @@ -0,0 +1,21 @@ +export var __esModule: boolean; +export default _default; +/** + * @module Adapters + */ +/** + * @interface MailAdapter + * Mail Adapter prototype + * A MailAdapter should implement at least sendMail() + */ +export class MailAdapter { + /** + * A method for sending mail + * @param options would have the parameters + * - to: the recipient + * - text: the raw text of the message + * - subject: the subject of the email + */ + sendMail(options: any): void; +} +declare var _default: typeof MailAdapter; diff --git a/types/Adapters/Files/FilesAdapter.d.ts b/types/Adapters/Files/FilesAdapter.d.ts new file mode 100644 index 0000000000..b404dd05ac --- /dev/null +++ b/types/Adapters/Files/FilesAdapter.d.ts @@ -0,0 +1,48 @@ +export var __esModule: boolean; +export default _default; +export function validateFilename(filename: any): any; +/** + * @module Adapters + */ +/** + * @interface FilesAdapter + */ +export class FilesAdapter { + /** Responsible for storing the file in order to be retrieved later by its filename + * + * @param {string} filename - the filename to save + * @param {*} data - the buffer of data from the file + * @param {string} contentType - the supposed contentType + * @discussion the contentType can be undefined if the controller was not able to determine it + * @param {object} options - (Optional) options to be passed to file adapter (S3 File Adapter Only) + * - tags: object containing key value pairs that will be stored with file + * - metadata: object containing key value pairs that will be sotred with file (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.html) + * @discussion options are not supported by all file adapters. Check the your adapter's documentation for compatibility + * + * @return {Promise} a promise that should fail if the storage didn't succeed + */ + createFile(filename: string, data: any, contentType: string, options: object): Promise; + /** Responsible for deleting the specified file + * + * @param {string} filename - the filename to delete + * + * @return {Promise} a promise that should fail if the deletion didn't succeed + */ + deleteFile(filename: string): Promise; + /** Responsible for retrieving the data of the specified file + * + * @param {string} filename - the name of file to retrieve + * + * @return {Promise} a promise that should pass with the file data or fail on error + */ + getFileData(filename: string): Promise; + /** Returns an absolute URL where the file can be accessed + * + * @param {Config} config - server configuration + * @param {string} filename + * + * @return {string} Absolute URL + */ + getFileLocation(config: any, filename: string): string; +} +declare var _default: typeof FilesAdapter; diff --git a/types/Adapters/Files/GridFSBucketAdapter.d.ts b/types/Adapters/Files/GridFSBucketAdapter.d.ts new file mode 100644 index 0000000000..dbc6dbae86 --- /dev/null +++ b/types/Adapters/Files/GridFSBucketAdapter.d.ts @@ -0,0 +1,27 @@ +export var __esModule: boolean; +export default _default; +export class GridFSBucketAdapter extends _FilesAdapter.FilesAdapter { + constructor(mongoDatabaseURI?: any, mongoOptions?: {}, encryptionKey?: any); + _databaseURI: any; + _algorithm: string; + _encryptionKey: string; + _mongoOptions: { + useNewUrlParser: boolean; + useUnifiedTopology: boolean; + }; + _connect(): any; + _connectionPromise: any; + _client: any; + _getBucket(): any; + rotateEncryptionKey(options?: {}): Promise; + getMetadata(filename: any): Promise<{ + metadata?: undefined; + } | { + metadata: any; + }>; + handleFileStream(filename: any, req: any, res: any, contentType: any): Promise; + handleShutdown(): any; + validateFilename(filename: any): any; +} +declare var _default: typeof GridFSBucketAdapter; +import _FilesAdapter = require("./FilesAdapter"); diff --git a/types/Adapters/Files/GridStoreAdapter.d.ts b/types/Adapters/Files/GridStoreAdapter.d.ts new file mode 100644 index 0000000000..dd4ed98057 --- /dev/null +++ b/types/Adapters/Files/GridStoreAdapter.d.ts @@ -0,0 +1,26 @@ +export var __esModule: boolean; +export default _default; +/** + GridStoreAdapter + Stores files in Mongo using GridStore + Requires the database adapter to be based on mongoclient + (GridStore is deprecated, Please use GridFSBucket instead) + + + */ +export class GridStoreAdapter extends _FilesAdapter.FilesAdapter { + constructor(mongoDatabaseURI?: any, mongoOptions?: {}); + _databaseURI: any; + _mongoOptions: { + useNewUrlParser: boolean; + useUnifiedTopology: boolean; + }; + _connect(): any; + _connectionPromise: any; + _client: any; + handleFileStream(filename: any, req: any, res: any, contentType: any): Promise; + handleShutdown(): any; + validateFilename(filename: any): any; +} +declare var _default: typeof GridStoreAdapter; +import _FilesAdapter = require("./FilesAdapter"); diff --git a/types/Adapters/Logger/LoggerAdapter.d.ts b/types/Adapters/Logger/LoggerAdapter.d.ts new file mode 100644 index 0000000000..c4469a772c --- /dev/null +++ b/types/Adapters/Logger/LoggerAdapter.d.ts @@ -0,0 +1,22 @@ +export var __esModule: boolean; +export default _default; +/** + * @module Adapters + */ +/** + * @interface LoggerAdapter + * Logger Adapter + * Allows you to change the logger mechanism + * Default is WinstonLoggerAdapter.js + */ +export class LoggerAdapter { + constructor(options: any); + /** + * log + * @param {String} level + * @param {String} message + * @param {Object} metadata + */ + log(level: string, message: string): void; +} +declare var _default: typeof LoggerAdapter; diff --git a/types/Adapters/Logger/WinstonLogger.d.ts b/types/Adapters/Logger/WinstonLogger.d.ts new file mode 100644 index 0000000000..7e0bc80b30 --- /dev/null +++ b/types/Adapters/Logger/WinstonLogger.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export default _default; +export function configureLogger({ logsFolder, jsonLogs, logLevel, verbose, silent, maxLogFiles }?: { + logsFolder?: any; + jsonLogs?: any; + logLevel?: any; + verbose?: any; + silent?: any; + maxLogFiles: any; +}): void; +export function addTransport(transport: any): void; +export function removeTransport(transport: any): void; +export const logger: any; +declare var _default: any; diff --git a/types/Adapters/Logger/WinstonLoggerAdapter.d.ts b/types/Adapters/Logger/WinstonLoggerAdapter.d.ts new file mode 100644 index 0000000000..8979e353e4 --- /dev/null +++ b/types/Adapters/Logger/WinstonLoggerAdapter.d.ts @@ -0,0 +1,8 @@ +export var __esModule: boolean; +export default _default; +export class WinstonLoggerAdapter extends _LoggerAdapter.LoggerAdapter { + addTransport(transport: any): void; + query(options: any, callback?: () => void): Promise; +} +declare var _default: typeof WinstonLoggerAdapter; +import _LoggerAdapter = require("./LoggerAdapter"); diff --git a/types/Adapters/MessageQueue/EventEmitterMQ.d.ts b/types/Adapters/MessageQueue/EventEmitterMQ.d.ts new file mode 100644 index 0000000000..15c2c55abe --- /dev/null +++ b/types/Adapters/MessageQueue/EventEmitterMQ.d.ts @@ -0,0 +1,21 @@ +export var __esModule: boolean; +export namespace EventEmitterMQ { + export { createPublisher }; + export { createSubscriber }; +} +declare function createPublisher(): Publisher; +declare function createSubscriber(): Consumer; +declare class Publisher { + constructor(emitter: any); + emitter: any; + publish(channel: any, message: any): void; +} +declare const Consumer_base: any; +declare class Consumer extends Consumer_base { + [x: string]: any; + constructor(emitter: any); + emitter: any; + subscribe(channel: any): void; + unsubscribe(channel: any): void; +} +export {}; diff --git a/types/Adapters/PubSub/EventEmitterPubSub.d.ts b/types/Adapters/PubSub/EventEmitterPubSub.d.ts new file mode 100644 index 0000000000..f86ff21fad --- /dev/null +++ b/types/Adapters/PubSub/EventEmitterPubSub.d.ts @@ -0,0 +1,22 @@ +export var __esModule: boolean; +export namespace EventEmitterPubSub { + export { createPublisher }; + export { createSubscriber }; +} +declare function createPublisher(): Publisher; +declare function createSubscriber(): Subscriber; +declare class Publisher { + constructor(emitter: any); + emitter: any; + publish(channel: any, message: any): void; +} +declare const Subscriber_base: any; +declare class Subscriber extends Subscriber_base { + [x: string]: any; + constructor(emitter: any); + emitter: any; + subscriptions: Map; + subscribe(channel: any): void; + unsubscribe(channel: any): void; +} +export {}; diff --git a/types/Adapters/PubSub/PubSubAdapter.d.ts b/types/Adapters/PubSub/PubSubAdapter.d.ts new file mode 100644 index 0000000000..53e81372a2 --- /dev/null +++ b/types/Adapters/PubSub/PubSubAdapter.d.ts @@ -0,0 +1,19 @@ +export var __esModule: boolean; +export default _default; +/** + * @module Adapters + */ +/** + * @interface PubSubAdapter + */ +export class PubSubAdapter { + /** + * @returns {PubSubAdapter.Publisher} + */ + static createPublisher(): any; + /** + * @returns {PubSubAdapter.Subscriber} + */ + static createSubscriber(): any; +} +declare var _default: typeof PubSubAdapter; diff --git a/types/Adapters/PubSub/RedisPubSub.d.ts b/types/Adapters/PubSub/RedisPubSub.d.ts new file mode 100644 index 0000000000..1964a8a45a --- /dev/null +++ b/types/Adapters/PubSub/RedisPubSub.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export namespace RedisPubSub { + export { createPublisher }; + export { createSubscriber }; +} +declare function createPublisher({ redisURL, redisOptions }: { + redisURL: any; + redisOptions?: {}; +}): any; +declare function createSubscriber({ redisURL, redisOptions }: { + redisURL: any; + redisOptions?: {}; +}): any; +export {}; diff --git a/types/Adapters/Push/PushAdapter.d.ts b/types/Adapters/Push/PushAdapter.d.ts new file mode 100644 index 0000000000..2d5fdb17aa --- /dev/null +++ b/types/Adapters/Push/PushAdapter.d.ts @@ -0,0 +1,23 @@ +export var __esModule: boolean; +export default _default; +/** + * @module Adapters + */ +/** + * @interface PushAdapter + */ +export class PushAdapter { + /** + * @param {any} body + * @param {Parse.Installation[]} installations + * @param {any} pushStatus + * @returns {Promise} + */ + send(body: any, installations: any[], pushStatus: any): Promise; + /** + * Get an array of valid push types. + * @returns {Array} An array of valid push types + */ + getValidPushTypes(): any[]; +} +declare var _default: typeof PushAdapter; diff --git a/types/Adapters/Storage/Mongo/MongoCollection.d.ts b/types/Adapters/Storage/Mongo/MongoCollection.d.ts new file mode 100644 index 0000000000..2c927afea2 --- /dev/null +++ b/types/Adapters/Storage/Mongo/MongoCollection.d.ts @@ -0,0 +1,57 @@ +export var __esModule: boolean; +export default MongoCollection; +declare class MongoCollection { + /** + * Collation to support case insensitive queries + */ + static caseInsensitiveCollation(): { + locale: string; + strength: number; + }; + constructor(mongoCollection: any); + _mongoCollection: any; + find(query: any, { skip, limit, sort, keys, maxTimeMS, readPreference, hint, caseInsensitive, explain }?: { + skip: any; + limit: any; + sort: any; + keys: any; + maxTimeMS: any; + readPreference: any; + hint: any; + caseInsensitive: any; + explain: any; + }): any; + _rawFind(query: any, { skip, limit, sort, keys, maxTimeMS, readPreference, hint, caseInsensitive, explain }?: { + skip: any; + limit: any; + sort: any; + keys: any; + maxTimeMS: any; + readPreference: any; + hint: any; + caseInsensitive: any; + explain: any; + }): any; + count(query: any, { skip, limit, sort, maxTimeMS, readPreference, hint }?: { + skip: any; + limit: any; + sort: any; + maxTimeMS: any; + readPreference: any; + hint: any; + }): any; + distinct(field: any, query: any): any; + aggregate(pipeline: any, { maxTimeMS, readPreference, hint, explain }?: { + maxTimeMS: any; + readPreference: any; + hint: any; + explain: any; + }): any; + insertOne(object: any, session: any): any; + upsertOne(query: any, update: any, session: any): any; + updateOne(query: any, update: any): any; + updateMany(query: any, update: any, session: any): any; + deleteMany(query: any, session: any): any; + _ensureSparseUniqueIndexInBackground(indexRequest: any): Promise; + drop(): any; +} diff --git a/types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts b/types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts new file mode 100644 index 0000000000..0a6ca57315 --- /dev/null +++ b/types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts @@ -0,0 +1,53 @@ +export var __esModule: boolean; +export default _default; +declare var _default: typeof MongoSchemaCollection; +declare class MongoSchemaCollection { + constructor(collection: any); + _collection: any; + _fetchAllSchemasFrom_SCHEMA(): any; + _fetchOneSchemaFrom_SCHEMA(name: any): any; + findAndDeleteSchema(name: any): any; + insertSchema(schema: any): any; + updateSchema(name: any, update: any): any; + upsertSchema(name: any, query: any, update: any): any; + addFieldIfNotExists(className: any, fieldName: any, fieldType: any): any; +} +declare namespace MongoSchemaCollection { + export { mongoSchemaToParseSchema as _TESTmongoSchemaToParseSchema }; + export { parseFieldTypeToMongoFieldType }; +} +declare function mongoSchemaToParseSchema(mongoSchema: any): { + className: any; + fields: {}; + classLevelPermissions: Readonly<{ + find: { + '*': boolean; + }; + count: { + '*': boolean; + }; + get: { + '*': boolean; + }; + create: { + '*': boolean; + }; + update: { + '*': boolean; + }; + delete: { + '*': boolean; + }; + addField: { + '*': boolean; + }; + protectedFields: { + '*': any[]; + }; + }>; + indexes: {}; +}; +declare function parseFieldTypeToMongoFieldType({ type, targetClass }: { + type: any; + targetClass: any; +}): string; diff --git a/types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts b/types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts new file mode 100644 index 0000000000..f0f5c01108 --- /dev/null +++ b/types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts @@ -0,0 +1,80 @@ +export var __esModule: boolean; +export default _default; +export class MongoStorageAdapter { + constructor({ uri, collectionPrefix, mongoOptions }: { + uri?: any; + collectionPrefix?: string; + mongoOptions?: {}; + }); + _uri: any; + _collectionPrefix: string; + _mongoOptions: {}; + _onchange: () => void; + _maxTimeMS: any; + canSortOnJoinTables: boolean; + enableSchemaHooks: boolean; + watch(callback: any): void; + connect(): any; + connectionPromise: any; + client: any; + database: any; + handleError(error: any): void; + handleShutdown(): any; + _adaptiveCollection(name: any): any; + _schemaCollection(): any; + _stream: any; + classExists(name: any): any; + setClassLevelPermissions(className: any, CLPs: any): any; + setIndexesWithSchemaFormat(className: any, submittedIndexes: any, existingIndexes: {}, fields: any): Promise; + setIndexesFromMongo(className: any): any; + createClass(className: any, schema: any): Promise; + addFieldIfNotExists(className: any, fieldName: any, type: any): any; + deleteClass(className: any): any; + deleteAllClasses(fast: any): any; + deleteFields(className: any, schema: any, fieldNames: any): any; + getAllClasses(): any; + getClass(className: any): any; + createObject(className: any, schema: any, object: any, transactionalSession: any): any; + deleteObjectsByQuery(className: any, schema: any, query: any, transactionalSession: any): any; + updateObjectsByQuery(className: any, schema: any, query: any, update: any, transactionalSession: any): any; + findOneAndUpdate(className: any, schema: any, query: any, update: any, transactionalSession: any): any; + upsertOneObject(className: any, schema: any, query: any, update: any, transactionalSession: any): any; + find(className: any, schema: any, query: any, { skip, limit, sort, keys, readPreference, hint, caseInsensitive, explain }: { + skip: any; + limit: any; + sort: any; + keys: any; + readPreference: any; + hint: any; + caseInsensitive: any; + explain: any; + }): Promise; + ensureIndex(className: any, schema: any, fieldNames: any, indexName: any, caseInsensitive?: boolean, options?: {}): any; + ensureUniqueness(className: any, schema: any, fieldNames: any): any; + _rawFind(className: any, query: any): any; + count(className: any, schema: any, query: any, readPreference: any, hint: any): any; + distinct(className: any, schema: any, query: any, fieldName: any): any; + aggregate(className: any, schema: any, pipeline: any, readPreference: any, hint: any, explain: any): any; + _parseAggregateArgs(schema: any, pipeline: any): any; + _parseAggregateProjectArgs(schema: any, pipeline: any): { + _id: any; + _created_at: any; + _updated_at: any; + }; + _parseAggregateGroupArgs(schema: any, pipeline: any): any; + _convertToDate(value: any): {}; + _parseReadPreference(readPreference: any): any; + performInitialization(): Promise; + createIndex(className: any, index: any): any; + createIndexes(className: any, indexes: any): any; + createIndexesIfNeeded(className: any, fieldName: any, type: any): any; + createTextIndexesIfNeeded(className: any, query: any, schema: any): Promise; + getIndexes(className: any): any; + dropIndex(className: any, index: any): any; + dropAllIndexes(className: any): any; + updateSchemaWithIndexes(): any; + createTransactionalSession(): Promise; + commitTransactionalSession(transactionalSection: any): any; + abortTransactionalSession(transactionalSection: any): any; +} +declare var _default: typeof MongoStorageAdapter; diff --git a/types/Adapters/Storage/Mongo/MongoTransform.d.ts b/types/Adapters/Storage/Mongo/MongoTransform.d.ts new file mode 100644 index 0000000000..11e2e87f44 --- /dev/null +++ b/types/Adapters/Storage/Mongo/MongoTransform.d.ts @@ -0,0 +1,39 @@ +export function transformKey(className: any, fieldName: any, schema: any): any; +export function parseObjectToMongoObjectForCreate(className: any, restCreate: any, schema: any): { + _created_at: Date; + _updated_at: Date; +}; +export function transformUpdate(className: any, restUpdate: any, parseFormatSchema: any): { + $set: { + _rperm: any; + _wperm: any; + _acl: any; + }; +}; +export function transformWhere(className: any, restWhere: any, schema: any, count?: boolean): {}; +export function mongoObjectToParseObject(className: any, mongoObject: any, schema: any): any; +export function relativeTimeToDate(text: any, now?: Date): { + status: string; + info: string; + result?: undefined; +} | { + status: string; + info: string; + result: Date; +}; +export function transformConstraint(constraint: any, field: any, count?: boolean): typeof CannotTransform | { + $elemMatch: { + $nin: any[]; + }; + $geoWithin: { + $centerSphere: any[]; + }; + $maxDistance: any; +}; +export function transformPointerString(schema: any, field: any, pointerString: any): { + __type: string; + className: any; + objectId: any; +}; +declare function CannotTransform(): void; +export {}; diff --git a/types/Adapters/Storage/Postgres/PostgresClient.d.ts b/types/Adapters/Storage/Postgres/PostgresClient.d.ts new file mode 100644 index 0000000000..0ea0f7039d --- /dev/null +++ b/types/Adapters/Storage/Postgres/PostgresClient.d.ts @@ -0,0 +1,5 @@ +export var __esModule: boolean; +export function createClient(uri: any, databaseOptions: any): { + client: import("pg-promise").IDatabase<{}, import("pg-promise/typescript/pg-subset").IClient>; + pgp: import("pg-promise").IMain<{}, import("pg-promise/typescript/pg-subset").IClient>; +}; diff --git a/types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts b/types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts new file mode 100644 index 0000000000..de1ef81029 --- /dev/null +++ b/types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts @@ -0,0 +1,18 @@ +export function parseQueryParams(queryString: any): any; +export function getDatabaseOptionsFromURI(uri: any): { + host: string; + port: number; + database: string; + user: string; + password: string; + ssl: {}; + binary: boolean; + client_encoding: any; + application_name: any; + fallback_application_name: any; + poolSize: number; + max: number; + query_timeout: number; + idleTimeoutMillis: number; + keepAlive: boolean; +}; diff --git a/types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts b/types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts new file mode 100644 index 0000000000..2163c6958c --- /dev/null +++ b/types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts @@ -0,0 +1,127 @@ +export var __esModule: boolean; +export default _default; +export class PostgresStorageAdapter { + constructor({ uri, collectionPrefix, databaseOptions }: { + uri: any; + collectionPrefix?: string; + databaseOptions?: {}; + }); + _collectionPrefix: string; + enableSchemaHooks: boolean; + _client: import("pg-promise").IDatabase<{}, import("pg-promise/typescript/pg-subset").IClient>; + _onchange: () => void; + _pgp: import("pg-promise").IMain<{}, import("pg-promise/typescript/pg-subset").IClient>; + _uuid: any; + canSortOnJoinTables: boolean; + watch(callback: any): void; + createExplainableQuery(query: any, analyze?: boolean): string; + handleShutdown(): void; + _listenToSchema(): Promise; + _stream: import("pg-promise").IConnected<{}, import("pg-promise/typescript/pg-subset").IClient>; + _notifySchemaChange(): void; + _ensureSchemaCollectionExists(conn: any): Promise; + classExists(name: any): Promise; + setClassLevelPermissions(className: any, CLPs: any): Promise; + setIndexesWithSchemaFormat(className: any, submittedIndexes: any, existingIndexes: {}, fields: any, conn: any): Promise; + createClass(className: any, schema: any, conn: any): Promise; + createTable(className: any, schema: any, conn: any): Promise; + schemaUpgrade(className: any, schema: any, conn: any): Promise; + addFieldIfNotExists(className: any, fieldName: any, type: any, conn: any): Promise; + deleteClass(className: any): Promise; + deleteAllClasses(): Promise; + deleteFields(className: any, schema: any, fieldNames: any): Promise; + getAllClasses(): Promise<{ + className: any; + fields: any; + classLevelPermissions: Readonly<{ + find: { + '*': boolean; + }; + get: { + '*': boolean; + }; + count: { + '*': boolean; + }; + create: { + '*': boolean; + }; + update: { + '*': boolean; + }; + delete: { + '*': boolean; + }; + addField: { + '*': boolean; + }; + protectedFields: { + '*': any[]; + }; + }>; + indexes: {}; + }[]>; + getClass(className: any): Promise<{ + className: any; + fields: any; + classLevelPermissions: Readonly<{ + find: { + '*': boolean; + }; + get: { + '*': boolean; + }; + count: { + '*': boolean; + }; + create: { + '*': boolean; + }; + update: { + '*': boolean; + }; + delete: { + '*': boolean; + }; + addField: { + '*': boolean; + }; + protectedFields: { + '*': any[]; + }; + }>; + indexes: {}; + }>; + createObject(className: any, schema: any, object: any, transactionalSession: any): Promise; + deleteObjectsByQuery(className: any, schema: any, query: any, transactionalSession: any): Promise; + findOneAndUpdate(className: any, schema: any, query: any, update: any, transactionalSession: any): Promise; + updateObjectsByQuery(className: any, schema: any, query: any, update: any, transactionalSession: any): Promise; + upsertOneObject(className: any, schema: any, query: any, update: any, transactionalSession: any): Promise; + find(className: any, schema: any, query: any, { skip, limit, sort, keys, caseInsensitive, explain }: { + skip: any; + limit: any; + sort: any; + keys: any; + caseInsensitive: any; + explain: any; + }): Promise; + postgresObjectToParseObject(className: any, object: any, schema: any): any; + ensureUniqueness(className: any, schema: any, fieldNames: any): Promise; + count(className: any, schema: any, query: any, readPreference: any, estimate?: boolean): Promise; + distinct(className: any, schema: any, query: any, fieldName: any): Promise; + aggregate(className: any, schema: any, pipeline: any, readPreference: any, hint: any, explain: any): Promise; + performInitialization({ VolatileClassesSchemas }: { + VolatileClassesSchemas: any; + }): Promise; + createIndexes(className: any, indexes: any, conn: any): Promise; + createIndexesIfNeeded(className: any, fieldName: any, type: any, conn: any): Promise; + dropIndexes(className: any, indexes: any, conn: any): Promise; + getIndexes(className: any): Promise; + updateSchemaWithIndexes(): Promise; + updateEstimatedCount(className: any): Promise; + createTransactionalSession(): Promise; + commitTransactionalSession(transactionalSession: any): any; + abortTransactionalSession(transactionalSession: any): any; + ensureIndex(className: any, schema: any, fieldNames: any, indexName: any, caseInsensitive?: boolean, options?: {}): Promise; +} +declare var _default: typeof PostgresStorageAdapter; diff --git a/types/Adapters/Storage/Postgres/sql/index.d.ts b/types/Adapters/Storage/Postgres/sql/index.d.ts new file mode 100644 index 0000000000..f72ea11914 --- /dev/null +++ b/types/Adapters/Storage/Postgres/sql/index.d.ts @@ -0,0 +1,13 @@ +import QueryFile_1 = require("pg-promise"); +import QueryFile = QueryFile_1.QueryFile; +export namespace array { + const add: QueryFile; + const addUnique: QueryFile; + const contains: QueryFile; + const containsAll: QueryFile; + const containsAllRegex: QueryFile; + const remove: QueryFile; +} +export namespace misc { + const jsonObjectSetKeys: QueryFile; +} diff --git a/types/Adapters/Storage/StorageAdapter.d.ts b/types/Adapters/Storage/StorageAdapter.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/Adapters/WebSocketServer/WSAdapter.d.ts b/types/Adapters/WebSocketServer/WSAdapter.d.ts new file mode 100644 index 0000000000..3b8380ee6a --- /dev/null +++ b/types/Adapters/WebSocketServer/WSAdapter.d.ts @@ -0,0 +1,11 @@ +export var __esModule: boolean; +export default _default; +/** + * Wrapper for ws node module + */ +export class WSAdapter extends _WSSAdapter.WSSAdapter { + constructor(options: any); + options: any; +} +declare var _default: typeof WSAdapter; +import _WSSAdapter = require("./WSSAdapter"); diff --git a/types/Adapters/WebSocketServer/WSSAdapter.d.ts b/types/Adapters/WebSocketServer/WSSAdapter.d.ts new file mode 100644 index 0000000000..7c5cbc7c6b --- /dev/null +++ b/types/Adapters/WebSocketServer/WSSAdapter.d.ts @@ -0,0 +1,28 @@ +export var __esModule: boolean; +export default _default; +/** + * @module Adapters + */ +/** + * @interface WSSAdapter + */ +export class WSSAdapter { + /** + * @param {Object} options - {http.Server|https.Server} server + */ + constructor(options: any); + onListen: () => void; + onConnection: () => void; + onError: () => void; + /** + * Initialize Connection. + * + * @param {Object} options + */ + start(options: any): void; + /** + * Closes server. + */ + close(): void; +} +declare var _default: typeof WSSAdapter; diff --git a/types/Auth.d.ts b/types/Auth.d.ts new file mode 100644 index 0000000000..2b7d1abc8d --- /dev/null +++ b/types/Auth.d.ts @@ -0,0 +1,48 @@ +export function Auth({ config, cacheController, isMaster, isReadOnly, user, installationId }: { + config: any; + cacheController?: any; + isMaster?: boolean; + isReadOnly?: boolean; + user: any; + installationId: any; +}): void; +export class Auth { + constructor({ config, cacheController, isMaster, isReadOnly, user, installationId }: { + config: any; + cacheController?: any; + isMaster?: boolean; + isReadOnly?: boolean; + user: any; + installationId: any; + }); + config: any; + cacheController: any; + installationId: any; + isMaster: boolean; + user: any; + isReadOnly: boolean; + userRoles: any[]; + fetchedRoles: boolean; + rolePromise: Promise; + isUnauthenticated(): boolean; + getUserRoles(): Promise; + getRolesForUser(): Promise; + _loadRoles(): Promise; + cacheRoles(): boolean; + getRolesByIds(ins: any): Promise; + _getAllRolesNamesForRoleIds(roleIDs: any, names?: any[], queriedRoles?: {}): any; +} +export function master(config: any): Auth; +export function nobody(config: any): Auth; +export function readOnly(config: any): Auth; +export function getAuthForSessionToken({ config, cacheController, sessionToken, installationId }: { + config: any; + cacheController: any; + sessionToken: any; + installationId: any; +}): Promise; +export function getAuthForLegacySessionToken({ config, sessionToken, installationId }: { + config: any; + sessionToken: any; + installationId: any; +}): any; diff --git a/types/ClientSDK.d.ts b/types/ClientSDK.d.ts new file mode 100644 index 0000000000..8ac060d6ee --- /dev/null +++ b/types/ClientSDK.d.ts @@ -0,0 +1,6 @@ +export function compatible(compatibleSDK: any): (clientSDK: any) => any; +export function supportsForwardDelete(clientSDK: any): any; +export function fromString(version: any): { + sdk: any; + version: any; +}; diff --git a/types/Config.d.ts b/types/Config.d.ts new file mode 100644 index 0000000000..1be0c2e7d9 --- /dev/null +++ b/types/Config.d.ts @@ -0,0 +1,67 @@ +export = Config; +declare class Config { + static get(applicationId: any, mount: any): Config; + static put(serverConfiguration: any): any; + static validate({ verifyUserEmails, userController, appName, publicServerURL, revokeSessionOnPasswordReset, expireInactiveSessions, sessionLength, maxLimit, emailVerifyTokenValidityDuration, accountLockout, passwordPolicy, masterKeyIps, masterKey, readOnlyMasterKey, allowHeaders, idempotencyOptions, emailVerifyTokenReuseIfValid, fileUpload, pages, security }: { + verifyUserEmails: any; + userController: any; + appName: any; + publicServerURL: any; + revokeSessionOnPasswordReset: any; + expireInactiveSessions: any; + sessionLength: any; + maxLimit: any; + emailVerifyTokenValidityDuration: any; + accountLockout: any; + passwordPolicy: any; + masterKeyIps: any; + masterKey: any; + readOnlyMasterKey: any; + allowHeaders: any; + idempotencyOptions: any; + emailVerifyTokenReuseIfValid: any; + fileUpload: any; + pages: any; + security: any; + }): void; + static validateSecurityOptions(security: any): void; + static validatePagesOptions(pages: any): void; + static validateIdempotencyOptions(idempotencyOptions: any): void; + static validateAccountLockoutPolicy(accountLockout: any): void; + static validatePasswordPolicy(passwordPolicy: any): void; + static setupPasswordValidator(passwordPolicy: any): void; + static validateEmailConfiguration({ emailAdapter, appName, publicServerURL, emailVerifyTokenValidityDuration, emailVerifyTokenReuseIfValid }: { + emailAdapter: any; + appName: any; + publicServerURL: any; + emailVerifyTokenValidityDuration: any; + emailVerifyTokenReuseIfValid: any; + }): void; + static validateFileUploadOptions(fileUpload: any): void; + static validateMasterKeyIps(masterKeyIps: any): void; + static validateSessionConfiguration(sessionLength: any, expireInactiveSessions: any): void; + static validateMaxLimit(maxLimit: any): void; + static validateAllowHeaders(allowHeaders: any): void; + set mount(arg: any); + get mount(): any; + _mount: any; + generateEmailVerifyTokenExpiresAt(): Date; + generatePasswordResetTokenExpiresAt(): Date; + generateSessionExpiresAt(): Date; + get invalidLinkURL(): any; + get invalidVerificationLinkURL(): any; + get linkSendSuccessURL(): any; + get linkSendFailURL(): any; + get verifyEmailSuccessURL(): any; + get choosePasswordURL(): any; + get requestResetPasswordURL(): string; + get passwordResetSuccessURL(): any; + get parseFrameURL(): any; + get verifyEmailURL(): string; + get pagesEndpoint(): any; +} +declare namespace Config { + export { __esModule, Config, _default as default }; +} +declare var __esModule: boolean; +declare var _default: typeof Config; diff --git a/types/Controllers/AdaptableController.d.ts b/types/Controllers/AdaptableController.d.ts new file mode 100644 index 0000000000..ffbe056405 --- /dev/null +++ b/types/Controllers/AdaptableController.d.ts @@ -0,0 +1,13 @@ +export var __esModule: boolean; +export default _default; +export class AdaptableController { + static validateAdapter(adapter: any, self: any, ExpectedType: any): void; + constructor(adapter: any, appId: any, options: any); + options: any; + appId: any; + set adapter(arg: any); + get adapter(): any; + expectedAdapterType(): void; + validateAdapter(adapter: any): void; +} +declare var _default: typeof AdaptableController; diff --git a/types/Controllers/AnalyticsController.d.ts b/types/Controllers/AnalyticsController.d.ts new file mode 100644 index 0000000000..d146908ad7 --- /dev/null +++ b/types/Controllers/AnalyticsController.d.ts @@ -0,0 +1,19 @@ +export var __esModule: boolean; +export default _default; +declare const AnalyticsController_base: any; +export class AnalyticsController extends AnalyticsController_base { + [x: string]: any; + appOpened(req: any): Promise<{ + response: any; + } | { + response: {}; + }>; + trackEvent(req: any): Promise<{ + response: any; + } | { + response: {}; + }>; + expectedAdapterType(): typeof _AnalyticsAdapter.AnalyticsAdapter; +} +declare var _default: typeof AnalyticsController; +import _AnalyticsAdapter = require("../Adapters/Analytics/AnalyticsAdapter"); diff --git a/types/Controllers/CacheController.d.ts b/types/Controllers/CacheController.d.ts new file mode 100644 index 0000000000..136ead4b96 --- /dev/null +++ b/types/Controllers/CacheController.d.ts @@ -0,0 +1,31 @@ +export var __esModule: boolean; +export default _default; +/** + * Prefix all calls to the cache via a prefix string, useful when grouping Cache by object type. + * + * eg "Role" or "Session" + */ +export class SubCache { + constructor(prefix: any, cacheController: any, ttl: any); + prefix: any; + cache: any; + ttl: any; + get(key: any): any; + put(key: any, value: any, ttl: any): any; + del(key: any): any; + clear(): any; +} +declare const CacheController_base: any; +export class CacheController extends CacheController_base { + [x: string]: any; + constructor(adapter: any, appId: any, options?: {}); + role: SubCache; + user: SubCache; + graphQL: SubCache; + get(key: any): any; + put(key: any, value: any, ttl: any): any; + del(key: any): any; + clear(): any; + expectedAdapterType(): any; +} +declare var _default: typeof CacheController; diff --git a/types/Controllers/DatabaseController.d.ts b/types/Controllers/DatabaseController.d.ts new file mode 100644 index 0000000000..57f46bd9d4 --- /dev/null +++ b/types/Controllers/DatabaseController.d.ts @@ -0,0 +1,77 @@ +export = DatabaseController; +declare class DatabaseController { + constructor(adapter: any); + adapter: any; + schemaPromise: any; + _transactionalSession: any; + collectionExists(className: any): any; + purgeCollection(className: any): any; + validateClassName(className: any): Promise; + loadSchema(options?: { + clearCache: boolean; + }): any; + loadSchemaIfNeeded(schemaController: any, options?: { + clearCache: boolean; + }): any; + redirectClassNameForKey(className: any, key: any): any; + validateObject(className: any, object: any, query: any, runOptions: any): any; + update(className: any, query: any, update: any, { acl, many, upsert, addsField }: { + acl: any; + many: any; + upsert: any; + addsField: any; + }, skipSanitization: boolean, validateOnly: boolean, validSchemaController: any): any; + collectRelationUpdates(className: any, objectId: any, update: any): any[]; + handleRelationUpdates(className: any, objectId: any, update: any, ops: any): Promise; + addRelation(key: any, fromClassName: any, fromId: any, toId: any): any; + removeRelation(key: any, fromClassName: any, fromId: any, toId: any): any; + destroy(className: any, query: any, { acl }: { + acl: any; + }, validSchemaController: any): any; + create(className: any, object: any, { acl }: { + acl: any; + }, validateOnly: boolean, validSchemaController: any): Promise; + canAddField(schema: any, className: any, object: any, aclGroup: any, runOptions: any): any; + /** + * Delete all classes and clears the schema cache + * + * @param {boolean} fast set to true if it's ok to just delete rows and not indexes + * @returns {Promise} when the deletions completes + */ + deleteEverything(fast?: boolean): Promise; + relatedIds(className: any, key: any, owningId: any, queryOptions: any): any; + owningIds(className: any, key: any, relatedIds: any): any; + reduceInRelation(className: any, query: any, schema: any): Promise; + reduceRelationKeys(className: any, query: any, queryOptions: any): any; + addInObjectIdsIds(ids: any, query: any): any; + addNotInObjectIdsIds(ids: any[], query: any): any; + find(className: any, query: any, { skip, limit, acl, sort, count, keys, op, distinct, pipeline, readPreference, hint, caseInsensitive, explain }: { + skip: any; + limit: any; + acl: any; + sort?: {}; + count: any; + keys: any; + op: any; + distinct: any; + pipeline: any; + readPreference: any; + hint: any; + caseInsensitive?: boolean; + explain: any; + }, auth: {}, validSchemaController: any): any; + deleteSchema(className: any): any; + objectToEntriesStrings(query: any): string[]; + reduceOrOperation(query: any): any; + reduceAndOperation(query: any): any; + addPointerPermissions(schema: any, className: any, operation: any, query: any, aclGroup?: any[]): any; + addProtectedFields(schema: any, className: any, query?: {}, aclGroup?: any[], auth?: {}, queryOptions?: {}): any; + createTransactionalSession(): any; + commitTransactionalSession(): any; + abortTransactionalSession(): any; + performInitialization(): Promise; +} +declare namespace DatabaseController { + export { validateQuery as _validateQuery }; +} +declare function validateQuery(query: any): void; diff --git a/types/Controllers/FilesController.d.ts b/types/Controllers/FilesController.d.ts new file mode 100644 index 0000000000..e49434dcf2 --- /dev/null +++ b/types/Controllers/FilesController.d.ts @@ -0,0 +1,21 @@ +export var __esModule: boolean; +export default _default; +declare const FilesController_base: any; +export class FilesController extends FilesController_base { + [x: string]: any; + getFileData(config: any, filename: any): any; + createFile(config: any, filename: any, data: any, contentType: any, options: any): any; + deleteFile(config: any, filename: any): any; + getMetadata(filename: any): any; + /** + * Find file references in REST-format object and adds the url key + * with the current mount point and app id. + * Object may be a single object or list of REST-format objects. + */ + expandFilesInObject(config: any, object: any): void; + expectedAdapterType(): typeof _FilesAdapter.FilesAdapter; + handleFileStream(config: any, filename: any, req: any, res: any, contentType: any): any; + validateFilename(filename: any): any; +} +declare var _default: typeof FilesController; +import _FilesAdapter = require("../Adapters/Files/FilesAdapter"); diff --git a/types/Controllers/HooksController.d.ts b/types/Controllers/HooksController.d.ts new file mode 100644 index 0000000000..f3d318bf51 --- /dev/null +++ b/types/Controllers/HooksController.d.ts @@ -0,0 +1,24 @@ +export var __esModule: boolean; +export default _default; +export class HooksController { + constructor(applicationId: any, databaseController: any, webhookKey: any); + _applicationId: any; + _webhookKey: any; + database: any; + load(): any; + getFunction(functionName: any): any; + getFunctions(): any; + getTrigger(className: any, triggerName: any): any; + getTriggers(): any; + deleteFunction(functionName: any): any; + deleteTrigger(className: any, triggerName: any): any; + _getHooks(query?: {}): any; + _removeHooks(query: any): any; + saveHook(hook: any): any; + addHookToTriggers(hook: any): void; + addHook(hook: any): any; + createOrUpdateHook(aHook: any): any; + createHook(aHook: any): any; + updateHook(aHook: any): any; +} +declare var _default: typeof HooksController; diff --git a/types/Controllers/LiveQueryController.d.ts b/types/Controllers/LiveQueryController.d.ts new file mode 100644 index 0000000000..a02cdadc8b --- /dev/null +++ b/types/Controllers/LiveQueryController.d.ts @@ -0,0 +1,15 @@ +export var __esModule: boolean; +export default _default; +export class LiveQueryController { + constructor(config: any); + classNames: Set; + liveQueryPublisher: _ParseCloudCodePublisher.ParseCloudCodePublisher; + onAfterSave(className: any, currentObject: any, originalObject: any, classLevelPermissions: any): void; + onAfterDelete(className: any, currentObject: any, originalObject: any, classLevelPermissions: any): void; + hasLiveQuery(className: any): boolean; + _makePublisherRequest(currentObject: any, originalObject: any, classLevelPermissions: any): { + object: any; + }; +} +declare var _default: typeof LiveQueryController; +import _ParseCloudCodePublisher = require("../LiveQuery/ParseCloudCodePublisher"); diff --git a/types/Controllers/LoggerController.d.ts b/types/Controllers/LoggerController.d.ts new file mode 100644 index 0000000000..b2c73f4ac1 --- /dev/null +++ b/types/Controllers/LoggerController.d.ts @@ -0,0 +1,50 @@ +export var __esModule: boolean; +export default _default; +export namespace LogLevel { + const INFO: string; + const ERROR: string; +} +export namespace LogOrder { + const DESCENDING: string; + const ASCENDING: string; +} +declare const LoggerController_base: any; +export class LoggerController extends LoggerController_base { + [x: string]: any; + static validDateTime(date: any): any; + static parseOptions(options?: {}): { + from: any; + until: any; + size: number; + order: any; + level: any; + }; + constructor(adapter: any, appId: any, options?: { + logLevel: string; + }); + maskSensitiveUrl(urlString: any): string; + maskSensitive(argArray: any): any; + log(level: any, args: any): void; + info(...args: any[]): void; + error(...args: any[]): void; + warn(...args: any[]): void; + verbose(...args: any[]): void; + debug(...args: any[]): void; + silly(...args: any[]): void; + logRequest({ method, url, headers, body }: { + method: any; + url: any; + headers: any; + body: any; + }): void; + logResponse({ method, url, result }: { + method: any; + url: any; + result: any; + }): void; + truncateLogMessage(string: any): any; + getLogs(options?: {}): any; + expectedAdapterType(): typeof _LoggerAdapter.LoggerAdapter; +} +declare var _default: typeof LoggerController; +import _LoggerAdapter = require("../Adapters/Logger/LoggerAdapter"); diff --git a/types/Controllers/ParseGraphQLController.d.ts b/types/Controllers/ParseGraphQLController.d.ts new file mode 100644 index 0000000000..5fdd386de1 --- /dev/null +++ b/types/Controllers/ParseGraphQLController.d.ts @@ -0,0 +1,23 @@ +export var __esModule: boolean; +export default _default; +export const GraphQLConfigClassName: "_GraphQLConfig"; +export const GraphQLConfigId: "1"; +export const GraphQLConfigKey: "config"; +declare var _default: typeof ParseGraphQLController; +declare class ParseGraphQLController { + constructor(params?: {}); + databaseController: any; + cacheController: any; + isMounted: boolean; + configCacheKey: string; + getGraphQLConfig(): Promise; + updateGraphQLConfig(graphQLConfig: any): Promise<{ + response: { + result: boolean; + }; + }>; + _getCachedGraphQLConfig(): any; + _putCachedGraphQLConfig(graphQLConfig: any): any; + _validateGraphQLConfig(graphQLConfig: any): void; + _validateClassConfig(classConfig: any): string; +} diff --git a/types/Controllers/PushController.d.ts b/types/Controllers/PushController.d.ts new file mode 100644 index 0000000000..1a62511276 --- /dev/null +++ b/types/Controllers/PushController.d.ts @@ -0,0 +1,32 @@ +export var __esModule: boolean; +export default _default; +export class PushController { + /** + * Get expiration time from the request body. + * @param {Object} request A request object + * @returns {Number|undefined} The expiration time if it exists in the request + */ + static getExpirationTime(body?: {}): number | undefined; + static getExpirationInterval(body?: {}): number; + /** + * Get push time from the request body. + * @param {Object} request A request object + * @returns {Number|undefined} The push time if it exists in the request + */ + static getPushTime(body?: {}): number | undefined; + /** + * Checks if a ISO8601 formatted date contains a timezone component + * @param pushTimeParam {string} + * @returns {boolean} + */ + static pushTimeHasTimezoneComponent(pushTimeParam: string): boolean; + /** + * Converts a date to ISO format in UTC time and strips the timezone if `isLocalTime` is true + * @param date {Date} + * @param isLocalTime {boolean} + * @returns {string} + */ + static formatPushTime({ date, isLocalTime }: Date): string; + sendPush(body: {}, where: {}, config: any, auth: any, onPushStatusSaved?: () => void, now?: Date): Promise; +} +declare var _default: typeof PushController; diff --git a/types/Controllers/SchemaController.d.ts b/types/Controllers/SchemaController.d.ts new file mode 100644 index 0000000000..607280050a --- /dev/null +++ b/types/Controllers/SchemaController.d.ts @@ -0,0 +1,347 @@ +export var __esModule: boolean; +export var SchemaController: typeof SchemaController; +export default SchemaController; +export function classNameIsValid(className: any): boolean; +export function fieldNameIsValid(fieldName: any, className: any): boolean; +export function invalidClassNameMessage(className: any): string; +export function buildMergedSchemaObject(existingFields: any, putRequest: any): {}; +export const defaultColumns: Readonly<{ + _Default: { + objectId: { + type: string; + }; + createdAt: { + type: string; + }; + updatedAt: { + type: string; + }; + ACL: { + type: string; + }; + }; + _User: { + username: { + type: string; + }; + password: { + type: string; + }; + email: { + type: string; + }; + emailVerified: { + type: string; + }; + authData: { + type: string; + }; + }; + _Installation: { + installationId: { + type: string; + }; + deviceToken: { + type: string; + }; + channels: { + type: string; + }; + deviceType: { + type: string; + }; + pushType: { + type: string; + }; + GCMSenderId: { + type: string; + }; + timeZone: { + type: string; + }; + localeIdentifier: { + type: string; + }; + badge: { + type: string; + }; + appVersion: { + type: string; + }; + appName: { + type: string; + }; + appIdentifier: { + type: string; + }; + parseVersion: { + type: string; + }; + }; + _Role: { + name: { + type: string; + }; + users: { + type: string; + targetClass: string; + }; + roles: { + type: string; + targetClass: string; + }; + }; + _Session: { + restricted: { + type: string; + }; + user: { + type: string; + targetClass: string; + }; + installationId: { + type: string; + }; + sessionToken: { + type: string; + }; + expiresAt: { + type: string; + }; + createdWith: { + type: string; + }; + }; + _Product: { + productIdentifier: { + type: string; + }; + download: { + type: string; + }; + downloadName: { + type: string; + }; + icon: { + type: string; + }; + order: { + type: string; + }; + title: { + type: string; + }; + subtitle: { + type: string; + }; + }; + _PushStatus: { + pushTime: { + type: string; + }; + source: { + type: string; + }; + query: { + type: string; + }; + payload: { + type: string; + }; + title: { + type: string; + }; + expiry: { + type: string; + }; + expiration_interval: { + type: string; + }; + status: { + type: string; + }; + numSent: { + type: string; + }; + numFailed: { + type: string; + }; + pushHash: { + type: string; + }; + errorMessage: { + type: string; + }; + sentPerType: { + type: string; + }; + failedPerType: { + type: string; + }; + sentPerUTCOffset: { + type: string; + }; + failedPerUTCOffset: { + type: string; + }; + count: { + type: string; + }; + }; + _JobStatus: { + jobName: { + type: string; + }; + source: { + type: string; + }; + status: { + type: string; + }; + message: { + type: string; + }; + params: { + type: string; + }; + finishedAt: { + type: string; + }; + }; + _JobSchedule: { + jobName: { + type: string; + }; + description: { + type: string; + }; + params: { + type: string; + }; + startAfter: { + type: string; + }; + daysOfWeek: { + type: string; + }; + timeOfDay: { + type: string; + }; + lastRun: { + type: string; + }; + repeatMinutes: { + type: string; + }; + }; + _Hooks: { + functionName: { + type: string; + }; + className: { + type: string; + }; + triggerName: { + type: string; + }; + url: { + type: string; + }; + }; + _GlobalConfig: { + objectId: { + type: string; + }; + params: { + type: string; + }; + masterKeyOnly: { + type: string; + }; + }; + _GraphQLConfig: { + objectId: { + type: string; + }; + config: { + type: string; + }; + }; + _Audience: { + objectId: { + type: string; + }; + name: { + type: string; + }; + query: { + type: string; + }; + lastUsed: { + type: string; + }; + timesUsed: { + type: string; + }; + }; + _Idempotency: { + reqId: { + type: string; + }; + expire: { + type: string; + }; + }; +}>; +export const systemClasses: readonly string[]; +export function convertSchemaToAdapterSchema(schema: any): any; +export const VolatileClassesSchemas: any[]; +declare class SchemaController { + static testPermissions(classPermissions: any, aclGroup: any, operation: any): boolean; + static validatePermission(classPermissions: any, className: any, aclGroup: any, operation: any, action: any): true | Promise; + constructor(databaseAdapter: any); + _dbAdapter: any; + schemaData: SchemaData; + protectedFields: any; + userIdRegEx: RegExp; + reloadData(options?: { + clearCache: boolean; + }): any; + reloadDataPromise: any; + getAllClasses(options?: { + clearCache: boolean; + }): any; + setAllClasses(): any; + getOneSchema(className: any, allowVolatileClasses?: boolean, options?: { + clearCache: boolean; + }): any; + addClassIfNotExists(className: any, fields: {}, classLevelPermissions: any, indexes?: {}): Promise; + updateClass(className: any, submittedFields: any, classLevelPermissions: any, indexes: any, database: any): any; + enforceClassExists(className: any): Promise; + validateNewClass(className: any, fields: {}, classLevelPermissions: any): { + code: any; + error: any; + }; + validateSchemaData(className: any, fields: any, classLevelPermissions: any, existingFieldNames: any): { + code: any; + error: any; + }; + setPermissions(className: any, perms: any, newSchema: any): Promise; + enforceFieldExists(className: any, fieldName: any, type: any): any; + ensureFields(fields: any): void; + deleteField(fieldName: any, className: any, database: any): any; + deleteFields(fieldNames: any, className: any, database: any): any; + validateObject(className: any, object: any, query: any): Promise; + validateRequiredColumns(className: any, object: any, query: any): Promise; + testPermissionsForClassName(className: any, aclGroup: any, operation: any): boolean; + validatePermission(className: any, aclGroup: any, operation: any, action: any): true | Promise; + getClassLevelPermissions(className: any): any; + getExpectedType(className: any, fieldName: any): any; + hasClass(className: any): any; +} +export function load(dbAdapter: any, options: any): any; +declare class SchemaData { + constructor(allSchemas?: any[], protectedFields?: {}); + __data: {}; + __protectedFields: {}; +} diff --git a/types/Controllers/UserController.d.ts b/types/Controllers/UserController.d.ts new file mode 100644 index 0000000000..a4ce1aaf36 --- /dev/null +++ b/types/Controllers/UserController.d.ts @@ -0,0 +1,46 @@ +export var __esModule: boolean; +export default _default; +declare const UserController_base: any; +export class UserController extends UserController_base { + [x: string]: any; + constructor(adapter: any, appId: any, options?: {}); + get config(): any; + validateAdapter(adapter: any): void; + expectedAdapterType(): any; + get shouldVerifyEmails(): any; + setEmailVerifyToken(user: any): void; + verifyEmail(username: any, token: any): any; + checkResetTokenValidity(username: any, token: any): any; + getUserIfNeeded(user: any): any; + sendVerificationEmail(user: any): void; + /** + * Regenerates the given user's email verification token + * + * @param user + * @returns {*} + */ + regenerateEmailVerifyToken(user: any): any; + resendVerificationEmail(username: any): any; + setPasswordResetToken(email: any): any; + sendPasswordResetEmail(email: any): Promise; + updatePassword(username: any, token: any, password: any): any; + defaultVerificationEmail({ link, user, appName }: { + link: any; + user: any; + appName: any; + }): { + text: string; + to: any; + subject: string; + }; + defaultResetPasswordEmail({ link, user, appName }: { + link: any; + user: any; + appName: any; + }): { + text: string; + to: any; + subject: string; + }; +} +declare var _default: typeof UserController; diff --git a/types/Controllers/index.d.ts b/types/Controllers/index.d.ts new file mode 100644 index 0000000000..3777276106 --- /dev/null +++ b/types/Controllers/index.d.ts @@ -0,0 +1,47 @@ +export var __esModule: boolean; +export function getControllers(options: any): { + loggerController: _LoggerController.LoggerController; + filesController: _FilesController.FilesController; + userController: _UserController.UserController; + pushController: _PushController.PushController; + hasPushScheduledSupport: boolean; + hasPushSupport: boolean; + pushWorker: _PushWorker.PushWorker; + pushControllerQueue: _PushQueue.PushQueue; + analyticsController: _AnalyticsController.AnalyticsController; + cacheController: _CacheController.CacheController; + parseGraphQLController: any; + liveQueryController: _LiveQueryController.LiveQueryController; + databaseController: any; + hooksController: _HooksController.HooksController; + authDataManager: any; + schemaCache: any; +}; +export function getLoggerController(options: any): _LoggerController.LoggerController; +export function getFilesController(options: any): _FilesController.FilesController; +export function getUserController(options: any): _UserController.UserController; +export function getCacheController(options: any): _CacheController.CacheController; +export function getParseGraphQLController(options: any, controllerDeps: any): any; +export function getAnalyticsController(options: any): _AnalyticsController.AnalyticsController; +export function getLiveQueryController(options: any): _LiveQueryController.LiveQueryController; +export function getDatabaseController(options: any): any; +export function getHooksController(options: any, databaseController: any): _HooksController.HooksController; +export function getPushController(options: any): { + pushController: _PushController.PushController; + hasPushSupport: boolean; + hasPushScheduledSupport: boolean; + pushControllerQueue: _PushQueue.PushQueue; + pushWorker: _PushWorker.PushWorker; +}; +export function getAuthDataManager(options: any): any; +export function getDatabaseAdapter(databaseURI: any, collectionPrefix: any, databaseOptions: any): any; +import _LoggerController = require("./LoggerController"); +import _FilesController = require("./FilesController"); +import _UserController = require("./UserController"); +import _PushController = require("./PushController"); +import _PushWorker = require("../Push/PushWorker"); +import _PushQueue = require("../Push/PushQueue"); +import _AnalyticsController = require("./AnalyticsController"); +import _CacheController = require("./CacheController"); +import _LiveQueryController = require("./LiveQueryController"); +import _HooksController = require("./HooksController"); diff --git a/types/Controllers/types.d.ts b/types/Controllers/types.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/Deprecator/Deprecations.d.ts b/types/Deprecator/Deprecations.d.ts new file mode 100644 index 0000000000..2cad12b061 --- /dev/null +++ b/types/Deprecator/Deprecations.d.ts @@ -0,0 +1,376 @@ +declare const _exports: { + [n: number]: { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + length: number; + toString(): string; + toLocaleString(): string; + pop(): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + push(...items: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]): number; + concat(...items: ConcatArray<{ + optionKey: string; + changeNewDefault: string; + solution: string; + }>[]): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + concat(...items: ({ + optionKey: string; + changeNewDefault: string; + solution: string; + } | ConcatArray<{ + optionKey: string; + changeNewDefault: string; + solution: string; + }>)[]): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + join(separator?: string): string; + reverse(): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + shift(): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + slice(start?: number, end?: number): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + sort(compareFn?: (a: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, b: { + optionKey: string; + changeNewDefault: string; + solution: string; + }) => number): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + splice(start: number, deleteCount?: number): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + splice(start: number, deleteCount: number, ...items: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + unshift(...items: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]): number; + indexOf(searchElement: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, fromIndex?: number): number; + lastIndexOf(searchElement: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, fromIndex?: number): number; + every(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => value is S, thisArg?: any): this is S[]; + every(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => unknown, thisArg?: any): boolean; + some(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => unknown, thisArg?: any): boolean; + forEach(callbackfn: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => void, thisArg?: any): void; + map(callbackfn: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => U, thisArg?: any): U[]; + filter(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => value is S_1, thisArg?: any): S_1[]; + filter(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => unknown, thisArg?: any): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + reduce(callbackfn: (previousValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentIndex: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => { + optionKey: string; + changeNewDefault: string; + solution: string; + }): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + reduce(callbackfn: (previousValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentIndex: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => { + optionKey: string; + changeNewDefault: string; + solution: string; + }, initialValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + reduce(callbackfn: (previousValue: U_1, currentValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentIndex: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => U_1, initialValue: U_1): U_1; + reduceRight(callbackfn: (previousValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentIndex: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => { + optionKey: string; + changeNewDefault: string; + solution: string; + }): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + reduceRight(callbackfn: (previousValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentIndex: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => { + optionKey: string; + changeNewDefault: string; + solution: string; + }, initialValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + reduceRight(callbackfn: (previousValue: U_2, currentValue: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, currentIndex: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => U_2, initialValue: U_2): U_2; + find(predicate: (this: void, value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, obj: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => value is S_2, thisArg?: any): S_2; + find(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, obj: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => unknown, thisArg?: any): { + optionKey: string; + changeNewDefault: string; + solution: string; + }; + findIndex(predicate: (value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, obj: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => unknown, thisArg?: any): number; + fill(value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, start?: number, end?: number): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + copyWithin(target: number, start: number, end?: number): { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]; + [Symbol.iterator](): IterableIterator<{ + optionKey: string; + changeNewDefault: string; + solution: string; + }>; + entries(): IterableIterator<[number, { + optionKey: string; + changeNewDefault: string; + solution: string; + }]>; + keys(): IterableIterator; + values(): IterableIterator<{ + optionKey: string; + changeNewDefault: string; + solution: string; + }>; + [Symbol.unscopables](): { + copyWithin: boolean; + entries: boolean; + fill: boolean; + find: boolean; + findIndex: boolean; + keys: boolean; + values: boolean; + }; + includes(searchElement: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, fromIndex?: number): boolean; + flatMap(callback: (this: This, value: { + optionKey: string; + changeNewDefault: string; + solution: string; + }, index: number, array: { + optionKey: string; + changeNewDefault: string; + solution: string; + }[]) => U_3 | readonly U_3[], thisArg?: This): U_3[]; + flat(this: A, depth?: D): FlatArray[]; + flat(this: (readonly U_4[])[], depth?: 1): U_4[]; +}; +export = _exports; diff --git a/types/Deprecator/Deprecator.d.ts b/types/Deprecator/Deprecator.d.ts new file mode 100644 index 0000000000..54d3f67808 --- /dev/null +++ b/types/Deprecator/Deprecator.d.ts @@ -0,0 +1,33 @@ +export = Deprecator; +/** + * The deprecator class. + */ +declare class Deprecator { + /** + * Scans the Parse Server for deprecated options. + * This needs to be called before setting option defaults, otherwise it + * becomes indistinguishable whether an option has been set manually or + * by default. + * @param {any} options The Parse Server options. + */ + static scanParseServerOptions(options: any): void; + /** + * Returns the deprecation definitions. + * @returns {Array} The deprecations. + */ + static _getDeprecations(): Array; + /** + * Logs a deprecation warning for a Parse Server option. + * @param {String} optionKey The option key incl. its path, e.g. `security.enableCheck`. + * @param {String} envKey The environment key, e.g. `PARSE_SERVER_SECURITY`. + * @param {String} changeNewKey Set the new key name if the current key will be replaced, + * or set to an empty string if the current key will be removed without replacement. + * @param {String} changeNewDefault Set the new default value if the key's default value + * will change in a future version. + * @param {String} [solution] The instruction to resolve this deprecation warning. This + * message must not include the warning that the parameter is deprecated, that is + * automatically added to the message. It should only contain the instruction on how + * to resolve this warning. + */ + static _log({ optionKey, envKey, changeNewKey, changeNewDefault, solution }: string): void; +} diff --git a/types/GraphQL/ParseGraphQLSchema.d.ts b/types/GraphQL/ParseGraphQLSchema.d.ts new file mode 100644 index 0000000000..22d71e1798 --- /dev/null +++ b/types/GraphQL/ParseGraphQLSchema.d.ts @@ -0,0 +1,56 @@ +export var __esModule: boolean; +export class ParseGraphQLSchema { + constructor(params?: {}); + parseGraphQLController: any; + databaseController: any; + log: any; + graphQLCustomTypeDefs: any; + appId: any; + schemaCache: any; + load(): Promise; + parseClasses: any; + parseClassesString: string; + parseGraphQLConfig: any; + functionNames: any[]; + functionNamesString: string; + parseClassTypes: {}; + viewerType: any; + graphQLAutoSchema: _graphql.GraphQLSchema; + graphQLSchema: any; + graphQLTypes: any[]; + graphQLQueries: {}; + graphQLMutations: {}; + graphQLSubscriptions: {}; + graphQLSchemaDirectivesDefinitions: any; + graphQLSchemaDirectives: {}; + relayNodeInterface: any; + addGraphQLType(type: any, throwError?: boolean, ignoreReserved?: boolean, ignoreConnection?: boolean): any; + addGraphQLQuery(fieldName: any, field: any, throwError?: boolean, ignoreReserved?: boolean): any; + addGraphQLMutation(fieldName: any, field: any, throwError?: boolean, ignoreReserved?: boolean): any; + handleError(error: any): void; + _initializeSchemaAndConfig(): Promise<{ + parseGraphQLConfig: any; + }>; + schemaController: any; + /** + * Gets all classes found by the `schemaController` + * minus those filtered out by the app's parseGraphQLConfig. + */ + _getClassesForSchema(parseGraphQLConfig: any): Promise; + isUsersClassDisabled: boolean; + /** + * This method returns a list of tuples + * that provide the parseClass along with + * its parseClassConfig where provided. + */ + _getParseClassesWithConfig(parseClasses: any, parseGraphQLConfig: any): any; + _getFunctionNames(): Promise; + /** + * Checks for changes to the parseClasses + * objects (i.e. database schema) or to + * the parseGraphQLConfig object. If no + * changes are found, return true; + */ + _hasSchemaInputChanged(params: any): boolean; +} +import _graphql = require("graphql"); diff --git a/types/GraphQL/ParseGraphQLServer.d.ts b/types/GraphQL/ParseGraphQLServer.d.ts new file mode 100644 index 0000000000..837d7de663 --- /dev/null +++ b/types/GraphQL/ParseGraphQLServer.d.ts @@ -0,0 +1,24 @@ +export var __esModule: boolean; +export class ParseGraphQLServer { + constructor(parseServer: any, config: any); + parseServer: any; + config: any; + parseGraphQLController: any; + log: any; + parseGraphQLSchema: _ParseGraphQLSchema.ParseGraphQLSchema; + _getGraphQLOptions(req: any): Promise<{ + schema: any; + context: { + info: any; + config: any; + auth: any; + }; + formatError: (error: any) => any; + }>; + _transformMaxUploadSizeToBytes(maxUploadSize: any): number; + applyGraphQL(app: any): void; + applyPlayground(app: any): void; + createSubscriptions(server: any): void; + setGraphQLConfig(graphQLConfig: any): any; +} +import _ParseGraphQLSchema = require("./ParseGraphQLSchema"); diff --git a/types/GraphQL/helpers/objectsMutations.d.ts b/types/GraphQL/helpers/objectsMutations.d.ts new file mode 100644 index 0000000000..3a0c64c4cd --- /dev/null +++ b/types/GraphQL/helpers/objectsMutations.d.ts @@ -0,0 +1,4 @@ +export var __esModule: boolean; +export function createObject(className: any, fields: any, config: any, auth: any, info: any): Promise; +export function updateObject(className: any, objectId: any, fields: any, config: any, auth: any, info: any): Promise; +export function deleteObject(className: any, objectId: any, config: any, auth: any, info: any): Promise; diff --git a/types/GraphQL/helpers/objectsQueries.d.ts b/types/GraphQL/helpers/objectsQueries.d.ts new file mode 100644 index 0000000000..08b82a579f --- /dev/null +++ b/types/GraphQL/helpers/objectsQueries.d.ts @@ -0,0 +1,18 @@ +export var __esModule: boolean; +export function needToGetAllKeys(fields: any, keys: any, parseClasses: any): any; +export function getObject(className: any, objectId: any, keys: any, include: any, readPreference: any, includeReadPreference: any, config: any, auth: any, info: any, parseClasses: any): Promise; +export function findObjects(className: any, where: any, order: any, skipInput: any, first: any, after: any, last: any, before: any, keys: any, include: any, includeAll: any, readPreference: any, includeReadPreference: any, subqueryReadPreference: any, config: any, auth: any, info: any, selectedFields: any, parseClasses: any): Promise<{ + edges: any; + pageInfo: { + hasPreviousPage: boolean; + startCursor: any; + endCursor: any; + hasNextPage: boolean; + }; + count: any; +}>; +export function calculateSkipAndLimit(skipInput: any, first: any, after: any, last: any, before: any, maxLimit: any): { + skip: any; + limit: any; + needToPreCount: boolean; +}; diff --git a/types/GraphQL/loaders/defaultGraphQLMutations.d.ts b/types/GraphQL/loaders/defaultGraphQLMutations.d.ts new file mode 100644 index 0000000000..7fa503a616 --- /dev/null +++ b/types/GraphQL/loaders/defaultGraphQLMutations.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/defaultGraphQLQueries.d.ts b/types/GraphQL/loaders/defaultGraphQLQueries.d.ts new file mode 100644 index 0000000000..7fa503a616 --- /dev/null +++ b/types/GraphQL/loaders/defaultGraphQLQueries.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/defaultGraphQLTypes.d.ts b/types/GraphQL/loaders/defaultGraphQLTypes.d.ts new file mode 100644 index 0000000000..f6788c0f53 --- /dev/null +++ b/types/GraphQL/loaders/defaultGraphQLTypes.d.ts @@ -0,0 +1,226 @@ +export var __esModule: boolean; +export var ARRAY_RESULT: _graphql.GraphQLUnionType; +export class TypeValidationError extends Error { + constructor(value: any, type: any); +} +export function parseStringValue(value: any): string; +export function parseIntValue(value: any): number; +export function parseFloatValue(value: any): number; +export function parseBooleanValue(value: any): boolean; +export function parseValue(value: any): any; +export function parseListValues(values: any): any; +export function parseObjectFields(fields: any): any; +export const ANY: _graphql.GraphQLScalarType; +export const OBJECT: _graphql.GraphQLScalarType; +export function parseDateIsoValue(value: any): Date; +export function serializeDateIso(value: any): string; +export const DATE: _graphql.GraphQLScalarType; +export const BYTES: _graphql.GraphQLScalarType; +export function parseFileValue(value: any): any; +export const FILE: _graphql.GraphQLScalarType; +export const FILE_INFO: _graphql.GraphQLObjectType; +export const FILE_INPUT: _graphql.GraphQLInputObjectType; +export namespace GEO_POINT_FIELDS { + namespace latitude { + const description: string; + const type: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + } + namespace longitude { + const description_1: string; + export { description_1 as description }; + const type_1: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_1 as type }; + } +} +export const GEO_POINT_INPUT: _graphql.GraphQLInputObjectType; +export const GEO_POINT: _graphql.GraphQLObjectType; +export const POLYGON_INPUT: _graphql.GraphQLList<_graphql.GraphQLType>; +export const POLYGON: _graphql.GraphQLList<_graphql.GraphQLType>; +export const USER_ACL_INPUT: _graphql.GraphQLInputObjectType; +export const ROLE_ACL_INPUT: _graphql.GraphQLInputObjectType; +export const PUBLIC_ACL_INPUT: _graphql.GraphQLInputObjectType; +export const ACL_INPUT: _graphql.GraphQLInputObjectType; +export const USER_ACL: _graphql.GraphQLObjectType; +export const ROLE_ACL: _graphql.GraphQLObjectType; +export const PUBLIC_ACL: _graphql.GraphQLObjectType; +export const ACL: _graphql.GraphQLObjectType; +export const OBJECT_ID: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; +export namespace CLASS_NAME_ATT { + const description_2: string; + export { description_2 as description }; + const type_2: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_2 as type }; +} +export namespace GLOBAL_OR_OBJECT_ID_ATT { + const description_3: string; + export { description_3 as description }; + export { OBJECT_ID as type }; +} +export namespace OBJECT_ID_ATT { + const description_4: string; + export { description_4 as description }; + export { OBJECT_ID as type }; +} +export namespace CREATED_AT_ATT { + const description_5: string; + export { description_5 as description }; + const type_3: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_3 as type }; +} +export namespace UPDATED_AT_ATT { + const description_6: string; + export { description_6 as description }; + const type_4: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_4 as type }; +} +export namespace INPUT_FIELDS { + namespace ACL { + export { ACL as type }; + } +} +export namespace CREATE_RESULT_FIELDS { + export { OBJECT_ID_ATT as objectId }; + export { CREATED_AT_ATT as createdAt }; +} +export namespace UPDATE_RESULT_FIELDS { + export { UPDATED_AT_ATT as updatedAt }; +} +export const PARSE_OBJECT_FIELDS: any; +export const PARSE_OBJECT: _graphql.GraphQLInterfaceType; +export namespace SESSION_TOKEN_ATT { + const description_7: string; + export { description_7 as description }; + const type_5: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_5 as type }; +} +export const READ_PREFERENCE: _graphql.GraphQLEnumType; +export namespace READ_PREFERENCE_ATT { + const description_8: string; + export { description_8 as description }; + export { READ_PREFERENCE as type }; +} +export namespace INCLUDE_READ_PREFERENCE_ATT { + const description_9: string; + export { description_9 as description }; + export { READ_PREFERENCE as type }; +} +export namespace SUBQUERY_READ_PREFERENCE_ATT { + const description_10: string; + export { description_10 as description }; + export { READ_PREFERENCE as type }; +} +export const READ_OPTIONS_INPUT: _graphql.GraphQLInputObjectType; +export namespace READ_OPTIONS_ATT { + const description_11: string; + export { description_11 as description }; + export { READ_OPTIONS_INPUT as type }; +} +export namespace WHERE_ATT { + const description_12: string; + export { description_12 as description }; + export { OBJECT as type }; +} +export namespace SKIP_ATT { + const description_13: string; + export { description_13 as description }; + const type_6: _graphql.GraphQLScalarType; + export { type_6 as type }; +} +export namespace LIMIT_ATT { + const description_14: string; + export { description_14 as description }; + const type_7: _graphql.GraphQLScalarType; + export { type_7 as type }; +} +export namespace COUNT_ATT { + const description_15: string; + export { description_15 as description }; + const type_8: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_8 as type }; +} +export const SEARCH_INPUT: _graphql.GraphQLInputObjectType; +export const TEXT_INPUT: _graphql.GraphQLInputObjectType; +export const BOX_INPUT: _graphql.GraphQLInputObjectType; +export const WITHIN_INPUT: _graphql.GraphQLInputObjectType; +export const CENTER_SPHERE_INPUT: _graphql.GraphQLInputObjectType; +export const GEO_WITHIN_INPUT: _graphql.GraphQLInputObjectType; +export const GEO_INTERSECTS_INPUT: _graphql.GraphQLInputObjectType; +export function equalTo(type: any): { + description: string; + type: any; +}; +export function notEqualTo(type: any): { + description: string; + type: any; +}; +export function lessThan(type: any): { + description: string; + type: any; +}; +export function lessThanOrEqualTo(type: any): { + description: string; + type: any; +}; +export function greaterThan(type: any): { + description: string; + type: any; +}; +export function greaterThanOrEqualTo(type: any): { + description: string; + type: any; +}; +export function inOp(type: any): { + description: string; + type: _graphql.GraphQLList<_graphql.GraphQLType>; +}; +export function notIn(type: any): { + description: string; + type: _graphql.GraphQLList<_graphql.GraphQLType>; +}; +export namespace exists { + const description_16: string; + export { description_16 as description }; + const type_9: _graphql.GraphQLScalarType; + export { type_9 as type }; +} +export namespace matchesRegex { + const description_17: string; + export { description_17 as description }; + const type_10: _graphql.GraphQLScalarType; + export { type_10 as type }; +} +export namespace options { + const description_18: string; + export { description_18 as description }; + const type_11: _graphql.GraphQLScalarType; + export { type_11 as type }; +} +export const SUBQUERY_INPUT: _graphql.GraphQLInputObjectType; +export const SELECT_INPUT: _graphql.GraphQLInputObjectType; +export namespace inQueryKey { + const description_19: string; + export { description_19 as description }; + export { SELECT_INPUT as type }; +} +export namespace notInQueryKey { + const description_20: string; + export { description_20 as description }; + export { SELECT_INPUT as type }; +} +export const ID_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const STRING_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const NUMBER_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const BOOLEAN_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const ARRAY_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const KEY_VALUE_INPUT: _graphql.GraphQLInputObjectType; +export const OBJECT_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const DATE_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const BYTES_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const FILE_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const GEO_POINT_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const POLYGON_WHERE_INPUT: _graphql.GraphQLInputObjectType; +export const ELEMENT: _graphql.GraphQLObjectType; +import _graphql = require("graphql"); +export let ARRAY_RESULT: any; +export function loadArrayResult(parseGraphQLSchema: any, parseClasses: any): void; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/defaultRelaySchema.d.ts b/types/GraphQL/loaders/defaultRelaySchema.d.ts new file mode 100644 index 0000000000..18df194182 --- /dev/null +++ b/types/GraphQL/loaders/defaultRelaySchema.d.ts @@ -0,0 +1,6 @@ +export var __esModule: boolean; +export namespace GLOBAL_ID_ATT { + const description: string; + const type: any; +} +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/filesMutations.d.ts b/types/GraphQL/loaders/filesMutations.d.ts new file mode 100644 index 0000000000..d4a784267e --- /dev/null +++ b/types/GraphQL/loaders/filesMutations.d.ts @@ -0,0 +1,5 @@ +export var __esModule: boolean; +export function handleUpload(upload: any, config: any): Promise<{ + fileInfo: any; +}>; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/functionsMutations.d.ts b/types/GraphQL/loaders/functionsMutations.d.ts new file mode 100644 index 0000000000..7fa503a616 --- /dev/null +++ b/types/GraphQL/loaders/functionsMutations.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/parseClassMutations.d.ts b/types/GraphQL/loaders/parseClassMutations.d.ts new file mode 100644 index 0000000000..4d8f788217 --- /dev/null +++ b/types/GraphQL/loaders/parseClassMutations.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any, parseClass: any, parseClassConfig: any): void; diff --git a/types/GraphQL/loaders/parseClassQueries.d.ts b/types/GraphQL/loaders/parseClassQueries.d.ts new file mode 100644 index 0000000000..4d8f788217 --- /dev/null +++ b/types/GraphQL/loaders/parseClassQueries.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any, parseClass: any, parseClassConfig: any): void; diff --git a/types/GraphQL/loaders/parseClassTypes.d.ts b/types/GraphQL/loaders/parseClassTypes.d.ts new file mode 100644 index 0000000000..d6001299d6 --- /dev/null +++ b/types/GraphQL/loaders/parseClassTypes.d.ts @@ -0,0 +1,6 @@ +export var __esModule: boolean; +export var extractKeysAndInclude: (selectedFields: any) => { + keys: string; + include: string; +}; +export function load(parseGraphQLSchema: any, parseClass: any, parseClassConfig: any): void; diff --git a/types/GraphQL/loaders/schemaDirectives.d.ts b/types/GraphQL/loaders/schemaDirectives.d.ts new file mode 100644 index 0000000000..2eee780c4b --- /dev/null +++ b/types/GraphQL/loaders/schemaDirectives.d.ts @@ -0,0 +1,3 @@ +export var __esModule: boolean; +export const definitions: any; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/schemaMutations.d.ts b/types/GraphQL/loaders/schemaMutations.d.ts new file mode 100644 index 0000000000..7fa503a616 --- /dev/null +++ b/types/GraphQL/loaders/schemaMutations.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/schemaQueries.d.ts b/types/GraphQL/loaders/schemaQueries.d.ts new file mode 100644 index 0000000000..98970f1a92 --- /dev/null +++ b/types/GraphQL/loaders/schemaQueries.d.ts @@ -0,0 +1,3 @@ +export var __esModule: boolean; +export function getClass(name: any, schema: any): Promise; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/schemaTypes.d.ts b/types/GraphQL/loaders/schemaTypes.d.ts new file mode 100644 index 0000000000..315430f111 --- /dev/null +++ b/types/GraphQL/loaders/schemaTypes.d.ts @@ -0,0 +1,47 @@ +export var __esModule: boolean; +export namespace SCHEMA_FIELD_NAME_ATT { + const description: string; + const type: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; +} +export const SCHEMA_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_STRING_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_STRING_FIELD: any; +export const SCHEMA_NUMBER_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_NUMBER_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_BOOLEAN_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_BOOLEAN_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_ARRAY_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_ARRAY_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_OBJECT_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_OBJECT_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_DATE_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_DATE_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_FILE_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_FILE_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_GEO_POINT_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_GEO_POINT_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_POLYGON_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_POLYGON_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_BYTES_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_BYTES_FIELD: _graphql.GraphQLObjectType; +export namespace TARGET_CLASS_ATT { + const description_1: string; + export { description_1 as description }; + const type_1: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_1 as type }; +} +export const SCHEMA_POINTER_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_POINTER_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_RELATION_FIELD_INPUT: _graphql.GraphQLInputObjectType; +export const SCHEMA_RELATION_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_ACL_FIELD: _graphql.GraphQLObjectType; +export const SCHEMA_FIELDS_INPUT: _graphql.GraphQLInputObjectType; +export namespace CLASS_NAME_ATT { + const description_2: string; + export { description_2 as description }; + const type_2: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; + export { type_2 as type }; +} +export const CLASS: _graphql.GraphQLObjectType; +export function load(parseGraphQLSchema: any): void; +import _graphql = require("graphql"); diff --git a/types/GraphQL/loaders/usersMutations.d.ts b/types/GraphQL/loaders/usersMutations.d.ts new file mode 100644 index 0000000000..7fa503a616 --- /dev/null +++ b/types/GraphQL/loaders/usersMutations.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/usersQueries.d.ts b/types/GraphQL/loaders/usersQueries.d.ts new file mode 100644 index 0000000000..950eefd74c --- /dev/null +++ b/types/GraphQL/loaders/usersQueries.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export function getUserFromSessionToken(context: any, queryInfo: any, keysPrefix: any, userId: any): Promise<{ + sessionToken: any; + user?: undefined; +} | { + sessionToken: any; + user: any; +}>; +export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/parseGraphQLUtils.d.ts b/types/GraphQL/parseGraphQLUtils.d.ts new file mode 100644 index 0000000000..506c4597fb --- /dev/null +++ b/types/GraphQL/parseGraphQLUtils.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export function enforceMasterKeyAccess(auth: any): void; +export function toGraphQLError(error: any): _apolloServerCore.ApolloError; +export function extractKeysAndInclude(selectedFields: any): { + keys: string; + include: string; +}; +export function getParseClassMutationConfig(parseClassConfig: any): any; +import _apolloServerCore = require("apollo-server-core"); diff --git a/types/GraphQL/transformers/className.d.ts b/types/GraphQL/transformers/className.d.ts new file mode 100644 index 0000000000..618275fcaf --- /dev/null +++ b/types/GraphQL/transformers/className.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function transformClassNameToGraphQL(className: any): any; diff --git a/types/GraphQL/transformers/constraintType.d.ts b/types/GraphQL/transformers/constraintType.d.ts new file mode 100644 index 0000000000..170a8322cb --- /dev/null +++ b/types/GraphQL/transformers/constraintType.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function transformConstraintTypeToGraphQL(parseType: any, targetClass: any, parseClassTypes: any, fieldName: any): any; diff --git a/types/GraphQL/transformers/inputType.d.ts b/types/GraphQL/transformers/inputType.d.ts new file mode 100644 index 0000000000..0e497a5609 --- /dev/null +++ b/types/GraphQL/transformers/inputType.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function transformInputTypeToGraphQL(parseType: any, targetClass: any, parseClassTypes: any): any; diff --git a/types/GraphQL/transformers/mutation.d.ts b/types/GraphQL/transformers/mutation.d.ts new file mode 100644 index 0000000000..b17f74c629 --- /dev/null +++ b/types/GraphQL/transformers/mutation.d.ts @@ -0,0 +1,6 @@ +export var __esModule: boolean; +export function transformTypes(inputType: any, fields: any, { className, parseGraphQLSchema, req }: { + className: any; + parseGraphQLSchema: any; + req: any; +}): Promise; diff --git a/types/GraphQL/transformers/outputType.d.ts b/types/GraphQL/transformers/outputType.d.ts new file mode 100644 index 0000000000..0472e08c57 --- /dev/null +++ b/types/GraphQL/transformers/outputType.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function transformOutputTypeToGraphQL(parseType: any, targetClass: any, parseClassTypes: any): any; diff --git a/types/GraphQL/transformers/query.d.ts b/types/GraphQL/transformers/query.d.ts new file mode 100644 index 0000000000..66904e8d41 --- /dev/null +++ b/types/GraphQL/transformers/query.d.ts @@ -0,0 +1,3 @@ +export var __esModule: boolean; +export function transformQueryConstraintInputToParse(constraints: any, parentFieldName: any, className: any, parentConstraints: any, parseClasses: any): void; +export function transformQueryInputToParse(constraints: any, className: any, parseClasses: any): void; diff --git a/types/GraphQL/transformers/schemaFields.d.ts b/types/GraphQL/transformers/schemaFields.d.ts new file mode 100644 index 0000000000..3e541eca8b --- /dev/null +++ b/types/GraphQL/transformers/schemaFields.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +export function transformToParse(graphQLSchemaFields: any, existingFields: any): {}; +export function transformToGraphQL(parseSchemaFields: any): { + name: string; + type: any; + targetClassName: any; +}[]; diff --git a/types/KeyPromiseQueue.d.ts b/types/KeyPromiseQueue.d.ts new file mode 100644 index 0000000000..98bae397e0 --- /dev/null +++ b/types/KeyPromiseQueue.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +export class KeyPromiseQueue { + queue: {}; + enqueue(key: any, operation: any): any; + beforeOp(key: any): any; + afterOp(key: any): void; +} diff --git a/types/LiveQuery/Client.d.ts b/types/LiveQuery/Client.d.ts new file mode 100644 index 0000000000..b624d82d7b --- /dev/null +++ b/types/LiveQuery/Client.d.ts @@ -0,0 +1,26 @@ +export var __esModule: boolean; +export class Client { + static pushResponse(parseWebSocket: any, message: any): void; + static pushError(parseWebSocket: any, code: any, error: any, reconnect?: boolean, requestId?: any): void; + constructor(id: any, parseWebSocket: any, hasMasterKey: boolean, sessionToken: any, installationId: any); + id: any; + parseWebSocket: any; + hasMasterKey: boolean; + sessionToken: any; + installationId: any; + roles: any[]; + subscriptionInfos: Map; + pushConnect: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushSubscribe: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushUnsubscribe: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushCreate: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushEnter: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushUpdate: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushDelete: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + pushLeave: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + addSubscriptionInfo(requestId: any, subscriptionInfo: any): void; + getSubscriptionInfo(requestId: any): any; + deleteSubscriptionInfo(requestId: any): boolean; + _pushEvent(type: any): (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; + _toJSONWithFields(parseObjectJSON: any, fields: any): any; +} diff --git a/types/LiveQuery/Id.d.ts b/types/LiveQuery/Id.d.ts new file mode 100644 index 0000000000..a5d4c9da04 --- /dev/null +++ b/types/LiveQuery/Id.d.ts @@ -0,0 +1,8 @@ +export = Id; +declare class Id { + static fromString(str: any): Id; + constructor(className: any, objectId: any); + className: any; + objectId: any; + toString(): string; +} diff --git a/types/LiveQuery/ParseCloudCodePublisher.d.ts b/types/LiveQuery/ParseCloudCodePublisher.d.ts new file mode 100644 index 0000000000..40e060090f --- /dev/null +++ b/types/LiveQuery/ParseCloudCodePublisher.d.ts @@ -0,0 +1,8 @@ +export var __esModule: boolean; +export class ParseCloudCodePublisher { + constructor(config?: {}); + parsePublisher: any; + onCloudCodeAfterSave(request: any): void; + onCloudCodeAfterDelete(request: any): void; + _onCloudCodeMessage(type: any, request: any): void; +} diff --git a/types/LiveQuery/ParseLiveQueryServer.d.ts b/types/LiveQuery/ParseLiveQueryServer.d.ts new file mode 100644 index 0000000000..d9f70fdc8f --- /dev/null +++ b/types/LiveQuery/ParseLiveQueryServer.d.ts @@ -0,0 +1,30 @@ +export var __esModule: boolean; +export class ParseLiveQueryServer { + constructor(server: any, config?: {}, parseServerConfig?: {}); + server: any; + clients: Map; + subscriptions: Map; + config: {}; + keyPairs: Map; + cacheController: import("../Controllers/CacheController").CacheController; + authCache: any; + parseWebSocketServer: _ParseWebSocketServer.ParseWebSocketServer; + subscriber: any; + _inflateParseObject(message: any): void; + _onAfterDelete(message: any): Promise; + _onAfterSave(message: any): Promise; + _onConnect(parseWebsocket: any): void; + _matchesSubscription(parseObject: any, subscription: any): any; + getAuthForSessionToken(sessionToken: any): any; + _matchesCLP(classLevelPermissions: any, object: any, client: any, requestId: any, op: any): Promise; + _getCLPOperation(query: any): "get" | "find"; + _verifyACL(acl: any, token: any): Promise; + _matchesACL(acl: any, client: any, requestId: any): Promise; + _handleConnect(parseWebsocket: any, request: any): Promise; + _hasMasterKey(request: any, validKeyPairs: any): boolean; + _validateKeys(request: any, validKeyPairs: any): boolean; + _handleSubscribe(parseWebsocket: any, request: any): Promise; + _handleUpdateSubscription(parseWebsocket: any, request: any): void; + _handleUnsubscribe(parseWebsocket: any, request: any, notifyClient?: boolean): void; +} +import _ParseWebSocketServer = require("./ParseWebSocketServer"); diff --git a/types/LiveQuery/ParsePubSub.d.ts b/types/LiveQuery/ParsePubSub.d.ts new file mode 100644 index 0000000000..002be3b64b --- /dev/null +++ b/types/LiveQuery/ParsePubSub.d.ts @@ -0,0 +1,5 @@ +export var __esModule: boolean; +export namespace ParsePubSub { + function createPublisher(config: any): any; + function createSubscriber(config: any): any; +} diff --git a/types/LiveQuery/ParseWebSocketServer.d.ts b/types/LiveQuery/ParseWebSocketServer.d.ts new file mode 100644 index 0000000000..75b60d6de2 --- /dev/null +++ b/types/LiveQuery/ParseWebSocketServer.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export class ParseWebSocketServer { + constructor(server: any, onConnect: any, config: any); + server: any; + close(): void; +} +declare const ParseWebSocket_base: any; +export class ParseWebSocket extends ParseWebSocket_base { + [x: string]: any; + constructor(ws: any); + ws: any; + send(message: any): void; +} +export {}; diff --git a/types/LiveQuery/QueryTools.d.ts b/types/LiveQuery/QueryTools.d.ts new file mode 100644 index 0000000000..f1ac02d280 --- /dev/null +++ b/types/LiveQuery/QueryTools.d.ts @@ -0,0 +1,12 @@ +/** + * Generate a hash from a query, with unique fields for columns, values, order, + * skip, and limit. + */ +export function queryHash(query: any): string; +/** + * matchesQuery -- Determines if an object would be returned by a Parse Query + * It's a lightweight, where-clause only implementation of a full query engine. + * Since we find queries that match objects, rather than objects that match + * queries, we can avoid building a full-blown query tool. + */ +export function matchesQuery(object: any, query: any): any; diff --git a/types/LiveQuery/RequestSchema.d.ts b/types/LiveQuery/RequestSchema.d.ts new file mode 100644 index 0000000000..0fb5082c89 --- /dev/null +++ b/types/LiveQuery/RequestSchema.d.ts @@ -0,0 +1,206 @@ +export var __esModule: boolean; +export default _default; +declare namespace _default { + export { general }; + export { connect }; + export { subscribe }; + export { update }; + export { unsubscribe }; +} +declare namespace general { + const title: string; + const type: string; + namespace properties { + namespace op { + const type_1: string; + export { type_1 as type }; + const _enum: string[]; + export { _enum as enum }; + } + } + const required: string[]; +} +declare namespace connect { + const title_1: string; + export { title_1 as title }; + const type_2: string; + export { type_2 as type }; + export namespace properties_1 { + const op_1: string; + export { op_1 as op }; + export namespace applicationId { + const type_3: string; + export { type_3 as type }; + } + export namespace javascriptKey { + const type_4: string; + export { type_4 as type }; + } + export namespace masterKey { + const type_5: string; + export { type_5 as type }; + } + export namespace clientKey { + const type_6: string; + export { type_6 as type }; + } + export namespace windowsKey { + const type_7: string; + export { type_7 as type }; + } + export namespace restAPIKey { + const type_8: string; + export { type_8 as type }; + } + export namespace sessionToken { + const type_9: string; + export { type_9 as type }; + } + export namespace installationId { + const type_10: string; + export { type_10 as type }; + } + } + export { properties_1 as properties }; + const required_1: string[]; + export { required_1 as required }; + export const additionalProperties: boolean; +} +declare namespace subscribe { + const title_2: string; + export { title_2 as title }; + const type_11: string; + export { type_11 as type }; + export namespace properties_2 { + const op_2: string; + export { op_2 as op }; + export namespace requestId { + const type_12: string; + export { type_12 as type }; + } + export namespace query { + const title_3: string; + export { title_3 as title }; + const type_13: string; + export { type_13 as type }; + export namespace properties_3 { + namespace className { + const type_14: string; + export { type_14 as type }; + } + namespace where { + const type_15: string; + export { type_15 as type }; + } + namespace fields { + const type_16: string; + export { type_16 as type }; + export namespace items { + const type_17: string; + export { type_17 as type }; + } + export const minItems: number; + export const uniqueItems: boolean; + } + } + export { properties_3 as properties }; + const required_2: string[]; + export { required_2 as required }; + const additionalProperties_1: boolean; + export { additionalProperties_1 as additionalProperties }; + } + export namespace sessionToken_1 { + const type_18: string; + export { type_18 as type }; + } + export { sessionToken_1 as sessionToken }; + } + export { properties_2 as properties }; + const required_3: string[]; + export { required_3 as required }; + const additionalProperties_2: boolean; + export { additionalProperties_2 as additionalProperties }; +} +declare namespace update { + const title_4: string; + export { title_4 as title }; + const type_19: string; + export { type_19 as type }; + export namespace properties_4 { + const op_3: string; + export { op_3 as op }; + export namespace requestId_1 { + const type_20: string; + export { type_20 as type }; + } + export { requestId_1 as requestId }; + export namespace query_1 { + const title_5: string; + export { title_5 as title }; + const type_21: string; + export { type_21 as type }; + export namespace properties_5 { + export namespace className_1 { + const type_22: string; + export { type_22 as type }; + } + export { className_1 as className }; + export namespace where_1 { + const type_23: string; + export { type_23 as type }; + } + export { where_1 as where }; + export namespace fields_1 { + const type_24: string; + export { type_24 as type }; + export namespace items_1 { + const type_25: string; + export { type_25 as type }; + } + export { items_1 as items }; + const minItems_1: number; + export { minItems_1 as minItems }; + const uniqueItems_1: boolean; + export { uniqueItems_1 as uniqueItems }; + } + export { fields_1 as fields }; + } + export { properties_5 as properties }; + const required_4: string[]; + export { required_4 as required }; + const additionalProperties_3: boolean; + export { additionalProperties_3 as additionalProperties }; + } + export { query_1 as query }; + export namespace sessionToken_2 { + const type_26: string; + export { type_26 as type }; + } + export { sessionToken_2 as sessionToken }; + } + export { properties_4 as properties }; + const required_5: string[]; + export { required_5 as required }; + const additionalProperties_4: boolean; + export { additionalProperties_4 as additionalProperties }; +} +declare namespace unsubscribe { + const title_6: string; + export { title_6 as title }; + const type_27: string; + export { type_27 as type }; + export namespace properties_6 { + const op_4: string; + export { op_4 as op }; + export namespace requestId_2 { + const type_28: string; + export { type_28 as type }; + } + export { requestId_2 as requestId }; + } + export { properties_6 as properties }; + const required_6: string[]; + export { required_6 as required }; + const additionalProperties_5: boolean; + export { additionalProperties_5 as additionalProperties }; +} diff --git a/types/LiveQuery/SessionTokenCache.d.ts b/types/LiveQuery/SessionTokenCache.d.ts new file mode 100644 index 0000000000..17cd259300 --- /dev/null +++ b/types/LiveQuery/SessionTokenCache.d.ts @@ -0,0 +1,6 @@ +export var __esModule: boolean; +export class SessionTokenCache { + constructor(timeout?: number, maxSize?: number); + cache: any; + getUserId(sessionToken: any): any; +} diff --git a/types/LiveQuery/Subscription.d.ts b/types/LiveQuery/Subscription.d.ts new file mode 100644 index 0000000000..3c02b21522 --- /dev/null +++ b/types/LiveQuery/Subscription.d.ts @@ -0,0 +1,11 @@ +export var __esModule: boolean; +export class Subscription { + constructor(className: any, query: any, queryHash: any); + className: any; + query: any; + hash: any; + clientRequestIds: Map; + addClientSubscription(clientId: any, requestId: any): void; + deleteClientSubscription(clientId: any, requestId: any): void; + hasSubscribingClient(): boolean; +} diff --git a/types/LiveQuery/equalObjects.d.ts b/types/LiveQuery/equalObjects.d.ts new file mode 100644 index 0000000000..dc581ec1b1 --- /dev/null +++ b/types/LiveQuery/equalObjects.d.ts @@ -0,0 +1,6 @@ +export = equalObjects; +/** + * Determines whether two objects represent the same primitive, special Parse + * type, or full Parse Object. + */ +declare function equalObjects(a: any, b: any): boolean; diff --git a/types/Options/Definitions.d.ts b/types/Options/Definitions.d.ts new file mode 100644 index 0000000000..dbd94e1c70 --- /dev/null +++ b/types/Options/Definitions.d.ts @@ -0,0 +1,1197 @@ +export namespace ParseServerOptions { + namespace accountLockout { + const env: string; + const help: string; + const action: typeof parsers.objectParser; + } + namespace allowClientClassCreation { + const env_1: string; + export { env_1 as env }; + const help_1: string; + export { help_1 as help }; + const action_1: typeof parsers.booleanParser; + export { action_1 as action }; + const _default: boolean; + export { _default as default }; + } + namespace allowCustomObjectId { + const env_2: string; + export { env_2 as env }; + const help_2: string; + export { help_2 as help }; + const action_2: typeof parsers.booleanParser; + export { action_2 as action }; + const _default_1: boolean; + export { _default_1 as default }; + } + namespace allowHeaders { + const env_3: string; + export { env_3 as env }; + const help_3: string; + export { help_3 as help }; + const action_3: typeof parsers.arrayParser; + export { action_3 as action }; + } + namespace allowOrigin { + const env_4: string; + export { env_4 as env }; + const help_4: string; + export { help_4 as help }; + } + namespace analyticsAdapter { + const env_5: string; + export { env_5 as env }; + const help_5: string; + export { help_5 as help }; + const action_4: typeof parsers.moduleOrObjectParser; + export { action_4 as action }; + } + namespace appId { + const env_6: string; + export { env_6 as env }; + const help_6: string; + export { help_6 as help }; + export const required: boolean; + } + namespace appName { + const env_7: string; + export { env_7 as env }; + const help_7: string; + export { help_7 as help }; + } + namespace auth { + const env_8: string; + export { env_8 as env }; + const help_8: string; + export { help_8 as help }; + const action_5: typeof parsers.objectParser; + export { action_5 as action }; + } + namespace cacheAdapter { + const env_9: string; + export { env_9 as env }; + const help_9: string; + export { help_9 as help }; + const action_6: typeof parsers.moduleOrObjectParser; + export { action_6 as action }; + } + namespace cacheMaxSize { + const env_10: string; + export { env_10 as env }; + const help_10: string; + export { help_10 as help }; + const action_7: (opt: any) => number; + export { action_7 as action }; + const _default_2: number; + export { _default_2 as default }; + } + namespace cacheTTL { + const env_11: string; + export { env_11 as env }; + const help_11: string; + export { help_11 as help }; + const action_8: (opt: any) => number; + export { action_8 as action }; + const _default_3: number; + export { _default_3 as default }; + } + namespace clientKey { + const env_12: string; + export { env_12 as env }; + const help_12: string; + export { help_12 as help }; + } + namespace cloud { + const env_13: string; + export { env_13 as env }; + const help_13: string; + export { help_13 as help }; + } + namespace cluster { + const env_14: string; + export { env_14 as env }; + const help_14: string; + export { help_14 as help }; + const action_9: any; + export { action_9 as action }; + } + namespace collectionPrefix { + const env_15: string; + export { env_15 as env }; + const help_15: string; + export { help_15 as help }; + const _default_4: string; + export { _default_4 as default }; + } + namespace customPages { + const env_16: string; + export { env_16 as env }; + const help_16: string; + export { help_16 as help }; + const action_10: typeof parsers.objectParser; + export { action_10 as action }; + const _default_5: {}; + export { _default_5 as default }; + } + namespace databaseAdapter { + const env_17: string; + export { env_17 as env }; + const help_17: string; + export { help_17 as help }; + const action_11: typeof parsers.moduleOrObjectParser; + export { action_11 as action }; + } + namespace databaseOptions { + const env_18: string; + export { env_18 as env }; + const help_18: string; + export { help_18 as help }; + const action_12: typeof parsers.objectParser; + export { action_12 as action }; + } + namespace databaseURI { + const env_19: string; + export { env_19 as env }; + const help_19: string; + export { help_19 as help }; + const required_1: boolean; + export { required_1 as required }; + const _default_6: string; + export { _default_6 as default }; + } + namespace directAccess { + const env_20: string; + export { env_20 as env }; + const help_20: string; + export { help_20 as help }; + const action_13: typeof parsers.booleanParser; + export { action_13 as action }; + const _default_7: boolean; + export { _default_7 as default }; + } + namespace dotNetKey { + const env_21: string; + export { env_21 as env }; + const help_21: string; + export { help_21 as help }; + } + namespace emailAdapter { + const env_22: string; + export { env_22 as env }; + const help_22: string; + export { help_22 as help }; + const action_14: typeof parsers.moduleOrObjectParser; + export { action_14 as action }; + } + namespace emailVerifyTokenReuseIfValid { + const env_23: string; + export { env_23 as env }; + const help_23: string; + export { help_23 as help }; + const action_15: typeof parsers.booleanParser; + export { action_15 as action }; + const _default_8: boolean; + export { _default_8 as default }; + } + namespace emailVerifyTokenValidityDuration { + const env_24: string; + export { env_24 as env }; + const help_24: string; + export { help_24 as help }; + const action_16: (opt: any) => number; + export { action_16 as action }; + } + namespace enableAnonymousUsers { + const env_25: string; + export { env_25 as env }; + const help_25: string; + export { help_25 as help }; + const action_17: typeof parsers.booleanParser; + export { action_17 as action }; + const _default_9: boolean; + export { _default_9 as default }; + } + namespace enableExpressErrorHandler { + const env_26: string; + export { env_26 as env }; + const help_26: string; + export { help_26 as help }; + const action_18: typeof parsers.booleanParser; + export { action_18 as action }; + const _default_10: boolean; + export { _default_10 as default }; + } + namespace encryptionKey { + const env_27: string; + export { env_27 as env }; + const help_27: string; + export { help_27 as help }; + } + namespace expireInactiveSessions { + const env_28: string; + export { env_28 as env }; + const help_28: string; + export { help_28 as help }; + const action_19: typeof parsers.booleanParser; + export { action_19 as action }; + const _default_11: boolean; + export { _default_11 as default }; + } + namespace fileKey { + const env_29: string; + export { env_29 as env }; + const help_29: string; + export { help_29 as help }; + } + namespace filesAdapter { + const env_30: string; + export { env_30 as env }; + const help_30: string; + export { help_30 as help }; + const action_20: typeof parsers.moduleOrObjectParser; + export { action_20 as action }; + } + namespace fileUpload { + const env_31: string; + export { env_31 as env }; + const help_31: string; + export { help_31 as help }; + const action_21: typeof parsers.objectParser; + export { action_21 as action }; + const _default_12: {}; + export { _default_12 as default }; + } + namespace graphQLPath { + const env_32: string; + export { env_32 as env }; + const help_32: string; + export { help_32 as help }; + const _default_13: string; + export { _default_13 as default }; + } + namespace graphQLSchema { + const env_33: string; + export { env_33 as env }; + const help_33: string; + export { help_33 as help }; + } + namespace host { + const env_34: string; + export { env_34 as env }; + const help_34: string; + export { help_34 as help }; + const _default_14: string; + export { _default_14 as default }; + } + namespace idempotencyOptions { + const env_35: string; + export { env_35 as env }; + const help_35: string; + export { help_35 as help }; + const action_22: typeof parsers.objectParser; + export { action_22 as action }; + const _default_15: {}; + export { _default_15 as default }; + } + namespace javascriptKey { + const env_36: string; + export { env_36 as env }; + const help_36: string; + export { help_36 as help }; + } + namespace jsonLogs { + const env_37: string; + export { env_37 as env }; + const help_37: string; + export { help_37 as help }; + const action_23: typeof parsers.booleanParser; + export { action_23 as action }; + } + namespace liveQuery { + const env_38: string; + export { env_38 as env }; + const help_38: string; + export { help_38 as help }; + const action_24: typeof parsers.objectParser; + export { action_24 as action }; + } + namespace liveQueryServerOptions { + const env_39: string; + export { env_39 as env }; + const help_39: string; + export { help_39 as help }; + const action_25: typeof parsers.objectParser; + export { action_25 as action }; + } + namespace loggerAdapter { + const env_40: string; + export { env_40 as env }; + const help_40: string; + export { help_40 as help }; + const action_26: typeof parsers.moduleOrObjectParser; + export { action_26 as action }; + } + namespace logLevel { + const env_41: string; + export { env_41 as env }; + const help_41: string; + export { help_41 as help }; + } + namespace logsFolder { + const env_42: string; + export { env_42 as env }; + const help_42: string; + export { help_42 as help }; + const _default_16: string; + export { _default_16 as default }; + } + namespace masterKey { + const env_43: string; + export { env_43 as env }; + const help_43: string; + export { help_43 as help }; + const required_2: boolean; + export { required_2 as required }; + } + namespace masterKeyIps { + const env_44: string; + export { env_44 as env }; + const help_44: string; + export { help_44 as help }; + const action_27: typeof parsers.arrayParser; + export { action_27 as action }; + const _default_17: any[]; + export { _default_17 as default }; + } + namespace maxLimit { + const env_45: string; + export { env_45 as env }; + const help_45: string; + export { help_45 as help }; + const action_28: (opt: any) => number; + export { action_28 as action }; + } + namespace maxLogFiles { + const env_46: string; + export { env_46 as env }; + const help_46: string; + export { help_46 as help }; + const action_29: typeof parsers.objectParser; + export { action_29 as action }; + } + namespace maxUploadSize { + const env_47: string; + export { env_47 as env }; + const help_47: string; + export { help_47 as help }; + const _default_18: string; + export { _default_18 as default }; + } + namespace middleware { + const env_48: string; + export { env_48 as env }; + const help_48: string; + export { help_48 as help }; + } + namespace mountGraphQL { + const env_49: string; + export { env_49 as env }; + const help_49: string; + export { help_49 as help }; + const action_30: typeof parsers.booleanParser; + export { action_30 as action }; + const _default_19: boolean; + export { _default_19 as default }; + } + namespace mountPath { + const env_50: string; + export { env_50 as env }; + const help_50: string; + export { help_50 as help }; + const _default_20: string; + export { _default_20 as default }; + } + namespace mountPlayground { + const env_51: string; + export { env_51 as env }; + const help_51: string; + export { help_51 as help }; + const action_31: typeof parsers.booleanParser; + export { action_31 as action }; + const _default_21: boolean; + export { _default_21 as default }; + } + namespace objectIdSize { + const env_52: string; + export { env_52 as env }; + const help_52: string; + export { help_52 as help }; + const action_32: (opt: any) => number; + export { action_32 as action }; + const _default_22: number; + export { _default_22 as default }; + } + namespace pages { + const env_53: string; + export { env_53 as env }; + const help_53: string; + export { help_53 as help }; + const action_33: typeof parsers.objectParser; + export { action_33 as action }; + const _default_23: {}; + export { _default_23 as default }; + } + namespace passwordPolicy { + const env_54: string; + export { env_54 as env }; + const help_54: string; + export { help_54 as help }; + const action_34: typeof parsers.objectParser; + export { action_34 as action }; + } + namespace playgroundPath { + const env_55: string; + export { env_55 as env }; + const help_55: string; + export { help_55 as help }; + const _default_24: string; + export { _default_24 as default }; + } + namespace port { + const env_56: string; + export { env_56 as env }; + const help_56: string; + export { help_56 as help }; + const action_35: (opt: any) => number; + export { action_35 as action }; + const _default_25: number; + export { _default_25 as default }; + } + namespace preserveFileName { + const env_57: string; + export { env_57 as env }; + const help_57: string; + export { help_57 as help }; + const action_36: typeof parsers.booleanParser; + export { action_36 as action }; + const _default_26: boolean; + export { _default_26 as default }; + } + namespace preventLoginWithUnverifiedEmail { + const env_58: string; + export { env_58 as env }; + const help_58: string; + export { help_58 as help }; + const action_37: typeof parsers.booleanParser; + export { action_37 as action }; + const _default_27: boolean; + export { _default_27 as default }; + } + namespace protectedFields { + const env_59: string; + export { env_59 as env }; + const help_59: string; + export { help_59 as help }; + const action_38: typeof parsers.objectParser; + export { action_38 as action }; + namespace _default_28 { + const _User: { + '*': string[]; + }; + } + export { _default_28 as default }; + } + namespace publicServerURL { + const env_60: string; + export { env_60 as env }; + const help_60: string; + export { help_60 as help }; + } + namespace push { + const env_61: string; + export { env_61 as env }; + const help_61: string; + export { help_61 as help }; + const action_39: typeof parsers.objectParser; + export { action_39 as action }; + } + namespace readOnlyMasterKey { + const env_62: string; + export { env_62 as env }; + const help_62: string; + export { help_62 as help }; + } + namespace restAPIKey { + const env_63: string; + export { env_63 as env }; + const help_63: string; + export { help_63 as help }; + } + namespace revokeSessionOnPasswordReset { + const env_64: string; + export { env_64 as env }; + const help_64: string; + export { help_64 as help }; + const action_40: typeof parsers.booleanParser; + export { action_40 as action }; + const _default_29: boolean; + export { _default_29 as default }; + } + namespace scheduledPush { + const env_65: string; + export { env_65 as env }; + const help_65: string; + export { help_65 as help }; + const action_41: typeof parsers.booleanParser; + export { action_41 as action }; + const _default_30: boolean; + export { _default_30 as default }; + } + namespace security { + const env_66: string; + export { env_66 as env }; + const help_66: string; + export { help_66 as help }; + const action_42: typeof parsers.objectParser; + export { action_42 as action }; + const _default_31: {}; + export { _default_31 as default }; + } + namespace serverCloseComplete { + const env_67: string; + export { env_67 as env }; + const help_67: string; + export { help_67 as help }; + } + namespace serverStartComplete { + const env_68: string; + export { env_68 as env }; + const help_68: string; + export { help_68 as help }; + } + namespace serverURL { + const env_69: string; + export { env_69 as env }; + const help_69: string; + export { help_69 as help }; + const required_3: boolean; + export { required_3 as required }; + } + namespace sessionLength { + const env_70: string; + export { env_70 as env }; + const help_70: string; + export { help_70 as help }; + const action_43: (opt: any) => number; + export { action_43 as action }; + const _default_32: number; + export { _default_32 as default }; + } + namespace silent { + const env_71: string; + export { env_71 as env }; + const help_71: string; + export { help_71 as help }; + const action_44: typeof parsers.booleanParser; + export { action_44 as action }; + } + namespace startLiveQueryServer { + const env_72: string; + export { env_72 as env }; + const help_72: string; + export { help_72 as help }; + const action_45: typeof parsers.booleanParser; + export { action_45 as action }; + } + namespace userSensitiveFields { + const env_73: string; + export { env_73 as env }; + const help_73: string; + export { help_73 as help }; + const action_46: typeof parsers.arrayParser; + export { action_46 as action }; + } + namespace verbose { + const env_74: string; + export { env_74 as env }; + const help_74: string; + export { help_74 as help }; + const action_47: typeof parsers.booleanParser; + export { action_47 as action }; + } + namespace verifyUserEmails { + const env_75: string; + export { env_75 as env }; + const help_75: string; + export { help_75 as help }; + const action_48: typeof parsers.booleanParser; + export { action_48 as action }; + const _default_33: boolean; + export { _default_33 as default }; + } + namespace webhookKey { + const env_76: string; + export { env_76 as env }; + const help_76: string; + export { help_76 as help }; + } +} +export namespace SecurityOptions { + namespace checkGroups { + const env_77: string; + export { env_77 as env }; + const help_77: string; + export { help_77 as help }; + const action_49: typeof parsers.arrayParser; + export { action_49 as action }; + } + namespace enableCheck { + const env_78: string; + export { env_78 as env }; + const help_78: string; + export { help_78 as help }; + const action_50: typeof parsers.booleanParser; + export { action_50 as action }; + const _default_34: boolean; + export { _default_34 as default }; + } + namespace enableCheckLog { + const env_79: string; + export { env_79 as env }; + const help_79: string; + export { help_79 as help }; + const action_51: typeof parsers.booleanParser; + export { action_51 as action }; + const _default_35: boolean; + export { _default_35 as default }; + } +} +export namespace PagesOptions { + namespace customRoutes { + const env_80: string; + export { env_80 as env }; + const help_80: string; + export { help_80 as help }; + const action_52: typeof parsers.arrayParser; + export { action_52 as action }; + const _default_36: any[]; + export { _default_36 as default }; + } + namespace customUrls { + const env_81: string; + export { env_81 as env }; + const help_81: string; + export { help_81 as help }; + const action_53: typeof parsers.objectParser; + export { action_53 as action }; + const _default_37: {}; + export { _default_37 as default }; + } + namespace enableLocalization { + const env_82: string; + export { env_82 as env }; + const help_82: string; + export { help_82 as help }; + const action_54: typeof parsers.booleanParser; + export { action_54 as action }; + const _default_38: boolean; + export { _default_38 as default }; + } + namespace enableRouter { + const env_83: string; + export { env_83 as env }; + const help_83: string; + export { help_83 as help }; + const action_55: typeof parsers.booleanParser; + export { action_55 as action }; + const _default_39: boolean; + export { _default_39 as default }; + } + namespace forceRedirect { + const env_84: string; + export { env_84 as env }; + const help_84: string; + export { help_84 as help }; + const action_56: typeof parsers.booleanParser; + export { action_56 as action }; + const _default_40: boolean; + export { _default_40 as default }; + } + namespace localizationFallbackLocale { + const env_85: string; + export { env_85 as env }; + const help_85: string; + export { help_85 as help }; + const _default_41: string; + export { _default_41 as default }; + } + namespace localizationJsonPath { + const env_86: string; + export { env_86 as env }; + const help_86: string; + export { help_86 as help }; + } + namespace pagesEndpoint { + const env_87: string; + export { env_87 as env }; + const help_87: string; + export { help_87 as help }; + const _default_42: string; + export { _default_42 as default }; + } + namespace pagesPath { + const env_88: string; + export { env_88 as env }; + const help_88: string; + export { help_88 as help }; + const _default_43: string; + export { _default_43 as default }; + } + namespace placeholders { + const env_89: string; + export { env_89 as env }; + const help_89: string; + export { help_89 as help }; + const action_57: typeof parsers.objectParser; + export { action_57 as action }; + const _default_44: {}; + export { _default_44 as default }; + } +} +export namespace PagesRoute { + namespace handler { + const env_90: string; + export { env_90 as env }; + const help_90: string; + export { help_90 as help }; + const required_4: boolean; + export { required_4 as required }; + } + namespace method { + const env_91: string; + export { env_91 as env }; + const help_91: string; + export { help_91 as help }; + const required_5: boolean; + export { required_5 as required }; + } + namespace path { + const env_92: string; + export { env_92 as env }; + const help_92: string; + export { help_92 as help }; + const required_6: boolean; + export { required_6 as required }; + } +} +export namespace PagesCustomUrlsOptions { + namespace emailVerificationLinkExpired { + const env_93: string; + export { env_93 as env }; + const help_93: string; + export { help_93 as help }; + } + namespace emailVerificationLinkInvalid { + const env_94: string; + export { env_94 as env }; + const help_94: string; + export { help_94 as help }; + } + namespace emailVerificationSendFail { + const env_95: string; + export { env_95 as env }; + const help_95: string; + export { help_95 as help }; + } + namespace emailVerificationSendSuccess { + const env_96: string; + export { env_96 as env }; + const help_96: string; + export { help_96 as help }; + } + namespace emailVerificationSuccess { + const env_97: string; + export { env_97 as env }; + const help_97: string; + export { help_97 as help }; + } + namespace passwordReset { + const env_98: string; + export { env_98 as env }; + const help_98: string; + export { help_98 as help }; + } + namespace passwordResetLinkInvalid { + const env_99: string; + export { env_99 as env }; + const help_99: string; + export { help_99 as help }; + } + namespace passwordResetSuccess { + const env_100: string; + export { env_100 as env }; + const help_100: string; + export { help_100 as help }; + } +} +export namespace CustomPagesOptions { + export namespace choosePassword { + const env_101: string; + export { env_101 as env }; + const help_101: string; + export { help_101 as help }; + } + export namespace expiredVerificationLink { + const env_102: string; + export { env_102 as env }; + const help_102: string; + export { help_102 as help }; + } + export namespace invalidLink { + const env_103: string; + export { env_103 as env }; + const help_103: string; + export { help_103 as help }; + } + export namespace invalidPasswordResetLink { + const env_104: string; + export { env_104 as env }; + const help_104: string; + export { help_104 as help }; + } + export namespace invalidVerificationLink { + const env_105: string; + export { env_105 as env }; + const help_105: string; + export { help_105 as help }; + } + export namespace linkSendFail { + const env_106: string; + export { env_106 as env }; + const help_106: string; + export { help_106 as help }; + } + export namespace linkSendSuccess { + const env_107: string; + export { env_107 as env }; + const help_107: string; + export { help_107 as help }; + } + export namespace parseFrameURL { + const env_108: string; + export { env_108 as env }; + const help_108: string; + export { help_108 as help }; + } + export namespace passwordResetSuccess_1 { + const env_109: string; + export { env_109 as env }; + const help_109: string; + export { help_109 as help }; + } + export { passwordResetSuccess_1 as passwordResetSuccess }; + export namespace verifyEmailSuccess { + const env_110: string; + export { env_110 as env }; + const help_110: string; + export { help_110 as help }; + } +} +export namespace LiveQueryOptions { + namespace classNames { + const env_111: string; + export { env_111 as env }; + const help_111: string; + export { help_111 as help }; + const action_58: typeof parsers.arrayParser; + export { action_58 as action }; + } + namespace pubSubAdapter { + const env_112: string; + export { env_112 as env }; + const help_112: string; + export { help_112 as help }; + const action_59: typeof parsers.moduleOrObjectParser; + export { action_59 as action }; + } + namespace redisOptions { + const env_113: string; + export { env_113 as env }; + const help_113: string; + export { help_113 as help }; + const action_60: typeof parsers.objectParser; + export { action_60 as action }; + } + namespace redisURL { + const env_114: string; + export { env_114 as env }; + const help_114: string; + export { help_114 as help }; + } + namespace wssAdapter { + const env_115: string; + export { env_115 as env }; + const help_115: string; + export { help_115 as help }; + const action_61: typeof parsers.moduleOrObjectParser; + export { action_61 as action }; + } +} +export namespace LiveQueryServerOptions { + export namespace appId_1 { + const env_116: string; + export { env_116 as env }; + const help_116: string; + export { help_116 as help }; + } + export { appId_1 as appId }; + export namespace cacheTimeout { + const env_117: string; + export { env_117 as env }; + const help_117: string; + export { help_117 as help }; + const action_62: (opt: any) => number; + export { action_62 as action }; + } + export namespace keyPairs { + const env_118: string; + export { env_118 as env }; + const help_118: string; + export { help_118 as help }; + const action_63: typeof parsers.objectParser; + export { action_63 as action }; + } + export namespace logLevel_1 { + const env_119: string; + export { env_119 as env }; + const help_119: string; + export { help_119 as help }; + } + export { logLevel_1 as logLevel }; + export namespace masterKey_1 { + const env_120: string; + export { env_120 as env }; + const help_120: string; + export { help_120 as help }; + } + export { masterKey_1 as masterKey }; + export namespace port_1 { + const env_121: string; + export { env_121 as env }; + const help_121: string; + export { help_121 as help }; + const action_64: (opt: any) => number; + export { action_64 as action }; + const _default_45: number; + export { _default_45 as default }; + } + export { port_1 as port }; + export namespace pubSubAdapter_1 { + const env_122: string; + export { env_122 as env }; + const help_122: string; + export { help_122 as help }; + const action_65: typeof parsers.moduleOrObjectParser; + export { action_65 as action }; + } + export { pubSubAdapter_1 as pubSubAdapter }; + export namespace redisOptions_1 { + const env_123: string; + export { env_123 as env }; + const help_123: string; + export { help_123 as help }; + const action_66: typeof parsers.objectParser; + export { action_66 as action }; + } + export { redisOptions_1 as redisOptions }; + export namespace redisURL_1 { + const env_124: string; + export { env_124 as env }; + const help_124: string; + export { help_124 as help }; + } + export { redisURL_1 as redisURL }; + export namespace serverURL_1 { + const env_125: string; + export { env_125 as env }; + const help_125: string; + export { help_125 as help }; + } + export { serverURL_1 as serverURL }; + export namespace websocketTimeout { + const env_126: string; + export { env_126 as env }; + const help_126: string; + export { help_126 as help }; + const action_67: (opt: any) => number; + export { action_67 as action }; + } + export namespace wssAdapter_1 { + const env_127: string; + export { env_127 as env }; + const help_127: string; + export { help_127 as help }; + const action_68: typeof parsers.moduleOrObjectParser; + export { action_68 as action }; + } + export { wssAdapter_1 as wssAdapter }; +} +export namespace IdempotencyOptions { + namespace paths { + const env_128: string; + export { env_128 as env }; + const help_128: string; + export { help_128 as help }; + const action_69: typeof parsers.arrayParser; + export { action_69 as action }; + const _default_46: any[]; + export { _default_46 as default }; + } + namespace ttl { + const env_129: string; + export { env_129 as env }; + const help_129: string; + export { help_129 as help }; + const action_70: (opt: any) => number; + export { action_70 as action }; + const _default_47: number; + export { _default_47 as default }; + } +} +export namespace AccountLockoutOptions { + namespace duration { + const env_130: string; + export { env_130 as env }; + const help_130: string; + export { help_130 as help }; + const action_71: (opt: any) => number; + export { action_71 as action }; + } + namespace threshold { + const env_131: string; + export { env_131 as env }; + const help_131: string; + export { help_131 as help }; + const action_72: (opt: any) => number; + export { action_72 as action }; + } + namespace unlockOnPasswordReset { + const env_132: string; + export { env_132 as env }; + const help_132: string; + export { help_132 as help }; + const action_73: typeof parsers.booleanParser; + export { action_73 as action }; + const _default_48: boolean; + export { _default_48 as default }; + } +} +export namespace PasswordPolicyOptions { + namespace doNotAllowUsername { + const env_133: string; + export { env_133 as env }; + const help_133: string; + export { help_133 as help }; + const action_74: typeof parsers.booleanParser; + export { action_74 as action }; + const _default_49: boolean; + export { _default_49 as default }; + } + namespace maxPasswordAge { + const env_134: string; + export { env_134 as env }; + const help_134: string; + export { help_134 as help }; + const action_75: (opt: any) => number; + export { action_75 as action }; + } + namespace maxPasswordHistory { + const env_135: string; + export { env_135 as env }; + const help_135: string; + export { help_135 as help }; + const action_76: (opt: any) => number; + export { action_76 as action }; + } + namespace resetTokenReuseIfValid { + const env_136: string; + export { env_136 as env }; + const help_136: string; + export { help_136 as help }; + const action_77: typeof parsers.booleanParser; + export { action_77 as action }; + const _default_50: boolean; + export { _default_50 as default }; + } + namespace resetTokenValidityDuration { + const env_137: string; + export { env_137 as env }; + const help_137: string; + export { help_137 as help }; + const action_78: (opt: any) => number; + export { action_78 as action }; + } + namespace validationError { + const env_138: string; + export { env_138 as env }; + const help_138: string; + export { help_138 as help }; + } + namespace validatorCallback { + const env_139: string; + export { env_139 as env }; + const help_139: string; + export { help_139 as help }; + } + namespace validatorPattern { + const env_140: string; + export { env_140 as env }; + const help_140: string; + export { help_140 as help }; + } +} +export namespace FileUploadOptions { + namespace enableForAnonymousUser { + const env_141: string; + export { env_141 as env }; + const help_141: string; + export { help_141 as help }; + const action_79: typeof parsers.booleanParser; + export { action_79 as action }; + const _default_51: boolean; + export { _default_51 as default }; + } + namespace enableForAuthenticatedUser { + const env_142: string; + export { env_142 as env }; + const help_142: string; + export { help_142 as help }; + const action_80: typeof parsers.booleanParser; + export { action_80 as action }; + const _default_52: boolean; + export { _default_52 as default }; + } + namespace enableForPublic { + const env_143: string; + export { env_143 as env }; + const help_143: string; + export { help_143 as help }; + const action_81: typeof parsers.booleanParser; + export { action_81 as action }; + const _default_53: boolean; + export { _default_53 as default }; + } +} +export namespace DatabaseOptions { + namespace enableSchemaHooks { + const env_144: string; + export { env_144 as env }; + const help_144: string; + export { help_144 as help }; + const action_82: typeof parsers.booleanParser; + export { action_82 as action }; + const _default_54: boolean; + export { _default_54 as default }; + } +} +import parsers = require("./parsers"); diff --git a/types/Options/docs.d.ts b/types/Options/docs.d.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/types/Options/index.d.ts b/types/Options/index.d.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/types/Options/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/types/Options/parsers.d.ts b/types/Options/parsers.d.ts new file mode 100644 index 0000000000..0d2b521edb --- /dev/null +++ b/types/Options/parsers.d.ts @@ -0,0 +1,7 @@ +export function numberParser(key: any): (opt: any) => number; +export function numberOrBoolParser(key: any): (opt: any) => number | boolean; +export function nullParser(opt: any): any; +export function booleanParser(opt: any): boolean; +export function moduleOrObjectParser(opt: any): any; +export function arrayParser(opt: any): any[]; +export function objectParser(opt: any): any; diff --git a/types/Page.d.ts b/types/Page.d.ts new file mode 100644 index 0000000000..e7271ce489 --- /dev/null +++ b/types/Page.d.ts @@ -0,0 +1,27 @@ +export var __esModule: boolean; +export default _default; +/** + * @interface Page + * Page + * Page content that is returned by PageRouter. + */ +export class Page { + /** + * @description Creates a page. + * @param {Object} params The page parameters. + * @param {String} params.id The page identifier. + * @param {String} params.defaultFile The page file name. + * @returns {Page} The page. + */ + constructor(params?: { + id: string; + defaultFile: string; + }); + _id: string; + _defaultFile: string; + set id(arg: string); + get id(): string; + set defaultFile(arg: string); + get defaultFile(): string; +} +declare var _default: typeof Page; diff --git a/types/ParseMessageQueue.d.ts b/types/ParseMessageQueue.d.ts new file mode 100644 index 0000000000..a4216f5534 --- /dev/null +++ b/types/ParseMessageQueue.d.ts @@ -0,0 +1,5 @@ +export var __esModule: boolean; +export namespace ParseMessageQueue { + function createPublisher(config: any): any; + function createSubscriber(config: any): any; +} diff --git a/types/ParseServer.d.ts b/types/ParseServer.d.ts new file mode 100644 index 0000000000..1bf6e886ec --- /dev/null +++ b/types/ParseServer.d.ts @@ -0,0 +1,50 @@ +/// +export var __esModule: boolean; +export default _default; +declare var _default: typeof ParseServer; +declare class ParseServer { + /** + * @static + * Create an express app for the parse server + * @param {Object} options let you specify the maxUploadSize when creating the express app */ + static app(options: any): import("express-serve-static-core").Express; + static promiseRouter({ appId }: { + appId: any; + }): any; + /** + * Creates a new ParseServer and starts it. + * @param {ParseServerOptions} options used to start the server + * @param {Function} callback called when the server has started + * @returns {ParseServer} the parse server instance + */ + static start(options: any, callback: Function): ParseServer; + /** + * Helper method to create a liveQuery server + * @static + * @param {Server} httpServer an optional http server to pass + * @param {LiveQueryServerOptions} config options for the liveQueryServer + * @param {ParseServerOptions} options options for the ParseServer + * @returns {ParseLiveQueryServer} the live query server instance + */ + static createLiveQueryServer(httpServer: any, config: any, options: any): any; + static verifyServerUrl(callback: any): void; + /** + * @constructor + * @param {ParseServerOptions} options the parse server initialization options + */ + constructor(options: any); + config: any; + get app(): import("express-serve-static-core").Express; + _app: import("express-serve-static-core").Express; + handleShutdown(): Promise; + /** + * starts the parse server's express app + * @param {ParseServerOptions} options to use to start the server + * @param {Function} callback called when the server has started + * @returns {ParseServer} the parse server instance + */ + start(options: any, callback: Function): ParseServer; + server: import("http").Server; + liveQueryServer: any; + expressApp: import("express-serve-static-core").Express; +} diff --git a/types/ParseServerRESTController.d.ts b/types/ParseServerRESTController.d.ts new file mode 100644 index 0000000000..f9cb9cca47 --- /dev/null +++ b/types/ParseServerRESTController.d.ts @@ -0,0 +1,12 @@ +export var __esModule: boolean; +export default _default; +export function ParseServerRESTController(applicationId: any, router: any): { + request: (method: any, path: any, data: {}, options: {}, config: any, ...args: any[]) => any; + ajax: any; + handleError: any; +}; +declare function _default(applicationId: any, router: any): { + request: (method: any, path: any, data: {}, options: {}, config: any, ...args: any[]) => any; + ajax: any; + handleError: any; +}; diff --git a/types/PromiseRouter.d.ts b/types/PromiseRouter.d.ts new file mode 100644 index 0000000000..f96f1e97c7 --- /dev/null +++ b/types/PromiseRouter.d.ts @@ -0,0 +1,17 @@ +export var __esModule: boolean; +export default PromiseRouter; +declare class PromiseRouter { + constructor(routes: any[], appId: any); + routes: any[]; + appId: any; + mountRoutes(): void; + merge(router: any): void; + route(method: any, path: any, ...handlers: any[]): void; + match(method: any, path: any): { + params: any; + handler: any; + }; + mountOnto(expressApp: any): any; + expressRouter(): any; + tryRouteRequest(method: any, path: any, request: any): Promise; +} diff --git a/types/Push/PushQueue.d.ts b/types/Push/PushQueue.d.ts new file mode 100644 index 0000000000..7a24336b82 --- /dev/null +++ b/types/Push/PushQueue.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export class PushQueue { + static defaultPushChannel(): string; + constructor(config?: {}); + channel: any; + batchSize: any; + parsePublisher: any; + enqueue(body: any, where: any, config: any, auth: any, pushStatus: any): Promise; +} diff --git a/types/Push/PushWorker.d.ts b/types/Push/PushWorker.d.ts new file mode 100644 index 0000000000..4c04401f49 --- /dev/null +++ b/types/Push/PushWorker.d.ts @@ -0,0 +1,17 @@ +export var __esModule: boolean; +export default _default; +export class PushWorker { + constructor(pushAdapter: any, subscriberConfig?: {}); + adapter: any; + channel: any; + subscriber: any; + run({ body, query, pushStatus, applicationId, UTCOffset }: { + body: any; + query: any; + pushStatus: any; + applicationId: any; + UTCOffset: any; + }): any; + sendToAdapter(body: any, installations: any, pushStatus: any, config: any, UTCOffset: any): any; +} +declare var _default: typeof PushWorker; diff --git a/types/Push/utils.d.ts b/types/Push/utils.d.ts new file mode 100644 index 0000000000..113ef19c03 --- /dev/null +++ b/types/Push/utils.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export function isPushIncrementing(body: any): number | boolean; +export function getLocalesFromPush(body: any): any[]; +export function transformPushBodyForLocale(body: any, locale: any): any; +export function stripLocalesFromBody(body: any): any; +export function bodiesPerLocales(body: any, locales?: any[]): any; +export function groupByLocaleIdentifier(installations: any, locales?: any[]): any; +/** + * Check whether the deviceType parameter in qury condition is valid or not. + * @param {Object} where A query condition + * @param {Array} validPushTypes An array of valid push types(string) + */ +export function validatePushType(where?: any, validPushTypes?: any[]): void; +export function applyDeviceTokenExists(where: any): any; diff --git a/types/RestQuery.d.ts b/types/RestQuery.d.ts new file mode 100644 index 0000000000..cea50c7cbd --- /dev/null +++ b/types/RestQuery.d.ts @@ -0,0 +1,39 @@ +export = RestQuery; +declare function RestQuery(config: any, auth: any, className: any, restWhere: {}, restOptions: {}, clientSDK: any, runAfterFind: boolean, context: any): void; +declare class RestQuery { + constructor(config: any, auth: any, className: any, restWhere: {}, restOptions: {}, clientSDK: any, runAfterFind: boolean, context: any); + config: any; + auth: any; + className: any; + restWhere: {}; + restOptions: {}; + clientSDK: any; + runAfterFind: boolean; + response: any; + findOptions: {}; + context: any; + doCount: boolean; + includeAll: boolean; + include: any[]; + keys: any[]; + excludeKeys: any[]; + redirectKey: any; + redirectClassName: any; + execute(executeOptions: any): any; + each(callback: any): any; + buildRestWhere(): any; + getUserAndRoleACL(): any; + redirectClassNameForKey(): any; + validateClientClassCreation(): any; + replaceInQuery(): any; + replaceNotInQuery(): any; + replaceSelect(): any; + replaceDontSelect(): any; + replaceEquality(): void; + runFind(options?: {}): any; + runCount(): any; + handleIncludeAll(): any; + handleExcludeKeys(): any; + handleInclude(): any; + runAfterFindTrigger(): Promise; +} diff --git a/types/RestWrite.d.ts b/types/RestWrite.d.ts new file mode 100644 index 0000000000..21c8a3430a --- /dev/null +++ b/types/RestWrite.d.ts @@ -0,0 +1,103 @@ +export = RestWrite; +declare function RestWrite(config: any, auth: any, className: any, query: any, data: any, originalData: any, clientSDK: any, context: any, action: any): void; +declare class RestWrite { + constructor(config: any, auth: any, className: any, query: any, data: any, originalData: any, clientSDK: any, context: any, action: any); + config: any; + auth: any; + className: any; + clientSDK: any; + storage: {}; + runOptions: {}; + context: any; + response: { + response: any; + location: string; + status?: undefined; + } | { + status: number; + location: any; + response: { + sessionToken: string; + user: { + __type: string; + className: string; + objectId: any; + }; + createdWith: any; + restricted: boolean; + expiresAt: any; + }; + } | { + response: any; + location?: undefined; + status?: undefined; + } | { + status: number; + response: any; + location: string; + }; + query: any; + data: any; + originalData: any; + updatedAt: any; + validSchemaController: any; + execute(): any; + getUserAndRoleACL(): any; + validateClientClassCreation(): any; + validateSchema(): any; + runBeforeSaveTrigger(): Promise; + runBeforeLoginTrigger(userData: any): Promise; + setRequiredFieldsIfNeeded(): any; + validateAuthData(): Promise; + handleAuthDataValidation(authData: any): Promise; + findUsersWithAuthData(authData: any): Promise; + filteredObjectsByACL(objects: any): any; + handleAuthData(authData: any): Promise; + transformUser(): Promise; + _validateUserName(): any; + responseShouldHaveUsername: boolean; + _validateEmail(): any; + _validatePasswordPolicy(): any; + _validatePasswordRequirements(): any; + _validatePasswordHistory(): any; + createSessionTokenIfNeeded(): Promise; + createSessionToken(): Promise; + deleteEmailResetTokenIfNeeded(): void; + destroyDuplicatedSessions(): void; + handleFollowup(): any; + handleSession(): any; + handleInstallation(): Promise; + expandFilesForExistingObjects(): void; + runDatabaseOperation(): any; + runAfterSaveTrigger(): Promise; + location(): string; + objectId(): any; + sanitizedData(): any; + buildUpdatedObject(extraData: any): any; + cleanUserAuthData(): void; + _updateResponseWithData(response: any, data: any): any; +} +declare namespace RestWrite { + export { createSession, __esModule, _default as default }; +} +declare function createSession(config: any, { userId, createdWith, installationId, additionalSessionData }: { + userId: any; + createdWith: any; + installationId: any; + additionalSessionData: any; +}): { + sessionData: { + sessionToken: string; + user: { + __type: string; + className: string; + objectId: any; + }; + createdWith: any; + restricted: boolean; + expiresAt: any; + }; + createSession: () => any; +}; +declare var __esModule: boolean; +declare var _default: typeof RestWrite; diff --git a/types/Routers/AggregateRouter.d.ts b/types/Routers/AggregateRouter.d.ts new file mode 100644 index 0000000000..4a1ee5d472 --- /dev/null +++ b/types/Routers/AggregateRouter.d.ts @@ -0,0 +1,13 @@ +export var __esModule: boolean; +export default _default; +declare const AggregateRouter_base: any; +export class AggregateRouter extends AggregateRouter_base { + [x: string]: any; + static getPipeline(body: any): any; + static transformStage(stageName: any, stage: any): { + [x: string]: any; + }; + handleFind(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof AggregateRouter; diff --git a/types/Routers/AnalyticsRouter.d.ts b/types/Routers/AnalyticsRouter.d.ts new file mode 100644 index 0000000000..a1b3260c76 --- /dev/null +++ b/types/Routers/AnalyticsRouter.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +declare const AnalyticsRouter_base: any; +export class AnalyticsRouter extends AnalyticsRouter_base { + [x: string]: any; + mountRoutes(): void; +} +export {}; diff --git a/types/Routers/AudiencesRouter.d.ts b/types/Routers/AudiencesRouter.d.ts new file mode 100644 index 0000000000..9777a192a4 --- /dev/null +++ b/types/Routers/AudiencesRouter.d.ts @@ -0,0 +1,11 @@ +export var __esModule: boolean; +export default _default; +declare const AudiencesRouter_base: any; +export class AudiencesRouter extends AudiencesRouter_base { + [x: string]: any; + className(): string; + handleFind(req: any): any; + handleGet(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof AudiencesRouter; diff --git a/types/Routers/ClassesRouter.d.ts b/types/Routers/ClassesRouter.d.ts new file mode 100644 index 0000000000..166f1099d0 --- /dev/null +++ b/types/Routers/ClassesRouter.d.ts @@ -0,0 +1,30 @@ +export var __esModule: boolean; +export default _default; +declare const ClassesRouter_base: any; +export class ClassesRouter extends ClassesRouter_base { + [x: string]: any; + static JSONFromQuery(query: any): {}; + static optionsFromBody(body: any): { + skip: number; + limit: number; + order: string; + count: boolean; + keys: any; + excludeKeys: any; + include: string; + includeAll: boolean; + readPreference: any; + includeReadPreference: any; + subqueryReadPreference: any; + hint: any; + explain: any; + }; + className(req: any): any; + handleFind(req: any): any; + handleGet(req: any): any; + handleCreate(req: any): any; + handleUpdate(req: any): any; + handleDelete(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof ClassesRouter; diff --git a/types/Routers/CloudCodeRouter.d.ts b/types/Routers/CloudCodeRouter.d.ts new file mode 100644 index 0000000000..ea9fa6d477 --- /dev/null +++ b/types/Routers/CloudCodeRouter.d.ts @@ -0,0 +1,12 @@ +export var __esModule: boolean; +declare const CloudCodeRouter_base: any; +export class CloudCodeRouter extends CloudCodeRouter_base { + [x: string]: any; + static getJobs(req: any): any; + static getJobsData(req: any): any; + static createJob(req: any): any; + static editJob(req: any): any; + static deleteJob(req: any): any; + mountRoutes(): void; +} +export {}; diff --git a/types/Routers/FeaturesRouter.d.ts b/types/Routers/FeaturesRouter.d.ts new file mode 100644 index 0000000000..07c2a6292e --- /dev/null +++ b/types/Routers/FeaturesRouter.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +declare const FeaturesRouter_base: any; +export class FeaturesRouter extends FeaturesRouter_base { + [x: string]: any; + mountRoutes(): void; +} +export {}; diff --git a/types/Routers/FilesRouter.d.ts b/types/Routers/FilesRouter.d.ts new file mode 100644 index 0000000000..39acf8c62f --- /dev/null +++ b/types/Routers/FilesRouter.d.ts @@ -0,0 +1,10 @@ +export var __esModule: boolean; +export class FilesRouter { + expressRouter({ maxUploadSize }?: { + maxUploadSize?: string; + }): any; + getHandler(req: any, res: any): void; + createHandler(req: any, res: any, next: any): Promise; + deleteHandler(req: any, res: any, next: any): Promise; + metadataHandler(req: any, res: any): Promise; +} diff --git a/types/Routers/FunctionsRouter.d.ts b/types/Routers/FunctionsRouter.d.ts new file mode 100644 index 0000000000..ac8db1197c --- /dev/null +++ b/types/Routers/FunctionsRouter.d.ts @@ -0,0 +1,13 @@ +export var __esModule: boolean; +declare const FunctionsRouter_base: any; +export class FunctionsRouter extends FunctionsRouter_base { + [x: string]: any; + static handleCloudJob(req: any): any; + static createResponseObject(resolve: any, reject: any): { + success: (result: any) => void; + error: (message: any) => void; + }; + static handleCloudFunction(req: any): Promise; + mountRoutes(): void; +} +export {}; diff --git a/types/Routers/GlobalConfigRouter.d.ts b/types/Routers/GlobalConfigRouter.d.ts new file mode 100644 index 0000000000..f3455b7b15 --- /dev/null +++ b/types/Routers/GlobalConfigRouter.d.ts @@ -0,0 +1,10 @@ +export var __esModule: boolean; +export default _default; +declare const GlobalConfigRouter_base: any; +export class GlobalConfigRouter extends GlobalConfigRouter_base { + [x: string]: any; + getGlobalConfig(req: any): any; + updateGlobalConfig(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof GlobalConfigRouter; diff --git a/types/Routers/GraphQLRouter.d.ts b/types/Routers/GraphQLRouter.d.ts new file mode 100644 index 0000000000..547ab01824 --- /dev/null +++ b/types/Routers/GraphQLRouter.d.ts @@ -0,0 +1,14 @@ +export var __esModule: boolean; +export default _default; +declare const GraphQLRouter_base: any; +export class GraphQLRouter extends GraphQLRouter_base { + [x: string]: any; + getGraphQLConfig(req: any): Promise<{ + response: any; + }>; + updateGraphQLConfig(req: any): Promise<{ + response: any; + }>; + mountRoutes(): void; +} +declare var _default: typeof GraphQLRouter; diff --git a/types/Routers/HooksRouter.d.ts b/types/Routers/HooksRouter.d.ts new file mode 100644 index 0000000000..146863ea40 --- /dev/null +++ b/types/Routers/HooksRouter.d.ts @@ -0,0 +1,16 @@ +export var __esModule: boolean; +export default _default; +declare const HooksRouter_base: any; +export class HooksRouter extends HooksRouter_base { + [x: string]: any; + createHook(aHook: any, config: any): any; + updateHook(aHook: any, config: any): any; + handlePost(req: any): any; + handleGetFunctions(req: any): any; + handleGetTriggers(req: any): any; + handleDelete(req: any): any; + handleUpdate(req: any): any; + handlePut(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof HooksRouter; diff --git a/types/Routers/IAPValidationRouter.d.ts b/types/Routers/IAPValidationRouter.d.ts new file mode 100644 index 0000000000..48d3d11d38 --- /dev/null +++ b/types/Routers/IAPValidationRouter.d.ts @@ -0,0 +1,10 @@ +export var __esModule: boolean; +declare const IAPValidationRouter_base: any; +export class IAPValidationRouter extends IAPValidationRouter_base { + [x: string]: any; + handleRequest(req: any): Promise<{ + response: any; + }>; + mountRoutes(): void; +} +export {}; diff --git a/types/Routers/InstallationsRouter.d.ts b/types/Routers/InstallationsRouter.d.ts new file mode 100644 index 0000000000..a393ac8dc0 --- /dev/null +++ b/types/Routers/InstallationsRouter.d.ts @@ -0,0 +1,10 @@ +export var __esModule: boolean; +export default _default; +declare const InstallationsRouter_base: any; +export class InstallationsRouter extends InstallationsRouter_base { + [x: string]: any; + className(): string; + handleFind(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof InstallationsRouter; diff --git a/types/Routers/LogsRouter.d.ts b/types/Routers/LogsRouter.d.ts new file mode 100644 index 0000000000..969ae609de --- /dev/null +++ b/types/Routers/LogsRouter.d.ts @@ -0,0 +1,10 @@ +export var __esModule: boolean; +export default _default; +declare const LogsRouter_base: any; +export class LogsRouter extends LogsRouter_base { + [x: string]: any; + mountRoutes(): void; + validateRequest(req: any): void; + handleGET(req: any): any; +} +declare var _default: typeof LogsRouter; diff --git a/types/Routers/PagesRouter.d.ts b/types/Routers/PagesRouter.d.ts new file mode 100644 index 0000000000..bbab1c3edb --- /dev/null +++ b/types/Routers/PagesRouter.d.ts @@ -0,0 +1,176 @@ +export var __esModule: boolean; +export default _default; +declare const PagesRouter_base: any; +export class PagesRouter extends PagesRouter_base { + [x: string]: any; + /** + * Constructs a PagesRouter. + * @param {Object} pages The pages options from the Parse Server configuration. + */ + constructor(pages?: any); + pagesConfig: any; + pagesEndpoint: any; + pagesPath: any; + verifyEmail(req: any): any; + resendVerificationEmail(req: any): any; + passwordReset(req: any): Promise; + requestResetPassword(req: any): any; + resetPassword(req: any): any; + /** + * Returns page content if the page is a local file or returns a + * redirect to a custom page. + * @param {Object} req The express request. + * @param {Page} page The page to go to. + * @param {Object} [params={}] The query parameters to attach to the URL in case of + * HTTP redirect responses for POST requests, or the placeholders to fill into + * the response content in case of HTTP content responses for GET requests. + * @param {Boolean} [responseType] Is true if a redirect response should be forced, + * false if a content response should be forced, undefined if the response type + * should depend on the request type by default: + * - GET request -> content response + * - POST request -> redirect response (PRG pattern) + * @returns {Promise} The PromiseRouter response. + */ + goToPage(req: any, page: any, params?: any, responseType?: boolean): Promise; + /** + * Serves a request to a static resource and localizes the resource if it + * is a HTML file. + * @param {Object} req The request object. + * @returns {Promise} The response. + */ + staticRoute(req: any): Promise; + /** + * Returns a translation from the JSON resource for a given locale. The JSON + * resource is parsed according to i18next syntax. + * + * Example JSON content: + * ```js + * { + * "en": { // resource for language `en` (English) + * "translation": { + * "greeting": "Hello!" + * } + * }, + * "de": { // resource for language `de` (German) + * "translation": { + * "greeting": "Hallo!" + * } + * } + * "de-CH": { // resource for locale `de-CH` (Swiss German) + * "translation": { + * "greeting": "Grüezi!" + * } + * } + * } + * ``` + * @param {String} locale The locale to translate to. + * @returns {Object} The translation or an empty object if no matching + * translation was found. + */ + getJsonTranslation(locale: string): any; + /** + * Returns a translation from the JSON resource for a given locale with + * placeholders filled in by given parameters. + * @param {String} locale The locale to translate to. + * @param {Object} params The parameters to fill into any placeholders + * within the translations. + * @returns {Object} The translation or an empty object if no matching + * translation was found. + */ + getJsonPlaceholders(locale: string, params?: any): any; + /** + * Creates a response with file content. + * @param {String} path The path of the file to return. + * @param {Object} [params={}] The parameters to be included in the response + * header. These will also be used to fill placeholders. + * @param {Object} [placeholders={}] The placeholders to fill in the content. + * These will not be included in the response header. + * @returns {Object} The Promise Router response. + */ + pageResponse(path: string, params?: any, placeholders?: any): any; + /** + * Creates a response with file content. + * @param {String} path The path of the file to return. + * @returns {Object} The PromiseRouter response. + */ + fileResponse(path: string): any; + /** + * Reads and returns the content of a file at a given path. File reading to + * serve content on the static route is only allowed from the pages + * directory on downwards. + * ----------------------------------------------------------------------- + * **WARNING:** All file reads in the PagesRouter must be executed by this + * wrapper because it also detects and prevents common exploits. + * ----------------------------------------------------------------------- + * @param {String} filePath The path to the file to read. + * @returns {Promise} The file content. + */ + readFile(filePath: string): Promise; + /** + * Loads a language resource JSON file that is used for translations. + */ + loadJsonResource(): void; + jsonParameters: any; + /** + * Extracts and returns the page default parameters from the Parse Server + * configuration. These parameters are made accessible in every page served + * by this router. + * @param {Object} config The Parse Server configuration. + * @returns {Object} The default parameters. + */ + getDefaultParams(config: any): any; + /** + * Extracts and returns the locale from an express request. + * @param {Object} req The express request. + * @returns {String|undefined} The locale, or undefined if no locale was set. + */ + getLocale(req: any): string | undefined; + /** + * Creates a response with http redirect. + * @param {Object} req The express request. + * @param {String} path The path of the file to return. + * @param {Object} params The query parameters to include. + * @returns {Object} The Promise Router response. + */ + redirectResponse(url: any, params: any): any; + defaultPagePath(file: any): any; + composePageUrl(file: any, publicServerUrl: any, locale: any): any; + notFound(): { + text: string; + status: number; + }; + invalidRequest(): void; + /** + * Sets the Parse Server configuration in the request object to make it + * easily accessible throughtout request processing. + * @param {Object} req The request. + * @param {Boolean} failGracefully Is true if failing to set the config should + * not result in an invalid request response. Default is `false`. + */ + setConfig(req: any, failGracefully?: boolean): Promise; + mountPagesRoutes(): void; + mountCustomRoutes(): void; + mountStaticRoute(): void; + expressRouter(): any; +} +declare var _default: typeof PagesRouter; +export const pageParamHeaderPrefix: "x-parse-page-param-"; +export const pageParams: Readonly<{ + appName: string; + appId: string; + token: string; + username: string; + error: string; + locale: string; + publicServerUrl: string; +}>; +export const pages: Readonly<{ + passwordReset: any; + passwordResetSuccess: any; + passwordResetLinkInvalid: any; + emailVerificationSuccess: any; + emailVerificationSendFail: any; + emailVerificationSendSuccess: any; + emailVerificationLinkInvalid: any; + emailVerificationLinkExpired: any; +}>; diff --git a/types/Routers/PublicAPIRouter.d.ts b/types/Routers/PublicAPIRouter.d.ts new file mode 100644 index 0000000000..2da36fd930 --- /dev/null +++ b/types/Routers/PublicAPIRouter.d.ts @@ -0,0 +1,28 @@ +export var __esModule: boolean; +export default _default; +declare const PublicAPIRouter_base: any; +export class PublicAPIRouter extends PublicAPIRouter_base { + [x: string]: any; + verifyEmail(req: any): any; + resendVerificationEmail(req: any): any; + changePassword(req: any): Promise; + requestResetPassword(req: any): any; + resetPassword(req: any): any; + invalidLink(req: any): Promise<{ + status: number; + location: any; + }>; + invalidVerificationLink(req: any): Promise<{ + status: number; + location: any; + }>; + missingPublicServerURL(): Promise<{ + text: string; + status: number; + }>; + invalidRequest(): void; + setConfig(req: any): Promise; + mountRoutes(): void; + expressRouter(): any; +} +declare var _default: typeof PublicAPIRouter; diff --git a/types/Routers/PurgeRouter.d.ts b/types/Routers/PurgeRouter.d.ts new file mode 100644 index 0000000000..f31ba6a94f --- /dev/null +++ b/types/Routers/PurgeRouter.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export default _default; +declare const PurgeRouter_base: any; +export class PurgeRouter extends PurgeRouter_base { + [x: string]: any; + handlePurge(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof PurgeRouter; diff --git a/types/Routers/PushRouter.d.ts b/types/Routers/PushRouter.d.ts new file mode 100644 index 0000000000..d1a42ccfaa --- /dev/null +++ b/types/Routers/PushRouter.d.ts @@ -0,0 +1,15 @@ +export var __esModule: boolean; +export default _default; +declare const PushRouter_base: any; +export class PushRouter extends PushRouter_base { + [x: string]: any; + static handlePOST(req: any): Promise; + /** + * Get query condition from the request body. + * @param {Object} req A request object + * @returns {Object} The query condition, the where field in a query api call + */ + static getQueryCondition(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof PushRouter; diff --git a/types/Routers/RolesRouter.d.ts b/types/Routers/RolesRouter.d.ts new file mode 100644 index 0000000000..e16c7d00bb --- /dev/null +++ b/types/Routers/RolesRouter.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export default _default; +declare const RolesRouter_base: any; +export class RolesRouter extends RolesRouter_base { + [x: string]: any; + className(): string; + mountRoutes(): void; +} +declare var _default: typeof RolesRouter; diff --git a/types/Routers/SchemasRouter.d.ts b/types/Routers/SchemasRouter.d.ts new file mode 100644 index 0000000000..98f296601b --- /dev/null +++ b/types/Routers/SchemasRouter.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +declare const SchemasRouter_base: any; +export class SchemasRouter extends SchemasRouter_base { + [x: string]: any; + mountRoutes(): void; +} +export {}; diff --git a/types/Routers/SecurityRouter.d.ts b/types/Routers/SecurityRouter.d.ts new file mode 100644 index 0000000000..b10670dd17 --- /dev/null +++ b/types/Routers/SecurityRouter.d.ts @@ -0,0 +1,9 @@ +export var __esModule: boolean; +export default _default; +declare const SecurityRouter_base: any; +export class SecurityRouter extends SecurityRouter_base { + [x: string]: any; + mountRoutes(): void; + _enforceSecurityCheckEnabled(req: any): Promise; +} +declare var _default: typeof SecurityRouter; diff --git a/types/Routers/SessionsRouter.d.ts b/types/Routers/SessionsRouter.d.ts new file mode 100644 index 0000000000..73968107d3 --- /dev/null +++ b/types/Routers/SessionsRouter.d.ts @@ -0,0 +1,11 @@ +export var __esModule: boolean; +export default _default; +declare const SessionsRouter_base: any; +export class SessionsRouter extends SessionsRouter_base { + [x: string]: any; + className(): string; + handleMe(req: any): any; + handleUpdateToRevocableSession(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof SessionsRouter; diff --git a/types/Routers/UsersRouter.d.ts b/types/Routers/UsersRouter.d.ts new file mode 100644 index 0000000000..c6c71fed12 --- /dev/null +++ b/types/Routers/UsersRouter.d.ts @@ -0,0 +1,31 @@ +export var __esModule: boolean; +export default _default; +declare const UsersRouter_base: any; +export class UsersRouter extends UsersRouter_base { + [x: string]: any; + /** + * Removes all "_" prefixed properties from an object, except "__type" + * @param {Object} obj An object. + */ + static removeHiddenProperties(obj: any): void; + className(): string; + /** + * Validates a password request in login and verifyPassword + * @param {Object} req The request + * @returns {Object} User object + * @private + */ + private _authenticateUserFromRequest; + handleMe(req: any): any; + handleLogIn(req: any): Promise<{ + response: any; + }>; + handleVerifyPassword(req: any): any; + handleLogOut(req: any): any; + _runAfterLogoutTrigger(req: any, session: any): void; + _throwOnBadEmailConfig(req: any): void; + handleResetRequest(req: any): any; + handleVerificationEmailRequest(req: any): any; + mountRoutes(): void; +} +declare var _default: typeof UsersRouter; diff --git a/types/Security/Check.d.ts b/types/Security/Check.d.ts new file mode 100644 index 0000000000..1494fc2a31 --- /dev/null +++ b/types/Security/Check.d.ts @@ -0,0 +1,55 @@ +export var __esModule: boolean; +export default _default; +declare var _default: typeof Check; +/** + * @module SecurityCheck + */ +/** + * A security check. + * @class Check + */ +export class Check { + /** + * Constructs a new security check. + * @param {Object} params The parameters. + * @param {String} params.title The title. + * @param {String} params.warning The warning message if the check fails. + * @param {String} params.solution The solution to fix the check. + * @param {Promise} params.check The check as synchronous or asynchronous function. + */ + constructor(params: { + title: string; + warning: string; + solution: string; + check: Promise; + }); + title: string; + warning: string; + solution: string; + check: Promise; + _checkState: string; + /** + * Returns the current check state. + * @return {CheckState} The check state. + */ + checkState(): Readonly<{ + none: string; + fail: string; + success: string; + }>; + run(): Promise; + stateFailError: any; + /** + * Validates the constructor parameters. + * @param {Object} params The parameters to validate. + */ + _validateParams(params: any): void; +} +/** + * The check state. + */ +export const CheckState: Readonly<{ + none: string; + fail: string; + success: string; +}>; diff --git a/types/Security/CheckGroup.d.ts b/types/Security/CheckGroup.d.ts new file mode 100644 index 0000000000..6f23ea33b5 --- /dev/null +++ b/types/Security/CheckGroup.d.ts @@ -0,0 +1,26 @@ +export = CheckGroup; +/** + * @module SecurityCheck + */ +/** + * A group of security checks. + * @interface CheckGroup + */ +declare class CheckGroup { + _name: void; + _checks: void; + /** + * The security check group name; to be overridden by child class. + */ + setName(): void; + name(): void; + /** + * The security checks; to be overridden by child class. + */ + setChecks(): void; + checks(): void; + /** + * Runs all checks. + */ + run(): Promise; +} diff --git a/types/Security/CheckGroups/CheckGroupDatabase.d.ts b/types/Security/CheckGroups/CheckGroupDatabase.d.ts new file mode 100644 index 0000000000..e8fcf39356 --- /dev/null +++ b/types/Security/CheckGroups/CheckGroupDatabase.d.ts @@ -0,0 +1,15 @@ +export = CheckGroupDatabase; +declare const CheckGroupDatabase_base: any; +/** + * @module SecurityCheck + */ +/** +* The security checks group for Parse Server configuration. +* Checks common Parse Server parameters such as access keys. +*/ +declare class CheckGroupDatabase extends CheckGroupDatabase_base { + [x: string]: any; + setName(): string; + setChecks(): _Check.Check[]; +} +import _Check = require("../Check"); diff --git a/types/Security/CheckGroups/CheckGroupServerConfig.d.ts b/types/Security/CheckGroups/CheckGroupServerConfig.d.ts new file mode 100644 index 0000000000..18cdb1164d --- /dev/null +++ b/types/Security/CheckGroups/CheckGroupServerConfig.d.ts @@ -0,0 +1,15 @@ +export = CheckGroupServerConfig; +declare const CheckGroupServerConfig_base: any; +/** + * @module SecurityCheck + */ +/** +* The security checks group for Parse Server configuration. +* Checks common Parse Server parameters such as access keys. +*/ +declare class CheckGroupServerConfig extends CheckGroupServerConfig_base { + [x: string]: any; + setName(): string; + setChecks(): _Check.Check[]; +} +import _Check = require("../Check"); diff --git a/types/Security/CheckGroups/CheckGroups.d.ts b/types/Security/CheckGroups/CheckGroups.d.ts new file mode 100644 index 0000000000..ac2e65cff8 --- /dev/null +++ b/types/Security/CheckGroups/CheckGroups.d.ts @@ -0,0 +1,3 @@ +export var __esModule: boolean; +export var CheckGroupDatabase: any; +export var CheckGroupServerConfig: any; diff --git a/types/Security/CheckRunner.d.ts b/types/Security/CheckRunner.d.ts new file mode 100644 index 0000000000..286ccf54a9 --- /dev/null +++ b/types/Security/CheckRunner.d.ts @@ -0,0 +1,80 @@ +export = CheckRunner; +/** + * @module SecurityCheck + */ +/** + * The security check runner. + */ +declare class CheckRunner { + /** + * The security check runner. + * @param {Object} [config] The configuration options. + * @param {Boolean} [config.enableCheck=false] Is true if Parse Server should report weak security settings. + * @param {Boolean} [config.enableCheckLog=false] Is true if the security check report should be written to logs. + * @param {Object} [config.checkGroups] The check groups to run. Default are the groups defined in `./CheckGroups/CheckGroups.js`. + */ + constructor(config?: { + enableCheck?: boolean; + enableCheckLog?: boolean; + checkGroups?: any; + }); + enableCheck: boolean; + enableCheckLog: boolean; + checkGroups: any; + /** + * Runs all security checks and returns the results. + * @params + * @returns {Object} The security check report. + */ + run({ version }?: { + version?: string; + }): any; + /** + * Generates a security check report in JSON format with schema: + * ``` + * { + * report: { + * version: "1.0.0", // The report version, defines the schema + * state: "fail" // The disjunctive indicator of failed checks in all groups. + * groups: [ // The check groups + * { + * name: "House", // The group name + * state: "fail" // The disjunctive indicator of failed checks in this group. + * checks: [ // The checks + * title: "Door locked", // The check title + * state: "fail" // The check state + * warning: "Anyone can enter your house." // The warning. + * solution: "Lock your door." // The solution. + * ] + * }, + * ... + * ] + * } + * } + * ``` + * @param {Object} params The parameters. + * @param {Array} params.groups The check groups. + * @param {String} params.version: The report schema version. + * @returns {Object} The report. + */ + _generateReport({ groups, version }: { + groups: Array; + version: string; + }): any; + /** + * Logs the security check report. + * @param {Object} report The report to log. + */ + _logReport(report: any): void; + /** + * Returns an icon for use in the report log output. + * @param {CheckState} state The check state. + * @returns {String} The icon. + */ + _getLogIconForState(state: any): string; + /** + * Validates the constructor parameters. + * @param {Object} params The parameters to validate. + */ + _validateParams(params: any): void; +} diff --git a/types/StatusHandler.d.ts b/types/StatusHandler.d.ts new file mode 100644 index 0000000000..69fa0049dc --- /dev/null +++ b/types/StatusHandler.d.ts @@ -0,0 +1,17 @@ +export var __esModule: boolean; +export function flatten(array: any): any; +export function jobStatusHandler(config: any): Readonly<{ + setRunning: (jobName: any, params: any) => any; + setSucceeded: (message: any) => any; + setMessage: (message: any) => any; + setFailed: (message: any) => any; +}>; +export function pushStatusHandler(config: any, existingObjectId: any): Readonly<{ + setInitial: (body: {}, where: any, options?: { + source: string; + }) => any; + setRunning: (batches: any) => any; + trackSent: (results: any, UTCOffset: any, cleanupInstallations?: string) => any; + complete: () => any; + fail: (err: any) => any; +}>; diff --git a/types/TestUtils.d.ts b/types/TestUtils.d.ts new file mode 100644 index 0000000000..8ac1bd1cac --- /dev/null +++ b/types/TestUtils.d.ts @@ -0,0 +1,6 @@ +export var __esModule: boolean; +/** + * Destroys all data in the database + * @param {boolean} fast set to true if it's ok to just drop objects and not indexes. + */ +export function destroyAllDataPermanently(fast: boolean): Promise; diff --git a/types/Utils.d.ts b/types/Utils.d.ts new file mode 100644 index 0000000000..34e9728df2 --- /dev/null +++ b/types/Utils.d.ts @@ -0,0 +1,91 @@ +export = Utils; +/** + * The general purpose utilities. + */ +declare class Utils { + /** + * @function getLocalizedPath + * @description Returns a localized file path accoring to the locale. + * + * Localized files are searched in subfolders of a given path, e.g. + * + * root/ + * ├── base/ // base path to files + * │ ├── example.html // default file + * │ └── de/ // de language folder + * │ │ └── example.html // de localized file + * │ └── de-AT/ // de-AT locale folder + * │ │ └── example.html // de-AT localized file + * + * Files are matched with the locale in the following order: + * 1. Locale match, e.g. locale `de-AT` matches file in folder `de-AT`. + * 2. Language match, e.g. locale `de-AT` matches file in folder `de`. + * 3. Default; file in base folder is returned. + * + * @param {String} defaultPath The absolute file path, which is also + * the default path returned if localization is not available. + * @param {String} locale The locale. + * @returns {Promise} The object contains: + * - `path`: The path to the localized file, or the original path if + * localization is not available. + * - `subdir`: The subdirectory of the localized file, or undefined if + * there is no matching localized file. + */ + static getLocalizedPath(defaultPath: string, locale: string): Promise; + /** + * @function fileExists + * @description Checks whether a file exists. + * @param {String} path The file path. + * @returns {Promise} Is true if the file can be accessed, false otherwise. + */ + static fileExists(path: string): Promise; + /** + * @function isPath + * @description Evaluates whether a string is a file path (as opposed to a URL for example). + * @param {String} s The string to evaluate. + * @returns {Boolean} Returns true if the evaluated string is a path. + */ + static isPath(s: string): boolean; + /** + * Flattens an object and crates new keys with custom delimiters. + * @param {Object} obj The object to flatten. + * @param {String} [delimiter='.'] The delimiter of the newly generated keys. + * @param {Object} result + * @returns {Object} The flattened object. + **/ + static flattenObject(obj: any, parentKey: any, delimiter?: string, result?: any): any; + /** + * Determines whether an object is a Promise. + * @param {any} object The object to validate. + * @returns {Boolean} Returns true if the object is a promise. + */ + static isPromise(object: any): boolean; + /** + * Creates an object with all permutations of the original keys. + * @param {Object} object The object to permutate. + * @param {Integer} [index=0] The current key index. + * @param {Object} [current={}] The current result entry being composed. + * @param {Array} [results=[]] The resulting array of permutations. + */ + static getObjectKeyPermutations(object: any, index?: any, current?: any, results?: any[]): any[]; + /** + * Validates parameters and throws if a parameter is invalid. + * Example parameter types syntax: + * ``` + * { + * parameterName: { + * t: 'boolean', + * v: isBoolean, + * o: true + * }, + * ... + * } + * ``` + * @param {Object} params The parameters to validate. + * @param {Array} types The parameter types used for validation. + * @param {Object} types.t The parameter type; used for error message, not for validation. + * @param {Object} types.v The function to validate the parameter value. + * @param {Boolean} [types.o=false] Is true if the parameter is optional. + */ + static validateParams(params: any, types: Array): void; +} diff --git a/types/batch.d.ts b/types/batch.d.ts new file mode 100644 index 0000000000..ce2bc12082 --- /dev/null +++ b/types/batch.d.ts @@ -0,0 +1,2 @@ +export function mountOnto(router: any): void; +export function makeBatchRoutingPathFunction(originalUrl: any, serverURL: any, publicServerURL: any): (requestPath: any) => string; diff --git a/types/cache.d.ts b/types/cache.d.ts new file mode 100644 index 0000000000..909bc543b3 --- /dev/null +++ b/types/cache.d.ts @@ -0,0 +1,5 @@ +export var __esModule: boolean; +export default _default; +export var AppCache: _InMemoryCache.InMemoryCache; +declare var _default: _InMemoryCache.InMemoryCache; +import _InMemoryCache = require("./Adapters/Cache/InMemoryCache"); diff --git a/types/cli/definitions/parse-live-query-server.d.ts b/types/cli/definitions/parse-live-query-server.d.ts new file mode 100644 index 0000000000..48bdc8e426 --- /dev/null +++ b/types/cli/definitions/parse-live-query-server.d.ts @@ -0,0 +1,60 @@ +export var __esModule: boolean; +export default _default; +declare var _default: { + appId: { + env: string; + help: string; + }; + cacheTimeout: { + env: string; + help: string; + action: (opt: any) => number; + }; + keyPairs: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + logLevel: { + env: string; + help: string; + }; + masterKey: { + env: string; + help: string; + }; + port: { + env: string; + help: string; + action: (opt: any) => number; + default: number; + }; + pubSubAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + redisOptions: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + redisURL: { + env: string; + help: string; + }; + serverURL: { + env: string; + help: string; + }; + websocketTimeout: { + env: string; + help: string; + action: (opt: any) => number; + }; + wssAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; +}; diff --git a/types/cli/definitions/parse-server.d.ts b/types/cli/definitions/parse-server.d.ts new file mode 100644 index 0000000000..3b64058b54 --- /dev/null +++ b/types/cli/definitions/parse-server.d.ts @@ -0,0 +1,403 @@ +export var __esModule: boolean; +export default _default; +declare var _default: { + accountLockout: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + allowClientClassCreation: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + allowCustomObjectId: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + allowHeaders: { + env: string; + help: string; + action: typeof import("../../Options/parsers").arrayParser; + }; + allowOrigin: { + env: string; + help: string; + }; + analyticsAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + appId: { + env: string; + help: string; + required: boolean; + }; + appName: { + env: string; + help: string; + }; + auth: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + cacheAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + cacheMaxSize: { + env: string; + help: string; + action: (opt: any) => number; + default: number; + }; + cacheTTL: { + env: string; + help: string; + action: (opt: any) => number; + default: number; + }; + clientKey: { + env: string; + help: string; + }; + cloud: { + env: string; + help: string; + }; + cluster: { + env: string; + help: string; + action: any; + }; + collectionPrefix: { + env: string; + help: string; + default: string; + }; + customPages: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + default: {}; + }; + databaseAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + databaseOptions: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + databaseURI: { + env: string; + help: string; + required: boolean; + default: string; + }; + directAccess: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + dotNetKey: { + env: string; + help: string; + }; + emailAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + emailVerifyTokenReuseIfValid: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + emailVerifyTokenValidityDuration: { + env: string; + help: string; + action: (opt: any) => number; + }; + enableAnonymousUsers: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + enableExpressErrorHandler: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + encryptionKey: { + env: string; + help: string; + }; + expireInactiveSessions: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + fileKey: { + env: string; + help: string; + }; + filesAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + fileUpload: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + default: {}; + }; + graphQLPath: { + env: string; + help: string; + default: string; + }; + graphQLSchema: { + env: string; + help: string; + }; + host: { + env: string; + help: string; + default: string; + }; + idempotencyOptions: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + default: {}; + }; + javascriptKey: { + env: string; + help: string; + }; + jsonLogs: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + }; + liveQuery: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + liveQueryServerOptions: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + loggerAdapter: { + env: string; + help: string; + action: typeof import("../../Options/parsers").moduleOrObjectParser; + }; + logLevel: { + env: string; + help: string; + }; + logsFolder: { + env: string; + help: string; + default: string; + }; + masterKey: { + env: string; + help: string; + required: boolean; + }; + masterKeyIps: { + env: string; + help: string; + action: typeof import("../../Options/parsers").arrayParser; + default: any[]; + }; + maxLimit: { + env: string; + help: string; + action: (opt: any) => number; + }; + maxLogFiles: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + maxUploadSize: { + env: string; + help: string; + default: string; + }; + middleware: { + env: string; + help: string; + }; + mountGraphQL: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + mountPath: { + env: string; + help: string; + default: string; + }; + mountPlayground: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + objectIdSize: { + env: string; + help: string; + action: (opt: any) => number; + default: number; + }; + pages: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + default: {}; + }; + passwordPolicy: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + playgroundPath: { + env: string; + help: string; + default: string; + }; + port: { + env: string; + help: string; + action: (opt: any) => number; + default: number; + }; + preserveFileName: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + preventLoginWithUnverifiedEmail: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + protectedFields: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + default: { + _User: { + '*': string[]; + }; + }; + }; + publicServerURL: { + env: string; + help: string; + }; + push: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + }; + readOnlyMasterKey: { + env: string; + help: string; + }; + restAPIKey: { + env: string; + help: string; + }; + revokeSessionOnPasswordReset: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + scheduledPush: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + security: { + env: string; + help: string; + action: typeof import("../../Options/parsers").objectParser; + default: {}; + }; + serverCloseComplete: { + env: string; + help: string; + }; + serverStartComplete: { + env: string; + help: string; + }; + serverURL: { + env: string; + help: string; + required: boolean; + }; + sessionLength: { + env: string; + help: string; + action: (opt: any) => number; + default: number; + }; + silent: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + }; + startLiveQueryServer: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + }; + userSensitiveFields: { + env: string; + help: string; + action: typeof import("../../Options/parsers").arrayParser; + }; + verbose: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + }; + verifyUserEmails: { + env: string; + help: string; + action: typeof import("../../Options/parsers").booleanParser; + default: boolean; + }; + webhookKey: { + env: string; + help: string; + }; +}; diff --git a/types/cli/parse-live-query-server.d.ts b/types/cli/parse-live-query-server.d.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/types/cli/parse-live-query-server.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/types/cli/parse-server.d.ts b/types/cli/parse-server.d.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/types/cli/parse-server.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/types/cli/utils/commander.d.ts b/types/cli/utils/commander.d.ts new file mode 100644 index 0000000000..7345c55853 --- /dev/null +++ b/types/cli/utils/commander.d.ts @@ -0,0 +1,4 @@ +export var __esModule: boolean; +export default _default; +declare var _default: _commander.Command; +import _commander = require("commander"); diff --git a/types/cli/utils/runner.d.ts b/types/cli/utils/runner.d.ts new file mode 100644 index 0000000000..39c0ec4213 --- /dev/null +++ b/types/cli/utils/runner.d.ts @@ -0,0 +1,8 @@ +export var __esModule: boolean; +export default _default; +declare function _default({ definitions, help, usage, start }: { + definitions: any; + help: any; + usage: any; + start: any; +}): void; diff --git a/types/cloud-code/HTTPResponse.d.ts b/types/cloud-code/HTTPResponse.d.ts new file mode 100644 index 0000000000..6e00336aef --- /dev/null +++ b/types/cloud-code/HTTPResponse.d.ts @@ -0,0 +1,18 @@ +export var __esModule: boolean; +export default HTTPResponse; +/** + * @typedef Parse.Cloud.HTTPResponse + * @property {Buffer} buffer The raw byte representation of the response body. Use this to receive binary data. See Buffer for more details. + * @property {Object} cookies The cookies sent by the server. The keys in this object are the names of the cookies. The values are Parse.Cloud.Cookie objects. + * @property {Object} data The parsed response body as a JavaScript object. This is only available when the response Content-Type is application/x-www-form-urlencoded or application/json. + * @property {Object} headers The headers sent by the server. The keys in this object are the names of the headers. We do not support multiple response headers with the same name. In the common case of Set-Cookie headers, please use the cookies field instead. + * @property {Number} status The status code. + * @property {String} text The raw text representation of the response body. + */ +declare class HTTPResponse { + constructor(response: any, body: any); + status: any; + headers: any; + cookies: any; + buffer: Buffer; +} diff --git a/types/cloud-code/Parse.Cloud.d.ts b/types/cloud-code/Parse.Cloud.d.ts new file mode 100644 index 0000000000..62c888987b --- /dev/null +++ b/types/cloud-code/Parse.Cloud.d.ts @@ -0,0 +1,65 @@ +export function define(functionName: any, handler: any, validationHandler: any): void; +export function job(functionName: any, handler: any): void; +export function beforeSave(parseClass: any, handler: any, validationHandler: any): void; +export function beforeDelete(parseClass: any, handler: any, validationHandler: any): void; +export function beforeLogin(handler: any, ...args: any[]): void; +export function afterLogin(handler: any, ...args: any[]): void; +export function afterLogout(handler: any, ...args: any[]): void; +export function afterSave(parseClass: any, handler: any, validationHandler: any): void; +export function afterDelete(parseClass: any, handler: any, validationHandler: any): void; +export function beforeFind(parseClass: any, handler: any, validationHandler: any): void; +export function afterFind(parseClass: any, handler: any, validationHandler: any): void; +export function beforeSaveFile(handler: any, validationHandler: any): void; +export function afterSaveFile(handler: any, validationHandler: any): void; +export function beforeDeleteFile(handler: any, validationHandler: any): void; +export function afterDeleteFile(handler: any, validationHandler: any): void; +export function beforeConnect(handler: any, validationHandler: any): void; +export function sendEmail(data: any): any; +export function beforeSubscribe(parseClass: any, handler: any, validationHandler: any): void; +export function onLiveQueryEvent(handler: any): void; +export function afterLiveQueryEvent(parseClass: any, handler: any, validationHandler: any): void; +export function _removeAllHooks(): void; +export function useMasterKey(): void; +export const httpRequest: { + (options: { + /** + * The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent. + */ + body: any; + /** + * The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object. + */ + error: Function; + /** + * Whether to follow redirects caused by HTTP 3xx responses. Defaults to false. + */ + followRedirects: boolean; + /** + * The headers for the request. + */ + headers: any; + /** + * The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified. + */ + method: string; + /** + * The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott. + */ + params: any; + /** + * The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object. + */ + success: Function; + /** + * The url to send the request to. + */ + url: string; + }): Promise; + encodeBody: ({ body, headers }: { + body: any; + headers?: {}; + }) => { + body: any; + headers: {}; + }; +}; diff --git a/types/cloud-code/httpRequest.d.ts b/types/cloud-code/httpRequest.d.ts new file mode 100644 index 0000000000..f7923a525f --- /dev/null +++ b/types/cloud-code/httpRequest.d.ts @@ -0,0 +1,50 @@ +declare function _exports(options: Parse.Cloud.HTTPOptions): Promise; +declare namespace _exports { + export { encodeBody }; +} +export = _exports; +declare namespace Parse { + namespace Cloud { + type HTTPOptions = { + /** + * The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent. + */ + body: string | any; + /** + * The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object. + */ + error: Function; + /** + * Whether to follow redirects caused by HTTP 3xx responses. Defaults to false. + */ + followRedirects: boolean; + /** + * The headers for the request. + */ + headers: any; + /** + * The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified. + */ + method: string; + /** + * The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott. + */ + params: string | any; + /** + * The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object. + */ + success: Function; + /** + * The url to send the request to. + */ + url: string; + }; + } +} +declare function encodeBody({ body, headers }: { + body: any; + headers?: {}; +}): { + body: any; + headers: {}; +}; diff --git a/types/cryptoUtils.d.ts b/types/cryptoUtils.d.ts new file mode 100644 index 0000000000..5462848684 --- /dev/null +++ b/types/cryptoUtils.d.ts @@ -0,0 +1,6 @@ +export var __esModule: boolean; +export function randomHexString(size: any): string; +export function randomString(size: any): string; +export function newObjectId(size?: number): string; +export function newToken(): string; +export function md5Hash(string: any): string; diff --git a/types/defaults.d.ts b/types/defaults.d.ts new file mode 100644 index 0000000000..cc2b1b0a18 --- /dev/null +++ b/types/defaults.d.ts @@ -0,0 +1,12 @@ +export var __esModule: boolean; +export default _default; +declare namespace _default { + export const jsonLogs: string | boolean; + export { logsFolder }; + export { verbose }; + export { level }; +} +export const DefaultMongoURI: any; +declare const logsFolder: string; +declare const verbose: boolean; +declare const level: string; diff --git a/types/deprecated.d.ts b/types/deprecated.d.ts new file mode 100644 index 0000000000..f3c2a7f149 --- /dev/null +++ b/types/deprecated.d.ts @@ -0,0 +1,2 @@ +export var __esModule: boolean; +export function useExternal(name: any, moduleName: any): () => never; diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 0000000000..124cca5642 --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1,22 @@ +export var __esModule: boolean; +export var FileSystemAdapter: any; +export var InMemoryCacheAdapter: any; +export var NullCacheAdapter: any; +export var RedisCacheAdapter: any; +export var LRUCacheAdapter: any; +export var PushWorker: typeof _PushWorker.PushWorker; +export var ParseGraphQLServer: typeof _ParseGraphQLServer.ParseGraphQLServer; +export var logger: import("./Controllers/LoggerController").LoggerController; +export default _default; +import _PushWorker = require("./Push/PushWorker"); +import _ParseGraphQLServer = require("./GraphQL/ParseGraphQLServer"); +export var TestUtils: any; +declare function _ParseServer(options: any): any; +declare namespace _ParseServer { + const createLiveQueryServer: any; + const start: any; +} +export const S3Adapter: () => never; +export const GCSAdapter: () => never; +declare var _default: any; +export { _ParseServer as ParseServer }; diff --git a/types/logger.d.ts b/types/logger.d.ts new file mode 100644 index 0000000000..1a6cdd4659 --- /dev/null +++ b/types/logger.d.ts @@ -0,0 +1,7 @@ +export var __esModule: boolean; +declare var _default: _LoggerController.LoggerController; +export default _default; +export var logger: _LoggerController.LoggerController; +export function setLogger(aLogger: any): void; +export function getLogger(): _LoggerController.LoggerController; +import _LoggerController = require("./Controllers/LoggerController"); diff --git a/types/middlewares.d.ts b/types/middlewares.d.ts new file mode 100644 index 0000000000..bd46e2f68e --- /dev/null +++ b/types/middlewares.d.ts @@ -0,0 +1,15 @@ +export var __esModule: boolean; +export function handleParseHeaders(req: any, res: any, next: any): void | Promise; +export function allowCrossDomain(appId: any): (req: any, res: any, next: any) => void; +export function allowMethodOverride(req: any, res: any, next: any): void; +export function handleParseErrors(err: any, req: any, res: any, next: any): any; +export function enforceMasterKeyAccess(req: any, res: any, next: any): void; +export function promiseEnforceMasterKeyAccess(request: any): Promise; +/** + * Deduplicates a request to ensure idempotency. Duplicates are determined by the request ID + * in the request header. If a request has no request ID, it is executed anyway. + * @param {*} req The request to evaluate. + * @returns Promise<{}> + */ +export function promiseEnsureIdempotency(req: any): any; +export const DEFAULT_ALLOWED_HEADERS: "X-Parse-Master-Key, X-Parse-REST-API-Key, X-Parse-Javascript-Key, X-Parse-Application-Id, X-Parse-Client-Version, X-Parse-Session-Token, X-Requested-With, X-Parse-Revocable-Session, X-Parse-Request-Id, Content-Type, Pragma, Cache-Control"; diff --git a/types/password.d.ts b/types/password.d.ts new file mode 100644 index 0000000000..27a82b9d69 --- /dev/null +++ b/types/password.d.ts @@ -0,0 +1,2 @@ +export function hash(password: any): any; +export function compare(password: any, hashedPassword: any): any; diff --git a/types/request.d.ts b/types/request.d.ts new file mode 100644 index 0000000000..cd1e2166c8 --- /dev/null +++ b/types/request.d.ts @@ -0,0 +1,44 @@ +declare const _exports: { + (options: { + /** + * The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent. + */ + body: any; + /** + * The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object. + */ + error: Function; + /** + * Whether to follow redirects caused by HTTP 3xx responses. Defaults to false. + */ + followRedirects: boolean; + /** + * The headers for the request. + */ + headers: any; + /** + * The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified. + */ + method: string; + /** + * The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott. + */ + params: any; + /** + * The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object. + */ + success: Function; + /** + * The url to send the request to. + */ + url: string; + }): Promise; + encodeBody: ({ body, headers }: { + body: any; + headers?: {}; + }) => { + body: any; + headers: {}; + }; +}; +export = _exports; diff --git a/types/requiredParameter.d.ts b/types/requiredParameter.d.ts new file mode 100644 index 0000000000..57bd166b06 --- /dev/null +++ b/types/requiredParameter.d.ts @@ -0,0 +1,3 @@ +export var __esModule: boolean; +export default _default; +declare function _default(errorMessage: any): never; diff --git a/types/rest.d.ts b/types/rest.d.ts new file mode 100644 index 0000000000..e3906a6e37 --- /dev/null +++ b/types/rest.d.ts @@ -0,0 +1,5 @@ +export function create(config: any, auth: any, className: any, restObject: any, clientSDK: any, context: any): any; +export function del(config: any, auth: any, className: any, objectId: any, context: any): Promise; +export function find(config: any, auth: any, className: any, restWhere: any, restOptions: any, clientSDK: any, context: any): Promise; +export function get(config: any, auth: any, className: any, objectId: any, restOptions: any, clientSDK: any, context: any): Promise; +export function update(config: any, auth: any, className: any, restWhere: any, restObject: any, clientSDK: any, context: any): Promise; diff --git a/types/triggers.d.ts b/types/triggers.d.ts new file mode 100644 index 0000000000..c5f8c6db84 --- /dev/null +++ b/types/triggers.d.ts @@ -0,0 +1,72 @@ +export var __esModule: boolean; +export function addFunction(functionName: any, handler: any, validationHandler: any, applicationId: any): void; +export function addJob(jobName: any, handler: any, applicationId: any): void; +export function addTrigger(type: any, className: any, handler: any, applicationId: any, validationHandler: any): void; +export function addFileTrigger(type: any, handler: any, applicationId: any, validationHandler: any): void; +export function addConnectTrigger(type: any, handler: any, applicationId: any, validationHandler: any): void; +export function addLiveQueryEventHandler(handler: any, applicationId: any): void; +export function removeFunction(functionName: any, applicationId: any): void; +export function removeTrigger(type: any, className: any, applicationId: any): void; +export function _unregisterAll(): void; +export function getTrigger(className: any, triggerType: any, applicationId: any): any; +export function runTrigger(trigger: any, name: any, request: any, auth: any): Promise; +export function getFileTrigger(type: any, applicationId: any): any; +export function triggerExists(className: any, type: any, applicationId: any): boolean; +export function getFunction(functionName: any, applicationId: any): any; +export function getFunctionNames(applicationId: any): any[]; +export function getJob(jobName: any, applicationId: any): any; +export function getJobs(applicationId: any): any; +export function getValidator(functionName: any, applicationId: any): any; +export function getRequestObject(triggerType: any, auth: any, parseObject: any, originalParseObject: any, config: any, context: any): { + triggerName: any; + object: any; + master: boolean; + log: any; + headers: any; + ip: any; +}; +export function getRequestQueryObject(triggerType: any, auth: any, query: any, count: any, config: any, context: any, isGet: any): { + triggerName: any; + query: any; + master: boolean; + count: any; + log: any; + isGet: any; + headers: any; + ip: any; + context: any; +}; +export function getResponseObject(request: any, resolve: any, reject: any): { + success: (response: any) => any; + error: (error: any) => void; +}; +export function maybeRunAfterFindTrigger(triggerType: any, auth: any, className: any, objects: any, config: any, query: any, context: any): Promise; +export function maybeRunQueryTrigger(triggerType: any, className: any, restWhere: any, restOptions: any, config: any, auth: any, context: any, isGet: any): Promise<{ + restWhere: any; + restOptions: any; +}>; +export function resolveError(message: any, defaultOpts: any): any; +export function maybeRunValidator(request: any, functionName: any, auth: any): Promise; +export function maybeRunTrigger(triggerType: any, auth: any, parseObject: any, originalParseObject: any, config: any, context: any): Promise; +export function inflate(data: any, restObject: any): any; +export function runLiveQueryEventHandlers(data: any, applicationId?: any): void; +export function getRequestFileObject(triggerType: any, auth: any, fileObject: any, config: any): any; +export function maybeRunFileTrigger(triggerType: any, fileObject: any, config: any, auth: any): Promise; +export namespace Types { + const beforeLogin: string; + const afterLogin: string; + const afterLogout: string; + const beforeSave: string; + const afterSave: string; + const beforeDelete: string; + const afterDelete: string; + const beforeFind: string; + const afterFind: string; + const beforeSaveFile: string; + const afterSaveFile: string; + const beforeDeleteFile: string; + const afterDeleteFile: string; + const beforeConnect: string; + const beforeSubscribe: string; + const afterEvent: string; +} diff --git a/types/vendor/mongodbUrl.d.ts b/types/vendor/mongodbUrl.d.ts new file mode 100644 index 0000000000..83dd074b6b --- /dev/null +++ b/types/vendor/mongodbUrl.d.ts @@ -0,0 +1,25 @@ +declare function urlParse(url: any, parseQueryString: any, slashesDenoteHost: any): Url; +declare function urlResolve(source: any, relative: any): string; +declare function urlResolveObject(source: any, relative: any): any; +declare function urlFormat(obj: any): any; +export function Url(): void; +export class Url { + protocol: any; + slashes: boolean; + auth: string; + host: any; + port: string[]; + hostname: any; + hash: string; + search: string; + query: any; + pathname: string; + path: string; + href: string; + parse(url: any, parseQueryString: any, slashesDenoteHost: any): Url; + format(): string; + resolve(relative: any): string; + resolveObject(relative: any): Url; + parseHost(): void; +} +export { urlParse as parse, urlResolve as resolve, urlResolveObject as resolveObject, urlFormat as format }; From 7ee49b7b10851a5426489dc693aac4d28a7a14a6 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Sun, 11 Apr 2021 02:15:49 +0200 Subject: [PATCH 5/5] added types to gitignore --- .gitignore | 3 + types/AccountLockout.d.ts | 54 - types/Adapters/AdapterLoader.d.ts | 26 - .../Adapters/Analytics/AnalyticsAdapter.d.ts | 22 - types/Adapters/Auth/AuthAdapter.d.ts | 7 - types/Adapters/Auth/OAuth1Client.d.ts | 26 - types/Adapters/Auth/apple.d.ts | 2 - types/Adapters/Auth/facebook.d.ts | 2 - types/Adapters/Auth/gcenter.d.ts | 2 - types/Adapters/Auth/github.d.ts | 2 - types/Adapters/Auth/google.d.ts | 2 - types/Adapters/Auth/gpgames.d.ts | 2 - types/Adapters/Auth/httpsRequest.d.ts | 2 - types/Adapters/Auth/index.d.ts | 13 - types/Adapters/Auth/instagram.d.ts | 2 - types/Adapters/Auth/janraincapture.d.ts | 2 - types/Adapters/Auth/janrainengage.d.ts | 2 - types/Adapters/Auth/keycloak.d.ts | 2 - types/Adapters/Auth/ldap.d.ts | 2 - types/Adapters/Auth/line.d.ts | 2 - types/Adapters/Auth/linkedin.d.ts | 2 - types/Adapters/Auth/meetup.d.ts | 2 - types/Adapters/Auth/microsoft.d.ts | 2 - types/Adapters/Auth/oauth2.d.ts | 2 - types/Adapters/Auth/phantauth.d.ts | 2 - types/Adapters/Auth/qq.d.ts | 3 - types/Adapters/Auth/spotify.d.ts | 2 - types/Adapters/Auth/twitter.d.ts | 3 - types/Adapters/Auth/vkontakte.d.ts | 2 - types/Adapters/Auth/wechat.d.ts | 2 - types/Adapters/Auth/weibo.d.ts | 2 - types/Adapters/Cache/CacheAdapter.d.ts | 31 - types/Adapters/Cache/InMemoryCache.d.ts | 14 - .../Adapters/Cache/InMemoryCacheAdapter.d.ts | 12 - types/Adapters/Cache/LRUCache.d.ts | 14 - types/Adapters/Cache/NullCacheAdapter.d.ts | 9 - types/Adapters/Cache/RedisCacheAdapter.d.ts | 16 - types/Adapters/Cache/SchemaCache.d.ts | 14 - types/Adapters/Email/MailAdapter.d.ts | 21 - types/Adapters/Files/FilesAdapter.d.ts | 48 - types/Adapters/Files/GridFSBucketAdapter.d.ts | 27 - types/Adapters/Files/GridStoreAdapter.d.ts | 26 - types/Adapters/Logger/LoggerAdapter.d.ts | 22 - types/Adapters/Logger/WinstonLogger.d.ts | 14 - .../Adapters/Logger/WinstonLoggerAdapter.d.ts | 8 - .../Adapters/MessageQueue/EventEmitterMQ.d.ts | 21 - types/Adapters/PubSub/EventEmitterPubSub.d.ts | 22 - types/Adapters/PubSub/PubSubAdapter.d.ts | 19 - types/Adapters/PubSub/RedisPubSub.d.ts | 14 - types/Adapters/Push/PushAdapter.d.ts | 23 - .../Storage/Mongo/MongoCollection.d.ts | 57 - .../Storage/Mongo/MongoSchemaCollection.d.ts | 53 - .../Storage/Mongo/MongoStorageAdapter.d.ts | 80 -- .../Storage/Mongo/MongoTransform.d.ts | 39 - .../Storage/Postgres/PostgresClient.d.ts | 5 - .../Postgres/PostgresConfigParser.d.ts | 18 - .../Postgres/PostgresStorageAdapter.d.ts | 127 -- .../Adapters/Storage/Postgres/sql/index.d.ts | 13 - types/Adapters/Storage/StorageAdapter.d.ts | 0 types/Adapters/WebSocketServer/WSAdapter.d.ts | 11 - .../Adapters/WebSocketServer/WSSAdapter.d.ts | 28 - types/Auth.d.ts | 48 - types/ClientSDK.d.ts | 6 - types/Config.d.ts | 67 - types/Controllers/AdaptableController.d.ts | 13 - types/Controllers/AnalyticsController.d.ts | 19 - types/Controllers/CacheController.d.ts | 31 - types/Controllers/DatabaseController.d.ts | 77 -- types/Controllers/FilesController.d.ts | 21 - types/Controllers/HooksController.d.ts | 24 - types/Controllers/LiveQueryController.d.ts | 15 - types/Controllers/LoggerController.d.ts | 50 - types/Controllers/ParseGraphQLController.d.ts | 23 - types/Controllers/PushController.d.ts | 32 - types/Controllers/SchemaController.d.ts | 347 ----- types/Controllers/UserController.d.ts | 46 - types/Controllers/index.d.ts | 47 - types/Controllers/types.d.ts | 0 types/Deprecator/Deprecations.d.ts | 376 ------ types/Deprecator/Deprecator.d.ts | 33 - types/GraphQL/ParseGraphQLSchema.d.ts | 56 - types/GraphQL/ParseGraphQLServer.d.ts | 24 - types/GraphQL/helpers/objectsMutations.d.ts | 4 - types/GraphQL/helpers/objectsQueries.d.ts | 18 - .../loaders/defaultGraphQLMutations.d.ts | 2 - .../loaders/defaultGraphQLQueries.d.ts | 2 - .../GraphQL/loaders/defaultGraphQLTypes.d.ts | 226 ---- types/GraphQL/loaders/defaultRelaySchema.d.ts | 6 - types/GraphQL/loaders/filesMutations.d.ts | 5 - types/GraphQL/loaders/functionsMutations.d.ts | 2 - .../GraphQL/loaders/parseClassMutations.d.ts | 2 - types/GraphQL/loaders/parseClassQueries.d.ts | 2 - types/GraphQL/loaders/parseClassTypes.d.ts | 6 - types/GraphQL/loaders/schemaDirectives.d.ts | 3 - types/GraphQL/loaders/schemaMutations.d.ts | 2 - types/GraphQL/loaders/schemaQueries.d.ts | 3 - types/GraphQL/loaders/schemaTypes.d.ts | 47 - types/GraphQL/loaders/usersMutations.d.ts | 2 - types/GraphQL/loaders/usersQueries.d.ts | 9 - types/GraphQL/parseGraphQLUtils.d.ts | 9 - types/GraphQL/transformers/className.d.ts | 2 - .../GraphQL/transformers/constraintType.d.ts | 2 - types/GraphQL/transformers/inputType.d.ts | 2 - types/GraphQL/transformers/mutation.d.ts | 6 - types/GraphQL/transformers/outputType.d.ts | 2 - types/GraphQL/transformers/query.d.ts | 3 - types/GraphQL/transformers/schemaFields.d.ts | 7 - types/KeyPromiseQueue.d.ts | 7 - types/LiveQuery/Client.d.ts | 26 - types/LiveQuery/Id.d.ts | 8 - types/LiveQuery/ParseCloudCodePublisher.d.ts | 8 - types/LiveQuery/ParseLiveQueryServer.d.ts | 30 - types/LiveQuery/ParsePubSub.d.ts | 5 - types/LiveQuery/ParseWebSocketServer.d.ts | 14 - types/LiveQuery/QueryTools.d.ts | 12 - types/LiveQuery/RequestSchema.d.ts | 206 --- types/LiveQuery/SessionTokenCache.d.ts | 6 - types/LiveQuery/Subscription.d.ts | 11 - types/LiveQuery/equalObjects.d.ts | 6 - types/Options/Definitions.d.ts | 1197 ----------------- types/Options/docs.d.ts | 0 types/Options/index.d.ts | 1 - types/Options/parsers.d.ts | 7 - types/Page.d.ts | 27 - types/ParseMessageQueue.d.ts | 5 - types/ParseServer.d.ts | 50 - types/ParseServerRESTController.d.ts | 12 - types/PromiseRouter.d.ts | 17 - types/Push/PushQueue.d.ts | 9 - types/Push/PushWorker.d.ts | 17 - types/Push/utils.d.ts | 14 - types/RestQuery.d.ts | 39 - types/RestWrite.d.ts | 103 -- types/Routers/AggregateRouter.d.ts | 13 - types/Routers/AnalyticsRouter.d.ts | 7 - types/Routers/AudiencesRouter.d.ts | 11 - types/Routers/ClassesRouter.d.ts | 30 - types/Routers/CloudCodeRouter.d.ts | 12 - types/Routers/FeaturesRouter.d.ts | 7 - types/Routers/FilesRouter.d.ts | 10 - types/Routers/FunctionsRouter.d.ts | 13 - types/Routers/GlobalConfigRouter.d.ts | 10 - types/Routers/GraphQLRouter.d.ts | 14 - types/Routers/HooksRouter.d.ts | 16 - types/Routers/IAPValidationRouter.d.ts | 10 - types/Routers/InstallationsRouter.d.ts | 10 - types/Routers/LogsRouter.d.ts | 10 - types/Routers/PagesRouter.d.ts | 176 --- types/Routers/PublicAPIRouter.d.ts | 28 - types/Routers/PurgeRouter.d.ts | 9 - types/Routers/PushRouter.d.ts | 15 - types/Routers/RolesRouter.d.ts | 9 - types/Routers/SchemasRouter.d.ts | 7 - types/Routers/SecurityRouter.d.ts | 9 - types/Routers/SessionsRouter.d.ts | 11 - types/Routers/UsersRouter.d.ts | 31 - types/Security/Check.d.ts | 55 - types/Security/CheckGroup.d.ts | 26 - .../CheckGroups/CheckGroupDatabase.d.ts | 15 - .../CheckGroups/CheckGroupServerConfig.d.ts | 15 - types/Security/CheckGroups/CheckGroups.d.ts | 3 - types/Security/CheckRunner.d.ts | 80 -- types/StatusHandler.d.ts | 17 - types/TestUtils.d.ts | 6 - types/Utils.d.ts | 91 -- types/batch.d.ts | 2 - types/cache.d.ts | 5 - .../definitions/parse-live-query-server.d.ts | 60 - types/cli/definitions/parse-server.d.ts | 403 ------ types/cli/parse-live-query-server.d.ts | 1 - types/cli/parse-server.d.ts | 1 - types/cli/utils/commander.d.ts | 4 - types/cli/utils/runner.d.ts | 8 - types/cloud-code/HTTPResponse.d.ts | 18 - types/cloud-code/Parse.Cloud.d.ts | 65 - types/cloud-code/httpRequest.d.ts | 50 - types/cryptoUtils.d.ts | 6 - types/defaults.d.ts | 12 - types/deprecated.d.ts | 2 - types/index.d.ts | 22 - types/logger.d.ts | 7 - types/middlewares.d.ts | 15 - types/password.d.ts | 2 - types/request.d.ts | 44 - types/requiredParameter.d.ts | 3 - types/rest.d.ts | 5 - types/triggers.d.ts | 72 - types/vendor/mongodbUrl.d.ts | 25 - 188 files changed, 3 insertions(+), 6178 deletions(-) delete mode 100644 types/AccountLockout.d.ts delete mode 100644 types/Adapters/AdapterLoader.d.ts delete mode 100644 types/Adapters/Analytics/AnalyticsAdapter.d.ts delete mode 100644 types/Adapters/Auth/AuthAdapter.d.ts delete mode 100644 types/Adapters/Auth/OAuth1Client.d.ts delete mode 100644 types/Adapters/Auth/apple.d.ts delete mode 100644 types/Adapters/Auth/facebook.d.ts delete mode 100644 types/Adapters/Auth/gcenter.d.ts delete mode 100644 types/Adapters/Auth/github.d.ts delete mode 100644 types/Adapters/Auth/google.d.ts delete mode 100644 types/Adapters/Auth/gpgames.d.ts delete mode 100644 types/Adapters/Auth/httpsRequest.d.ts delete mode 100644 types/Adapters/Auth/index.d.ts delete mode 100644 types/Adapters/Auth/instagram.d.ts delete mode 100644 types/Adapters/Auth/janraincapture.d.ts delete mode 100644 types/Adapters/Auth/janrainengage.d.ts delete mode 100644 types/Adapters/Auth/keycloak.d.ts delete mode 100644 types/Adapters/Auth/ldap.d.ts delete mode 100644 types/Adapters/Auth/line.d.ts delete mode 100644 types/Adapters/Auth/linkedin.d.ts delete mode 100644 types/Adapters/Auth/meetup.d.ts delete mode 100644 types/Adapters/Auth/microsoft.d.ts delete mode 100644 types/Adapters/Auth/oauth2.d.ts delete mode 100644 types/Adapters/Auth/phantauth.d.ts delete mode 100644 types/Adapters/Auth/qq.d.ts delete mode 100644 types/Adapters/Auth/spotify.d.ts delete mode 100644 types/Adapters/Auth/twitter.d.ts delete mode 100644 types/Adapters/Auth/vkontakte.d.ts delete mode 100644 types/Adapters/Auth/wechat.d.ts delete mode 100644 types/Adapters/Auth/weibo.d.ts delete mode 100644 types/Adapters/Cache/CacheAdapter.d.ts delete mode 100644 types/Adapters/Cache/InMemoryCache.d.ts delete mode 100644 types/Adapters/Cache/InMemoryCacheAdapter.d.ts delete mode 100644 types/Adapters/Cache/LRUCache.d.ts delete mode 100644 types/Adapters/Cache/NullCacheAdapter.d.ts delete mode 100644 types/Adapters/Cache/RedisCacheAdapter.d.ts delete mode 100644 types/Adapters/Cache/SchemaCache.d.ts delete mode 100644 types/Adapters/Email/MailAdapter.d.ts delete mode 100644 types/Adapters/Files/FilesAdapter.d.ts delete mode 100644 types/Adapters/Files/GridFSBucketAdapter.d.ts delete mode 100644 types/Adapters/Files/GridStoreAdapter.d.ts delete mode 100644 types/Adapters/Logger/LoggerAdapter.d.ts delete mode 100644 types/Adapters/Logger/WinstonLogger.d.ts delete mode 100644 types/Adapters/Logger/WinstonLoggerAdapter.d.ts delete mode 100644 types/Adapters/MessageQueue/EventEmitterMQ.d.ts delete mode 100644 types/Adapters/PubSub/EventEmitterPubSub.d.ts delete mode 100644 types/Adapters/PubSub/PubSubAdapter.d.ts delete mode 100644 types/Adapters/PubSub/RedisPubSub.d.ts delete mode 100644 types/Adapters/Push/PushAdapter.d.ts delete mode 100644 types/Adapters/Storage/Mongo/MongoCollection.d.ts delete mode 100644 types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts delete mode 100644 types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts delete mode 100644 types/Adapters/Storage/Mongo/MongoTransform.d.ts delete mode 100644 types/Adapters/Storage/Postgres/PostgresClient.d.ts delete mode 100644 types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts delete mode 100644 types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts delete mode 100644 types/Adapters/Storage/Postgres/sql/index.d.ts delete mode 100644 types/Adapters/Storage/StorageAdapter.d.ts delete mode 100644 types/Adapters/WebSocketServer/WSAdapter.d.ts delete mode 100644 types/Adapters/WebSocketServer/WSSAdapter.d.ts delete mode 100644 types/Auth.d.ts delete mode 100644 types/ClientSDK.d.ts delete mode 100644 types/Config.d.ts delete mode 100644 types/Controllers/AdaptableController.d.ts delete mode 100644 types/Controllers/AnalyticsController.d.ts delete mode 100644 types/Controllers/CacheController.d.ts delete mode 100644 types/Controllers/DatabaseController.d.ts delete mode 100644 types/Controllers/FilesController.d.ts delete mode 100644 types/Controllers/HooksController.d.ts delete mode 100644 types/Controllers/LiveQueryController.d.ts delete mode 100644 types/Controllers/LoggerController.d.ts delete mode 100644 types/Controllers/ParseGraphQLController.d.ts delete mode 100644 types/Controllers/PushController.d.ts delete mode 100644 types/Controllers/SchemaController.d.ts delete mode 100644 types/Controllers/UserController.d.ts delete mode 100644 types/Controllers/index.d.ts delete mode 100644 types/Controllers/types.d.ts delete mode 100644 types/Deprecator/Deprecations.d.ts delete mode 100644 types/Deprecator/Deprecator.d.ts delete mode 100644 types/GraphQL/ParseGraphQLSchema.d.ts delete mode 100644 types/GraphQL/ParseGraphQLServer.d.ts delete mode 100644 types/GraphQL/helpers/objectsMutations.d.ts delete mode 100644 types/GraphQL/helpers/objectsQueries.d.ts delete mode 100644 types/GraphQL/loaders/defaultGraphQLMutations.d.ts delete mode 100644 types/GraphQL/loaders/defaultGraphQLQueries.d.ts delete mode 100644 types/GraphQL/loaders/defaultGraphQLTypes.d.ts delete mode 100644 types/GraphQL/loaders/defaultRelaySchema.d.ts delete mode 100644 types/GraphQL/loaders/filesMutations.d.ts delete mode 100644 types/GraphQL/loaders/functionsMutations.d.ts delete mode 100644 types/GraphQL/loaders/parseClassMutations.d.ts delete mode 100644 types/GraphQL/loaders/parseClassQueries.d.ts delete mode 100644 types/GraphQL/loaders/parseClassTypes.d.ts delete mode 100644 types/GraphQL/loaders/schemaDirectives.d.ts delete mode 100644 types/GraphQL/loaders/schemaMutations.d.ts delete mode 100644 types/GraphQL/loaders/schemaQueries.d.ts delete mode 100644 types/GraphQL/loaders/schemaTypes.d.ts delete mode 100644 types/GraphQL/loaders/usersMutations.d.ts delete mode 100644 types/GraphQL/loaders/usersQueries.d.ts delete mode 100644 types/GraphQL/parseGraphQLUtils.d.ts delete mode 100644 types/GraphQL/transformers/className.d.ts delete mode 100644 types/GraphQL/transformers/constraintType.d.ts delete mode 100644 types/GraphQL/transformers/inputType.d.ts delete mode 100644 types/GraphQL/transformers/mutation.d.ts delete mode 100644 types/GraphQL/transformers/outputType.d.ts delete mode 100644 types/GraphQL/transformers/query.d.ts delete mode 100644 types/GraphQL/transformers/schemaFields.d.ts delete mode 100644 types/KeyPromiseQueue.d.ts delete mode 100644 types/LiveQuery/Client.d.ts delete mode 100644 types/LiveQuery/Id.d.ts delete mode 100644 types/LiveQuery/ParseCloudCodePublisher.d.ts delete mode 100644 types/LiveQuery/ParseLiveQueryServer.d.ts delete mode 100644 types/LiveQuery/ParsePubSub.d.ts delete mode 100644 types/LiveQuery/ParseWebSocketServer.d.ts delete mode 100644 types/LiveQuery/QueryTools.d.ts delete mode 100644 types/LiveQuery/RequestSchema.d.ts delete mode 100644 types/LiveQuery/SessionTokenCache.d.ts delete mode 100644 types/LiveQuery/Subscription.d.ts delete mode 100644 types/LiveQuery/equalObjects.d.ts delete mode 100644 types/Options/Definitions.d.ts delete mode 100644 types/Options/docs.d.ts delete mode 100644 types/Options/index.d.ts delete mode 100644 types/Options/parsers.d.ts delete mode 100644 types/Page.d.ts delete mode 100644 types/ParseMessageQueue.d.ts delete mode 100644 types/ParseServer.d.ts delete mode 100644 types/ParseServerRESTController.d.ts delete mode 100644 types/PromiseRouter.d.ts delete mode 100644 types/Push/PushQueue.d.ts delete mode 100644 types/Push/PushWorker.d.ts delete mode 100644 types/Push/utils.d.ts delete mode 100644 types/RestQuery.d.ts delete mode 100644 types/RestWrite.d.ts delete mode 100644 types/Routers/AggregateRouter.d.ts delete mode 100644 types/Routers/AnalyticsRouter.d.ts delete mode 100644 types/Routers/AudiencesRouter.d.ts delete mode 100644 types/Routers/ClassesRouter.d.ts delete mode 100644 types/Routers/CloudCodeRouter.d.ts delete mode 100644 types/Routers/FeaturesRouter.d.ts delete mode 100644 types/Routers/FilesRouter.d.ts delete mode 100644 types/Routers/FunctionsRouter.d.ts delete mode 100644 types/Routers/GlobalConfigRouter.d.ts delete mode 100644 types/Routers/GraphQLRouter.d.ts delete mode 100644 types/Routers/HooksRouter.d.ts delete mode 100644 types/Routers/IAPValidationRouter.d.ts delete mode 100644 types/Routers/InstallationsRouter.d.ts delete mode 100644 types/Routers/LogsRouter.d.ts delete mode 100644 types/Routers/PagesRouter.d.ts delete mode 100644 types/Routers/PublicAPIRouter.d.ts delete mode 100644 types/Routers/PurgeRouter.d.ts delete mode 100644 types/Routers/PushRouter.d.ts delete mode 100644 types/Routers/RolesRouter.d.ts delete mode 100644 types/Routers/SchemasRouter.d.ts delete mode 100644 types/Routers/SecurityRouter.d.ts delete mode 100644 types/Routers/SessionsRouter.d.ts delete mode 100644 types/Routers/UsersRouter.d.ts delete mode 100644 types/Security/Check.d.ts delete mode 100644 types/Security/CheckGroup.d.ts delete mode 100644 types/Security/CheckGroups/CheckGroupDatabase.d.ts delete mode 100644 types/Security/CheckGroups/CheckGroupServerConfig.d.ts delete mode 100644 types/Security/CheckGroups/CheckGroups.d.ts delete mode 100644 types/Security/CheckRunner.d.ts delete mode 100644 types/StatusHandler.d.ts delete mode 100644 types/TestUtils.d.ts delete mode 100644 types/Utils.d.ts delete mode 100644 types/batch.d.ts delete mode 100644 types/cache.d.ts delete mode 100644 types/cli/definitions/parse-live-query-server.d.ts delete mode 100644 types/cli/definitions/parse-server.d.ts delete mode 100644 types/cli/parse-live-query-server.d.ts delete mode 100644 types/cli/parse-server.d.ts delete mode 100644 types/cli/utils/commander.d.ts delete mode 100644 types/cli/utils/runner.d.ts delete mode 100644 types/cloud-code/HTTPResponse.d.ts delete mode 100644 types/cloud-code/Parse.Cloud.d.ts delete mode 100644 types/cloud-code/httpRequest.d.ts delete mode 100644 types/cryptoUtils.d.ts delete mode 100644 types/defaults.d.ts delete mode 100644 types/deprecated.d.ts delete mode 100644 types/index.d.ts delete mode 100644 types/logger.d.ts delete mode 100644 types/middlewares.d.ts delete mode 100644 types/password.d.ts delete mode 100644 types/request.d.ts delete mode 100644 types/requiredParameter.d.ts delete mode 100644 types/rest.d.ts delete mode 100644 types/triggers.d.ts delete mode 100644 types/vendor/mongodbUrl.d.ts diff --git a/.gitignore b/.gitignore index e4e19156c2..e184de3be6 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,6 @@ lib/ # Redis Dump dump.rdb + +# Ignore built TypeScript files +types/**/* diff --git a/types/AccountLockout.d.ts b/types/AccountLockout.d.ts deleted file mode 100644 index 0dfd65517b..0000000000 --- a/types/AccountLockout.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class AccountLockout { - constructor(user: any, config: any); - _user: any; - _config: any; - /** - * set _failed_login_count to value - */ - _setFailedLoginCount(value: any): any; - /** - * check if the _failed_login_count field has been set - */ - _isFailedLoginCountSet(): any; - /** - * if _failed_login_count is NOT set then set it to 0 - * else do nothing - */ - _initFailedLoginCount(): any; - /** - * increment _failed_login_count by 1 - */ - _incrementFailedLoginCount(): any; - /** - * if the failed login count is greater than the threshold - * then sets lockout expiration to 'currenttime + accountPolicy.duration', i.e., account is locked out for the next 'accountPolicy.duration' minutes - * else do nothing - */ - _setLockoutExpiration(): any; - /** - * if _account_lockout_expires_at > current_time and _failed_login_count > threshold - * reject with account locked error - * else - * resolve - */ - _notLocked(): any; - /** - * set and/or increment _failed_login_count - * if _failed_login_count > threshold - * set the _account_lockout_expires_at to current_time + accountPolicy.duration - * else - * do nothing - */ - _handleFailedLoginAttempt(): any; - /** - * handle login attempt if the Account Lockout Policy is enabled - */ - handleLoginAttempt(loginSuccessful: any): any; - /** - * Removes the account lockout. - */ - unlockAccount(): any; -} -declare var _default: typeof AccountLockout; diff --git a/types/Adapters/AdapterLoader.d.ts b/types/Adapters/AdapterLoader.d.ts deleted file mode 100644 index b7e0ff447b..0000000000 --- a/types/Adapters/AdapterLoader.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module AdapterLoader - */ -/** - * @static - * Attempt to load an adapter or fallback to the default. - * @param {Adapter} adapter an adapter - * @param {Adapter} defaultAdapter the default adapter to load - * @param {any} options options to pass to the contstructor - * @returns {Object} the loaded adapter - */ -export function loadAdapter(adapter: any, defaultAdapter: any, options: any): any; -/** - * @module AdapterLoader - */ -/** - * @static - * Attempt to load an adapter or fallback to the default. - * @param {Adapter} adapter an adapter - * @param {Adapter} defaultAdapter the default adapter to load - * @param {any} options options to pass to the contstructor - * @returns {Object} the loaded adapter - */ -declare function _default(adapter: any, defaultAdapter: any, options: any): any; diff --git a/types/Adapters/Analytics/AnalyticsAdapter.d.ts b/types/Adapters/Analytics/AnalyticsAdapter.d.ts deleted file mode 100644 index d18643f1ae..0000000000 --- a/types/Adapters/Analytics/AnalyticsAdapter.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module Adapters - */ -/** - * @interface AnalyticsAdapter - */ -export class AnalyticsAdapter { - /** - @param {any} parameters: the analytics request body, analytics info will be in the dimensions property - @param {Request} req: the original http request - */ - appOpened(parameters: any, req: Request): Promise<{}>; - /** - @param {String} eventName: the name of the custom eventName - @param {any} parameters: the analytics request body, analytics info will be in the dimensions property - @param {Request} req: the original http request - */ - trackEvent(eventName: string, parameters: any, req: Request): Promise<{}>; -} -declare var _default: typeof AnalyticsAdapter; diff --git a/types/Adapters/Auth/AuthAdapter.d.ts b/types/Adapters/Auth/AuthAdapter.d.ts deleted file mode 100644 index be24e8b4e3..0000000000 --- a/types/Adapters/Auth/AuthAdapter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class AuthAdapter { - validateAppId(appIds: any, authData: any, options: any): Promise<{}>; - validateAuthData(authData: any, options: any): Promise<{}>; -} -declare var _default: typeof AuthAdapter; diff --git a/types/Adapters/Auth/OAuth1Client.d.ts b/types/Adapters/Auth/OAuth1Client.d.ts deleted file mode 100644 index 3570d94095..0000000000 --- a/types/Adapters/Auth/OAuth1Client.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export = OAuth; -declare class OAuth { - static encode(str: any): string; - static nonce(): string; - static buildParameterString(obj: any): string; - static buildSignatureString(method: any, url: any, parameters: any): string; - static signature(text: any, key: any): string; - static signRequest(request: any, oauth_parameters: any, consumer_secret: any, auth_token_secret: any): any; - constructor(options: any); - consumer_key: any; - consumer_secret: any; - auth_token: any; - auth_token_secret: any; - host: any; - oauth_params: any; - signatureMethod: string; - version: string; - send(method: any, path: any, params: any, body: any): Promise; - buildRequest(method: any, path: any, params: any, body: any): { - host: any; - path: any; - method: any; - }; - get(path: any, params: any): Promise; - post(path: any, params: any, body: any): Promise; -} diff --git a/types/Adapters/Auth/apple.d.ts b/types/Adapters/Auth/apple.d.ts deleted file mode 100644 index d76a44a89d..0000000000 --- a/types/Adapters/Auth/apple.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options?: {}): Promise; diff --git a/types/Adapters/Auth/facebook.d.ts b/types/Adapters/Auth/facebook.d.ts deleted file mode 100644 index b6daba6dde..0000000000 --- a/types/Adapters/Auth/facebook.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(appIds: any, authData: any, options: any): Promise; -export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/gcenter.d.ts b/types/Adapters/Auth/gcenter.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/gcenter.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/github.d.ts b/types/Adapters/Auth/github.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/github.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/google.d.ts b/types/Adapters/Auth/google.d.ts deleted file mode 100644 index d76a44a89d..0000000000 --- a/types/Adapters/Auth/google.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options?: {}): Promise; diff --git a/types/Adapters/Auth/gpgames.d.ts b/types/Adapters/Auth/gpgames.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/gpgames.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/httpsRequest.d.ts b/types/Adapters/Auth/httpsRequest.d.ts deleted file mode 100644 index 99babd3b8f..0000000000 --- a/types/Adapters/Auth/httpsRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function get(options: any, noJSON?: boolean): Promise; -export function request(options: any, postData: any): Promise; diff --git a/types/Adapters/Auth/index.d.ts b/types/Adapters/Auth/index.d.ts deleted file mode 100644 index dc650b9092..0000000000 --- a/types/Adapters/Auth/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -declare function _exports(authOptions?: {}, enableAnonymousUsers?: boolean): Readonly<{ - getValidatorForProvider: (provider: any) => (authData: any) => any; - setEnableAnonymousUsers: (enable: any) => void; -}>; -declare namespace _exports { - export { loadAuthAdapter }; -} -export = _exports; -declare function loadAuthAdapter(provider: any, authOptions: any): { - adapter: any; - appIds: any; - providerOptions: any; -}; diff --git a/types/Adapters/Auth/instagram.d.ts b/types/Adapters/Auth/instagram.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/instagram.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/janraincapture.d.ts b/types/Adapters/Auth/janraincapture.d.ts deleted file mode 100644 index d4e3d662e2..0000000000 --- a/types/Adapters/Auth/janraincapture.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/janrainengage.d.ts b/types/Adapters/Auth/janrainengage.d.ts deleted file mode 100644 index d4e3d662e2..0000000000 --- a/types/Adapters/Auth/janrainengage.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/keycloak.d.ts b/types/Adapters/Auth/keycloak.d.ts deleted file mode 100644 index 833ddd69f1..0000000000 --- a/types/Adapters/Auth/keycloak.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options?: {}): Promise; diff --git a/types/Adapters/Auth/ldap.d.ts b/types/Adapters/Auth/ldap.d.ts deleted file mode 100644 index 7feb844d85..0000000000 --- a/types/Adapters/Auth/ldap.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/line.d.ts b/types/Adapters/Auth/line.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/line.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/linkedin.d.ts b/types/Adapters/Auth/linkedin.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/linkedin.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/meetup.d.ts b/types/Adapters/Auth/meetup.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/meetup.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/microsoft.d.ts b/types/Adapters/Auth/microsoft.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/microsoft.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/oauth2.d.ts b/types/Adapters/Auth/oauth2.d.ts deleted file mode 100644 index 262070d6a4..0000000000 --- a/types/Adapters/Auth/oauth2.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(appIds: any, authData: any, options: any): Promise; -export function validateAuthData(authData: any, options: any): Promise; diff --git a/types/Adapters/Auth/phantauth.d.ts b/types/Adapters/Auth/phantauth.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/phantauth.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/qq.d.ts b/types/Adapters/Auth/qq.d.ts deleted file mode 100644 index 730a31144e..0000000000 --- a/types/Adapters/Auth/qq.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; -export function parseResponseData(data: any): any; diff --git a/types/Adapters/Auth/spotify.d.ts b/types/Adapters/Auth/spotify.d.ts deleted file mode 100644 index 97bb118c4c..0000000000 --- a/types/Adapters/Auth/spotify.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(appIds: any, authData: any): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/twitter.d.ts b/types/Adapters/Auth/twitter.d.ts deleted file mode 100644 index bafb8432e7..0000000000 --- a/types/Adapters/Auth/twitter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, options: any): Promise; -export function handleMultipleConfigurations(authData: any, options: any): any; diff --git a/types/Adapters/Auth/vkontakte.d.ts b/types/Adapters/Auth/vkontakte.d.ts deleted file mode 100644 index 9c9f9f46f7..0000000000 --- a/types/Adapters/Auth/vkontakte.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any, params: any): Promise; diff --git a/types/Adapters/Auth/wechat.d.ts b/types/Adapters/Auth/wechat.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/wechat.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Auth/weibo.d.ts b/types/Adapters/Auth/weibo.d.ts deleted file mode 100644 index 20975b334e..0000000000 --- a/types/Adapters/Auth/weibo.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function validateAppId(): Promise; -export function validateAuthData(authData: any): Promise; diff --git a/types/Adapters/Cache/CacheAdapter.d.ts b/types/Adapters/Cache/CacheAdapter.d.ts deleted file mode 100644 index 4821aed196..0000000000 --- a/types/Adapters/Cache/CacheAdapter.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export var __esModule: boolean; -/** - * @module Adapters - */ -/** - * @interface CacheAdapter - */ -export class CacheAdapter { - /** - * Get a value in the cache - * @param {String} key Cache key to get - * @return {Promise} that will eventually resolve to the value in the cache. - */ - get(key: string): Promise; - /** - * Set a value in the cache - * @param {String} key Cache key to set - * @param {String} value Value to set the key - * @param {String} ttl Optional TTL - */ - put(key: string, value: string, ttl: string): void; - /** - * Remove a value from the cache. - * @param {String} key Cache key to remove - */ - del(key: string): void; - /** - * Empty a cache - */ - clear(): void; -} diff --git a/types/Adapters/Cache/InMemoryCache.d.ts b/types/Adapters/Cache/InMemoryCache.d.ts deleted file mode 100644 index 6d94f7bb69..0000000000 --- a/types/Adapters/Cache/InMemoryCache.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class InMemoryCache { - constructor({ ttl }: { - ttl?: number; - }); - ttl: number; - cache: any; - get(key: any): any; - put(key: any, value: any, ttl?: number): void; - del(key: any): void; - clear(): void; -} -declare var _default: typeof InMemoryCache; diff --git a/types/Adapters/Cache/InMemoryCacheAdapter.d.ts b/types/Adapters/Cache/InMemoryCacheAdapter.d.ts deleted file mode 100644 index 50c9a92601..0000000000 --- a/types/Adapters/Cache/InMemoryCacheAdapter.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class InMemoryCacheAdapter { - constructor(ctx: any); - cache: _LRUCache.LRUCache; - get(key: any): Promise; - put(key: any, value: any, ttl: any): Promise; - del(key: any): Promise; - clear(): Promise; -} -declare var _default: typeof InMemoryCacheAdapter; -import _LRUCache = require("./LRUCache"); diff --git a/types/Adapters/Cache/LRUCache.d.ts b/types/Adapters/Cache/LRUCache.d.ts deleted file mode 100644 index 1a91e8b1cb..0000000000 --- a/types/Adapters/Cache/LRUCache.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class LRUCache { - constructor({ ttl, maxSize }: { - ttl?: any; - maxSize?: any; - }); - cache: any; - get(key: any): any; - put(key: any, value: any, ttl?: any): void; - del(key: any): void; - clear(): void; -} -declare var _default: typeof LRUCache; diff --git a/types/Adapters/Cache/NullCacheAdapter.d.ts b/types/Adapters/Cache/NullCacheAdapter.d.ts deleted file mode 100644 index ddab42e66d..0000000000 --- a/types/Adapters/Cache/NullCacheAdapter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class NullCacheAdapter { - get(): Promise; - put(): Promise; - del(): Promise; - clear(): Promise; -} -declare var _default: typeof NullCacheAdapter; diff --git a/types/Adapters/Cache/RedisCacheAdapter.d.ts b/types/Adapters/Cache/RedisCacheAdapter.d.ts deleted file mode 100644 index 5f95673f62..0000000000 --- a/types/Adapters/Cache/RedisCacheAdapter.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class RedisCacheAdapter { - constructor(redisCtx: any, ttl?: number); - ttl: number; - client: any; - queue: _KeyPromiseQueue.KeyPromiseQueue; - handleShutdown(): Promise; - get(key: any): any; - put(key: any, value: any, ttl?: number): any; - del(key: any): any; - clear(): any; - getAllKeys(): Promise; -} -declare var _default: typeof RedisCacheAdapter; -import _KeyPromiseQueue = require("../../KeyPromiseQueue"); diff --git a/types/Adapters/Cache/SchemaCache.d.ts b/types/Adapters/Cache/SchemaCache.d.ts deleted file mode 100644 index 2c503cfe19..0000000000 --- a/types/Adapters/Cache/SchemaCache.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare namespace _default { - function all(): any[]; - function all(): any[]; - function get(className: any): any; - function get(className: any): any; - function put(allSchema: any): void; - function put(allSchema: any): void; - function del(className: any): void; - function del(className: any): void; - function clear(): void; - function clear(): void; -} diff --git a/types/Adapters/Email/MailAdapter.d.ts b/types/Adapters/Email/MailAdapter.d.ts deleted file mode 100644 index 524f32232f..0000000000 --- a/types/Adapters/Email/MailAdapter.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module Adapters - */ -/** - * @interface MailAdapter - * Mail Adapter prototype - * A MailAdapter should implement at least sendMail() - */ -export class MailAdapter { - /** - * A method for sending mail - * @param options would have the parameters - * - to: the recipient - * - text: the raw text of the message - * - subject: the subject of the email - */ - sendMail(options: any): void; -} -declare var _default: typeof MailAdapter; diff --git a/types/Adapters/Files/FilesAdapter.d.ts b/types/Adapters/Files/FilesAdapter.d.ts deleted file mode 100644 index b404dd05ac..0000000000 --- a/types/Adapters/Files/FilesAdapter.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export var __esModule: boolean; -export default _default; -export function validateFilename(filename: any): any; -/** - * @module Adapters - */ -/** - * @interface FilesAdapter - */ -export class FilesAdapter { - /** Responsible for storing the file in order to be retrieved later by its filename - * - * @param {string} filename - the filename to save - * @param {*} data - the buffer of data from the file - * @param {string} contentType - the supposed contentType - * @discussion the contentType can be undefined if the controller was not able to determine it - * @param {object} options - (Optional) options to be passed to file adapter (S3 File Adapter Only) - * - tags: object containing key value pairs that will be stored with file - * - metadata: object containing key value pairs that will be sotred with file (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-object-metadata.html) - * @discussion options are not supported by all file adapters. Check the your adapter's documentation for compatibility - * - * @return {Promise} a promise that should fail if the storage didn't succeed - */ - createFile(filename: string, data: any, contentType: string, options: object): Promise; - /** Responsible for deleting the specified file - * - * @param {string} filename - the filename to delete - * - * @return {Promise} a promise that should fail if the deletion didn't succeed - */ - deleteFile(filename: string): Promise; - /** Responsible for retrieving the data of the specified file - * - * @param {string} filename - the name of file to retrieve - * - * @return {Promise} a promise that should pass with the file data or fail on error - */ - getFileData(filename: string): Promise; - /** Returns an absolute URL where the file can be accessed - * - * @param {Config} config - server configuration - * @param {string} filename - * - * @return {string} Absolute URL - */ - getFileLocation(config: any, filename: string): string; -} -declare var _default: typeof FilesAdapter; diff --git a/types/Adapters/Files/GridFSBucketAdapter.d.ts b/types/Adapters/Files/GridFSBucketAdapter.d.ts deleted file mode 100644 index dbc6dbae86..0000000000 --- a/types/Adapters/Files/GridFSBucketAdapter.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class GridFSBucketAdapter extends _FilesAdapter.FilesAdapter { - constructor(mongoDatabaseURI?: any, mongoOptions?: {}, encryptionKey?: any); - _databaseURI: any; - _algorithm: string; - _encryptionKey: string; - _mongoOptions: { - useNewUrlParser: boolean; - useUnifiedTopology: boolean; - }; - _connect(): any; - _connectionPromise: any; - _client: any; - _getBucket(): any; - rotateEncryptionKey(options?: {}): Promise; - getMetadata(filename: any): Promise<{ - metadata?: undefined; - } | { - metadata: any; - }>; - handleFileStream(filename: any, req: any, res: any, contentType: any): Promise; - handleShutdown(): any; - validateFilename(filename: any): any; -} -declare var _default: typeof GridFSBucketAdapter; -import _FilesAdapter = require("./FilesAdapter"); diff --git a/types/Adapters/Files/GridStoreAdapter.d.ts b/types/Adapters/Files/GridStoreAdapter.d.ts deleted file mode 100644 index dd4ed98057..0000000000 --- a/types/Adapters/Files/GridStoreAdapter.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - GridStoreAdapter - Stores files in Mongo using GridStore - Requires the database adapter to be based on mongoclient - (GridStore is deprecated, Please use GridFSBucket instead) - - - */ -export class GridStoreAdapter extends _FilesAdapter.FilesAdapter { - constructor(mongoDatabaseURI?: any, mongoOptions?: {}); - _databaseURI: any; - _mongoOptions: { - useNewUrlParser: boolean; - useUnifiedTopology: boolean; - }; - _connect(): any; - _connectionPromise: any; - _client: any; - handleFileStream(filename: any, req: any, res: any, contentType: any): Promise; - handleShutdown(): any; - validateFilename(filename: any): any; -} -declare var _default: typeof GridStoreAdapter; -import _FilesAdapter = require("./FilesAdapter"); diff --git a/types/Adapters/Logger/LoggerAdapter.d.ts b/types/Adapters/Logger/LoggerAdapter.d.ts deleted file mode 100644 index c4469a772c..0000000000 --- a/types/Adapters/Logger/LoggerAdapter.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module Adapters - */ -/** - * @interface LoggerAdapter - * Logger Adapter - * Allows you to change the logger mechanism - * Default is WinstonLoggerAdapter.js - */ -export class LoggerAdapter { - constructor(options: any); - /** - * log - * @param {String} level - * @param {String} message - * @param {Object} metadata - */ - log(level: string, message: string): void; -} -declare var _default: typeof LoggerAdapter; diff --git a/types/Adapters/Logger/WinstonLogger.d.ts b/types/Adapters/Logger/WinstonLogger.d.ts deleted file mode 100644 index 7e0bc80b30..0000000000 --- a/types/Adapters/Logger/WinstonLogger.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export default _default; -export function configureLogger({ logsFolder, jsonLogs, logLevel, verbose, silent, maxLogFiles }?: { - logsFolder?: any; - jsonLogs?: any; - logLevel?: any; - verbose?: any; - silent?: any; - maxLogFiles: any; -}): void; -export function addTransport(transport: any): void; -export function removeTransport(transport: any): void; -export const logger: any; -declare var _default: any; diff --git a/types/Adapters/Logger/WinstonLoggerAdapter.d.ts b/types/Adapters/Logger/WinstonLoggerAdapter.d.ts deleted file mode 100644 index 8979e353e4..0000000000 --- a/types/Adapters/Logger/WinstonLoggerAdapter.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class WinstonLoggerAdapter extends _LoggerAdapter.LoggerAdapter { - addTransport(transport: any): void; - query(options: any, callback?: () => void): Promise; -} -declare var _default: typeof WinstonLoggerAdapter; -import _LoggerAdapter = require("./LoggerAdapter"); diff --git a/types/Adapters/MessageQueue/EventEmitterMQ.d.ts b/types/Adapters/MessageQueue/EventEmitterMQ.d.ts deleted file mode 100644 index 15c2c55abe..0000000000 --- a/types/Adapters/MessageQueue/EventEmitterMQ.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export var __esModule: boolean; -export namespace EventEmitterMQ { - export { createPublisher }; - export { createSubscriber }; -} -declare function createPublisher(): Publisher; -declare function createSubscriber(): Consumer; -declare class Publisher { - constructor(emitter: any); - emitter: any; - publish(channel: any, message: any): void; -} -declare const Consumer_base: any; -declare class Consumer extends Consumer_base { - [x: string]: any; - constructor(emitter: any); - emitter: any; - subscribe(channel: any): void; - unsubscribe(channel: any): void; -} -export {}; diff --git a/types/Adapters/PubSub/EventEmitterPubSub.d.ts b/types/Adapters/PubSub/EventEmitterPubSub.d.ts deleted file mode 100644 index f86ff21fad..0000000000 --- a/types/Adapters/PubSub/EventEmitterPubSub.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export var __esModule: boolean; -export namespace EventEmitterPubSub { - export { createPublisher }; - export { createSubscriber }; -} -declare function createPublisher(): Publisher; -declare function createSubscriber(): Subscriber; -declare class Publisher { - constructor(emitter: any); - emitter: any; - publish(channel: any, message: any): void; -} -declare const Subscriber_base: any; -declare class Subscriber extends Subscriber_base { - [x: string]: any; - constructor(emitter: any); - emitter: any; - subscriptions: Map; - subscribe(channel: any): void; - unsubscribe(channel: any): void; -} -export {}; diff --git a/types/Adapters/PubSub/PubSubAdapter.d.ts b/types/Adapters/PubSub/PubSubAdapter.d.ts deleted file mode 100644 index 53e81372a2..0000000000 --- a/types/Adapters/PubSub/PubSubAdapter.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module Adapters - */ -/** - * @interface PubSubAdapter - */ -export class PubSubAdapter { - /** - * @returns {PubSubAdapter.Publisher} - */ - static createPublisher(): any; - /** - * @returns {PubSubAdapter.Subscriber} - */ - static createSubscriber(): any; -} -declare var _default: typeof PubSubAdapter; diff --git a/types/Adapters/PubSub/RedisPubSub.d.ts b/types/Adapters/PubSub/RedisPubSub.d.ts deleted file mode 100644 index 1964a8a45a..0000000000 --- a/types/Adapters/PubSub/RedisPubSub.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export namespace RedisPubSub { - export { createPublisher }; - export { createSubscriber }; -} -declare function createPublisher({ redisURL, redisOptions }: { - redisURL: any; - redisOptions?: {}; -}): any; -declare function createSubscriber({ redisURL, redisOptions }: { - redisURL: any; - redisOptions?: {}; -}): any; -export {}; diff --git a/types/Adapters/Push/PushAdapter.d.ts b/types/Adapters/Push/PushAdapter.d.ts deleted file mode 100644 index 2d5fdb17aa..0000000000 --- a/types/Adapters/Push/PushAdapter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module Adapters - */ -/** - * @interface PushAdapter - */ -export class PushAdapter { - /** - * @param {any} body - * @param {Parse.Installation[]} installations - * @param {any} pushStatus - * @returns {Promise} - */ - send(body: any, installations: any[], pushStatus: any): Promise; - /** - * Get an array of valid push types. - * @returns {Array} An array of valid push types - */ - getValidPushTypes(): any[]; -} -declare var _default: typeof PushAdapter; diff --git a/types/Adapters/Storage/Mongo/MongoCollection.d.ts b/types/Adapters/Storage/Mongo/MongoCollection.d.ts deleted file mode 100644 index 2c927afea2..0000000000 --- a/types/Adapters/Storage/Mongo/MongoCollection.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -export var __esModule: boolean; -export default MongoCollection; -declare class MongoCollection { - /** - * Collation to support case insensitive queries - */ - static caseInsensitiveCollation(): { - locale: string; - strength: number; - }; - constructor(mongoCollection: any); - _mongoCollection: any; - find(query: any, { skip, limit, sort, keys, maxTimeMS, readPreference, hint, caseInsensitive, explain }?: { - skip: any; - limit: any; - sort: any; - keys: any; - maxTimeMS: any; - readPreference: any; - hint: any; - caseInsensitive: any; - explain: any; - }): any; - _rawFind(query: any, { skip, limit, sort, keys, maxTimeMS, readPreference, hint, caseInsensitive, explain }?: { - skip: any; - limit: any; - sort: any; - keys: any; - maxTimeMS: any; - readPreference: any; - hint: any; - caseInsensitive: any; - explain: any; - }): any; - count(query: any, { skip, limit, sort, maxTimeMS, readPreference, hint }?: { - skip: any; - limit: any; - sort: any; - maxTimeMS: any; - readPreference: any; - hint: any; - }): any; - distinct(field: any, query: any): any; - aggregate(pipeline: any, { maxTimeMS, readPreference, hint, explain }?: { - maxTimeMS: any; - readPreference: any; - hint: any; - explain: any; - }): any; - insertOne(object: any, session: any): any; - upsertOne(query: any, update: any, session: any): any; - updateOne(query: any, update: any): any; - updateMany(query: any, update: any, session: any): any; - deleteMany(query: any, session: any): any; - _ensureSparseUniqueIndexInBackground(indexRequest: any): Promise; - drop(): any; -} diff --git a/types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts b/types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts deleted file mode 100644 index 0a6ca57315..0000000000 --- a/types/Adapters/Storage/Mongo/MongoSchemaCollection.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare var _default: typeof MongoSchemaCollection; -declare class MongoSchemaCollection { - constructor(collection: any); - _collection: any; - _fetchAllSchemasFrom_SCHEMA(): any; - _fetchOneSchemaFrom_SCHEMA(name: any): any; - findAndDeleteSchema(name: any): any; - insertSchema(schema: any): any; - updateSchema(name: any, update: any): any; - upsertSchema(name: any, query: any, update: any): any; - addFieldIfNotExists(className: any, fieldName: any, fieldType: any): any; -} -declare namespace MongoSchemaCollection { - export { mongoSchemaToParseSchema as _TESTmongoSchemaToParseSchema }; - export { parseFieldTypeToMongoFieldType }; -} -declare function mongoSchemaToParseSchema(mongoSchema: any): { - className: any; - fields: {}; - classLevelPermissions: Readonly<{ - find: { - '*': boolean; - }; - count: { - '*': boolean; - }; - get: { - '*': boolean; - }; - create: { - '*': boolean; - }; - update: { - '*': boolean; - }; - delete: { - '*': boolean; - }; - addField: { - '*': boolean; - }; - protectedFields: { - '*': any[]; - }; - }>; - indexes: {}; -}; -declare function parseFieldTypeToMongoFieldType({ type, targetClass }: { - type: any; - targetClass: any; -}): string; diff --git a/types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts b/types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts deleted file mode 100644 index f0f5c01108..0000000000 --- a/types/Adapters/Storage/Mongo/MongoStorageAdapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class MongoStorageAdapter { - constructor({ uri, collectionPrefix, mongoOptions }: { - uri?: any; - collectionPrefix?: string; - mongoOptions?: {}; - }); - _uri: any; - _collectionPrefix: string; - _mongoOptions: {}; - _onchange: () => void; - _maxTimeMS: any; - canSortOnJoinTables: boolean; - enableSchemaHooks: boolean; - watch(callback: any): void; - connect(): any; - connectionPromise: any; - client: any; - database: any; - handleError(error: any): void; - handleShutdown(): any; - _adaptiveCollection(name: any): any; - _schemaCollection(): any; - _stream: any; - classExists(name: any): any; - setClassLevelPermissions(className: any, CLPs: any): any; - setIndexesWithSchemaFormat(className: any, submittedIndexes: any, existingIndexes: {}, fields: any): Promise; - setIndexesFromMongo(className: any): any; - createClass(className: any, schema: any): Promise; - addFieldIfNotExists(className: any, fieldName: any, type: any): any; - deleteClass(className: any): any; - deleteAllClasses(fast: any): any; - deleteFields(className: any, schema: any, fieldNames: any): any; - getAllClasses(): any; - getClass(className: any): any; - createObject(className: any, schema: any, object: any, transactionalSession: any): any; - deleteObjectsByQuery(className: any, schema: any, query: any, transactionalSession: any): any; - updateObjectsByQuery(className: any, schema: any, query: any, update: any, transactionalSession: any): any; - findOneAndUpdate(className: any, schema: any, query: any, update: any, transactionalSession: any): any; - upsertOneObject(className: any, schema: any, query: any, update: any, transactionalSession: any): any; - find(className: any, schema: any, query: any, { skip, limit, sort, keys, readPreference, hint, caseInsensitive, explain }: { - skip: any; - limit: any; - sort: any; - keys: any; - readPreference: any; - hint: any; - caseInsensitive: any; - explain: any; - }): Promise; - ensureIndex(className: any, schema: any, fieldNames: any, indexName: any, caseInsensitive?: boolean, options?: {}): any; - ensureUniqueness(className: any, schema: any, fieldNames: any): any; - _rawFind(className: any, query: any): any; - count(className: any, schema: any, query: any, readPreference: any, hint: any): any; - distinct(className: any, schema: any, query: any, fieldName: any): any; - aggregate(className: any, schema: any, pipeline: any, readPreference: any, hint: any, explain: any): any; - _parseAggregateArgs(schema: any, pipeline: any): any; - _parseAggregateProjectArgs(schema: any, pipeline: any): { - _id: any; - _created_at: any; - _updated_at: any; - }; - _parseAggregateGroupArgs(schema: any, pipeline: any): any; - _convertToDate(value: any): {}; - _parseReadPreference(readPreference: any): any; - performInitialization(): Promise; - createIndex(className: any, index: any): any; - createIndexes(className: any, indexes: any): any; - createIndexesIfNeeded(className: any, fieldName: any, type: any): any; - createTextIndexesIfNeeded(className: any, query: any, schema: any): Promise; - getIndexes(className: any): any; - dropIndex(className: any, index: any): any; - dropAllIndexes(className: any): any; - updateSchemaWithIndexes(): any; - createTransactionalSession(): Promise; - commitTransactionalSession(transactionalSection: any): any; - abortTransactionalSession(transactionalSection: any): any; -} -declare var _default: typeof MongoStorageAdapter; diff --git a/types/Adapters/Storage/Mongo/MongoTransform.d.ts b/types/Adapters/Storage/Mongo/MongoTransform.d.ts deleted file mode 100644 index 11e2e87f44..0000000000 --- a/types/Adapters/Storage/Mongo/MongoTransform.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export function transformKey(className: any, fieldName: any, schema: any): any; -export function parseObjectToMongoObjectForCreate(className: any, restCreate: any, schema: any): { - _created_at: Date; - _updated_at: Date; -}; -export function transformUpdate(className: any, restUpdate: any, parseFormatSchema: any): { - $set: { - _rperm: any; - _wperm: any; - _acl: any; - }; -}; -export function transformWhere(className: any, restWhere: any, schema: any, count?: boolean): {}; -export function mongoObjectToParseObject(className: any, mongoObject: any, schema: any): any; -export function relativeTimeToDate(text: any, now?: Date): { - status: string; - info: string; - result?: undefined; -} | { - status: string; - info: string; - result: Date; -}; -export function transformConstraint(constraint: any, field: any, count?: boolean): typeof CannotTransform | { - $elemMatch: { - $nin: any[]; - }; - $geoWithin: { - $centerSphere: any[]; - }; - $maxDistance: any; -}; -export function transformPointerString(schema: any, field: any, pointerString: any): { - __type: string; - className: any; - objectId: any; -}; -declare function CannotTransform(): void; -export {}; diff --git a/types/Adapters/Storage/Postgres/PostgresClient.d.ts b/types/Adapters/Storage/Postgres/PostgresClient.d.ts deleted file mode 100644 index 0ea0f7039d..0000000000 --- a/types/Adapters/Storage/Postgres/PostgresClient.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export var __esModule: boolean; -export function createClient(uri: any, databaseOptions: any): { - client: import("pg-promise").IDatabase<{}, import("pg-promise/typescript/pg-subset").IClient>; - pgp: import("pg-promise").IMain<{}, import("pg-promise/typescript/pg-subset").IClient>; -}; diff --git a/types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts b/types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts deleted file mode 100644 index de1ef81029..0000000000 --- a/types/Adapters/Storage/Postgres/PostgresConfigParser.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export function parseQueryParams(queryString: any): any; -export function getDatabaseOptionsFromURI(uri: any): { - host: string; - port: number; - database: string; - user: string; - password: string; - ssl: {}; - binary: boolean; - client_encoding: any; - application_name: any; - fallback_application_name: any; - poolSize: number; - max: number; - query_timeout: number; - idleTimeoutMillis: number; - keepAlive: boolean; -}; diff --git a/types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts b/types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts deleted file mode 100644 index 2163c6958c..0000000000 --- a/types/Adapters/Storage/Postgres/PostgresStorageAdapter.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class PostgresStorageAdapter { - constructor({ uri, collectionPrefix, databaseOptions }: { - uri: any; - collectionPrefix?: string; - databaseOptions?: {}; - }); - _collectionPrefix: string; - enableSchemaHooks: boolean; - _client: import("pg-promise").IDatabase<{}, import("pg-promise/typescript/pg-subset").IClient>; - _onchange: () => void; - _pgp: import("pg-promise").IMain<{}, import("pg-promise/typescript/pg-subset").IClient>; - _uuid: any; - canSortOnJoinTables: boolean; - watch(callback: any): void; - createExplainableQuery(query: any, analyze?: boolean): string; - handleShutdown(): void; - _listenToSchema(): Promise; - _stream: import("pg-promise").IConnected<{}, import("pg-promise/typescript/pg-subset").IClient>; - _notifySchemaChange(): void; - _ensureSchemaCollectionExists(conn: any): Promise; - classExists(name: any): Promise; - setClassLevelPermissions(className: any, CLPs: any): Promise; - setIndexesWithSchemaFormat(className: any, submittedIndexes: any, existingIndexes: {}, fields: any, conn: any): Promise; - createClass(className: any, schema: any, conn: any): Promise; - createTable(className: any, schema: any, conn: any): Promise; - schemaUpgrade(className: any, schema: any, conn: any): Promise; - addFieldIfNotExists(className: any, fieldName: any, type: any, conn: any): Promise; - deleteClass(className: any): Promise; - deleteAllClasses(): Promise; - deleteFields(className: any, schema: any, fieldNames: any): Promise; - getAllClasses(): Promise<{ - className: any; - fields: any; - classLevelPermissions: Readonly<{ - find: { - '*': boolean; - }; - get: { - '*': boolean; - }; - count: { - '*': boolean; - }; - create: { - '*': boolean; - }; - update: { - '*': boolean; - }; - delete: { - '*': boolean; - }; - addField: { - '*': boolean; - }; - protectedFields: { - '*': any[]; - }; - }>; - indexes: {}; - }[]>; - getClass(className: any): Promise<{ - className: any; - fields: any; - classLevelPermissions: Readonly<{ - find: { - '*': boolean; - }; - get: { - '*': boolean; - }; - count: { - '*': boolean; - }; - create: { - '*': boolean; - }; - update: { - '*': boolean; - }; - delete: { - '*': boolean; - }; - addField: { - '*': boolean; - }; - protectedFields: { - '*': any[]; - }; - }>; - indexes: {}; - }>; - createObject(className: any, schema: any, object: any, transactionalSession: any): Promise; - deleteObjectsByQuery(className: any, schema: any, query: any, transactionalSession: any): Promise; - findOneAndUpdate(className: any, schema: any, query: any, update: any, transactionalSession: any): Promise; - updateObjectsByQuery(className: any, schema: any, query: any, update: any, transactionalSession: any): Promise; - upsertOneObject(className: any, schema: any, query: any, update: any, transactionalSession: any): Promise; - find(className: any, schema: any, query: any, { skip, limit, sort, keys, caseInsensitive, explain }: { - skip: any; - limit: any; - sort: any; - keys: any; - caseInsensitive: any; - explain: any; - }): Promise; - postgresObjectToParseObject(className: any, object: any, schema: any): any; - ensureUniqueness(className: any, schema: any, fieldNames: any): Promise; - count(className: any, schema: any, query: any, readPreference: any, estimate?: boolean): Promise; - distinct(className: any, schema: any, query: any, fieldName: any): Promise; - aggregate(className: any, schema: any, pipeline: any, readPreference: any, hint: any, explain: any): Promise; - performInitialization({ VolatileClassesSchemas }: { - VolatileClassesSchemas: any; - }): Promise; - createIndexes(className: any, indexes: any, conn: any): Promise; - createIndexesIfNeeded(className: any, fieldName: any, type: any, conn: any): Promise; - dropIndexes(className: any, indexes: any, conn: any): Promise; - getIndexes(className: any): Promise; - updateSchemaWithIndexes(): Promise; - updateEstimatedCount(className: any): Promise; - createTransactionalSession(): Promise; - commitTransactionalSession(transactionalSession: any): any; - abortTransactionalSession(transactionalSession: any): any; - ensureIndex(className: any, schema: any, fieldNames: any, indexName: any, caseInsensitive?: boolean, options?: {}): Promise; -} -declare var _default: typeof PostgresStorageAdapter; diff --git a/types/Adapters/Storage/Postgres/sql/index.d.ts b/types/Adapters/Storage/Postgres/sql/index.d.ts deleted file mode 100644 index f72ea11914..0000000000 --- a/types/Adapters/Storage/Postgres/sql/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import QueryFile_1 = require("pg-promise"); -import QueryFile = QueryFile_1.QueryFile; -export namespace array { - const add: QueryFile; - const addUnique: QueryFile; - const contains: QueryFile; - const containsAll: QueryFile; - const containsAllRegex: QueryFile; - const remove: QueryFile; -} -export namespace misc { - const jsonObjectSetKeys: QueryFile; -} diff --git a/types/Adapters/Storage/StorageAdapter.d.ts b/types/Adapters/Storage/StorageAdapter.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/Adapters/WebSocketServer/WSAdapter.d.ts b/types/Adapters/WebSocketServer/WSAdapter.d.ts deleted file mode 100644 index 3b8380ee6a..0000000000 --- a/types/Adapters/WebSocketServer/WSAdapter.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * Wrapper for ws node module - */ -export class WSAdapter extends _WSSAdapter.WSSAdapter { - constructor(options: any); - options: any; -} -declare var _default: typeof WSAdapter; -import _WSSAdapter = require("./WSSAdapter"); diff --git a/types/Adapters/WebSocketServer/WSSAdapter.d.ts b/types/Adapters/WebSocketServer/WSSAdapter.d.ts deleted file mode 100644 index 7c5cbc7c6b..0000000000 --- a/types/Adapters/WebSocketServer/WSSAdapter.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @module Adapters - */ -/** - * @interface WSSAdapter - */ -export class WSSAdapter { - /** - * @param {Object} options - {http.Server|https.Server} server - */ - constructor(options: any); - onListen: () => void; - onConnection: () => void; - onError: () => void; - /** - * Initialize Connection. - * - * @param {Object} options - */ - start(options: any): void; - /** - * Closes server. - */ - close(): void; -} -declare var _default: typeof WSSAdapter; diff --git a/types/Auth.d.ts b/types/Auth.d.ts deleted file mode 100644 index 2b7d1abc8d..0000000000 --- a/types/Auth.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export function Auth({ config, cacheController, isMaster, isReadOnly, user, installationId }: { - config: any; - cacheController?: any; - isMaster?: boolean; - isReadOnly?: boolean; - user: any; - installationId: any; -}): void; -export class Auth { - constructor({ config, cacheController, isMaster, isReadOnly, user, installationId }: { - config: any; - cacheController?: any; - isMaster?: boolean; - isReadOnly?: boolean; - user: any; - installationId: any; - }); - config: any; - cacheController: any; - installationId: any; - isMaster: boolean; - user: any; - isReadOnly: boolean; - userRoles: any[]; - fetchedRoles: boolean; - rolePromise: Promise; - isUnauthenticated(): boolean; - getUserRoles(): Promise; - getRolesForUser(): Promise; - _loadRoles(): Promise; - cacheRoles(): boolean; - getRolesByIds(ins: any): Promise; - _getAllRolesNamesForRoleIds(roleIDs: any, names?: any[], queriedRoles?: {}): any; -} -export function master(config: any): Auth; -export function nobody(config: any): Auth; -export function readOnly(config: any): Auth; -export function getAuthForSessionToken({ config, cacheController, sessionToken, installationId }: { - config: any; - cacheController: any; - sessionToken: any; - installationId: any; -}): Promise; -export function getAuthForLegacySessionToken({ config, sessionToken, installationId }: { - config: any; - sessionToken: any; - installationId: any; -}): any; diff --git a/types/ClientSDK.d.ts b/types/ClientSDK.d.ts deleted file mode 100644 index 8ac060d6ee..0000000000 --- a/types/ClientSDK.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function compatible(compatibleSDK: any): (clientSDK: any) => any; -export function supportsForwardDelete(clientSDK: any): any; -export function fromString(version: any): { - sdk: any; - version: any; -}; diff --git a/types/Config.d.ts b/types/Config.d.ts deleted file mode 100644 index 1be0c2e7d9..0000000000 --- a/types/Config.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -export = Config; -declare class Config { - static get(applicationId: any, mount: any): Config; - static put(serverConfiguration: any): any; - static validate({ verifyUserEmails, userController, appName, publicServerURL, revokeSessionOnPasswordReset, expireInactiveSessions, sessionLength, maxLimit, emailVerifyTokenValidityDuration, accountLockout, passwordPolicy, masterKeyIps, masterKey, readOnlyMasterKey, allowHeaders, idempotencyOptions, emailVerifyTokenReuseIfValid, fileUpload, pages, security }: { - verifyUserEmails: any; - userController: any; - appName: any; - publicServerURL: any; - revokeSessionOnPasswordReset: any; - expireInactiveSessions: any; - sessionLength: any; - maxLimit: any; - emailVerifyTokenValidityDuration: any; - accountLockout: any; - passwordPolicy: any; - masterKeyIps: any; - masterKey: any; - readOnlyMasterKey: any; - allowHeaders: any; - idempotencyOptions: any; - emailVerifyTokenReuseIfValid: any; - fileUpload: any; - pages: any; - security: any; - }): void; - static validateSecurityOptions(security: any): void; - static validatePagesOptions(pages: any): void; - static validateIdempotencyOptions(idempotencyOptions: any): void; - static validateAccountLockoutPolicy(accountLockout: any): void; - static validatePasswordPolicy(passwordPolicy: any): void; - static setupPasswordValidator(passwordPolicy: any): void; - static validateEmailConfiguration({ emailAdapter, appName, publicServerURL, emailVerifyTokenValidityDuration, emailVerifyTokenReuseIfValid }: { - emailAdapter: any; - appName: any; - publicServerURL: any; - emailVerifyTokenValidityDuration: any; - emailVerifyTokenReuseIfValid: any; - }): void; - static validateFileUploadOptions(fileUpload: any): void; - static validateMasterKeyIps(masterKeyIps: any): void; - static validateSessionConfiguration(sessionLength: any, expireInactiveSessions: any): void; - static validateMaxLimit(maxLimit: any): void; - static validateAllowHeaders(allowHeaders: any): void; - set mount(arg: any); - get mount(): any; - _mount: any; - generateEmailVerifyTokenExpiresAt(): Date; - generatePasswordResetTokenExpiresAt(): Date; - generateSessionExpiresAt(): Date; - get invalidLinkURL(): any; - get invalidVerificationLinkURL(): any; - get linkSendSuccessURL(): any; - get linkSendFailURL(): any; - get verifyEmailSuccessURL(): any; - get choosePasswordURL(): any; - get requestResetPasswordURL(): string; - get passwordResetSuccessURL(): any; - get parseFrameURL(): any; - get verifyEmailURL(): string; - get pagesEndpoint(): any; -} -declare namespace Config { - export { __esModule, Config, _default as default }; -} -declare var __esModule: boolean; -declare var _default: typeof Config; diff --git a/types/Controllers/AdaptableController.d.ts b/types/Controllers/AdaptableController.d.ts deleted file mode 100644 index ffbe056405..0000000000 --- a/types/Controllers/AdaptableController.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class AdaptableController { - static validateAdapter(adapter: any, self: any, ExpectedType: any): void; - constructor(adapter: any, appId: any, options: any); - options: any; - appId: any; - set adapter(arg: any); - get adapter(): any; - expectedAdapterType(): void; - validateAdapter(adapter: any): void; -} -declare var _default: typeof AdaptableController; diff --git a/types/Controllers/AnalyticsController.d.ts b/types/Controllers/AnalyticsController.d.ts deleted file mode 100644 index d146908ad7..0000000000 --- a/types/Controllers/AnalyticsController.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const AnalyticsController_base: any; -export class AnalyticsController extends AnalyticsController_base { - [x: string]: any; - appOpened(req: any): Promise<{ - response: any; - } | { - response: {}; - }>; - trackEvent(req: any): Promise<{ - response: any; - } | { - response: {}; - }>; - expectedAdapterType(): typeof _AnalyticsAdapter.AnalyticsAdapter; -} -declare var _default: typeof AnalyticsController; -import _AnalyticsAdapter = require("../Adapters/Analytics/AnalyticsAdapter"); diff --git a/types/Controllers/CacheController.d.ts b/types/Controllers/CacheController.d.ts deleted file mode 100644 index 136ead4b96..0000000000 --- a/types/Controllers/CacheController.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * Prefix all calls to the cache via a prefix string, useful when grouping Cache by object type. - * - * eg "Role" or "Session" - */ -export class SubCache { - constructor(prefix: any, cacheController: any, ttl: any); - prefix: any; - cache: any; - ttl: any; - get(key: any): any; - put(key: any, value: any, ttl: any): any; - del(key: any): any; - clear(): any; -} -declare const CacheController_base: any; -export class CacheController extends CacheController_base { - [x: string]: any; - constructor(adapter: any, appId: any, options?: {}); - role: SubCache; - user: SubCache; - graphQL: SubCache; - get(key: any): any; - put(key: any, value: any, ttl: any): any; - del(key: any): any; - clear(): any; - expectedAdapterType(): any; -} -declare var _default: typeof CacheController; diff --git a/types/Controllers/DatabaseController.d.ts b/types/Controllers/DatabaseController.d.ts deleted file mode 100644 index 57f46bd9d4..0000000000 --- a/types/Controllers/DatabaseController.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -export = DatabaseController; -declare class DatabaseController { - constructor(adapter: any); - adapter: any; - schemaPromise: any; - _transactionalSession: any; - collectionExists(className: any): any; - purgeCollection(className: any): any; - validateClassName(className: any): Promise; - loadSchema(options?: { - clearCache: boolean; - }): any; - loadSchemaIfNeeded(schemaController: any, options?: { - clearCache: boolean; - }): any; - redirectClassNameForKey(className: any, key: any): any; - validateObject(className: any, object: any, query: any, runOptions: any): any; - update(className: any, query: any, update: any, { acl, many, upsert, addsField }: { - acl: any; - many: any; - upsert: any; - addsField: any; - }, skipSanitization: boolean, validateOnly: boolean, validSchemaController: any): any; - collectRelationUpdates(className: any, objectId: any, update: any): any[]; - handleRelationUpdates(className: any, objectId: any, update: any, ops: any): Promise; - addRelation(key: any, fromClassName: any, fromId: any, toId: any): any; - removeRelation(key: any, fromClassName: any, fromId: any, toId: any): any; - destroy(className: any, query: any, { acl }: { - acl: any; - }, validSchemaController: any): any; - create(className: any, object: any, { acl }: { - acl: any; - }, validateOnly: boolean, validSchemaController: any): Promise; - canAddField(schema: any, className: any, object: any, aclGroup: any, runOptions: any): any; - /** - * Delete all classes and clears the schema cache - * - * @param {boolean} fast set to true if it's ok to just delete rows and not indexes - * @returns {Promise} when the deletions completes - */ - deleteEverything(fast?: boolean): Promise; - relatedIds(className: any, key: any, owningId: any, queryOptions: any): any; - owningIds(className: any, key: any, relatedIds: any): any; - reduceInRelation(className: any, query: any, schema: any): Promise; - reduceRelationKeys(className: any, query: any, queryOptions: any): any; - addInObjectIdsIds(ids: any, query: any): any; - addNotInObjectIdsIds(ids: any[], query: any): any; - find(className: any, query: any, { skip, limit, acl, sort, count, keys, op, distinct, pipeline, readPreference, hint, caseInsensitive, explain }: { - skip: any; - limit: any; - acl: any; - sort?: {}; - count: any; - keys: any; - op: any; - distinct: any; - pipeline: any; - readPreference: any; - hint: any; - caseInsensitive?: boolean; - explain: any; - }, auth: {}, validSchemaController: any): any; - deleteSchema(className: any): any; - objectToEntriesStrings(query: any): string[]; - reduceOrOperation(query: any): any; - reduceAndOperation(query: any): any; - addPointerPermissions(schema: any, className: any, operation: any, query: any, aclGroup?: any[]): any; - addProtectedFields(schema: any, className: any, query?: {}, aclGroup?: any[], auth?: {}, queryOptions?: {}): any; - createTransactionalSession(): any; - commitTransactionalSession(): any; - abortTransactionalSession(): any; - performInitialization(): Promise; -} -declare namespace DatabaseController { - export { validateQuery as _validateQuery }; -} -declare function validateQuery(query: any): void; diff --git a/types/Controllers/FilesController.d.ts b/types/Controllers/FilesController.d.ts deleted file mode 100644 index e49434dcf2..0000000000 --- a/types/Controllers/FilesController.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const FilesController_base: any; -export class FilesController extends FilesController_base { - [x: string]: any; - getFileData(config: any, filename: any): any; - createFile(config: any, filename: any, data: any, contentType: any, options: any): any; - deleteFile(config: any, filename: any): any; - getMetadata(filename: any): any; - /** - * Find file references in REST-format object and adds the url key - * with the current mount point and app id. - * Object may be a single object or list of REST-format objects. - */ - expandFilesInObject(config: any, object: any): void; - expectedAdapterType(): typeof _FilesAdapter.FilesAdapter; - handleFileStream(config: any, filename: any, req: any, res: any, contentType: any): any; - validateFilename(filename: any): any; -} -declare var _default: typeof FilesController; -import _FilesAdapter = require("../Adapters/Files/FilesAdapter"); diff --git a/types/Controllers/HooksController.d.ts b/types/Controllers/HooksController.d.ts deleted file mode 100644 index f3d318bf51..0000000000 --- a/types/Controllers/HooksController.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class HooksController { - constructor(applicationId: any, databaseController: any, webhookKey: any); - _applicationId: any; - _webhookKey: any; - database: any; - load(): any; - getFunction(functionName: any): any; - getFunctions(): any; - getTrigger(className: any, triggerName: any): any; - getTriggers(): any; - deleteFunction(functionName: any): any; - deleteTrigger(className: any, triggerName: any): any; - _getHooks(query?: {}): any; - _removeHooks(query: any): any; - saveHook(hook: any): any; - addHookToTriggers(hook: any): void; - addHook(hook: any): any; - createOrUpdateHook(aHook: any): any; - createHook(aHook: any): any; - updateHook(aHook: any): any; -} -declare var _default: typeof HooksController; diff --git a/types/Controllers/LiveQueryController.d.ts b/types/Controllers/LiveQueryController.d.ts deleted file mode 100644 index a02cdadc8b..0000000000 --- a/types/Controllers/LiveQueryController.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class LiveQueryController { - constructor(config: any); - classNames: Set; - liveQueryPublisher: _ParseCloudCodePublisher.ParseCloudCodePublisher; - onAfterSave(className: any, currentObject: any, originalObject: any, classLevelPermissions: any): void; - onAfterDelete(className: any, currentObject: any, originalObject: any, classLevelPermissions: any): void; - hasLiveQuery(className: any): boolean; - _makePublisherRequest(currentObject: any, originalObject: any, classLevelPermissions: any): { - object: any; - }; -} -declare var _default: typeof LiveQueryController; -import _ParseCloudCodePublisher = require("../LiveQuery/ParseCloudCodePublisher"); diff --git a/types/Controllers/LoggerController.d.ts b/types/Controllers/LoggerController.d.ts deleted file mode 100644 index b2c73f4ac1..0000000000 --- a/types/Controllers/LoggerController.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export var __esModule: boolean; -export default _default; -export namespace LogLevel { - const INFO: string; - const ERROR: string; -} -export namespace LogOrder { - const DESCENDING: string; - const ASCENDING: string; -} -declare const LoggerController_base: any; -export class LoggerController extends LoggerController_base { - [x: string]: any; - static validDateTime(date: any): any; - static parseOptions(options?: {}): { - from: any; - until: any; - size: number; - order: any; - level: any; - }; - constructor(adapter: any, appId: any, options?: { - logLevel: string; - }); - maskSensitiveUrl(urlString: any): string; - maskSensitive(argArray: any): any; - log(level: any, args: any): void; - info(...args: any[]): void; - error(...args: any[]): void; - warn(...args: any[]): void; - verbose(...args: any[]): void; - debug(...args: any[]): void; - silly(...args: any[]): void; - logRequest({ method, url, headers, body }: { - method: any; - url: any; - headers: any; - body: any; - }): void; - logResponse({ method, url, result }: { - method: any; - url: any; - result: any; - }): void; - truncateLogMessage(string: any): any; - getLogs(options?: {}): any; - expectedAdapterType(): typeof _LoggerAdapter.LoggerAdapter; -} -declare var _default: typeof LoggerController; -import _LoggerAdapter = require("../Adapters/Logger/LoggerAdapter"); diff --git a/types/Controllers/ParseGraphQLController.d.ts b/types/Controllers/ParseGraphQLController.d.ts deleted file mode 100644 index 5fdd386de1..0000000000 --- a/types/Controllers/ParseGraphQLController.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export var __esModule: boolean; -export default _default; -export const GraphQLConfigClassName: "_GraphQLConfig"; -export const GraphQLConfigId: "1"; -export const GraphQLConfigKey: "config"; -declare var _default: typeof ParseGraphQLController; -declare class ParseGraphQLController { - constructor(params?: {}); - databaseController: any; - cacheController: any; - isMounted: boolean; - configCacheKey: string; - getGraphQLConfig(): Promise; - updateGraphQLConfig(graphQLConfig: any): Promise<{ - response: { - result: boolean; - }; - }>; - _getCachedGraphQLConfig(): any; - _putCachedGraphQLConfig(graphQLConfig: any): any; - _validateGraphQLConfig(graphQLConfig: any): void; - _validateClassConfig(classConfig: any): string; -} diff --git a/types/Controllers/PushController.d.ts b/types/Controllers/PushController.d.ts deleted file mode 100644 index 1a62511276..0000000000 --- a/types/Controllers/PushController.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class PushController { - /** - * Get expiration time from the request body. - * @param {Object} request A request object - * @returns {Number|undefined} The expiration time if it exists in the request - */ - static getExpirationTime(body?: {}): number | undefined; - static getExpirationInterval(body?: {}): number; - /** - * Get push time from the request body. - * @param {Object} request A request object - * @returns {Number|undefined} The push time if it exists in the request - */ - static getPushTime(body?: {}): number | undefined; - /** - * Checks if a ISO8601 formatted date contains a timezone component - * @param pushTimeParam {string} - * @returns {boolean} - */ - static pushTimeHasTimezoneComponent(pushTimeParam: string): boolean; - /** - * Converts a date to ISO format in UTC time and strips the timezone if `isLocalTime` is true - * @param date {Date} - * @param isLocalTime {boolean} - * @returns {string} - */ - static formatPushTime({ date, isLocalTime }: Date): string; - sendPush(body: {}, where: {}, config: any, auth: any, onPushStatusSaved?: () => void, now?: Date): Promise; -} -declare var _default: typeof PushController; diff --git a/types/Controllers/SchemaController.d.ts b/types/Controllers/SchemaController.d.ts deleted file mode 100644 index 607280050a..0000000000 --- a/types/Controllers/SchemaController.d.ts +++ /dev/null @@ -1,347 +0,0 @@ -export var __esModule: boolean; -export var SchemaController: typeof SchemaController; -export default SchemaController; -export function classNameIsValid(className: any): boolean; -export function fieldNameIsValid(fieldName: any, className: any): boolean; -export function invalidClassNameMessage(className: any): string; -export function buildMergedSchemaObject(existingFields: any, putRequest: any): {}; -export const defaultColumns: Readonly<{ - _Default: { - objectId: { - type: string; - }; - createdAt: { - type: string; - }; - updatedAt: { - type: string; - }; - ACL: { - type: string; - }; - }; - _User: { - username: { - type: string; - }; - password: { - type: string; - }; - email: { - type: string; - }; - emailVerified: { - type: string; - }; - authData: { - type: string; - }; - }; - _Installation: { - installationId: { - type: string; - }; - deviceToken: { - type: string; - }; - channels: { - type: string; - }; - deviceType: { - type: string; - }; - pushType: { - type: string; - }; - GCMSenderId: { - type: string; - }; - timeZone: { - type: string; - }; - localeIdentifier: { - type: string; - }; - badge: { - type: string; - }; - appVersion: { - type: string; - }; - appName: { - type: string; - }; - appIdentifier: { - type: string; - }; - parseVersion: { - type: string; - }; - }; - _Role: { - name: { - type: string; - }; - users: { - type: string; - targetClass: string; - }; - roles: { - type: string; - targetClass: string; - }; - }; - _Session: { - restricted: { - type: string; - }; - user: { - type: string; - targetClass: string; - }; - installationId: { - type: string; - }; - sessionToken: { - type: string; - }; - expiresAt: { - type: string; - }; - createdWith: { - type: string; - }; - }; - _Product: { - productIdentifier: { - type: string; - }; - download: { - type: string; - }; - downloadName: { - type: string; - }; - icon: { - type: string; - }; - order: { - type: string; - }; - title: { - type: string; - }; - subtitle: { - type: string; - }; - }; - _PushStatus: { - pushTime: { - type: string; - }; - source: { - type: string; - }; - query: { - type: string; - }; - payload: { - type: string; - }; - title: { - type: string; - }; - expiry: { - type: string; - }; - expiration_interval: { - type: string; - }; - status: { - type: string; - }; - numSent: { - type: string; - }; - numFailed: { - type: string; - }; - pushHash: { - type: string; - }; - errorMessage: { - type: string; - }; - sentPerType: { - type: string; - }; - failedPerType: { - type: string; - }; - sentPerUTCOffset: { - type: string; - }; - failedPerUTCOffset: { - type: string; - }; - count: { - type: string; - }; - }; - _JobStatus: { - jobName: { - type: string; - }; - source: { - type: string; - }; - status: { - type: string; - }; - message: { - type: string; - }; - params: { - type: string; - }; - finishedAt: { - type: string; - }; - }; - _JobSchedule: { - jobName: { - type: string; - }; - description: { - type: string; - }; - params: { - type: string; - }; - startAfter: { - type: string; - }; - daysOfWeek: { - type: string; - }; - timeOfDay: { - type: string; - }; - lastRun: { - type: string; - }; - repeatMinutes: { - type: string; - }; - }; - _Hooks: { - functionName: { - type: string; - }; - className: { - type: string; - }; - triggerName: { - type: string; - }; - url: { - type: string; - }; - }; - _GlobalConfig: { - objectId: { - type: string; - }; - params: { - type: string; - }; - masterKeyOnly: { - type: string; - }; - }; - _GraphQLConfig: { - objectId: { - type: string; - }; - config: { - type: string; - }; - }; - _Audience: { - objectId: { - type: string; - }; - name: { - type: string; - }; - query: { - type: string; - }; - lastUsed: { - type: string; - }; - timesUsed: { - type: string; - }; - }; - _Idempotency: { - reqId: { - type: string; - }; - expire: { - type: string; - }; - }; -}>; -export const systemClasses: readonly string[]; -export function convertSchemaToAdapterSchema(schema: any): any; -export const VolatileClassesSchemas: any[]; -declare class SchemaController { - static testPermissions(classPermissions: any, aclGroup: any, operation: any): boolean; - static validatePermission(classPermissions: any, className: any, aclGroup: any, operation: any, action: any): true | Promise; - constructor(databaseAdapter: any); - _dbAdapter: any; - schemaData: SchemaData; - protectedFields: any; - userIdRegEx: RegExp; - reloadData(options?: { - clearCache: boolean; - }): any; - reloadDataPromise: any; - getAllClasses(options?: { - clearCache: boolean; - }): any; - setAllClasses(): any; - getOneSchema(className: any, allowVolatileClasses?: boolean, options?: { - clearCache: boolean; - }): any; - addClassIfNotExists(className: any, fields: {}, classLevelPermissions: any, indexes?: {}): Promise; - updateClass(className: any, submittedFields: any, classLevelPermissions: any, indexes: any, database: any): any; - enforceClassExists(className: any): Promise; - validateNewClass(className: any, fields: {}, classLevelPermissions: any): { - code: any; - error: any; - }; - validateSchemaData(className: any, fields: any, classLevelPermissions: any, existingFieldNames: any): { - code: any; - error: any; - }; - setPermissions(className: any, perms: any, newSchema: any): Promise; - enforceFieldExists(className: any, fieldName: any, type: any): any; - ensureFields(fields: any): void; - deleteField(fieldName: any, className: any, database: any): any; - deleteFields(fieldNames: any, className: any, database: any): any; - validateObject(className: any, object: any, query: any): Promise; - validateRequiredColumns(className: any, object: any, query: any): Promise; - testPermissionsForClassName(className: any, aclGroup: any, operation: any): boolean; - validatePermission(className: any, aclGroup: any, operation: any, action: any): true | Promise; - getClassLevelPermissions(className: any): any; - getExpectedType(className: any, fieldName: any): any; - hasClass(className: any): any; -} -export function load(dbAdapter: any, options: any): any; -declare class SchemaData { - constructor(allSchemas?: any[], protectedFields?: {}); - __data: {}; - __protectedFields: {}; -} diff --git a/types/Controllers/UserController.d.ts b/types/Controllers/UserController.d.ts deleted file mode 100644 index a4ce1aaf36..0000000000 --- a/types/Controllers/UserController.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const UserController_base: any; -export class UserController extends UserController_base { - [x: string]: any; - constructor(adapter: any, appId: any, options?: {}); - get config(): any; - validateAdapter(adapter: any): void; - expectedAdapterType(): any; - get shouldVerifyEmails(): any; - setEmailVerifyToken(user: any): void; - verifyEmail(username: any, token: any): any; - checkResetTokenValidity(username: any, token: any): any; - getUserIfNeeded(user: any): any; - sendVerificationEmail(user: any): void; - /** - * Regenerates the given user's email verification token - * - * @param user - * @returns {*} - */ - regenerateEmailVerifyToken(user: any): any; - resendVerificationEmail(username: any): any; - setPasswordResetToken(email: any): any; - sendPasswordResetEmail(email: any): Promise; - updatePassword(username: any, token: any, password: any): any; - defaultVerificationEmail({ link, user, appName }: { - link: any; - user: any; - appName: any; - }): { - text: string; - to: any; - subject: string; - }; - defaultResetPasswordEmail({ link, user, appName }: { - link: any; - user: any; - appName: any; - }): { - text: string; - to: any; - subject: string; - }; -} -declare var _default: typeof UserController; diff --git a/types/Controllers/index.d.ts b/types/Controllers/index.d.ts deleted file mode 100644 index 3777276106..0000000000 --- a/types/Controllers/index.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -export var __esModule: boolean; -export function getControllers(options: any): { - loggerController: _LoggerController.LoggerController; - filesController: _FilesController.FilesController; - userController: _UserController.UserController; - pushController: _PushController.PushController; - hasPushScheduledSupport: boolean; - hasPushSupport: boolean; - pushWorker: _PushWorker.PushWorker; - pushControllerQueue: _PushQueue.PushQueue; - analyticsController: _AnalyticsController.AnalyticsController; - cacheController: _CacheController.CacheController; - parseGraphQLController: any; - liveQueryController: _LiveQueryController.LiveQueryController; - databaseController: any; - hooksController: _HooksController.HooksController; - authDataManager: any; - schemaCache: any; -}; -export function getLoggerController(options: any): _LoggerController.LoggerController; -export function getFilesController(options: any): _FilesController.FilesController; -export function getUserController(options: any): _UserController.UserController; -export function getCacheController(options: any): _CacheController.CacheController; -export function getParseGraphQLController(options: any, controllerDeps: any): any; -export function getAnalyticsController(options: any): _AnalyticsController.AnalyticsController; -export function getLiveQueryController(options: any): _LiveQueryController.LiveQueryController; -export function getDatabaseController(options: any): any; -export function getHooksController(options: any, databaseController: any): _HooksController.HooksController; -export function getPushController(options: any): { - pushController: _PushController.PushController; - hasPushSupport: boolean; - hasPushScheduledSupport: boolean; - pushControllerQueue: _PushQueue.PushQueue; - pushWorker: _PushWorker.PushWorker; -}; -export function getAuthDataManager(options: any): any; -export function getDatabaseAdapter(databaseURI: any, collectionPrefix: any, databaseOptions: any): any; -import _LoggerController = require("./LoggerController"); -import _FilesController = require("./FilesController"); -import _UserController = require("./UserController"); -import _PushController = require("./PushController"); -import _PushWorker = require("../Push/PushWorker"); -import _PushQueue = require("../Push/PushQueue"); -import _AnalyticsController = require("./AnalyticsController"); -import _CacheController = require("./CacheController"); -import _LiveQueryController = require("./LiveQueryController"); -import _HooksController = require("./HooksController"); diff --git a/types/Controllers/types.d.ts b/types/Controllers/types.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/Deprecator/Deprecations.d.ts b/types/Deprecator/Deprecations.d.ts deleted file mode 100644 index 2cad12b061..0000000000 --- a/types/Deprecator/Deprecations.d.ts +++ /dev/null @@ -1,376 +0,0 @@ -declare const _exports: { - [n: number]: { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - length: number; - toString(): string; - toLocaleString(): string; - pop(): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - push(...items: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]): number; - concat(...items: ConcatArray<{ - optionKey: string; - changeNewDefault: string; - solution: string; - }>[]): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - concat(...items: ({ - optionKey: string; - changeNewDefault: string; - solution: string; - } | ConcatArray<{ - optionKey: string; - changeNewDefault: string; - solution: string; - }>)[]): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - join(separator?: string): string; - reverse(): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - shift(): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - slice(start?: number, end?: number): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - sort(compareFn?: (a: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, b: { - optionKey: string; - changeNewDefault: string; - solution: string; - }) => number): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - splice(start: number, deleteCount?: number): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - splice(start: number, deleteCount: number, ...items: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - unshift(...items: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]): number; - indexOf(searchElement: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, fromIndex?: number): number; - lastIndexOf(searchElement: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, fromIndex?: number): number; - every(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => value is S, thisArg?: any): this is S[]; - every(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => unknown, thisArg?: any): boolean; - some(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => unknown, thisArg?: any): boolean; - forEach(callbackfn: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => void, thisArg?: any): void; - map(callbackfn: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => U, thisArg?: any): U[]; - filter(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => value is S_1, thisArg?: any): S_1[]; - filter(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => unknown, thisArg?: any): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - reduce(callbackfn: (previousValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentIndex: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => { - optionKey: string; - changeNewDefault: string; - solution: string; - }): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - reduce(callbackfn: (previousValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentIndex: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => { - optionKey: string; - changeNewDefault: string; - solution: string; - }, initialValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - reduce(callbackfn: (previousValue: U_1, currentValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentIndex: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => U_1, initialValue: U_1): U_1; - reduceRight(callbackfn: (previousValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentIndex: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => { - optionKey: string; - changeNewDefault: string; - solution: string; - }): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - reduceRight(callbackfn: (previousValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentIndex: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => { - optionKey: string; - changeNewDefault: string; - solution: string; - }, initialValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - reduceRight(callbackfn: (previousValue: U_2, currentValue: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, currentIndex: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => U_2, initialValue: U_2): U_2; - find(predicate: (this: void, value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, obj: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => value is S_2, thisArg?: any): S_2; - find(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, obj: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => unknown, thisArg?: any): { - optionKey: string; - changeNewDefault: string; - solution: string; - }; - findIndex(predicate: (value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, obj: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => unknown, thisArg?: any): number; - fill(value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, start?: number, end?: number): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - copyWithin(target: number, start: number, end?: number): { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]; - [Symbol.iterator](): IterableIterator<{ - optionKey: string; - changeNewDefault: string; - solution: string; - }>; - entries(): IterableIterator<[number, { - optionKey: string; - changeNewDefault: string; - solution: string; - }]>; - keys(): IterableIterator; - values(): IterableIterator<{ - optionKey: string; - changeNewDefault: string; - solution: string; - }>; - [Symbol.unscopables](): { - copyWithin: boolean; - entries: boolean; - fill: boolean; - find: boolean; - findIndex: boolean; - keys: boolean; - values: boolean; - }; - includes(searchElement: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, fromIndex?: number): boolean; - flatMap(callback: (this: This, value: { - optionKey: string; - changeNewDefault: string; - solution: string; - }, index: number, array: { - optionKey: string; - changeNewDefault: string; - solution: string; - }[]) => U_3 | readonly U_3[], thisArg?: This): U_3[]; - flat(this: A, depth?: D): FlatArray[]; - flat(this: (readonly U_4[])[], depth?: 1): U_4[]; -}; -export = _exports; diff --git a/types/Deprecator/Deprecator.d.ts b/types/Deprecator/Deprecator.d.ts deleted file mode 100644 index 54d3f67808..0000000000 --- a/types/Deprecator/Deprecator.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export = Deprecator; -/** - * The deprecator class. - */ -declare class Deprecator { - /** - * Scans the Parse Server for deprecated options. - * This needs to be called before setting option defaults, otherwise it - * becomes indistinguishable whether an option has been set manually or - * by default. - * @param {any} options The Parse Server options. - */ - static scanParseServerOptions(options: any): void; - /** - * Returns the deprecation definitions. - * @returns {Array} The deprecations. - */ - static _getDeprecations(): Array; - /** - * Logs a deprecation warning for a Parse Server option. - * @param {String} optionKey The option key incl. its path, e.g. `security.enableCheck`. - * @param {String} envKey The environment key, e.g. `PARSE_SERVER_SECURITY`. - * @param {String} changeNewKey Set the new key name if the current key will be replaced, - * or set to an empty string if the current key will be removed without replacement. - * @param {String} changeNewDefault Set the new default value if the key's default value - * will change in a future version. - * @param {String} [solution] The instruction to resolve this deprecation warning. This - * message must not include the warning that the parameter is deprecated, that is - * automatically added to the message. It should only contain the instruction on how - * to resolve this warning. - */ - static _log({ optionKey, envKey, changeNewKey, changeNewDefault, solution }: string): void; -} diff --git a/types/GraphQL/ParseGraphQLSchema.d.ts b/types/GraphQL/ParseGraphQLSchema.d.ts deleted file mode 100644 index 22d71e1798..0000000000 --- a/types/GraphQL/ParseGraphQLSchema.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export var __esModule: boolean; -export class ParseGraphQLSchema { - constructor(params?: {}); - parseGraphQLController: any; - databaseController: any; - log: any; - graphQLCustomTypeDefs: any; - appId: any; - schemaCache: any; - load(): Promise; - parseClasses: any; - parseClassesString: string; - parseGraphQLConfig: any; - functionNames: any[]; - functionNamesString: string; - parseClassTypes: {}; - viewerType: any; - graphQLAutoSchema: _graphql.GraphQLSchema; - graphQLSchema: any; - graphQLTypes: any[]; - graphQLQueries: {}; - graphQLMutations: {}; - graphQLSubscriptions: {}; - graphQLSchemaDirectivesDefinitions: any; - graphQLSchemaDirectives: {}; - relayNodeInterface: any; - addGraphQLType(type: any, throwError?: boolean, ignoreReserved?: boolean, ignoreConnection?: boolean): any; - addGraphQLQuery(fieldName: any, field: any, throwError?: boolean, ignoreReserved?: boolean): any; - addGraphQLMutation(fieldName: any, field: any, throwError?: boolean, ignoreReserved?: boolean): any; - handleError(error: any): void; - _initializeSchemaAndConfig(): Promise<{ - parseGraphQLConfig: any; - }>; - schemaController: any; - /** - * Gets all classes found by the `schemaController` - * minus those filtered out by the app's parseGraphQLConfig. - */ - _getClassesForSchema(parseGraphQLConfig: any): Promise; - isUsersClassDisabled: boolean; - /** - * This method returns a list of tuples - * that provide the parseClass along with - * its parseClassConfig where provided. - */ - _getParseClassesWithConfig(parseClasses: any, parseGraphQLConfig: any): any; - _getFunctionNames(): Promise; - /** - * Checks for changes to the parseClasses - * objects (i.e. database schema) or to - * the parseGraphQLConfig object. If no - * changes are found, return true; - */ - _hasSchemaInputChanged(params: any): boolean; -} -import _graphql = require("graphql"); diff --git a/types/GraphQL/ParseGraphQLServer.d.ts b/types/GraphQL/ParseGraphQLServer.d.ts deleted file mode 100644 index 837d7de663..0000000000 --- a/types/GraphQL/ParseGraphQLServer.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export var __esModule: boolean; -export class ParseGraphQLServer { - constructor(parseServer: any, config: any); - parseServer: any; - config: any; - parseGraphQLController: any; - log: any; - parseGraphQLSchema: _ParseGraphQLSchema.ParseGraphQLSchema; - _getGraphQLOptions(req: any): Promise<{ - schema: any; - context: { - info: any; - config: any; - auth: any; - }; - formatError: (error: any) => any; - }>; - _transformMaxUploadSizeToBytes(maxUploadSize: any): number; - applyGraphQL(app: any): void; - applyPlayground(app: any): void; - createSubscriptions(server: any): void; - setGraphQLConfig(graphQLConfig: any): any; -} -import _ParseGraphQLSchema = require("./ParseGraphQLSchema"); diff --git a/types/GraphQL/helpers/objectsMutations.d.ts b/types/GraphQL/helpers/objectsMutations.d.ts deleted file mode 100644 index 3a0c64c4cd..0000000000 --- a/types/GraphQL/helpers/objectsMutations.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export var __esModule: boolean; -export function createObject(className: any, fields: any, config: any, auth: any, info: any): Promise; -export function updateObject(className: any, objectId: any, fields: any, config: any, auth: any, info: any): Promise; -export function deleteObject(className: any, objectId: any, config: any, auth: any, info: any): Promise; diff --git a/types/GraphQL/helpers/objectsQueries.d.ts b/types/GraphQL/helpers/objectsQueries.d.ts deleted file mode 100644 index 08b82a579f..0000000000 --- a/types/GraphQL/helpers/objectsQueries.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export var __esModule: boolean; -export function needToGetAllKeys(fields: any, keys: any, parseClasses: any): any; -export function getObject(className: any, objectId: any, keys: any, include: any, readPreference: any, includeReadPreference: any, config: any, auth: any, info: any, parseClasses: any): Promise; -export function findObjects(className: any, where: any, order: any, skipInput: any, first: any, after: any, last: any, before: any, keys: any, include: any, includeAll: any, readPreference: any, includeReadPreference: any, subqueryReadPreference: any, config: any, auth: any, info: any, selectedFields: any, parseClasses: any): Promise<{ - edges: any; - pageInfo: { - hasPreviousPage: boolean; - startCursor: any; - endCursor: any; - hasNextPage: boolean; - }; - count: any; -}>; -export function calculateSkipAndLimit(skipInput: any, first: any, after: any, last: any, before: any, maxLimit: any): { - skip: any; - limit: any; - needToPreCount: boolean; -}; diff --git a/types/GraphQL/loaders/defaultGraphQLMutations.d.ts b/types/GraphQL/loaders/defaultGraphQLMutations.d.ts deleted file mode 100644 index 7fa503a616..0000000000 --- a/types/GraphQL/loaders/defaultGraphQLMutations.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/defaultGraphQLQueries.d.ts b/types/GraphQL/loaders/defaultGraphQLQueries.d.ts deleted file mode 100644 index 7fa503a616..0000000000 --- a/types/GraphQL/loaders/defaultGraphQLQueries.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/defaultGraphQLTypes.d.ts b/types/GraphQL/loaders/defaultGraphQLTypes.d.ts deleted file mode 100644 index f6788c0f53..0000000000 --- a/types/GraphQL/loaders/defaultGraphQLTypes.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -export var __esModule: boolean; -export var ARRAY_RESULT: _graphql.GraphQLUnionType; -export class TypeValidationError extends Error { - constructor(value: any, type: any); -} -export function parseStringValue(value: any): string; -export function parseIntValue(value: any): number; -export function parseFloatValue(value: any): number; -export function parseBooleanValue(value: any): boolean; -export function parseValue(value: any): any; -export function parseListValues(values: any): any; -export function parseObjectFields(fields: any): any; -export const ANY: _graphql.GraphQLScalarType; -export const OBJECT: _graphql.GraphQLScalarType; -export function parseDateIsoValue(value: any): Date; -export function serializeDateIso(value: any): string; -export const DATE: _graphql.GraphQLScalarType; -export const BYTES: _graphql.GraphQLScalarType; -export function parseFileValue(value: any): any; -export const FILE: _graphql.GraphQLScalarType; -export const FILE_INFO: _graphql.GraphQLObjectType; -export const FILE_INPUT: _graphql.GraphQLInputObjectType; -export namespace GEO_POINT_FIELDS { - namespace latitude { - const description: string; - const type: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - } - namespace longitude { - const description_1: string; - export { description_1 as description }; - const type_1: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_1 as type }; - } -} -export const GEO_POINT_INPUT: _graphql.GraphQLInputObjectType; -export const GEO_POINT: _graphql.GraphQLObjectType; -export const POLYGON_INPUT: _graphql.GraphQLList<_graphql.GraphQLType>; -export const POLYGON: _graphql.GraphQLList<_graphql.GraphQLType>; -export const USER_ACL_INPUT: _graphql.GraphQLInputObjectType; -export const ROLE_ACL_INPUT: _graphql.GraphQLInputObjectType; -export const PUBLIC_ACL_INPUT: _graphql.GraphQLInputObjectType; -export const ACL_INPUT: _graphql.GraphQLInputObjectType; -export const USER_ACL: _graphql.GraphQLObjectType; -export const ROLE_ACL: _graphql.GraphQLObjectType; -export const PUBLIC_ACL: _graphql.GraphQLObjectType; -export const ACL: _graphql.GraphQLObjectType; -export const OBJECT_ID: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; -export namespace CLASS_NAME_ATT { - const description_2: string; - export { description_2 as description }; - const type_2: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_2 as type }; -} -export namespace GLOBAL_OR_OBJECT_ID_ATT { - const description_3: string; - export { description_3 as description }; - export { OBJECT_ID as type }; -} -export namespace OBJECT_ID_ATT { - const description_4: string; - export { description_4 as description }; - export { OBJECT_ID as type }; -} -export namespace CREATED_AT_ATT { - const description_5: string; - export { description_5 as description }; - const type_3: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_3 as type }; -} -export namespace UPDATED_AT_ATT { - const description_6: string; - export { description_6 as description }; - const type_4: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_4 as type }; -} -export namespace INPUT_FIELDS { - namespace ACL { - export { ACL as type }; - } -} -export namespace CREATE_RESULT_FIELDS { - export { OBJECT_ID_ATT as objectId }; - export { CREATED_AT_ATT as createdAt }; -} -export namespace UPDATE_RESULT_FIELDS { - export { UPDATED_AT_ATT as updatedAt }; -} -export const PARSE_OBJECT_FIELDS: any; -export const PARSE_OBJECT: _graphql.GraphQLInterfaceType; -export namespace SESSION_TOKEN_ATT { - const description_7: string; - export { description_7 as description }; - const type_5: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_5 as type }; -} -export const READ_PREFERENCE: _graphql.GraphQLEnumType; -export namespace READ_PREFERENCE_ATT { - const description_8: string; - export { description_8 as description }; - export { READ_PREFERENCE as type }; -} -export namespace INCLUDE_READ_PREFERENCE_ATT { - const description_9: string; - export { description_9 as description }; - export { READ_PREFERENCE as type }; -} -export namespace SUBQUERY_READ_PREFERENCE_ATT { - const description_10: string; - export { description_10 as description }; - export { READ_PREFERENCE as type }; -} -export const READ_OPTIONS_INPUT: _graphql.GraphQLInputObjectType; -export namespace READ_OPTIONS_ATT { - const description_11: string; - export { description_11 as description }; - export { READ_OPTIONS_INPUT as type }; -} -export namespace WHERE_ATT { - const description_12: string; - export { description_12 as description }; - export { OBJECT as type }; -} -export namespace SKIP_ATT { - const description_13: string; - export { description_13 as description }; - const type_6: _graphql.GraphQLScalarType; - export { type_6 as type }; -} -export namespace LIMIT_ATT { - const description_14: string; - export { description_14 as description }; - const type_7: _graphql.GraphQLScalarType; - export { type_7 as type }; -} -export namespace COUNT_ATT { - const description_15: string; - export { description_15 as description }; - const type_8: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_8 as type }; -} -export const SEARCH_INPUT: _graphql.GraphQLInputObjectType; -export const TEXT_INPUT: _graphql.GraphQLInputObjectType; -export const BOX_INPUT: _graphql.GraphQLInputObjectType; -export const WITHIN_INPUT: _graphql.GraphQLInputObjectType; -export const CENTER_SPHERE_INPUT: _graphql.GraphQLInputObjectType; -export const GEO_WITHIN_INPUT: _graphql.GraphQLInputObjectType; -export const GEO_INTERSECTS_INPUT: _graphql.GraphQLInputObjectType; -export function equalTo(type: any): { - description: string; - type: any; -}; -export function notEqualTo(type: any): { - description: string; - type: any; -}; -export function lessThan(type: any): { - description: string; - type: any; -}; -export function lessThanOrEqualTo(type: any): { - description: string; - type: any; -}; -export function greaterThan(type: any): { - description: string; - type: any; -}; -export function greaterThanOrEqualTo(type: any): { - description: string; - type: any; -}; -export function inOp(type: any): { - description: string; - type: _graphql.GraphQLList<_graphql.GraphQLType>; -}; -export function notIn(type: any): { - description: string; - type: _graphql.GraphQLList<_graphql.GraphQLType>; -}; -export namespace exists { - const description_16: string; - export { description_16 as description }; - const type_9: _graphql.GraphQLScalarType; - export { type_9 as type }; -} -export namespace matchesRegex { - const description_17: string; - export { description_17 as description }; - const type_10: _graphql.GraphQLScalarType; - export { type_10 as type }; -} -export namespace options { - const description_18: string; - export { description_18 as description }; - const type_11: _graphql.GraphQLScalarType; - export { type_11 as type }; -} -export const SUBQUERY_INPUT: _graphql.GraphQLInputObjectType; -export const SELECT_INPUT: _graphql.GraphQLInputObjectType; -export namespace inQueryKey { - const description_19: string; - export { description_19 as description }; - export { SELECT_INPUT as type }; -} -export namespace notInQueryKey { - const description_20: string; - export { description_20 as description }; - export { SELECT_INPUT as type }; -} -export const ID_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const STRING_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const NUMBER_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const BOOLEAN_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const ARRAY_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const KEY_VALUE_INPUT: _graphql.GraphQLInputObjectType; -export const OBJECT_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const DATE_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const BYTES_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const FILE_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const GEO_POINT_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const POLYGON_WHERE_INPUT: _graphql.GraphQLInputObjectType; -export const ELEMENT: _graphql.GraphQLObjectType; -import _graphql = require("graphql"); -export let ARRAY_RESULT: any; -export function loadArrayResult(parseGraphQLSchema: any, parseClasses: any): void; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/defaultRelaySchema.d.ts b/types/GraphQL/loaders/defaultRelaySchema.d.ts deleted file mode 100644 index 18df194182..0000000000 --- a/types/GraphQL/loaders/defaultRelaySchema.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export var __esModule: boolean; -export namespace GLOBAL_ID_ATT { - const description: string; - const type: any; -} -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/filesMutations.d.ts b/types/GraphQL/loaders/filesMutations.d.ts deleted file mode 100644 index d4a784267e..0000000000 --- a/types/GraphQL/loaders/filesMutations.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export var __esModule: boolean; -export function handleUpload(upload: any, config: any): Promise<{ - fileInfo: any; -}>; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/functionsMutations.d.ts b/types/GraphQL/loaders/functionsMutations.d.ts deleted file mode 100644 index 7fa503a616..0000000000 --- a/types/GraphQL/loaders/functionsMutations.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/parseClassMutations.d.ts b/types/GraphQL/loaders/parseClassMutations.d.ts deleted file mode 100644 index 4d8f788217..0000000000 --- a/types/GraphQL/loaders/parseClassMutations.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any, parseClass: any, parseClassConfig: any): void; diff --git a/types/GraphQL/loaders/parseClassQueries.d.ts b/types/GraphQL/loaders/parseClassQueries.d.ts deleted file mode 100644 index 4d8f788217..0000000000 --- a/types/GraphQL/loaders/parseClassQueries.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any, parseClass: any, parseClassConfig: any): void; diff --git a/types/GraphQL/loaders/parseClassTypes.d.ts b/types/GraphQL/loaders/parseClassTypes.d.ts deleted file mode 100644 index d6001299d6..0000000000 --- a/types/GraphQL/loaders/parseClassTypes.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export var __esModule: boolean; -export var extractKeysAndInclude: (selectedFields: any) => { - keys: string; - include: string; -}; -export function load(parseGraphQLSchema: any, parseClass: any, parseClassConfig: any): void; diff --git a/types/GraphQL/loaders/schemaDirectives.d.ts b/types/GraphQL/loaders/schemaDirectives.d.ts deleted file mode 100644 index 2eee780c4b..0000000000 --- a/types/GraphQL/loaders/schemaDirectives.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export var __esModule: boolean; -export const definitions: any; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/schemaMutations.d.ts b/types/GraphQL/loaders/schemaMutations.d.ts deleted file mode 100644 index 7fa503a616..0000000000 --- a/types/GraphQL/loaders/schemaMutations.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/schemaQueries.d.ts b/types/GraphQL/loaders/schemaQueries.d.ts deleted file mode 100644 index 98970f1a92..0000000000 --- a/types/GraphQL/loaders/schemaQueries.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export var __esModule: boolean; -export function getClass(name: any, schema: any): Promise; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/schemaTypes.d.ts b/types/GraphQL/loaders/schemaTypes.d.ts deleted file mode 100644 index 315430f111..0000000000 --- a/types/GraphQL/loaders/schemaTypes.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -export var __esModule: boolean; -export namespace SCHEMA_FIELD_NAME_ATT { - const description: string; - const type: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; -} -export const SCHEMA_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_STRING_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_STRING_FIELD: any; -export const SCHEMA_NUMBER_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_NUMBER_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_BOOLEAN_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_BOOLEAN_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_ARRAY_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_ARRAY_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_OBJECT_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_OBJECT_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_DATE_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_DATE_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_FILE_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_FILE_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_GEO_POINT_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_GEO_POINT_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_POLYGON_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_POLYGON_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_BYTES_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_BYTES_FIELD: _graphql.GraphQLObjectType; -export namespace TARGET_CLASS_ATT { - const description_1: string; - export { description_1 as description }; - const type_1: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_1 as type }; -} -export const SCHEMA_POINTER_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_POINTER_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_RELATION_FIELD_INPUT: _graphql.GraphQLInputObjectType; -export const SCHEMA_RELATION_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_ACL_FIELD: _graphql.GraphQLObjectType; -export const SCHEMA_FIELDS_INPUT: _graphql.GraphQLInputObjectType; -export namespace CLASS_NAME_ATT { - const description_2: string; - export { description_2 as description }; - const type_2: _graphql.GraphQLNonNull<_graphql.GraphQLNullableType>; - export { type_2 as type }; -} -export const CLASS: _graphql.GraphQLObjectType; -export function load(parseGraphQLSchema: any): void; -import _graphql = require("graphql"); diff --git a/types/GraphQL/loaders/usersMutations.d.ts b/types/GraphQL/loaders/usersMutations.d.ts deleted file mode 100644 index 7fa503a616..0000000000 --- a/types/GraphQL/loaders/usersMutations.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/loaders/usersQueries.d.ts b/types/GraphQL/loaders/usersQueries.d.ts deleted file mode 100644 index 950eefd74c..0000000000 --- a/types/GraphQL/loaders/usersQueries.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export function getUserFromSessionToken(context: any, queryInfo: any, keysPrefix: any, userId: any): Promise<{ - sessionToken: any; - user?: undefined; -} | { - sessionToken: any; - user: any; -}>; -export function load(parseGraphQLSchema: any): void; diff --git a/types/GraphQL/parseGraphQLUtils.d.ts b/types/GraphQL/parseGraphQLUtils.d.ts deleted file mode 100644 index 506c4597fb..0000000000 --- a/types/GraphQL/parseGraphQLUtils.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export function enforceMasterKeyAccess(auth: any): void; -export function toGraphQLError(error: any): _apolloServerCore.ApolloError; -export function extractKeysAndInclude(selectedFields: any): { - keys: string; - include: string; -}; -export function getParseClassMutationConfig(parseClassConfig: any): any; -import _apolloServerCore = require("apollo-server-core"); diff --git a/types/GraphQL/transformers/className.d.ts b/types/GraphQL/transformers/className.d.ts deleted file mode 100644 index 618275fcaf..0000000000 --- a/types/GraphQL/transformers/className.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function transformClassNameToGraphQL(className: any): any; diff --git a/types/GraphQL/transformers/constraintType.d.ts b/types/GraphQL/transformers/constraintType.d.ts deleted file mode 100644 index 170a8322cb..0000000000 --- a/types/GraphQL/transformers/constraintType.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function transformConstraintTypeToGraphQL(parseType: any, targetClass: any, parseClassTypes: any, fieldName: any): any; diff --git a/types/GraphQL/transformers/inputType.d.ts b/types/GraphQL/transformers/inputType.d.ts deleted file mode 100644 index 0e497a5609..0000000000 --- a/types/GraphQL/transformers/inputType.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function transformInputTypeToGraphQL(parseType: any, targetClass: any, parseClassTypes: any): any; diff --git a/types/GraphQL/transformers/mutation.d.ts b/types/GraphQL/transformers/mutation.d.ts deleted file mode 100644 index b17f74c629..0000000000 --- a/types/GraphQL/transformers/mutation.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export var __esModule: boolean; -export function transformTypes(inputType: any, fields: any, { className, parseGraphQLSchema, req }: { - className: any; - parseGraphQLSchema: any; - req: any; -}): Promise; diff --git a/types/GraphQL/transformers/outputType.d.ts b/types/GraphQL/transformers/outputType.d.ts deleted file mode 100644 index 0472e08c57..0000000000 --- a/types/GraphQL/transformers/outputType.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function transformOutputTypeToGraphQL(parseType: any, targetClass: any, parseClassTypes: any): any; diff --git a/types/GraphQL/transformers/query.d.ts b/types/GraphQL/transformers/query.d.ts deleted file mode 100644 index 66904e8d41..0000000000 --- a/types/GraphQL/transformers/query.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export var __esModule: boolean; -export function transformQueryConstraintInputToParse(constraints: any, parentFieldName: any, className: any, parentConstraints: any, parseClasses: any): void; -export function transformQueryInputToParse(constraints: any, className: any, parseClasses: any): void; diff --git a/types/GraphQL/transformers/schemaFields.d.ts b/types/GraphQL/transformers/schemaFields.d.ts deleted file mode 100644 index 3e541eca8b..0000000000 --- a/types/GraphQL/transformers/schemaFields.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -export function transformToParse(graphQLSchemaFields: any, existingFields: any): {}; -export function transformToGraphQL(parseSchemaFields: any): { - name: string; - type: any; - targetClassName: any; -}[]; diff --git a/types/KeyPromiseQueue.d.ts b/types/KeyPromiseQueue.d.ts deleted file mode 100644 index 98bae397e0..0000000000 --- a/types/KeyPromiseQueue.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -export class KeyPromiseQueue { - queue: {}; - enqueue(key: any, operation: any): any; - beforeOp(key: any): any; - afterOp(key: any): void; -} diff --git a/types/LiveQuery/Client.d.ts b/types/LiveQuery/Client.d.ts deleted file mode 100644 index b624d82d7b..0000000000 --- a/types/LiveQuery/Client.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export var __esModule: boolean; -export class Client { - static pushResponse(parseWebSocket: any, message: any): void; - static pushError(parseWebSocket: any, code: any, error: any, reconnect?: boolean, requestId?: any): void; - constructor(id: any, parseWebSocket: any, hasMasterKey: boolean, sessionToken: any, installationId: any); - id: any; - parseWebSocket: any; - hasMasterKey: boolean; - sessionToken: any; - installationId: any; - roles: any[]; - subscriptionInfos: Map; - pushConnect: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushSubscribe: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushUnsubscribe: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushCreate: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushEnter: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushUpdate: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushDelete: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - pushLeave: (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - addSubscriptionInfo(requestId: any, subscriptionInfo: any): void; - getSubscriptionInfo(requestId: any): any; - deleteSubscriptionInfo(requestId: any): boolean; - _pushEvent(type: any): (subscriptionId: any, parseObjectJSON: any, parseOriginalObjectJSON: any) => void; - _toJSONWithFields(parseObjectJSON: any, fields: any): any; -} diff --git a/types/LiveQuery/Id.d.ts b/types/LiveQuery/Id.d.ts deleted file mode 100644 index a5d4c9da04..0000000000 --- a/types/LiveQuery/Id.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export = Id; -declare class Id { - static fromString(str: any): Id; - constructor(className: any, objectId: any); - className: any; - objectId: any; - toString(): string; -} diff --git a/types/LiveQuery/ParseCloudCodePublisher.d.ts b/types/LiveQuery/ParseCloudCodePublisher.d.ts deleted file mode 100644 index 40e060090f..0000000000 --- a/types/LiveQuery/ParseCloudCodePublisher.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export var __esModule: boolean; -export class ParseCloudCodePublisher { - constructor(config?: {}); - parsePublisher: any; - onCloudCodeAfterSave(request: any): void; - onCloudCodeAfterDelete(request: any): void; - _onCloudCodeMessage(type: any, request: any): void; -} diff --git a/types/LiveQuery/ParseLiveQueryServer.d.ts b/types/LiveQuery/ParseLiveQueryServer.d.ts deleted file mode 100644 index d9f70fdc8f..0000000000 --- a/types/LiveQuery/ParseLiveQueryServer.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export var __esModule: boolean; -export class ParseLiveQueryServer { - constructor(server: any, config?: {}, parseServerConfig?: {}); - server: any; - clients: Map; - subscriptions: Map; - config: {}; - keyPairs: Map; - cacheController: import("../Controllers/CacheController").CacheController; - authCache: any; - parseWebSocketServer: _ParseWebSocketServer.ParseWebSocketServer; - subscriber: any; - _inflateParseObject(message: any): void; - _onAfterDelete(message: any): Promise; - _onAfterSave(message: any): Promise; - _onConnect(parseWebsocket: any): void; - _matchesSubscription(parseObject: any, subscription: any): any; - getAuthForSessionToken(sessionToken: any): any; - _matchesCLP(classLevelPermissions: any, object: any, client: any, requestId: any, op: any): Promise; - _getCLPOperation(query: any): "get" | "find"; - _verifyACL(acl: any, token: any): Promise; - _matchesACL(acl: any, client: any, requestId: any): Promise; - _handleConnect(parseWebsocket: any, request: any): Promise; - _hasMasterKey(request: any, validKeyPairs: any): boolean; - _validateKeys(request: any, validKeyPairs: any): boolean; - _handleSubscribe(parseWebsocket: any, request: any): Promise; - _handleUpdateSubscription(parseWebsocket: any, request: any): void; - _handleUnsubscribe(parseWebsocket: any, request: any, notifyClient?: boolean): void; -} -import _ParseWebSocketServer = require("./ParseWebSocketServer"); diff --git a/types/LiveQuery/ParsePubSub.d.ts b/types/LiveQuery/ParsePubSub.d.ts deleted file mode 100644 index 002be3b64b..0000000000 --- a/types/LiveQuery/ParsePubSub.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export var __esModule: boolean; -export namespace ParsePubSub { - function createPublisher(config: any): any; - function createSubscriber(config: any): any; -} diff --git a/types/LiveQuery/ParseWebSocketServer.d.ts b/types/LiveQuery/ParseWebSocketServer.d.ts deleted file mode 100644 index 75b60d6de2..0000000000 --- a/types/LiveQuery/ParseWebSocketServer.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export class ParseWebSocketServer { - constructor(server: any, onConnect: any, config: any); - server: any; - close(): void; -} -declare const ParseWebSocket_base: any; -export class ParseWebSocket extends ParseWebSocket_base { - [x: string]: any; - constructor(ws: any); - ws: any; - send(message: any): void; -} -export {}; diff --git a/types/LiveQuery/QueryTools.d.ts b/types/LiveQuery/QueryTools.d.ts deleted file mode 100644 index f1ac02d280..0000000000 --- a/types/LiveQuery/QueryTools.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Generate a hash from a query, with unique fields for columns, values, order, - * skip, and limit. - */ -export function queryHash(query: any): string; -/** - * matchesQuery -- Determines if an object would be returned by a Parse Query - * It's a lightweight, where-clause only implementation of a full query engine. - * Since we find queries that match objects, rather than objects that match - * queries, we can avoid building a full-blown query tool. - */ -export function matchesQuery(object: any, query: any): any; diff --git a/types/LiveQuery/RequestSchema.d.ts b/types/LiveQuery/RequestSchema.d.ts deleted file mode 100644 index 0fb5082c89..0000000000 --- a/types/LiveQuery/RequestSchema.d.ts +++ /dev/null @@ -1,206 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare namespace _default { - export { general }; - export { connect }; - export { subscribe }; - export { update }; - export { unsubscribe }; -} -declare namespace general { - const title: string; - const type: string; - namespace properties { - namespace op { - const type_1: string; - export { type_1 as type }; - const _enum: string[]; - export { _enum as enum }; - } - } - const required: string[]; -} -declare namespace connect { - const title_1: string; - export { title_1 as title }; - const type_2: string; - export { type_2 as type }; - export namespace properties_1 { - const op_1: string; - export { op_1 as op }; - export namespace applicationId { - const type_3: string; - export { type_3 as type }; - } - export namespace javascriptKey { - const type_4: string; - export { type_4 as type }; - } - export namespace masterKey { - const type_5: string; - export { type_5 as type }; - } - export namespace clientKey { - const type_6: string; - export { type_6 as type }; - } - export namespace windowsKey { - const type_7: string; - export { type_7 as type }; - } - export namespace restAPIKey { - const type_8: string; - export { type_8 as type }; - } - export namespace sessionToken { - const type_9: string; - export { type_9 as type }; - } - export namespace installationId { - const type_10: string; - export { type_10 as type }; - } - } - export { properties_1 as properties }; - const required_1: string[]; - export { required_1 as required }; - export const additionalProperties: boolean; -} -declare namespace subscribe { - const title_2: string; - export { title_2 as title }; - const type_11: string; - export { type_11 as type }; - export namespace properties_2 { - const op_2: string; - export { op_2 as op }; - export namespace requestId { - const type_12: string; - export { type_12 as type }; - } - export namespace query { - const title_3: string; - export { title_3 as title }; - const type_13: string; - export { type_13 as type }; - export namespace properties_3 { - namespace className { - const type_14: string; - export { type_14 as type }; - } - namespace where { - const type_15: string; - export { type_15 as type }; - } - namespace fields { - const type_16: string; - export { type_16 as type }; - export namespace items { - const type_17: string; - export { type_17 as type }; - } - export const minItems: number; - export const uniqueItems: boolean; - } - } - export { properties_3 as properties }; - const required_2: string[]; - export { required_2 as required }; - const additionalProperties_1: boolean; - export { additionalProperties_1 as additionalProperties }; - } - export namespace sessionToken_1 { - const type_18: string; - export { type_18 as type }; - } - export { sessionToken_1 as sessionToken }; - } - export { properties_2 as properties }; - const required_3: string[]; - export { required_3 as required }; - const additionalProperties_2: boolean; - export { additionalProperties_2 as additionalProperties }; -} -declare namespace update { - const title_4: string; - export { title_4 as title }; - const type_19: string; - export { type_19 as type }; - export namespace properties_4 { - const op_3: string; - export { op_3 as op }; - export namespace requestId_1 { - const type_20: string; - export { type_20 as type }; - } - export { requestId_1 as requestId }; - export namespace query_1 { - const title_5: string; - export { title_5 as title }; - const type_21: string; - export { type_21 as type }; - export namespace properties_5 { - export namespace className_1 { - const type_22: string; - export { type_22 as type }; - } - export { className_1 as className }; - export namespace where_1 { - const type_23: string; - export { type_23 as type }; - } - export { where_1 as where }; - export namespace fields_1 { - const type_24: string; - export { type_24 as type }; - export namespace items_1 { - const type_25: string; - export { type_25 as type }; - } - export { items_1 as items }; - const minItems_1: number; - export { minItems_1 as minItems }; - const uniqueItems_1: boolean; - export { uniqueItems_1 as uniqueItems }; - } - export { fields_1 as fields }; - } - export { properties_5 as properties }; - const required_4: string[]; - export { required_4 as required }; - const additionalProperties_3: boolean; - export { additionalProperties_3 as additionalProperties }; - } - export { query_1 as query }; - export namespace sessionToken_2 { - const type_26: string; - export { type_26 as type }; - } - export { sessionToken_2 as sessionToken }; - } - export { properties_4 as properties }; - const required_5: string[]; - export { required_5 as required }; - const additionalProperties_4: boolean; - export { additionalProperties_4 as additionalProperties }; -} -declare namespace unsubscribe { - const title_6: string; - export { title_6 as title }; - const type_27: string; - export { type_27 as type }; - export namespace properties_6 { - const op_4: string; - export { op_4 as op }; - export namespace requestId_2 { - const type_28: string; - export { type_28 as type }; - } - export { requestId_2 as requestId }; - } - export { properties_6 as properties }; - const required_6: string[]; - export { required_6 as required }; - const additionalProperties_5: boolean; - export { additionalProperties_5 as additionalProperties }; -} diff --git a/types/LiveQuery/SessionTokenCache.d.ts b/types/LiveQuery/SessionTokenCache.d.ts deleted file mode 100644 index 17cd259300..0000000000 --- a/types/LiveQuery/SessionTokenCache.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export var __esModule: boolean; -export class SessionTokenCache { - constructor(timeout?: number, maxSize?: number); - cache: any; - getUserId(sessionToken: any): any; -} diff --git a/types/LiveQuery/Subscription.d.ts b/types/LiveQuery/Subscription.d.ts deleted file mode 100644 index 3c02b21522..0000000000 --- a/types/LiveQuery/Subscription.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export var __esModule: boolean; -export class Subscription { - constructor(className: any, query: any, queryHash: any); - className: any; - query: any; - hash: any; - clientRequestIds: Map; - addClientSubscription(clientId: any, requestId: any): void; - deleteClientSubscription(clientId: any, requestId: any): void; - hasSubscribingClient(): boolean; -} diff --git a/types/LiveQuery/equalObjects.d.ts b/types/LiveQuery/equalObjects.d.ts deleted file mode 100644 index dc581ec1b1..0000000000 --- a/types/LiveQuery/equalObjects.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export = equalObjects; -/** - * Determines whether two objects represent the same primitive, special Parse - * type, or full Parse Object. - */ -declare function equalObjects(a: any, b: any): boolean; diff --git a/types/Options/Definitions.d.ts b/types/Options/Definitions.d.ts deleted file mode 100644 index dbd94e1c70..0000000000 --- a/types/Options/Definitions.d.ts +++ /dev/null @@ -1,1197 +0,0 @@ -export namespace ParseServerOptions { - namespace accountLockout { - const env: string; - const help: string; - const action: typeof parsers.objectParser; - } - namespace allowClientClassCreation { - const env_1: string; - export { env_1 as env }; - const help_1: string; - export { help_1 as help }; - const action_1: typeof parsers.booleanParser; - export { action_1 as action }; - const _default: boolean; - export { _default as default }; - } - namespace allowCustomObjectId { - const env_2: string; - export { env_2 as env }; - const help_2: string; - export { help_2 as help }; - const action_2: typeof parsers.booleanParser; - export { action_2 as action }; - const _default_1: boolean; - export { _default_1 as default }; - } - namespace allowHeaders { - const env_3: string; - export { env_3 as env }; - const help_3: string; - export { help_3 as help }; - const action_3: typeof parsers.arrayParser; - export { action_3 as action }; - } - namespace allowOrigin { - const env_4: string; - export { env_4 as env }; - const help_4: string; - export { help_4 as help }; - } - namespace analyticsAdapter { - const env_5: string; - export { env_5 as env }; - const help_5: string; - export { help_5 as help }; - const action_4: typeof parsers.moduleOrObjectParser; - export { action_4 as action }; - } - namespace appId { - const env_6: string; - export { env_6 as env }; - const help_6: string; - export { help_6 as help }; - export const required: boolean; - } - namespace appName { - const env_7: string; - export { env_7 as env }; - const help_7: string; - export { help_7 as help }; - } - namespace auth { - const env_8: string; - export { env_8 as env }; - const help_8: string; - export { help_8 as help }; - const action_5: typeof parsers.objectParser; - export { action_5 as action }; - } - namespace cacheAdapter { - const env_9: string; - export { env_9 as env }; - const help_9: string; - export { help_9 as help }; - const action_6: typeof parsers.moduleOrObjectParser; - export { action_6 as action }; - } - namespace cacheMaxSize { - const env_10: string; - export { env_10 as env }; - const help_10: string; - export { help_10 as help }; - const action_7: (opt: any) => number; - export { action_7 as action }; - const _default_2: number; - export { _default_2 as default }; - } - namespace cacheTTL { - const env_11: string; - export { env_11 as env }; - const help_11: string; - export { help_11 as help }; - const action_8: (opt: any) => number; - export { action_8 as action }; - const _default_3: number; - export { _default_3 as default }; - } - namespace clientKey { - const env_12: string; - export { env_12 as env }; - const help_12: string; - export { help_12 as help }; - } - namespace cloud { - const env_13: string; - export { env_13 as env }; - const help_13: string; - export { help_13 as help }; - } - namespace cluster { - const env_14: string; - export { env_14 as env }; - const help_14: string; - export { help_14 as help }; - const action_9: any; - export { action_9 as action }; - } - namespace collectionPrefix { - const env_15: string; - export { env_15 as env }; - const help_15: string; - export { help_15 as help }; - const _default_4: string; - export { _default_4 as default }; - } - namespace customPages { - const env_16: string; - export { env_16 as env }; - const help_16: string; - export { help_16 as help }; - const action_10: typeof parsers.objectParser; - export { action_10 as action }; - const _default_5: {}; - export { _default_5 as default }; - } - namespace databaseAdapter { - const env_17: string; - export { env_17 as env }; - const help_17: string; - export { help_17 as help }; - const action_11: typeof parsers.moduleOrObjectParser; - export { action_11 as action }; - } - namespace databaseOptions { - const env_18: string; - export { env_18 as env }; - const help_18: string; - export { help_18 as help }; - const action_12: typeof parsers.objectParser; - export { action_12 as action }; - } - namespace databaseURI { - const env_19: string; - export { env_19 as env }; - const help_19: string; - export { help_19 as help }; - const required_1: boolean; - export { required_1 as required }; - const _default_6: string; - export { _default_6 as default }; - } - namespace directAccess { - const env_20: string; - export { env_20 as env }; - const help_20: string; - export { help_20 as help }; - const action_13: typeof parsers.booleanParser; - export { action_13 as action }; - const _default_7: boolean; - export { _default_7 as default }; - } - namespace dotNetKey { - const env_21: string; - export { env_21 as env }; - const help_21: string; - export { help_21 as help }; - } - namespace emailAdapter { - const env_22: string; - export { env_22 as env }; - const help_22: string; - export { help_22 as help }; - const action_14: typeof parsers.moduleOrObjectParser; - export { action_14 as action }; - } - namespace emailVerifyTokenReuseIfValid { - const env_23: string; - export { env_23 as env }; - const help_23: string; - export { help_23 as help }; - const action_15: typeof parsers.booleanParser; - export { action_15 as action }; - const _default_8: boolean; - export { _default_8 as default }; - } - namespace emailVerifyTokenValidityDuration { - const env_24: string; - export { env_24 as env }; - const help_24: string; - export { help_24 as help }; - const action_16: (opt: any) => number; - export { action_16 as action }; - } - namespace enableAnonymousUsers { - const env_25: string; - export { env_25 as env }; - const help_25: string; - export { help_25 as help }; - const action_17: typeof parsers.booleanParser; - export { action_17 as action }; - const _default_9: boolean; - export { _default_9 as default }; - } - namespace enableExpressErrorHandler { - const env_26: string; - export { env_26 as env }; - const help_26: string; - export { help_26 as help }; - const action_18: typeof parsers.booleanParser; - export { action_18 as action }; - const _default_10: boolean; - export { _default_10 as default }; - } - namespace encryptionKey { - const env_27: string; - export { env_27 as env }; - const help_27: string; - export { help_27 as help }; - } - namespace expireInactiveSessions { - const env_28: string; - export { env_28 as env }; - const help_28: string; - export { help_28 as help }; - const action_19: typeof parsers.booleanParser; - export { action_19 as action }; - const _default_11: boolean; - export { _default_11 as default }; - } - namespace fileKey { - const env_29: string; - export { env_29 as env }; - const help_29: string; - export { help_29 as help }; - } - namespace filesAdapter { - const env_30: string; - export { env_30 as env }; - const help_30: string; - export { help_30 as help }; - const action_20: typeof parsers.moduleOrObjectParser; - export { action_20 as action }; - } - namespace fileUpload { - const env_31: string; - export { env_31 as env }; - const help_31: string; - export { help_31 as help }; - const action_21: typeof parsers.objectParser; - export { action_21 as action }; - const _default_12: {}; - export { _default_12 as default }; - } - namespace graphQLPath { - const env_32: string; - export { env_32 as env }; - const help_32: string; - export { help_32 as help }; - const _default_13: string; - export { _default_13 as default }; - } - namespace graphQLSchema { - const env_33: string; - export { env_33 as env }; - const help_33: string; - export { help_33 as help }; - } - namespace host { - const env_34: string; - export { env_34 as env }; - const help_34: string; - export { help_34 as help }; - const _default_14: string; - export { _default_14 as default }; - } - namespace idempotencyOptions { - const env_35: string; - export { env_35 as env }; - const help_35: string; - export { help_35 as help }; - const action_22: typeof parsers.objectParser; - export { action_22 as action }; - const _default_15: {}; - export { _default_15 as default }; - } - namespace javascriptKey { - const env_36: string; - export { env_36 as env }; - const help_36: string; - export { help_36 as help }; - } - namespace jsonLogs { - const env_37: string; - export { env_37 as env }; - const help_37: string; - export { help_37 as help }; - const action_23: typeof parsers.booleanParser; - export { action_23 as action }; - } - namespace liveQuery { - const env_38: string; - export { env_38 as env }; - const help_38: string; - export { help_38 as help }; - const action_24: typeof parsers.objectParser; - export { action_24 as action }; - } - namespace liveQueryServerOptions { - const env_39: string; - export { env_39 as env }; - const help_39: string; - export { help_39 as help }; - const action_25: typeof parsers.objectParser; - export { action_25 as action }; - } - namespace loggerAdapter { - const env_40: string; - export { env_40 as env }; - const help_40: string; - export { help_40 as help }; - const action_26: typeof parsers.moduleOrObjectParser; - export { action_26 as action }; - } - namespace logLevel { - const env_41: string; - export { env_41 as env }; - const help_41: string; - export { help_41 as help }; - } - namespace logsFolder { - const env_42: string; - export { env_42 as env }; - const help_42: string; - export { help_42 as help }; - const _default_16: string; - export { _default_16 as default }; - } - namespace masterKey { - const env_43: string; - export { env_43 as env }; - const help_43: string; - export { help_43 as help }; - const required_2: boolean; - export { required_2 as required }; - } - namespace masterKeyIps { - const env_44: string; - export { env_44 as env }; - const help_44: string; - export { help_44 as help }; - const action_27: typeof parsers.arrayParser; - export { action_27 as action }; - const _default_17: any[]; - export { _default_17 as default }; - } - namespace maxLimit { - const env_45: string; - export { env_45 as env }; - const help_45: string; - export { help_45 as help }; - const action_28: (opt: any) => number; - export { action_28 as action }; - } - namespace maxLogFiles { - const env_46: string; - export { env_46 as env }; - const help_46: string; - export { help_46 as help }; - const action_29: typeof parsers.objectParser; - export { action_29 as action }; - } - namespace maxUploadSize { - const env_47: string; - export { env_47 as env }; - const help_47: string; - export { help_47 as help }; - const _default_18: string; - export { _default_18 as default }; - } - namespace middleware { - const env_48: string; - export { env_48 as env }; - const help_48: string; - export { help_48 as help }; - } - namespace mountGraphQL { - const env_49: string; - export { env_49 as env }; - const help_49: string; - export { help_49 as help }; - const action_30: typeof parsers.booleanParser; - export { action_30 as action }; - const _default_19: boolean; - export { _default_19 as default }; - } - namespace mountPath { - const env_50: string; - export { env_50 as env }; - const help_50: string; - export { help_50 as help }; - const _default_20: string; - export { _default_20 as default }; - } - namespace mountPlayground { - const env_51: string; - export { env_51 as env }; - const help_51: string; - export { help_51 as help }; - const action_31: typeof parsers.booleanParser; - export { action_31 as action }; - const _default_21: boolean; - export { _default_21 as default }; - } - namespace objectIdSize { - const env_52: string; - export { env_52 as env }; - const help_52: string; - export { help_52 as help }; - const action_32: (opt: any) => number; - export { action_32 as action }; - const _default_22: number; - export { _default_22 as default }; - } - namespace pages { - const env_53: string; - export { env_53 as env }; - const help_53: string; - export { help_53 as help }; - const action_33: typeof parsers.objectParser; - export { action_33 as action }; - const _default_23: {}; - export { _default_23 as default }; - } - namespace passwordPolicy { - const env_54: string; - export { env_54 as env }; - const help_54: string; - export { help_54 as help }; - const action_34: typeof parsers.objectParser; - export { action_34 as action }; - } - namespace playgroundPath { - const env_55: string; - export { env_55 as env }; - const help_55: string; - export { help_55 as help }; - const _default_24: string; - export { _default_24 as default }; - } - namespace port { - const env_56: string; - export { env_56 as env }; - const help_56: string; - export { help_56 as help }; - const action_35: (opt: any) => number; - export { action_35 as action }; - const _default_25: number; - export { _default_25 as default }; - } - namespace preserveFileName { - const env_57: string; - export { env_57 as env }; - const help_57: string; - export { help_57 as help }; - const action_36: typeof parsers.booleanParser; - export { action_36 as action }; - const _default_26: boolean; - export { _default_26 as default }; - } - namespace preventLoginWithUnverifiedEmail { - const env_58: string; - export { env_58 as env }; - const help_58: string; - export { help_58 as help }; - const action_37: typeof parsers.booleanParser; - export { action_37 as action }; - const _default_27: boolean; - export { _default_27 as default }; - } - namespace protectedFields { - const env_59: string; - export { env_59 as env }; - const help_59: string; - export { help_59 as help }; - const action_38: typeof parsers.objectParser; - export { action_38 as action }; - namespace _default_28 { - const _User: { - '*': string[]; - }; - } - export { _default_28 as default }; - } - namespace publicServerURL { - const env_60: string; - export { env_60 as env }; - const help_60: string; - export { help_60 as help }; - } - namespace push { - const env_61: string; - export { env_61 as env }; - const help_61: string; - export { help_61 as help }; - const action_39: typeof parsers.objectParser; - export { action_39 as action }; - } - namespace readOnlyMasterKey { - const env_62: string; - export { env_62 as env }; - const help_62: string; - export { help_62 as help }; - } - namespace restAPIKey { - const env_63: string; - export { env_63 as env }; - const help_63: string; - export { help_63 as help }; - } - namespace revokeSessionOnPasswordReset { - const env_64: string; - export { env_64 as env }; - const help_64: string; - export { help_64 as help }; - const action_40: typeof parsers.booleanParser; - export { action_40 as action }; - const _default_29: boolean; - export { _default_29 as default }; - } - namespace scheduledPush { - const env_65: string; - export { env_65 as env }; - const help_65: string; - export { help_65 as help }; - const action_41: typeof parsers.booleanParser; - export { action_41 as action }; - const _default_30: boolean; - export { _default_30 as default }; - } - namespace security { - const env_66: string; - export { env_66 as env }; - const help_66: string; - export { help_66 as help }; - const action_42: typeof parsers.objectParser; - export { action_42 as action }; - const _default_31: {}; - export { _default_31 as default }; - } - namespace serverCloseComplete { - const env_67: string; - export { env_67 as env }; - const help_67: string; - export { help_67 as help }; - } - namespace serverStartComplete { - const env_68: string; - export { env_68 as env }; - const help_68: string; - export { help_68 as help }; - } - namespace serverURL { - const env_69: string; - export { env_69 as env }; - const help_69: string; - export { help_69 as help }; - const required_3: boolean; - export { required_3 as required }; - } - namespace sessionLength { - const env_70: string; - export { env_70 as env }; - const help_70: string; - export { help_70 as help }; - const action_43: (opt: any) => number; - export { action_43 as action }; - const _default_32: number; - export { _default_32 as default }; - } - namespace silent { - const env_71: string; - export { env_71 as env }; - const help_71: string; - export { help_71 as help }; - const action_44: typeof parsers.booleanParser; - export { action_44 as action }; - } - namespace startLiveQueryServer { - const env_72: string; - export { env_72 as env }; - const help_72: string; - export { help_72 as help }; - const action_45: typeof parsers.booleanParser; - export { action_45 as action }; - } - namespace userSensitiveFields { - const env_73: string; - export { env_73 as env }; - const help_73: string; - export { help_73 as help }; - const action_46: typeof parsers.arrayParser; - export { action_46 as action }; - } - namespace verbose { - const env_74: string; - export { env_74 as env }; - const help_74: string; - export { help_74 as help }; - const action_47: typeof parsers.booleanParser; - export { action_47 as action }; - } - namespace verifyUserEmails { - const env_75: string; - export { env_75 as env }; - const help_75: string; - export { help_75 as help }; - const action_48: typeof parsers.booleanParser; - export { action_48 as action }; - const _default_33: boolean; - export { _default_33 as default }; - } - namespace webhookKey { - const env_76: string; - export { env_76 as env }; - const help_76: string; - export { help_76 as help }; - } -} -export namespace SecurityOptions { - namespace checkGroups { - const env_77: string; - export { env_77 as env }; - const help_77: string; - export { help_77 as help }; - const action_49: typeof parsers.arrayParser; - export { action_49 as action }; - } - namespace enableCheck { - const env_78: string; - export { env_78 as env }; - const help_78: string; - export { help_78 as help }; - const action_50: typeof parsers.booleanParser; - export { action_50 as action }; - const _default_34: boolean; - export { _default_34 as default }; - } - namespace enableCheckLog { - const env_79: string; - export { env_79 as env }; - const help_79: string; - export { help_79 as help }; - const action_51: typeof parsers.booleanParser; - export { action_51 as action }; - const _default_35: boolean; - export { _default_35 as default }; - } -} -export namespace PagesOptions { - namespace customRoutes { - const env_80: string; - export { env_80 as env }; - const help_80: string; - export { help_80 as help }; - const action_52: typeof parsers.arrayParser; - export { action_52 as action }; - const _default_36: any[]; - export { _default_36 as default }; - } - namespace customUrls { - const env_81: string; - export { env_81 as env }; - const help_81: string; - export { help_81 as help }; - const action_53: typeof parsers.objectParser; - export { action_53 as action }; - const _default_37: {}; - export { _default_37 as default }; - } - namespace enableLocalization { - const env_82: string; - export { env_82 as env }; - const help_82: string; - export { help_82 as help }; - const action_54: typeof parsers.booleanParser; - export { action_54 as action }; - const _default_38: boolean; - export { _default_38 as default }; - } - namespace enableRouter { - const env_83: string; - export { env_83 as env }; - const help_83: string; - export { help_83 as help }; - const action_55: typeof parsers.booleanParser; - export { action_55 as action }; - const _default_39: boolean; - export { _default_39 as default }; - } - namespace forceRedirect { - const env_84: string; - export { env_84 as env }; - const help_84: string; - export { help_84 as help }; - const action_56: typeof parsers.booleanParser; - export { action_56 as action }; - const _default_40: boolean; - export { _default_40 as default }; - } - namespace localizationFallbackLocale { - const env_85: string; - export { env_85 as env }; - const help_85: string; - export { help_85 as help }; - const _default_41: string; - export { _default_41 as default }; - } - namespace localizationJsonPath { - const env_86: string; - export { env_86 as env }; - const help_86: string; - export { help_86 as help }; - } - namespace pagesEndpoint { - const env_87: string; - export { env_87 as env }; - const help_87: string; - export { help_87 as help }; - const _default_42: string; - export { _default_42 as default }; - } - namespace pagesPath { - const env_88: string; - export { env_88 as env }; - const help_88: string; - export { help_88 as help }; - const _default_43: string; - export { _default_43 as default }; - } - namespace placeholders { - const env_89: string; - export { env_89 as env }; - const help_89: string; - export { help_89 as help }; - const action_57: typeof parsers.objectParser; - export { action_57 as action }; - const _default_44: {}; - export { _default_44 as default }; - } -} -export namespace PagesRoute { - namespace handler { - const env_90: string; - export { env_90 as env }; - const help_90: string; - export { help_90 as help }; - const required_4: boolean; - export { required_4 as required }; - } - namespace method { - const env_91: string; - export { env_91 as env }; - const help_91: string; - export { help_91 as help }; - const required_5: boolean; - export { required_5 as required }; - } - namespace path { - const env_92: string; - export { env_92 as env }; - const help_92: string; - export { help_92 as help }; - const required_6: boolean; - export { required_6 as required }; - } -} -export namespace PagesCustomUrlsOptions { - namespace emailVerificationLinkExpired { - const env_93: string; - export { env_93 as env }; - const help_93: string; - export { help_93 as help }; - } - namespace emailVerificationLinkInvalid { - const env_94: string; - export { env_94 as env }; - const help_94: string; - export { help_94 as help }; - } - namespace emailVerificationSendFail { - const env_95: string; - export { env_95 as env }; - const help_95: string; - export { help_95 as help }; - } - namespace emailVerificationSendSuccess { - const env_96: string; - export { env_96 as env }; - const help_96: string; - export { help_96 as help }; - } - namespace emailVerificationSuccess { - const env_97: string; - export { env_97 as env }; - const help_97: string; - export { help_97 as help }; - } - namespace passwordReset { - const env_98: string; - export { env_98 as env }; - const help_98: string; - export { help_98 as help }; - } - namespace passwordResetLinkInvalid { - const env_99: string; - export { env_99 as env }; - const help_99: string; - export { help_99 as help }; - } - namespace passwordResetSuccess { - const env_100: string; - export { env_100 as env }; - const help_100: string; - export { help_100 as help }; - } -} -export namespace CustomPagesOptions { - export namespace choosePassword { - const env_101: string; - export { env_101 as env }; - const help_101: string; - export { help_101 as help }; - } - export namespace expiredVerificationLink { - const env_102: string; - export { env_102 as env }; - const help_102: string; - export { help_102 as help }; - } - export namespace invalidLink { - const env_103: string; - export { env_103 as env }; - const help_103: string; - export { help_103 as help }; - } - export namespace invalidPasswordResetLink { - const env_104: string; - export { env_104 as env }; - const help_104: string; - export { help_104 as help }; - } - export namespace invalidVerificationLink { - const env_105: string; - export { env_105 as env }; - const help_105: string; - export { help_105 as help }; - } - export namespace linkSendFail { - const env_106: string; - export { env_106 as env }; - const help_106: string; - export { help_106 as help }; - } - export namespace linkSendSuccess { - const env_107: string; - export { env_107 as env }; - const help_107: string; - export { help_107 as help }; - } - export namespace parseFrameURL { - const env_108: string; - export { env_108 as env }; - const help_108: string; - export { help_108 as help }; - } - export namespace passwordResetSuccess_1 { - const env_109: string; - export { env_109 as env }; - const help_109: string; - export { help_109 as help }; - } - export { passwordResetSuccess_1 as passwordResetSuccess }; - export namespace verifyEmailSuccess { - const env_110: string; - export { env_110 as env }; - const help_110: string; - export { help_110 as help }; - } -} -export namespace LiveQueryOptions { - namespace classNames { - const env_111: string; - export { env_111 as env }; - const help_111: string; - export { help_111 as help }; - const action_58: typeof parsers.arrayParser; - export { action_58 as action }; - } - namespace pubSubAdapter { - const env_112: string; - export { env_112 as env }; - const help_112: string; - export { help_112 as help }; - const action_59: typeof parsers.moduleOrObjectParser; - export { action_59 as action }; - } - namespace redisOptions { - const env_113: string; - export { env_113 as env }; - const help_113: string; - export { help_113 as help }; - const action_60: typeof parsers.objectParser; - export { action_60 as action }; - } - namespace redisURL { - const env_114: string; - export { env_114 as env }; - const help_114: string; - export { help_114 as help }; - } - namespace wssAdapter { - const env_115: string; - export { env_115 as env }; - const help_115: string; - export { help_115 as help }; - const action_61: typeof parsers.moduleOrObjectParser; - export { action_61 as action }; - } -} -export namespace LiveQueryServerOptions { - export namespace appId_1 { - const env_116: string; - export { env_116 as env }; - const help_116: string; - export { help_116 as help }; - } - export { appId_1 as appId }; - export namespace cacheTimeout { - const env_117: string; - export { env_117 as env }; - const help_117: string; - export { help_117 as help }; - const action_62: (opt: any) => number; - export { action_62 as action }; - } - export namespace keyPairs { - const env_118: string; - export { env_118 as env }; - const help_118: string; - export { help_118 as help }; - const action_63: typeof parsers.objectParser; - export { action_63 as action }; - } - export namespace logLevel_1 { - const env_119: string; - export { env_119 as env }; - const help_119: string; - export { help_119 as help }; - } - export { logLevel_1 as logLevel }; - export namespace masterKey_1 { - const env_120: string; - export { env_120 as env }; - const help_120: string; - export { help_120 as help }; - } - export { masterKey_1 as masterKey }; - export namespace port_1 { - const env_121: string; - export { env_121 as env }; - const help_121: string; - export { help_121 as help }; - const action_64: (opt: any) => number; - export { action_64 as action }; - const _default_45: number; - export { _default_45 as default }; - } - export { port_1 as port }; - export namespace pubSubAdapter_1 { - const env_122: string; - export { env_122 as env }; - const help_122: string; - export { help_122 as help }; - const action_65: typeof parsers.moduleOrObjectParser; - export { action_65 as action }; - } - export { pubSubAdapter_1 as pubSubAdapter }; - export namespace redisOptions_1 { - const env_123: string; - export { env_123 as env }; - const help_123: string; - export { help_123 as help }; - const action_66: typeof parsers.objectParser; - export { action_66 as action }; - } - export { redisOptions_1 as redisOptions }; - export namespace redisURL_1 { - const env_124: string; - export { env_124 as env }; - const help_124: string; - export { help_124 as help }; - } - export { redisURL_1 as redisURL }; - export namespace serverURL_1 { - const env_125: string; - export { env_125 as env }; - const help_125: string; - export { help_125 as help }; - } - export { serverURL_1 as serverURL }; - export namespace websocketTimeout { - const env_126: string; - export { env_126 as env }; - const help_126: string; - export { help_126 as help }; - const action_67: (opt: any) => number; - export { action_67 as action }; - } - export namespace wssAdapter_1 { - const env_127: string; - export { env_127 as env }; - const help_127: string; - export { help_127 as help }; - const action_68: typeof parsers.moduleOrObjectParser; - export { action_68 as action }; - } - export { wssAdapter_1 as wssAdapter }; -} -export namespace IdempotencyOptions { - namespace paths { - const env_128: string; - export { env_128 as env }; - const help_128: string; - export { help_128 as help }; - const action_69: typeof parsers.arrayParser; - export { action_69 as action }; - const _default_46: any[]; - export { _default_46 as default }; - } - namespace ttl { - const env_129: string; - export { env_129 as env }; - const help_129: string; - export { help_129 as help }; - const action_70: (opt: any) => number; - export { action_70 as action }; - const _default_47: number; - export { _default_47 as default }; - } -} -export namespace AccountLockoutOptions { - namespace duration { - const env_130: string; - export { env_130 as env }; - const help_130: string; - export { help_130 as help }; - const action_71: (opt: any) => number; - export { action_71 as action }; - } - namespace threshold { - const env_131: string; - export { env_131 as env }; - const help_131: string; - export { help_131 as help }; - const action_72: (opt: any) => number; - export { action_72 as action }; - } - namespace unlockOnPasswordReset { - const env_132: string; - export { env_132 as env }; - const help_132: string; - export { help_132 as help }; - const action_73: typeof parsers.booleanParser; - export { action_73 as action }; - const _default_48: boolean; - export { _default_48 as default }; - } -} -export namespace PasswordPolicyOptions { - namespace doNotAllowUsername { - const env_133: string; - export { env_133 as env }; - const help_133: string; - export { help_133 as help }; - const action_74: typeof parsers.booleanParser; - export { action_74 as action }; - const _default_49: boolean; - export { _default_49 as default }; - } - namespace maxPasswordAge { - const env_134: string; - export { env_134 as env }; - const help_134: string; - export { help_134 as help }; - const action_75: (opt: any) => number; - export { action_75 as action }; - } - namespace maxPasswordHistory { - const env_135: string; - export { env_135 as env }; - const help_135: string; - export { help_135 as help }; - const action_76: (opt: any) => number; - export { action_76 as action }; - } - namespace resetTokenReuseIfValid { - const env_136: string; - export { env_136 as env }; - const help_136: string; - export { help_136 as help }; - const action_77: typeof parsers.booleanParser; - export { action_77 as action }; - const _default_50: boolean; - export { _default_50 as default }; - } - namespace resetTokenValidityDuration { - const env_137: string; - export { env_137 as env }; - const help_137: string; - export { help_137 as help }; - const action_78: (opt: any) => number; - export { action_78 as action }; - } - namespace validationError { - const env_138: string; - export { env_138 as env }; - const help_138: string; - export { help_138 as help }; - } - namespace validatorCallback { - const env_139: string; - export { env_139 as env }; - const help_139: string; - export { help_139 as help }; - } - namespace validatorPattern { - const env_140: string; - export { env_140 as env }; - const help_140: string; - export { help_140 as help }; - } -} -export namespace FileUploadOptions { - namespace enableForAnonymousUser { - const env_141: string; - export { env_141 as env }; - const help_141: string; - export { help_141 as help }; - const action_79: typeof parsers.booleanParser; - export { action_79 as action }; - const _default_51: boolean; - export { _default_51 as default }; - } - namespace enableForAuthenticatedUser { - const env_142: string; - export { env_142 as env }; - const help_142: string; - export { help_142 as help }; - const action_80: typeof parsers.booleanParser; - export { action_80 as action }; - const _default_52: boolean; - export { _default_52 as default }; - } - namespace enableForPublic { - const env_143: string; - export { env_143 as env }; - const help_143: string; - export { help_143 as help }; - const action_81: typeof parsers.booleanParser; - export { action_81 as action }; - const _default_53: boolean; - export { _default_53 as default }; - } -} -export namespace DatabaseOptions { - namespace enableSchemaHooks { - const env_144: string; - export { env_144 as env }; - const help_144: string; - export { help_144 as help }; - const action_82: typeof parsers.booleanParser; - export { action_82 as action }; - const _default_54: boolean; - export { _default_54 as default }; - } -} -import parsers = require("./parsers"); diff --git a/types/Options/docs.d.ts b/types/Options/docs.d.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/types/Options/index.d.ts b/types/Options/index.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/types/Options/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/types/Options/parsers.d.ts b/types/Options/parsers.d.ts deleted file mode 100644 index 0d2b521edb..0000000000 --- a/types/Options/parsers.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function numberParser(key: any): (opt: any) => number; -export function numberOrBoolParser(key: any): (opt: any) => number | boolean; -export function nullParser(opt: any): any; -export function booleanParser(opt: any): boolean; -export function moduleOrObjectParser(opt: any): any; -export function arrayParser(opt: any): any[]; -export function objectParser(opt: any): any; diff --git a/types/Page.d.ts b/types/Page.d.ts deleted file mode 100644 index e7271ce489..0000000000 --- a/types/Page.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export var __esModule: boolean; -export default _default; -/** - * @interface Page - * Page - * Page content that is returned by PageRouter. - */ -export class Page { - /** - * @description Creates a page. - * @param {Object} params The page parameters. - * @param {String} params.id The page identifier. - * @param {String} params.defaultFile The page file name. - * @returns {Page} The page. - */ - constructor(params?: { - id: string; - defaultFile: string; - }); - _id: string; - _defaultFile: string; - set id(arg: string); - get id(): string; - set defaultFile(arg: string); - get defaultFile(): string; -} -declare var _default: typeof Page; diff --git a/types/ParseMessageQueue.d.ts b/types/ParseMessageQueue.d.ts deleted file mode 100644 index a4216f5534..0000000000 --- a/types/ParseMessageQueue.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export var __esModule: boolean; -export namespace ParseMessageQueue { - function createPublisher(config: any): any; - function createSubscriber(config: any): any; -} diff --git a/types/ParseServer.d.ts b/types/ParseServer.d.ts deleted file mode 100644 index 1bf6e886ec..0000000000 --- a/types/ParseServer.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/// -export var __esModule: boolean; -export default _default; -declare var _default: typeof ParseServer; -declare class ParseServer { - /** - * @static - * Create an express app for the parse server - * @param {Object} options let you specify the maxUploadSize when creating the express app */ - static app(options: any): import("express-serve-static-core").Express; - static promiseRouter({ appId }: { - appId: any; - }): any; - /** - * Creates a new ParseServer and starts it. - * @param {ParseServerOptions} options used to start the server - * @param {Function} callback called when the server has started - * @returns {ParseServer} the parse server instance - */ - static start(options: any, callback: Function): ParseServer; - /** - * Helper method to create a liveQuery server - * @static - * @param {Server} httpServer an optional http server to pass - * @param {LiveQueryServerOptions} config options for the liveQueryServer - * @param {ParseServerOptions} options options for the ParseServer - * @returns {ParseLiveQueryServer} the live query server instance - */ - static createLiveQueryServer(httpServer: any, config: any, options: any): any; - static verifyServerUrl(callback: any): void; - /** - * @constructor - * @param {ParseServerOptions} options the parse server initialization options - */ - constructor(options: any); - config: any; - get app(): import("express-serve-static-core").Express; - _app: import("express-serve-static-core").Express; - handleShutdown(): Promise; - /** - * starts the parse server's express app - * @param {ParseServerOptions} options to use to start the server - * @param {Function} callback called when the server has started - * @returns {ParseServer} the parse server instance - */ - start(options: any, callback: Function): ParseServer; - server: import("http").Server; - liveQueryServer: any; - expressApp: import("express-serve-static-core").Express; -} diff --git a/types/ParseServerRESTController.d.ts b/types/ParseServerRESTController.d.ts deleted file mode 100644 index f9cb9cca47..0000000000 --- a/types/ParseServerRESTController.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export var __esModule: boolean; -export default _default; -export function ParseServerRESTController(applicationId: any, router: any): { - request: (method: any, path: any, data: {}, options: {}, config: any, ...args: any[]) => any; - ajax: any; - handleError: any; -}; -declare function _default(applicationId: any, router: any): { - request: (method: any, path: any, data: {}, options: {}, config: any, ...args: any[]) => any; - ajax: any; - handleError: any; -}; diff --git a/types/PromiseRouter.d.ts b/types/PromiseRouter.d.ts deleted file mode 100644 index f96f1e97c7..0000000000 --- a/types/PromiseRouter.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export var __esModule: boolean; -export default PromiseRouter; -declare class PromiseRouter { - constructor(routes: any[], appId: any); - routes: any[]; - appId: any; - mountRoutes(): void; - merge(router: any): void; - route(method: any, path: any, ...handlers: any[]): void; - match(method: any, path: any): { - params: any; - handler: any; - }; - mountOnto(expressApp: any): any; - expressRouter(): any; - tryRouteRequest(method: any, path: any, request: any): Promise; -} diff --git a/types/Push/PushQueue.d.ts b/types/Push/PushQueue.d.ts deleted file mode 100644 index 7a24336b82..0000000000 --- a/types/Push/PushQueue.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export class PushQueue { - static defaultPushChannel(): string; - constructor(config?: {}); - channel: any; - batchSize: any; - parsePublisher: any; - enqueue(body: any, where: any, config: any, auth: any, pushStatus: any): Promise; -} diff --git a/types/Push/PushWorker.d.ts b/types/Push/PushWorker.d.ts deleted file mode 100644 index 4c04401f49..0000000000 --- a/types/Push/PushWorker.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export var __esModule: boolean; -export default _default; -export class PushWorker { - constructor(pushAdapter: any, subscriberConfig?: {}); - adapter: any; - channel: any; - subscriber: any; - run({ body, query, pushStatus, applicationId, UTCOffset }: { - body: any; - query: any; - pushStatus: any; - applicationId: any; - UTCOffset: any; - }): any; - sendToAdapter(body: any, installations: any, pushStatus: any, config: any, UTCOffset: any): any; -} -declare var _default: typeof PushWorker; diff --git a/types/Push/utils.d.ts b/types/Push/utils.d.ts deleted file mode 100644 index 113ef19c03..0000000000 --- a/types/Push/utils.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export function isPushIncrementing(body: any): number | boolean; -export function getLocalesFromPush(body: any): any[]; -export function transformPushBodyForLocale(body: any, locale: any): any; -export function stripLocalesFromBody(body: any): any; -export function bodiesPerLocales(body: any, locales?: any[]): any; -export function groupByLocaleIdentifier(installations: any, locales?: any[]): any; -/** - * Check whether the deviceType parameter in qury condition is valid or not. - * @param {Object} where A query condition - * @param {Array} validPushTypes An array of valid push types(string) - */ -export function validatePushType(where?: any, validPushTypes?: any[]): void; -export function applyDeviceTokenExists(where: any): any; diff --git a/types/RestQuery.d.ts b/types/RestQuery.d.ts deleted file mode 100644 index cea50c7cbd..0000000000 --- a/types/RestQuery.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export = RestQuery; -declare function RestQuery(config: any, auth: any, className: any, restWhere: {}, restOptions: {}, clientSDK: any, runAfterFind: boolean, context: any): void; -declare class RestQuery { - constructor(config: any, auth: any, className: any, restWhere: {}, restOptions: {}, clientSDK: any, runAfterFind: boolean, context: any); - config: any; - auth: any; - className: any; - restWhere: {}; - restOptions: {}; - clientSDK: any; - runAfterFind: boolean; - response: any; - findOptions: {}; - context: any; - doCount: boolean; - includeAll: boolean; - include: any[]; - keys: any[]; - excludeKeys: any[]; - redirectKey: any; - redirectClassName: any; - execute(executeOptions: any): any; - each(callback: any): any; - buildRestWhere(): any; - getUserAndRoleACL(): any; - redirectClassNameForKey(): any; - validateClientClassCreation(): any; - replaceInQuery(): any; - replaceNotInQuery(): any; - replaceSelect(): any; - replaceDontSelect(): any; - replaceEquality(): void; - runFind(options?: {}): any; - runCount(): any; - handleIncludeAll(): any; - handleExcludeKeys(): any; - handleInclude(): any; - runAfterFindTrigger(): Promise; -} diff --git a/types/RestWrite.d.ts b/types/RestWrite.d.ts deleted file mode 100644 index 21c8a3430a..0000000000 --- a/types/RestWrite.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -export = RestWrite; -declare function RestWrite(config: any, auth: any, className: any, query: any, data: any, originalData: any, clientSDK: any, context: any, action: any): void; -declare class RestWrite { - constructor(config: any, auth: any, className: any, query: any, data: any, originalData: any, clientSDK: any, context: any, action: any); - config: any; - auth: any; - className: any; - clientSDK: any; - storage: {}; - runOptions: {}; - context: any; - response: { - response: any; - location: string; - status?: undefined; - } | { - status: number; - location: any; - response: { - sessionToken: string; - user: { - __type: string; - className: string; - objectId: any; - }; - createdWith: any; - restricted: boolean; - expiresAt: any; - }; - } | { - response: any; - location?: undefined; - status?: undefined; - } | { - status: number; - response: any; - location: string; - }; - query: any; - data: any; - originalData: any; - updatedAt: any; - validSchemaController: any; - execute(): any; - getUserAndRoleACL(): any; - validateClientClassCreation(): any; - validateSchema(): any; - runBeforeSaveTrigger(): Promise; - runBeforeLoginTrigger(userData: any): Promise; - setRequiredFieldsIfNeeded(): any; - validateAuthData(): Promise; - handleAuthDataValidation(authData: any): Promise; - findUsersWithAuthData(authData: any): Promise; - filteredObjectsByACL(objects: any): any; - handleAuthData(authData: any): Promise; - transformUser(): Promise; - _validateUserName(): any; - responseShouldHaveUsername: boolean; - _validateEmail(): any; - _validatePasswordPolicy(): any; - _validatePasswordRequirements(): any; - _validatePasswordHistory(): any; - createSessionTokenIfNeeded(): Promise; - createSessionToken(): Promise; - deleteEmailResetTokenIfNeeded(): void; - destroyDuplicatedSessions(): void; - handleFollowup(): any; - handleSession(): any; - handleInstallation(): Promise; - expandFilesForExistingObjects(): void; - runDatabaseOperation(): any; - runAfterSaveTrigger(): Promise; - location(): string; - objectId(): any; - sanitizedData(): any; - buildUpdatedObject(extraData: any): any; - cleanUserAuthData(): void; - _updateResponseWithData(response: any, data: any): any; -} -declare namespace RestWrite { - export { createSession, __esModule, _default as default }; -} -declare function createSession(config: any, { userId, createdWith, installationId, additionalSessionData }: { - userId: any; - createdWith: any; - installationId: any; - additionalSessionData: any; -}): { - sessionData: { - sessionToken: string; - user: { - __type: string; - className: string; - objectId: any; - }; - createdWith: any; - restricted: boolean; - expiresAt: any; - }; - createSession: () => any; -}; -declare var __esModule: boolean; -declare var _default: typeof RestWrite; diff --git a/types/Routers/AggregateRouter.d.ts b/types/Routers/AggregateRouter.d.ts deleted file mode 100644 index 4a1ee5d472..0000000000 --- a/types/Routers/AggregateRouter.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const AggregateRouter_base: any; -export class AggregateRouter extends AggregateRouter_base { - [x: string]: any; - static getPipeline(body: any): any; - static transformStage(stageName: any, stage: any): { - [x: string]: any; - }; - handleFind(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof AggregateRouter; diff --git a/types/Routers/AnalyticsRouter.d.ts b/types/Routers/AnalyticsRouter.d.ts deleted file mode 100644 index a1b3260c76..0000000000 --- a/types/Routers/AnalyticsRouter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -declare const AnalyticsRouter_base: any; -export class AnalyticsRouter extends AnalyticsRouter_base { - [x: string]: any; - mountRoutes(): void; -} -export {}; diff --git a/types/Routers/AudiencesRouter.d.ts b/types/Routers/AudiencesRouter.d.ts deleted file mode 100644 index 9777a192a4..0000000000 --- a/types/Routers/AudiencesRouter.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const AudiencesRouter_base: any; -export class AudiencesRouter extends AudiencesRouter_base { - [x: string]: any; - className(): string; - handleFind(req: any): any; - handleGet(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof AudiencesRouter; diff --git a/types/Routers/ClassesRouter.d.ts b/types/Routers/ClassesRouter.d.ts deleted file mode 100644 index 166f1099d0..0000000000 --- a/types/Routers/ClassesRouter.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const ClassesRouter_base: any; -export class ClassesRouter extends ClassesRouter_base { - [x: string]: any; - static JSONFromQuery(query: any): {}; - static optionsFromBody(body: any): { - skip: number; - limit: number; - order: string; - count: boolean; - keys: any; - excludeKeys: any; - include: string; - includeAll: boolean; - readPreference: any; - includeReadPreference: any; - subqueryReadPreference: any; - hint: any; - explain: any; - }; - className(req: any): any; - handleFind(req: any): any; - handleGet(req: any): any; - handleCreate(req: any): any; - handleUpdate(req: any): any; - handleDelete(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof ClassesRouter; diff --git a/types/Routers/CloudCodeRouter.d.ts b/types/Routers/CloudCodeRouter.d.ts deleted file mode 100644 index ea9fa6d477..0000000000 --- a/types/Routers/CloudCodeRouter.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export var __esModule: boolean; -declare const CloudCodeRouter_base: any; -export class CloudCodeRouter extends CloudCodeRouter_base { - [x: string]: any; - static getJobs(req: any): any; - static getJobsData(req: any): any; - static createJob(req: any): any; - static editJob(req: any): any; - static deleteJob(req: any): any; - mountRoutes(): void; -} -export {}; diff --git a/types/Routers/FeaturesRouter.d.ts b/types/Routers/FeaturesRouter.d.ts deleted file mode 100644 index 07c2a6292e..0000000000 --- a/types/Routers/FeaturesRouter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -declare const FeaturesRouter_base: any; -export class FeaturesRouter extends FeaturesRouter_base { - [x: string]: any; - mountRoutes(): void; -} -export {}; diff --git a/types/Routers/FilesRouter.d.ts b/types/Routers/FilesRouter.d.ts deleted file mode 100644 index 39acf8c62f..0000000000 --- a/types/Routers/FilesRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export var __esModule: boolean; -export class FilesRouter { - expressRouter({ maxUploadSize }?: { - maxUploadSize?: string; - }): any; - getHandler(req: any, res: any): void; - createHandler(req: any, res: any, next: any): Promise; - deleteHandler(req: any, res: any, next: any): Promise; - metadataHandler(req: any, res: any): Promise; -} diff --git a/types/Routers/FunctionsRouter.d.ts b/types/Routers/FunctionsRouter.d.ts deleted file mode 100644 index ac8db1197c..0000000000 --- a/types/Routers/FunctionsRouter.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export var __esModule: boolean; -declare const FunctionsRouter_base: any; -export class FunctionsRouter extends FunctionsRouter_base { - [x: string]: any; - static handleCloudJob(req: any): any; - static createResponseObject(resolve: any, reject: any): { - success: (result: any) => void; - error: (message: any) => void; - }; - static handleCloudFunction(req: any): Promise; - mountRoutes(): void; -} -export {}; diff --git a/types/Routers/GlobalConfigRouter.d.ts b/types/Routers/GlobalConfigRouter.d.ts deleted file mode 100644 index f3455b7b15..0000000000 --- a/types/Routers/GlobalConfigRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const GlobalConfigRouter_base: any; -export class GlobalConfigRouter extends GlobalConfigRouter_base { - [x: string]: any; - getGlobalConfig(req: any): any; - updateGlobalConfig(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof GlobalConfigRouter; diff --git a/types/Routers/GraphQLRouter.d.ts b/types/Routers/GraphQLRouter.d.ts deleted file mode 100644 index 547ab01824..0000000000 --- a/types/Routers/GraphQLRouter.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const GraphQLRouter_base: any; -export class GraphQLRouter extends GraphQLRouter_base { - [x: string]: any; - getGraphQLConfig(req: any): Promise<{ - response: any; - }>; - updateGraphQLConfig(req: any): Promise<{ - response: any; - }>; - mountRoutes(): void; -} -declare var _default: typeof GraphQLRouter; diff --git a/types/Routers/HooksRouter.d.ts b/types/Routers/HooksRouter.d.ts deleted file mode 100644 index 146863ea40..0000000000 --- a/types/Routers/HooksRouter.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const HooksRouter_base: any; -export class HooksRouter extends HooksRouter_base { - [x: string]: any; - createHook(aHook: any, config: any): any; - updateHook(aHook: any, config: any): any; - handlePost(req: any): any; - handleGetFunctions(req: any): any; - handleGetTriggers(req: any): any; - handleDelete(req: any): any; - handleUpdate(req: any): any; - handlePut(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof HooksRouter; diff --git a/types/Routers/IAPValidationRouter.d.ts b/types/Routers/IAPValidationRouter.d.ts deleted file mode 100644 index 48d3d11d38..0000000000 --- a/types/Routers/IAPValidationRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export var __esModule: boolean; -declare const IAPValidationRouter_base: any; -export class IAPValidationRouter extends IAPValidationRouter_base { - [x: string]: any; - handleRequest(req: any): Promise<{ - response: any; - }>; - mountRoutes(): void; -} -export {}; diff --git a/types/Routers/InstallationsRouter.d.ts b/types/Routers/InstallationsRouter.d.ts deleted file mode 100644 index a393ac8dc0..0000000000 --- a/types/Routers/InstallationsRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const InstallationsRouter_base: any; -export class InstallationsRouter extends InstallationsRouter_base { - [x: string]: any; - className(): string; - handleFind(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof InstallationsRouter; diff --git a/types/Routers/LogsRouter.d.ts b/types/Routers/LogsRouter.d.ts deleted file mode 100644 index 969ae609de..0000000000 --- a/types/Routers/LogsRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const LogsRouter_base: any; -export class LogsRouter extends LogsRouter_base { - [x: string]: any; - mountRoutes(): void; - validateRequest(req: any): void; - handleGET(req: any): any; -} -declare var _default: typeof LogsRouter; diff --git a/types/Routers/PagesRouter.d.ts b/types/Routers/PagesRouter.d.ts deleted file mode 100644 index bbab1c3edb..0000000000 --- a/types/Routers/PagesRouter.d.ts +++ /dev/null @@ -1,176 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const PagesRouter_base: any; -export class PagesRouter extends PagesRouter_base { - [x: string]: any; - /** - * Constructs a PagesRouter. - * @param {Object} pages The pages options from the Parse Server configuration. - */ - constructor(pages?: any); - pagesConfig: any; - pagesEndpoint: any; - pagesPath: any; - verifyEmail(req: any): any; - resendVerificationEmail(req: any): any; - passwordReset(req: any): Promise; - requestResetPassword(req: any): any; - resetPassword(req: any): any; - /** - * Returns page content if the page is a local file or returns a - * redirect to a custom page. - * @param {Object} req The express request. - * @param {Page} page The page to go to. - * @param {Object} [params={}] The query parameters to attach to the URL in case of - * HTTP redirect responses for POST requests, or the placeholders to fill into - * the response content in case of HTTP content responses for GET requests. - * @param {Boolean} [responseType] Is true if a redirect response should be forced, - * false if a content response should be forced, undefined if the response type - * should depend on the request type by default: - * - GET request -> content response - * - POST request -> redirect response (PRG pattern) - * @returns {Promise} The PromiseRouter response. - */ - goToPage(req: any, page: any, params?: any, responseType?: boolean): Promise; - /** - * Serves a request to a static resource and localizes the resource if it - * is a HTML file. - * @param {Object} req The request object. - * @returns {Promise} The response. - */ - staticRoute(req: any): Promise; - /** - * Returns a translation from the JSON resource for a given locale. The JSON - * resource is parsed according to i18next syntax. - * - * Example JSON content: - * ```js - * { - * "en": { // resource for language `en` (English) - * "translation": { - * "greeting": "Hello!" - * } - * }, - * "de": { // resource for language `de` (German) - * "translation": { - * "greeting": "Hallo!" - * } - * } - * "de-CH": { // resource for locale `de-CH` (Swiss German) - * "translation": { - * "greeting": "Grüezi!" - * } - * } - * } - * ``` - * @param {String} locale The locale to translate to. - * @returns {Object} The translation or an empty object if no matching - * translation was found. - */ - getJsonTranslation(locale: string): any; - /** - * Returns a translation from the JSON resource for a given locale with - * placeholders filled in by given parameters. - * @param {String} locale The locale to translate to. - * @param {Object} params The parameters to fill into any placeholders - * within the translations. - * @returns {Object} The translation or an empty object if no matching - * translation was found. - */ - getJsonPlaceholders(locale: string, params?: any): any; - /** - * Creates a response with file content. - * @param {String} path The path of the file to return. - * @param {Object} [params={}] The parameters to be included in the response - * header. These will also be used to fill placeholders. - * @param {Object} [placeholders={}] The placeholders to fill in the content. - * These will not be included in the response header. - * @returns {Object} The Promise Router response. - */ - pageResponse(path: string, params?: any, placeholders?: any): any; - /** - * Creates a response with file content. - * @param {String} path The path of the file to return. - * @returns {Object} The PromiseRouter response. - */ - fileResponse(path: string): any; - /** - * Reads and returns the content of a file at a given path. File reading to - * serve content on the static route is only allowed from the pages - * directory on downwards. - * ----------------------------------------------------------------------- - * **WARNING:** All file reads in the PagesRouter must be executed by this - * wrapper because it also detects and prevents common exploits. - * ----------------------------------------------------------------------- - * @param {String} filePath The path to the file to read. - * @returns {Promise} The file content. - */ - readFile(filePath: string): Promise; - /** - * Loads a language resource JSON file that is used for translations. - */ - loadJsonResource(): void; - jsonParameters: any; - /** - * Extracts and returns the page default parameters from the Parse Server - * configuration. These parameters are made accessible in every page served - * by this router. - * @param {Object} config The Parse Server configuration. - * @returns {Object} The default parameters. - */ - getDefaultParams(config: any): any; - /** - * Extracts and returns the locale from an express request. - * @param {Object} req The express request. - * @returns {String|undefined} The locale, or undefined if no locale was set. - */ - getLocale(req: any): string | undefined; - /** - * Creates a response with http redirect. - * @param {Object} req The express request. - * @param {String} path The path of the file to return. - * @param {Object} params The query parameters to include. - * @returns {Object} The Promise Router response. - */ - redirectResponse(url: any, params: any): any; - defaultPagePath(file: any): any; - composePageUrl(file: any, publicServerUrl: any, locale: any): any; - notFound(): { - text: string; - status: number; - }; - invalidRequest(): void; - /** - * Sets the Parse Server configuration in the request object to make it - * easily accessible throughtout request processing. - * @param {Object} req The request. - * @param {Boolean} failGracefully Is true if failing to set the config should - * not result in an invalid request response. Default is `false`. - */ - setConfig(req: any, failGracefully?: boolean): Promise; - mountPagesRoutes(): void; - mountCustomRoutes(): void; - mountStaticRoute(): void; - expressRouter(): any; -} -declare var _default: typeof PagesRouter; -export const pageParamHeaderPrefix: "x-parse-page-param-"; -export const pageParams: Readonly<{ - appName: string; - appId: string; - token: string; - username: string; - error: string; - locale: string; - publicServerUrl: string; -}>; -export const pages: Readonly<{ - passwordReset: any; - passwordResetSuccess: any; - passwordResetLinkInvalid: any; - emailVerificationSuccess: any; - emailVerificationSendFail: any; - emailVerificationSendSuccess: any; - emailVerificationLinkInvalid: any; - emailVerificationLinkExpired: any; -}>; diff --git a/types/Routers/PublicAPIRouter.d.ts b/types/Routers/PublicAPIRouter.d.ts deleted file mode 100644 index 2da36fd930..0000000000 --- a/types/Routers/PublicAPIRouter.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const PublicAPIRouter_base: any; -export class PublicAPIRouter extends PublicAPIRouter_base { - [x: string]: any; - verifyEmail(req: any): any; - resendVerificationEmail(req: any): any; - changePassword(req: any): Promise; - requestResetPassword(req: any): any; - resetPassword(req: any): any; - invalidLink(req: any): Promise<{ - status: number; - location: any; - }>; - invalidVerificationLink(req: any): Promise<{ - status: number; - location: any; - }>; - missingPublicServerURL(): Promise<{ - text: string; - status: number; - }>; - invalidRequest(): void; - setConfig(req: any): Promise; - mountRoutes(): void; - expressRouter(): any; -} -declare var _default: typeof PublicAPIRouter; diff --git a/types/Routers/PurgeRouter.d.ts b/types/Routers/PurgeRouter.d.ts deleted file mode 100644 index f31ba6a94f..0000000000 --- a/types/Routers/PurgeRouter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const PurgeRouter_base: any; -export class PurgeRouter extends PurgeRouter_base { - [x: string]: any; - handlePurge(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof PurgeRouter; diff --git a/types/Routers/PushRouter.d.ts b/types/Routers/PushRouter.d.ts deleted file mode 100644 index d1a42ccfaa..0000000000 --- a/types/Routers/PushRouter.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const PushRouter_base: any; -export class PushRouter extends PushRouter_base { - [x: string]: any; - static handlePOST(req: any): Promise; - /** - * Get query condition from the request body. - * @param {Object} req A request object - * @returns {Object} The query condition, the where field in a query api call - */ - static getQueryCondition(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof PushRouter; diff --git a/types/Routers/RolesRouter.d.ts b/types/Routers/RolesRouter.d.ts deleted file mode 100644 index e16c7d00bb..0000000000 --- a/types/Routers/RolesRouter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const RolesRouter_base: any; -export class RolesRouter extends RolesRouter_base { - [x: string]: any; - className(): string; - mountRoutes(): void; -} -declare var _default: typeof RolesRouter; diff --git a/types/Routers/SchemasRouter.d.ts b/types/Routers/SchemasRouter.d.ts deleted file mode 100644 index 98f296601b..0000000000 --- a/types/Routers/SchemasRouter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -declare const SchemasRouter_base: any; -export class SchemasRouter extends SchemasRouter_base { - [x: string]: any; - mountRoutes(): void; -} -export {}; diff --git a/types/Routers/SecurityRouter.d.ts b/types/Routers/SecurityRouter.d.ts deleted file mode 100644 index b10670dd17..0000000000 --- a/types/Routers/SecurityRouter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const SecurityRouter_base: any; -export class SecurityRouter extends SecurityRouter_base { - [x: string]: any; - mountRoutes(): void; - _enforceSecurityCheckEnabled(req: any): Promise; -} -declare var _default: typeof SecurityRouter; diff --git a/types/Routers/SessionsRouter.d.ts b/types/Routers/SessionsRouter.d.ts deleted file mode 100644 index 73968107d3..0000000000 --- a/types/Routers/SessionsRouter.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const SessionsRouter_base: any; -export class SessionsRouter extends SessionsRouter_base { - [x: string]: any; - className(): string; - handleMe(req: any): any; - handleUpdateToRevocableSession(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof SessionsRouter; diff --git a/types/Routers/UsersRouter.d.ts b/types/Routers/UsersRouter.d.ts deleted file mode 100644 index c6c71fed12..0000000000 --- a/types/Routers/UsersRouter.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare const UsersRouter_base: any; -export class UsersRouter extends UsersRouter_base { - [x: string]: any; - /** - * Removes all "_" prefixed properties from an object, except "__type" - * @param {Object} obj An object. - */ - static removeHiddenProperties(obj: any): void; - className(): string; - /** - * Validates a password request in login and verifyPassword - * @param {Object} req The request - * @returns {Object} User object - * @private - */ - private _authenticateUserFromRequest; - handleMe(req: any): any; - handleLogIn(req: any): Promise<{ - response: any; - }>; - handleVerifyPassword(req: any): any; - handleLogOut(req: any): any; - _runAfterLogoutTrigger(req: any, session: any): void; - _throwOnBadEmailConfig(req: any): void; - handleResetRequest(req: any): any; - handleVerificationEmailRequest(req: any): any; - mountRoutes(): void; -} -declare var _default: typeof UsersRouter; diff --git a/types/Security/Check.d.ts b/types/Security/Check.d.ts deleted file mode 100644 index 1494fc2a31..0000000000 --- a/types/Security/Check.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare var _default: typeof Check; -/** - * @module SecurityCheck - */ -/** - * A security check. - * @class Check - */ -export class Check { - /** - * Constructs a new security check. - * @param {Object} params The parameters. - * @param {String} params.title The title. - * @param {String} params.warning The warning message if the check fails. - * @param {String} params.solution The solution to fix the check. - * @param {Promise} params.check The check as synchronous or asynchronous function. - */ - constructor(params: { - title: string; - warning: string; - solution: string; - check: Promise; - }); - title: string; - warning: string; - solution: string; - check: Promise; - _checkState: string; - /** - * Returns the current check state. - * @return {CheckState} The check state. - */ - checkState(): Readonly<{ - none: string; - fail: string; - success: string; - }>; - run(): Promise; - stateFailError: any; - /** - * Validates the constructor parameters. - * @param {Object} params The parameters to validate. - */ - _validateParams(params: any): void; -} -/** - * The check state. - */ -export const CheckState: Readonly<{ - none: string; - fail: string; - success: string; -}>; diff --git a/types/Security/CheckGroup.d.ts b/types/Security/CheckGroup.d.ts deleted file mode 100644 index 6f23ea33b5..0000000000 --- a/types/Security/CheckGroup.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export = CheckGroup; -/** - * @module SecurityCheck - */ -/** - * A group of security checks. - * @interface CheckGroup - */ -declare class CheckGroup { - _name: void; - _checks: void; - /** - * The security check group name; to be overridden by child class. - */ - setName(): void; - name(): void; - /** - * The security checks; to be overridden by child class. - */ - setChecks(): void; - checks(): void; - /** - * Runs all checks. - */ - run(): Promise; -} diff --git a/types/Security/CheckGroups/CheckGroupDatabase.d.ts b/types/Security/CheckGroups/CheckGroupDatabase.d.ts deleted file mode 100644 index e8fcf39356..0000000000 --- a/types/Security/CheckGroups/CheckGroupDatabase.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export = CheckGroupDatabase; -declare const CheckGroupDatabase_base: any; -/** - * @module SecurityCheck - */ -/** -* The security checks group for Parse Server configuration. -* Checks common Parse Server parameters such as access keys. -*/ -declare class CheckGroupDatabase extends CheckGroupDatabase_base { - [x: string]: any; - setName(): string; - setChecks(): _Check.Check[]; -} -import _Check = require("../Check"); diff --git a/types/Security/CheckGroups/CheckGroupServerConfig.d.ts b/types/Security/CheckGroups/CheckGroupServerConfig.d.ts deleted file mode 100644 index 18cdb1164d..0000000000 --- a/types/Security/CheckGroups/CheckGroupServerConfig.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export = CheckGroupServerConfig; -declare const CheckGroupServerConfig_base: any; -/** - * @module SecurityCheck - */ -/** -* The security checks group for Parse Server configuration. -* Checks common Parse Server parameters such as access keys. -*/ -declare class CheckGroupServerConfig extends CheckGroupServerConfig_base { - [x: string]: any; - setName(): string; - setChecks(): _Check.Check[]; -} -import _Check = require("../Check"); diff --git a/types/Security/CheckGroups/CheckGroups.d.ts b/types/Security/CheckGroups/CheckGroups.d.ts deleted file mode 100644 index ac2e65cff8..0000000000 --- a/types/Security/CheckGroups/CheckGroups.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export var __esModule: boolean; -export var CheckGroupDatabase: any; -export var CheckGroupServerConfig: any; diff --git a/types/Security/CheckRunner.d.ts b/types/Security/CheckRunner.d.ts deleted file mode 100644 index 286ccf54a9..0000000000 --- a/types/Security/CheckRunner.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export = CheckRunner; -/** - * @module SecurityCheck - */ -/** - * The security check runner. - */ -declare class CheckRunner { - /** - * The security check runner. - * @param {Object} [config] The configuration options. - * @param {Boolean} [config.enableCheck=false] Is true if Parse Server should report weak security settings. - * @param {Boolean} [config.enableCheckLog=false] Is true if the security check report should be written to logs. - * @param {Object} [config.checkGroups] The check groups to run. Default are the groups defined in `./CheckGroups/CheckGroups.js`. - */ - constructor(config?: { - enableCheck?: boolean; - enableCheckLog?: boolean; - checkGroups?: any; - }); - enableCheck: boolean; - enableCheckLog: boolean; - checkGroups: any; - /** - * Runs all security checks and returns the results. - * @params - * @returns {Object} The security check report. - */ - run({ version }?: { - version?: string; - }): any; - /** - * Generates a security check report in JSON format with schema: - * ``` - * { - * report: { - * version: "1.0.0", // The report version, defines the schema - * state: "fail" // The disjunctive indicator of failed checks in all groups. - * groups: [ // The check groups - * { - * name: "House", // The group name - * state: "fail" // The disjunctive indicator of failed checks in this group. - * checks: [ // The checks - * title: "Door locked", // The check title - * state: "fail" // The check state - * warning: "Anyone can enter your house." // The warning. - * solution: "Lock your door." // The solution. - * ] - * }, - * ... - * ] - * } - * } - * ``` - * @param {Object} params The parameters. - * @param {Array} params.groups The check groups. - * @param {String} params.version: The report schema version. - * @returns {Object} The report. - */ - _generateReport({ groups, version }: { - groups: Array; - version: string; - }): any; - /** - * Logs the security check report. - * @param {Object} report The report to log. - */ - _logReport(report: any): void; - /** - * Returns an icon for use in the report log output. - * @param {CheckState} state The check state. - * @returns {String} The icon. - */ - _getLogIconForState(state: any): string; - /** - * Validates the constructor parameters. - * @param {Object} params The parameters to validate. - */ - _validateParams(params: any): void; -} diff --git a/types/StatusHandler.d.ts b/types/StatusHandler.d.ts deleted file mode 100644 index 69fa0049dc..0000000000 --- a/types/StatusHandler.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export var __esModule: boolean; -export function flatten(array: any): any; -export function jobStatusHandler(config: any): Readonly<{ - setRunning: (jobName: any, params: any) => any; - setSucceeded: (message: any) => any; - setMessage: (message: any) => any; - setFailed: (message: any) => any; -}>; -export function pushStatusHandler(config: any, existingObjectId: any): Readonly<{ - setInitial: (body: {}, where: any, options?: { - source: string; - }) => any; - setRunning: (batches: any) => any; - trackSent: (results: any, UTCOffset: any, cleanupInstallations?: string) => any; - complete: () => any; - fail: (err: any) => any; -}>; diff --git a/types/TestUtils.d.ts b/types/TestUtils.d.ts deleted file mode 100644 index 8ac1bd1cac..0000000000 --- a/types/TestUtils.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export var __esModule: boolean; -/** - * Destroys all data in the database - * @param {boolean} fast set to true if it's ok to just drop objects and not indexes. - */ -export function destroyAllDataPermanently(fast: boolean): Promise; diff --git a/types/Utils.d.ts b/types/Utils.d.ts deleted file mode 100644 index 34e9728df2..0000000000 --- a/types/Utils.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -export = Utils; -/** - * The general purpose utilities. - */ -declare class Utils { - /** - * @function getLocalizedPath - * @description Returns a localized file path accoring to the locale. - * - * Localized files are searched in subfolders of a given path, e.g. - * - * root/ - * ├── base/ // base path to files - * │ ├── example.html // default file - * │ └── de/ // de language folder - * │ │ └── example.html // de localized file - * │ └── de-AT/ // de-AT locale folder - * │ │ └── example.html // de-AT localized file - * - * Files are matched with the locale in the following order: - * 1. Locale match, e.g. locale `de-AT` matches file in folder `de-AT`. - * 2. Language match, e.g. locale `de-AT` matches file in folder `de`. - * 3. Default; file in base folder is returned. - * - * @param {String} defaultPath The absolute file path, which is also - * the default path returned if localization is not available. - * @param {String} locale The locale. - * @returns {Promise} The object contains: - * - `path`: The path to the localized file, or the original path if - * localization is not available. - * - `subdir`: The subdirectory of the localized file, or undefined if - * there is no matching localized file. - */ - static getLocalizedPath(defaultPath: string, locale: string): Promise; - /** - * @function fileExists - * @description Checks whether a file exists. - * @param {String} path The file path. - * @returns {Promise} Is true if the file can be accessed, false otherwise. - */ - static fileExists(path: string): Promise; - /** - * @function isPath - * @description Evaluates whether a string is a file path (as opposed to a URL for example). - * @param {String} s The string to evaluate. - * @returns {Boolean} Returns true if the evaluated string is a path. - */ - static isPath(s: string): boolean; - /** - * Flattens an object and crates new keys with custom delimiters. - * @param {Object} obj The object to flatten. - * @param {String} [delimiter='.'] The delimiter of the newly generated keys. - * @param {Object} result - * @returns {Object} The flattened object. - **/ - static flattenObject(obj: any, parentKey: any, delimiter?: string, result?: any): any; - /** - * Determines whether an object is a Promise. - * @param {any} object The object to validate. - * @returns {Boolean} Returns true if the object is a promise. - */ - static isPromise(object: any): boolean; - /** - * Creates an object with all permutations of the original keys. - * @param {Object} object The object to permutate. - * @param {Integer} [index=0] The current key index. - * @param {Object} [current={}] The current result entry being composed. - * @param {Array} [results=[]] The resulting array of permutations. - */ - static getObjectKeyPermutations(object: any, index?: any, current?: any, results?: any[]): any[]; - /** - * Validates parameters and throws if a parameter is invalid. - * Example parameter types syntax: - * ``` - * { - * parameterName: { - * t: 'boolean', - * v: isBoolean, - * o: true - * }, - * ... - * } - * ``` - * @param {Object} params The parameters to validate. - * @param {Array} types The parameter types used for validation. - * @param {Object} types.t The parameter type; used for error message, not for validation. - * @param {Object} types.v The function to validate the parameter value. - * @param {Boolean} [types.o=false] Is true if the parameter is optional. - */ - static validateParams(params: any, types: Array): void; -} diff --git a/types/batch.d.ts b/types/batch.d.ts deleted file mode 100644 index ce2bc12082..0000000000 --- a/types/batch.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function mountOnto(router: any): void; -export function makeBatchRoutingPathFunction(originalUrl: any, serverURL: any, publicServerURL: any): (requestPath: any) => string; diff --git a/types/cache.d.ts b/types/cache.d.ts deleted file mode 100644 index 909bc543b3..0000000000 --- a/types/cache.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export var __esModule: boolean; -export default _default; -export var AppCache: _InMemoryCache.InMemoryCache; -declare var _default: _InMemoryCache.InMemoryCache; -import _InMemoryCache = require("./Adapters/Cache/InMemoryCache"); diff --git a/types/cli/definitions/parse-live-query-server.d.ts b/types/cli/definitions/parse-live-query-server.d.ts deleted file mode 100644 index 48bdc8e426..0000000000 --- a/types/cli/definitions/parse-live-query-server.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare var _default: { - appId: { - env: string; - help: string; - }; - cacheTimeout: { - env: string; - help: string; - action: (opt: any) => number; - }; - keyPairs: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - logLevel: { - env: string; - help: string; - }; - masterKey: { - env: string; - help: string; - }; - port: { - env: string; - help: string; - action: (opt: any) => number; - default: number; - }; - pubSubAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - redisOptions: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - redisURL: { - env: string; - help: string; - }; - serverURL: { - env: string; - help: string; - }; - websocketTimeout: { - env: string; - help: string; - action: (opt: any) => number; - }; - wssAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; -}; diff --git a/types/cli/definitions/parse-server.d.ts b/types/cli/definitions/parse-server.d.ts deleted file mode 100644 index 3b64058b54..0000000000 --- a/types/cli/definitions/parse-server.d.ts +++ /dev/null @@ -1,403 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare var _default: { - accountLockout: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - allowClientClassCreation: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - allowCustomObjectId: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - allowHeaders: { - env: string; - help: string; - action: typeof import("../../Options/parsers").arrayParser; - }; - allowOrigin: { - env: string; - help: string; - }; - analyticsAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - appId: { - env: string; - help: string; - required: boolean; - }; - appName: { - env: string; - help: string; - }; - auth: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - cacheAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - cacheMaxSize: { - env: string; - help: string; - action: (opt: any) => number; - default: number; - }; - cacheTTL: { - env: string; - help: string; - action: (opt: any) => number; - default: number; - }; - clientKey: { - env: string; - help: string; - }; - cloud: { - env: string; - help: string; - }; - cluster: { - env: string; - help: string; - action: any; - }; - collectionPrefix: { - env: string; - help: string; - default: string; - }; - customPages: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - default: {}; - }; - databaseAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - databaseOptions: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - databaseURI: { - env: string; - help: string; - required: boolean; - default: string; - }; - directAccess: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - dotNetKey: { - env: string; - help: string; - }; - emailAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - emailVerifyTokenReuseIfValid: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - emailVerifyTokenValidityDuration: { - env: string; - help: string; - action: (opt: any) => number; - }; - enableAnonymousUsers: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - enableExpressErrorHandler: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - encryptionKey: { - env: string; - help: string; - }; - expireInactiveSessions: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - fileKey: { - env: string; - help: string; - }; - filesAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - fileUpload: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - default: {}; - }; - graphQLPath: { - env: string; - help: string; - default: string; - }; - graphQLSchema: { - env: string; - help: string; - }; - host: { - env: string; - help: string; - default: string; - }; - idempotencyOptions: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - default: {}; - }; - javascriptKey: { - env: string; - help: string; - }; - jsonLogs: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - }; - liveQuery: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - liveQueryServerOptions: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - loggerAdapter: { - env: string; - help: string; - action: typeof import("../../Options/parsers").moduleOrObjectParser; - }; - logLevel: { - env: string; - help: string; - }; - logsFolder: { - env: string; - help: string; - default: string; - }; - masterKey: { - env: string; - help: string; - required: boolean; - }; - masterKeyIps: { - env: string; - help: string; - action: typeof import("../../Options/parsers").arrayParser; - default: any[]; - }; - maxLimit: { - env: string; - help: string; - action: (opt: any) => number; - }; - maxLogFiles: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - maxUploadSize: { - env: string; - help: string; - default: string; - }; - middleware: { - env: string; - help: string; - }; - mountGraphQL: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - mountPath: { - env: string; - help: string; - default: string; - }; - mountPlayground: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - objectIdSize: { - env: string; - help: string; - action: (opt: any) => number; - default: number; - }; - pages: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - default: {}; - }; - passwordPolicy: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - playgroundPath: { - env: string; - help: string; - default: string; - }; - port: { - env: string; - help: string; - action: (opt: any) => number; - default: number; - }; - preserveFileName: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - preventLoginWithUnverifiedEmail: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - protectedFields: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - default: { - _User: { - '*': string[]; - }; - }; - }; - publicServerURL: { - env: string; - help: string; - }; - push: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - }; - readOnlyMasterKey: { - env: string; - help: string; - }; - restAPIKey: { - env: string; - help: string; - }; - revokeSessionOnPasswordReset: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - scheduledPush: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - security: { - env: string; - help: string; - action: typeof import("../../Options/parsers").objectParser; - default: {}; - }; - serverCloseComplete: { - env: string; - help: string; - }; - serverStartComplete: { - env: string; - help: string; - }; - serverURL: { - env: string; - help: string; - required: boolean; - }; - sessionLength: { - env: string; - help: string; - action: (opt: any) => number; - default: number; - }; - silent: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - }; - startLiveQueryServer: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - }; - userSensitiveFields: { - env: string; - help: string; - action: typeof import("../../Options/parsers").arrayParser; - }; - verbose: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - }; - verifyUserEmails: { - env: string; - help: string; - action: typeof import("../../Options/parsers").booleanParser; - default: boolean; - }; - webhookKey: { - env: string; - help: string; - }; -}; diff --git a/types/cli/parse-live-query-server.d.ts b/types/cli/parse-live-query-server.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/types/cli/parse-live-query-server.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/types/cli/parse-server.d.ts b/types/cli/parse-server.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/types/cli/parse-server.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/types/cli/utils/commander.d.ts b/types/cli/utils/commander.d.ts deleted file mode 100644 index 7345c55853..0000000000 --- a/types/cli/utils/commander.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare var _default: _commander.Command; -import _commander = require("commander"); diff --git a/types/cli/utils/runner.d.ts b/types/cli/utils/runner.d.ts deleted file mode 100644 index 39c0ec4213..0000000000 --- a/types/cli/utils/runner.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare function _default({ definitions, help, usage, start }: { - definitions: any; - help: any; - usage: any; - start: any; -}): void; diff --git a/types/cloud-code/HTTPResponse.d.ts b/types/cloud-code/HTTPResponse.d.ts deleted file mode 100644 index 6e00336aef..0000000000 --- a/types/cloud-code/HTTPResponse.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export var __esModule: boolean; -export default HTTPResponse; -/** - * @typedef Parse.Cloud.HTTPResponse - * @property {Buffer} buffer The raw byte representation of the response body. Use this to receive binary data. See Buffer for more details. - * @property {Object} cookies The cookies sent by the server. The keys in this object are the names of the cookies. The values are Parse.Cloud.Cookie objects. - * @property {Object} data The parsed response body as a JavaScript object. This is only available when the response Content-Type is application/x-www-form-urlencoded or application/json. - * @property {Object} headers The headers sent by the server. The keys in this object are the names of the headers. We do not support multiple response headers with the same name. In the common case of Set-Cookie headers, please use the cookies field instead. - * @property {Number} status The status code. - * @property {String} text The raw text representation of the response body. - */ -declare class HTTPResponse { - constructor(response: any, body: any); - status: any; - headers: any; - cookies: any; - buffer: Buffer; -} diff --git a/types/cloud-code/Parse.Cloud.d.ts b/types/cloud-code/Parse.Cloud.d.ts deleted file mode 100644 index 62c888987b..0000000000 --- a/types/cloud-code/Parse.Cloud.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export function define(functionName: any, handler: any, validationHandler: any): void; -export function job(functionName: any, handler: any): void; -export function beforeSave(parseClass: any, handler: any, validationHandler: any): void; -export function beforeDelete(parseClass: any, handler: any, validationHandler: any): void; -export function beforeLogin(handler: any, ...args: any[]): void; -export function afterLogin(handler: any, ...args: any[]): void; -export function afterLogout(handler: any, ...args: any[]): void; -export function afterSave(parseClass: any, handler: any, validationHandler: any): void; -export function afterDelete(parseClass: any, handler: any, validationHandler: any): void; -export function beforeFind(parseClass: any, handler: any, validationHandler: any): void; -export function afterFind(parseClass: any, handler: any, validationHandler: any): void; -export function beforeSaveFile(handler: any, validationHandler: any): void; -export function afterSaveFile(handler: any, validationHandler: any): void; -export function beforeDeleteFile(handler: any, validationHandler: any): void; -export function afterDeleteFile(handler: any, validationHandler: any): void; -export function beforeConnect(handler: any, validationHandler: any): void; -export function sendEmail(data: any): any; -export function beforeSubscribe(parseClass: any, handler: any, validationHandler: any): void; -export function onLiveQueryEvent(handler: any): void; -export function afterLiveQueryEvent(parseClass: any, handler: any, validationHandler: any): void; -export function _removeAllHooks(): void; -export function useMasterKey(): void; -export const httpRequest: { - (options: { - /** - * The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent. - */ - body: any; - /** - * The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object. - */ - error: Function; - /** - * Whether to follow redirects caused by HTTP 3xx responses. Defaults to false. - */ - followRedirects: boolean; - /** - * The headers for the request. - */ - headers: any; - /** - * The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified. - */ - method: string; - /** - * The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott. - */ - params: any; - /** - * The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object. - */ - success: Function; - /** - * The url to send the request to. - */ - url: string; - }): Promise; - encodeBody: ({ body, headers }: { - body: any; - headers?: {}; - }) => { - body: any; - headers: {}; - }; -}; diff --git a/types/cloud-code/httpRequest.d.ts b/types/cloud-code/httpRequest.d.ts deleted file mode 100644 index f7923a525f..0000000000 --- a/types/cloud-code/httpRequest.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -declare function _exports(options: Parse.Cloud.HTTPOptions): Promise; -declare namespace _exports { - export { encodeBody }; -} -export = _exports; -declare namespace Parse { - namespace Cloud { - type HTTPOptions = { - /** - * The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent. - */ - body: string | any; - /** - * The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object. - */ - error: Function; - /** - * Whether to follow redirects caused by HTTP 3xx responses. Defaults to false. - */ - followRedirects: boolean; - /** - * The headers for the request. - */ - headers: any; - /** - * The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified. - */ - method: string; - /** - * The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott. - */ - params: string | any; - /** - * The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object. - */ - success: Function; - /** - * The url to send the request to. - */ - url: string; - }; - } -} -declare function encodeBody({ body, headers }: { - body: any; - headers?: {}; -}): { - body: any; - headers: {}; -}; diff --git a/types/cryptoUtils.d.ts b/types/cryptoUtils.d.ts deleted file mode 100644 index 5462848684..0000000000 --- a/types/cryptoUtils.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export var __esModule: boolean; -export function randomHexString(size: any): string; -export function randomString(size: any): string; -export function newObjectId(size?: number): string; -export function newToken(): string; -export function md5Hash(string: any): string; diff --git a/types/defaults.d.ts b/types/defaults.d.ts deleted file mode 100644 index cc2b1b0a18..0000000000 --- a/types/defaults.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare namespace _default { - export const jsonLogs: string | boolean; - export { logsFolder }; - export { verbose }; - export { level }; -} -export const DefaultMongoURI: any; -declare const logsFolder: string; -declare const verbose: boolean; -declare const level: string; diff --git a/types/deprecated.d.ts b/types/deprecated.d.ts deleted file mode 100644 index f3c2a7f149..0000000000 --- a/types/deprecated.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export var __esModule: boolean; -export function useExternal(name: any, moduleName: any): () => never; diff --git a/types/index.d.ts b/types/index.d.ts deleted file mode 100644 index 124cca5642..0000000000 --- a/types/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export var __esModule: boolean; -export var FileSystemAdapter: any; -export var InMemoryCacheAdapter: any; -export var NullCacheAdapter: any; -export var RedisCacheAdapter: any; -export var LRUCacheAdapter: any; -export var PushWorker: typeof _PushWorker.PushWorker; -export var ParseGraphQLServer: typeof _ParseGraphQLServer.ParseGraphQLServer; -export var logger: import("./Controllers/LoggerController").LoggerController; -export default _default; -import _PushWorker = require("./Push/PushWorker"); -import _ParseGraphQLServer = require("./GraphQL/ParseGraphQLServer"); -export var TestUtils: any; -declare function _ParseServer(options: any): any; -declare namespace _ParseServer { - const createLiveQueryServer: any; - const start: any; -} -export const S3Adapter: () => never; -export const GCSAdapter: () => never; -declare var _default: any; -export { _ParseServer as ParseServer }; diff --git a/types/logger.d.ts b/types/logger.d.ts deleted file mode 100644 index 1a6cdd4659..0000000000 --- a/types/logger.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export var __esModule: boolean; -declare var _default: _LoggerController.LoggerController; -export default _default; -export var logger: _LoggerController.LoggerController; -export function setLogger(aLogger: any): void; -export function getLogger(): _LoggerController.LoggerController; -import _LoggerController = require("./Controllers/LoggerController"); diff --git a/types/middlewares.d.ts b/types/middlewares.d.ts deleted file mode 100644 index bd46e2f68e..0000000000 --- a/types/middlewares.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export var __esModule: boolean; -export function handleParseHeaders(req: any, res: any, next: any): void | Promise; -export function allowCrossDomain(appId: any): (req: any, res: any, next: any) => void; -export function allowMethodOverride(req: any, res: any, next: any): void; -export function handleParseErrors(err: any, req: any, res: any, next: any): any; -export function enforceMasterKeyAccess(req: any, res: any, next: any): void; -export function promiseEnforceMasterKeyAccess(request: any): Promise; -/** - * Deduplicates a request to ensure idempotency. Duplicates are determined by the request ID - * in the request header. If a request has no request ID, it is executed anyway. - * @param {*} req The request to evaluate. - * @returns Promise<{}> - */ -export function promiseEnsureIdempotency(req: any): any; -export const DEFAULT_ALLOWED_HEADERS: "X-Parse-Master-Key, X-Parse-REST-API-Key, X-Parse-Javascript-Key, X-Parse-Application-Id, X-Parse-Client-Version, X-Parse-Session-Token, X-Requested-With, X-Parse-Revocable-Session, X-Parse-Request-Id, Content-Type, Pragma, Cache-Control"; diff --git a/types/password.d.ts b/types/password.d.ts deleted file mode 100644 index 27a82b9d69..0000000000 --- a/types/password.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function hash(password: any): any; -export function compare(password: any, hashedPassword: any): any; diff --git a/types/request.d.ts b/types/request.d.ts deleted file mode 100644 index cd1e2166c8..0000000000 --- a/types/request.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -declare const _exports: { - (options: { - /** - * The body of the request. If it is a JSON object, then the Content-Type set in the headers must be application/x-www-form-urlencoded or application/json. You can also set this to a {@link Buffer} object to send raw bytes. If you use a Buffer, you should also set the Content-Type header explicitly to describe what these bytes represent. - */ - body: any; - /** - * The function that is called when the request fails. It will be passed a Parse.Cloud.HTTPResponse object. - */ - error: Function; - /** - * Whether to follow redirects caused by HTTP 3xx responses. Defaults to false. - */ - followRedirects: boolean; - /** - * The headers for the request. - */ - headers: any; - /** - * The method of the request. GET, POST, PUT, DELETE, HEAD, and OPTIONS are supported. Will default to GET if not specified. - */ - method: string; - /** - * The query portion of the url. You can pass a JSON object of key value pairs like params: {q : 'Sean Plott'} or a raw string like params:q=Sean Plott. - */ - params: any; - /** - * The function that is called when the request successfully completes. It will be passed a Parse.Cloud.HTTPResponse object. - */ - success: Function; - /** - * The url to send the request to. - */ - url: string; - }): Promise; - encodeBody: ({ body, headers }: { - body: any; - headers?: {}; - }) => { - body: any; - headers: {}; - }; -}; -export = _exports; diff --git a/types/requiredParameter.d.ts b/types/requiredParameter.d.ts deleted file mode 100644 index 57bd166b06..0000000000 --- a/types/requiredParameter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export var __esModule: boolean; -export default _default; -declare function _default(errorMessage: any): never; diff --git a/types/rest.d.ts b/types/rest.d.ts deleted file mode 100644 index e3906a6e37..0000000000 --- a/types/rest.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function create(config: any, auth: any, className: any, restObject: any, clientSDK: any, context: any): any; -export function del(config: any, auth: any, className: any, objectId: any, context: any): Promise; -export function find(config: any, auth: any, className: any, restWhere: any, restOptions: any, clientSDK: any, context: any): Promise; -export function get(config: any, auth: any, className: any, objectId: any, restOptions: any, clientSDK: any, context: any): Promise; -export function update(config: any, auth: any, className: any, restWhere: any, restObject: any, clientSDK: any, context: any): Promise; diff --git a/types/triggers.d.ts b/types/triggers.d.ts deleted file mode 100644 index c5f8c6db84..0000000000 --- a/types/triggers.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -export var __esModule: boolean; -export function addFunction(functionName: any, handler: any, validationHandler: any, applicationId: any): void; -export function addJob(jobName: any, handler: any, applicationId: any): void; -export function addTrigger(type: any, className: any, handler: any, applicationId: any, validationHandler: any): void; -export function addFileTrigger(type: any, handler: any, applicationId: any, validationHandler: any): void; -export function addConnectTrigger(type: any, handler: any, applicationId: any, validationHandler: any): void; -export function addLiveQueryEventHandler(handler: any, applicationId: any): void; -export function removeFunction(functionName: any, applicationId: any): void; -export function removeTrigger(type: any, className: any, applicationId: any): void; -export function _unregisterAll(): void; -export function getTrigger(className: any, triggerType: any, applicationId: any): any; -export function runTrigger(trigger: any, name: any, request: any, auth: any): Promise; -export function getFileTrigger(type: any, applicationId: any): any; -export function triggerExists(className: any, type: any, applicationId: any): boolean; -export function getFunction(functionName: any, applicationId: any): any; -export function getFunctionNames(applicationId: any): any[]; -export function getJob(jobName: any, applicationId: any): any; -export function getJobs(applicationId: any): any; -export function getValidator(functionName: any, applicationId: any): any; -export function getRequestObject(triggerType: any, auth: any, parseObject: any, originalParseObject: any, config: any, context: any): { - triggerName: any; - object: any; - master: boolean; - log: any; - headers: any; - ip: any; -}; -export function getRequestQueryObject(triggerType: any, auth: any, query: any, count: any, config: any, context: any, isGet: any): { - triggerName: any; - query: any; - master: boolean; - count: any; - log: any; - isGet: any; - headers: any; - ip: any; - context: any; -}; -export function getResponseObject(request: any, resolve: any, reject: any): { - success: (response: any) => any; - error: (error: any) => void; -}; -export function maybeRunAfterFindTrigger(triggerType: any, auth: any, className: any, objects: any, config: any, query: any, context: any): Promise; -export function maybeRunQueryTrigger(triggerType: any, className: any, restWhere: any, restOptions: any, config: any, auth: any, context: any, isGet: any): Promise<{ - restWhere: any; - restOptions: any; -}>; -export function resolveError(message: any, defaultOpts: any): any; -export function maybeRunValidator(request: any, functionName: any, auth: any): Promise; -export function maybeRunTrigger(triggerType: any, auth: any, parseObject: any, originalParseObject: any, config: any, context: any): Promise; -export function inflate(data: any, restObject: any): any; -export function runLiveQueryEventHandlers(data: any, applicationId?: any): void; -export function getRequestFileObject(triggerType: any, auth: any, fileObject: any, config: any): any; -export function maybeRunFileTrigger(triggerType: any, fileObject: any, config: any, auth: any): Promise; -export namespace Types { - const beforeLogin: string; - const afterLogin: string; - const afterLogout: string; - const beforeSave: string; - const afterSave: string; - const beforeDelete: string; - const afterDelete: string; - const beforeFind: string; - const afterFind: string; - const beforeSaveFile: string; - const afterSaveFile: string; - const beforeDeleteFile: string; - const afterDeleteFile: string; - const beforeConnect: string; - const beforeSubscribe: string; - const afterEvent: string; -} diff --git a/types/vendor/mongodbUrl.d.ts b/types/vendor/mongodbUrl.d.ts deleted file mode 100644 index 83dd074b6b..0000000000 --- a/types/vendor/mongodbUrl.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare function urlParse(url: any, parseQueryString: any, slashesDenoteHost: any): Url; -declare function urlResolve(source: any, relative: any): string; -declare function urlResolveObject(source: any, relative: any): any; -declare function urlFormat(obj: any): any; -export function Url(): void; -export class Url { - protocol: any; - slashes: boolean; - auth: string; - host: any; - port: string[]; - hostname: any; - hash: string; - search: string; - query: any; - pathname: string; - path: string; - href: string; - parse(url: any, parseQueryString: any, slashesDenoteHost: any): Url; - format(): string; - resolve(relative: any): string; - resolveObject(relative: any): Url; - parseHost(): void; -} -export { urlParse as parse, urlResolve as resolve, urlResolveObject as resolveObject, urlFormat as format };