@sellout/models 0.0.337 → 0.0.338
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/enums/ContactsScreenEnum.d.ts +5 -0
- package/.dist/enums/ContactsScreenEnum.js +10 -0
- package/.dist/enums/ContactsScreenEnum.js.map +1 -0
- package/.dist/graphql/mutations/createContacts.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/createContacts.mutation.js +10 -0
- package/.dist/graphql/mutations/createContacts.mutation.js.map +1 -0
- package/.dist/graphql/mutations/updateContact.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateContact.mutation.js +17 -0
- package/.dist/graphql/mutations/updateContact.mutation.js.map +1 -0
- package/.dist/graphql/queries/userProfilesAdmin.query.js +3 -0
- package/.dist/graphql/queries/userProfilesAdmin.query.js.map +1 -1
- package/.dist/interfaces/IContact.d.ts +9 -0
- package/.dist/interfaces/IContact.js +3 -0
- package/.dist/interfaces/IContact.js.map +1 -0
- package/.dist/sellout-proto.js +2599 -157
- package/package.json +3 -3
- package/src/enums/ContactsScreenEnum.ts +5 -0
- package/src/graphql/mutations/createContacts.mutation.ts +9 -0
- package/src/graphql/mutations/updateContact.mutation.ts +16 -0
- package/src/graphql/queries/userProfilesAdmin.query.ts +3 -0
- package/src/interfaces/IContact.ts +9 -0
- package/src/proto/user-profile.proto +1 -0
- package/src/proto/user.proto +61 -0
package/.dist/sellout-proto.js
CHANGED
|
@@ -133045,6 +133045,7 @@ $root.UserProfileQuery = (function() {
|
|
|
133045
133045
|
* @property {string|null} [phoneNumber] UserProfileQuery phoneNumber
|
|
133046
133046
|
* @property {boolean|null} [any] UserProfileQuery any
|
|
133047
133047
|
* @property {string|null} [orgId] UserProfileQuery orgId
|
|
133048
|
+
* @property {string|null} [screenType] UserProfileQuery screenType
|
|
133048
133049
|
*/
|
|
133049
133050
|
|
|
133050
133051
|
/**
|
|
@@ -133138,6 +133139,14 @@ $root.UserProfileQuery = (function() {
|
|
|
133138
133139
|
*/
|
|
133139
133140
|
UserProfileQuery.prototype.orgId = "";
|
|
133140
133141
|
|
|
133142
|
+
/**
|
|
133143
|
+
* UserProfileQuery screenType.
|
|
133144
|
+
* @member {string} screenType
|
|
133145
|
+
* @memberof UserProfileQuery
|
|
133146
|
+
* @instance
|
|
133147
|
+
*/
|
|
133148
|
+
UserProfileQuery.prototype.screenType = "";
|
|
133149
|
+
|
|
133141
133150
|
/**
|
|
133142
133151
|
* Creates a new UserProfileQuery instance using the specified properties.
|
|
133143
133152
|
* @function create
|
|
@@ -133184,6 +133193,8 @@ $root.UserProfileQuery = (function() {
|
|
|
133184
133193
|
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.any);
|
|
133185
133194
|
if (message.orgId != null && Object.hasOwnProperty.call(message, "orgId"))
|
|
133186
133195
|
writer.uint32(/* id 8, wireType 2 =*/66).string(message.orgId);
|
|
133196
|
+
if (message.screenType != null && Object.hasOwnProperty.call(message, "screenType"))
|
|
133197
|
+
writer.uint32(/* id 9, wireType 2 =*/74).string(message.screenType);
|
|
133187
133198
|
return writer;
|
|
133188
133199
|
};
|
|
133189
133200
|
|
|
@@ -133253,6 +133264,9 @@ $root.UserProfileQuery = (function() {
|
|
|
133253
133264
|
case 8:
|
|
133254
133265
|
message.orgId = reader.string();
|
|
133255
133266
|
break;
|
|
133267
|
+
case 9:
|
|
133268
|
+
message.screenType = reader.string();
|
|
133269
|
+
break;
|
|
133256
133270
|
default:
|
|
133257
133271
|
reader.skipType(tag & 7);
|
|
133258
133272
|
break;
|
|
@@ -133331,6 +133345,9 @@ $root.UserProfileQuery = (function() {
|
|
|
133331
133345
|
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
133332
133346
|
if (!$util.isString(message.orgId))
|
|
133333
133347
|
return "orgId: string expected";
|
|
133348
|
+
if (message.screenType != null && message.hasOwnProperty("screenType"))
|
|
133349
|
+
if (!$util.isString(message.screenType))
|
|
133350
|
+
return "screenType: string expected";
|
|
133334
133351
|
return null;
|
|
133335
133352
|
};
|
|
133336
133353
|
|
|
@@ -133384,6 +133401,8 @@ $root.UserProfileQuery = (function() {
|
|
|
133384
133401
|
message.any = Boolean(object.any);
|
|
133385
133402
|
if (object.orgId != null)
|
|
133386
133403
|
message.orgId = String(object.orgId);
|
|
133404
|
+
if (object.screenType != null)
|
|
133405
|
+
message.screenType = String(object.screenType);
|
|
133387
133406
|
return message;
|
|
133388
133407
|
};
|
|
133389
133408
|
|
|
@@ -133412,6 +133431,7 @@ $root.UserProfileQuery = (function() {
|
|
|
133412
133431
|
object.phoneNumber = "";
|
|
133413
133432
|
object.any = false;
|
|
133414
133433
|
object.orgId = "";
|
|
133434
|
+
object.screenType = "";
|
|
133415
133435
|
}
|
|
133416
133436
|
if (message.eventIds && message.eventIds.length) {
|
|
133417
133437
|
object.eventIds = [];
|
|
@@ -133443,6 +133463,8 @@ $root.UserProfileQuery = (function() {
|
|
|
133443
133463
|
object.any = message.any;
|
|
133444
133464
|
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
133445
133465
|
object.orgId = message.orgId;
|
|
133466
|
+
if (message.screenType != null && message.hasOwnProperty("screenType"))
|
|
133467
|
+
object.screenType = message.screenType;
|
|
133446
133468
|
return object;
|
|
133447
133469
|
};
|
|
133448
133470
|
|
|
@@ -149565,214 +149587,2535 @@ $root.DeleteUnverifiedUserResponse = (function() {
|
|
|
149565
149587
|
return DeleteUnverifiedUserResponse;
|
|
149566
149588
|
})();
|
|
149567
149589
|
|
|
149568
|
-
$root.
|
|
149569
|
-
|
|
149570
|
-
/**
|
|
149571
|
-
* Constructs a new UserService service.
|
|
149572
|
-
* @exports UserService
|
|
149573
|
-
* @classdesc Represents a UserService
|
|
149574
|
-
* @extends $protobuf.rpc.Service
|
|
149575
|
-
* @constructor
|
|
149576
|
-
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
149577
|
-
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
149578
|
-
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
149579
|
-
*/
|
|
149580
|
-
function UserService(rpcImpl, requestDelimited, responseDelimited) {
|
|
149581
|
-
$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
|
149582
|
-
}
|
|
149583
|
-
|
|
149584
|
-
(UserService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserService;
|
|
149590
|
+
$root.Contact = (function() {
|
|
149585
149591
|
|
|
149586
149592
|
/**
|
|
149587
|
-
*
|
|
149588
|
-
* @
|
|
149589
|
-
* @
|
|
149590
|
-
* @
|
|
149591
|
-
* @
|
|
149592
|
-
* @
|
|
149593
|
-
* @
|
|
149594
|
-
* @
|
|
149593
|
+
* Properties of a Contact.
|
|
149594
|
+
* @exports IContact
|
|
149595
|
+
* @interface IContact
|
|
149596
|
+
* @property {string|null} [_id] Contact _id
|
|
149597
|
+
* @property {string|null} [firstName] Contact firstName
|
|
149598
|
+
* @property {string|null} [lastName] Contact lastName
|
|
149599
|
+
* @property {string|null} [userId] Contact userId
|
|
149600
|
+
* @property {string|null} [orgId] Contact orgId
|
|
149601
|
+
* @property {string|null} [email] Contact email
|
|
149602
|
+
* @property {number|null} [createdAt] Contact createdAt
|
|
149595
149603
|
*/
|
|
149596
|
-
UserService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
|
149597
|
-
return new this(rpcImpl, requestDelimited, responseDelimited);
|
|
149598
|
-
};
|
|
149599
149604
|
|
|
149600
149605
|
/**
|
|
149601
|
-
*
|
|
149602
|
-
* @
|
|
149603
|
-
* @
|
|
149604
|
-
* @
|
|
149605
|
-
* @
|
|
149606
|
-
* @param {
|
|
149606
|
+
* Constructs a new Contact.
|
|
149607
|
+
* @exports Contact
|
|
149608
|
+
* @classdesc Represents a Contact.
|
|
149609
|
+
* @implements IContact
|
|
149610
|
+
* @constructor
|
|
149611
|
+
* @param {IContact=} [properties] Properties to set
|
|
149607
149612
|
*/
|
|
149613
|
+
function Contact(properties) {
|
|
149614
|
+
if (properties)
|
|
149615
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
149616
|
+
if (properties[keys[i]] != null)
|
|
149617
|
+
this[keys[i]] = properties[keys[i]];
|
|
149618
|
+
}
|
|
149608
149619
|
|
|
149609
149620
|
/**
|
|
149610
|
-
*
|
|
149611
|
-
* @
|
|
149612
|
-
* @memberof
|
|
149621
|
+
* Contact _id.
|
|
149622
|
+
* @member {string} _id
|
|
149623
|
+
* @memberof Contact
|
|
149613
149624
|
* @instance
|
|
149614
|
-
* @param {ICreateUserRequest} request CreateUserRequest message or plain object
|
|
149615
|
-
* @param {UserService.createUserCallback} callback Node-style callback called with the error, if any, and CreateUserResponse
|
|
149616
|
-
* @returns {undefined}
|
|
149617
|
-
* @variation 1
|
|
149618
149625
|
*/
|
|
149619
|
-
|
|
149620
|
-
return this.rpcCall(createUser, $root.CreateUserRequest, $root.CreateUserResponse, request, callback);
|
|
149621
|
-
}, "name", { value: "createUser" });
|
|
149626
|
+
Contact.prototype._id = "";
|
|
149622
149627
|
|
|
149623
149628
|
/**
|
|
149624
|
-
*
|
|
149625
|
-
* @
|
|
149626
|
-
* @memberof
|
|
149629
|
+
* Contact firstName.
|
|
149630
|
+
* @member {string} firstName
|
|
149631
|
+
* @memberof Contact
|
|
149627
149632
|
* @instance
|
|
149628
|
-
* @param {ICreateUserRequest} request CreateUserRequest message or plain object
|
|
149629
|
-
* @returns {Promise<CreateUserResponse>} Promise
|
|
149630
|
-
* @variation 2
|
|
149631
|
-
*/
|
|
149632
|
-
|
|
149633
|
-
/**
|
|
149634
|
-
* Callback as used by {@link UserService#sendUserEmailVerification}.
|
|
149635
|
-
* @memberof UserService
|
|
149636
|
-
* @typedef sendUserEmailVerificationCallback
|
|
149637
|
-
* @type {function}
|
|
149638
|
-
* @param {Error|null} error Error, if any
|
|
149639
|
-
* @param {SendUserEmailVerificationResponse} [response] SendUserEmailVerificationResponse
|
|
149640
149633
|
*/
|
|
149634
|
+
Contact.prototype.firstName = "";
|
|
149641
149635
|
|
|
149642
149636
|
/**
|
|
149643
|
-
*
|
|
149644
|
-
* @
|
|
149645
|
-
* @memberof
|
|
149637
|
+
* Contact lastName.
|
|
149638
|
+
* @member {string} lastName
|
|
149639
|
+
* @memberof Contact
|
|
149646
149640
|
* @instance
|
|
149647
|
-
* @param {ISendUserEmailVerificationRequest} request SendUserEmailVerificationRequest message or plain object
|
|
149648
|
-
* @param {UserService.sendUserEmailVerificationCallback} callback Node-style callback called with the error, if any, and SendUserEmailVerificationResponse
|
|
149649
|
-
* @returns {undefined}
|
|
149650
|
-
* @variation 1
|
|
149651
149641
|
*/
|
|
149652
|
-
|
|
149653
|
-
return this.rpcCall(sendUserEmailVerification, $root.SendUserEmailVerificationRequest, $root.SendUserEmailVerificationResponse, request, callback);
|
|
149654
|
-
}, "name", { value: "sendUserEmailVerification" });
|
|
149642
|
+
Contact.prototype.lastName = "";
|
|
149655
149643
|
|
|
149656
149644
|
/**
|
|
149657
|
-
*
|
|
149658
|
-
* @
|
|
149659
|
-
* @memberof
|
|
149645
|
+
* Contact userId.
|
|
149646
|
+
* @member {string} userId
|
|
149647
|
+
* @memberof Contact
|
|
149660
149648
|
* @instance
|
|
149661
|
-
* @param {ISendUserEmailVerificationRequest} request SendUserEmailVerificationRequest message or plain object
|
|
149662
|
-
* @returns {Promise<SendUserEmailVerificationResponse>} Promise
|
|
149663
|
-
* @variation 2
|
|
149664
|
-
*/
|
|
149665
|
-
|
|
149666
|
-
/**
|
|
149667
|
-
* Callback as used by {@link UserService#verifyUserEmail}.
|
|
149668
|
-
* @memberof UserService
|
|
149669
|
-
* @typedef verifyUserEmailCallback
|
|
149670
|
-
* @type {function}
|
|
149671
|
-
* @param {Error|null} error Error, if any
|
|
149672
|
-
* @param {VerifyUserEmailResponse} [response] VerifyUserEmailResponse
|
|
149673
149649
|
*/
|
|
149650
|
+
Contact.prototype.userId = "";
|
|
149674
149651
|
|
|
149675
149652
|
/**
|
|
149676
|
-
*
|
|
149677
|
-
* @
|
|
149678
|
-
* @memberof
|
|
149653
|
+
* Contact orgId.
|
|
149654
|
+
* @member {string} orgId
|
|
149655
|
+
* @memberof Contact
|
|
149679
149656
|
* @instance
|
|
149680
|
-
* @param {IVerifyUserEmailRequest} request VerifyUserEmailRequest message or plain object
|
|
149681
|
-
* @param {UserService.verifyUserEmailCallback} callback Node-style callback called with the error, if any, and VerifyUserEmailResponse
|
|
149682
|
-
* @returns {undefined}
|
|
149683
|
-
* @variation 1
|
|
149684
149657
|
*/
|
|
149685
|
-
|
|
149686
|
-
return this.rpcCall(verifyUserEmail, $root.VerifyUserEmailRequest, $root.VerifyUserEmailResponse, request, callback);
|
|
149687
|
-
}, "name", { value: "verifyUserEmail" });
|
|
149658
|
+
Contact.prototype.orgId = "";
|
|
149688
149659
|
|
|
149689
149660
|
/**
|
|
149690
|
-
*
|
|
149691
|
-
* @
|
|
149692
|
-
* @memberof
|
|
149661
|
+
* Contact email.
|
|
149662
|
+
* @member {string} email
|
|
149663
|
+
* @memberof Contact
|
|
149693
149664
|
* @instance
|
|
149694
|
-
* @param {IVerifyUserEmailRequest} request VerifyUserEmailRequest message or plain object
|
|
149695
|
-
* @returns {Promise<VerifyUserEmailResponse>} Promise
|
|
149696
|
-
* @variation 2
|
|
149697
|
-
*/
|
|
149698
|
-
|
|
149699
|
-
/**
|
|
149700
|
-
* Callback as used by {@link UserService#sendUserPhoneVerification}.
|
|
149701
|
-
* @memberof UserService
|
|
149702
|
-
* @typedef sendUserPhoneVerificationCallback
|
|
149703
|
-
* @type {function}
|
|
149704
|
-
* @param {Error|null} error Error, if any
|
|
149705
|
-
* @param {SendUserPhoneVerificationResponse} [response] SendUserPhoneVerificationResponse
|
|
149706
149665
|
*/
|
|
149666
|
+
Contact.prototype.email = "";
|
|
149707
149667
|
|
|
149708
149668
|
/**
|
|
149709
|
-
*
|
|
149710
|
-
* @
|
|
149711
|
-
* @memberof
|
|
149669
|
+
* Contact createdAt.
|
|
149670
|
+
* @member {number} createdAt
|
|
149671
|
+
* @memberof Contact
|
|
149712
149672
|
* @instance
|
|
149713
|
-
* @param {ISendUserPhoneVerificationRequest} request SendUserPhoneVerificationRequest message or plain object
|
|
149714
|
-
* @param {UserService.sendUserPhoneVerificationCallback} callback Node-style callback called with the error, if any, and SendUserPhoneVerificationResponse
|
|
149715
|
-
* @returns {undefined}
|
|
149716
|
-
* @variation 1
|
|
149717
149673
|
*/
|
|
149718
|
-
|
|
149719
|
-
return this.rpcCall(sendUserPhoneVerification, $root.SendUserPhoneVerificationRequest, $root.SendUserPhoneVerificationResponse, request, callback);
|
|
149720
|
-
}, "name", { value: "sendUserPhoneVerification" });
|
|
149674
|
+
Contact.prototype.createdAt = 0;
|
|
149721
149675
|
|
|
149722
149676
|
/**
|
|
149723
|
-
*
|
|
149724
|
-
* @function
|
|
149725
|
-
* @memberof
|
|
149726
|
-
* @
|
|
149727
|
-
* @param {
|
|
149728
|
-
* @returns {
|
|
149729
|
-
* @variation 2
|
|
149677
|
+
* Creates a new Contact instance using the specified properties.
|
|
149678
|
+
* @function create
|
|
149679
|
+
* @memberof Contact
|
|
149680
|
+
* @static
|
|
149681
|
+
* @param {IContact=} [properties] Properties to set
|
|
149682
|
+
* @returns {Contact} Contact instance
|
|
149730
149683
|
*/
|
|
149684
|
+
Contact.create = function create(properties) {
|
|
149685
|
+
return new Contact(properties);
|
|
149686
|
+
};
|
|
149731
149687
|
|
|
149732
149688
|
/**
|
|
149733
|
-
*
|
|
149734
|
-
* @
|
|
149735
|
-
* @
|
|
149736
|
-
* @
|
|
149737
|
-
* @param {
|
|
149738
|
-
* @param {
|
|
149689
|
+
* Encodes the specified Contact message. Does not implicitly {@link Contact.verify|verify} messages.
|
|
149690
|
+
* @function encode
|
|
149691
|
+
* @memberof Contact
|
|
149692
|
+
* @static
|
|
149693
|
+
* @param {IContact} message Contact message or plain object to encode
|
|
149694
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
149695
|
+
* @returns {$protobuf.Writer} Writer
|
|
149739
149696
|
*/
|
|
149697
|
+
Contact.encode = function encode(message, writer) {
|
|
149698
|
+
if (!writer)
|
|
149699
|
+
writer = $Writer.create();
|
|
149700
|
+
if (message._id != null && Object.hasOwnProperty.call(message, "_id"))
|
|
149701
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message._id);
|
|
149702
|
+
if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName"))
|
|
149703
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstName);
|
|
149704
|
+
if (message.lastName != null && Object.hasOwnProperty.call(message, "lastName"))
|
|
149705
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.lastName);
|
|
149706
|
+
if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
|
|
149707
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
|
|
149708
|
+
if (message.orgId != null && Object.hasOwnProperty.call(message, "orgId"))
|
|
149709
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.orgId);
|
|
149710
|
+
if (message.email != null && Object.hasOwnProperty.call(message, "email"))
|
|
149711
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.email);
|
|
149712
|
+
if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt"))
|
|
149713
|
+
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.createdAt);
|
|
149714
|
+
return writer;
|
|
149715
|
+
};
|
|
149740
149716
|
|
|
149741
149717
|
/**
|
|
149742
|
-
*
|
|
149743
|
-
* @function
|
|
149744
|
-
* @memberof
|
|
149745
|
-
* @
|
|
149746
|
-
* @param {
|
|
149747
|
-
* @param {
|
|
149748
|
-
* @returns {
|
|
149749
|
-
* @variation 1
|
|
149718
|
+
* Encodes the specified Contact message, length delimited. Does not implicitly {@link Contact.verify|verify} messages.
|
|
149719
|
+
* @function encodeDelimited
|
|
149720
|
+
* @memberof Contact
|
|
149721
|
+
* @static
|
|
149722
|
+
* @param {IContact} message Contact message or plain object to encode
|
|
149723
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
149724
|
+
* @returns {$protobuf.Writer} Writer
|
|
149750
149725
|
*/
|
|
149751
|
-
|
|
149752
|
-
return this.
|
|
149753
|
-
}
|
|
149726
|
+
Contact.encodeDelimited = function encodeDelimited(message, writer) {
|
|
149727
|
+
return this.encode(message, writer).ldelim();
|
|
149728
|
+
};
|
|
149754
149729
|
|
|
149755
149730
|
/**
|
|
149756
|
-
*
|
|
149757
|
-
* @function
|
|
149758
|
-
* @memberof
|
|
149759
|
-
* @
|
|
149760
|
-
* @param {
|
|
149761
|
-
* @
|
|
149762
|
-
* @
|
|
149731
|
+
* Decodes a Contact message from the specified reader or buffer.
|
|
149732
|
+
* @function decode
|
|
149733
|
+
* @memberof Contact
|
|
149734
|
+
* @static
|
|
149735
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
149736
|
+
* @param {number} [length] Message length if known beforehand
|
|
149737
|
+
* @returns {Contact} Contact
|
|
149738
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
149739
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
149763
149740
|
*/
|
|
149741
|
+
Contact.decode = function decode(reader, length) {
|
|
149742
|
+
if (!(reader instanceof $Reader))
|
|
149743
|
+
reader = $Reader.create(reader);
|
|
149744
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Contact();
|
|
149745
|
+
while (reader.pos < end) {
|
|
149746
|
+
var tag = reader.uint32();
|
|
149747
|
+
switch (tag >>> 3) {
|
|
149748
|
+
case 0:
|
|
149749
|
+
message._id = reader.string();
|
|
149750
|
+
break;
|
|
149751
|
+
case 1:
|
|
149752
|
+
message.firstName = reader.string();
|
|
149753
|
+
break;
|
|
149754
|
+
case 2:
|
|
149755
|
+
message.lastName = reader.string();
|
|
149756
|
+
break;
|
|
149757
|
+
case 3:
|
|
149758
|
+
message.userId = reader.string();
|
|
149759
|
+
break;
|
|
149760
|
+
case 4:
|
|
149761
|
+
message.orgId = reader.string();
|
|
149762
|
+
break;
|
|
149763
|
+
case 5:
|
|
149764
|
+
message.email = reader.string();
|
|
149765
|
+
break;
|
|
149766
|
+
case 6:
|
|
149767
|
+
message.createdAt = reader.int32();
|
|
149768
|
+
break;
|
|
149769
|
+
default:
|
|
149770
|
+
reader.skipType(tag & 7);
|
|
149771
|
+
break;
|
|
149772
|
+
}
|
|
149773
|
+
}
|
|
149774
|
+
return message;
|
|
149775
|
+
};
|
|
149764
149776
|
|
|
149765
149777
|
/**
|
|
149766
|
-
*
|
|
149767
|
-
* @
|
|
149768
|
-
* @
|
|
149769
|
-
* @
|
|
149770
|
-
* @param {
|
|
149771
|
-
* @
|
|
149778
|
+
* Decodes a Contact message from the specified reader or buffer, length delimited.
|
|
149779
|
+
* @function decodeDelimited
|
|
149780
|
+
* @memberof Contact
|
|
149781
|
+
* @static
|
|
149782
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
149783
|
+
* @returns {Contact} Contact
|
|
149784
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
149785
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
149772
149786
|
*/
|
|
149787
|
+
Contact.decodeDelimited = function decodeDelimited(reader) {
|
|
149788
|
+
if (!(reader instanceof $Reader))
|
|
149789
|
+
reader = new $Reader(reader);
|
|
149790
|
+
return this.decode(reader, reader.uint32());
|
|
149791
|
+
};
|
|
149773
149792
|
|
|
149774
149793
|
/**
|
|
149775
|
-
*
|
|
149794
|
+
* Verifies a Contact message.
|
|
149795
|
+
* @function verify
|
|
149796
|
+
* @memberof Contact
|
|
149797
|
+
* @static
|
|
149798
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
149799
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
149800
|
+
*/
|
|
149801
|
+
Contact.verify = function verify(message) {
|
|
149802
|
+
if (typeof message !== "object" || message === null)
|
|
149803
|
+
return "object expected";
|
|
149804
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
149805
|
+
if (!$util.isString(message._id))
|
|
149806
|
+
return "_id: string expected";
|
|
149807
|
+
if (message.firstName != null && message.hasOwnProperty("firstName"))
|
|
149808
|
+
if (!$util.isString(message.firstName))
|
|
149809
|
+
return "firstName: string expected";
|
|
149810
|
+
if (message.lastName != null && message.hasOwnProperty("lastName"))
|
|
149811
|
+
if (!$util.isString(message.lastName))
|
|
149812
|
+
return "lastName: string expected";
|
|
149813
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
149814
|
+
if (!$util.isString(message.userId))
|
|
149815
|
+
return "userId: string expected";
|
|
149816
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
149817
|
+
if (!$util.isString(message.orgId))
|
|
149818
|
+
return "orgId: string expected";
|
|
149819
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
149820
|
+
if (!$util.isString(message.email))
|
|
149821
|
+
return "email: string expected";
|
|
149822
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
149823
|
+
if (!$util.isInteger(message.createdAt))
|
|
149824
|
+
return "createdAt: integer expected";
|
|
149825
|
+
return null;
|
|
149826
|
+
};
|
|
149827
|
+
|
|
149828
|
+
/**
|
|
149829
|
+
* Creates a Contact message from a plain object. Also converts values to their respective internal types.
|
|
149830
|
+
* @function fromObject
|
|
149831
|
+
* @memberof Contact
|
|
149832
|
+
* @static
|
|
149833
|
+
* @param {Object.<string,*>} object Plain object
|
|
149834
|
+
* @returns {Contact} Contact
|
|
149835
|
+
*/
|
|
149836
|
+
Contact.fromObject = function fromObject(object) {
|
|
149837
|
+
if (object instanceof $root.Contact)
|
|
149838
|
+
return object;
|
|
149839
|
+
var message = new $root.Contact();
|
|
149840
|
+
if (object._id != null)
|
|
149841
|
+
message._id = String(object._id);
|
|
149842
|
+
if (object.firstName != null)
|
|
149843
|
+
message.firstName = String(object.firstName);
|
|
149844
|
+
if (object.lastName != null)
|
|
149845
|
+
message.lastName = String(object.lastName);
|
|
149846
|
+
if (object.userId != null)
|
|
149847
|
+
message.userId = String(object.userId);
|
|
149848
|
+
if (object.orgId != null)
|
|
149849
|
+
message.orgId = String(object.orgId);
|
|
149850
|
+
if (object.email != null)
|
|
149851
|
+
message.email = String(object.email);
|
|
149852
|
+
if (object.createdAt != null)
|
|
149853
|
+
message.createdAt = object.createdAt | 0;
|
|
149854
|
+
return message;
|
|
149855
|
+
};
|
|
149856
|
+
|
|
149857
|
+
/**
|
|
149858
|
+
* Creates a plain object from a Contact message. Also converts values to other types if specified.
|
|
149859
|
+
* @function toObject
|
|
149860
|
+
* @memberof Contact
|
|
149861
|
+
* @static
|
|
149862
|
+
* @param {Contact} message Contact
|
|
149863
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
149864
|
+
* @returns {Object.<string,*>} Plain object
|
|
149865
|
+
*/
|
|
149866
|
+
Contact.toObject = function toObject(message, options) {
|
|
149867
|
+
if (!options)
|
|
149868
|
+
options = {};
|
|
149869
|
+
var object = {};
|
|
149870
|
+
if (options.defaults) {
|
|
149871
|
+
object._id = "";
|
|
149872
|
+
object.firstName = "";
|
|
149873
|
+
object.lastName = "";
|
|
149874
|
+
object.userId = "";
|
|
149875
|
+
object.orgId = "";
|
|
149876
|
+
object.email = "";
|
|
149877
|
+
object.createdAt = 0;
|
|
149878
|
+
}
|
|
149879
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
149880
|
+
object._id = message._id;
|
|
149881
|
+
if (message.firstName != null && message.hasOwnProperty("firstName"))
|
|
149882
|
+
object.firstName = message.firstName;
|
|
149883
|
+
if (message.lastName != null && message.hasOwnProperty("lastName"))
|
|
149884
|
+
object.lastName = message.lastName;
|
|
149885
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
149886
|
+
object.userId = message.userId;
|
|
149887
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
149888
|
+
object.orgId = message.orgId;
|
|
149889
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
149890
|
+
object.email = message.email;
|
|
149891
|
+
if (message.createdAt != null && message.hasOwnProperty("createdAt"))
|
|
149892
|
+
object.createdAt = message.createdAt;
|
|
149893
|
+
return object;
|
|
149894
|
+
};
|
|
149895
|
+
|
|
149896
|
+
/**
|
|
149897
|
+
* Converts this Contact to JSON.
|
|
149898
|
+
* @function toJSON
|
|
149899
|
+
* @memberof Contact
|
|
149900
|
+
* @instance
|
|
149901
|
+
* @returns {Object.<string,*>} JSON object
|
|
149902
|
+
*/
|
|
149903
|
+
Contact.prototype.toJSON = function toJSON() {
|
|
149904
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
149905
|
+
};
|
|
149906
|
+
|
|
149907
|
+
return Contact;
|
|
149908
|
+
})();
|
|
149909
|
+
|
|
149910
|
+
$root.CreateContactRequest = (function() {
|
|
149911
|
+
|
|
149912
|
+
/**
|
|
149913
|
+
* Properties of a CreateContactRequest.
|
|
149914
|
+
* @exports ICreateContactRequest
|
|
149915
|
+
* @interface ICreateContactRequest
|
|
149916
|
+
* @property {string|null} [spanContext] CreateContactRequest spanContext
|
|
149917
|
+
* @property {string|null} [orgId] CreateContactRequest orgId
|
|
149918
|
+
* @property {Array.<IContact>|null} [contact] CreateContactRequest contact
|
|
149919
|
+
*/
|
|
149920
|
+
|
|
149921
|
+
/**
|
|
149922
|
+
* Constructs a new CreateContactRequest.
|
|
149923
|
+
* @exports CreateContactRequest
|
|
149924
|
+
* @classdesc Represents a CreateContactRequest.
|
|
149925
|
+
* @implements ICreateContactRequest
|
|
149926
|
+
* @constructor
|
|
149927
|
+
* @param {ICreateContactRequest=} [properties] Properties to set
|
|
149928
|
+
*/
|
|
149929
|
+
function CreateContactRequest(properties) {
|
|
149930
|
+
this.contact = [];
|
|
149931
|
+
if (properties)
|
|
149932
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
149933
|
+
if (properties[keys[i]] != null)
|
|
149934
|
+
this[keys[i]] = properties[keys[i]];
|
|
149935
|
+
}
|
|
149936
|
+
|
|
149937
|
+
/**
|
|
149938
|
+
* CreateContactRequest spanContext.
|
|
149939
|
+
* @member {string} spanContext
|
|
149940
|
+
* @memberof CreateContactRequest
|
|
149941
|
+
* @instance
|
|
149942
|
+
*/
|
|
149943
|
+
CreateContactRequest.prototype.spanContext = "";
|
|
149944
|
+
|
|
149945
|
+
/**
|
|
149946
|
+
* CreateContactRequest orgId.
|
|
149947
|
+
* @member {string} orgId
|
|
149948
|
+
* @memberof CreateContactRequest
|
|
149949
|
+
* @instance
|
|
149950
|
+
*/
|
|
149951
|
+
CreateContactRequest.prototype.orgId = "";
|
|
149952
|
+
|
|
149953
|
+
/**
|
|
149954
|
+
* CreateContactRequest contact.
|
|
149955
|
+
* @member {Array.<IContact>} contact
|
|
149956
|
+
* @memberof CreateContactRequest
|
|
149957
|
+
* @instance
|
|
149958
|
+
*/
|
|
149959
|
+
CreateContactRequest.prototype.contact = $util.emptyArray;
|
|
149960
|
+
|
|
149961
|
+
/**
|
|
149962
|
+
* Creates a new CreateContactRequest instance using the specified properties.
|
|
149963
|
+
* @function create
|
|
149964
|
+
* @memberof CreateContactRequest
|
|
149965
|
+
* @static
|
|
149966
|
+
* @param {ICreateContactRequest=} [properties] Properties to set
|
|
149967
|
+
* @returns {CreateContactRequest} CreateContactRequest instance
|
|
149968
|
+
*/
|
|
149969
|
+
CreateContactRequest.create = function create(properties) {
|
|
149970
|
+
return new CreateContactRequest(properties);
|
|
149971
|
+
};
|
|
149972
|
+
|
|
149973
|
+
/**
|
|
149974
|
+
* Encodes the specified CreateContactRequest message. Does not implicitly {@link CreateContactRequest.verify|verify} messages.
|
|
149975
|
+
* @function encode
|
|
149976
|
+
* @memberof CreateContactRequest
|
|
149977
|
+
* @static
|
|
149978
|
+
* @param {ICreateContactRequest} message CreateContactRequest message or plain object to encode
|
|
149979
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
149980
|
+
* @returns {$protobuf.Writer} Writer
|
|
149981
|
+
*/
|
|
149982
|
+
CreateContactRequest.encode = function encode(message, writer) {
|
|
149983
|
+
if (!writer)
|
|
149984
|
+
writer = $Writer.create();
|
|
149985
|
+
if (message.spanContext != null && Object.hasOwnProperty.call(message, "spanContext"))
|
|
149986
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message.spanContext);
|
|
149987
|
+
if (message.orgId != null && Object.hasOwnProperty.call(message, "orgId"))
|
|
149988
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.orgId);
|
|
149989
|
+
if (message.contact != null && message.contact.length)
|
|
149990
|
+
for (var i = 0; i < message.contact.length; ++i)
|
|
149991
|
+
$root.Contact.encode(message.contact[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
149992
|
+
return writer;
|
|
149993
|
+
};
|
|
149994
|
+
|
|
149995
|
+
/**
|
|
149996
|
+
* Encodes the specified CreateContactRequest message, length delimited. Does not implicitly {@link CreateContactRequest.verify|verify} messages.
|
|
149997
|
+
* @function encodeDelimited
|
|
149998
|
+
* @memberof CreateContactRequest
|
|
149999
|
+
* @static
|
|
150000
|
+
* @param {ICreateContactRequest} message CreateContactRequest message or plain object to encode
|
|
150001
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150002
|
+
* @returns {$protobuf.Writer} Writer
|
|
150003
|
+
*/
|
|
150004
|
+
CreateContactRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
150005
|
+
return this.encode(message, writer).ldelim();
|
|
150006
|
+
};
|
|
150007
|
+
|
|
150008
|
+
/**
|
|
150009
|
+
* Decodes a CreateContactRequest message from the specified reader or buffer.
|
|
150010
|
+
* @function decode
|
|
150011
|
+
* @memberof CreateContactRequest
|
|
150012
|
+
* @static
|
|
150013
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150014
|
+
* @param {number} [length] Message length if known beforehand
|
|
150015
|
+
* @returns {CreateContactRequest} CreateContactRequest
|
|
150016
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150017
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150018
|
+
*/
|
|
150019
|
+
CreateContactRequest.decode = function decode(reader, length) {
|
|
150020
|
+
if (!(reader instanceof $Reader))
|
|
150021
|
+
reader = $Reader.create(reader);
|
|
150022
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CreateContactRequest();
|
|
150023
|
+
while (reader.pos < end) {
|
|
150024
|
+
var tag = reader.uint32();
|
|
150025
|
+
switch (tag >>> 3) {
|
|
150026
|
+
case 0:
|
|
150027
|
+
message.spanContext = reader.string();
|
|
150028
|
+
break;
|
|
150029
|
+
case 1:
|
|
150030
|
+
message.orgId = reader.string();
|
|
150031
|
+
break;
|
|
150032
|
+
case 2:
|
|
150033
|
+
if (!(message.contact && message.contact.length))
|
|
150034
|
+
message.contact = [];
|
|
150035
|
+
message.contact.push($root.Contact.decode(reader, reader.uint32()));
|
|
150036
|
+
break;
|
|
150037
|
+
default:
|
|
150038
|
+
reader.skipType(tag & 7);
|
|
150039
|
+
break;
|
|
150040
|
+
}
|
|
150041
|
+
}
|
|
150042
|
+
return message;
|
|
150043
|
+
};
|
|
150044
|
+
|
|
150045
|
+
/**
|
|
150046
|
+
* Decodes a CreateContactRequest message from the specified reader or buffer, length delimited.
|
|
150047
|
+
* @function decodeDelimited
|
|
150048
|
+
* @memberof CreateContactRequest
|
|
150049
|
+
* @static
|
|
150050
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150051
|
+
* @returns {CreateContactRequest} CreateContactRequest
|
|
150052
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150053
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150054
|
+
*/
|
|
150055
|
+
CreateContactRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
150056
|
+
if (!(reader instanceof $Reader))
|
|
150057
|
+
reader = new $Reader(reader);
|
|
150058
|
+
return this.decode(reader, reader.uint32());
|
|
150059
|
+
};
|
|
150060
|
+
|
|
150061
|
+
/**
|
|
150062
|
+
* Verifies a CreateContactRequest message.
|
|
150063
|
+
* @function verify
|
|
150064
|
+
* @memberof CreateContactRequest
|
|
150065
|
+
* @static
|
|
150066
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
150067
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
150068
|
+
*/
|
|
150069
|
+
CreateContactRequest.verify = function verify(message) {
|
|
150070
|
+
if (typeof message !== "object" || message === null)
|
|
150071
|
+
return "object expected";
|
|
150072
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
150073
|
+
if (!$util.isString(message.spanContext))
|
|
150074
|
+
return "spanContext: string expected";
|
|
150075
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
150076
|
+
if (!$util.isString(message.orgId))
|
|
150077
|
+
return "orgId: string expected";
|
|
150078
|
+
if (message.contact != null && message.hasOwnProperty("contact")) {
|
|
150079
|
+
if (!Array.isArray(message.contact))
|
|
150080
|
+
return "contact: array expected";
|
|
150081
|
+
for (var i = 0; i < message.contact.length; ++i) {
|
|
150082
|
+
var error = $root.Contact.verify(message.contact[i]);
|
|
150083
|
+
if (error)
|
|
150084
|
+
return "contact." + error;
|
|
150085
|
+
}
|
|
150086
|
+
}
|
|
150087
|
+
return null;
|
|
150088
|
+
};
|
|
150089
|
+
|
|
150090
|
+
/**
|
|
150091
|
+
* Creates a CreateContactRequest message from a plain object. Also converts values to their respective internal types.
|
|
150092
|
+
* @function fromObject
|
|
150093
|
+
* @memberof CreateContactRequest
|
|
150094
|
+
* @static
|
|
150095
|
+
* @param {Object.<string,*>} object Plain object
|
|
150096
|
+
* @returns {CreateContactRequest} CreateContactRequest
|
|
150097
|
+
*/
|
|
150098
|
+
CreateContactRequest.fromObject = function fromObject(object) {
|
|
150099
|
+
if (object instanceof $root.CreateContactRequest)
|
|
150100
|
+
return object;
|
|
150101
|
+
var message = new $root.CreateContactRequest();
|
|
150102
|
+
if (object.spanContext != null)
|
|
150103
|
+
message.spanContext = String(object.spanContext);
|
|
150104
|
+
if (object.orgId != null)
|
|
150105
|
+
message.orgId = String(object.orgId);
|
|
150106
|
+
if (object.contact) {
|
|
150107
|
+
if (!Array.isArray(object.contact))
|
|
150108
|
+
throw TypeError(".CreateContactRequest.contact: array expected");
|
|
150109
|
+
message.contact = [];
|
|
150110
|
+
for (var i = 0; i < object.contact.length; ++i) {
|
|
150111
|
+
if (typeof object.contact[i] !== "object")
|
|
150112
|
+
throw TypeError(".CreateContactRequest.contact: object expected");
|
|
150113
|
+
message.contact[i] = $root.Contact.fromObject(object.contact[i]);
|
|
150114
|
+
}
|
|
150115
|
+
}
|
|
150116
|
+
return message;
|
|
150117
|
+
};
|
|
150118
|
+
|
|
150119
|
+
/**
|
|
150120
|
+
* Creates a plain object from a CreateContactRequest message. Also converts values to other types if specified.
|
|
150121
|
+
* @function toObject
|
|
150122
|
+
* @memberof CreateContactRequest
|
|
150123
|
+
* @static
|
|
150124
|
+
* @param {CreateContactRequest} message CreateContactRequest
|
|
150125
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
150126
|
+
* @returns {Object.<string,*>} Plain object
|
|
150127
|
+
*/
|
|
150128
|
+
CreateContactRequest.toObject = function toObject(message, options) {
|
|
150129
|
+
if (!options)
|
|
150130
|
+
options = {};
|
|
150131
|
+
var object = {};
|
|
150132
|
+
if (options.arrays || options.defaults)
|
|
150133
|
+
object.contact = [];
|
|
150134
|
+
if (options.defaults) {
|
|
150135
|
+
object.spanContext = "";
|
|
150136
|
+
object.orgId = "";
|
|
150137
|
+
}
|
|
150138
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
150139
|
+
object.spanContext = message.spanContext;
|
|
150140
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
150141
|
+
object.orgId = message.orgId;
|
|
150142
|
+
if (message.contact && message.contact.length) {
|
|
150143
|
+
object.contact = [];
|
|
150144
|
+
for (var j = 0; j < message.contact.length; ++j)
|
|
150145
|
+
object.contact[j] = $root.Contact.toObject(message.contact[j], options);
|
|
150146
|
+
}
|
|
150147
|
+
return object;
|
|
150148
|
+
};
|
|
150149
|
+
|
|
150150
|
+
/**
|
|
150151
|
+
* Converts this CreateContactRequest to JSON.
|
|
150152
|
+
* @function toJSON
|
|
150153
|
+
* @memberof CreateContactRequest
|
|
150154
|
+
* @instance
|
|
150155
|
+
* @returns {Object.<string,*>} JSON object
|
|
150156
|
+
*/
|
|
150157
|
+
CreateContactRequest.prototype.toJSON = function toJSON() {
|
|
150158
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
150159
|
+
};
|
|
150160
|
+
|
|
150161
|
+
return CreateContactRequest;
|
|
150162
|
+
})();
|
|
150163
|
+
|
|
150164
|
+
$root.CreateContactResponse = (function() {
|
|
150165
|
+
|
|
150166
|
+
/**
|
|
150167
|
+
* Properties of a CreateContactResponse.
|
|
150168
|
+
* @exports ICreateContactResponse
|
|
150169
|
+
* @interface ICreateContactResponse
|
|
150170
|
+
* @property {StatusCode|null} [status] CreateContactResponse status
|
|
150171
|
+
* @property {Array.<IError>|null} [errors] CreateContactResponse errors
|
|
150172
|
+
*/
|
|
150173
|
+
|
|
150174
|
+
/**
|
|
150175
|
+
* Constructs a new CreateContactResponse.
|
|
150176
|
+
* @exports CreateContactResponse
|
|
150177
|
+
* @classdesc Represents a CreateContactResponse.
|
|
150178
|
+
* @implements ICreateContactResponse
|
|
150179
|
+
* @constructor
|
|
150180
|
+
* @param {ICreateContactResponse=} [properties] Properties to set
|
|
150181
|
+
*/
|
|
150182
|
+
function CreateContactResponse(properties) {
|
|
150183
|
+
this.errors = [];
|
|
150184
|
+
if (properties)
|
|
150185
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
150186
|
+
if (properties[keys[i]] != null)
|
|
150187
|
+
this[keys[i]] = properties[keys[i]];
|
|
150188
|
+
}
|
|
150189
|
+
|
|
150190
|
+
/**
|
|
150191
|
+
* CreateContactResponse status.
|
|
150192
|
+
* @member {StatusCode} status
|
|
150193
|
+
* @memberof CreateContactResponse
|
|
150194
|
+
* @instance
|
|
150195
|
+
*/
|
|
150196
|
+
CreateContactResponse.prototype.status = 0;
|
|
150197
|
+
|
|
150198
|
+
/**
|
|
150199
|
+
* CreateContactResponse errors.
|
|
150200
|
+
* @member {Array.<IError>} errors
|
|
150201
|
+
* @memberof CreateContactResponse
|
|
150202
|
+
* @instance
|
|
150203
|
+
*/
|
|
150204
|
+
CreateContactResponse.prototype.errors = $util.emptyArray;
|
|
150205
|
+
|
|
150206
|
+
/**
|
|
150207
|
+
* Creates a new CreateContactResponse instance using the specified properties.
|
|
150208
|
+
* @function create
|
|
150209
|
+
* @memberof CreateContactResponse
|
|
150210
|
+
* @static
|
|
150211
|
+
* @param {ICreateContactResponse=} [properties] Properties to set
|
|
150212
|
+
* @returns {CreateContactResponse} CreateContactResponse instance
|
|
150213
|
+
*/
|
|
150214
|
+
CreateContactResponse.create = function create(properties) {
|
|
150215
|
+
return new CreateContactResponse(properties);
|
|
150216
|
+
};
|
|
150217
|
+
|
|
150218
|
+
/**
|
|
150219
|
+
* Encodes the specified CreateContactResponse message. Does not implicitly {@link CreateContactResponse.verify|verify} messages.
|
|
150220
|
+
* @function encode
|
|
150221
|
+
* @memberof CreateContactResponse
|
|
150222
|
+
* @static
|
|
150223
|
+
* @param {ICreateContactResponse} message CreateContactResponse message or plain object to encode
|
|
150224
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150225
|
+
* @returns {$protobuf.Writer} Writer
|
|
150226
|
+
*/
|
|
150227
|
+
CreateContactResponse.encode = function encode(message, writer) {
|
|
150228
|
+
if (!writer)
|
|
150229
|
+
writer = $Writer.create();
|
|
150230
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
150231
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
150232
|
+
if (message.errors != null && message.errors.length)
|
|
150233
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
150234
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
150235
|
+
return writer;
|
|
150236
|
+
};
|
|
150237
|
+
|
|
150238
|
+
/**
|
|
150239
|
+
* Encodes the specified CreateContactResponse message, length delimited. Does not implicitly {@link CreateContactResponse.verify|verify} messages.
|
|
150240
|
+
* @function encodeDelimited
|
|
150241
|
+
* @memberof CreateContactResponse
|
|
150242
|
+
* @static
|
|
150243
|
+
* @param {ICreateContactResponse} message CreateContactResponse message or plain object to encode
|
|
150244
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150245
|
+
* @returns {$protobuf.Writer} Writer
|
|
150246
|
+
*/
|
|
150247
|
+
CreateContactResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
150248
|
+
return this.encode(message, writer).ldelim();
|
|
150249
|
+
};
|
|
150250
|
+
|
|
150251
|
+
/**
|
|
150252
|
+
* Decodes a CreateContactResponse message from the specified reader or buffer.
|
|
150253
|
+
* @function decode
|
|
150254
|
+
* @memberof CreateContactResponse
|
|
150255
|
+
* @static
|
|
150256
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150257
|
+
* @param {number} [length] Message length if known beforehand
|
|
150258
|
+
* @returns {CreateContactResponse} CreateContactResponse
|
|
150259
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150260
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150261
|
+
*/
|
|
150262
|
+
CreateContactResponse.decode = function decode(reader, length) {
|
|
150263
|
+
if (!(reader instanceof $Reader))
|
|
150264
|
+
reader = $Reader.create(reader);
|
|
150265
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CreateContactResponse();
|
|
150266
|
+
while (reader.pos < end) {
|
|
150267
|
+
var tag = reader.uint32();
|
|
150268
|
+
switch (tag >>> 3) {
|
|
150269
|
+
case 1:
|
|
150270
|
+
message.status = reader.int32();
|
|
150271
|
+
break;
|
|
150272
|
+
case 2:
|
|
150273
|
+
if (!(message.errors && message.errors.length))
|
|
150274
|
+
message.errors = [];
|
|
150275
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
150276
|
+
break;
|
|
150277
|
+
default:
|
|
150278
|
+
reader.skipType(tag & 7);
|
|
150279
|
+
break;
|
|
150280
|
+
}
|
|
150281
|
+
}
|
|
150282
|
+
return message;
|
|
150283
|
+
};
|
|
150284
|
+
|
|
150285
|
+
/**
|
|
150286
|
+
* Decodes a CreateContactResponse message from the specified reader or buffer, length delimited.
|
|
150287
|
+
* @function decodeDelimited
|
|
150288
|
+
* @memberof CreateContactResponse
|
|
150289
|
+
* @static
|
|
150290
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150291
|
+
* @returns {CreateContactResponse} CreateContactResponse
|
|
150292
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150293
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150294
|
+
*/
|
|
150295
|
+
CreateContactResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
150296
|
+
if (!(reader instanceof $Reader))
|
|
150297
|
+
reader = new $Reader(reader);
|
|
150298
|
+
return this.decode(reader, reader.uint32());
|
|
150299
|
+
};
|
|
150300
|
+
|
|
150301
|
+
/**
|
|
150302
|
+
* Verifies a CreateContactResponse message.
|
|
150303
|
+
* @function verify
|
|
150304
|
+
* @memberof CreateContactResponse
|
|
150305
|
+
* @static
|
|
150306
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
150307
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
150308
|
+
*/
|
|
150309
|
+
CreateContactResponse.verify = function verify(message) {
|
|
150310
|
+
if (typeof message !== "object" || message === null)
|
|
150311
|
+
return "object expected";
|
|
150312
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
150313
|
+
switch (message.status) {
|
|
150314
|
+
default:
|
|
150315
|
+
return "status: enum value expected";
|
|
150316
|
+
case 0:
|
|
150317
|
+
case 200:
|
|
150318
|
+
case 400:
|
|
150319
|
+
case 401:
|
|
150320
|
+
case 403:
|
|
150321
|
+
case 422:
|
|
150322
|
+
case 404:
|
|
150323
|
+
case 500:
|
|
150324
|
+
case 504:
|
|
150325
|
+
break;
|
|
150326
|
+
}
|
|
150327
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
150328
|
+
if (!Array.isArray(message.errors))
|
|
150329
|
+
return "errors: array expected";
|
|
150330
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
150331
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
150332
|
+
if (error)
|
|
150333
|
+
return "errors." + error;
|
|
150334
|
+
}
|
|
150335
|
+
}
|
|
150336
|
+
return null;
|
|
150337
|
+
};
|
|
150338
|
+
|
|
150339
|
+
/**
|
|
150340
|
+
* Creates a CreateContactResponse message from a plain object. Also converts values to their respective internal types.
|
|
150341
|
+
* @function fromObject
|
|
150342
|
+
* @memberof CreateContactResponse
|
|
150343
|
+
* @static
|
|
150344
|
+
* @param {Object.<string,*>} object Plain object
|
|
150345
|
+
* @returns {CreateContactResponse} CreateContactResponse
|
|
150346
|
+
*/
|
|
150347
|
+
CreateContactResponse.fromObject = function fromObject(object) {
|
|
150348
|
+
if (object instanceof $root.CreateContactResponse)
|
|
150349
|
+
return object;
|
|
150350
|
+
var message = new $root.CreateContactResponse();
|
|
150351
|
+
switch (object.status) {
|
|
150352
|
+
case "UNKNOWN_CODE":
|
|
150353
|
+
case 0:
|
|
150354
|
+
message.status = 0;
|
|
150355
|
+
break;
|
|
150356
|
+
case "OK":
|
|
150357
|
+
case 200:
|
|
150358
|
+
message.status = 200;
|
|
150359
|
+
break;
|
|
150360
|
+
case "BAD_REQUEST":
|
|
150361
|
+
case 400:
|
|
150362
|
+
message.status = 400;
|
|
150363
|
+
break;
|
|
150364
|
+
case "UNAUTHORIZED":
|
|
150365
|
+
case 401:
|
|
150366
|
+
message.status = 401;
|
|
150367
|
+
break;
|
|
150368
|
+
case "FORBIDDEN":
|
|
150369
|
+
case 403:
|
|
150370
|
+
message.status = 403;
|
|
150371
|
+
break;
|
|
150372
|
+
case "UNPROCESSABLE_ENTITY":
|
|
150373
|
+
case 422:
|
|
150374
|
+
message.status = 422;
|
|
150375
|
+
break;
|
|
150376
|
+
case "NOT_FOUND":
|
|
150377
|
+
case 404:
|
|
150378
|
+
message.status = 404;
|
|
150379
|
+
break;
|
|
150380
|
+
case "INTERNAL_SERVER_ERROR":
|
|
150381
|
+
case 500:
|
|
150382
|
+
message.status = 500;
|
|
150383
|
+
break;
|
|
150384
|
+
case "GATEWAY_TIMEOUT":
|
|
150385
|
+
case 504:
|
|
150386
|
+
message.status = 504;
|
|
150387
|
+
break;
|
|
150388
|
+
}
|
|
150389
|
+
if (object.errors) {
|
|
150390
|
+
if (!Array.isArray(object.errors))
|
|
150391
|
+
throw TypeError(".CreateContactResponse.errors: array expected");
|
|
150392
|
+
message.errors = [];
|
|
150393
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
150394
|
+
if (typeof object.errors[i] !== "object")
|
|
150395
|
+
throw TypeError(".CreateContactResponse.errors: object expected");
|
|
150396
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
150397
|
+
}
|
|
150398
|
+
}
|
|
150399
|
+
return message;
|
|
150400
|
+
};
|
|
150401
|
+
|
|
150402
|
+
/**
|
|
150403
|
+
* Creates a plain object from a CreateContactResponse message. Also converts values to other types if specified.
|
|
150404
|
+
* @function toObject
|
|
150405
|
+
* @memberof CreateContactResponse
|
|
150406
|
+
* @static
|
|
150407
|
+
* @param {CreateContactResponse} message CreateContactResponse
|
|
150408
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
150409
|
+
* @returns {Object.<string,*>} Plain object
|
|
150410
|
+
*/
|
|
150411
|
+
CreateContactResponse.toObject = function toObject(message, options) {
|
|
150412
|
+
if (!options)
|
|
150413
|
+
options = {};
|
|
150414
|
+
var object = {};
|
|
150415
|
+
if (options.arrays || options.defaults)
|
|
150416
|
+
object.errors = [];
|
|
150417
|
+
if (options.defaults)
|
|
150418
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
150419
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
150420
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
150421
|
+
if (message.errors && message.errors.length) {
|
|
150422
|
+
object.errors = [];
|
|
150423
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
150424
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
150425
|
+
}
|
|
150426
|
+
return object;
|
|
150427
|
+
};
|
|
150428
|
+
|
|
150429
|
+
/**
|
|
150430
|
+
* Converts this CreateContactResponse to JSON.
|
|
150431
|
+
* @function toJSON
|
|
150432
|
+
* @memberof CreateContactResponse
|
|
150433
|
+
* @instance
|
|
150434
|
+
* @returns {Object.<string,*>} JSON object
|
|
150435
|
+
*/
|
|
150436
|
+
CreateContactResponse.prototype.toJSON = function toJSON() {
|
|
150437
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
150438
|
+
};
|
|
150439
|
+
|
|
150440
|
+
return CreateContactResponse;
|
|
150441
|
+
})();
|
|
150442
|
+
|
|
150443
|
+
$root.ContactsQuery = (function() {
|
|
150444
|
+
|
|
150445
|
+
/**
|
|
150446
|
+
* Properties of a ContactsQuery.
|
|
150447
|
+
* @exports IContactsQuery
|
|
150448
|
+
* @interface IContactsQuery
|
|
150449
|
+
* @property {string|null} [name] ContactsQuery name
|
|
150450
|
+
* @property {string|null} [email] ContactsQuery email
|
|
150451
|
+
* @property {string|null} [userId] ContactsQuery userId
|
|
150452
|
+
* @property {string|null} [orgId] ContactsQuery orgId
|
|
150453
|
+
*/
|
|
150454
|
+
|
|
150455
|
+
/**
|
|
150456
|
+
* Constructs a new ContactsQuery.
|
|
150457
|
+
* @exports ContactsQuery
|
|
150458
|
+
* @classdesc Represents a ContactsQuery.
|
|
150459
|
+
* @implements IContactsQuery
|
|
150460
|
+
* @constructor
|
|
150461
|
+
* @param {IContactsQuery=} [properties] Properties to set
|
|
150462
|
+
*/
|
|
150463
|
+
function ContactsQuery(properties) {
|
|
150464
|
+
if (properties)
|
|
150465
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
150466
|
+
if (properties[keys[i]] != null)
|
|
150467
|
+
this[keys[i]] = properties[keys[i]];
|
|
150468
|
+
}
|
|
150469
|
+
|
|
150470
|
+
/**
|
|
150471
|
+
* ContactsQuery name.
|
|
150472
|
+
* @member {string} name
|
|
150473
|
+
* @memberof ContactsQuery
|
|
150474
|
+
* @instance
|
|
150475
|
+
*/
|
|
150476
|
+
ContactsQuery.prototype.name = "";
|
|
150477
|
+
|
|
150478
|
+
/**
|
|
150479
|
+
* ContactsQuery email.
|
|
150480
|
+
* @member {string} email
|
|
150481
|
+
* @memberof ContactsQuery
|
|
150482
|
+
* @instance
|
|
150483
|
+
*/
|
|
150484
|
+
ContactsQuery.prototype.email = "";
|
|
150485
|
+
|
|
150486
|
+
/**
|
|
150487
|
+
* ContactsQuery userId.
|
|
150488
|
+
* @member {string} userId
|
|
150489
|
+
* @memberof ContactsQuery
|
|
150490
|
+
* @instance
|
|
150491
|
+
*/
|
|
150492
|
+
ContactsQuery.prototype.userId = "";
|
|
150493
|
+
|
|
150494
|
+
/**
|
|
150495
|
+
* ContactsQuery orgId.
|
|
150496
|
+
* @member {string} orgId
|
|
150497
|
+
* @memberof ContactsQuery
|
|
150498
|
+
* @instance
|
|
150499
|
+
*/
|
|
150500
|
+
ContactsQuery.prototype.orgId = "";
|
|
150501
|
+
|
|
150502
|
+
/**
|
|
150503
|
+
* Creates a new ContactsQuery instance using the specified properties.
|
|
150504
|
+
* @function create
|
|
150505
|
+
* @memberof ContactsQuery
|
|
150506
|
+
* @static
|
|
150507
|
+
* @param {IContactsQuery=} [properties] Properties to set
|
|
150508
|
+
* @returns {ContactsQuery} ContactsQuery instance
|
|
150509
|
+
*/
|
|
150510
|
+
ContactsQuery.create = function create(properties) {
|
|
150511
|
+
return new ContactsQuery(properties);
|
|
150512
|
+
};
|
|
150513
|
+
|
|
150514
|
+
/**
|
|
150515
|
+
* Encodes the specified ContactsQuery message. Does not implicitly {@link ContactsQuery.verify|verify} messages.
|
|
150516
|
+
* @function encode
|
|
150517
|
+
* @memberof ContactsQuery
|
|
150518
|
+
* @static
|
|
150519
|
+
* @param {IContactsQuery} message ContactsQuery message or plain object to encode
|
|
150520
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150521
|
+
* @returns {$protobuf.Writer} Writer
|
|
150522
|
+
*/
|
|
150523
|
+
ContactsQuery.encode = function encode(message, writer) {
|
|
150524
|
+
if (!writer)
|
|
150525
|
+
writer = $Writer.create();
|
|
150526
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
150527
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message.name);
|
|
150528
|
+
if (message.email != null && Object.hasOwnProperty.call(message, "email"))
|
|
150529
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.email);
|
|
150530
|
+
if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
|
|
150531
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId);
|
|
150532
|
+
if (message.orgId != null && Object.hasOwnProperty.call(message, "orgId"))
|
|
150533
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.orgId);
|
|
150534
|
+
return writer;
|
|
150535
|
+
};
|
|
150536
|
+
|
|
150537
|
+
/**
|
|
150538
|
+
* Encodes the specified ContactsQuery message, length delimited. Does not implicitly {@link ContactsQuery.verify|verify} messages.
|
|
150539
|
+
* @function encodeDelimited
|
|
150540
|
+
* @memberof ContactsQuery
|
|
150541
|
+
* @static
|
|
150542
|
+
* @param {IContactsQuery} message ContactsQuery message or plain object to encode
|
|
150543
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150544
|
+
* @returns {$protobuf.Writer} Writer
|
|
150545
|
+
*/
|
|
150546
|
+
ContactsQuery.encodeDelimited = function encodeDelimited(message, writer) {
|
|
150547
|
+
return this.encode(message, writer).ldelim();
|
|
150548
|
+
};
|
|
150549
|
+
|
|
150550
|
+
/**
|
|
150551
|
+
* Decodes a ContactsQuery message from the specified reader or buffer.
|
|
150552
|
+
* @function decode
|
|
150553
|
+
* @memberof ContactsQuery
|
|
150554
|
+
* @static
|
|
150555
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150556
|
+
* @param {number} [length] Message length if known beforehand
|
|
150557
|
+
* @returns {ContactsQuery} ContactsQuery
|
|
150558
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150559
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150560
|
+
*/
|
|
150561
|
+
ContactsQuery.decode = function decode(reader, length) {
|
|
150562
|
+
if (!(reader instanceof $Reader))
|
|
150563
|
+
reader = $Reader.create(reader);
|
|
150564
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContactsQuery();
|
|
150565
|
+
while (reader.pos < end) {
|
|
150566
|
+
var tag = reader.uint32();
|
|
150567
|
+
switch (tag >>> 3) {
|
|
150568
|
+
case 0:
|
|
150569
|
+
message.name = reader.string();
|
|
150570
|
+
break;
|
|
150571
|
+
case 1:
|
|
150572
|
+
message.email = reader.string();
|
|
150573
|
+
break;
|
|
150574
|
+
case 2:
|
|
150575
|
+
message.userId = reader.string();
|
|
150576
|
+
break;
|
|
150577
|
+
case 3:
|
|
150578
|
+
message.orgId = reader.string();
|
|
150579
|
+
break;
|
|
150580
|
+
default:
|
|
150581
|
+
reader.skipType(tag & 7);
|
|
150582
|
+
break;
|
|
150583
|
+
}
|
|
150584
|
+
}
|
|
150585
|
+
return message;
|
|
150586
|
+
};
|
|
150587
|
+
|
|
150588
|
+
/**
|
|
150589
|
+
* Decodes a ContactsQuery message from the specified reader or buffer, length delimited.
|
|
150590
|
+
* @function decodeDelimited
|
|
150591
|
+
* @memberof ContactsQuery
|
|
150592
|
+
* @static
|
|
150593
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150594
|
+
* @returns {ContactsQuery} ContactsQuery
|
|
150595
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150596
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150597
|
+
*/
|
|
150598
|
+
ContactsQuery.decodeDelimited = function decodeDelimited(reader) {
|
|
150599
|
+
if (!(reader instanceof $Reader))
|
|
150600
|
+
reader = new $Reader(reader);
|
|
150601
|
+
return this.decode(reader, reader.uint32());
|
|
150602
|
+
};
|
|
150603
|
+
|
|
150604
|
+
/**
|
|
150605
|
+
* Verifies a ContactsQuery message.
|
|
150606
|
+
* @function verify
|
|
150607
|
+
* @memberof ContactsQuery
|
|
150608
|
+
* @static
|
|
150609
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
150610
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
150611
|
+
*/
|
|
150612
|
+
ContactsQuery.verify = function verify(message) {
|
|
150613
|
+
if (typeof message !== "object" || message === null)
|
|
150614
|
+
return "object expected";
|
|
150615
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
150616
|
+
if (!$util.isString(message.name))
|
|
150617
|
+
return "name: string expected";
|
|
150618
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
150619
|
+
if (!$util.isString(message.email))
|
|
150620
|
+
return "email: string expected";
|
|
150621
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
150622
|
+
if (!$util.isString(message.userId))
|
|
150623
|
+
return "userId: string expected";
|
|
150624
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
150625
|
+
if (!$util.isString(message.orgId))
|
|
150626
|
+
return "orgId: string expected";
|
|
150627
|
+
return null;
|
|
150628
|
+
};
|
|
150629
|
+
|
|
150630
|
+
/**
|
|
150631
|
+
* Creates a ContactsQuery message from a plain object. Also converts values to their respective internal types.
|
|
150632
|
+
* @function fromObject
|
|
150633
|
+
* @memberof ContactsQuery
|
|
150634
|
+
* @static
|
|
150635
|
+
* @param {Object.<string,*>} object Plain object
|
|
150636
|
+
* @returns {ContactsQuery} ContactsQuery
|
|
150637
|
+
*/
|
|
150638
|
+
ContactsQuery.fromObject = function fromObject(object) {
|
|
150639
|
+
if (object instanceof $root.ContactsQuery)
|
|
150640
|
+
return object;
|
|
150641
|
+
var message = new $root.ContactsQuery();
|
|
150642
|
+
if (object.name != null)
|
|
150643
|
+
message.name = String(object.name);
|
|
150644
|
+
if (object.email != null)
|
|
150645
|
+
message.email = String(object.email);
|
|
150646
|
+
if (object.userId != null)
|
|
150647
|
+
message.userId = String(object.userId);
|
|
150648
|
+
if (object.orgId != null)
|
|
150649
|
+
message.orgId = String(object.orgId);
|
|
150650
|
+
return message;
|
|
150651
|
+
};
|
|
150652
|
+
|
|
150653
|
+
/**
|
|
150654
|
+
* Creates a plain object from a ContactsQuery message. Also converts values to other types if specified.
|
|
150655
|
+
* @function toObject
|
|
150656
|
+
* @memberof ContactsQuery
|
|
150657
|
+
* @static
|
|
150658
|
+
* @param {ContactsQuery} message ContactsQuery
|
|
150659
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
150660
|
+
* @returns {Object.<string,*>} Plain object
|
|
150661
|
+
*/
|
|
150662
|
+
ContactsQuery.toObject = function toObject(message, options) {
|
|
150663
|
+
if (!options)
|
|
150664
|
+
options = {};
|
|
150665
|
+
var object = {};
|
|
150666
|
+
if (options.defaults) {
|
|
150667
|
+
object.name = "";
|
|
150668
|
+
object.email = "";
|
|
150669
|
+
object.userId = "";
|
|
150670
|
+
object.orgId = "";
|
|
150671
|
+
}
|
|
150672
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
150673
|
+
object.name = message.name;
|
|
150674
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
150675
|
+
object.email = message.email;
|
|
150676
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
150677
|
+
object.userId = message.userId;
|
|
150678
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
150679
|
+
object.orgId = message.orgId;
|
|
150680
|
+
return object;
|
|
150681
|
+
};
|
|
150682
|
+
|
|
150683
|
+
/**
|
|
150684
|
+
* Converts this ContactsQuery to JSON.
|
|
150685
|
+
* @function toJSON
|
|
150686
|
+
* @memberof ContactsQuery
|
|
150687
|
+
* @instance
|
|
150688
|
+
* @returns {Object.<string,*>} JSON object
|
|
150689
|
+
*/
|
|
150690
|
+
ContactsQuery.prototype.toJSON = function toJSON() {
|
|
150691
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
150692
|
+
};
|
|
150693
|
+
|
|
150694
|
+
return ContactsQuery;
|
|
150695
|
+
})();
|
|
150696
|
+
|
|
150697
|
+
$root.QueryContactsRequest = (function() {
|
|
150698
|
+
|
|
150699
|
+
/**
|
|
150700
|
+
* Properties of a QueryContactsRequest.
|
|
150701
|
+
* @exports IQueryContactsRequest
|
|
150702
|
+
* @interface IQueryContactsRequest
|
|
150703
|
+
* @property {string|null} [spanContext] QueryContactsRequest spanContext
|
|
150704
|
+
* @property {IPagination|null} [pagination] QueryContactsRequest pagination
|
|
150705
|
+
* @property {IContactsQuery|null} [query] QueryContactsRequest query
|
|
150706
|
+
*/
|
|
150707
|
+
|
|
150708
|
+
/**
|
|
150709
|
+
* Constructs a new QueryContactsRequest.
|
|
150710
|
+
* @exports QueryContactsRequest
|
|
150711
|
+
* @classdesc Represents a QueryContactsRequest.
|
|
150712
|
+
* @implements IQueryContactsRequest
|
|
150713
|
+
* @constructor
|
|
150714
|
+
* @param {IQueryContactsRequest=} [properties] Properties to set
|
|
150715
|
+
*/
|
|
150716
|
+
function QueryContactsRequest(properties) {
|
|
150717
|
+
if (properties)
|
|
150718
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
150719
|
+
if (properties[keys[i]] != null)
|
|
150720
|
+
this[keys[i]] = properties[keys[i]];
|
|
150721
|
+
}
|
|
150722
|
+
|
|
150723
|
+
/**
|
|
150724
|
+
* QueryContactsRequest spanContext.
|
|
150725
|
+
* @member {string} spanContext
|
|
150726
|
+
* @memberof QueryContactsRequest
|
|
150727
|
+
* @instance
|
|
150728
|
+
*/
|
|
150729
|
+
QueryContactsRequest.prototype.spanContext = "";
|
|
150730
|
+
|
|
150731
|
+
/**
|
|
150732
|
+
* QueryContactsRequest pagination.
|
|
150733
|
+
* @member {IPagination|null|undefined} pagination
|
|
150734
|
+
* @memberof QueryContactsRequest
|
|
150735
|
+
* @instance
|
|
150736
|
+
*/
|
|
150737
|
+
QueryContactsRequest.prototype.pagination = null;
|
|
150738
|
+
|
|
150739
|
+
/**
|
|
150740
|
+
* QueryContactsRequest query.
|
|
150741
|
+
* @member {IContactsQuery|null|undefined} query
|
|
150742
|
+
* @memberof QueryContactsRequest
|
|
150743
|
+
* @instance
|
|
150744
|
+
*/
|
|
150745
|
+
QueryContactsRequest.prototype.query = null;
|
|
150746
|
+
|
|
150747
|
+
/**
|
|
150748
|
+
* Creates a new QueryContactsRequest instance using the specified properties.
|
|
150749
|
+
* @function create
|
|
150750
|
+
* @memberof QueryContactsRequest
|
|
150751
|
+
* @static
|
|
150752
|
+
* @param {IQueryContactsRequest=} [properties] Properties to set
|
|
150753
|
+
* @returns {QueryContactsRequest} QueryContactsRequest instance
|
|
150754
|
+
*/
|
|
150755
|
+
QueryContactsRequest.create = function create(properties) {
|
|
150756
|
+
return new QueryContactsRequest(properties);
|
|
150757
|
+
};
|
|
150758
|
+
|
|
150759
|
+
/**
|
|
150760
|
+
* Encodes the specified QueryContactsRequest message. Does not implicitly {@link QueryContactsRequest.verify|verify} messages.
|
|
150761
|
+
* @function encode
|
|
150762
|
+
* @memberof QueryContactsRequest
|
|
150763
|
+
* @static
|
|
150764
|
+
* @param {IQueryContactsRequest} message QueryContactsRequest message or plain object to encode
|
|
150765
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150766
|
+
* @returns {$protobuf.Writer} Writer
|
|
150767
|
+
*/
|
|
150768
|
+
QueryContactsRequest.encode = function encode(message, writer) {
|
|
150769
|
+
if (!writer)
|
|
150770
|
+
writer = $Writer.create();
|
|
150771
|
+
if (message.spanContext != null && Object.hasOwnProperty.call(message, "spanContext"))
|
|
150772
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
|
|
150773
|
+
if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination"))
|
|
150774
|
+
$root.Pagination.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
150775
|
+
if (message.query != null && Object.hasOwnProperty.call(message, "query"))
|
|
150776
|
+
$root.ContactsQuery.encode(message.query, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
150777
|
+
return writer;
|
|
150778
|
+
};
|
|
150779
|
+
|
|
150780
|
+
/**
|
|
150781
|
+
* Encodes the specified QueryContactsRequest message, length delimited. Does not implicitly {@link QueryContactsRequest.verify|verify} messages.
|
|
150782
|
+
* @function encodeDelimited
|
|
150783
|
+
* @memberof QueryContactsRequest
|
|
150784
|
+
* @static
|
|
150785
|
+
* @param {IQueryContactsRequest} message QueryContactsRequest message or plain object to encode
|
|
150786
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
150787
|
+
* @returns {$protobuf.Writer} Writer
|
|
150788
|
+
*/
|
|
150789
|
+
QueryContactsRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
150790
|
+
return this.encode(message, writer).ldelim();
|
|
150791
|
+
};
|
|
150792
|
+
|
|
150793
|
+
/**
|
|
150794
|
+
* Decodes a QueryContactsRequest message from the specified reader or buffer.
|
|
150795
|
+
* @function decode
|
|
150796
|
+
* @memberof QueryContactsRequest
|
|
150797
|
+
* @static
|
|
150798
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150799
|
+
* @param {number} [length] Message length if known beforehand
|
|
150800
|
+
* @returns {QueryContactsRequest} QueryContactsRequest
|
|
150801
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150802
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150803
|
+
*/
|
|
150804
|
+
QueryContactsRequest.decode = function decode(reader, length) {
|
|
150805
|
+
if (!(reader instanceof $Reader))
|
|
150806
|
+
reader = $Reader.create(reader);
|
|
150807
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.QueryContactsRequest();
|
|
150808
|
+
while (reader.pos < end) {
|
|
150809
|
+
var tag = reader.uint32();
|
|
150810
|
+
switch (tag >>> 3) {
|
|
150811
|
+
case 1:
|
|
150812
|
+
message.spanContext = reader.string();
|
|
150813
|
+
break;
|
|
150814
|
+
case 2:
|
|
150815
|
+
message.pagination = $root.Pagination.decode(reader, reader.uint32());
|
|
150816
|
+
break;
|
|
150817
|
+
case 3:
|
|
150818
|
+
message.query = $root.ContactsQuery.decode(reader, reader.uint32());
|
|
150819
|
+
break;
|
|
150820
|
+
default:
|
|
150821
|
+
reader.skipType(tag & 7);
|
|
150822
|
+
break;
|
|
150823
|
+
}
|
|
150824
|
+
}
|
|
150825
|
+
return message;
|
|
150826
|
+
};
|
|
150827
|
+
|
|
150828
|
+
/**
|
|
150829
|
+
* Decodes a QueryContactsRequest message from the specified reader or buffer, length delimited.
|
|
150830
|
+
* @function decodeDelimited
|
|
150831
|
+
* @memberof QueryContactsRequest
|
|
150832
|
+
* @static
|
|
150833
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
150834
|
+
* @returns {QueryContactsRequest} QueryContactsRequest
|
|
150835
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
150836
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
150837
|
+
*/
|
|
150838
|
+
QueryContactsRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
150839
|
+
if (!(reader instanceof $Reader))
|
|
150840
|
+
reader = new $Reader(reader);
|
|
150841
|
+
return this.decode(reader, reader.uint32());
|
|
150842
|
+
};
|
|
150843
|
+
|
|
150844
|
+
/**
|
|
150845
|
+
* Verifies a QueryContactsRequest message.
|
|
150846
|
+
* @function verify
|
|
150847
|
+
* @memberof QueryContactsRequest
|
|
150848
|
+
* @static
|
|
150849
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
150850
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
150851
|
+
*/
|
|
150852
|
+
QueryContactsRequest.verify = function verify(message) {
|
|
150853
|
+
if (typeof message !== "object" || message === null)
|
|
150854
|
+
return "object expected";
|
|
150855
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
150856
|
+
if (!$util.isString(message.spanContext))
|
|
150857
|
+
return "spanContext: string expected";
|
|
150858
|
+
if (message.pagination != null && message.hasOwnProperty("pagination")) {
|
|
150859
|
+
var error = $root.Pagination.verify(message.pagination);
|
|
150860
|
+
if (error)
|
|
150861
|
+
return "pagination." + error;
|
|
150862
|
+
}
|
|
150863
|
+
if (message.query != null && message.hasOwnProperty("query")) {
|
|
150864
|
+
var error = $root.ContactsQuery.verify(message.query);
|
|
150865
|
+
if (error)
|
|
150866
|
+
return "query." + error;
|
|
150867
|
+
}
|
|
150868
|
+
return null;
|
|
150869
|
+
};
|
|
150870
|
+
|
|
150871
|
+
/**
|
|
150872
|
+
* Creates a QueryContactsRequest message from a plain object. Also converts values to their respective internal types.
|
|
150873
|
+
* @function fromObject
|
|
150874
|
+
* @memberof QueryContactsRequest
|
|
150875
|
+
* @static
|
|
150876
|
+
* @param {Object.<string,*>} object Plain object
|
|
150877
|
+
* @returns {QueryContactsRequest} QueryContactsRequest
|
|
150878
|
+
*/
|
|
150879
|
+
QueryContactsRequest.fromObject = function fromObject(object) {
|
|
150880
|
+
if (object instanceof $root.QueryContactsRequest)
|
|
150881
|
+
return object;
|
|
150882
|
+
var message = new $root.QueryContactsRequest();
|
|
150883
|
+
if (object.spanContext != null)
|
|
150884
|
+
message.spanContext = String(object.spanContext);
|
|
150885
|
+
if (object.pagination != null) {
|
|
150886
|
+
if (typeof object.pagination !== "object")
|
|
150887
|
+
throw TypeError(".QueryContactsRequest.pagination: object expected");
|
|
150888
|
+
message.pagination = $root.Pagination.fromObject(object.pagination);
|
|
150889
|
+
}
|
|
150890
|
+
if (object.query != null) {
|
|
150891
|
+
if (typeof object.query !== "object")
|
|
150892
|
+
throw TypeError(".QueryContactsRequest.query: object expected");
|
|
150893
|
+
message.query = $root.ContactsQuery.fromObject(object.query);
|
|
150894
|
+
}
|
|
150895
|
+
return message;
|
|
150896
|
+
};
|
|
150897
|
+
|
|
150898
|
+
/**
|
|
150899
|
+
* Creates a plain object from a QueryContactsRequest message. Also converts values to other types if specified.
|
|
150900
|
+
* @function toObject
|
|
150901
|
+
* @memberof QueryContactsRequest
|
|
150902
|
+
* @static
|
|
150903
|
+
* @param {QueryContactsRequest} message QueryContactsRequest
|
|
150904
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
150905
|
+
* @returns {Object.<string,*>} Plain object
|
|
150906
|
+
*/
|
|
150907
|
+
QueryContactsRequest.toObject = function toObject(message, options) {
|
|
150908
|
+
if (!options)
|
|
150909
|
+
options = {};
|
|
150910
|
+
var object = {};
|
|
150911
|
+
if (options.defaults) {
|
|
150912
|
+
object.spanContext = "";
|
|
150913
|
+
object.pagination = null;
|
|
150914
|
+
object.query = null;
|
|
150915
|
+
}
|
|
150916
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
150917
|
+
object.spanContext = message.spanContext;
|
|
150918
|
+
if (message.pagination != null && message.hasOwnProperty("pagination"))
|
|
150919
|
+
object.pagination = $root.Pagination.toObject(message.pagination, options);
|
|
150920
|
+
if (message.query != null && message.hasOwnProperty("query"))
|
|
150921
|
+
object.query = $root.ContactsQuery.toObject(message.query, options);
|
|
150922
|
+
return object;
|
|
150923
|
+
};
|
|
150924
|
+
|
|
150925
|
+
/**
|
|
150926
|
+
* Converts this QueryContactsRequest to JSON.
|
|
150927
|
+
* @function toJSON
|
|
150928
|
+
* @memberof QueryContactsRequest
|
|
150929
|
+
* @instance
|
|
150930
|
+
* @returns {Object.<string,*>} JSON object
|
|
150931
|
+
*/
|
|
150932
|
+
QueryContactsRequest.prototype.toJSON = function toJSON() {
|
|
150933
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
150934
|
+
};
|
|
150935
|
+
|
|
150936
|
+
return QueryContactsRequest;
|
|
150937
|
+
})();
|
|
150938
|
+
|
|
150939
|
+
$root.QueryContactsResponse = (function() {
|
|
150940
|
+
|
|
150941
|
+
/**
|
|
150942
|
+
* Properties of a QueryContactsResponse.
|
|
150943
|
+
* @exports IQueryContactsResponse
|
|
150944
|
+
* @interface IQueryContactsResponse
|
|
150945
|
+
* @property {StatusCode|null} [status] QueryContactsResponse status
|
|
150946
|
+
* @property {Array.<IError>|null} [errors] QueryContactsResponse errors
|
|
150947
|
+
* @property {Array.<IUserProfile>|null} [contacts] QueryContactsResponse contacts
|
|
150948
|
+
*/
|
|
150949
|
+
|
|
150950
|
+
/**
|
|
150951
|
+
* Constructs a new QueryContactsResponse.
|
|
150952
|
+
* @exports QueryContactsResponse
|
|
150953
|
+
* @classdesc Represents a QueryContactsResponse.
|
|
150954
|
+
* @implements IQueryContactsResponse
|
|
150955
|
+
* @constructor
|
|
150956
|
+
* @param {IQueryContactsResponse=} [properties] Properties to set
|
|
150957
|
+
*/
|
|
150958
|
+
function QueryContactsResponse(properties) {
|
|
150959
|
+
this.errors = [];
|
|
150960
|
+
this.contacts = [];
|
|
150961
|
+
if (properties)
|
|
150962
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
150963
|
+
if (properties[keys[i]] != null)
|
|
150964
|
+
this[keys[i]] = properties[keys[i]];
|
|
150965
|
+
}
|
|
150966
|
+
|
|
150967
|
+
/**
|
|
150968
|
+
* QueryContactsResponse status.
|
|
150969
|
+
* @member {StatusCode} status
|
|
150970
|
+
* @memberof QueryContactsResponse
|
|
150971
|
+
* @instance
|
|
150972
|
+
*/
|
|
150973
|
+
QueryContactsResponse.prototype.status = 0;
|
|
150974
|
+
|
|
150975
|
+
/**
|
|
150976
|
+
* QueryContactsResponse errors.
|
|
150977
|
+
* @member {Array.<IError>} errors
|
|
150978
|
+
* @memberof QueryContactsResponse
|
|
150979
|
+
* @instance
|
|
150980
|
+
*/
|
|
150981
|
+
QueryContactsResponse.prototype.errors = $util.emptyArray;
|
|
150982
|
+
|
|
150983
|
+
/**
|
|
150984
|
+
* QueryContactsResponse contacts.
|
|
150985
|
+
* @member {Array.<IUserProfile>} contacts
|
|
150986
|
+
* @memberof QueryContactsResponse
|
|
150987
|
+
* @instance
|
|
150988
|
+
*/
|
|
150989
|
+
QueryContactsResponse.prototype.contacts = $util.emptyArray;
|
|
150990
|
+
|
|
150991
|
+
/**
|
|
150992
|
+
* Creates a new QueryContactsResponse instance using the specified properties.
|
|
150993
|
+
* @function create
|
|
150994
|
+
* @memberof QueryContactsResponse
|
|
150995
|
+
* @static
|
|
150996
|
+
* @param {IQueryContactsResponse=} [properties] Properties to set
|
|
150997
|
+
* @returns {QueryContactsResponse} QueryContactsResponse instance
|
|
150998
|
+
*/
|
|
150999
|
+
QueryContactsResponse.create = function create(properties) {
|
|
151000
|
+
return new QueryContactsResponse(properties);
|
|
151001
|
+
};
|
|
151002
|
+
|
|
151003
|
+
/**
|
|
151004
|
+
* Encodes the specified QueryContactsResponse message. Does not implicitly {@link QueryContactsResponse.verify|verify} messages.
|
|
151005
|
+
* @function encode
|
|
151006
|
+
* @memberof QueryContactsResponse
|
|
151007
|
+
* @static
|
|
151008
|
+
* @param {IQueryContactsResponse} message QueryContactsResponse message or plain object to encode
|
|
151009
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
151010
|
+
* @returns {$protobuf.Writer} Writer
|
|
151011
|
+
*/
|
|
151012
|
+
QueryContactsResponse.encode = function encode(message, writer) {
|
|
151013
|
+
if (!writer)
|
|
151014
|
+
writer = $Writer.create();
|
|
151015
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
151016
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
151017
|
+
if (message.errors != null && message.errors.length)
|
|
151018
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
151019
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
151020
|
+
if (message.contacts != null && message.contacts.length)
|
|
151021
|
+
for (var i = 0; i < message.contacts.length; ++i)
|
|
151022
|
+
$root.UserProfile.encode(message.contacts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
151023
|
+
return writer;
|
|
151024
|
+
};
|
|
151025
|
+
|
|
151026
|
+
/**
|
|
151027
|
+
* Encodes the specified QueryContactsResponse message, length delimited. Does not implicitly {@link QueryContactsResponse.verify|verify} messages.
|
|
151028
|
+
* @function encodeDelimited
|
|
151029
|
+
* @memberof QueryContactsResponse
|
|
151030
|
+
* @static
|
|
151031
|
+
* @param {IQueryContactsResponse} message QueryContactsResponse message or plain object to encode
|
|
151032
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
151033
|
+
* @returns {$protobuf.Writer} Writer
|
|
151034
|
+
*/
|
|
151035
|
+
QueryContactsResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
151036
|
+
return this.encode(message, writer).ldelim();
|
|
151037
|
+
};
|
|
151038
|
+
|
|
151039
|
+
/**
|
|
151040
|
+
* Decodes a QueryContactsResponse message from the specified reader or buffer.
|
|
151041
|
+
* @function decode
|
|
151042
|
+
* @memberof QueryContactsResponse
|
|
151043
|
+
* @static
|
|
151044
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
151045
|
+
* @param {number} [length] Message length if known beforehand
|
|
151046
|
+
* @returns {QueryContactsResponse} QueryContactsResponse
|
|
151047
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
151048
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
151049
|
+
*/
|
|
151050
|
+
QueryContactsResponse.decode = function decode(reader, length) {
|
|
151051
|
+
if (!(reader instanceof $Reader))
|
|
151052
|
+
reader = $Reader.create(reader);
|
|
151053
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.QueryContactsResponse();
|
|
151054
|
+
while (reader.pos < end) {
|
|
151055
|
+
var tag = reader.uint32();
|
|
151056
|
+
switch (tag >>> 3) {
|
|
151057
|
+
case 1:
|
|
151058
|
+
message.status = reader.int32();
|
|
151059
|
+
break;
|
|
151060
|
+
case 2:
|
|
151061
|
+
if (!(message.errors && message.errors.length))
|
|
151062
|
+
message.errors = [];
|
|
151063
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
151064
|
+
break;
|
|
151065
|
+
case 3:
|
|
151066
|
+
if (!(message.contacts && message.contacts.length))
|
|
151067
|
+
message.contacts = [];
|
|
151068
|
+
message.contacts.push($root.UserProfile.decode(reader, reader.uint32()));
|
|
151069
|
+
break;
|
|
151070
|
+
default:
|
|
151071
|
+
reader.skipType(tag & 7);
|
|
151072
|
+
break;
|
|
151073
|
+
}
|
|
151074
|
+
}
|
|
151075
|
+
return message;
|
|
151076
|
+
};
|
|
151077
|
+
|
|
151078
|
+
/**
|
|
151079
|
+
* Decodes a QueryContactsResponse message from the specified reader or buffer, length delimited.
|
|
151080
|
+
* @function decodeDelimited
|
|
151081
|
+
* @memberof QueryContactsResponse
|
|
151082
|
+
* @static
|
|
151083
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
151084
|
+
* @returns {QueryContactsResponse} QueryContactsResponse
|
|
151085
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
151086
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
151087
|
+
*/
|
|
151088
|
+
QueryContactsResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
151089
|
+
if (!(reader instanceof $Reader))
|
|
151090
|
+
reader = new $Reader(reader);
|
|
151091
|
+
return this.decode(reader, reader.uint32());
|
|
151092
|
+
};
|
|
151093
|
+
|
|
151094
|
+
/**
|
|
151095
|
+
* Verifies a QueryContactsResponse message.
|
|
151096
|
+
* @function verify
|
|
151097
|
+
* @memberof QueryContactsResponse
|
|
151098
|
+
* @static
|
|
151099
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
151100
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
151101
|
+
*/
|
|
151102
|
+
QueryContactsResponse.verify = function verify(message) {
|
|
151103
|
+
if (typeof message !== "object" || message === null)
|
|
151104
|
+
return "object expected";
|
|
151105
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
151106
|
+
switch (message.status) {
|
|
151107
|
+
default:
|
|
151108
|
+
return "status: enum value expected";
|
|
151109
|
+
case 0:
|
|
151110
|
+
case 200:
|
|
151111
|
+
case 400:
|
|
151112
|
+
case 401:
|
|
151113
|
+
case 403:
|
|
151114
|
+
case 422:
|
|
151115
|
+
case 404:
|
|
151116
|
+
case 500:
|
|
151117
|
+
case 504:
|
|
151118
|
+
break;
|
|
151119
|
+
}
|
|
151120
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
151121
|
+
if (!Array.isArray(message.errors))
|
|
151122
|
+
return "errors: array expected";
|
|
151123
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
151124
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
151125
|
+
if (error)
|
|
151126
|
+
return "errors." + error;
|
|
151127
|
+
}
|
|
151128
|
+
}
|
|
151129
|
+
if (message.contacts != null && message.hasOwnProperty("contacts")) {
|
|
151130
|
+
if (!Array.isArray(message.contacts))
|
|
151131
|
+
return "contacts: array expected";
|
|
151132
|
+
for (var i = 0; i < message.contacts.length; ++i) {
|
|
151133
|
+
var error = $root.UserProfile.verify(message.contacts[i]);
|
|
151134
|
+
if (error)
|
|
151135
|
+
return "contacts." + error;
|
|
151136
|
+
}
|
|
151137
|
+
}
|
|
151138
|
+
return null;
|
|
151139
|
+
};
|
|
151140
|
+
|
|
151141
|
+
/**
|
|
151142
|
+
* Creates a QueryContactsResponse message from a plain object. Also converts values to their respective internal types.
|
|
151143
|
+
* @function fromObject
|
|
151144
|
+
* @memberof QueryContactsResponse
|
|
151145
|
+
* @static
|
|
151146
|
+
* @param {Object.<string,*>} object Plain object
|
|
151147
|
+
* @returns {QueryContactsResponse} QueryContactsResponse
|
|
151148
|
+
*/
|
|
151149
|
+
QueryContactsResponse.fromObject = function fromObject(object) {
|
|
151150
|
+
if (object instanceof $root.QueryContactsResponse)
|
|
151151
|
+
return object;
|
|
151152
|
+
var message = new $root.QueryContactsResponse();
|
|
151153
|
+
switch (object.status) {
|
|
151154
|
+
case "UNKNOWN_CODE":
|
|
151155
|
+
case 0:
|
|
151156
|
+
message.status = 0;
|
|
151157
|
+
break;
|
|
151158
|
+
case "OK":
|
|
151159
|
+
case 200:
|
|
151160
|
+
message.status = 200;
|
|
151161
|
+
break;
|
|
151162
|
+
case "BAD_REQUEST":
|
|
151163
|
+
case 400:
|
|
151164
|
+
message.status = 400;
|
|
151165
|
+
break;
|
|
151166
|
+
case "UNAUTHORIZED":
|
|
151167
|
+
case 401:
|
|
151168
|
+
message.status = 401;
|
|
151169
|
+
break;
|
|
151170
|
+
case "FORBIDDEN":
|
|
151171
|
+
case 403:
|
|
151172
|
+
message.status = 403;
|
|
151173
|
+
break;
|
|
151174
|
+
case "UNPROCESSABLE_ENTITY":
|
|
151175
|
+
case 422:
|
|
151176
|
+
message.status = 422;
|
|
151177
|
+
break;
|
|
151178
|
+
case "NOT_FOUND":
|
|
151179
|
+
case 404:
|
|
151180
|
+
message.status = 404;
|
|
151181
|
+
break;
|
|
151182
|
+
case "INTERNAL_SERVER_ERROR":
|
|
151183
|
+
case 500:
|
|
151184
|
+
message.status = 500;
|
|
151185
|
+
break;
|
|
151186
|
+
case "GATEWAY_TIMEOUT":
|
|
151187
|
+
case 504:
|
|
151188
|
+
message.status = 504;
|
|
151189
|
+
break;
|
|
151190
|
+
}
|
|
151191
|
+
if (object.errors) {
|
|
151192
|
+
if (!Array.isArray(object.errors))
|
|
151193
|
+
throw TypeError(".QueryContactsResponse.errors: array expected");
|
|
151194
|
+
message.errors = [];
|
|
151195
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
151196
|
+
if (typeof object.errors[i] !== "object")
|
|
151197
|
+
throw TypeError(".QueryContactsResponse.errors: object expected");
|
|
151198
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
151199
|
+
}
|
|
151200
|
+
}
|
|
151201
|
+
if (object.contacts) {
|
|
151202
|
+
if (!Array.isArray(object.contacts))
|
|
151203
|
+
throw TypeError(".QueryContactsResponse.contacts: array expected");
|
|
151204
|
+
message.contacts = [];
|
|
151205
|
+
for (var i = 0; i < object.contacts.length; ++i) {
|
|
151206
|
+
if (typeof object.contacts[i] !== "object")
|
|
151207
|
+
throw TypeError(".QueryContactsResponse.contacts: object expected");
|
|
151208
|
+
message.contacts[i] = $root.UserProfile.fromObject(object.contacts[i]);
|
|
151209
|
+
}
|
|
151210
|
+
}
|
|
151211
|
+
return message;
|
|
151212
|
+
};
|
|
151213
|
+
|
|
151214
|
+
/**
|
|
151215
|
+
* Creates a plain object from a QueryContactsResponse message. Also converts values to other types if specified.
|
|
151216
|
+
* @function toObject
|
|
151217
|
+
* @memberof QueryContactsResponse
|
|
151218
|
+
* @static
|
|
151219
|
+
* @param {QueryContactsResponse} message QueryContactsResponse
|
|
151220
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
151221
|
+
* @returns {Object.<string,*>} Plain object
|
|
151222
|
+
*/
|
|
151223
|
+
QueryContactsResponse.toObject = function toObject(message, options) {
|
|
151224
|
+
if (!options)
|
|
151225
|
+
options = {};
|
|
151226
|
+
var object = {};
|
|
151227
|
+
if (options.arrays || options.defaults) {
|
|
151228
|
+
object.errors = [];
|
|
151229
|
+
object.contacts = [];
|
|
151230
|
+
}
|
|
151231
|
+
if (options.defaults)
|
|
151232
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
151233
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
151234
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
151235
|
+
if (message.errors && message.errors.length) {
|
|
151236
|
+
object.errors = [];
|
|
151237
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
151238
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
151239
|
+
}
|
|
151240
|
+
if (message.contacts && message.contacts.length) {
|
|
151241
|
+
object.contacts = [];
|
|
151242
|
+
for (var j = 0; j < message.contacts.length; ++j)
|
|
151243
|
+
object.contacts[j] = $root.UserProfile.toObject(message.contacts[j], options);
|
|
151244
|
+
}
|
|
151245
|
+
return object;
|
|
151246
|
+
};
|
|
151247
|
+
|
|
151248
|
+
/**
|
|
151249
|
+
* Converts this QueryContactsResponse to JSON.
|
|
151250
|
+
* @function toJSON
|
|
151251
|
+
* @memberof QueryContactsResponse
|
|
151252
|
+
* @instance
|
|
151253
|
+
* @returns {Object.<string,*>} JSON object
|
|
151254
|
+
*/
|
|
151255
|
+
QueryContactsResponse.prototype.toJSON = function toJSON() {
|
|
151256
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
151257
|
+
};
|
|
151258
|
+
|
|
151259
|
+
return QueryContactsResponse;
|
|
151260
|
+
})();
|
|
151261
|
+
|
|
151262
|
+
$root.UpdateContactRequest = (function() {
|
|
151263
|
+
|
|
151264
|
+
/**
|
|
151265
|
+
* Properties of an UpdateContactRequest.
|
|
151266
|
+
* @exports IUpdateContactRequest
|
|
151267
|
+
* @interface IUpdateContactRequest
|
|
151268
|
+
* @property {string|null} [spanContext] UpdateContactRequest spanContext
|
|
151269
|
+
* @property {string|null} [_id] UpdateContactRequest _id
|
|
151270
|
+
* @property {string|null} [email] UpdateContactRequest email
|
|
151271
|
+
* @property {string|null} [firstName] UpdateContactRequest firstName
|
|
151272
|
+
* @property {string|null} [lastName] UpdateContactRequest lastName
|
|
151273
|
+
* @property {string|null} [userId] UpdateContactRequest userId
|
|
151274
|
+
* @property {string|null} [orgId] UpdateContactRequest orgId
|
|
151275
|
+
* @property {boolean|null} [isNewUser] UpdateContactRequest isNewUser
|
|
151276
|
+
*/
|
|
151277
|
+
|
|
151278
|
+
/**
|
|
151279
|
+
* Constructs a new UpdateContactRequest.
|
|
151280
|
+
* @exports UpdateContactRequest
|
|
151281
|
+
* @classdesc Represents an UpdateContactRequest.
|
|
151282
|
+
* @implements IUpdateContactRequest
|
|
151283
|
+
* @constructor
|
|
151284
|
+
* @param {IUpdateContactRequest=} [properties] Properties to set
|
|
151285
|
+
*/
|
|
151286
|
+
function UpdateContactRequest(properties) {
|
|
151287
|
+
if (properties)
|
|
151288
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
151289
|
+
if (properties[keys[i]] != null)
|
|
151290
|
+
this[keys[i]] = properties[keys[i]];
|
|
151291
|
+
}
|
|
151292
|
+
|
|
151293
|
+
/**
|
|
151294
|
+
* UpdateContactRequest spanContext.
|
|
151295
|
+
* @member {string} spanContext
|
|
151296
|
+
* @memberof UpdateContactRequest
|
|
151297
|
+
* @instance
|
|
151298
|
+
*/
|
|
151299
|
+
UpdateContactRequest.prototype.spanContext = "";
|
|
151300
|
+
|
|
151301
|
+
/**
|
|
151302
|
+
* UpdateContactRequest _id.
|
|
151303
|
+
* @member {string} _id
|
|
151304
|
+
* @memberof UpdateContactRequest
|
|
151305
|
+
* @instance
|
|
151306
|
+
*/
|
|
151307
|
+
UpdateContactRequest.prototype._id = "";
|
|
151308
|
+
|
|
151309
|
+
/**
|
|
151310
|
+
* UpdateContactRequest email.
|
|
151311
|
+
* @member {string} email
|
|
151312
|
+
* @memberof UpdateContactRequest
|
|
151313
|
+
* @instance
|
|
151314
|
+
*/
|
|
151315
|
+
UpdateContactRequest.prototype.email = "";
|
|
151316
|
+
|
|
151317
|
+
/**
|
|
151318
|
+
* UpdateContactRequest firstName.
|
|
151319
|
+
* @member {string} firstName
|
|
151320
|
+
* @memberof UpdateContactRequest
|
|
151321
|
+
* @instance
|
|
151322
|
+
*/
|
|
151323
|
+
UpdateContactRequest.prototype.firstName = "";
|
|
151324
|
+
|
|
151325
|
+
/**
|
|
151326
|
+
* UpdateContactRequest lastName.
|
|
151327
|
+
* @member {string} lastName
|
|
151328
|
+
* @memberof UpdateContactRequest
|
|
151329
|
+
* @instance
|
|
151330
|
+
*/
|
|
151331
|
+
UpdateContactRequest.prototype.lastName = "";
|
|
151332
|
+
|
|
151333
|
+
/**
|
|
151334
|
+
* UpdateContactRequest userId.
|
|
151335
|
+
* @member {string} userId
|
|
151336
|
+
* @memberof UpdateContactRequest
|
|
151337
|
+
* @instance
|
|
151338
|
+
*/
|
|
151339
|
+
UpdateContactRequest.prototype.userId = "";
|
|
151340
|
+
|
|
151341
|
+
/**
|
|
151342
|
+
* UpdateContactRequest orgId.
|
|
151343
|
+
* @member {string} orgId
|
|
151344
|
+
* @memberof UpdateContactRequest
|
|
151345
|
+
* @instance
|
|
151346
|
+
*/
|
|
151347
|
+
UpdateContactRequest.prototype.orgId = "";
|
|
151348
|
+
|
|
151349
|
+
/**
|
|
151350
|
+
* UpdateContactRequest isNewUser.
|
|
151351
|
+
* @member {boolean} isNewUser
|
|
151352
|
+
* @memberof UpdateContactRequest
|
|
151353
|
+
* @instance
|
|
151354
|
+
*/
|
|
151355
|
+
UpdateContactRequest.prototype.isNewUser = false;
|
|
151356
|
+
|
|
151357
|
+
/**
|
|
151358
|
+
* Creates a new UpdateContactRequest instance using the specified properties.
|
|
151359
|
+
* @function create
|
|
151360
|
+
* @memberof UpdateContactRequest
|
|
151361
|
+
* @static
|
|
151362
|
+
* @param {IUpdateContactRequest=} [properties] Properties to set
|
|
151363
|
+
* @returns {UpdateContactRequest} UpdateContactRequest instance
|
|
151364
|
+
*/
|
|
151365
|
+
UpdateContactRequest.create = function create(properties) {
|
|
151366
|
+
return new UpdateContactRequest(properties);
|
|
151367
|
+
};
|
|
151368
|
+
|
|
151369
|
+
/**
|
|
151370
|
+
* Encodes the specified UpdateContactRequest message. Does not implicitly {@link UpdateContactRequest.verify|verify} messages.
|
|
151371
|
+
* @function encode
|
|
151372
|
+
* @memberof UpdateContactRequest
|
|
151373
|
+
* @static
|
|
151374
|
+
* @param {IUpdateContactRequest} message UpdateContactRequest message or plain object to encode
|
|
151375
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
151376
|
+
* @returns {$protobuf.Writer} Writer
|
|
151377
|
+
*/
|
|
151378
|
+
UpdateContactRequest.encode = function encode(message, writer) {
|
|
151379
|
+
if (!writer)
|
|
151380
|
+
writer = $Writer.create();
|
|
151381
|
+
if (message.spanContext != null && Object.hasOwnProperty.call(message, "spanContext"))
|
|
151382
|
+
writer.uint32(/* id 0, wireType 2 =*/2).string(message.spanContext);
|
|
151383
|
+
if (message._id != null && Object.hasOwnProperty.call(message, "_id"))
|
|
151384
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message._id);
|
|
151385
|
+
if (message.email != null && Object.hasOwnProperty.call(message, "email"))
|
|
151386
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
|
|
151387
|
+
if (message.firstName != null && Object.hasOwnProperty.call(message, "firstName"))
|
|
151388
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.firstName);
|
|
151389
|
+
if (message.lastName != null && Object.hasOwnProperty.call(message, "lastName"))
|
|
151390
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.lastName);
|
|
151391
|
+
if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
|
|
151392
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.userId);
|
|
151393
|
+
if (message.orgId != null && Object.hasOwnProperty.call(message, "orgId"))
|
|
151394
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.orgId);
|
|
151395
|
+
if (message.isNewUser != null && Object.hasOwnProperty.call(message, "isNewUser"))
|
|
151396
|
+
writer.uint32(/* id 7, wireType 0 =*/56).bool(message.isNewUser);
|
|
151397
|
+
return writer;
|
|
151398
|
+
};
|
|
151399
|
+
|
|
151400
|
+
/**
|
|
151401
|
+
* Encodes the specified UpdateContactRequest message, length delimited. Does not implicitly {@link UpdateContactRequest.verify|verify} messages.
|
|
151402
|
+
* @function encodeDelimited
|
|
151403
|
+
* @memberof UpdateContactRequest
|
|
151404
|
+
* @static
|
|
151405
|
+
* @param {IUpdateContactRequest} message UpdateContactRequest message or plain object to encode
|
|
151406
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
151407
|
+
* @returns {$protobuf.Writer} Writer
|
|
151408
|
+
*/
|
|
151409
|
+
UpdateContactRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
151410
|
+
return this.encode(message, writer).ldelim();
|
|
151411
|
+
};
|
|
151412
|
+
|
|
151413
|
+
/**
|
|
151414
|
+
* Decodes an UpdateContactRequest message from the specified reader or buffer.
|
|
151415
|
+
* @function decode
|
|
151416
|
+
* @memberof UpdateContactRequest
|
|
151417
|
+
* @static
|
|
151418
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
151419
|
+
* @param {number} [length] Message length if known beforehand
|
|
151420
|
+
* @returns {UpdateContactRequest} UpdateContactRequest
|
|
151421
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
151422
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
151423
|
+
*/
|
|
151424
|
+
UpdateContactRequest.decode = function decode(reader, length) {
|
|
151425
|
+
if (!(reader instanceof $Reader))
|
|
151426
|
+
reader = $Reader.create(reader);
|
|
151427
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpdateContactRequest();
|
|
151428
|
+
while (reader.pos < end) {
|
|
151429
|
+
var tag = reader.uint32();
|
|
151430
|
+
switch (tag >>> 3) {
|
|
151431
|
+
case 0:
|
|
151432
|
+
message.spanContext = reader.string();
|
|
151433
|
+
break;
|
|
151434
|
+
case 1:
|
|
151435
|
+
message._id = reader.string();
|
|
151436
|
+
break;
|
|
151437
|
+
case 2:
|
|
151438
|
+
message.email = reader.string();
|
|
151439
|
+
break;
|
|
151440
|
+
case 3:
|
|
151441
|
+
message.firstName = reader.string();
|
|
151442
|
+
break;
|
|
151443
|
+
case 4:
|
|
151444
|
+
message.lastName = reader.string();
|
|
151445
|
+
break;
|
|
151446
|
+
case 5:
|
|
151447
|
+
message.userId = reader.string();
|
|
151448
|
+
break;
|
|
151449
|
+
case 6:
|
|
151450
|
+
message.orgId = reader.string();
|
|
151451
|
+
break;
|
|
151452
|
+
case 7:
|
|
151453
|
+
message.isNewUser = reader.bool();
|
|
151454
|
+
break;
|
|
151455
|
+
default:
|
|
151456
|
+
reader.skipType(tag & 7);
|
|
151457
|
+
break;
|
|
151458
|
+
}
|
|
151459
|
+
}
|
|
151460
|
+
return message;
|
|
151461
|
+
};
|
|
151462
|
+
|
|
151463
|
+
/**
|
|
151464
|
+
* Decodes an UpdateContactRequest message from the specified reader or buffer, length delimited.
|
|
151465
|
+
* @function decodeDelimited
|
|
151466
|
+
* @memberof UpdateContactRequest
|
|
151467
|
+
* @static
|
|
151468
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
151469
|
+
* @returns {UpdateContactRequest} UpdateContactRequest
|
|
151470
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
151471
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
151472
|
+
*/
|
|
151473
|
+
UpdateContactRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
151474
|
+
if (!(reader instanceof $Reader))
|
|
151475
|
+
reader = new $Reader(reader);
|
|
151476
|
+
return this.decode(reader, reader.uint32());
|
|
151477
|
+
};
|
|
151478
|
+
|
|
151479
|
+
/**
|
|
151480
|
+
* Verifies an UpdateContactRequest message.
|
|
151481
|
+
* @function verify
|
|
151482
|
+
* @memberof UpdateContactRequest
|
|
151483
|
+
* @static
|
|
151484
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
151485
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
151486
|
+
*/
|
|
151487
|
+
UpdateContactRequest.verify = function verify(message) {
|
|
151488
|
+
if (typeof message !== "object" || message === null)
|
|
151489
|
+
return "object expected";
|
|
151490
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
151491
|
+
if (!$util.isString(message.spanContext))
|
|
151492
|
+
return "spanContext: string expected";
|
|
151493
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
151494
|
+
if (!$util.isString(message._id))
|
|
151495
|
+
return "_id: string expected";
|
|
151496
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
151497
|
+
if (!$util.isString(message.email))
|
|
151498
|
+
return "email: string expected";
|
|
151499
|
+
if (message.firstName != null && message.hasOwnProperty("firstName"))
|
|
151500
|
+
if (!$util.isString(message.firstName))
|
|
151501
|
+
return "firstName: string expected";
|
|
151502
|
+
if (message.lastName != null && message.hasOwnProperty("lastName"))
|
|
151503
|
+
if (!$util.isString(message.lastName))
|
|
151504
|
+
return "lastName: string expected";
|
|
151505
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
151506
|
+
if (!$util.isString(message.userId))
|
|
151507
|
+
return "userId: string expected";
|
|
151508
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
151509
|
+
if (!$util.isString(message.orgId))
|
|
151510
|
+
return "orgId: string expected";
|
|
151511
|
+
if (message.isNewUser != null && message.hasOwnProperty("isNewUser"))
|
|
151512
|
+
if (typeof message.isNewUser !== "boolean")
|
|
151513
|
+
return "isNewUser: boolean expected";
|
|
151514
|
+
return null;
|
|
151515
|
+
};
|
|
151516
|
+
|
|
151517
|
+
/**
|
|
151518
|
+
* Creates an UpdateContactRequest message from a plain object. Also converts values to their respective internal types.
|
|
151519
|
+
* @function fromObject
|
|
151520
|
+
* @memberof UpdateContactRequest
|
|
151521
|
+
* @static
|
|
151522
|
+
* @param {Object.<string,*>} object Plain object
|
|
151523
|
+
* @returns {UpdateContactRequest} UpdateContactRequest
|
|
151524
|
+
*/
|
|
151525
|
+
UpdateContactRequest.fromObject = function fromObject(object) {
|
|
151526
|
+
if (object instanceof $root.UpdateContactRequest)
|
|
151527
|
+
return object;
|
|
151528
|
+
var message = new $root.UpdateContactRequest();
|
|
151529
|
+
if (object.spanContext != null)
|
|
151530
|
+
message.spanContext = String(object.spanContext);
|
|
151531
|
+
if (object._id != null)
|
|
151532
|
+
message._id = String(object._id);
|
|
151533
|
+
if (object.email != null)
|
|
151534
|
+
message.email = String(object.email);
|
|
151535
|
+
if (object.firstName != null)
|
|
151536
|
+
message.firstName = String(object.firstName);
|
|
151537
|
+
if (object.lastName != null)
|
|
151538
|
+
message.lastName = String(object.lastName);
|
|
151539
|
+
if (object.userId != null)
|
|
151540
|
+
message.userId = String(object.userId);
|
|
151541
|
+
if (object.orgId != null)
|
|
151542
|
+
message.orgId = String(object.orgId);
|
|
151543
|
+
if (object.isNewUser != null)
|
|
151544
|
+
message.isNewUser = Boolean(object.isNewUser);
|
|
151545
|
+
return message;
|
|
151546
|
+
};
|
|
151547
|
+
|
|
151548
|
+
/**
|
|
151549
|
+
* Creates a plain object from an UpdateContactRequest message. Also converts values to other types if specified.
|
|
151550
|
+
* @function toObject
|
|
151551
|
+
* @memberof UpdateContactRequest
|
|
151552
|
+
* @static
|
|
151553
|
+
* @param {UpdateContactRequest} message UpdateContactRequest
|
|
151554
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
151555
|
+
* @returns {Object.<string,*>} Plain object
|
|
151556
|
+
*/
|
|
151557
|
+
UpdateContactRequest.toObject = function toObject(message, options) {
|
|
151558
|
+
if (!options)
|
|
151559
|
+
options = {};
|
|
151560
|
+
var object = {};
|
|
151561
|
+
if (options.defaults) {
|
|
151562
|
+
object.spanContext = "";
|
|
151563
|
+
object._id = "";
|
|
151564
|
+
object.email = "";
|
|
151565
|
+
object.firstName = "";
|
|
151566
|
+
object.lastName = "";
|
|
151567
|
+
object.userId = "";
|
|
151568
|
+
object.orgId = "";
|
|
151569
|
+
object.isNewUser = false;
|
|
151570
|
+
}
|
|
151571
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
151572
|
+
object.spanContext = message.spanContext;
|
|
151573
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
151574
|
+
object._id = message._id;
|
|
151575
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
151576
|
+
object.email = message.email;
|
|
151577
|
+
if (message.firstName != null && message.hasOwnProperty("firstName"))
|
|
151578
|
+
object.firstName = message.firstName;
|
|
151579
|
+
if (message.lastName != null && message.hasOwnProperty("lastName"))
|
|
151580
|
+
object.lastName = message.lastName;
|
|
151581
|
+
if (message.userId != null && message.hasOwnProperty("userId"))
|
|
151582
|
+
object.userId = message.userId;
|
|
151583
|
+
if (message.orgId != null && message.hasOwnProperty("orgId"))
|
|
151584
|
+
object.orgId = message.orgId;
|
|
151585
|
+
if (message.isNewUser != null && message.hasOwnProperty("isNewUser"))
|
|
151586
|
+
object.isNewUser = message.isNewUser;
|
|
151587
|
+
return object;
|
|
151588
|
+
};
|
|
151589
|
+
|
|
151590
|
+
/**
|
|
151591
|
+
* Converts this UpdateContactRequest to JSON.
|
|
151592
|
+
* @function toJSON
|
|
151593
|
+
* @memberof UpdateContactRequest
|
|
151594
|
+
* @instance
|
|
151595
|
+
* @returns {Object.<string,*>} JSON object
|
|
151596
|
+
*/
|
|
151597
|
+
UpdateContactRequest.prototype.toJSON = function toJSON() {
|
|
151598
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
151599
|
+
};
|
|
151600
|
+
|
|
151601
|
+
return UpdateContactRequest;
|
|
151602
|
+
})();
|
|
151603
|
+
|
|
151604
|
+
$root.UpdateContactResponse = (function() {
|
|
151605
|
+
|
|
151606
|
+
/**
|
|
151607
|
+
* Properties of an UpdateContactResponse.
|
|
151608
|
+
* @exports IUpdateContactResponse
|
|
151609
|
+
* @interface IUpdateContactResponse
|
|
151610
|
+
* @property {StatusCode|null} [status] UpdateContactResponse status
|
|
151611
|
+
* @property {Array.<IError>|null} [errors] UpdateContactResponse errors
|
|
151612
|
+
* @property {IContact|null} [contact] UpdateContactResponse contact
|
|
151613
|
+
*/
|
|
151614
|
+
|
|
151615
|
+
/**
|
|
151616
|
+
* Constructs a new UpdateContactResponse.
|
|
151617
|
+
* @exports UpdateContactResponse
|
|
151618
|
+
* @classdesc Represents an UpdateContactResponse.
|
|
151619
|
+
* @implements IUpdateContactResponse
|
|
151620
|
+
* @constructor
|
|
151621
|
+
* @param {IUpdateContactResponse=} [properties] Properties to set
|
|
151622
|
+
*/
|
|
151623
|
+
function UpdateContactResponse(properties) {
|
|
151624
|
+
this.errors = [];
|
|
151625
|
+
if (properties)
|
|
151626
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
151627
|
+
if (properties[keys[i]] != null)
|
|
151628
|
+
this[keys[i]] = properties[keys[i]];
|
|
151629
|
+
}
|
|
151630
|
+
|
|
151631
|
+
/**
|
|
151632
|
+
* UpdateContactResponse status.
|
|
151633
|
+
* @member {StatusCode} status
|
|
151634
|
+
* @memberof UpdateContactResponse
|
|
151635
|
+
* @instance
|
|
151636
|
+
*/
|
|
151637
|
+
UpdateContactResponse.prototype.status = 0;
|
|
151638
|
+
|
|
151639
|
+
/**
|
|
151640
|
+
* UpdateContactResponse errors.
|
|
151641
|
+
* @member {Array.<IError>} errors
|
|
151642
|
+
* @memberof UpdateContactResponse
|
|
151643
|
+
* @instance
|
|
151644
|
+
*/
|
|
151645
|
+
UpdateContactResponse.prototype.errors = $util.emptyArray;
|
|
151646
|
+
|
|
151647
|
+
/**
|
|
151648
|
+
* UpdateContactResponse contact.
|
|
151649
|
+
* @member {IContact|null|undefined} contact
|
|
151650
|
+
* @memberof UpdateContactResponse
|
|
151651
|
+
* @instance
|
|
151652
|
+
*/
|
|
151653
|
+
UpdateContactResponse.prototype.contact = null;
|
|
151654
|
+
|
|
151655
|
+
/**
|
|
151656
|
+
* Creates a new UpdateContactResponse instance using the specified properties.
|
|
151657
|
+
* @function create
|
|
151658
|
+
* @memberof UpdateContactResponse
|
|
151659
|
+
* @static
|
|
151660
|
+
* @param {IUpdateContactResponse=} [properties] Properties to set
|
|
151661
|
+
* @returns {UpdateContactResponse} UpdateContactResponse instance
|
|
151662
|
+
*/
|
|
151663
|
+
UpdateContactResponse.create = function create(properties) {
|
|
151664
|
+
return new UpdateContactResponse(properties);
|
|
151665
|
+
};
|
|
151666
|
+
|
|
151667
|
+
/**
|
|
151668
|
+
* Encodes the specified UpdateContactResponse message. Does not implicitly {@link UpdateContactResponse.verify|verify} messages.
|
|
151669
|
+
* @function encode
|
|
151670
|
+
* @memberof UpdateContactResponse
|
|
151671
|
+
* @static
|
|
151672
|
+
* @param {IUpdateContactResponse} message UpdateContactResponse message or plain object to encode
|
|
151673
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
151674
|
+
* @returns {$protobuf.Writer} Writer
|
|
151675
|
+
*/
|
|
151676
|
+
UpdateContactResponse.encode = function encode(message, writer) {
|
|
151677
|
+
if (!writer)
|
|
151678
|
+
writer = $Writer.create();
|
|
151679
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
151680
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
151681
|
+
if (message.errors != null && message.errors.length)
|
|
151682
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
151683
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
151684
|
+
if (message.contact != null && Object.hasOwnProperty.call(message, "contact"))
|
|
151685
|
+
$root.Contact.encode(message.contact, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
151686
|
+
return writer;
|
|
151687
|
+
};
|
|
151688
|
+
|
|
151689
|
+
/**
|
|
151690
|
+
* Encodes the specified UpdateContactResponse message, length delimited. Does not implicitly {@link UpdateContactResponse.verify|verify} messages.
|
|
151691
|
+
* @function encodeDelimited
|
|
151692
|
+
* @memberof UpdateContactResponse
|
|
151693
|
+
* @static
|
|
151694
|
+
* @param {IUpdateContactResponse} message UpdateContactResponse message or plain object to encode
|
|
151695
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
151696
|
+
* @returns {$protobuf.Writer} Writer
|
|
151697
|
+
*/
|
|
151698
|
+
UpdateContactResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
151699
|
+
return this.encode(message, writer).ldelim();
|
|
151700
|
+
};
|
|
151701
|
+
|
|
151702
|
+
/**
|
|
151703
|
+
* Decodes an UpdateContactResponse message from the specified reader or buffer.
|
|
151704
|
+
* @function decode
|
|
151705
|
+
* @memberof UpdateContactResponse
|
|
151706
|
+
* @static
|
|
151707
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
151708
|
+
* @param {number} [length] Message length if known beforehand
|
|
151709
|
+
* @returns {UpdateContactResponse} UpdateContactResponse
|
|
151710
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
151711
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
151712
|
+
*/
|
|
151713
|
+
UpdateContactResponse.decode = function decode(reader, length) {
|
|
151714
|
+
if (!(reader instanceof $Reader))
|
|
151715
|
+
reader = $Reader.create(reader);
|
|
151716
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpdateContactResponse();
|
|
151717
|
+
while (reader.pos < end) {
|
|
151718
|
+
var tag = reader.uint32();
|
|
151719
|
+
switch (tag >>> 3) {
|
|
151720
|
+
case 1:
|
|
151721
|
+
message.status = reader.int32();
|
|
151722
|
+
break;
|
|
151723
|
+
case 2:
|
|
151724
|
+
if (!(message.errors && message.errors.length))
|
|
151725
|
+
message.errors = [];
|
|
151726
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
151727
|
+
break;
|
|
151728
|
+
case 3:
|
|
151729
|
+
message.contact = $root.Contact.decode(reader, reader.uint32());
|
|
151730
|
+
break;
|
|
151731
|
+
default:
|
|
151732
|
+
reader.skipType(tag & 7);
|
|
151733
|
+
break;
|
|
151734
|
+
}
|
|
151735
|
+
}
|
|
151736
|
+
return message;
|
|
151737
|
+
};
|
|
151738
|
+
|
|
151739
|
+
/**
|
|
151740
|
+
* Decodes an UpdateContactResponse message from the specified reader or buffer, length delimited.
|
|
151741
|
+
* @function decodeDelimited
|
|
151742
|
+
* @memberof UpdateContactResponse
|
|
151743
|
+
* @static
|
|
151744
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
151745
|
+
* @returns {UpdateContactResponse} UpdateContactResponse
|
|
151746
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
151747
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
151748
|
+
*/
|
|
151749
|
+
UpdateContactResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
151750
|
+
if (!(reader instanceof $Reader))
|
|
151751
|
+
reader = new $Reader(reader);
|
|
151752
|
+
return this.decode(reader, reader.uint32());
|
|
151753
|
+
};
|
|
151754
|
+
|
|
151755
|
+
/**
|
|
151756
|
+
* Verifies an UpdateContactResponse message.
|
|
151757
|
+
* @function verify
|
|
151758
|
+
* @memberof UpdateContactResponse
|
|
151759
|
+
* @static
|
|
151760
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
151761
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
151762
|
+
*/
|
|
151763
|
+
UpdateContactResponse.verify = function verify(message) {
|
|
151764
|
+
if (typeof message !== "object" || message === null)
|
|
151765
|
+
return "object expected";
|
|
151766
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
151767
|
+
switch (message.status) {
|
|
151768
|
+
default:
|
|
151769
|
+
return "status: enum value expected";
|
|
151770
|
+
case 0:
|
|
151771
|
+
case 200:
|
|
151772
|
+
case 400:
|
|
151773
|
+
case 401:
|
|
151774
|
+
case 403:
|
|
151775
|
+
case 422:
|
|
151776
|
+
case 404:
|
|
151777
|
+
case 500:
|
|
151778
|
+
case 504:
|
|
151779
|
+
break;
|
|
151780
|
+
}
|
|
151781
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
151782
|
+
if (!Array.isArray(message.errors))
|
|
151783
|
+
return "errors: array expected";
|
|
151784
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
151785
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
151786
|
+
if (error)
|
|
151787
|
+
return "errors." + error;
|
|
151788
|
+
}
|
|
151789
|
+
}
|
|
151790
|
+
if (message.contact != null && message.hasOwnProperty("contact")) {
|
|
151791
|
+
var error = $root.Contact.verify(message.contact);
|
|
151792
|
+
if (error)
|
|
151793
|
+
return "contact." + error;
|
|
151794
|
+
}
|
|
151795
|
+
return null;
|
|
151796
|
+
};
|
|
151797
|
+
|
|
151798
|
+
/**
|
|
151799
|
+
* Creates an UpdateContactResponse message from a plain object. Also converts values to their respective internal types.
|
|
151800
|
+
* @function fromObject
|
|
151801
|
+
* @memberof UpdateContactResponse
|
|
151802
|
+
* @static
|
|
151803
|
+
* @param {Object.<string,*>} object Plain object
|
|
151804
|
+
* @returns {UpdateContactResponse} UpdateContactResponse
|
|
151805
|
+
*/
|
|
151806
|
+
UpdateContactResponse.fromObject = function fromObject(object) {
|
|
151807
|
+
if (object instanceof $root.UpdateContactResponse)
|
|
151808
|
+
return object;
|
|
151809
|
+
var message = new $root.UpdateContactResponse();
|
|
151810
|
+
switch (object.status) {
|
|
151811
|
+
case "UNKNOWN_CODE":
|
|
151812
|
+
case 0:
|
|
151813
|
+
message.status = 0;
|
|
151814
|
+
break;
|
|
151815
|
+
case "OK":
|
|
151816
|
+
case 200:
|
|
151817
|
+
message.status = 200;
|
|
151818
|
+
break;
|
|
151819
|
+
case "BAD_REQUEST":
|
|
151820
|
+
case 400:
|
|
151821
|
+
message.status = 400;
|
|
151822
|
+
break;
|
|
151823
|
+
case "UNAUTHORIZED":
|
|
151824
|
+
case 401:
|
|
151825
|
+
message.status = 401;
|
|
151826
|
+
break;
|
|
151827
|
+
case "FORBIDDEN":
|
|
151828
|
+
case 403:
|
|
151829
|
+
message.status = 403;
|
|
151830
|
+
break;
|
|
151831
|
+
case "UNPROCESSABLE_ENTITY":
|
|
151832
|
+
case 422:
|
|
151833
|
+
message.status = 422;
|
|
151834
|
+
break;
|
|
151835
|
+
case "NOT_FOUND":
|
|
151836
|
+
case 404:
|
|
151837
|
+
message.status = 404;
|
|
151838
|
+
break;
|
|
151839
|
+
case "INTERNAL_SERVER_ERROR":
|
|
151840
|
+
case 500:
|
|
151841
|
+
message.status = 500;
|
|
151842
|
+
break;
|
|
151843
|
+
case "GATEWAY_TIMEOUT":
|
|
151844
|
+
case 504:
|
|
151845
|
+
message.status = 504;
|
|
151846
|
+
break;
|
|
151847
|
+
}
|
|
151848
|
+
if (object.errors) {
|
|
151849
|
+
if (!Array.isArray(object.errors))
|
|
151850
|
+
throw TypeError(".UpdateContactResponse.errors: array expected");
|
|
151851
|
+
message.errors = [];
|
|
151852
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
151853
|
+
if (typeof object.errors[i] !== "object")
|
|
151854
|
+
throw TypeError(".UpdateContactResponse.errors: object expected");
|
|
151855
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
151856
|
+
}
|
|
151857
|
+
}
|
|
151858
|
+
if (object.contact != null) {
|
|
151859
|
+
if (typeof object.contact !== "object")
|
|
151860
|
+
throw TypeError(".UpdateContactResponse.contact: object expected");
|
|
151861
|
+
message.contact = $root.Contact.fromObject(object.contact);
|
|
151862
|
+
}
|
|
151863
|
+
return message;
|
|
151864
|
+
};
|
|
151865
|
+
|
|
151866
|
+
/**
|
|
151867
|
+
* Creates a plain object from an UpdateContactResponse message. Also converts values to other types if specified.
|
|
151868
|
+
* @function toObject
|
|
151869
|
+
* @memberof UpdateContactResponse
|
|
151870
|
+
* @static
|
|
151871
|
+
* @param {UpdateContactResponse} message UpdateContactResponse
|
|
151872
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
151873
|
+
* @returns {Object.<string,*>} Plain object
|
|
151874
|
+
*/
|
|
151875
|
+
UpdateContactResponse.toObject = function toObject(message, options) {
|
|
151876
|
+
if (!options)
|
|
151877
|
+
options = {};
|
|
151878
|
+
var object = {};
|
|
151879
|
+
if (options.arrays || options.defaults)
|
|
151880
|
+
object.errors = [];
|
|
151881
|
+
if (options.defaults) {
|
|
151882
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
151883
|
+
object.contact = null;
|
|
151884
|
+
}
|
|
151885
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
151886
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
151887
|
+
if (message.errors && message.errors.length) {
|
|
151888
|
+
object.errors = [];
|
|
151889
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
151890
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
151891
|
+
}
|
|
151892
|
+
if (message.contact != null && message.hasOwnProperty("contact"))
|
|
151893
|
+
object.contact = $root.Contact.toObject(message.contact, options);
|
|
151894
|
+
return object;
|
|
151895
|
+
};
|
|
151896
|
+
|
|
151897
|
+
/**
|
|
151898
|
+
* Converts this UpdateContactResponse to JSON.
|
|
151899
|
+
* @function toJSON
|
|
151900
|
+
* @memberof UpdateContactResponse
|
|
151901
|
+
* @instance
|
|
151902
|
+
* @returns {Object.<string,*>} JSON object
|
|
151903
|
+
*/
|
|
151904
|
+
UpdateContactResponse.prototype.toJSON = function toJSON() {
|
|
151905
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
151906
|
+
};
|
|
151907
|
+
|
|
151908
|
+
return UpdateContactResponse;
|
|
151909
|
+
})();
|
|
151910
|
+
|
|
151911
|
+
$root.UserService = (function() {
|
|
151912
|
+
|
|
151913
|
+
/**
|
|
151914
|
+
* Constructs a new UserService service.
|
|
151915
|
+
* @exports UserService
|
|
151916
|
+
* @classdesc Represents a UserService
|
|
151917
|
+
* @extends $protobuf.rpc.Service
|
|
151918
|
+
* @constructor
|
|
151919
|
+
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
151920
|
+
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
151921
|
+
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
151922
|
+
*/
|
|
151923
|
+
function UserService(rpcImpl, requestDelimited, responseDelimited) {
|
|
151924
|
+
$protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
|
151925
|
+
}
|
|
151926
|
+
|
|
151927
|
+
(UserService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = UserService;
|
|
151928
|
+
|
|
151929
|
+
/**
|
|
151930
|
+
* Creates new UserService service using the specified rpc implementation.
|
|
151931
|
+
* @function create
|
|
151932
|
+
* @memberof UserService
|
|
151933
|
+
* @static
|
|
151934
|
+
* @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
|
151935
|
+
* @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
|
151936
|
+
* @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
|
151937
|
+
* @returns {UserService} RPC service. Useful where requests and/or responses are streamed.
|
|
151938
|
+
*/
|
|
151939
|
+
UserService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
|
151940
|
+
return new this(rpcImpl, requestDelimited, responseDelimited);
|
|
151941
|
+
};
|
|
151942
|
+
|
|
151943
|
+
/**
|
|
151944
|
+
* Callback as used by {@link UserService#createUser}.
|
|
151945
|
+
* @memberof UserService
|
|
151946
|
+
* @typedef createUserCallback
|
|
151947
|
+
* @type {function}
|
|
151948
|
+
* @param {Error|null} error Error, if any
|
|
151949
|
+
* @param {CreateUserResponse} [response] CreateUserResponse
|
|
151950
|
+
*/
|
|
151951
|
+
|
|
151952
|
+
/**
|
|
151953
|
+
* Calls createUser.
|
|
151954
|
+
* @function createUser
|
|
151955
|
+
* @memberof UserService
|
|
151956
|
+
* @instance
|
|
151957
|
+
* @param {ICreateUserRequest} request CreateUserRequest message or plain object
|
|
151958
|
+
* @param {UserService.createUserCallback} callback Node-style callback called with the error, if any, and CreateUserResponse
|
|
151959
|
+
* @returns {undefined}
|
|
151960
|
+
* @variation 1
|
|
151961
|
+
*/
|
|
151962
|
+
Object.defineProperty(UserService.prototype.createUser = function createUser(request, callback) {
|
|
151963
|
+
return this.rpcCall(createUser, $root.CreateUserRequest, $root.CreateUserResponse, request, callback);
|
|
151964
|
+
}, "name", { value: "createUser" });
|
|
151965
|
+
|
|
151966
|
+
/**
|
|
151967
|
+
* Calls createUser.
|
|
151968
|
+
* @function createUser
|
|
151969
|
+
* @memberof UserService
|
|
151970
|
+
* @instance
|
|
151971
|
+
* @param {ICreateUserRequest} request CreateUserRequest message or plain object
|
|
151972
|
+
* @returns {Promise<CreateUserResponse>} Promise
|
|
151973
|
+
* @variation 2
|
|
151974
|
+
*/
|
|
151975
|
+
|
|
151976
|
+
/**
|
|
151977
|
+
* Callback as used by {@link UserService#sendUserEmailVerification}.
|
|
151978
|
+
* @memberof UserService
|
|
151979
|
+
* @typedef sendUserEmailVerificationCallback
|
|
151980
|
+
* @type {function}
|
|
151981
|
+
* @param {Error|null} error Error, if any
|
|
151982
|
+
* @param {SendUserEmailVerificationResponse} [response] SendUserEmailVerificationResponse
|
|
151983
|
+
*/
|
|
151984
|
+
|
|
151985
|
+
/**
|
|
151986
|
+
* Calls sendUserEmailVerification.
|
|
151987
|
+
* @function sendUserEmailVerification
|
|
151988
|
+
* @memberof UserService
|
|
151989
|
+
* @instance
|
|
151990
|
+
* @param {ISendUserEmailVerificationRequest} request SendUserEmailVerificationRequest message or plain object
|
|
151991
|
+
* @param {UserService.sendUserEmailVerificationCallback} callback Node-style callback called with the error, if any, and SendUserEmailVerificationResponse
|
|
151992
|
+
* @returns {undefined}
|
|
151993
|
+
* @variation 1
|
|
151994
|
+
*/
|
|
151995
|
+
Object.defineProperty(UserService.prototype.sendUserEmailVerification = function sendUserEmailVerification(request, callback) {
|
|
151996
|
+
return this.rpcCall(sendUserEmailVerification, $root.SendUserEmailVerificationRequest, $root.SendUserEmailVerificationResponse, request, callback);
|
|
151997
|
+
}, "name", { value: "sendUserEmailVerification" });
|
|
151998
|
+
|
|
151999
|
+
/**
|
|
152000
|
+
* Calls sendUserEmailVerification.
|
|
152001
|
+
* @function sendUserEmailVerification
|
|
152002
|
+
* @memberof UserService
|
|
152003
|
+
* @instance
|
|
152004
|
+
* @param {ISendUserEmailVerificationRequest} request SendUserEmailVerificationRequest message or plain object
|
|
152005
|
+
* @returns {Promise<SendUserEmailVerificationResponse>} Promise
|
|
152006
|
+
* @variation 2
|
|
152007
|
+
*/
|
|
152008
|
+
|
|
152009
|
+
/**
|
|
152010
|
+
* Callback as used by {@link UserService#verifyUserEmail}.
|
|
152011
|
+
* @memberof UserService
|
|
152012
|
+
* @typedef verifyUserEmailCallback
|
|
152013
|
+
* @type {function}
|
|
152014
|
+
* @param {Error|null} error Error, if any
|
|
152015
|
+
* @param {VerifyUserEmailResponse} [response] VerifyUserEmailResponse
|
|
152016
|
+
*/
|
|
152017
|
+
|
|
152018
|
+
/**
|
|
152019
|
+
* Calls verifyUserEmail.
|
|
152020
|
+
* @function verifyUserEmail
|
|
152021
|
+
* @memberof UserService
|
|
152022
|
+
* @instance
|
|
152023
|
+
* @param {IVerifyUserEmailRequest} request VerifyUserEmailRequest message or plain object
|
|
152024
|
+
* @param {UserService.verifyUserEmailCallback} callback Node-style callback called with the error, if any, and VerifyUserEmailResponse
|
|
152025
|
+
* @returns {undefined}
|
|
152026
|
+
* @variation 1
|
|
152027
|
+
*/
|
|
152028
|
+
Object.defineProperty(UserService.prototype.verifyUserEmail = function verifyUserEmail(request, callback) {
|
|
152029
|
+
return this.rpcCall(verifyUserEmail, $root.VerifyUserEmailRequest, $root.VerifyUserEmailResponse, request, callback);
|
|
152030
|
+
}, "name", { value: "verifyUserEmail" });
|
|
152031
|
+
|
|
152032
|
+
/**
|
|
152033
|
+
* Calls verifyUserEmail.
|
|
152034
|
+
* @function verifyUserEmail
|
|
152035
|
+
* @memberof UserService
|
|
152036
|
+
* @instance
|
|
152037
|
+
* @param {IVerifyUserEmailRequest} request VerifyUserEmailRequest message or plain object
|
|
152038
|
+
* @returns {Promise<VerifyUserEmailResponse>} Promise
|
|
152039
|
+
* @variation 2
|
|
152040
|
+
*/
|
|
152041
|
+
|
|
152042
|
+
/**
|
|
152043
|
+
* Callback as used by {@link UserService#sendUserPhoneVerification}.
|
|
152044
|
+
* @memberof UserService
|
|
152045
|
+
* @typedef sendUserPhoneVerificationCallback
|
|
152046
|
+
* @type {function}
|
|
152047
|
+
* @param {Error|null} error Error, if any
|
|
152048
|
+
* @param {SendUserPhoneVerificationResponse} [response] SendUserPhoneVerificationResponse
|
|
152049
|
+
*/
|
|
152050
|
+
|
|
152051
|
+
/**
|
|
152052
|
+
* Calls sendUserPhoneVerification.
|
|
152053
|
+
* @function sendUserPhoneVerification
|
|
152054
|
+
* @memberof UserService
|
|
152055
|
+
* @instance
|
|
152056
|
+
* @param {ISendUserPhoneVerificationRequest} request SendUserPhoneVerificationRequest message or plain object
|
|
152057
|
+
* @param {UserService.sendUserPhoneVerificationCallback} callback Node-style callback called with the error, if any, and SendUserPhoneVerificationResponse
|
|
152058
|
+
* @returns {undefined}
|
|
152059
|
+
* @variation 1
|
|
152060
|
+
*/
|
|
152061
|
+
Object.defineProperty(UserService.prototype.sendUserPhoneVerification = function sendUserPhoneVerification(request, callback) {
|
|
152062
|
+
return this.rpcCall(sendUserPhoneVerification, $root.SendUserPhoneVerificationRequest, $root.SendUserPhoneVerificationResponse, request, callback);
|
|
152063
|
+
}, "name", { value: "sendUserPhoneVerification" });
|
|
152064
|
+
|
|
152065
|
+
/**
|
|
152066
|
+
* Calls sendUserPhoneVerification.
|
|
152067
|
+
* @function sendUserPhoneVerification
|
|
152068
|
+
* @memberof UserService
|
|
152069
|
+
* @instance
|
|
152070
|
+
* @param {ISendUserPhoneVerificationRequest} request SendUserPhoneVerificationRequest message or plain object
|
|
152071
|
+
* @returns {Promise<SendUserPhoneVerificationResponse>} Promise
|
|
152072
|
+
* @variation 2
|
|
152073
|
+
*/
|
|
152074
|
+
|
|
152075
|
+
/**
|
|
152076
|
+
* Callback as used by {@link UserService#verifyUserPhoneNumber}.
|
|
152077
|
+
* @memberof UserService
|
|
152078
|
+
* @typedef verifyUserPhoneNumberCallback
|
|
152079
|
+
* @type {function}
|
|
152080
|
+
* @param {Error|null} error Error, if any
|
|
152081
|
+
* @param {VerifyUserPhoneNumberResponse} [response] VerifyUserPhoneNumberResponse
|
|
152082
|
+
*/
|
|
152083
|
+
|
|
152084
|
+
/**
|
|
152085
|
+
* Calls verifyUserPhoneNumber.
|
|
152086
|
+
* @function verifyUserPhoneNumber
|
|
152087
|
+
* @memberof UserService
|
|
152088
|
+
* @instance
|
|
152089
|
+
* @param {IVerifyUserPhoneNumberRequest} request VerifyUserPhoneNumberRequest message or plain object
|
|
152090
|
+
* @param {UserService.verifyUserPhoneNumberCallback} callback Node-style callback called with the error, if any, and VerifyUserPhoneNumberResponse
|
|
152091
|
+
* @returns {undefined}
|
|
152092
|
+
* @variation 1
|
|
152093
|
+
*/
|
|
152094
|
+
Object.defineProperty(UserService.prototype.verifyUserPhoneNumber = function verifyUserPhoneNumber(request, callback) {
|
|
152095
|
+
return this.rpcCall(verifyUserPhoneNumber, $root.VerifyUserPhoneNumberRequest, $root.VerifyUserPhoneNumberResponse, request, callback);
|
|
152096
|
+
}, "name", { value: "verifyUserPhoneNumber" });
|
|
152097
|
+
|
|
152098
|
+
/**
|
|
152099
|
+
* Calls verifyUserPhoneNumber.
|
|
152100
|
+
* @function verifyUserPhoneNumber
|
|
152101
|
+
* @memberof UserService
|
|
152102
|
+
* @instance
|
|
152103
|
+
* @param {IVerifyUserPhoneNumberRequest} request VerifyUserPhoneNumberRequest message or plain object
|
|
152104
|
+
* @returns {Promise<VerifyUserPhoneNumberResponse>} Promise
|
|
152105
|
+
* @variation 2
|
|
152106
|
+
*/
|
|
152107
|
+
|
|
152108
|
+
/**
|
|
152109
|
+
* Callback as used by {@link UserService#authUser}.
|
|
152110
|
+
* @memberof UserService
|
|
152111
|
+
* @typedef authUserCallback
|
|
152112
|
+
* @type {function}
|
|
152113
|
+
* @param {Error|null} error Error, if any
|
|
152114
|
+
* @param {AuthUserResponse} [response] AuthUserResponse
|
|
152115
|
+
*/
|
|
152116
|
+
|
|
152117
|
+
/**
|
|
152118
|
+
* Calls authUser.
|
|
149776
152119
|
* @function authUser
|
|
149777
152120
|
* @memberof UserService
|
|
149778
152121
|
* @instance
|
|
@@ -150455,6 +152798,105 @@ $root.UserService = (function() {
|
|
|
150455
152798
|
* @variation 2
|
|
150456
152799
|
*/
|
|
150457
152800
|
|
|
152801
|
+
/**
|
|
152802
|
+
* Callback as used by {@link UserService#createContact}.
|
|
152803
|
+
* @memberof UserService
|
|
152804
|
+
* @typedef createContactCallback
|
|
152805
|
+
* @type {function}
|
|
152806
|
+
* @param {Error|null} error Error, if any
|
|
152807
|
+
* @param {CreateContactResponse} [response] CreateContactResponse
|
|
152808
|
+
*/
|
|
152809
|
+
|
|
152810
|
+
/**
|
|
152811
|
+
* Calls createContact.
|
|
152812
|
+
* @function createContact
|
|
152813
|
+
* @memberof UserService
|
|
152814
|
+
* @instance
|
|
152815
|
+
* @param {ICreateContactRequest} request CreateContactRequest message or plain object
|
|
152816
|
+
* @param {UserService.createContactCallback} callback Node-style callback called with the error, if any, and CreateContactResponse
|
|
152817
|
+
* @returns {undefined}
|
|
152818
|
+
* @variation 1
|
|
152819
|
+
*/
|
|
152820
|
+
Object.defineProperty(UserService.prototype.createContact = function createContact(request, callback) {
|
|
152821
|
+
return this.rpcCall(createContact, $root.CreateContactRequest, $root.CreateContactResponse, request, callback);
|
|
152822
|
+
}, "name", { value: "createContact" });
|
|
152823
|
+
|
|
152824
|
+
/**
|
|
152825
|
+
* Calls createContact.
|
|
152826
|
+
* @function createContact
|
|
152827
|
+
* @memberof UserService
|
|
152828
|
+
* @instance
|
|
152829
|
+
* @param {ICreateContactRequest} request CreateContactRequest message or plain object
|
|
152830
|
+
* @returns {Promise<CreateContactResponse>} Promise
|
|
152831
|
+
* @variation 2
|
|
152832
|
+
*/
|
|
152833
|
+
|
|
152834
|
+
/**
|
|
152835
|
+
* Callback as used by {@link UserService#queryContacts}.
|
|
152836
|
+
* @memberof UserService
|
|
152837
|
+
* @typedef queryContactsCallback
|
|
152838
|
+
* @type {function}
|
|
152839
|
+
* @param {Error|null} error Error, if any
|
|
152840
|
+
* @param {QueryContactsResponse} [response] QueryContactsResponse
|
|
152841
|
+
*/
|
|
152842
|
+
|
|
152843
|
+
/**
|
|
152844
|
+
* Calls queryContacts.
|
|
152845
|
+
* @function queryContacts
|
|
152846
|
+
* @memberof UserService
|
|
152847
|
+
* @instance
|
|
152848
|
+
* @param {IQueryContactsRequest} request QueryContactsRequest message or plain object
|
|
152849
|
+
* @param {UserService.queryContactsCallback} callback Node-style callback called with the error, if any, and QueryContactsResponse
|
|
152850
|
+
* @returns {undefined}
|
|
152851
|
+
* @variation 1
|
|
152852
|
+
*/
|
|
152853
|
+
Object.defineProperty(UserService.prototype.queryContacts = function queryContacts(request, callback) {
|
|
152854
|
+
return this.rpcCall(queryContacts, $root.QueryContactsRequest, $root.QueryContactsResponse, request, callback);
|
|
152855
|
+
}, "name", { value: "queryContacts" });
|
|
152856
|
+
|
|
152857
|
+
/**
|
|
152858
|
+
* Calls queryContacts.
|
|
152859
|
+
* @function queryContacts
|
|
152860
|
+
* @memberof UserService
|
|
152861
|
+
* @instance
|
|
152862
|
+
* @param {IQueryContactsRequest} request QueryContactsRequest message or plain object
|
|
152863
|
+
* @returns {Promise<QueryContactsResponse>} Promise
|
|
152864
|
+
* @variation 2
|
|
152865
|
+
*/
|
|
152866
|
+
|
|
152867
|
+
/**
|
|
152868
|
+
* Callback as used by {@link UserService#updateContact}.
|
|
152869
|
+
* @memberof UserService
|
|
152870
|
+
* @typedef updateContactCallback
|
|
152871
|
+
* @type {function}
|
|
152872
|
+
* @param {Error|null} error Error, if any
|
|
152873
|
+
* @param {UpdateContactResponse} [response] UpdateContactResponse
|
|
152874
|
+
*/
|
|
152875
|
+
|
|
152876
|
+
/**
|
|
152877
|
+
* Calls updateContact.
|
|
152878
|
+
* @function updateContact
|
|
152879
|
+
* @memberof UserService
|
|
152880
|
+
* @instance
|
|
152881
|
+
* @param {IUpdateContactRequest} request UpdateContactRequest message or plain object
|
|
152882
|
+
* @param {UserService.updateContactCallback} callback Node-style callback called with the error, if any, and UpdateContactResponse
|
|
152883
|
+
* @returns {undefined}
|
|
152884
|
+
* @variation 1
|
|
152885
|
+
*/
|
|
152886
|
+
Object.defineProperty(UserService.prototype.updateContact = function updateContact(request, callback) {
|
|
152887
|
+
return this.rpcCall(updateContact, $root.UpdateContactRequest, $root.UpdateContactResponse, request, callback);
|
|
152888
|
+
}, "name", { value: "updateContact" });
|
|
152889
|
+
|
|
152890
|
+
/**
|
|
152891
|
+
* Calls updateContact.
|
|
152892
|
+
* @function updateContact
|
|
152893
|
+
* @memberof UserService
|
|
152894
|
+
* @instance
|
|
152895
|
+
* @param {IUpdateContactRequest} request UpdateContactRequest message or plain object
|
|
152896
|
+
* @returns {Promise<UpdateContactResponse>} Promise
|
|
152897
|
+
* @variation 2
|
|
152898
|
+
*/
|
|
152899
|
+
|
|
150458
152900
|
return UserService;
|
|
150459
152901
|
})();
|
|
150460
152902
|
|