@sellout/models 0.0.208 → 0.0.210
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/mutations/updateUserInfo.mutation.d.ts +2 -0
- package/.dist/graphql/mutations/updateUserInfo.mutation.js +17 -0
- package/.dist/graphql/mutations/updateUserInfo.mutation.js.map +1 -0
- package/.dist/graphql/queries/organizations.query.js +5 -2
- package/.dist/graphql/queries/organizations.query.js.map +1 -1
- package/.dist/interfaces/IPagination.d.ts +2 -1
- package/.dist/interfaces/IPagination.js +1 -0
- package/.dist/interfaces/IPagination.js.map +1 -1
- package/.dist/sellout-proto.js +594 -0
- package/package.json +3 -3
- package/src/graphql/mutations/updateUserInfo.mutation.ts +13 -0
- package/src/graphql/queries/organizations.query.ts +6 -3
- package/src/interfaces/IPagination.ts +1 -0
- package/src/proto/user.proto +18 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
|
+
const mutation = (0, graphql_tag_1.default) `
|
|
8
|
+
mutation updateUserInfo($_id: String, $email: String, $phoneNumber: String) {
|
|
9
|
+
updateUserInfo(_id: $_id, email: $email, phoneNumber: $phoneNumber) {
|
|
10
|
+
_id
|
|
11
|
+
email
|
|
12
|
+
phoneNumber
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
exports.default = mutation;
|
|
17
|
+
//# sourceMappingURL=updateUserInfo.mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateUserInfo.mutation.js","sourceRoot":"","sources":["../../../src/graphql/mutations/updateUserInfo.mutation.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQnB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -5,8 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
7
7
|
const query = (0, graphql_tag_1.default) `
|
|
8
|
-
query organizations
|
|
9
|
-
|
|
8
|
+
query organizations(
|
|
9
|
+
$query: OrganizationQueryInput
|
|
10
|
+
$pagination: PaginationInput
|
|
11
|
+
) {
|
|
12
|
+
organizations(query: $query, pagination: $pagination) {
|
|
10
13
|
_id
|
|
11
14
|
orgName
|
|
12
15
|
orgUrls
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/organizations.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA
|
|
1
|
+
{"version":3,"file":"organizations.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/organizations.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
|
|
@@ -12,6 +12,7 @@ export declare enum PaginationTypes {
|
|
|
12
12
|
PlateformSettings = "PlateformSettings",
|
|
13
13
|
OrganizationSettings = "OrganizationSettings",
|
|
14
14
|
EventSettings = "EventSettings",
|
|
15
|
-
Customers = "Customers"
|
|
15
|
+
Customers = "Customers",
|
|
16
|
+
Organizations = "Organizations"
|
|
16
17
|
}
|
|
17
18
|
export declare type PaginationMap = Map<PaginationTypes, IPagination>;
|
|
@@ -13,5 +13,6 @@ var PaginationTypes;
|
|
|
13
13
|
PaginationTypes["OrganizationSettings"] = "OrganizationSettings";
|
|
14
14
|
PaginationTypes["EventSettings"] = "EventSettings";
|
|
15
15
|
PaginationTypes["Customers"] = "Customers";
|
|
16
|
+
PaginationTypes["Organizations"] = "Organizations";
|
|
16
17
|
})(PaginationTypes = exports.PaginationTypes || (exports.PaginationTypes = {}));
|
|
17
18
|
//# sourceMappingURL=IPagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPagination.js","sourceRoot":"","sources":["../../src/interfaces/IPagination.ts"],"names":[],"mappings":";;;AAKA,IAAY,
|
|
1
|
+
{"version":3,"file":"IPagination.js","sourceRoot":"","sources":["../../src/interfaces/IPagination.ts"],"names":[],"mappings":";;;AAKA,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,0DAAuC,CAAA;IACvC,gEAA6C,CAAA;IAC7C,kDAA+B,CAAA;IAC/B,0CAAuB,CAAA;IACvB,kDAA+B,CAAA;AACjC,CAAC,EAZW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAY1B"}
|
package/.dist/sellout-proto.js
CHANGED
|
@@ -128694,6 +128694,567 @@ $root.UpdateBasicUserInfoResponse = (function() {
|
|
|
128694
128694
|
return UpdateBasicUserInfoResponse;
|
|
128695
128695
|
})();
|
|
128696
128696
|
|
|
128697
|
+
$root.UpdateUserInfoRequest = (function() {
|
|
128698
|
+
|
|
128699
|
+
/**
|
|
128700
|
+
* Properties of an UpdateUserInfoRequest.
|
|
128701
|
+
* @exports IUpdateUserInfoRequest
|
|
128702
|
+
* @interface IUpdateUserInfoRequest
|
|
128703
|
+
* @property {string|null} [spanContext] UpdateUserInfoRequest spanContext
|
|
128704
|
+
* @property {string|null} [_id] UpdateUserInfoRequest _id
|
|
128705
|
+
* @property {string|null} [email] UpdateUserInfoRequest email
|
|
128706
|
+
* @property {string|null} [phoneNumber] UpdateUserInfoRequest phoneNumber
|
|
128707
|
+
*/
|
|
128708
|
+
|
|
128709
|
+
/**
|
|
128710
|
+
* Constructs a new UpdateUserInfoRequest.
|
|
128711
|
+
* @exports UpdateUserInfoRequest
|
|
128712
|
+
* @classdesc Represents an UpdateUserInfoRequest.
|
|
128713
|
+
* @implements IUpdateUserInfoRequest
|
|
128714
|
+
* @constructor
|
|
128715
|
+
* @param {IUpdateUserInfoRequest=} [properties] Properties to set
|
|
128716
|
+
*/
|
|
128717
|
+
function UpdateUserInfoRequest(properties) {
|
|
128718
|
+
if (properties)
|
|
128719
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
128720
|
+
if (properties[keys[i]] != null)
|
|
128721
|
+
this[keys[i]] = properties[keys[i]];
|
|
128722
|
+
}
|
|
128723
|
+
|
|
128724
|
+
/**
|
|
128725
|
+
* UpdateUserInfoRequest spanContext.
|
|
128726
|
+
* @member {string} spanContext
|
|
128727
|
+
* @memberof UpdateUserInfoRequest
|
|
128728
|
+
* @instance
|
|
128729
|
+
*/
|
|
128730
|
+
UpdateUserInfoRequest.prototype.spanContext = "";
|
|
128731
|
+
|
|
128732
|
+
/**
|
|
128733
|
+
* UpdateUserInfoRequest _id.
|
|
128734
|
+
* @member {string} _id
|
|
128735
|
+
* @memberof UpdateUserInfoRequest
|
|
128736
|
+
* @instance
|
|
128737
|
+
*/
|
|
128738
|
+
UpdateUserInfoRequest.prototype._id = "";
|
|
128739
|
+
|
|
128740
|
+
/**
|
|
128741
|
+
* UpdateUserInfoRequest email.
|
|
128742
|
+
* @member {string} email
|
|
128743
|
+
* @memberof UpdateUserInfoRequest
|
|
128744
|
+
* @instance
|
|
128745
|
+
*/
|
|
128746
|
+
UpdateUserInfoRequest.prototype.email = "";
|
|
128747
|
+
|
|
128748
|
+
/**
|
|
128749
|
+
* UpdateUserInfoRequest phoneNumber.
|
|
128750
|
+
* @member {string} phoneNumber
|
|
128751
|
+
* @memberof UpdateUserInfoRequest
|
|
128752
|
+
* @instance
|
|
128753
|
+
*/
|
|
128754
|
+
UpdateUserInfoRequest.prototype.phoneNumber = "";
|
|
128755
|
+
|
|
128756
|
+
/**
|
|
128757
|
+
* Creates a new UpdateUserInfoRequest instance using the specified properties.
|
|
128758
|
+
* @function create
|
|
128759
|
+
* @memberof UpdateUserInfoRequest
|
|
128760
|
+
* @static
|
|
128761
|
+
* @param {IUpdateUserInfoRequest=} [properties] Properties to set
|
|
128762
|
+
* @returns {UpdateUserInfoRequest} UpdateUserInfoRequest instance
|
|
128763
|
+
*/
|
|
128764
|
+
UpdateUserInfoRequest.create = function create(properties) {
|
|
128765
|
+
return new UpdateUserInfoRequest(properties);
|
|
128766
|
+
};
|
|
128767
|
+
|
|
128768
|
+
/**
|
|
128769
|
+
* Encodes the specified UpdateUserInfoRequest message. Does not implicitly {@link UpdateUserInfoRequest.verify|verify} messages.
|
|
128770
|
+
* @function encode
|
|
128771
|
+
* @memberof UpdateUserInfoRequest
|
|
128772
|
+
* @static
|
|
128773
|
+
* @param {IUpdateUserInfoRequest} message UpdateUserInfoRequest message or plain object to encode
|
|
128774
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
128775
|
+
* @returns {$protobuf.Writer} Writer
|
|
128776
|
+
*/
|
|
128777
|
+
UpdateUserInfoRequest.encode = function encode(message, writer) {
|
|
128778
|
+
if (!writer)
|
|
128779
|
+
writer = $Writer.create();
|
|
128780
|
+
if (message.spanContext != null && Object.hasOwnProperty.call(message, "spanContext"))
|
|
128781
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.spanContext);
|
|
128782
|
+
if (message._id != null && Object.hasOwnProperty.call(message, "_id"))
|
|
128783
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message._id);
|
|
128784
|
+
if (message.email != null && Object.hasOwnProperty.call(message, "email"))
|
|
128785
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.email);
|
|
128786
|
+
if (message.phoneNumber != null && Object.hasOwnProperty.call(message, "phoneNumber"))
|
|
128787
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.phoneNumber);
|
|
128788
|
+
return writer;
|
|
128789
|
+
};
|
|
128790
|
+
|
|
128791
|
+
/**
|
|
128792
|
+
* Encodes the specified UpdateUserInfoRequest message, length delimited. Does not implicitly {@link UpdateUserInfoRequest.verify|verify} messages.
|
|
128793
|
+
* @function encodeDelimited
|
|
128794
|
+
* @memberof UpdateUserInfoRequest
|
|
128795
|
+
* @static
|
|
128796
|
+
* @param {IUpdateUserInfoRequest} message UpdateUserInfoRequest message or plain object to encode
|
|
128797
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
128798
|
+
* @returns {$protobuf.Writer} Writer
|
|
128799
|
+
*/
|
|
128800
|
+
UpdateUserInfoRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
128801
|
+
return this.encode(message, writer).ldelim();
|
|
128802
|
+
};
|
|
128803
|
+
|
|
128804
|
+
/**
|
|
128805
|
+
* Decodes an UpdateUserInfoRequest message from the specified reader or buffer.
|
|
128806
|
+
* @function decode
|
|
128807
|
+
* @memberof UpdateUserInfoRequest
|
|
128808
|
+
* @static
|
|
128809
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
128810
|
+
* @param {number} [length] Message length if known beforehand
|
|
128811
|
+
* @returns {UpdateUserInfoRequest} UpdateUserInfoRequest
|
|
128812
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
128813
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
128814
|
+
*/
|
|
128815
|
+
UpdateUserInfoRequest.decode = function decode(reader, length) {
|
|
128816
|
+
if (!(reader instanceof $Reader))
|
|
128817
|
+
reader = $Reader.create(reader);
|
|
128818
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpdateUserInfoRequest();
|
|
128819
|
+
while (reader.pos < end) {
|
|
128820
|
+
var tag = reader.uint32();
|
|
128821
|
+
switch (tag >>> 3) {
|
|
128822
|
+
case 1:
|
|
128823
|
+
message.spanContext = reader.string();
|
|
128824
|
+
break;
|
|
128825
|
+
case 2:
|
|
128826
|
+
message._id = reader.string();
|
|
128827
|
+
break;
|
|
128828
|
+
case 3:
|
|
128829
|
+
message.email = reader.string();
|
|
128830
|
+
break;
|
|
128831
|
+
case 4:
|
|
128832
|
+
message.phoneNumber = reader.string();
|
|
128833
|
+
break;
|
|
128834
|
+
default:
|
|
128835
|
+
reader.skipType(tag & 7);
|
|
128836
|
+
break;
|
|
128837
|
+
}
|
|
128838
|
+
}
|
|
128839
|
+
return message;
|
|
128840
|
+
};
|
|
128841
|
+
|
|
128842
|
+
/**
|
|
128843
|
+
* Decodes an UpdateUserInfoRequest message from the specified reader or buffer, length delimited.
|
|
128844
|
+
* @function decodeDelimited
|
|
128845
|
+
* @memberof UpdateUserInfoRequest
|
|
128846
|
+
* @static
|
|
128847
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
128848
|
+
* @returns {UpdateUserInfoRequest} UpdateUserInfoRequest
|
|
128849
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
128850
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
128851
|
+
*/
|
|
128852
|
+
UpdateUserInfoRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
128853
|
+
if (!(reader instanceof $Reader))
|
|
128854
|
+
reader = new $Reader(reader);
|
|
128855
|
+
return this.decode(reader, reader.uint32());
|
|
128856
|
+
};
|
|
128857
|
+
|
|
128858
|
+
/**
|
|
128859
|
+
* Verifies an UpdateUserInfoRequest message.
|
|
128860
|
+
* @function verify
|
|
128861
|
+
* @memberof UpdateUserInfoRequest
|
|
128862
|
+
* @static
|
|
128863
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
128864
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
128865
|
+
*/
|
|
128866
|
+
UpdateUserInfoRequest.verify = function verify(message) {
|
|
128867
|
+
if (typeof message !== "object" || message === null)
|
|
128868
|
+
return "object expected";
|
|
128869
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
128870
|
+
if (!$util.isString(message.spanContext))
|
|
128871
|
+
return "spanContext: string expected";
|
|
128872
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
128873
|
+
if (!$util.isString(message._id))
|
|
128874
|
+
return "_id: string expected";
|
|
128875
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
128876
|
+
if (!$util.isString(message.email))
|
|
128877
|
+
return "email: string expected";
|
|
128878
|
+
if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber"))
|
|
128879
|
+
if (!$util.isString(message.phoneNumber))
|
|
128880
|
+
return "phoneNumber: string expected";
|
|
128881
|
+
return null;
|
|
128882
|
+
};
|
|
128883
|
+
|
|
128884
|
+
/**
|
|
128885
|
+
* Creates an UpdateUserInfoRequest message from a plain object. Also converts values to their respective internal types.
|
|
128886
|
+
* @function fromObject
|
|
128887
|
+
* @memberof UpdateUserInfoRequest
|
|
128888
|
+
* @static
|
|
128889
|
+
* @param {Object.<string,*>} object Plain object
|
|
128890
|
+
* @returns {UpdateUserInfoRequest} UpdateUserInfoRequest
|
|
128891
|
+
*/
|
|
128892
|
+
UpdateUserInfoRequest.fromObject = function fromObject(object) {
|
|
128893
|
+
if (object instanceof $root.UpdateUserInfoRequest)
|
|
128894
|
+
return object;
|
|
128895
|
+
var message = new $root.UpdateUserInfoRequest();
|
|
128896
|
+
if (object.spanContext != null)
|
|
128897
|
+
message.spanContext = String(object.spanContext);
|
|
128898
|
+
if (object._id != null)
|
|
128899
|
+
message._id = String(object._id);
|
|
128900
|
+
if (object.email != null)
|
|
128901
|
+
message.email = String(object.email);
|
|
128902
|
+
if (object.phoneNumber != null)
|
|
128903
|
+
message.phoneNumber = String(object.phoneNumber);
|
|
128904
|
+
return message;
|
|
128905
|
+
};
|
|
128906
|
+
|
|
128907
|
+
/**
|
|
128908
|
+
* Creates a plain object from an UpdateUserInfoRequest message. Also converts values to other types if specified.
|
|
128909
|
+
* @function toObject
|
|
128910
|
+
* @memberof UpdateUserInfoRequest
|
|
128911
|
+
* @static
|
|
128912
|
+
* @param {UpdateUserInfoRequest} message UpdateUserInfoRequest
|
|
128913
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
128914
|
+
* @returns {Object.<string,*>} Plain object
|
|
128915
|
+
*/
|
|
128916
|
+
UpdateUserInfoRequest.toObject = function toObject(message, options) {
|
|
128917
|
+
if (!options)
|
|
128918
|
+
options = {};
|
|
128919
|
+
var object = {};
|
|
128920
|
+
if (options.defaults) {
|
|
128921
|
+
object.spanContext = "";
|
|
128922
|
+
object._id = "";
|
|
128923
|
+
object.email = "";
|
|
128924
|
+
object.phoneNumber = "";
|
|
128925
|
+
}
|
|
128926
|
+
if (message.spanContext != null && message.hasOwnProperty("spanContext"))
|
|
128927
|
+
object.spanContext = message.spanContext;
|
|
128928
|
+
if (message._id != null && message.hasOwnProperty("_id"))
|
|
128929
|
+
object._id = message._id;
|
|
128930
|
+
if (message.email != null && message.hasOwnProperty("email"))
|
|
128931
|
+
object.email = message.email;
|
|
128932
|
+
if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber"))
|
|
128933
|
+
object.phoneNumber = message.phoneNumber;
|
|
128934
|
+
return object;
|
|
128935
|
+
};
|
|
128936
|
+
|
|
128937
|
+
/**
|
|
128938
|
+
* Converts this UpdateUserInfoRequest to JSON.
|
|
128939
|
+
* @function toJSON
|
|
128940
|
+
* @memberof UpdateUserInfoRequest
|
|
128941
|
+
* @instance
|
|
128942
|
+
* @returns {Object.<string,*>} JSON object
|
|
128943
|
+
*/
|
|
128944
|
+
UpdateUserInfoRequest.prototype.toJSON = function toJSON() {
|
|
128945
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
128946
|
+
};
|
|
128947
|
+
|
|
128948
|
+
return UpdateUserInfoRequest;
|
|
128949
|
+
})();
|
|
128950
|
+
|
|
128951
|
+
$root.UpdateUserInfoResponse = (function() {
|
|
128952
|
+
|
|
128953
|
+
/**
|
|
128954
|
+
* Properties of an UpdateUserInfoResponse.
|
|
128955
|
+
* @exports IUpdateUserInfoResponse
|
|
128956
|
+
* @interface IUpdateUserInfoResponse
|
|
128957
|
+
* @property {StatusCode|null} [status] UpdateUserInfoResponse status
|
|
128958
|
+
* @property {Array.<IError>|null} [errors] UpdateUserInfoResponse errors
|
|
128959
|
+
* @property {IUser|null} [user] UpdateUserInfoResponse user
|
|
128960
|
+
*/
|
|
128961
|
+
|
|
128962
|
+
/**
|
|
128963
|
+
* Constructs a new UpdateUserInfoResponse.
|
|
128964
|
+
* @exports UpdateUserInfoResponse
|
|
128965
|
+
* @classdesc Represents an UpdateUserInfoResponse.
|
|
128966
|
+
* @implements IUpdateUserInfoResponse
|
|
128967
|
+
* @constructor
|
|
128968
|
+
* @param {IUpdateUserInfoResponse=} [properties] Properties to set
|
|
128969
|
+
*/
|
|
128970
|
+
function UpdateUserInfoResponse(properties) {
|
|
128971
|
+
this.errors = [];
|
|
128972
|
+
if (properties)
|
|
128973
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
128974
|
+
if (properties[keys[i]] != null)
|
|
128975
|
+
this[keys[i]] = properties[keys[i]];
|
|
128976
|
+
}
|
|
128977
|
+
|
|
128978
|
+
/**
|
|
128979
|
+
* UpdateUserInfoResponse status.
|
|
128980
|
+
* @member {StatusCode} status
|
|
128981
|
+
* @memberof UpdateUserInfoResponse
|
|
128982
|
+
* @instance
|
|
128983
|
+
*/
|
|
128984
|
+
UpdateUserInfoResponse.prototype.status = 0;
|
|
128985
|
+
|
|
128986
|
+
/**
|
|
128987
|
+
* UpdateUserInfoResponse errors.
|
|
128988
|
+
* @member {Array.<IError>} errors
|
|
128989
|
+
* @memberof UpdateUserInfoResponse
|
|
128990
|
+
* @instance
|
|
128991
|
+
*/
|
|
128992
|
+
UpdateUserInfoResponse.prototype.errors = $util.emptyArray;
|
|
128993
|
+
|
|
128994
|
+
/**
|
|
128995
|
+
* UpdateUserInfoResponse user.
|
|
128996
|
+
* @member {IUser|null|undefined} user
|
|
128997
|
+
* @memberof UpdateUserInfoResponse
|
|
128998
|
+
* @instance
|
|
128999
|
+
*/
|
|
129000
|
+
UpdateUserInfoResponse.prototype.user = null;
|
|
129001
|
+
|
|
129002
|
+
/**
|
|
129003
|
+
* Creates a new UpdateUserInfoResponse instance using the specified properties.
|
|
129004
|
+
* @function create
|
|
129005
|
+
* @memberof UpdateUserInfoResponse
|
|
129006
|
+
* @static
|
|
129007
|
+
* @param {IUpdateUserInfoResponse=} [properties] Properties to set
|
|
129008
|
+
* @returns {UpdateUserInfoResponse} UpdateUserInfoResponse instance
|
|
129009
|
+
*/
|
|
129010
|
+
UpdateUserInfoResponse.create = function create(properties) {
|
|
129011
|
+
return new UpdateUserInfoResponse(properties);
|
|
129012
|
+
};
|
|
129013
|
+
|
|
129014
|
+
/**
|
|
129015
|
+
* Encodes the specified UpdateUserInfoResponse message. Does not implicitly {@link UpdateUserInfoResponse.verify|verify} messages.
|
|
129016
|
+
* @function encode
|
|
129017
|
+
* @memberof UpdateUserInfoResponse
|
|
129018
|
+
* @static
|
|
129019
|
+
* @param {IUpdateUserInfoResponse} message UpdateUserInfoResponse message or plain object to encode
|
|
129020
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
129021
|
+
* @returns {$protobuf.Writer} Writer
|
|
129022
|
+
*/
|
|
129023
|
+
UpdateUserInfoResponse.encode = function encode(message, writer) {
|
|
129024
|
+
if (!writer)
|
|
129025
|
+
writer = $Writer.create();
|
|
129026
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
129027
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status);
|
|
129028
|
+
if (message.errors != null && message.errors.length)
|
|
129029
|
+
for (var i = 0; i < message.errors.length; ++i)
|
|
129030
|
+
$root.Error.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
129031
|
+
if (message.user != null && Object.hasOwnProperty.call(message, "user"))
|
|
129032
|
+
$root.User.encode(message.user, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
129033
|
+
return writer;
|
|
129034
|
+
};
|
|
129035
|
+
|
|
129036
|
+
/**
|
|
129037
|
+
* Encodes the specified UpdateUserInfoResponse message, length delimited. Does not implicitly {@link UpdateUserInfoResponse.verify|verify} messages.
|
|
129038
|
+
* @function encodeDelimited
|
|
129039
|
+
* @memberof UpdateUserInfoResponse
|
|
129040
|
+
* @static
|
|
129041
|
+
* @param {IUpdateUserInfoResponse} message UpdateUserInfoResponse message or plain object to encode
|
|
129042
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
129043
|
+
* @returns {$protobuf.Writer} Writer
|
|
129044
|
+
*/
|
|
129045
|
+
UpdateUserInfoResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
129046
|
+
return this.encode(message, writer).ldelim();
|
|
129047
|
+
};
|
|
129048
|
+
|
|
129049
|
+
/**
|
|
129050
|
+
* Decodes an UpdateUserInfoResponse message from the specified reader or buffer.
|
|
129051
|
+
* @function decode
|
|
129052
|
+
* @memberof UpdateUserInfoResponse
|
|
129053
|
+
* @static
|
|
129054
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
129055
|
+
* @param {number} [length] Message length if known beforehand
|
|
129056
|
+
* @returns {UpdateUserInfoResponse} UpdateUserInfoResponse
|
|
129057
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
129058
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
129059
|
+
*/
|
|
129060
|
+
UpdateUserInfoResponse.decode = function decode(reader, length) {
|
|
129061
|
+
if (!(reader instanceof $Reader))
|
|
129062
|
+
reader = $Reader.create(reader);
|
|
129063
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpdateUserInfoResponse();
|
|
129064
|
+
while (reader.pos < end) {
|
|
129065
|
+
var tag = reader.uint32();
|
|
129066
|
+
switch (tag >>> 3) {
|
|
129067
|
+
case 1:
|
|
129068
|
+
message.status = reader.int32();
|
|
129069
|
+
break;
|
|
129070
|
+
case 2:
|
|
129071
|
+
if (!(message.errors && message.errors.length))
|
|
129072
|
+
message.errors = [];
|
|
129073
|
+
message.errors.push($root.Error.decode(reader, reader.uint32()));
|
|
129074
|
+
break;
|
|
129075
|
+
case 3:
|
|
129076
|
+
message.user = $root.User.decode(reader, reader.uint32());
|
|
129077
|
+
break;
|
|
129078
|
+
default:
|
|
129079
|
+
reader.skipType(tag & 7);
|
|
129080
|
+
break;
|
|
129081
|
+
}
|
|
129082
|
+
}
|
|
129083
|
+
return message;
|
|
129084
|
+
};
|
|
129085
|
+
|
|
129086
|
+
/**
|
|
129087
|
+
* Decodes an UpdateUserInfoResponse message from the specified reader or buffer, length delimited.
|
|
129088
|
+
* @function decodeDelimited
|
|
129089
|
+
* @memberof UpdateUserInfoResponse
|
|
129090
|
+
* @static
|
|
129091
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
129092
|
+
* @returns {UpdateUserInfoResponse} UpdateUserInfoResponse
|
|
129093
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
129094
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
129095
|
+
*/
|
|
129096
|
+
UpdateUserInfoResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
129097
|
+
if (!(reader instanceof $Reader))
|
|
129098
|
+
reader = new $Reader(reader);
|
|
129099
|
+
return this.decode(reader, reader.uint32());
|
|
129100
|
+
};
|
|
129101
|
+
|
|
129102
|
+
/**
|
|
129103
|
+
* Verifies an UpdateUserInfoResponse message.
|
|
129104
|
+
* @function verify
|
|
129105
|
+
* @memberof UpdateUserInfoResponse
|
|
129106
|
+
* @static
|
|
129107
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
129108
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
129109
|
+
*/
|
|
129110
|
+
UpdateUserInfoResponse.verify = function verify(message) {
|
|
129111
|
+
if (typeof message !== "object" || message === null)
|
|
129112
|
+
return "object expected";
|
|
129113
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
129114
|
+
switch (message.status) {
|
|
129115
|
+
default:
|
|
129116
|
+
return "status: enum value expected";
|
|
129117
|
+
case 0:
|
|
129118
|
+
case 200:
|
|
129119
|
+
case 400:
|
|
129120
|
+
case 401:
|
|
129121
|
+
case 403:
|
|
129122
|
+
case 422:
|
|
129123
|
+
case 404:
|
|
129124
|
+
case 500:
|
|
129125
|
+
case 504:
|
|
129126
|
+
break;
|
|
129127
|
+
}
|
|
129128
|
+
if (message.errors != null && message.hasOwnProperty("errors")) {
|
|
129129
|
+
if (!Array.isArray(message.errors))
|
|
129130
|
+
return "errors: array expected";
|
|
129131
|
+
for (var i = 0; i < message.errors.length; ++i) {
|
|
129132
|
+
var error = $root.Error.verify(message.errors[i]);
|
|
129133
|
+
if (error)
|
|
129134
|
+
return "errors." + error;
|
|
129135
|
+
}
|
|
129136
|
+
}
|
|
129137
|
+
if (message.user != null && message.hasOwnProperty("user")) {
|
|
129138
|
+
var error = $root.User.verify(message.user);
|
|
129139
|
+
if (error)
|
|
129140
|
+
return "user." + error;
|
|
129141
|
+
}
|
|
129142
|
+
return null;
|
|
129143
|
+
};
|
|
129144
|
+
|
|
129145
|
+
/**
|
|
129146
|
+
* Creates an UpdateUserInfoResponse message from a plain object. Also converts values to their respective internal types.
|
|
129147
|
+
* @function fromObject
|
|
129148
|
+
* @memberof UpdateUserInfoResponse
|
|
129149
|
+
* @static
|
|
129150
|
+
* @param {Object.<string,*>} object Plain object
|
|
129151
|
+
* @returns {UpdateUserInfoResponse} UpdateUserInfoResponse
|
|
129152
|
+
*/
|
|
129153
|
+
UpdateUserInfoResponse.fromObject = function fromObject(object) {
|
|
129154
|
+
if (object instanceof $root.UpdateUserInfoResponse)
|
|
129155
|
+
return object;
|
|
129156
|
+
var message = new $root.UpdateUserInfoResponse();
|
|
129157
|
+
switch (object.status) {
|
|
129158
|
+
case "UNKNOWN_CODE":
|
|
129159
|
+
case 0:
|
|
129160
|
+
message.status = 0;
|
|
129161
|
+
break;
|
|
129162
|
+
case "OK":
|
|
129163
|
+
case 200:
|
|
129164
|
+
message.status = 200;
|
|
129165
|
+
break;
|
|
129166
|
+
case "BAD_REQUEST":
|
|
129167
|
+
case 400:
|
|
129168
|
+
message.status = 400;
|
|
129169
|
+
break;
|
|
129170
|
+
case "UNAUTHORIZED":
|
|
129171
|
+
case 401:
|
|
129172
|
+
message.status = 401;
|
|
129173
|
+
break;
|
|
129174
|
+
case "FORBIDDEN":
|
|
129175
|
+
case 403:
|
|
129176
|
+
message.status = 403;
|
|
129177
|
+
break;
|
|
129178
|
+
case "UNPROCESSABLE_ENTITY":
|
|
129179
|
+
case 422:
|
|
129180
|
+
message.status = 422;
|
|
129181
|
+
break;
|
|
129182
|
+
case "NOT_FOUND":
|
|
129183
|
+
case 404:
|
|
129184
|
+
message.status = 404;
|
|
129185
|
+
break;
|
|
129186
|
+
case "INTERNAL_SERVER_ERROR":
|
|
129187
|
+
case 500:
|
|
129188
|
+
message.status = 500;
|
|
129189
|
+
break;
|
|
129190
|
+
case "GATEWAY_TIMEOUT":
|
|
129191
|
+
case 504:
|
|
129192
|
+
message.status = 504;
|
|
129193
|
+
break;
|
|
129194
|
+
}
|
|
129195
|
+
if (object.errors) {
|
|
129196
|
+
if (!Array.isArray(object.errors))
|
|
129197
|
+
throw TypeError(".UpdateUserInfoResponse.errors: array expected");
|
|
129198
|
+
message.errors = [];
|
|
129199
|
+
for (var i = 0; i < object.errors.length; ++i) {
|
|
129200
|
+
if (typeof object.errors[i] !== "object")
|
|
129201
|
+
throw TypeError(".UpdateUserInfoResponse.errors: object expected");
|
|
129202
|
+
message.errors[i] = $root.Error.fromObject(object.errors[i]);
|
|
129203
|
+
}
|
|
129204
|
+
}
|
|
129205
|
+
if (object.user != null) {
|
|
129206
|
+
if (typeof object.user !== "object")
|
|
129207
|
+
throw TypeError(".UpdateUserInfoResponse.user: object expected");
|
|
129208
|
+
message.user = $root.User.fromObject(object.user);
|
|
129209
|
+
}
|
|
129210
|
+
return message;
|
|
129211
|
+
};
|
|
129212
|
+
|
|
129213
|
+
/**
|
|
129214
|
+
* Creates a plain object from an UpdateUserInfoResponse message. Also converts values to other types if specified.
|
|
129215
|
+
* @function toObject
|
|
129216
|
+
* @memberof UpdateUserInfoResponse
|
|
129217
|
+
* @static
|
|
129218
|
+
* @param {UpdateUserInfoResponse} message UpdateUserInfoResponse
|
|
129219
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
129220
|
+
* @returns {Object.<string,*>} Plain object
|
|
129221
|
+
*/
|
|
129222
|
+
UpdateUserInfoResponse.toObject = function toObject(message, options) {
|
|
129223
|
+
if (!options)
|
|
129224
|
+
options = {};
|
|
129225
|
+
var object = {};
|
|
129226
|
+
if (options.arrays || options.defaults)
|
|
129227
|
+
object.errors = [];
|
|
129228
|
+
if (options.defaults) {
|
|
129229
|
+
object.status = options.enums === String ? "UNKNOWN_CODE" : 0;
|
|
129230
|
+
object.user = null;
|
|
129231
|
+
}
|
|
129232
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
129233
|
+
object.status = options.enums === String ? $root.StatusCode[message.status] : message.status;
|
|
129234
|
+
if (message.errors && message.errors.length) {
|
|
129235
|
+
object.errors = [];
|
|
129236
|
+
for (var j = 0; j < message.errors.length; ++j)
|
|
129237
|
+
object.errors[j] = $root.Error.toObject(message.errors[j], options);
|
|
129238
|
+
}
|
|
129239
|
+
if (message.user != null && message.hasOwnProperty("user"))
|
|
129240
|
+
object.user = $root.User.toObject(message.user, options);
|
|
129241
|
+
return object;
|
|
129242
|
+
};
|
|
129243
|
+
|
|
129244
|
+
/**
|
|
129245
|
+
* Converts this UpdateUserInfoResponse to JSON.
|
|
129246
|
+
* @function toJSON
|
|
129247
|
+
* @memberof UpdateUserInfoResponse
|
|
129248
|
+
* @instance
|
|
129249
|
+
* @returns {Object.<string,*>} JSON object
|
|
129250
|
+
*/
|
|
129251
|
+
UpdateUserInfoResponse.prototype.toJSON = function toJSON() {
|
|
129252
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
129253
|
+
};
|
|
129254
|
+
|
|
129255
|
+
return UpdateUserInfoResponse;
|
|
129256
|
+
})();
|
|
129257
|
+
|
|
128697
129258
|
$root.UpdateUserPhoneNumberRequest = (function() {
|
|
128698
129259
|
|
|
128699
129260
|
/**
|
|
@@ -131361,6 +131922,39 @@ $root.UserService = (function() {
|
|
|
131361
131922
|
* @variation 2
|
|
131362
131923
|
*/
|
|
131363
131924
|
|
|
131925
|
+
/**
|
|
131926
|
+
* Callback as used by {@link UserService#updateUserInfo}.
|
|
131927
|
+
* @memberof UserService
|
|
131928
|
+
* @typedef updateUserInfoCallback
|
|
131929
|
+
* @type {function}
|
|
131930
|
+
* @param {Error|null} error Error, if any
|
|
131931
|
+
* @param {UpdateUserInfoResponse} [response] UpdateUserInfoResponse
|
|
131932
|
+
*/
|
|
131933
|
+
|
|
131934
|
+
/**
|
|
131935
|
+
* Calls updateUserInfo.
|
|
131936
|
+
* @function updateUserInfo
|
|
131937
|
+
* @memberof UserService
|
|
131938
|
+
* @instance
|
|
131939
|
+
* @param {IUpdateUserInfoRequest} request UpdateUserInfoRequest message or plain object
|
|
131940
|
+
* @param {UserService.updateUserInfoCallback} callback Node-style callback called with the error, if any, and UpdateUserInfoResponse
|
|
131941
|
+
* @returns {undefined}
|
|
131942
|
+
* @variation 1
|
|
131943
|
+
*/
|
|
131944
|
+
Object.defineProperty(UserService.prototype.updateUserInfo = function updateUserInfo(request, callback) {
|
|
131945
|
+
return this.rpcCall(updateUserInfo, $root.UpdateUserInfoRequest, $root.UpdateUserInfoResponse, request, callback);
|
|
131946
|
+
}, "name", { value: "updateUserInfo" });
|
|
131947
|
+
|
|
131948
|
+
/**
|
|
131949
|
+
* Calls updateUserInfo.
|
|
131950
|
+
* @function updateUserInfo
|
|
131951
|
+
* @memberof UserService
|
|
131952
|
+
* @instance
|
|
131953
|
+
* @param {IUpdateUserInfoRequest} request UpdateUserInfoRequest message or plain object
|
|
131954
|
+
* @returns {Promise<UpdateUserInfoResponse>} Promise
|
|
131955
|
+
* @variation 2
|
|
131956
|
+
*/
|
|
131957
|
+
|
|
131364
131958
|
/**
|
|
131365
131959
|
* Callback as used by {@link UserService#updateUserPhoneNumber}.
|
|
131366
131960
|
* @memberof UserService
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellout/models",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.210",
|
|
4
4
|
"description": "Sellout.io models",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@hapi/joi": "^16.1.7",
|
|
20
|
-
"@sellout/utils": "^0.0.
|
|
20
|
+
"@sellout/utils": "^0.0.210",
|
|
21
21
|
"@types/hapi__joi": "^16.0.1",
|
|
22
22
|
"@types/shortid": "^0.0.29",
|
|
23
23
|
"apollo-link-debounce": "^2.1.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"protobufjs": "^6.11.2",
|
|
32
32
|
"typescript": "^4.4.2"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "35ada21eb9cba96e19691dae000bd889dfc98503"
|
|
35
35
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import gql from "graphql-tag";
|
|
2
|
+
|
|
3
|
+
const mutation = gql`
|
|
4
|
+
mutation updateUserInfo($_id: String, $email: String, $phoneNumber: String) {
|
|
5
|
+
updateUserInfo(_id: $_id, email: $email, phoneNumber: $phoneNumber) {
|
|
6
|
+
_id
|
|
7
|
+
email
|
|
8
|
+
phoneNumber
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export default mutation;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import gql from "graphql-tag";
|
|
2
2
|
|
|
3
3
|
const query = gql`
|
|
4
|
-
query organizations
|
|
5
|
-
|
|
4
|
+
query organizations(
|
|
5
|
+
$query: OrganizationQueryInput
|
|
6
|
+
$pagination: PaginationInput
|
|
7
|
+
) {
|
|
8
|
+
organizations(query: $query, pagination: $pagination) {
|
|
6
9
|
_id
|
|
7
10
|
orgName
|
|
8
11
|
orgUrls
|
|
@@ -43,4 +46,4 @@ const query = gql`
|
|
|
43
46
|
}
|
|
44
47
|
`;
|
|
45
48
|
|
|
46
|
-
export default query;
|
|
49
|
+
export default query;
|
package/src/proto/user.proto
CHANGED
|
@@ -288,6 +288,23 @@ message UpdateBasicUserInfoResponse {
|
|
|
288
288
|
User user = 3;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
// update user phoneNumber and email
|
|
294
|
+
|
|
295
|
+
message UpdateUserInfoRequest {
|
|
296
|
+
string spanContext = 1;
|
|
297
|
+
string _id = 2;
|
|
298
|
+
string email = 3;
|
|
299
|
+
string phoneNumber = 4;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
message UpdateUserInfoResponse {
|
|
303
|
+
StatusCode status = 1;
|
|
304
|
+
repeated Error errors = 2;
|
|
305
|
+
User user = 3;
|
|
306
|
+
}
|
|
307
|
+
|
|
291
308
|
// Update User Phone and Email
|
|
292
309
|
|
|
293
310
|
message UpdateUserPhoneNumberRequest {
|
|
@@ -363,6 +380,7 @@ service UserService {
|
|
|
363
380
|
rpc findUserByEmail(FindUserByEmailRequest) returns (FindUserByEmailResponse) {}
|
|
364
381
|
// Update
|
|
365
382
|
rpc updateBasicUserInfo(UpdateBasicUserInfoRequest) returns (UpdateBasicUserInfoResponse) {}
|
|
383
|
+
rpc updateUserInfo(UpdateUserInfoRequest) returns (UpdateUserInfoResponse) {}
|
|
366
384
|
rpc updateUserPhoneNumber(UpdateUserPhoneNumberRequest) returns (UpdateUserPhoneNumberResponse) {}
|
|
367
385
|
rpc updateUserEmail(UpdateUserEmailRequest) returns (UpdateUserEmailResponse) {}
|
|
368
386
|
rpc updateUserPreferredLogin(UpdateUserPreferredLoginRequest) returns (UpdateUserPreferredLoginResponse) {}
|