@sellout/models 0.0.423 → 0.0.425
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/graphql/queries/validateEmail.query.d.ts +2 -0
- package/.dist/graphql/queries/validateEmail.query.js +13 -0
- package/.dist/graphql/queries/validateEmail.query.js.map +1 -0
- package/.dist/sellout-proto.js +589 -0
- package/package.json +3 -3
- package/src/graphql/queries/validateEmail.query.ts +12 -0
- package/src/proto/order.proto +1 -0
- package/src/proto/user.proto +14 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const client_1 = require("@apollo/client");
|
|
4
|
+
const query = (0, client_1.gql) `
|
|
5
|
+
query validateEmail($email: String!) {
|
|
6
|
+
validateEmail(email: $email) {
|
|
7
|
+
valid
|
|
8
|
+
error
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
exports.default = query;
|
|
13
|
+
//# sourceMappingURL=validateEmail.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateEmail.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/validateEmail.query.ts"],"names":[],"mappings":";;AAAA,2CAAqC;AAErC,MAAM,KAAK,GAAG,IAAA,YAAG,EAAA;;;;;;;CAOhB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
package/.dist/sellout-proto.js
CHANGED
|
@@ -25290,6 +25290,7 @@ $root.RefundOrderRequest = (function() {
|
|
|
25290
25290
|
* @property {boolean|null} [processingFee] RefundOrderRequest processingFee
|
|
25291
25291
|
* @property {string|null} [eventType] RefundOrderRequest eventType
|
|
25292
25292
|
* @property {boolean|null} [promoterFee] RefundOrderRequest promoterFee
|
|
25293
|
+
* @property {boolean|null} [skipHivePush] RefundOrderRequest skipHivePush
|
|
25293
25294
|
*/
|
|
25294
25295
|
|
|
25295
25296
|
/**
|
|
@@ -25397,6 +25398,14 @@ $root.RefundOrderRequest = (function() {
|
|
|
25397
25398
|
*/
|
|
25398
25399
|
RefundOrderRequest.prototype.promoterFee = false;
|
|
25399
25400
|
|
|
25401
|
+
/**
|
|
25402
|
+
* RefundOrderRequest skipHivePush.
|
|
25403
|
+
* @member {boolean} skipHivePush
|
|
25404
|
+
* @memberof RefundOrderRequest
|
|
25405
|
+
* @instance
|
|
25406
|
+
*/
|
|
25407
|
+
RefundOrderRequest.prototype.skipHivePush = false;
|
|
25408
|
+
|
|
25400
25409
|
/**
|
|
25401
25410
|
* Creates a new RefundOrderRequest instance using the specified properties.
|
|
25402
25411
|
* @function create
|
|
@@ -25445,6 +25454,8 @@ $root.RefundOrderRequest = (function() {
|
|
|
25445
25454
|
writer.uint32(/* id 9, wireType 2 =*/74).string(message.eventType);
|
|
25446
25455
|
if (message.promoterFee != null && Object.hasOwnProperty.call(message, "promoterFee"))
|
|
25447
25456
|
writer.uint32(/* id 10, wireType 0 =*/80).bool(message.promoterFee);
|
|
25457
|
+
if (message.skipHivePush != null && Object.hasOwnProperty.call(message, "skipHivePush"))
|
|
25458
|
+
writer.uint32(/* id 11, wireType 0 =*/88).bool(message.skipHivePush);
|
|
25448
25459
|
return writer;
|
|
25449
25460
|
};
|
|
25450
25461
|
|
|
@@ -25516,6 +25527,9 @@ $root.RefundOrderRequest = (function() {
|
|
|
25516
25527
|
case 10:
|
|
25517
25528
|
message.promoterFee = reader.bool();
|
|
25518
25529
|
break;
|
|
25530
|
+
case 11:
|
|
25531
|
+
message.skipHivePush = reader.bool();
|
|
25532
|
+
break;
|
|
25519
25533
|
default:
|
|
25520
25534
|
reader.skipType(tag & 7);
|
|
25521
25535
|
break;
|
|
@@ -25592,6 +25606,9 @@ $root.RefundOrderRequest = (function() {
|
|
|
25592
25606
|
if (message.promoterFee != null && message.hasOwnProperty("promoterFee"))
|
|
25593
25607
|
if (typeof message.promoterFee !== "boolean")
|
|
25594
25608
|
return "promoterFee: boolean expected";
|
|
25609
|
+
if (message.skipHivePush != null && message.hasOwnProperty("skipHivePush"))
|
|
25610
|
+
if (typeof message.skipHivePush !== "boolean")
|
|
25611
|
+
return "skipHivePush: boolean expected";
|
|
25595
25612
|
return null;
|
|
25596
25613
|
};
|
|
25597
25614
|
|
|
@@ -25639,6 +25656,8 @@ $root.RefundOrderRequest = (function() {
|
|
|
25639
25656
|
message.eventType = String(object.eventType);
|
|
25640
25657
|
if (object.promoterFee != null)
|
|
25641
25658
|
message.promoterFee = Boolean(object.promoterFee);
|
|
25659
|
+
if (object.skipHivePush != null)
|
|
25660
|
+
message.skipHivePush = Boolean(object.skipHivePush);
|
|
25642
25661
|
return message;
|
|
25643
25662
|
};
|
|
25644
25663
|
|
|
@@ -25669,6 +25688,7 @@ $root.RefundOrderRequest = (function() {
|
|
|
25669
25688
|
object.processingFee = false;
|
|
25670
25689
|
object.eventType = "";
|
|
25671
25690
|
object.promoterFee = false;
|
|
25691
|
+
object.skipHivePush = false;
|
|
25672
25692
|
}
|
|
25673
25693
|
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
25674
25694
|
object.spanContext = message.spanContext;
|
|
@@ -25698,6 +25718,8 @@ $root.RefundOrderRequest = (function() {
|
|
|
25698
25718
|
object.eventType = message.eventType;
|
|
25699
25719
|
if (message.promoterFee != null && message.hasOwnProperty("promoterFee"))
|
|
25700
25720
|
object.promoterFee = message.promoterFee;
|
|
25721
|
+
if (message.skipHivePush != null && message.hasOwnProperty("skipHivePush"))
|
|
25722
|
+
object.skipHivePush = message.skipHivePush;
|
|
25701
25723
|
return object;
|
|
25702
25724
|
};
|
|
25703
25725
|
|
|
@@ -74166,6 +74188,540 @@ $root.GetUserBySecondaryEmailResponse = (function() {
|
|
|
74166
74188
|
return GetUserBySecondaryEmailResponse;
|
|
74167
74189
|
})();
|
|
74168
74190
|
|
|
74191
|
+
$root.ValidateEmailRequest = (function() {
|
|
74192
|
+
|
|
74193
|
+
/**
|
|
74194
|
+
* Properties of a ValidateEmailRequest.
|
|
74195
|
+
* @exports IValidateEmailRequest
|
|
74196
|
+
* @interface IValidateEmailRequest
|
|
74197
|
+
* @property {string|null} [spanContext] ValidateEmailRequest spanContext
|
|
74198
|
+
* @property {string|null} [email] ValidateEmailRequest email
|
|
74199
|
+
*/
|
|
74200
|
+
|
|
74201
|
+
/**
|
|
74202
|
+
* Constructs a new ValidateEmailRequest.
|
|
74203
|
+
* @exports ValidateEmailRequest
|
|
74204
|
+
* @classdesc Represents a ValidateEmailRequest.
|
|
74205
|
+
* @implements IValidateEmailRequest
|
|
74206
|
+
* @constructor
|
|
74207
|
+
* @param {IValidateEmailRequest=} [properties] Properties to set
|
|
74208
|
+
*/
|
|
74209
|
+
function ValidateEmailRequest(properties) {
|
|
74210
|
+
if (properties)
|
|
74211
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
74212
|
+
if (properties[keys[i]] != null)
|
|
74213
|
+
this[keys[i]] = properties[keys[i]];
|
|
74214
|
+
}
|
|
74215
|
+
|
|
74216
|
+
/**
|
|
74217
|
+
* ValidateEmailRequest spanContext.
|
|
74218
|
+
* @member {string} spanContext
|
|
74219
|
+
* @memberof ValidateEmailRequest
|
|
74220
|
+
* @instance
|
|
74221
|
+
*/
|
|
74222
|
+
ValidateEmailRequest.prototype.spanContext = "";
|
|
74223
|
+
|
|
74224
|
+
/**
|
|
74225
|
+
* ValidateEmailRequest email.
|
|
74226
|
+
* @member {string} email
|
|
74227
|
+
* @memberof ValidateEmailRequest
|
|
74228
|
+
* @instance
|
|
74229
|
+
*/
|
|
74230
|
+
ValidateEmailRequest.prototype.email = "";
|
|
74231
|
+
|
|
74232
|
+
/**
|
|
74233
|
+
* Creates a new ValidateEmailRequest instance using the specified properties.
|
|
74234
|
+
* @function create
|
|
74235
|
+
* @memberof ValidateEmailRequest
|
|
74236
|
+
* @static
|
|
74237
|
+
* @param {IValidateEmailRequest=} [properties] Properties to set
|
|
74238
|
+
* @returns {ValidateEmailRequest} ValidateEmailRequest instance
|
|
74239
|
+
*/
|
|
74240
|
+
ValidateEmailRequest.create = function create(properties) {
|
|
74241
|
+
return new ValidateEmailRequest(properties);
|
|
74242
|
+
};
|
|
74243
|
+
|
|
74244
|
+
/**
|
|
74245
|
+
* Encodes the specified ValidateEmailRequest message. Does not implicitly {@link ValidateEmailRequest.verify|verify} messages.
|
|
74246
|
+
* @function encode
|
|
74247
|
+
* @memberof ValidateEmailRequest
|
|
74248
|
+
* @static
|
|
74249
|
+
* @param {IValidateEmailRequest} message ValidateEmailRequest message or plain object to encode
|
|
74250
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
74251
|
+
* @returns {$protobuf.Writer} Writer
|
|
74252
|
+
*/
|
|
74253
|
+
ValidateEmailRequest.encode = function encode(message, writer) {
|
|
74254
|
+
if (!writer)
|
|
74255
|
+
writer = $Writer.create();
|
|
74256
|
+
if (message.spanContext != null && Object.hasOwnProperty.call(message, "spanContext"))
|
|
74257
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
|
|
74258
|
+
if (message.email != null && Object.hasOwnProperty.call(message, "email"))
|
|
74259
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
|
|
74260
|
+
return writer;
|
|
74261
|
+
};
|
|
74262
|
+
|
|
74263
|
+
/**
|
|
74264
|
+
* Encodes the specified ValidateEmailRequest message, length delimited. Does not implicitly {@link ValidateEmailRequest.verify|verify} messages.
|
|
74265
|
+
* @function encodeDelimited
|
|
74266
|
+
* @memberof ValidateEmailRequest
|
|
74267
|
+
* @static
|
|
74268
|
+
* @param {IValidateEmailRequest} message ValidateEmailRequest message or plain object to encode
|
|
74269
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
74270
|
+
* @returns {$protobuf.Writer} Writer
|
|
74271
|
+
*/
|
|
74272
|
+
ValidateEmailRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
74273
|
+
return this.encode(message, writer).ldelim();
|
|
74274
|
+
};
|
|
74275
|
+
|
|
74276
|
+
/**
|
|
74277
|
+
* Decodes a ValidateEmailRequest message from the specified reader or buffer.
|
|
74278
|
+
* @function decode
|
|
74279
|
+
* @memberof ValidateEmailRequest
|
|
74280
|
+
* @static
|
|
74281
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
74282
|
+
* @param {number} [length] Message length if known beforehand
|
|
74283
|
+
* @returns {ValidateEmailRequest} ValidateEmailRequest
|
|
74284
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
74285
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
74286
|
+
*/
|
|
74287
|
+
ValidateEmailRequest.decode = function decode(reader, length) {
|
|
74288
|
+
if (!(reader instanceof $Reader))
|
|
74289
|
+
reader = $Reader.create(reader);
|
|
74290
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ValidateEmailRequest();
|
|
74291
|
+
while (reader.pos < end) {
|
|
74292
|
+
var tag = reader.uint32();
|
|
74293
|
+
switch (tag >>> 3) {
|
|
74294
|
+
case 1:
|
|
74295
|
+
message.spanContext = reader.string();
|
|
74296
|
+
break;
|
|
74297
|
+
case 2:
|
|
74298
|
+
message.email = reader.string();
|
|
74299
|
+
break;
|
|
74300
|
+
default:
|
|
74301
|
+
reader.skipType(tag & 7);
|
|
74302
|
+
break;
|
|
74303
|
+
}
|
|
74304
|
+
}
|
|
74305
|
+
return message;
|
|
74306
|
+
};
|
|
74307
|
+
|
|
74308
|
+
/**
|
|
74309
|
+
* Decodes a ValidateEmailRequest message from the specified reader or buffer, length delimited.
|
|
74310
|
+
* @function decodeDelimited
|
|
74311
|
+
* @memberof ValidateEmailRequest
|
|
74312
|
+
* @static
|
|
74313
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
74314
|
+
* @returns {ValidateEmailRequest} ValidateEmailRequest
|
|
74315
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
74316
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
74317
|
+
*/
|
|
74318
|
+
ValidateEmailRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
74319
|
+
if (!(reader instanceof $Reader))
|
|
74320
|
+
reader = new $Reader(reader);
|
|
74321
|
+
return this.decode(reader, reader.uint32());
|
|
74322
|
+
};
|
|
74323
|
+
|
|
74324
|
+
/**
|
|
74325
|
+
* Verifies a ValidateEmailRequest message.
|
|
74326
|
+
* @function verify
|
|
74327
|
+
* @memberof ValidateEmailRequest
|
|
74328
|
+
* @static
|
|
74329
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
74330
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
74331
|
+
*/
|
|
74332
|
+
ValidateEmailRequest.verify = function verify(message) {
|
|
74333
|
+
if (typeof message !== "object" || message === null)
|
|
74334
|
+
return "object expected";
|
|
74335
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
74336
|
+
if (!$util.isString(message.spanContext))
|
|
74337
|
+
return "spanContext: string expected";
|
|
74338
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
74339
|
+
if (!$util.isString(message.email))
|
|
74340
|
+
return "email: string expected";
|
|
74341
|
+
return null;
|
|
74342
|
+
};
|
|
74343
|
+
|
|
74344
|
+
/**
|
|
74345
|
+
* Creates a ValidateEmailRequest message from a plain object. Also converts values to their respective internal types.
|
|
74346
|
+
* @function fromObject
|
|
74347
|
+
* @memberof ValidateEmailRequest
|
|
74348
|
+
* @static
|
|
74349
|
+
* @param {Object.<string,*>} object Plain object
|
|
74350
|
+
* @returns {ValidateEmailRequest} ValidateEmailRequest
|
|
74351
|
+
*/
|
|
74352
|
+
ValidateEmailRequest.fromObject = function fromObject(object) {
|
|
74353
|
+
if (object instanceof $root.ValidateEmailRequest)
|
|
74354
|
+
return object;
|
|
74355
|
+
var message = new $root.ValidateEmailRequest();
|
|
74356
|
+
if (object.spanContext != null)
|
|
74357
|
+
message.spanContext = String(object.spanContext);
|
|
74358
|
+
if (object.email != null)
|
|
74359
|
+
message.email = String(object.email);
|
|
74360
|
+
return message;
|
|
74361
|
+
};
|
|
74362
|
+
|
|
74363
|
+
/**
|
|
74364
|
+
* Creates a plain object from a ValidateEmailRequest message. Also converts values to other types if specified.
|
|
74365
|
+
* @function toObject
|
|
74366
|
+
* @memberof ValidateEmailRequest
|
|
74367
|
+
* @static
|
|
74368
|
+
* @param {ValidateEmailRequest} message ValidateEmailRequest
|
|
74369
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
74370
|
+
* @returns {Object.<string,*>} Plain object
|
|
74371
|
+
*/
|
|
74372
|
+
ValidateEmailRequest.toObject = function toObject(message, options) {
|
|
74373
|
+
if (!options)
|
|
74374
|
+
options = {};
|
|
74375
|
+
var object = {};
|
|
74376
|
+
if (options.defaults) {
|
|
74377
|
+
object.spanContext = "";
|
|
74378
|
+
object.email = "";
|
|
74379
|
+
}
|
|
74380
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
74381
|
+
object.spanContext = message.spanContext;
|
|
74382
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
74383
|
+
object.email = message.email;
|
|
74384
|
+
return object;
|
|
74385
|
+
};
|
|
74386
|
+
|
|
74387
|
+
/**
|
|
74388
|
+
* Converts this ValidateEmailRequest to JSON.
|
|
74389
|
+
* @function toJSON
|
|
74390
|
+
* @memberof ValidateEmailRequest
|
|
74391
|
+
* @instance
|
|
74392
|
+
* @returns {Object.<string,*>} JSON object
|
|
74393
|
+
*/
|
|
74394
|
+
ValidateEmailRequest.prototype.toJSON = function toJSON() {
|
|
74395
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
74396
|
+
};
|
|
74397
|
+
|
|
74398
|
+
return ValidateEmailRequest;
|
|
74399
|
+
})();
|
|
74400
|
+
|
|
74401
|
+
$root.ValidateEmailResponse = (function() {
|
|
74402
|
+
|
|
74403
|
+
/**
|
|
74404
|
+
* Properties of a ValidateEmailResponse.
|
|
74405
|
+
* @exports IValidateEmailResponse
|
|
74406
|
+
* @interface IValidateEmailResponse
|
|
74407
|
+
* @property {StatusCode|null} [status] ValidateEmailResponse status
|
|
74408
|
+
* @property {Array.<IError>|null} [errors] ValidateEmailResponse errors
|
|
74409
|
+
* @property {boolean|null} [valid] ValidateEmailResponse valid
|
|
74410
|
+
* @property {string|null} [error] ValidateEmailResponse error
|
|
74411
|
+
*/
|
|
74412
|
+
|
|
74413
|
+
/**
|
|
74414
|
+
* Constructs a new ValidateEmailResponse.
|
|
74415
|
+
* @exports ValidateEmailResponse
|
|
74416
|
+
* @classdesc Represents a ValidateEmailResponse.
|
|
74417
|
+
* @implements IValidateEmailResponse
|
|
74418
|
+
* @constructor
|
|
74419
|
+
* @param {IValidateEmailResponse=} [properties] Properties to set
|
|
74420
|
+
*/
|
|
74421
|
+
function ValidateEmailResponse(properties) {
|
|
74422
|
+
this.errors = [];
|
|
74423
|
+
if (properties)
|
|
74424
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
74425
|
+
if (properties[keys[i]] != null)
|
|
74426
|
+
this[keys[i]] = properties[keys[i]];
|
|
74427
|
+
}
|
|
74428
|
+
|
|
74429
|
+
/**
|
|
74430
|
+
* ValidateEmailResponse status.
|
|
74431
|
+
* @member {StatusCode} status
|
|
74432
|
+
* @memberof ValidateEmailResponse
|
|
74433
|
+
* @instance
|
|
74434
|
+
*/
|
|
74435
|
+
ValidateEmailResponse.prototype.status = 0;
|
|
74436
|
+
|
|
74437
|
+
/**
|
|
74438
|
+
* ValidateEmailResponse errors.
|
|
74439
|
+
* @member {Array.<IError>} errors
|
|
74440
|
+
* @memberof ValidateEmailResponse
|
|
74441
|
+
* @instance
|
|
74442
|
+
*/
|
|
74443
|
+
ValidateEmailResponse.prototype.errors = $util.emptyArray;
|
|
74444
|
+
|
|
74445
|
+
/**
|
|
74446
|
+
* ValidateEmailResponse valid.
|
|
74447
|
+
* @member {boolean} valid
|
|
74448
|
+
* @memberof ValidateEmailResponse
|
|
74449
|
+
* @instance
|
|
74450
|
+
*/
|
|
74451
|
+
ValidateEmailResponse.prototype.valid = false;
|
|
74452
|
+
|
|
74453
|
+
/**
|
|
74454
|
+
* ValidateEmailResponse error.
|
|
74455
|
+
* @member {string} error
|
|
74456
|
+
* @memberof ValidateEmailResponse
|
|
74457
|
+
* @instance
|
|
74458
|
+
*/
|
|
74459
|
+
ValidateEmailResponse.prototype.error = "";
|
|
74460
|
+
|
|
74461
|
+
/**
|
|
74462
|
+
* Creates a new ValidateEmailResponse instance using the specified properties.
|
|
74463
|
+
* @function create
|
|
74464
|
+
* @memberof ValidateEmailResponse
|
|
74465
|
+
* @static
|
|
74466
|
+
* @param {IValidateEmailResponse=} [properties] Properties to set
|
|
74467
|
+
* @returns {ValidateEmailResponse} ValidateEmailResponse instance
|
|
74468
|
+
*/
|
|
74469
|
+
ValidateEmailResponse.create = function create(properties) {
|
|
74470
|
+
return new ValidateEmailResponse(properties);
|
|
74471
|
+
};
|
|
74472
|
+
|
|
74473
|
+
/**
|
|
74474
|
+
* Encodes the specified ValidateEmailResponse message. Does not implicitly {@link ValidateEmailResponse.verify|verify} messages.
|
|
74475
|
+
* @function encode
|
|
74476
|
+
* @memberof ValidateEmailResponse
|
|
74477
|
+
* @static
|
|
74478
|
+
* @param {IValidateEmailResponse} message ValidateEmailResponse message or plain object to encode
|
|
74479
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
74480
|
+
* @returns {$protobuf.Writer} Writer
|
|
74481
|
+
*/
|
|
74482
|
+
ValidateEmailResponse.encode = function encode(message, writer) {
|
|
74483
|
+
if (!writer)
|
|
74484
|
+
writer = $Writer.create();
|
|
74485
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
74486
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
74487
|
+
if (message.errors != null && message.errors.length)
|
|
74488
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
74489
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
74490
|
+
if (message.valid != null && Object.hasOwnProperty.call(message, "valid"))
|
|
74491
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.valid);
|
|
74492
|
+
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
|
74493
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.error);
|
|
74494
|
+
return writer;
|
|
74495
|
+
};
|
|
74496
|
+
|
|
74497
|
+
/**
|
|
74498
|
+
* Encodes the specified ValidateEmailResponse message, length delimited. Does not implicitly {@link ValidateEmailResponse.verify|verify} messages.
|
|
74499
|
+
* @function encodeDelimited
|
|
74500
|
+
* @memberof ValidateEmailResponse
|
|
74501
|
+
* @static
|
|
74502
|
+
* @param {IValidateEmailResponse} message ValidateEmailResponse message or plain object to encode
|
|
74503
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
74504
|
+
* @returns {$protobuf.Writer} Writer
|
|
74505
|
+
*/
|
|
74506
|
+
ValidateEmailResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
74507
|
+
return this.encode(message, writer).ldelim();
|
|
74508
|
+
};
|
|
74509
|
+
|
|
74510
|
+
/**
|
|
74511
|
+
* Decodes a ValidateEmailResponse message from the specified reader or buffer.
|
|
74512
|
+
* @function decode
|
|
74513
|
+
* @memberof ValidateEmailResponse
|
|
74514
|
+
* @static
|
|
74515
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
74516
|
+
* @param {number} [length] Message length if known beforehand
|
|
74517
|
+
* @returns {ValidateEmailResponse} ValidateEmailResponse
|
|
74518
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
74519
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
74520
|
+
*/
|
|
74521
|
+
ValidateEmailResponse.decode = function decode(reader, length) {
|
|
74522
|
+
if (!(reader instanceof $Reader))
|
|
74523
|
+
reader = $Reader.create(reader);
|
|
74524
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ValidateEmailResponse();
|
|
74525
|
+
while (reader.pos < end) {
|
|
74526
|
+
var tag = reader.uint32();
|
|
74527
|
+
switch (tag >>> 3) {
|
|
74528
|
+
case 1:
|
|
74529
|
+
message.status = reader.int32();
|
|
74530
|
+
break;
|
|
74531
|
+
case 2:
|
|
74532
|
+
if (!(message.errors && message.errors.length))
|
|
74533
|
+
message.errors = [];
|
|
74534
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
74535
|
+
break;
|
|
74536
|
+
case 3:
|
|
74537
|
+
message.valid = reader.bool();
|
|
74538
|
+
break;
|
|
74539
|
+
case 4:
|
|
74540
|
+
message.error = reader.string();
|
|
74541
|
+
break;
|
|
74542
|
+
default:
|
|
74543
|
+
reader.skipType(tag & 7);
|
|
74544
|
+
break;
|
|
74545
|
+
}
|
|
74546
|
+
}
|
|
74547
|
+
return message;
|
|
74548
|
+
};
|
|
74549
|
+
|
|
74550
|
+
/**
|
|
74551
|
+
* Decodes a ValidateEmailResponse message from the specified reader or buffer, length delimited.
|
|
74552
|
+
* @function decodeDelimited
|
|
74553
|
+
* @memberof ValidateEmailResponse
|
|
74554
|
+
* @static
|
|
74555
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
74556
|
+
* @returns {ValidateEmailResponse} ValidateEmailResponse
|
|
74557
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
74558
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
74559
|
+
*/
|
|
74560
|
+
ValidateEmailResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
74561
|
+
if (!(reader instanceof $Reader))
|
|
74562
|
+
reader = new $Reader(reader);
|
|
74563
|
+
return this.decode(reader, reader.uint32());
|
|
74564
|
+
};
|
|
74565
|
+
|
|
74566
|
+
/**
|
|
74567
|
+
* Verifies a ValidateEmailResponse message.
|
|
74568
|
+
* @function verify
|
|
74569
|
+
* @memberof ValidateEmailResponse
|
|
74570
|
+
* @static
|
|
74571
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
74572
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
74573
|
+
*/
|
|
74574
|
+
ValidateEmailResponse.verify = function verify(message) {
|
|
74575
|
+
if (typeof message !== "object" || message === null)
|
|
74576
|
+
return "object expected";
|
|
74577
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
74578
|
+
switch (message.status) {
|
|
74579
|
+
default:
|
|
74580
|
+
return "status: enum value expected";
|
|
74581
|
+
case 0:
|
|
74582
|
+
case 200:
|
|
74583
|
+
case 400:
|
|
74584
|
+
case 401:
|
|
74585
|
+
case 403:
|
|
74586
|
+
case 422:
|
|
74587
|
+
case 404:
|
|
74588
|
+
case 500:
|
|
74589
|
+
case 504:
|
|
74590
|
+
break;
|
|
74591
|
+
}
|
|
74592
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
74593
|
+
if (!Array.isArray(message.errors))
|
|
74594
|
+
return "errors: array expected";
|
|
74595
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
74596
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
74597
|
+
if (error)
|
|
74598
|
+
return "errors." + error;
|
|
74599
|
+
}
|
|
74600
|
+
}
|
|
74601
|
+
if (message.valid != null && message.hasOwnProperty("valid"))
|
|
74602
|
+
if (typeof message.valid !== "boolean")
|
|
74603
|
+
return "valid: boolean expected";
|
|
74604
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
|
74605
|
+
if (!$util.isString(message.error))
|
|
74606
|
+
return "error: string expected";
|
|
74607
|
+
return null;
|
|
74608
|
+
};
|
|
74609
|
+
|
|
74610
|
+
/**
|
|
74611
|
+
* Creates a ValidateEmailResponse message from a plain object. Also converts values to their respective internal types.
|
|
74612
|
+
* @function fromObject
|
|
74613
|
+
* @memberof ValidateEmailResponse
|
|
74614
|
+
* @static
|
|
74615
|
+
* @param {Object.<string,*>} object Plain object
|
|
74616
|
+
* @returns {ValidateEmailResponse} ValidateEmailResponse
|
|
74617
|
+
*/
|
|
74618
|
+
ValidateEmailResponse.fromObject = function fromObject(object) {
|
|
74619
|
+
if (object instanceof $root.ValidateEmailResponse)
|
|
74620
|
+
return object;
|
|
74621
|
+
var message = new $root.ValidateEmailResponse();
|
|
74622
|
+
switch (object.status) {
|
|
74623
|
+
case "UNKNOWN_CODE":
|
|
74624
|
+
case 0:
|
|
74625
|
+
message.status = 0;
|
|
74626
|
+
break;
|
|
74627
|
+
case "OK":
|
|
74628
|
+
case 200:
|
|
74629
|
+
message.status = 200;
|
|
74630
|
+
break;
|
|
74631
|
+
case "BAD_REQUEST":
|
|
74632
|
+
case 400:
|
|
74633
|
+
message.status = 400;
|
|
74634
|
+
break;
|
|
74635
|
+
case "UNAUTHORIZED":
|
|
74636
|
+
case 401:
|
|
74637
|
+
message.status = 401;
|
|
74638
|
+
break;
|
|
74639
|
+
case "FORBIDDEN":
|
|
74640
|
+
case 403:
|
|
74641
|
+
message.status = 403;
|
|
74642
|
+
break;
|
|
74643
|
+
case "UNPROCESSABLE_ENTITY":
|
|
74644
|
+
case 422:
|
|
74645
|
+
message.status = 422;
|
|
74646
|
+
break;
|
|
74647
|
+
case "NOT_FOUND":
|
|
74648
|
+
case 404:
|
|
74649
|
+
message.status = 404;
|
|
74650
|
+
break;
|
|
74651
|
+
case "INTERNAL_SERVER_ERROR":
|
|
74652
|
+
case 500:
|
|
74653
|
+
message.status = 500;
|
|
74654
|
+
break;
|
|
74655
|
+
case "GATEWAY_TIMEOUT":
|
|
74656
|
+
case 504:
|
|
74657
|
+
message.status = 504;
|
|
74658
|
+
break;
|
|
74659
|
+
}
|
|
74660
|
+
if (object.errors) {
|
|
74661
|
+
if (!Array.isArray(object.errors))
|
|
74662
|
+
throw TypeError(".ValidateEmailResponse.errors: array expected");
|
|
74663
|
+
message.errors = [];
|
|
74664
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
74665
|
+
if (typeof object.errors[i] !== "object")
|
|
74666
|
+
throw TypeError(".ValidateEmailResponse.errors: object expected");
|
|
74667
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
74668
|
+
}
|
|
74669
|
+
}
|
|
74670
|
+
if (object.valid != null)
|
|
74671
|
+
message.valid = Boolean(object.valid);
|
|
74672
|
+
if (object.error != null)
|
|
74673
|
+
message.error = String(object.error);
|
|
74674
|
+
return message;
|
|
74675
|
+
};
|
|
74676
|
+
|
|
74677
|
+
/**
|
|
74678
|
+
* Creates a plain object from a ValidateEmailResponse message. Also converts values to other types if specified.
|
|
74679
|
+
* @function toObject
|
|
74680
|
+
* @memberof ValidateEmailResponse
|
|
74681
|
+
* @static
|
|
74682
|
+
* @param {ValidateEmailResponse} message ValidateEmailResponse
|
|
74683
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
74684
|
+
* @returns {Object.<string,*>} Plain object
|
|
74685
|
+
*/
|
|
74686
|
+
ValidateEmailResponse.toObject = function toObject(message, options) {
|
|
74687
|
+
if (!options)
|
|
74688
|
+
options = {};
|
|
74689
|
+
var object = {};
|
|
74690
|
+
if (options.arrays || options.defaults)
|
|
74691
|
+
object.errors = [];
|
|
74692
|
+
if (options.defaults) {
|
|
74693
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
74694
|
+
object.valid = false;
|
|
74695
|
+
object.error = "";
|
|
74696
|
+
}
|
|
74697
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
74698
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
74699
|
+
if (message.errors && message.errors.length) {
|
|
74700
|
+
object.errors = [];
|
|
74701
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
74702
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
74703
|
+
}
|
|
74704
|
+
if (message.valid != null && message.hasOwnProperty("valid"))
|
|
74705
|
+
object.valid = message.valid;
|
|
74706
|
+
if (message.error != null && message.hasOwnProperty("error"))
|
|
74707
|
+
object.error = message.error;
|
|
74708
|
+
return object;
|
|
74709
|
+
};
|
|
74710
|
+
|
|
74711
|
+
/**
|
|
74712
|
+
* Converts this ValidateEmailResponse to JSON.
|
|
74713
|
+
* @function toJSON
|
|
74714
|
+
* @memberof ValidateEmailResponse
|
|
74715
|
+
* @instance
|
|
74716
|
+
* @returns {Object.<string,*>} JSON object
|
|
74717
|
+
*/
|
|
74718
|
+
ValidateEmailResponse.prototype.toJSON = function toJSON() {
|
|
74719
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
74720
|
+
};
|
|
74721
|
+
|
|
74722
|
+
return ValidateEmailResponse;
|
|
74723
|
+
})();
|
|
74724
|
+
|
|
74169
74725
|
$root.UserService = (function() {
|
|
74170
74726
|
|
|
74171
74727
|
/**
|
|
@@ -75254,6 +75810,39 @@ $root.UserService = (function() {
|
|
|
75254
75810
|
* @variation 2
|
|
75255
75811
|
*/
|
|
75256
75812
|
|
|
75813
|
+
/**
|
|
75814
|
+
* Callback as used by {@link UserService#validateEmail}.
|
|
75815
|
+
* @memberof UserService
|
|
75816
|
+
* @typedef validateEmailCallback
|
|
75817
|
+
* @type {function}
|
|
75818
|
+
* @param {Error|null} error Error, if any
|
|
75819
|
+
* @param {ValidateEmailResponse} [response] ValidateEmailResponse
|
|
75820
|
+
*/
|
|
75821
|
+
|
|
75822
|
+
/**
|
|
75823
|
+
* Calls validateEmail.
|
|
75824
|
+
* @function validateEmail
|
|
75825
|
+
* @memberof UserService
|
|
75826
|
+
* @instance
|
|
75827
|
+
* @param {IValidateEmailRequest} request ValidateEmailRequest message or plain object
|
|
75828
|
+
* @param {UserService.validateEmailCallback} callback Node-style callback called with the error, if any, and ValidateEmailResponse
|
|
75829
|
+
* @returns {undefined}
|
|
75830
|
+
* @variation 1
|
|
75831
|
+
*/
|
|
75832
|
+
Object.defineProperty(UserService.prototype.validateEmail = function validateEmail(request, callback) {
|
|
75833
|
+
return this.rpcCall(validateEmail, $root.ValidateEmailRequest, $root.ValidateEmailResponse, request, callback);
|
|
75834
|
+
}, "name", { value: "validateEmail" });
|
|
75835
|
+
|
|
75836
|
+
/**
|
|
75837
|
+
* Calls validateEmail.
|
|
75838
|
+
* @function validateEmail
|
|
75839
|
+
* @memberof UserService
|
|
75840
|
+
* @instance
|
|
75841
|
+
* @param {IValidateEmailRequest} request ValidateEmailRequest message or plain object
|
|
75842
|
+
* @returns {Promise<ValidateEmailResponse>} Promise
|
|
75843
|
+
* @variation 2
|
|
75844
|
+
*/
|
|
75845
|
+
|
|
75257
75846
|
return UserService;
|
|
75258
75847
|
})();
|
|
75259
75848
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.425",
|
|
4
4
|
"description": "Sellout.io models",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@apollo/client": "^3.9.6",
|
|
20
20
|
"@hapi/joi": "^17.1.1",
|
|
21
|
-
"@sellout/utils": "^0.0.
|
|
21
|
+
"@sellout/utils": "^0.0.425",
|
|
22
22
|
"@types/hapi__joi": "^16.0.1",
|
|
23
23
|
"@types/shortid": "^0.0.29",
|
|
24
24
|
"@types/zen-observable": "^0.8.7",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"protobufjs": "^6.11.2",
|
|
34
34
|
"typescript": "^4.9.5"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "42573e2766382927f5448da974d8f5a167bba9fb"
|
|
37
37
|
}
|
package/src/proto/order.proto
CHANGED
package/src/proto/user.proto
CHANGED
|
@@ -442,6 +442,18 @@ message GetUserBySecondaryEmailResponse {
|
|
|
442
442
|
repeated string email = 2;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
message ValidateEmailRequest {
|
|
446
|
+
string spanContext = 1;
|
|
447
|
+
string email = 2;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
message ValidateEmailResponse {
|
|
451
|
+
StatusCode status = 1;
|
|
452
|
+
repeated Error errors = 2;
|
|
453
|
+
bool valid = 3;
|
|
454
|
+
string error = 4;
|
|
455
|
+
}
|
|
456
|
+
|
|
445
457
|
service UserService {
|
|
446
458
|
// Create
|
|
447
459
|
rpc createUser(CreateUserRequest) returns (CreateUserResponse) {}
|
|
@@ -484,4 +496,6 @@ service UserService {
|
|
|
484
496
|
rpc updateContact(UpdateContactRequest) returns (UpdateContactResponse) {}
|
|
485
497
|
rpc superAdminDeleteUser(SuperAdminDeleteUserRequest) returns (SuperAdminDeleteUserResponse) {}
|
|
486
498
|
rpc queryContactAndUsers(QueryUserProfilesRequest) returns (QueryUserProfilesResponse) {}
|
|
499
|
+
// Email Validation
|
|
500
|
+
rpc validateEmail(ValidateEmailRequest) returns (ValidateEmailResponse) {}
|
|
487
501
|
}
|