@metacall/protocol 0.1.20 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deployment.d.ts +1 -1
- package/dist/deployment.js +2 -2
- package/dist/signup.d.ts +2 -0
- package/dist/signup.js +24 -0
- package/package.json +1 -1
- package/src/deployment.ts +1 -1
- package/src/signup.ts +31 -0
package/dist/deployment.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare enum LogType {
|
|
|
4
4
|
Deploy = "deploy"
|
|
5
5
|
}
|
|
6
6
|
export declare type LanguageId = 'node' | 'ts' | 'rb' | 'py' | 'cs' | 'cob' | 'file' | 'rpc';
|
|
7
|
-
declare enum ValueId {
|
|
7
|
+
export declare enum ValueId {
|
|
8
8
|
METACALL_BOOL = 0,
|
|
9
9
|
METACALL_CHAR = 1,
|
|
10
10
|
METACALL_SHORT = 2,
|
package/dist/deployment.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.LogType = void 0;
|
|
9
|
+
exports.ValueId = exports.LogType = void 0;
|
|
10
10
|
var LogType;
|
|
11
11
|
(function (LogType) {
|
|
12
12
|
LogType["Job"] = "job";
|
|
@@ -33,4 +33,4 @@ var ValueId;
|
|
|
33
33
|
ValueId[ValueId["METACALL_OBJECT"] = 16] = "METACALL_OBJECT";
|
|
34
34
|
ValueId[ValueId["METACALL_SIZE"] = 17] = "METACALL_SIZE";
|
|
35
35
|
ValueId[ValueId["METACALL_INVALID"] = 18] = "METACALL_INVALID";
|
|
36
|
-
})(ValueId || (ValueId = {}));
|
|
36
|
+
})(ValueId = exports.ValueId || (exports.ValueId = {}));
|
package/dist/signup.d.ts
ADDED
package/dist/signup.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const axios_1 = __importDefault(require("axios"));
|
|
7
|
+
exports.default = (email, password, alias, baseURL) => {
|
|
8
|
+
const request = {
|
|
9
|
+
email,
|
|
10
|
+
password,
|
|
11
|
+
alias
|
|
12
|
+
};
|
|
13
|
+
if (!baseURL.includes('localhost'))
|
|
14
|
+
request['g-recaptcha-response'] = 'empty';
|
|
15
|
+
return axios_1.default
|
|
16
|
+
.post(baseURL + '/signup', request, {
|
|
17
|
+
headers: {
|
|
18
|
+
Accept: 'application/json, text/plain, */*',
|
|
19
|
+
Host: baseURL.split('//')[1],
|
|
20
|
+
Origin: baseURL
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
.then(res => res.data);
|
|
24
|
+
};
|
package/package.json
CHANGED
package/src/deployment.ts
CHANGED
package/src/signup.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
interface Request {
|
|
3
|
+
email: string;
|
|
4
|
+
password: string;
|
|
5
|
+
alias: string;
|
|
6
|
+
'g-recaptcha-response'?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default (
|
|
10
|
+
email: string,
|
|
11
|
+
password: string,
|
|
12
|
+
alias: string,
|
|
13
|
+
baseURL: string
|
|
14
|
+
): Promise<string> => {
|
|
15
|
+
const request: Request = {
|
|
16
|
+
email,
|
|
17
|
+
password,
|
|
18
|
+
alias
|
|
19
|
+
};
|
|
20
|
+
if (!baseURL.includes('localhost'))
|
|
21
|
+
request['g-recaptcha-response'] = 'empty';
|
|
22
|
+
return axios
|
|
23
|
+
.post<string>(baseURL + '/signup', request, {
|
|
24
|
+
headers: {
|
|
25
|
+
Accept: 'application/json, text/plain, */*',
|
|
26
|
+
Host: baseURL.split('//')[1],
|
|
27
|
+
Origin: baseURL
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
.then(res => res.data);
|
|
31
|
+
};
|