core-3nweb-client-lib 0.30.0 → 0.30.1
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/build/api-defs/startup.d.ts +8 -1
- package/build/core/startup/sign-up.d.ts +0 -1
- package/build/core/startup/sign-up.js +3 -6
- package/build/core/startup/startup-cap.js +22 -0
- package/build/lib-client/3nweb-signup.d.ts +1 -0
- package/build/lib-client/3nweb-signup.js +22 -2
- package/build/lib-common/user-admin-api/signup.d.ts +10 -0
- package/build/lib-common/user-admin-api/signup.js +12 -2
- package/build/protos/startup.proto.js +208 -0
- package/package.json +1 -1
- package/protos/startup.proto +6 -0
|
@@ -28,7 +28,14 @@ declare namespace web3n.startup {
|
|
|
28
28
|
* @param serviceUrl of 3NWeb signup service url.
|
|
29
29
|
*/
|
|
30
30
|
setSignUpServer(serviceUrl: string): Promise<void>;
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param signupToken
|
|
34
|
+
* @return a promise, resolvable to an array of available domains for
|
|
35
|
+
* creation of a new account.
|
|
36
|
+
*/
|
|
37
|
+
getAvailableDomains(signupToken?: string): Promise<string[]>;
|
|
38
|
+
|
|
32
39
|
/**
|
|
33
40
|
* @param name is a part of address that comes before @domain
|
|
34
41
|
* @param signupToken
|
|
@@ -24,7 +24,6 @@ export declare class SignUp {
|
|
|
24
24
|
constructor(serviceURL: string, cryptor: Cryptor, makeNet: () => NetClient, getUsersOnDisk: GetUsersOnDisk, logError: LogError);
|
|
25
25
|
private setServiceURL;
|
|
26
26
|
exposedService(): SignUpService;
|
|
27
|
-
private getAvailableAddresses;
|
|
28
27
|
private createUserParams;
|
|
29
28
|
private genStorageParams;
|
|
30
29
|
private genMidParams;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2020, 2022 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2020, 2022 - 2023 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -66,10 +66,6 @@ class SignUp {
|
|
|
66
66
|
this.store = undefined;
|
|
67
67
|
this.serviceURL = undefined;
|
|
68
68
|
this.netLazyInit = undefined;
|
|
69
|
-
this.getAvailableAddresses = async (name, signupToken) => {
|
|
70
|
-
const addresses = await (0, _3nweb_signup_1.checkAvailableAddressesForName)(this.net, this.serviceURL, name, signupToken);
|
|
71
|
-
return addresses;
|
|
72
|
-
};
|
|
73
69
|
this.createUserParams = async (pass, progressCB) => {
|
|
74
70
|
await this.genMidParams(pass, 0, 50, progressCB);
|
|
75
71
|
await this.genStorageParams(pass, 51, 100, progressCB);
|
|
@@ -127,9 +123,10 @@ class SignUp {
|
|
|
127
123
|
exposedService() {
|
|
128
124
|
const service = {
|
|
129
125
|
setSignUpServer: async (srvUrl) => this.setServiceURL(srvUrl),
|
|
126
|
+
getAvailableDomains: signupToken => (0, _3nweb_signup_1.checkAvailableDomains)(this.net, this.serviceURL, signupToken),
|
|
130
127
|
addUser: this.addUser,
|
|
131
128
|
createUserParams: this.createUserParams,
|
|
132
|
-
getAvailableAddresses: this.
|
|
129
|
+
getAvailableAddresses: (name, signupToken) => (0, _3nweb_signup_1.checkAvailableAddressesForName)(this.net, this.serviceURL, name, signupToken),
|
|
133
130
|
isActivated: async () => { throw new Error(`Not implemented, yet`); }
|
|
134
131
|
};
|
|
135
132
|
return Object.freeze(service);
|
|
@@ -44,6 +44,7 @@ exports.makeSignInCaller = makeSignInCaller;
|
|
|
44
44
|
function wrapSignUpCAP(cap) {
|
|
45
45
|
return {
|
|
46
46
|
setSignUpServer: setSignUpServer.wrapService(cap.setSignUpServer),
|
|
47
|
+
getAvailableDomains: getAvailableDomains.wrapService(cap.getAvailableDomains),
|
|
47
48
|
getAvailableAddresses: getAvailableAddresses.wrapService(cap.getAvailableAddresses),
|
|
48
49
|
addUser: addUser.wrapService(cap.addUser),
|
|
49
50
|
createUserParams: createUserParams.wrapService(cap.createUserParams),
|
|
@@ -54,6 +55,7 @@ exports.wrapSignUpCAP = wrapSignUpCAP;
|
|
|
54
55
|
function makeSignUpCaller(caller, objPath) {
|
|
55
56
|
return {
|
|
56
57
|
setSignUpServer: setSignUpServer.makeCaller(caller, objPath),
|
|
58
|
+
getAvailableDomains: getAvailableDomains.makeCaller(caller, objPath),
|
|
57
59
|
getAvailableAddresses: getAvailableAddresses.makeCaller(caller, objPath),
|
|
58
60
|
addUser: addUser.makeCaller(caller, objPath),
|
|
59
61
|
createUserParams: createUserParams.makeCaller(caller, objPath),
|
|
@@ -80,6 +82,26 @@ var setSignUpServer;
|
|
|
80
82
|
setSignUpServer.makeCaller = makeCaller;
|
|
81
83
|
})(setSignUpServer || (setSignUpServer = {}));
|
|
82
84
|
Object.freeze(getAvailableAddresses);
|
|
85
|
+
var getAvailableDomains;
|
|
86
|
+
(function (getAvailableDomains) {
|
|
87
|
+
const requestType = protobuf_type_1.ProtoType.for(startup_proto_1.startup.GetAvailableDomainsRequestBody);
|
|
88
|
+
function wrapService(fn) {
|
|
89
|
+
return buf => {
|
|
90
|
+
const { token } = requestType.unpack(buf);
|
|
91
|
+
const promise = fn((0, protobuf_msg_1.valOfOpt)(token))
|
|
92
|
+
.then(domains => protobuf_msg_1.strArrValType.pack({ values: domains }));
|
|
93
|
+
return { promise };
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
getAvailableDomains.wrapService = wrapService;
|
|
97
|
+
function makeCaller(caller, objPath) {
|
|
98
|
+
const path = (0, protobuf_msg_1.methodPathFor)(objPath, 'getAvailableDomains');
|
|
99
|
+
return token => caller
|
|
100
|
+
.startPromiseCall(path, requestType.pack({ token: (0, protobuf_msg_1.toOptVal)(token) }))
|
|
101
|
+
.then(buf => (0, protobuf_msg_1.fixArray)(protobuf_msg_1.strArrValType.unpack(buf).values));
|
|
102
|
+
}
|
|
103
|
+
getAvailableDomains.makeCaller = makeCaller;
|
|
104
|
+
})(getAvailableDomains || (getAvailableDomains = {}));
|
|
83
105
|
var getAvailableAddresses;
|
|
84
106
|
(function (getAvailableAddresses) {
|
|
85
107
|
const requestType = protobuf_type_1.ProtoType.for(startup_proto_1.startup.GetAvailableAddressesRequestBody);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NetClient } from './request-utils';
|
|
2
2
|
import * as api from '../lib-common/user-admin-api/signup';
|
|
3
|
+
export declare function checkAvailableDomains(client: NetClient, serviceUrl: string, signupToken: string | undefined): Promise<string[]>;
|
|
3
4
|
export declare function checkAvailableAddressesForName(client: NetClient, serviceUrl: string, name: string, signupToken: string | undefined): Promise<string[]>;
|
|
4
5
|
export declare function addUser(client: NetClient, serviceUrl: string, userParams: api.addUser.Request): Promise<boolean>;
|
|
5
6
|
export declare function sendActivationCheckRequest(client: NetClient, serviceUrl: string, userId: string): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015, 2017, 2020 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015, 2017, 2020, 2023 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -16,9 +16,29 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.sendActivationCheckRequest = exports.addUser = exports.checkAvailableAddressesForName = void 0;
|
|
19
|
+
exports.sendActivationCheckRequest = exports.addUser = exports.checkAvailableAddressesForName = exports.checkAvailableDomains = void 0;
|
|
20
20
|
const request_utils_1 = require("./request-utils");
|
|
21
21
|
const api = require("../lib-common/user-admin-api/signup");
|
|
22
|
+
async function checkAvailableDomains(client, serviceUrl, signupToken) {
|
|
23
|
+
const reqData = { signupToken };
|
|
24
|
+
const rep = await client.doJsonRequest({
|
|
25
|
+
method: api.availableDomains.method,
|
|
26
|
+
url: serviceUrl + api.availableDomains.URL_END,
|
|
27
|
+
responseType: 'json'
|
|
28
|
+
}, reqData);
|
|
29
|
+
if (rep.status === api.availableDomains.SC.ok) {
|
|
30
|
+
if (Array.isArray(rep.data)) {
|
|
31
|
+
return rep.data;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
throw (0, request_utils_1.makeException)(rep, 'Reply is malformed');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.checkAvailableDomains = checkAvailableDomains;
|
|
22
42
|
async function checkAvailableAddressesForName(client, serviceUrl, name, signupToken) {
|
|
23
43
|
const reqData = {
|
|
24
44
|
name, signupToken
|
|
@@ -18,6 +18,16 @@ export declare namespace availableAddressesForName {
|
|
|
18
18
|
ok: number;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
export declare namespace availableDomains {
|
|
22
|
+
const URL_END = "available-domains";
|
|
23
|
+
const method = "POST";
|
|
24
|
+
interface Request {
|
|
25
|
+
signupToken?: string;
|
|
26
|
+
}
|
|
27
|
+
const SC: {
|
|
28
|
+
ok: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
21
31
|
export interface UserMidParams {
|
|
22
32
|
defaultPKey: {
|
|
23
33
|
pkey: JsonKey;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
Copyright (C) 2015 - 2016, 2020 3NSoft Inc.
|
|
3
|
+
Copyright (C) 2015 - 2016, 2020, 2023 3NSoft Inc.
|
|
4
4
|
|
|
5
5
|
This program is free software: you can redistribute it and/or modify it under
|
|
6
6
|
the terms of the GNU General Public License as published by the Free Software
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.isActivated = exports.addUser = exports.availableAddressesForName = exports.ERR_SC = void 0;
|
|
19
|
+
exports.isActivated = exports.addUser = exports.availableDomains = exports.availableAddressesForName = exports.ERR_SC = void 0;
|
|
20
20
|
exports.ERR_SC = {
|
|
21
21
|
duplicate: 475,
|
|
22
22
|
malformed: 400
|
|
@@ -32,6 +32,16 @@ var availableAddressesForName;
|
|
|
32
32
|
Object.freeze(availableAddressesForName.SC);
|
|
33
33
|
})(availableAddressesForName = exports.availableAddressesForName || (exports.availableAddressesForName = {}));
|
|
34
34
|
Object.freeze(availableAddressesForName);
|
|
35
|
+
var availableDomains;
|
|
36
|
+
(function (availableDomains) {
|
|
37
|
+
availableDomains.URL_END = 'available-domains';
|
|
38
|
+
availableDomains.method = 'POST';
|
|
39
|
+
availableDomains.SC = {
|
|
40
|
+
ok: 200
|
|
41
|
+
};
|
|
42
|
+
Object.freeze(availableDomains.SC);
|
|
43
|
+
})(availableDomains = exports.availableDomains || (exports.availableDomains = {}));
|
|
44
|
+
Object.freeze(availableDomains);
|
|
35
45
|
var addUser;
|
|
36
46
|
(function (addUser) {
|
|
37
47
|
addUser.URL_END = 'add';
|
|
@@ -453,6 +453,214 @@ $root.startup = (function() {
|
|
|
453
453
|
return GetAvailableAddressesRequestBody;
|
|
454
454
|
})();
|
|
455
455
|
|
|
456
|
+
startup.GetAvailableDomainsRequestBody = (function() {
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Properties of a GetAvailableDomainsRequestBody.
|
|
460
|
+
* @memberof startup
|
|
461
|
+
* @interface IGetAvailableDomainsRequestBody
|
|
462
|
+
* @property {common.IStringValue|null} [token] GetAvailableDomainsRequestBody token
|
|
463
|
+
*/
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Constructs a new GetAvailableDomainsRequestBody.
|
|
467
|
+
* @memberof startup
|
|
468
|
+
* @classdesc Represents a GetAvailableDomainsRequestBody.
|
|
469
|
+
* @implements IGetAvailableDomainsRequestBody
|
|
470
|
+
* @constructor
|
|
471
|
+
* @param {startup.IGetAvailableDomainsRequestBody=} [properties] Properties to set
|
|
472
|
+
*/
|
|
473
|
+
function GetAvailableDomainsRequestBody(properties) {
|
|
474
|
+
if (properties)
|
|
475
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
476
|
+
if (properties[keys[i]] != null)
|
|
477
|
+
this[keys[i]] = properties[keys[i]];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* GetAvailableDomainsRequestBody token.
|
|
482
|
+
* @member {common.IStringValue|null|undefined} token
|
|
483
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
484
|
+
* @instance
|
|
485
|
+
*/
|
|
486
|
+
GetAvailableDomainsRequestBody.prototype.token = null;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Creates a new GetAvailableDomainsRequestBody instance using the specified properties.
|
|
490
|
+
* @function create
|
|
491
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
492
|
+
* @static
|
|
493
|
+
* @param {startup.IGetAvailableDomainsRequestBody=} [properties] Properties to set
|
|
494
|
+
* @returns {startup.GetAvailableDomainsRequestBody} GetAvailableDomainsRequestBody instance
|
|
495
|
+
*/
|
|
496
|
+
GetAvailableDomainsRequestBody.create = function create(properties) {
|
|
497
|
+
return new GetAvailableDomainsRequestBody(properties);
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Encodes the specified GetAvailableDomainsRequestBody message. Does not implicitly {@link startup.GetAvailableDomainsRequestBody.verify|verify} messages.
|
|
502
|
+
* @function encode
|
|
503
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
504
|
+
* @static
|
|
505
|
+
* @param {startup.IGetAvailableDomainsRequestBody} message GetAvailableDomainsRequestBody message or plain object to encode
|
|
506
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
507
|
+
* @returns {$protobuf.Writer} Writer
|
|
508
|
+
*/
|
|
509
|
+
GetAvailableDomainsRequestBody.encode = function encode(message, writer) {
|
|
510
|
+
if (!writer)
|
|
511
|
+
writer = $Writer.create();
|
|
512
|
+
if (message.token != null && Object.hasOwnProperty.call(message, "token"))
|
|
513
|
+
$root.common.StringValue.encode(message.token, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
514
|
+
return writer;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Encodes the specified GetAvailableDomainsRequestBody message, length delimited. Does not implicitly {@link startup.GetAvailableDomainsRequestBody.verify|verify} messages.
|
|
519
|
+
* @function encodeDelimited
|
|
520
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
521
|
+
* @static
|
|
522
|
+
* @param {startup.IGetAvailableDomainsRequestBody} message GetAvailableDomainsRequestBody message or plain object to encode
|
|
523
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
524
|
+
* @returns {$protobuf.Writer} Writer
|
|
525
|
+
*/
|
|
526
|
+
GetAvailableDomainsRequestBody.encodeDelimited = function encodeDelimited(message, writer) {
|
|
527
|
+
return this.encode(message, writer).ldelim();
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Decodes a GetAvailableDomainsRequestBody message from the specified reader or buffer.
|
|
532
|
+
* @function decode
|
|
533
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
534
|
+
* @static
|
|
535
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
536
|
+
* @param {number} [length] Message length if known beforehand
|
|
537
|
+
* @returns {startup.GetAvailableDomainsRequestBody} GetAvailableDomainsRequestBody
|
|
538
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
539
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
540
|
+
*/
|
|
541
|
+
GetAvailableDomainsRequestBody.decode = function decode(reader, length) {
|
|
542
|
+
if (!(reader instanceof $Reader))
|
|
543
|
+
reader = $Reader.create(reader);
|
|
544
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.startup.GetAvailableDomainsRequestBody();
|
|
545
|
+
while (reader.pos < end) {
|
|
546
|
+
var tag = reader.uint32();
|
|
547
|
+
switch (tag >>> 3) {
|
|
548
|
+
case 2: {
|
|
549
|
+
message.token = $root.common.StringValue.decode(reader, reader.uint32());
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
default:
|
|
553
|
+
reader.skipType(tag & 7);
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return message;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Decodes a GetAvailableDomainsRequestBody message from the specified reader or buffer, length delimited.
|
|
562
|
+
* @function decodeDelimited
|
|
563
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
564
|
+
* @static
|
|
565
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
566
|
+
* @returns {startup.GetAvailableDomainsRequestBody} GetAvailableDomainsRequestBody
|
|
567
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
568
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
569
|
+
*/
|
|
570
|
+
GetAvailableDomainsRequestBody.decodeDelimited = function decodeDelimited(reader) {
|
|
571
|
+
if (!(reader instanceof $Reader))
|
|
572
|
+
reader = new $Reader(reader);
|
|
573
|
+
return this.decode(reader, reader.uint32());
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Verifies a GetAvailableDomainsRequestBody message.
|
|
578
|
+
* @function verify
|
|
579
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
580
|
+
* @static
|
|
581
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
582
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
583
|
+
*/
|
|
584
|
+
GetAvailableDomainsRequestBody.verify = function verify(message) {
|
|
585
|
+
if (typeof message !== "object" || message === null)
|
|
586
|
+
return "object expected";
|
|
587
|
+
if (message.token != null && message.hasOwnProperty("token")) {
|
|
588
|
+
var error = $root.common.StringValue.verify(message.token);
|
|
589
|
+
if (error)
|
|
590
|
+
return "token." + error;
|
|
591
|
+
}
|
|
592
|
+
return null;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Creates a GetAvailableDomainsRequestBody message from a plain object. Also converts values to their respective internal types.
|
|
597
|
+
* @function fromObject
|
|
598
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
599
|
+
* @static
|
|
600
|
+
* @param {Object.<string,*>} object Plain object
|
|
601
|
+
* @returns {startup.GetAvailableDomainsRequestBody} GetAvailableDomainsRequestBody
|
|
602
|
+
*/
|
|
603
|
+
GetAvailableDomainsRequestBody.fromObject = function fromObject(object) {
|
|
604
|
+
if (object instanceof $root.startup.GetAvailableDomainsRequestBody)
|
|
605
|
+
return object;
|
|
606
|
+
var message = new $root.startup.GetAvailableDomainsRequestBody();
|
|
607
|
+
if (object.token != null) {
|
|
608
|
+
if (typeof object.token !== "object")
|
|
609
|
+
throw TypeError(".startup.GetAvailableDomainsRequestBody.token: object expected");
|
|
610
|
+
message.token = $root.common.StringValue.fromObject(object.token);
|
|
611
|
+
}
|
|
612
|
+
return message;
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Creates a plain object from a GetAvailableDomainsRequestBody message. Also converts values to other types if specified.
|
|
617
|
+
* @function toObject
|
|
618
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
619
|
+
* @static
|
|
620
|
+
* @param {startup.GetAvailableDomainsRequestBody} message GetAvailableDomainsRequestBody
|
|
621
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
622
|
+
* @returns {Object.<string,*>} Plain object
|
|
623
|
+
*/
|
|
624
|
+
GetAvailableDomainsRequestBody.toObject = function toObject(message, options) {
|
|
625
|
+
if (!options)
|
|
626
|
+
options = {};
|
|
627
|
+
var object = {};
|
|
628
|
+
if (options.defaults)
|
|
629
|
+
object.token = null;
|
|
630
|
+
if (message.token != null && message.hasOwnProperty("token"))
|
|
631
|
+
object.token = $root.common.StringValue.toObject(message.token, options);
|
|
632
|
+
return object;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Converts this GetAvailableDomainsRequestBody to JSON.
|
|
637
|
+
* @function toJSON
|
|
638
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
639
|
+
* @instance
|
|
640
|
+
* @returns {Object.<string,*>} JSON object
|
|
641
|
+
*/
|
|
642
|
+
GetAvailableDomainsRequestBody.prototype.toJSON = function toJSON() {
|
|
643
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Gets the default type url for GetAvailableDomainsRequestBody
|
|
648
|
+
* @function getTypeUrl
|
|
649
|
+
* @memberof startup.GetAvailableDomainsRequestBody
|
|
650
|
+
* @static
|
|
651
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
652
|
+
* @returns {string} The default type url
|
|
653
|
+
*/
|
|
654
|
+
GetAvailableDomainsRequestBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
655
|
+
if (typeUrlPrefix === undefined) {
|
|
656
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
657
|
+
}
|
|
658
|
+
return typeUrlPrefix + "/startup.GetAvailableDomainsRequestBody";
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
return GetAvailableDomainsRequestBody;
|
|
662
|
+
})();
|
|
663
|
+
|
|
456
664
|
startup.AddUserRequestBody = (function() {
|
|
457
665
|
|
|
458
666
|
/**
|
package/package.json
CHANGED
package/protos/startup.proto
CHANGED
|
@@ -18,6 +18,12 @@ message GetAvailableAddressesRequestBody {
|
|
|
18
18
|
common.StringValue token = 2;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
// --- signUp.getAvailableDomians ---
|
|
22
|
+
// Reply body is common.StringArrayValue
|
|
23
|
+
message GetAvailableDomainsRequestBody {
|
|
24
|
+
common.StringValue token = 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
// --- signUp.addUser ---
|
|
22
28
|
// Reply body is common.BooleanValue
|
|
23
29
|
message AddUserRequestBody {
|