@bite-ninja/zenu-sdk 0.10.1 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
22
  for (let key of __getOwnPropNames(mod))
11
23
  if (!__hasOwnProp.call(to, key))
12
24
  __defProp(to, key, {
13
- get: () => mod[key],
25
+ get: __accessProp.bind(mod, key),
14
26
  enumerable: true
15
27
  });
28
+ if (canCache)
29
+ cache.set(mod, to);
16
30
  return to;
17
31
  };
18
- var __moduleCache = /* @__PURE__ */ new WeakMap;
19
32
  var __toCommonJS = (from) => {
20
- var entry = __moduleCache.get(from), desc;
33
+ var entry = (__moduleCache ??= new WeakMap).get(from), desc;
21
34
  if (entry)
22
35
  return entry;
23
36
  entry = __defProp({}, "__esModule", { value: true });
24
- if (from && typeof from === "object" || typeof from === "function")
25
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
26
- get: () => from[key],
27
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
28
- }));
37
+ if (from && typeof from === "object" || typeof from === "function") {
38
+ for (var key of __getOwnPropNames(from))
39
+ if (!__hasOwnProp.call(entry, key))
40
+ __defProp(entry, key, {
41
+ get: __accessProp.bind(from, key),
42
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
43
+ });
44
+ }
29
45
  __moduleCache.set(from, entry);
30
46
  return entry;
31
47
  };
48
+ var __moduleCache;
32
49
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
50
+ var __returnValue = (v) => v;
51
+ function __exportSetter(name, newValue) {
52
+ this[name] = __returnValue.bind(null, newValue);
53
+ }
33
54
  var __export = (target, all) => {
34
55
  for (var name in all)
35
56
  __defProp(target, name, {
36
57
  get: all[name],
37
58
  enumerable: true,
38
59
  configurable: true,
39
- set: (newValue) => all[name] = () => newValue
60
+ set: __exportSetter.bind(all, name)
40
61
  });
41
62
  };
42
63
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -5323,6 +5344,177 @@ function fromJsonTimestamp2(o) {
5323
5344
  function isSet3(value) {
5324
5345
  return value !== null && value !== undefined;
5325
5346
  }
5347
+ // src/gen/zenu/common/v1/pagination.ts
5348
+ function createBasePaginationRequest() {
5349
+ return { pageSize: undefined, page: undefined, includeCount: undefined };
5350
+ }
5351
+ var PaginationRequest = {
5352
+ encode(message, writer = new BinaryWriter) {
5353
+ if (message.pageSize !== undefined) {
5354
+ writer.uint32(8).int32(message.pageSize);
5355
+ }
5356
+ if (message.page !== undefined) {
5357
+ writer.uint32(16).int32(message.page);
5358
+ }
5359
+ if (message.includeCount !== undefined) {
5360
+ writer.uint32(24).bool(message.includeCount);
5361
+ }
5362
+ return writer;
5363
+ },
5364
+ decode(input, length) {
5365
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5366
+ const end = length === undefined ? reader.len : reader.pos + length;
5367
+ const message = createBasePaginationRequest();
5368
+ while (reader.pos < end) {
5369
+ const tag = reader.uint32();
5370
+ switch (tag >>> 3) {
5371
+ case 1: {
5372
+ if (tag !== 8) {
5373
+ break;
5374
+ }
5375
+ message.pageSize = reader.int32();
5376
+ continue;
5377
+ }
5378
+ case 2: {
5379
+ if (tag !== 16) {
5380
+ break;
5381
+ }
5382
+ message.page = reader.int32();
5383
+ continue;
5384
+ }
5385
+ case 3: {
5386
+ if (tag !== 24) {
5387
+ break;
5388
+ }
5389
+ message.includeCount = reader.bool();
5390
+ continue;
5391
+ }
5392
+ }
5393
+ if ((tag & 7) === 4 || tag === 0) {
5394
+ break;
5395
+ }
5396
+ reader.skip(tag & 7);
5397
+ }
5398
+ return message;
5399
+ },
5400
+ fromJSON(object) {
5401
+ return {
5402
+ pageSize: isSet4(object.pageSize) ? globalThis.Number(object.pageSize) : isSet4(object.page_size) ? globalThis.Number(object.page_size) : undefined,
5403
+ page: isSet4(object.page) ? globalThis.Number(object.page) : undefined,
5404
+ includeCount: isSet4(object.includeCount) ? globalThis.Boolean(object.includeCount) : isSet4(object.include_count) ? globalThis.Boolean(object.include_count) : undefined
5405
+ };
5406
+ },
5407
+ toJSON(message) {
5408
+ const obj = {};
5409
+ if (message.pageSize !== undefined) {
5410
+ obj.pageSize = Math.round(message.pageSize);
5411
+ }
5412
+ if (message.page !== undefined) {
5413
+ obj.page = Math.round(message.page);
5414
+ }
5415
+ if (message.includeCount !== undefined) {
5416
+ obj.includeCount = message.includeCount;
5417
+ }
5418
+ return obj;
5419
+ },
5420
+ create(base) {
5421
+ return PaginationRequest.fromPartial(base ?? {});
5422
+ },
5423
+ fromPartial(object) {
5424
+ const message = createBasePaginationRequest();
5425
+ message.pageSize = object.pageSize ?? undefined;
5426
+ message.page = object.page ?? undefined;
5427
+ message.includeCount = object.includeCount ?? undefined;
5428
+ return message;
5429
+ }
5430
+ };
5431
+ function createBasePaginationResponse() {
5432
+ return { pageSize: 0, page: 0, count: undefined };
5433
+ }
5434
+ var PaginationResponse = {
5435
+ encode(message, writer = new BinaryWriter) {
5436
+ if (message.pageSize !== 0) {
5437
+ writer.uint32(8).int32(message.pageSize);
5438
+ }
5439
+ if (message.page !== 0) {
5440
+ writer.uint32(16).int32(message.page);
5441
+ }
5442
+ if (message.count !== undefined) {
5443
+ writer.uint32(24).int32(message.count);
5444
+ }
5445
+ return writer;
5446
+ },
5447
+ decode(input, length) {
5448
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5449
+ const end = length === undefined ? reader.len : reader.pos + length;
5450
+ const message = createBasePaginationResponse();
5451
+ while (reader.pos < end) {
5452
+ const tag = reader.uint32();
5453
+ switch (tag >>> 3) {
5454
+ case 1: {
5455
+ if (tag !== 8) {
5456
+ break;
5457
+ }
5458
+ message.pageSize = reader.int32();
5459
+ continue;
5460
+ }
5461
+ case 2: {
5462
+ if (tag !== 16) {
5463
+ break;
5464
+ }
5465
+ message.page = reader.int32();
5466
+ continue;
5467
+ }
5468
+ case 3: {
5469
+ if (tag !== 24) {
5470
+ break;
5471
+ }
5472
+ message.count = reader.int32();
5473
+ continue;
5474
+ }
5475
+ }
5476
+ if ((tag & 7) === 4 || tag === 0) {
5477
+ break;
5478
+ }
5479
+ reader.skip(tag & 7);
5480
+ }
5481
+ return message;
5482
+ },
5483
+ fromJSON(object) {
5484
+ return {
5485
+ pageSize: isSet4(object.pageSize) ? globalThis.Number(object.pageSize) : isSet4(object.page_size) ? globalThis.Number(object.page_size) : 0,
5486
+ page: isSet4(object.page) ? globalThis.Number(object.page) : 0,
5487
+ count: isSet4(object.count) ? globalThis.Number(object.count) : undefined
5488
+ };
5489
+ },
5490
+ toJSON(message) {
5491
+ const obj = {};
5492
+ if (message.pageSize !== 0) {
5493
+ obj.pageSize = Math.round(message.pageSize);
5494
+ }
5495
+ if (message.page !== 0) {
5496
+ obj.page = Math.round(message.page);
5497
+ }
5498
+ if (message.count !== undefined) {
5499
+ obj.count = Math.round(message.count);
5500
+ }
5501
+ return obj;
5502
+ },
5503
+ create(base) {
5504
+ return PaginationResponse.fromPartial(base ?? {});
5505
+ },
5506
+ fromPartial(object) {
5507
+ const message = createBasePaginationResponse();
5508
+ message.pageSize = object.pageSize ?? 0;
5509
+ message.page = object.page ?? 0;
5510
+ message.count = object.count ?? undefined;
5511
+ return message;
5512
+ }
5513
+ };
5514
+ function isSet4(value) {
5515
+ return value !== null && value !== undefined;
5516
+ }
5517
+
5326
5518
  // src/gen/zenu/users/v1/users_service.ts
5327
5519
  var RoleScope = { UNSPECIFIED: 0, GLOBAL: 1, ORGANIZATION: 2, LOCATION: 3, UNRECOGNIZED: -1 };
5328
5520
  function roleScopeFromJSON(object) {
@@ -5453,7 +5645,7 @@ var SayHelloRequest = {
5453
5645
  return message;
5454
5646
  },
5455
5647
  fromJSON(object) {
5456
- return { name: isSet4(object.name) ? globalThis.String(object.name) : "" };
5648
+ return { name: isSet5(object.name) ? globalThis.String(object.name) : "" };
5457
5649
  },
5458
5650
  toJSON(message) {
5459
5651
  const obj = {};
@@ -5515,8 +5707,8 @@ var SayHelloResponse = {
5515
5707
  },
5516
5708
  fromJSON(object) {
5517
5709
  return {
5518
- message: isSet4(object.message) ? globalThis.String(object.message) : "",
5519
- currentTime: isSet4(object.currentTime) ? fromJsonTimestamp3(object.currentTime) : isSet4(object.current_time) ? fromJsonTimestamp3(object.current_time) : undefined
5710
+ message: isSet5(object.message) ? globalThis.String(object.message) : "",
5711
+ currentTime: isSet5(object.currentTime) ? fromJsonTimestamp3(object.currentTime) : isSet5(object.current_time) ? fromJsonTimestamp3(object.current_time) : undefined
5520
5712
  };
5521
5713
  },
5522
5714
  toJSON(message) {
@@ -5609,7 +5801,7 @@ var WhoAmIResponse = {
5609
5801
  return message;
5610
5802
  },
5611
5803
  fromJSON(object) {
5612
- return { user: isSet4(object.user) ? User.fromJSON(object.user) : undefined };
5804
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
5613
5805
  },
5614
5806
  toJSON(message) {
5615
5807
  const obj = {};
@@ -5661,7 +5853,7 @@ var GetUserRequest = {
5661
5853
  },
5662
5854
  fromJSON(object) {
5663
5855
  return {
5664
- userId: isSet4(object.userId) ? globalThis.String(object.userId) : isSet4(object.user_id) ? globalThis.String(object.user_id) : ""
5856
+ userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : ""
5665
5857
  };
5666
5858
  },
5667
5859
  toJSON(message) {
@@ -5713,7 +5905,7 @@ var GetUserResponse = {
5713
5905
  return message;
5714
5906
  },
5715
5907
  fromJSON(object) {
5716
- return { user: isSet4(object.user) ? User.fromJSON(object.user) : undefined };
5908
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
5717
5909
  },
5718
5910
  toJSON(message) {
5719
5911
  const obj = {};
@@ -5844,11 +6036,16 @@ function createBaseUser() {
5844
6036
  telephone: "",
5845
6037
  image: "",
5846
6038
  createdAt: undefined,
6039
+ createdBy: "",
5847
6040
  updatedAt: undefined,
6041
+ updatedBy: "",
5848
6042
  roles: [],
5849
6043
  stripeAccountId: undefined,
5850
6044
  stripeDetailsSubmitted: false,
5851
- stripePayoutsEnabled: false
6045
+ stripePayoutsEnabled: false,
6046
+ address: undefined,
6047
+ connecteamId: undefined,
6048
+ talentLmsId: undefined
5852
6049
  };
5853
6050
  }
5854
6051
  var User = {
@@ -5874,20 +6071,35 @@ var User = {
5874
6071
  if (message.createdAt !== undefined) {
5875
6072
  Timestamp.encode(toTimestamp3(message.createdAt), writer.uint32(58).fork()).join();
5876
6073
  }
6074
+ if (message.createdBy !== "") {
6075
+ writer.uint32(66).string(message.createdBy);
6076
+ }
5877
6077
  if (message.updatedAt !== undefined) {
5878
- Timestamp.encode(toTimestamp3(message.updatedAt), writer.uint32(66).fork()).join();
6078
+ Timestamp.encode(toTimestamp3(message.updatedAt), writer.uint32(74).fork()).join();
6079
+ }
6080
+ if (message.updatedBy !== "") {
6081
+ writer.uint32(82).string(message.updatedBy);
5879
6082
  }
5880
6083
  for (const v of message.roles) {
5881
- UserRole.encode(v, writer.uint32(74).fork()).join();
6084
+ UserRole.encode(v, writer.uint32(90).fork()).join();
5882
6085
  }
5883
6086
  if (message.stripeAccountId !== undefined) {
5884
- writer.uint32(82).string(message.stripeAccountId);
6087
+ writer.uint32(98).string(message.stripeAccountId);
5885
6088
  }
5886
6089
  if (message.stripeDetailsSubmitted !== false) {
5887
- writer.uint32(88).bool(message.stripeDetailsSubmitted);
6090
+ writer.uint32(104).bool(message.stripeDetailsSubmitted);
5888
6091
  }
5889
6092
  if (message.stripePayoutsEnabled !== false) {
5890
- writer.uint32(96).bool(message.stripePayoutsEnabled);
6093
+ writer.uint32(112).bool(message.stripePayoutsEnabled);
6094
+ }
6095
+ if (message.address !== undefined) {
6096
+ Address.encode(message.address, writer.uint32(122).fork()).join();
6097
+ }
6098
+ if (message.connecteamId !== undefined) {
6099
+ writer.uint32(128).int32(message.connecteamId);
6100
+ }
6101
+ if (message.talentLmsId !== undefined) {
6102
+ writer.uint32(136).int32(message.talentLmsId);
5891
6103
  }
5892
6104
  return writer;
5893
6105
  },
@@ -5951,37 +6163,72 @@ var User = {
5951
6163
  if (tag !== 66) {
5952
6164
  break;
5953
6165
  }
5954
- message.updatedAt = fromTimestamp3(Timestamp.decode(reader, reader.uint32()));
6166
+ message.createdBy = reader.string();
5955
6167
  continue;
5956
6168
  }
5957
6169
  case 9: {
5958
6170
  if (tag !== 74) {
5959
6171
  break;
5960
6172
  }
5961
- message.roles.push(UserRole.decode(reader, reader.uint32()));
6173
+ message.updatedAt = fromTimestamp3(Timestamp.decode(reader, reader.uint32()));
5962
6174
  continue;
5963
6175
  }
5964
6176
  case 10: {
5965
6177
  if (tag !== 82) {
5966
6178
  break;
5967
6179
  }
5968
- message.stripeAccountId = reader.string();
6180
+ message.updatedBy = reader.string();
5969
6181
  continue;
5970
6182
  }
5971
6183
  case 11: {
5972
- if (tag !== 88) {
6184
+ if (tag !== 90) {
5973
6185
  break;
5974
6186
  }
5975
- message.stripeDetailsSubmitted = reader.bool();
6187
+ message.roles.push(UserRole.decode(reader, reader.uint32()));
5976
6188
  continue;
5977
6189
  }
5978
6190
  case 12: {
5979
- if (tag !== 96) {
6191
+ if (tag !== 98) {
6192
+ break;
6193
+ }
6194
+ message.stripeAccountId = reader.string();
6195
+ continue;
6196
+ }
6197
+ case 13: {
6198
+ if (tag !== 104) {
6199
+ break;
6200
+ }
6201
+ message.stripeDetailsSubmitted = reader.bool();
6202
+ continue;
6203
+ }
6204
+ case 14: {
6205
+ if (tag !== 112) {
5980
6206
  break;
5981
6207
  }
5982
6208
  message.stripePayoutsEnabled = reader.bool();
5983
6209
  continue;
5984
6210
  }
6211
+ case 15: {
6212
+ if (tag !== 122) {
6213
+ break;
6214
+ }
6215
+ message.address = Address.decode(reader, reader.uint32());
6216
+ continue;
6217
+ }
6218
+ case 16: {
6219
+ if (tag !== 128) {
6220
+ break;
6221
+ }
6222
+ message.connecteamId = reader.int32();
6223
+ continue;
6224
+ }
6225
+ case 17: {
6226
+ if (tag !== 136) {
6227
+ break;
6228
+ }
6229
+ message.talentLmsId = reader.int32();
6230
+ continue;
6231
+ }
5985
6232
  }
5986
6233
  if ((tag & 7) === 4 || tag === 0) {
5987
6234
  break;
@@ -5992,18 +6239,23 @@ var User = {
5992
6239
  },
5993
6240
  fromJSON(object) {
5994
6241
  return {
5995
- id: isSet4(object.id) ? globalThis.String(object.id) : "",
5996
- email: isSet4(object.email) ? globalThis.String(object.email) : "",
5997
- givenName: isSet4(object.givenName) ? globalThis.String(object.givenName) : isSet4(object.given_name) ? globalThis.String(object.given_name) : "",
5998
- familyName: isSet4(object.familyName) ? globalThis.String(object.familyName) : isSet4(object.family_name) ? globalThis.String(object.family_name) : "",
5999
- telephone: isSet4(object.telephone) ? globalThis.String(object.telephone) : "",
6000
- image: isSet4(object.image) ? globalThis.String(object.image) : "",
6001
- createdAt: isSet4(object.createdAt) ? fromJsonTimestamp3(object.createdAt) : isSet4(object.created_at) ? fromJsonTimestamp3(object.created_at) : undefined,
6002
- updatedAt: isSet4(object.updatedAt) ? fromJsonTimestamp3(object.updatedAt) : isSet4(object.updated_at) ? fromJsonTimestamp3(object.updated_at) : undefined,
6242
+ id: isSet5(object.id) ? globalThis.String(object.id) : "",
6243
+ email: isSet5(object.email) ? globalThis.String(object.email) : "",
6244
+ givenName: isSet5(object.givenName) ? globalThis.String(object.givenName) : isSet5(object.given_name) ? globalThis.String(object.given_name) : "",
6245
+ familyName: isSet5(object.familyName) ? globalThis.String(object.familyName) : isSet5(object.family_name) ? globalThis.String(object.family_name) : "",
6246
+ telephone: isSet5(object.telephone) ? globalThis.String(object.telephone) : "",
6247
+ image: isSet5(object.image) ? globalThis.String(object.image) : "",
6248
+ createdAt: isSet5(object.createdAt) ? fromJsonTimestamp3(object.createdAt) : isSet5(object.created_at) ? fromJsonTimestamp3(object.created_at) : undefined,
6249
+ createdBy: isSet5(object.createdBy) ? globalThis.String(object.createdBy) : isSet5(object.created_by) ? globalThis.String(object.created_by) : "",
6250
+ updatedAt: isSet5(object.updatedAt) ? fromJsonTimestamp3(object.updatedAt) : isSet5(object.updated_at) ? fromJsonTimestamp3(object.updated_at) : undefined,
6251
+ updatedBy: isSet5(object.updatedBy) ? globalThis.String(object.updatedBy) : isSet5(object.updated_by) ? globalThis.String(object.updated_by) : "",
6003
6252
  roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => UserRole.fromJSON(e)) : [],
6004
- stripeAccountId: isSet4(object.stripeAccountId) ? globalThis.String(object.stripeAccountId) : isSet4(object.stripe_account_id) ? globalThis.String(object.stripe_account_id) : undefined,
6005
- stripeDetailsSubmitted: isSet4(object.stripeDetailsSubmitted) ? globalThis.Boolean(object.stripeDetailsSubmitted) : isSet4(object.stripe_details_submitted) ? globalThis.Boolean(object.stripe_details_submitted) : false,
6006
- stripePayoutsEnabled: isSet4(object.stripePayoutsEnabled) ? globalThis.Boolean(object.stripePayoutsEnabled) : isSet4(object.stripe_payouts_enabled) ? globalThis.Boolean(object.stripe_payouts_enabled) : false
6253
+ stripeAccountId: isSet5(object.stripeAccountId) ? globalThis.String(object.stripeAccountId) : isSet5(object.stripe_account_id) ? globalThis.String(object.stripe_account_id) : undefined,
6254
+ stripeDetailsSubmitted: isSet5(object.stripeDetailsSubmitted) ? globalThis.Boolean(object.stripeDetailsSubmitted) : isSet5(object.stripe_details_submitted) ? globalThis.Boolean(object.stripe_details_submitted) : false,
6255
+ stripePayoutsEnabled: isSet5(object.stripePayoutsEnabled) ? globalThis.Boolean(object.stripePayoutsEnabled) : isSet5(object.stripe_payouts_enabled) ? globalThis.Boolean(object.stripe_payouts_enabled) : false,
6256
+ address: isSet5(object.address) ? Address.fromJSON(object.address) : undefined,
6257
+ connecteamId: isSet5(object.connecteamId) ? globalThis.Number(object.connecteamId) : isSet5(object.connecteam_id) ? globalThis.Number(object.connecteam_id) : undefined,
6258
+ talentLmsId: isSet5(object.talentLmsId) ? globalThis.Number(object.talentLmsId) : isSet5(object.talent_lms_id) ? globalThis.Number(object.talent_lms_id) : undefined
6007
6259
  };
6008
6260
  },
6009
6261
  toJSON(message) {
@@ -6029,9 +6281,15 @@ var User = {
6029
6281
  if (message.createdAt !== undefined) {
6030
6282
  obj.createdAt = message.createdAt.toISOString();
6031
6283
  }
6284
+ if (message.createdBy !== "") {
6285
+ obj.createdBy = message.createdBy;
6286
+ }
6032
6287
  if (message.updatedAt !== undefined) {
6033
6288
  obj.updatedAt = message.updatedAt.toISOString();
6034
6289
  }
6290
+ if (message.updatedBy !== "") {
6291
+ obj.updatedBy = message.updatedBy;
6292
+ }
6035
6293
  if (message.roles?.length) {
6036
6294
  obj.roles = message.roles.map((e) => UserRole.toJSON(e));
6037
6295
  }
@@ -6044,6 +6302,15 @@ var User = {
6044
6302
  if (message.stripePayoutsEnabled !== false) {
6045
6303
  obj.stripePayoutsEnabled = message.stripePayoutsEnabled;
6046
6304
  }
6305
+ if (message.address !== undefined) {
6306
+ obj.address = Address.toJSON(message.address);
6307
+ }
6308
+ if (message.connecteamId !== undefined) {
6309
+ obj.connecteamId = Math.round(message.connecteamId);
6310
+ }
6311
+ if (message.talentLmsId !== undefined) {
6312
+ obj.talentLmsId = Math.round(message.talentLmsId);
6313
+ }
6047
6314
  return obj;
6048
6315
  },
6049
6316
  create(base) {
@@ -6058,193 +6325,231 @@ var User = {
6058
6325
  message.telephone = object.telephone ?? "";
6059
6326
  message.image = object.image ?? "";
6060
6327
  message.createdAt = object.createdAt ?? undefined;
6328
+ message.createdBy = object.createdBy ?? "";
6061
6329
  message.updatedAt = object.updatedAt ?? undefined;
6330
+ message.updatedBy = object.updatedBy ?? "";
6062
6331
  message.roles = object.roles?.map((e) => UserRole.fromPartial(e)) || [];
6063
6332
  message.stripeAccountId = object.stripeAccountId ?? undefined;
6064
6333
  message.stripeDetailsSubmitted = object.stripeDetailsSubmitted ?? false;
6065
6334
  message.stripePayoutsEnabled = object.stripePayoutsEnabled ?? false;
6335
+ message.address = object.address !== undefined && object.address !== null ? Address.fromPartial(object.address) : undefined;
6336
+ message.connecteamId = object.connecteamId ?? undefined;
6337
+ message.talentLmsId = object.talentLmsId ?? undefined;
6066
6338
  return message;
6067
6339
  }
6068
6340
  };
6069
- function createBaseUserRole() {
6070
- return { role: 0, scope: 0, organizationId: undefined, locationId: undefined };
6341
+ function createBaseAddress() {
6342
+ return {
6343
+ placeId: "",
6344
+ countryName: "",
6345
+ postalCode: "",
6346
+ region: "",
6347
+ locality: "",
6348
+ extendedAddress: "",
6349
+ streetAddress: "",
6350
+ postOfficeBox: "",
6351
+ formattedAddress: ""
6352
+ };
6071
6353
  }
6072
- var UserRole = {
6354
+ var Address = {
6073
6355
  encode(message, writer = new BinaryWriter) {
6074
- if (message.role !== 0) {
6075
- writer.uint32(8).int32(message.role);
6356
+ if (message.placeId !== "") {
6357
+ writer.uint32(10).string(message.placeId);
6076
6358
  }
6077
- if (message.scope !== 0) {
6078
- writer.uint32(16).int32(message.scope);
6359
+ if (message.countryName !== "") {
6360
+ writer.uint32(18).string(message.countryName);
6079
6361
  }
6080
- if (message.organizationId !== undefined) {
6081
- writer.uint32(26).string(message.organizationId);
6362
+ if (message.postalCode !== "") {
6363
+ writer.uint32(26).string(message.postalCode);
6082
6364
  }
6083
- if (message.locationId !== undefined) {
6084
- writer.uint32(34).string(message.locationId);
6365
+ if (message.region !== "") {
6366
+ writer.uint32(34).string(message.region);
6367
+ }
6368
+ if (message.locality !== "") {
6369
+ writer.uint32(42).string(message.locality);
6370
+ }
6371
+ if (message.extendedAddress !== "") {
6372
+ writer.uint32(50).string(message.extendedAddress);
6373
+ }
6374
+ if (message.streetAddress !== "") {
6375
+ writer.uint32(58).string(message.streetAddress);
6376
+ }
6377
+ if (message.postOfficeBox !== "") {
6378
+ writer.uint32(66).string(message.postOfficeBox);
6379
+ }
6380
+ if (message.formattedAddress !== "") {
6381
+ writer.uint32(74).string(message.formattedAddress);
6085
6382
  }
6086
6383
  return writer;
6087
6384
  },
6088
6385
  decode(input, length) {
6089
6386
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6090
6387
  const end = length === undefined ? reader.len : reader.pos + length;
6091
- const message = createBaseUserRole();
6388
+ const message = createBaseAddress();
6092
6389
  while (reader.pos < end) {
6093
6390
  const tag = reader.uint32();
6094
6391
  switch (tag >>> 3) {
6095
6392
  case 1: {
6096
- if (tag !== 8) {
6393
+ if (tag !== 10) {
6097
6394
  break;
6098
6395
  }
6099
- message.role = reader.int32();
6396
+ message.placeId = reader.string();
6100
6397
  continue;
6101
6398
  }
6102
6399
  case 2: {
6103
- if (tag !== 16) {
6400
+ if (tag !== 18) {
6104
6401
  break;
6105
6402
  }
6106
- message.scope = reader.int32();
6403
+ message.countryName = reader.string();
6107
6404
  continue;
6108
6405
  }
6109
6406
  case 3: {
6110
6407
  if (tag !== 26) {
6111
6408
  break;
6112
6409
  }
6113
- message.organizationId = reader.string();
6410
+ message.postalCode = reader.string();
6114
6411
  continue;
6115
6412
  }
6116
6413
  case 4: {
6117
6414
  if (tag !== 34) {
6118
6415
  break;
6119
6416
  }
6120
- message.locationId = reader.string();
6417
+ message.region = reader.string();
6121
6418
  continue;
6122
6419
  }
6123
- }
6124
- if ((tag & 7) === 4 || tag === 0) {
6125
- break;
6126
- }
6127
- reader.skip(tag & 7);
6128
- }
6129
- return message;
6130
- },
6131
- fromJSON(object) {
6132
- return {
6133
- role: isSet4(object.role) ? roleFromJSON(object.role) : 0,
6134
- scope: isSet4(object.scope) ? roleScopeFromJSON(object.scope) : 0,
6135
- organizationId: isSet4(object.organizationId) ? globalThis.String(object.organizationId) : isSet4(object.organization_id) ? globalThis.String(object.organization_id) : undefined,
6136
- locationId: isSet4(object.locationId) ? globalThis.String(object.locationId) : isSet4(object.location_id) ? globalThis.String(object.location_id) : undefined
6420
+ case 5: {
6421
+ if (tag !== 42) {
6422
+ break;
6423
+ }
6424
+ message.locality = reader.string();
6425
+ continue;
6426
+ }
6427
+ case 6: {
6428
+ if (tag !== 50) {
6429
+ break;
6430
+ }
6431
+ message.extendedAddress = reader.string();
6432
+ continue;
6433
+ }
6434
+ case 7: {
6435
+ if (tag !== 58) {
6436
+ break;
6437
+ }
6438
+ message.streetAddress = reader.string();
6439
+ continue;
6440
+ }
6441
+ case 8: {
6442
+ if (tag !== 66) {
6443
+ break;
6444
+ }
6445
+ message.postOfficeBox = reader.string();
6446
+ continue;
6447
+ }
6448
+ case 9: {
6449
+ if (tag !== 74) {
6450
+ break;
6451
+ }
6452
+ message.formattedAddress = reader.string();
6453
+ continue;
6454
+ }
6455
+ }
6456
+ if ((tag & 7) === 4 || tag === 0) {
6457
+ break;
6458
+ }
6459
+ reader.skip(tag & 7);
6460
+ }
6461
+ return message;
6462
+ },
6463
+ fromJSON(object) {
6464
+ return {
6465
+ placeId: isSet5(object.placeId) ? globalThis.String(object.placeId) : isSet5(object.place_id) ? globalThis.String(object.place_id) : "",
6466
+ countryName: isSet5(object.countryName) ? globalThis.String(object.countryName) : isSet5(object.country_name) ? globalThis.String(object.country_name) : "",
6467
+ postalCode: isSet5(object.postalCode) ? globalThis.String(object.postalCode) : isSet5(object.postal_code) ? globalThis.String(object.postal_code) : "",
6468
+ region: isSet5(object.region) ? globalThis.String(object.region) : "",
6469
+ locality: isSet5(object.locality) ? globalThis.String(object.locality) : "",
6470
+ extendedAddress: isSet5(object.extendedAddress) ? globalThis.String(object.extendedAddress) : isSet5(object.extended_address) ? globalThis.String(object.extended_address) : "",
6471
+ streetAddress: isSet5(object.streetAddress) ? globalThis.String(object.streetAddress) : isSet5(object.street_address) ? globalThis.String(object.street_address) : "",
6472
+ postOfficeBox: isSet5(object.postOfficeBox) ? globalThis.String(object.postOfficeBox) : isSet5(object.post_office_box) ? globalThis.String(object.post_office_box) : "",
6473
+ formattedAddress: isSet5(object.formattedAddress) ? globalThis.String(object.formattedAddress) : isSet5(object.formatted_address) ? globalThis.String(object.formatted_address) : ""
6137
6474
  };
6138
6475
  },
6139
6476
  toJSON(message) {
6140
6477
  const obj = {};
6141
- if (message.role !== 0) {
6142
- obj.role = roleToJSON(message.role);
6478
+ if (message.placeId !== "") {
6479
+ obj.placeId = message.placeId;
6143
6480
  }
6144
- if (message.scope !== 0) {
6145
- obj.scope = roleScopeToJSON(message.scope);
6481
+ if (message.countryName !== "") {
6482
+ obj.countryName = message.countryName;
6146
6483
  }
6147
- if (message.organizationId !== undefined) {
6148
- obj.organizationId = message.organizationId;
6484
+ if (message.postalCode !== "") {
6485
+ obj.postalCode = message.postalCode;
6149
6486
  }
6150
- if (message.locationId !== undefined) {
6151
- obj.locationId = message.locationId;
6487
+ if (message.region !== "") {
6488
+ obj.region = message.region;
6489
+ }
6490
+ if (message.locality !== "") {
6491
+ obj.locality = message.locality;
6492
+ }
6493
+ if (message.extendedAddress !== "") {
6494
+ obj.extendedAddress = message.extendedAddress;
6495
+ }
6496
+ if (message.streetAddress !== "") {
6497
+ obj.streetAddress = message.streetAddress;
6498
+ }
6499
+ if (message.postOfficeBox !== "") {
6500
+ obj.postOfficeBox = message.postOfficeBox;
6501
+ }
6502
+ if (message.formattedAddress !== "") {
6503
+ obj.formattedAddress = message.formattedAddress;
6152
6504
  }
6153
6505
  return obj;
6154
6506
  },
6155
6507
  create(base) {
6156
- return UserRole.fromPartial(base ?? {});
6508
+ return Address.fromPartial(base ?? {});
6157
6509
  },
6158
6510
  fromPartial(object) {
6159
- const message = createBaseUserRole();
6160
- message.role = object.role ?? 0;
6161
- message.scope = object.scope ?? 0;
6162
- message.organizationId = object.organizationId ?? undefined;
6163
- message.locationId = object.locationId ?? undefined;
6511
+ const message = createBaseAddress();
6512
+ message.placeId = object.placeId ?? "";
6513
+ message.countryName = object.countryName ?? "";
6514
+ message.postalCode = object.postalCode ?? "";
6515
+ message.region = object.region ?? "";
6516
+ message.locality = object.locality ?? "";
6517
+ message.extendedAddress = object.extendedAddress ?? "";
6518
+ message.streetAddress = object.streetAddress ?? "";
6519
+ message.postOfficeBox = object.postOfficeBox ?? "";
6520
+ message.formattedAddress = object.formattedAddress ?? "";
6164
6521
  return message;
6165
6522
  }
6166
6523
  };
6167
- var UsersServiceDefinition = {
6168
- name: "UsersService",
6169
- fullName: "zenu.users.v1.UsersService",
6170
- methods: {
6171
- sayHello: {
6172
- name: "SayHello",
6173
- requestType: SayHelloRequest,
6174
- requestStream: false,
6175
- responseType: SayHelloResponse,
6176
- responseStream: false,
6177
- options: {}
6178
- },
6179
- whoAmI: {
6180
- name: "WhoAmI",
6181
- requestType: WhoAmIRequest,
6182
- requestStream: false,
6183
- responseType: WhoAmIResponse,
6184
- responseStream: false,
6185
- options: {}
6186
- },
6187
- getUser: {
6188
- name: "GetUser",
6189
- requestType: GetUserRequest,
6190
- requestStream: false,
6191
- responseType: GetUserResponse,
6192
- responseStream: false,
6193
- options: {}
6194
- },
6195
- getUsers: {
6196
- name: "GetUsers",
6197
- requestType: GetUsersRequest,
6198
- requestStream: false,
6199
- responseType: GetUsersResponse,
6200
- responseStream: false,
6201
- options: {}
6202
- }
6203
- }
6204
- };
6205
- function toTimestamp3(date) {
6206
- const seconds = Math.trunc(date.getTime() / 1000);
6207
- const nanos = date.getTime() % 1000 * 1e6;
6208
- return { seconds, nanos };
6209
- }
6210
- function fromTimestamp3(t) {
6211
- let millis = (t.seconds || 0) * 1000;
6212
- millis += (t.nanos || 0) / 1e6;
6213
- return new globalThis.Date(millis);
6214
- }
6215
- function fromJsonTimestamp3(o) {
6216
- if (o instanceof globalThis.Date) {
6217
- return o;
6218
- } else if (typeof o === "string") {
6219
- return new globalThis.Date(o);
6220
- } else {
6221
- return fromTimestamp3(Timestamp.fromJSON(o));
6222
- }
6223
- }
6224
- function isSet4(value) {
6225
- return value !== null && value !== undefined;
6226
- }
6227
- // src/gen/zenu/common/v1/pagination.ts
6228
- function createBasePaginationRequest() {
6229
- return { pageSize: undefined, page: undefined, includeCount: undefined };
6524
+ function createBaseUserRole() {
6525
+ return { role: 0, scope: 0, organizationId: undefined, locationId: undefined, createdAt: undefined, createdBy: "" };
6230
6526
  }
6231
- var PaginationRequest = {
6527
+ var UserRole = {
6232
6528
  encode(message, writer = new BinaryWriter) {
6233
- if (message.pageSize !== undefined) {
6234
- writer.uint32(8).int32(message.pageSize);
6529
+ if (message.role !== 0) {
6530
+ writer.uint32(8).int32(message.role);
6235
6531
  }
6236
- if (message.page !== undefined) {
6237
- writer.uint32(16).int32(message.page);
6532
+ if (message.scope !== 0) {
6533
+ writer.uint32(16).int32(message.scope);
6238
6534
  }
6239
- if (message.includeCount !== undefined) {
6240
- writer.uint32(24).bool(message.includeCount);
6535
+ if (message.organizationId !== undefined) {
6536
+ writer.uint32(26).string(message.organizationId);
6537
+ }
6538
+ if (message.locationId !== undefined) {
6539
+ writer.uint32(34).string(message.locationId);
6540
+ }
6541
+ if (message.createdAt !== undefined) {
6542
+ Timestamp.encode(toTimestamp3(message.createdAt), writer.uint32(42).fork()).join();
6543
+ }
6544
+ if (message.createdBy !== "") {
6545
+ writer.uint32(50).string(message.createdBy);
6241
6546
  }
6242
6547
  return writer;
6243
6548
  },
6244
6549
  decode(input, length) {
6245
6550
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6246
6551
  const end = length === undefined ? reader.len : reader.pos + length;
6247
- const message = createBasePaginationRequest();
6552
+ const message = createBaseUserRole();
6248
6553
  while (reader.pos < end) {
6249
6554
  const tag = reader.uint32();
6250
6555
  switch (tag >>> 3) {
@@ -6252,21 +6557,42 @@ var PaginationRequest = {
6252
6557
  if (tag !== 8) {
6253
6558
  break;
6254
6559
  }
6255
- message.pageSize = reader.int32();
6560
+ message.role = reader.int32();
6256
6561
  continue;
6257
6562
  }
6258
6563
  case 2: {
6259
6564
  if (tag !== 16) {
6260
6565
  break;
6261
6566
  }
6262
- message.page = reader.int32();
6567
+ message.scope = reader.int32();
6263
6568
  continue;
6264
6569
  }
6265
6570
  case 3: {
6266
- if (tag !== 24) {
6571
+ if (tag !== 26) {
6267
6572
  break;
6268
6573
  }
6269
- message.includeCount = reader.bool();
6574
+ message.organizationId = reader.string();
6575
+ continue;
6576
+ }
6577
+ case 4: {
6578
+ if (tag !== 34) {
6579
+ break;
6580
+ }
6581
+ message.locationId = reader.string();
6582
+ continue;
6583
+ }
6584
+ case 5: {
6585
+ if (tag !== 42) {
6586
+ break;
6587
+ }
6588
+ message.createdAt = fromTimestamp3(Timestamp.decode(reader, reader.uint32()));
6589
+ continue;
6590
+ }
6591
+ case 6: {
6592
+ if (tag !== 50) {
6593
+ break;
6594
+ }
6595
+ message.createdBy = reader.string();
6270
6596
  continue;
6271
6597
  }
6272
6598
  }
@@ -6279,55 +6605,73 @@ var PaginationRequest = {
6279
6605
  },
6280
6606
  fromJSON(object) {
6281
6607
  return {
6282
- pageSize: isSet5(object.pageSize) ? globalThis.Number(object.pageSize) : isSet5(object.page_size) ? globalThis.Number(object.page_size) : undefined,
6283
- page: isSet5(object.page) ? globalThis.Number(object.page) : undefined,
6284
- includeCount: isSet5(object.includeCount) ? globalThis.Boolean(object.includeCount) : isSet5(object.include_count) ? globalThis.Boolean(object.include_count) : undefined
6608
+ role: isSet5(object.role) ? roleFromJSON(object.role) : 0,
6609
+ scope: isSet5(object.scope) ? roleScopeFromJSON(object.scope) : 0,
6610
+ organizationId: isSet5(object.organizationId) ? globalThis.String(object.organizationId) : isSet5(object.organization_id) ? globalThis.String(object.organization_id) : undefined,
6611
+ locationId: isSet5(object.locationId) ? globalThis.String(object.locationId) : isSet5(object.location_id) ? globalThis.String(object.location_id) : undefined,
6612
+ createdAt: isSet5(object.createdAt) ? fromJsonTimestamp3(object.createdAt) : isSet5(object.created_at) ? fromJsonTimestamp3(object.created_at) : undefined,
6613
+ createdBy: isSet5(object.createdBy) ? globalThis.String(object.createdBy) : isSet5(object.created_by) ? globalThis.String(object.created_by) : ""
6285
6614
  };
6286
6615
  },
6287
6616
  toJSON(message) {
6288
6617
  const obj = {};
6289
- if (message.pageSize !== undefined) {
6290
- obj.pageSize = Math.round(message.pageSize);
6618
+ if (message.role !== 0) {
6619
+ obj.role = roleToJSON(message.role);
6291
6620
  }
6292
- if (message.page !== undefined) {
6293
- obj.page = Math.round(message.page);
6621
+ if (message.scope !== 0) {
6622
+ obj.scope = roleScopeToJSON(message.scope);
6294
6623
  }
6295
- if (message.includeCount !== undefined) {
6296
- obj.includeCount = message.includeCount;
6624
+ if (message.organizationId !== undefined) {
6625
+ obj.organizationId = message.organizationId;
6626
+ }
6627
+ if (message.locationId !== undefined) {
6628
+ obj.locationId = message.locationId;
6629
+ }
6630
+ if (message.createdAt !== undefined) {
6631
+ obj.createdAt = message.createdAt.toISOString();
6632
+ }
6633
+ if (message.createdBy !== "") {
6634
+ obj.createdBy = message.createdBy;
6297
6635
  }
6298
6636
  return obj;
6299
6637
  },
6300
6638
  create(base) {
6301
- return PaginationRequest.fromPartial(base ?? {});
6639
+ return UserRole.fromPartial(base ?? {});
6302
6640
  },
6303
6641
  fromPartial(object) {
6304
- const message = createBasePaginationRequest();
6305
- message.pageSize = object.pageSize ?? undefined;
6306
- message.page = object.page ?? undefined;
6307
- message.includeCount = object.includeCount ?? undefined;
6642
+ const message = createBaseUserRole();
6643
+ message.role = object.role ?? 0;
6644
+ message.scope = object.scope ?? 0;
6645
+ message.organizationId = object.organizationId ?? undefined;
6646
+ message.locationId = object.locationId ?? undefined;
6647
+ message.createdAt = object.createdAt ?? undefined;
6648
+ message.createdBy = object.createdBy ?? "";
6308
6649
  return message;
6309
6650
  }
6310
6651
  };
6311
- function createBasePaginationResponse() {
6312
- return { pageSize: 0, page: 0, count: undefined };
6652
+ function createBaseUpdateUserRole() {
6653
+ return { role: 0, scope: 0, organizationId: undefined, locationId: undefined };
6313
6654
  }
6314
- var PaginationResponse = {
6655
+ var UpdateUserRole = {
6315
6656
  encode(message, writer = new BinaryWriter) {
6316
- if (message.pageSize !== 0) {
6317
- writer.uint32(8).int32(message.pageSize);
6657
+ if (message.role !== 0) {
6658
+ writer.uint32(8).int32(message.role);
6318
6659
  }
6319
- if (message.page !== 0) {
6320
- writer.uint32(16).int32(message.page);
6660
+ if (message.scope !== 0) {
6661
+ writer.uint32(16).int32(message.scope);
6321
6662
  }
6322
- if (message.count !== undefined) {
6323
- writer.uint32(24).int32(message.count);
6663
+ if (message.organizationId !== undefined) {
6664
+ writer.uint32(26).string(message.organizationId);
6665
+ }
6666
+ if (message.locationId !== undefined) {
6667
+ writer.uint32(34).string(message.locationId);
6324
6668
  }
6325
6669
  return writer;
6326
6670
  },
6327
6671
  decode(input, length) {
6328
6672
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6329
6673
  const end = length === undefined ? reader.len : reader.pos + length;
6330
- const message = createBasePaginationResponse();
6674
+ const message = createBaseUpdateUserRole();
6331
6675
  while (reader.pos < end) {
6332
6676
  const tag = reader.uint32();
6333
6677
  switch (tag >>> 3) {
@@ -6335,21 +6679,28 @@ var PaginationResponse = {
6335
6679
  if (tag !== 8) {
6336
6680
  break;
6337
6681
  }
6338
- message.pageSize = reader.int32();
6682
+ message.role = reader.int32();
6339
6683
  continue;
6340
6684
  }
6341
6685
  case 2: {
6342
6686
  if (tag !== 16) {
6343
6687
  break;
6344
6688
  }
6345
- message.page = reader.int32();
6689
+ message.scope = reader.int32();
6346
6690
  continue;
6347
6691
  }
6348
6692
  case 3: {
6349
- if (tag !== 24) {
6693
+ if (tag !== 26) {
6350
6694
  break;
6351
6695
  }
6352
- message.count = reader.int32();
6696
+ message.organizationId = reader.string();
6697
+ continue;
6698
+ }
6699
+ case 4: {
6700
+ if (tag !== 34) {
6701
+ break;
6702
+ }
6703
+ message.locationId = reader.string();
6353
6704
  continue;
6354
6705
  }
6355
6706
  }
@@ -6362,39 +6713,1115 @@ var PaginationResponse = {
6362
6713
  },
6363
6714
  fromJSON(object) {
6364
6715
  return {
6365
- pageSize: isSet5(object.pageSize) ? globalThis.Number(object.pageSize) : isSet5(object.page_size) ? globalThis.Number(object.page_size) : 0,
6366
- page: isSet5(object.page) ? globalThis.Number(object.page) : 0,
6367
- count: isSet5(object.count) ? globalThis.Number(object.count) : undefined
6716
+ role: isSet5(object.role) ? roleFromJSON(object.role) : 0,
6717
+ scope: isSet5(object.scope) ? roleScopeFromJSON(object.scope) : 0,
6718
+ organizationId: isSet5(object.organizationId) ? globalThis.String(object.organizationId) : isSet5(object.organization_id) ? globalThis.String(object.organization_id) : undefined,
6719
+ locationId: isSet5(object.locationId) ? globalThis.String(object.locationId) : isSet5(object.location_id) ? globalThis.String(object.location_id) : undefined
6368
6720
  };
6369
6721
  },
6370
6722
  toJSON(message) {
6371
6723
  const obj = {};
6372
- if (message.pageSize !== 0) {
6373
- obj.pageSize = Math.round(message.pageSize);
6724
+ if (message.role !== 0) {
6725
+ obj.role = roleToJSON(message.role);
6374
6726
  }
6375
- if (message.page !== 0) {
6376
- obj.page = Math.round(message.page);
6727
+ if (message.scope !== 0) {
6728
+ obj.scope = roleScopeToJSON(message.scope);
6377
6729
  }
6378
- if (message.count !== undefined) {
6379
- obj.count = Math.round(message.count);
6730
+ if (message.organizationId !== undefined) {
6731
+ obj.organizationId = message.organizationId;
6732
+ }
6733
+ if (message.locationId !== undefined) {
6734
+ obj.locationId = message.locationId;
6735
+ }
6736
+ return obj;
6737
+ },
6738
+ create(base) {
6739
+ return UpdateUserRole.fromPartial(base ?? {});
6740
+ },
6741
+ fromPartial(object) {
6742
+ const message = createBaseUpdateUserRole();
6743
+ message.role = object.role ?? 0;
6744
+ message.scope = object.scope ?? 0;
6745
+ message.organizationId = object.organizationId ?? undefined;
6746
+ message.locationId = object.locationId ?? undefined;
6747
+ return message;
6748
+ }
6749
+ };
6750
+ function createBaseListUsersRequest() {
6751
+ return { pagination: undefined, search: undefined, roles: [], organizationId: undefined };
6752
+ }
6753
+ var ListUsersRequest = {
6754
+ encode(message, writer = new BinaryWriter) {
6755
+ if (message.pagination !== undefined) {
6756
+ PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
6757
+ }
6758
+ if (message.search !== undefined) {
6759
+ writer.uint32(18).string(message.search);
6760
+ }
6761
+ writer.uint32(26).fork();
6762
+ for (const v of message.roles) {
6763
+ writer.int32(v);
6764
+ }
6765
+ writer.join();
6766
+ if (message.organizationId !== undefined) {
6767
+ writer.uint32(34).string(message.organizationId);
6768
+ }
6769
+ return writer;
6770
+ },
6771
+ decode(input, length) {
6772
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6773
+ const end = length === undefined ? reader.len : reader.pos + length;
6774
+ const message = createBaseListUsersRequest();
6775
+ while (reader.pos < end) {
6776
+ const tag = reader.uint32();
6777
+ switch (tag >>> 3) {
6778
+ case 1: {
6779
+ if (tag !== 10) {
6780
+ break;
6781
+ }
6782
+ message.pagination = PaginationRequest.decode(reader, reader.uint32());
6783
+ continue;
6784
+ }
6785
+ case 2: {
6786
+ if (tag !== 18) {
6787
+ break;
6788
+ }
6789
+ message.search = reader.string();
6790
+ continue;
6791
+ }
6792
+ case 3: {
6793
+ if (tag === 24) {
6794
+ message.roles.push(reader.int32());
6795
+ continue;
6796
+ }
6797
+ if (tag === 26) {
6798
+ const end2 = reader.uint32() + reader.pos;
6799
+ while (reader.pos < end2) {
6800
+ message.roles.push(reader.int32());
6801
+ }
6802
+ continue;
6803
+ }
6804
+ break;
6805
+ }
6806
+ case 4: {
6807
+ if (tag !== 34) {
6808
+ break;
6809
+ }
6810
+ message.organizationId = reader.string();
6811
+ continue;
6812
+ }
6813
+ }
6814
+ if ((tag & 7) === 4 || tag === 0) {
6815
+ break;
6816
+ }
6817
+ reader.skip(tag & 7);
6818
+ }
6819
+ return message;
6820
+ },
6821
+ fromJSON(object) {
6822
+ return {
6823
+ pagination: isSet5(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
6824
+ search: isSet5(object.search) ? globalThis.String(object.search) : undefined,
6825
+ roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => roleFromJSON(e)) : [],
6826
+ organizationId: isSet5(object.organizationId) ? globalThis.String(object.organizationId) : isSet5(object.organization_id) ? globalThis.String(object.organization_id) : undefined
6827
+ };
6828
+ },
6829
+ toJSON(message) {
6830
+ const obj = {};
6831
+ if (message.pagination !== undefined) {
6832
+ obj.pagination = PaginationRequest.toJSON(message.pagination);
6833
+ }
6834
+ if (message.search !== undefined) {
6835
+ obj.search = message.search;
6836
+ }
6837
+ if (message.roles?.length) {
6838
+ obj.roles = message.roles.map((e) => roleToJSON(e));
6839
+ }
6840
+ if (message.organizationId !== undefined) {
6841
+ obj.organizationId = message.organizationId;
6842
+ }
6843
+ return obj;
6844
+ },
6845
+ create(base) {
6846
+ return ListUsersRequest.fromPartial(base ?? {});
6847
+ },
6848
+ fromPartial(object) {
6849
+ const message = createBaseListUsersRequest();
6850
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PaginationRequest.fromPartial(object.pagination) : undefined;
6851
+ message.search = object.search ?? undefined;
6852
+ message.roles = object.roles?.map((e) => e) || [];
6853
+ message.organizationId = object.organizationId ?? undefined;
6854
+ return message;
6855
+ }
6856
+ };
6857
+ function createBaseListUsersResponse() {
6858
+ return { pagination: undefined, users: [] };
6859
+ }
6860
+ var ListUsersResponse = {
6861
+ encode(message, writer = new BinaryWriter) {
6862
+ if (message.pagination !== undefined) {
6863
+ PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
6864
+ }
6865
+ for (const v of message.users) {
6866
+ User.encode(v, writer.uint32(18).fork()).join();
6867
+ }
6868
+ return writer;
6869
+ },
6870
+ decode(input, length) {
6871
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6872
+ const end = length === undefined ? reader.len : reader.pos + length;
6873
+ const message = createBaseListUsersResponse();
6874
+ while (reader.pos < end) {
6875
+ const tag = reader.uint32();
6876
+ switch (tag >>> 3) {
6877
+ case 1: {
6878
+ if (tag !== 10) {
6879
+ break;
6880
+ }
6881
+ message.pagination = PaginationResponse.decode(reader, reader.uint32());
6882
+ continue;
6883
+ }
6884
+ case 2: {
6885
+ if (tag !== 18) {
6886
+ break;
6887
+ }
6888
+ message.users.push(User.decode(reader, reader.uint32()));
6889
+ continue;
6890
+ }
6891
+ }
6892
+ if ((tag & 7) === 4 || tag === 0) {
6893
+ break;
6894
+ }
6895
+ reader.skip(tag & 7);
6896
+ }
6897
+ return message;
6898
+ },
6899
+ fromJSON(object) {
6900
+ return {
6901
+ pagination: isSet5(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
6902
+ users: globalThis.Array.isArray(object?.users) ? object.users.map((e) => User.fromJSON(e)) : []
6903
+ };
6904
+ },
6905
+ toJSON(message) {
6906
+ const obj = {};
6907
+ if (message.pagination !== undefined) {
6908
+ obj.pagination = PaginationResponse.toJSON(message.pagination);
6909
+ }
6910
+ if (message.users?.length) {
6911
+ obj.users = message.users.map((e) => User.toJSON(e));
6912
+ }
6913
+ return obj;
6914
+ },
6915
+ create(base) {
6916
+ return ListUsersResponse.fromPartial(base ?? {});
6917
+ },
6918
+ fromPartial(object) {
6919
+ const message = createBaseListUsersResponse();
6920
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PaginationResponse.fromPartial(object.pagination) : undefined;
6921
+ message.users = object.users?.map((e) => User.fromPartial(e)) || [];
6922
+ return message;
6923
+ }
6924
+ };
6925
+ function createBaseSyncAuthUserRequest() {
6926
+ return {
6927
+ userId: "",
6928
+ email: undefined,
6929
+ givenName: undefined,
6930
+ familyName: undefined,
6931
+ telephone: undefined,
6932
+ image: undefined
6933
+ };
6934
+ }
6935
+ var SyncAuthUserRequest = {
6936
+ encode(message, writer = new BinaryWriter) {
6937
+ if (message.userId !== "") {
6938
+ writer.uint32(10).string(message.userId);
6939
+ }
6940
+ if (message.email !== undefined) {
6941
+ writer.uint32(18).string(message.email);
6942
+ }
6943
+ if (message.givenName !== undefined) {
6944
+ writer.uint32(26).string(message.givenName);
6945
+ }
6946
+ if (message.familyName !== undefined) {
6947
+ writer.uint32(34).string(message.familyName);
6948
+ }
6949
+ if (message.telephone !== undefined) {
6950
+ writer.uint32(42).string(message.telephone);
6951
+ }
6952
+ if (message.image !== undefined) {
6953
+ writer.uint32(50).string(message.image);
6954
+ }
6955
+ return writer;
6956
+ },
6957
+ decode(input, length) {
6958
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6959
+ const end = length === undefined ? reader.len : reader.pos + length;
6960
+ const message = createBaseSyncAuthUserRequest();
6961
+ while (reader.pos < end) {
6962
+ const tag = reader.uint32();
6963
+ switch (tag >>> 3) {
6964
+ case 1: {
6965
+ if (tag !== 10) {
6966
+ break;
6967
+ }
6968
+ message.userId = reader.string();
6969
+ continue;
6970
+ }
6971
+ case 2: {
6972
+ if (tag !== 18) {
6973
+ break;
6974
+ }
6975
+ message.email = reader.string();
6976
+ continue;
6977
+ }
6978
+ case 3: {
6979
+ if (tag !== 26) {
6980
+ break;
6981
+ }
6982
+ message.givenName = reader.string();
6983
+ continue;
6984
+ }
6985
+ case 4: {
6986
+ if (tag !== 34) {
6987
+ break;
6988
+ }
6989
+ message.familyName = reader.string();
6990
+ continue;
6991
+ }
6992
+ case 5: {
6993
+ if (tag !== 42) {
6994
+ break;
6995
+ }
6996
+ message.telephone = reader.string();
6997
+ continue;
6998
+ }
6999
+ case 6: {
7000
+ if (tag !== 50) {
7001
+ break;
7002
+ }
7003
+ message.image = reader.string();
7004
+ continue;
7005
+ }
7006
+ }
7007
+ if ((tag & 7) === 4 || tag === 0) {
7008
+ break;
7009
+ }
7010
+ reader.skip(tag & 7);
7011
+ }
7012
+ return message;
7013
+ },
7014
+ fromJSON(object) {
7015
+ return {
7016
+ userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : "",
7017
+ email: isSet5(object.email) ? globalThis.String(object.email) : undefined,
7018
+ givenName: isSet5(object.givenName) ? globalThis.String(object.givenName) : isSet5(object.given_name) ? globalThis.String(object.given_name) : undefined,
7019
+ familyName: isSet5(object.familyName) ? globalThis.String(object.familyName) : isSet5(object.family_name) ? globalThis.String(object.family_name) : undefined,
7020
+ telephone: isSet5(object.telephone) ? globalThis.String(object.telephone) : undefined,
7021
+ image: isSet5(object.image) ? globalThis.String(object.image) : undefined
7022
+ };
7023
+ },
7024
+ toJSON(message) {
7025
+ const obj = {};
7026
+ if (message.userId !== "") {
7027
+ obj.userId = message.userId;
7028
+ }
7029
+ if (message.email !== undefined) {
7030
+ obj.email = message.email;
7031
+ }
7032
+ if (message.givenName !== undefined) {
7033
+ obj.givenName = message.givenName;
7034
+ }
7035
+ if (message.familyName !== undefined) {
7036
+ obj.familyName = message.familyName;
7037
+ }
7038
+ if (message.telephone !== undefined) {
7039
+ obj.telephone = message.telephone;
7040
+ }
7041
+ if (message.image !== undefined) {
7042
+ obj.image = message.image;
7043
+ }
7044
+ return obj;
7045
+ },
7046
+ create(base) {
7047
+ return SyncAuthUserRequest.fromPartial(base ?? {});
7048
+ },
7049
+ fromPartial(object) {
7050
+ const message = createBaseSyncAuthUserRequest();
7051
+ message.userId = object.userId ?? "";
7052
+ message.email = object.email ?? undefined;
7053
+ message.givenName = object.givenName ?? undefined;
7054
+ message.familyName = object.familyName ?? undefined;
7055
+ message.telephone = object.telephone ?? undefined;
7056
+ message.image = object.image ?? undefined;
7057
+ return message;
7058
+ }
7059
+ };
7060
+ function createBaseSyncAuthUserResponse() {
7061
+ return { user: undefined };
7062
+ }
7063
+ var SyncAuthUserResponse = {
7064
+ encode(message, writer = new BinaryWriter) {
7065
+ if (message.user !== undefined) {
7066
+ User.encode(message.user, writer.uint32(10).fork()).join();
7067
+ }
7068
+ return writer;
7069
+ },
7070
+ decode(input, length) {
7071
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7072
+ const end = length === undefined ? reader.len : reader.pos + length;
7073
+ const message = createBaseSyncAuthUserResponse();
7074
+ while (reader.pos < end) {
7075
+ const tag = reader.uint32();
7076
+ switch (tag >>> 3) {
7077
+ case 1: {
7078
+ if (tag !== 10) {
7079
+ break;
7080
+ }
7081
+ message.user = User.decode(reader, reader.uint32());
7082
+ continue;
7083
+ }
7084
+ }
7085
+ if ((tag & 7) === 4 || tag === 0) {
7086
+ break;
7087
+ }
7088
+ reader.skip(tag & 7);
7089
+ }
7090
+ return message;
7091
+ },
7092
+ fromJSON(object) {
7093
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
7094
+ },
7095
+ toJSON(message) {
7096
+ const obj = {};
7097
+ if (message.user !== undefined) {
7098
+ obj.user = User.toJSON(message.user);
7099
+ }
7100
+ return obj;
7101
+ },
7102
+ create(base) {
7103
+ return SyncAuthUserResponse.fromPartial(base ?? {});
7104
+ },
7105
+ fromPartial(object) {
7106
+ const message = createBaseSyncAuthUserResponse();
7107
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
7108
+ return message;
7109
+ }
7110
+ };
7111
+ function createBaseUpdateUserRequest() {
7112
+ return {
7113
+ userId: "",
7114
+ email: undefined,
7115
+ givenName: undefined,
7116
+ familyName: undefined,
7117
+ telephone: undefined,
7118
+ image: undefined,
7119
+ address: undefined,
7120
+ connecteamId: undefined,
7121
+ talentLmsId: undefined
7122
+ };
7123
+ }
7124
+ var UpdateUserRequest = {
7125
+ encode(message, writer = new BinaryWriter) {
7126
+ if (message.userId !== "") {
7127
+ writer.uint32(10).string(message.userId);
7128
+ }
7129
+ if (message.email !== undefined) {
7130
+ writer.uint32(18).string(message.email);
7131
+ }
7132
+ if (message.givenName !== undefined) {
7133
+ writer.uint32(26).string(message.givenName);
7134
+ }
7135
+ if (message.familyName !== undefined) {
7136
+ writer.uint32(34).string(message.familyName);
7137
+ }
7138
+ if (message.telephone !== undefined) {
7139
+ writer.uint32(42).string(message.telephone);
7140
+ }
7141
+ if (message.image !== undefined) {
7142
+ writer.uint32(50).string(message.image);
7143
+ }
7144
+ if (message.address !== undefined) {
7145
+ Address.encode(message.address, writer.uint32(58).fork()).join();
7146
+ }
7147
+ if (message.connecteamId !== undefined) {
7148
+ writer.uint32(64).int32(message.connecteamId);
7149
+ }
7150
+ if (message.talentLmsId !== undefined) {
7151
+ writer.uint32(72).int32(message.talentLmsId);
7152
+ }
7153
+ return writer;
7154
+ },
7155
+ decode(input, length) {
7156
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7157
+ const end = length === undefined ? reader.len : reader.pos + length;
7158
+ const message = createBaseUpdateUserRequest();
7159
+ while (reader.pos < end) {
7160
+ const tag = reader.uint32();
7161
+ switch (tag >>> 3) {
7162
+ case 1: {
7163
+ if (tag !== 10) {
7164
+ break;
7165
+ }
7166
+ message.userId = reader.string();
7167
+ continue;
7168
+ }
7169
+ case 2: {
7170
+ if (tag !== 18) {
7171
+ break;
7172
+ }
7173
+ message.email = reader.string();
7174
+ continue;
7175
+ }
7176
+ case 3: {
7177
+ if (tag !== 26) {
7178
+ break;
7179
+ }
7180
+ message.givenName = reader.string();
7181
+ continue;
7182
+ }
7183
+ case 4: {
7184
+ if (tag !== 34) {
7185
+ break;
7186
+ }
7187
+ message.familyName = reader.string();
7188
+ continue;
7189
+ }
7190
+ case 5: {
7191
+ if (tag !== 42) {
7192
+ break;
7193
+ }
7194
+ message.telephone = reader.string();
7195
+ continue;
7196
+ }
7197
+ case 6: {
7198
+ if (tag !== 50) {
7199
+ break;
7200
+ }
7201
+ message.image = reader.string();
7202
+ continue;
7203
+ }
7204
+ case 7: {
7205
+ if (tag !== 58) {
7206
+ break;
7207
+ }
7208
+ message.address = Address.decode(reader, reader.uint32());
7209
+ continue;
7210
+ }
7211
+ case 8: {
7212
+ if (tag !== 64) {
7213
+ break;
7214
+ }
7215
+ message.connecteamId = reader.int32();
7216
+ continue;
7217
+ }
7218
+ case 9: {
7219
+ if (tag !== 72) {
7220
+ break;
7221
+ }
7222
+ message.talentLmsId = reader.int32();
7223
+ continue;
7224
+ }
7225
+ }
7226
+ if ((tag & 7) === 4 || tag === 0) {
7227
+ break;
7228
+ }
7229
+ reader.skip(tag & 7);
7230
+ }
7231
+ return message;
7232
+ },
7233
+ fromJSON(object) {
7234
+ return {
7235
+ userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : "",
7236
+ email: isSet5(object.email) ? globalThis.String(object.email) : undefined,
7237
+ givenName: isSet5(object.givenName) ? globalThis.String(object.givenName) : isSet5(object.given_name) ? globalThis.String(object.given_name) : undefined,
7238
+ familyName: isSet5(object.familyName) ? globalThis.String(object.familyName) : isSet5(object.family_name) ? globalThis.String(object.family_name) : undefined,
7239
+ telephone: isSet5(object.telephone) ? globalThis.String(object.telephone) : undefined,
7240
+ image: isSet5(object.image) ? globalThis.String(object.image) : undefined,
7241
+ address: isSet5(object.address) ? Address.fromJSON(object.address) : undefined,
7242
+ connecteamId: isSet5(object.connecteamId) ? globalThis.Number(object.connecteamId) : isSet5(object.connecteam_id) ? globalThis.Number(object.connecteam_id) : undefined,
7243
+ talentLmsId: isSet5(object.talentLmsId) ? globalThis.Number(object.talentLmsId) : isSet5(object.talent_lms_id) ? globalThis.Number(object.talent_lms_id) : undefined
7244
+ };
7245
+ },
7246
+ toJSON(message) {
7247
+ const obj = {};
7248
+ if (message.userId !== "") {
7249
+ obj.userId = message.userId;
7250
+ }
7251
+ if (message.email !== undefined) {
7252
+ obj.email = message.email;
7253
+ }
7254
+ if (message.givenName !== undefined) {
7255
+ obj.givenName = message.givenName;
7256
+ }
7257
+ if (message.familyName !== undefined) {
7258
+ obj.familyName = message.familyName;
7259
+ }
7260
+ if (message.telephone !== undefined) {
7261
+ obj.telephone = message.telephone;
7262
+ }
7263
+ if (message.image !== undefined) {
7264
+ obj.image = message.image;
7265
+ }
7266
+ if (message.address !== undefined) {
7267
+ obj.address = Address.toJSON(message.address);
7268
+ }
7269
+ if (message.connecteamId !== undefined) {
7270
+ obj.connecteamId = Math.round(message.connecteamId);
7271
+ }
7272
+ if (message.talentLmsId !== undefined) {
7273
+ obj.talentLmsId = Math.round(message.talentLmsId);
7274
+ }
7275
+ return obj;
7276
+ },
7277
+ create(base) {
7278
+ return UpdateUserRequest.fromPartial(base ?? {});
7279
+ },
7280
+ fromPartial(object) {
7281
+ const message = createBaseUpdateUserRequest();
7282
+ message.userId = object.userId ?? "";
7283
+ message.email = object.email ?? undefined;
7284
+ message.givenName = object.givenName ?? undefined;
7285
+ message.familyName = object.familyName ?? undefined;
7286
+ message.telephone = object.telephone ?? undefined;
7287
+ message.image = object.image ?? undefined;
7288
+ message.address = object.address !== undefined && object.address !== null ? Address.fromPartial(object.address) : undefined;
7289
+ message.connecteamId = object.connecteamId ?? undefined;
7290
+ message.talentLmsId = object.talentLmsId ?? undefined;
7291
+ return message;
7292
+ }
7293
+ };
7294
+ function createBaseUpdateUserResponse() {
7295
+ return { user: undefined };
7296
+ }
7297
+ var UpdateUserResponse = {
7298
+ encode(message, writer = new BinaryWriter) {
7299
+ if (message.user !== undefined) {
7300
+ User.encode(message.user, writer.uint32(10).fork()).join();
7301
+ }
7302
+ return writer;
7303
+ },
7304
+ decode(input, length) {
7305
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7306
+ const end = length === undefined ? reader.len : reader.pos + length;
7307
+ const message = createBaseUpdateUserResponse();
7308
+ while (reader.pos < end) {
7309
+ const tag = reader.uint32();
7310
+ switch (tag >>> 3) {
7311
+ case 1: {
7312
+ if (tag !== 10) {
7313
+ break;
7314
+ }
7315
+ message.user = User.decode(reader, reader.uint32());
7316
+ continue;
7317
+ }
7318
+ }
7319
+ if ((tag & 7) === 4 || tag === 0) {
7320
+ break;
7321
+ }
7322
+ reader.skip(tag & 7);
7323
+ }
7324
+ return message;
7325
+ },
7326
+ fromJSON(object) {
7327
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
7328
+ },
7329
+ toJSON(message) {
7330
+ const obj = {};
7331
+ if (message.user !== undefined) {
7332
+ obj.user = User.toJSON(message.user);
7333
+ }
7334
+ return obj;
7335
+ },
7336
+ create(base) {
7337
+ return UpdateUserResponse.fromPartial(base ?? {});
7338
+ },
7339
+ fromPartial(object) {
7340
+ const message = createBaseUpdateUserResponse();
7341
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
7342
+ return message;
7343
+ }
7344
+ };
7345
+ function createBaseUpdateUserStripeRequest() {
7346
+ return { userId: "", stripeAccountId: undefined, stripeDetailsSubmitted: undefined, stripePayoutsEnabled: undefined };
7347
+ }
7348
+ var UpdateUserStripeRequest = {
7349
+ encode(message, writer = new BinaryWriter) {
7350
+ if (message.userId !== "") {
7351
+ writer.uint32(10).string(message.userId);
7352
+ }
7353
+ if (message.stripeAccountId !== undefined) {
7354
+ writer.uint32(18).string(message.stripeAccountId);
7355
+ }
7356
+ if (message.stripeDetailsSubmitted !== undefined) {
7357
+ writer.uint32(24).bool(message.stripeDetailsSubmitted);
7358
+ }
7359
+ if (message.stripePayoutsEnabled !== undefined) {
7360
+ writer.uint32(32).bool(message.stripePayoutsEnabled);
7361
+ }
7362
+ return writer;
7363
+ },
7364
+ decode(input, length) {
7365
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7366
+ const end = length === undefined ? reader.len : reader.pos + length;
7367
+ const message = createBaseUpdateUserStripeRequest();
7368
+ while (reader.pos < end) {
7369
+ const tag = reader.uint32();
7370
+ switch (tag >>> 3) {
7371
+ case 1: {
7372
+ if (tag !== 10) {
7373
+ break;
7374
+ }
7375
+ message.userId = reader.string();
7376
+ continue;
7377
+ }
7378
+ case 2: {
7379
+ if (tag !== 18) {
7380
+ break;
7381
+ }
7382
+ message.stripeAccountId = reader.string();
7383
+ continue;
7384
+ }
7385
+ case 3: {
7386
+ if (tag !== 24) {
7387
+ break;
7388
+ }
7389
+ message.stripeDetailsSubmitted = reader.bool();
7390
+ continue;
7391
+ }
7392
+ case 4: {
7393
+ if (tag !== 32) {
7394
+ break;
7395
+ }
7396
+ message.stripePayoutsEnabled = reader.bool();
7397
+ continue;
7398
+ }
7399
+ }
7400
+ if ((tag & 7) === 4 || tag === 0) {
7401
+ break;
7402
+ }
7403
+ reader.skip(tag & 7);
7404
+ }
7405
+ return message;
7406
+ },
7407
+ fromJSON(object) {
7408
+ return {
7409
+ userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : "",
7410
+ stripeAccountId: isSet5(object.stripeAccountId) ? globalThis.String(object.stripeAccountId) : isSet5(object.stripe_account_id) ? globalThis.String(object.stripe_account_id) : undefined,
7411
+ stripeDetailsSubmitted: isSet5(object.stripeDetailsSubmitted) ? globalThis.Boolean(object.stripeDetailsSubmitted) : isSet5(object.stripe_details_submitted) ? globalThis.Boolean(object.stripe_details_submitted) : undefined,
7412
+ stripePayoutsEnabled: isSet5(object.stripePayoutsEnabled) ? globalThis.Boolean(object.stripePayoutsEnabled) : isSet5(object.stripe_payouts_enabled) ? globalThis.Boolean(object.stripe_payouts_enabled) : undefined
7413
+ };
7414
+ },
7415
+ toJSON(message) {
7416
+ const obj = {};
7417
+ if (message.userId !== "") {
7418
+ obj.userId = message.userId;
7419
+ }
7420
+ if (message.stripeAccountId !== undefined) {
7421
+ obj.stripeAccountId = message.stripeAccountId;
7422
+ }
7423
+ if (message.stripeDetailsSubmitted !== undefined) {
7424
+ obj.stripeDetailsSubmitted = message.stripeDetailsSubmitted;
7425
+ }
7426
+ if (message.stripePayoutsEnabled !== undefined) {
7427
+ obj.stripePayoutsEnabled = message.stripePayoutsEnabled;
7428
+ }
7429
+ return obj;
7430
+ },
7431
+ create(base) {
7432
+ return UpdateUserStripeRequest.fromPartial(base ?? {});
7433
+ },
7434
+ fromPartial(object) {
7435
+ const message = createBaseUpdateUserStripeRequest();
7436
+ message.userId = object.userId ?? "";
7437
+ message.stripeAccountId = object.stripeAccountId ?? undefined;
7438
+ message.stripeDetailsSubmitted = object.stripeDetailsSubmitted ?? undefined;
7439
+ message.stripePayoutsEnabled = object.stripePayoutsEnabled ?? undefined;
7440
+ return message;
7441
+ }
7442
+ };
7443
+ function createBaseUpdateUserStripeResponse() {
7444
+ return { user: undefined };
7445
+ }
7446
+ var UpdateUserStripeResponse = {
7447
+ encode(message, writer = new BinaryWriter) {
7448
+ if (message.user !== undefined) {
7449
+ User.encode(message.user, writer.uint32(10).fork()).join();
7450
+ }
7451
+ return writer;
7452
+ },
7453
+ decode(input, length) {
7454
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7455
+ const end = length === undefined ? reader.len : reader.pos + length;
7456
+ const message = createBaseUpdateUserStripeResponse();
7457
+ while (reader.pos < end) {
7458
+ const tag = reader.uint32();
7459
+ switch (tag >>> 3) {
7460
+ case 1: {
7461
+ if (tag !== 10) {
7462
+ break;
7463
+ }
7464
+ message.user = User.decode(reader, reader.uint32());
7465
+ continue;
7466
+ }
7467
+ }
7468
+ if ((tag & 7) === 4 || tag === 0) {
7469
+ break;
7470
+ }
7471
+ reader.skip(tag & 7);
7472
+ }
7473
+ return message;
7474
+ },
7475
+ fromJSON(object) {
7476
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
7477
+ },
7478
+ toJSON(message) {
7479
+ const obj = {};
7480
+ if (message.user !== undefined) {
7481
+ obj.user = User.toJSON(message.user);
7482
+ }
7483
+ return obj;
7484
+ },
7485
+ create(base) {
7486
+ return UpdateUserStripeResponse.fromPartial(base ?? {});
7487
+ },
7488
+ fromPartial(object) {
7489
+ const message = createBaseUpdateUserStripeResponse();
7490
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
7491
+ return message;
7492
+ }
7493
+ };
7494
+ function createBaseUpdateUserRolesRequest() {
7495
+ return { userId: "", roles: [] };
7496
+ }
7497
+ var UpdateUserRolesRequest = {
7498
+ encode(message, writer = new BinaryWriter) {
7499
+ if (message.userId !== "") {
7500
+ writer.uint32(10).string(message.userId);
7501
+ }
7502
+ for (const v of message.roles) {
7503
+ UpdateUserRole.encode(v, writer.uint32(18).fork()).join();
7504
+ }
7505
+ return writer;
7506
+ },
7507
+ decode(input, length) {
7508
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7509
+ const end = length === undefined ? reader.len : reader.pos + length;
7510
+ const message = createBaseUpdateUserRolesRequest();
7511
+ while (reader.pos < end) {
7512
+ const tag = reader.uint32();
7513
+ switch (tag >>> 3) {
7514
+ case 1: {
7515
+ if (tag !== 10) {
7516
+ break;
7517
+ }
7518
+ message.userId = reader.string();
7519
+ continue;
7520
+ }
7521
+ case 2: {
7522
+ if (tag !== 18) {
7523
+ break;
7524
+ }
7525
+ message.roles.push(UpdateUserRole.decode(reader, reader.uint32()));
7526
+ continue;
7527
+ }
7528
+ }
7529
+ if ((tag & 7) === 4 || tag === 0) {
7530
+ break;
7531
+ }
7532
+ reader.skip(tag & 7);
7533
+ }
7534
+ return message;
7535
+ },
7536
+ fromJSON(object) {
7537
+ return {
7538
+ userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : "",
7539
+ roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => UpdateUserRole.fromJSON(e)) : []
7540
+ };
7541
+ },
7542
+ toJSON(message) {
7543
+ const obj = {};
7544
+ if (message.userId !== "") {
7545
+ obj.userId = message.userId;
7546
+ }
7547
+ if (message.roles?.length) {
7548
+ obj.roles = message.roles.map((e) => UpdateUserRole.toJSON(e));
6380
7549
  }
6381
7550
  return obj;
6382
7551
  },
6383
7552
  create(base) {
6384
- return PaginationResponse.fromPartial(base ?? {});
7553
+ return UpdateUserRolesRequest.fromPartial(base ?? {});
6385
7554
  },
6386
7555
  fromPartial(object) {
6387
- const message = createBasePaginationResponse();
6388
- message.pageSize = object.pageSize ?? 0;
6389
- message.page = object.page ?? 0;
6390
- message.count = object.count ?? undefined;
7556
+ const message = createBaseUpdateUserRolesRequest();
7557
+ message.userId = object.userId ?? "";
7558
+ message.roles = object.roles?.map((e) => UpdateUserRole.fromPartial(e)) || [];
7559
+ return message;
7560
+ }
7561
+ };
7562
+ function createBaseUpdateUserRolesResponse() {
7563
+ return { user: undefined };
7564
+ }
7565
+ var UpdateUserRolesResponse = {
7566
+ encode(message, writer = new BinaryWriter) {
7567
+ if (message.user !== undefined) {
7568
+ User.encode(message.user, writer.uint32(10).fork()).join();
7569
+ }
7570
+ return writer;
7571
+ },
7572
+ decode(input, length) {
7573
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7574
+ const end = length === undefined ? reader.len : reader.pos + length;
7575
+ const message = createBaseUpdateUserRolesResponse();
7576
+ while (reader.pos < end) {
7577
+ const tag = reader.uint32();
7578
+ switch (tag >>> 3) {
7579
+ case 1: {
7580
+ if (tag !== 10) {
7581
+ break;
7582
+ }
7583
+ message.user = User.decode(reader, reader.uint32());
7584
+ continue;
7585
+ }
7586
+ }
7587
+ if ((tag & 7) === 4 || tag === 0) {
7588
+ break;
7589
+ }
7590
+ reader.skip(tag & 7);
7591
+ }
7592
+ return message;
7593
+ },
7594
+ fromJSON(object) {
7595
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
7596
+ },
7597
+ toJSON(message) {
7598
+ const obj = {};
7599
+ if (message.user !== undefined) {
7600
+ obj.user = User.toJSON(message.user);
7601
+ }
7602
+ return obj;
7603
+ },
7604
+ create(base) {
7605
+ return UpdateUserRolesResponse.fromPartial(base ?? {});
7606
+ },
7607
+ fromPartial(object) {
7608
+ const message = createBaseUpdateUserRolesResponse();
7609
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
7610
+ return message;
7611
+ }
7612
+ };
7613
+ function createBaseReinstateUserRequest() {
7614
+ return { userId: "" };
7615
+ }
7616
+ var ReinstateUserRequest = {
7617
+ encode(message, writer = new BinaryWriter) {
7618
+ if (message.userId !== "") {
7619
+ writer.uint32(10).string(message.userId);
7620
+ }
7621
+ return writer;
7622
+ },
7623
+ decode(input, length) {
7624
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7625
+ const end = length === undefined ? reader.len : reader.pos + length;
7626
+ const message = createBaseReinstateUserRequest();
7627
+ while (reader.pos < end) {
7628
+ const tag = reader.uint32();
7629
+ switch (tag >>> 3) {
7630
+ case 1: {
7631
+ if (tag !== 10) {
7632
+ break;
7633
+ }
7634
+ message.userId = reader.string();
7635
+ continue;
7636
+ }
7637
+ }
7638
+ if ((tag & 7) === 4 || tag === 0) {
7639
+ break;
7640
+ }
7641
+ reader.skip(tag & 7);
7642
+ }
7643
+ return message;
7644
+ },
7645
+ fromJSON(object) {
7646
+ return {
7647
+ userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : ""
7648
+ };
7649
+ },
7650
+ toJSON(message) {
7651
+ const obj = {};
7652
+ if (message.userId !== "") {
7653
+ obj.userId = message.userId;
7654
+ }
7655
+ return obj;
7656
+ },
7657
+ create(base) {
7658
+ return ReinstateUserRequest.fromPartial(base ?? {});
7659
+ },
7660
+ fromPartial(object) {
7661
+ const message = createBaseReinstateUserRequest();
7662
+ message.userId = object.userId ?? "";
7663
+ return message;
7664
+ }
7665
+ };
7666
+ function createBaseReinstateUserResponse() {
7667
+ return { user: undefined };
7668
+ }
7669
+ var ReinstateUserResponse = {
7670
+ encode(message, writer = new BinaryWriter) {
7671
+ if (message.user !== undefined) {
7672
+ User.encode(message.user, writer.uint32(10).fork()).join();
7673
+ }
7674
+ return writer;
7675
+ },
7676
+ decode(input, length) {
7677
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7678
+ const end = length === undefined ? reader.len : reader.pos + length;
7679
+ const message = createBaseReinstateUserResponse();
7680
+ while (reader.pos < end) {
7681
+ const tag = reader.uint32();
7682
+ switch (tag >>> 3) {
7683
+ case 1: {
7684
+ if (tag !== 10) {
7685
+ break;
7686
+ }
7687
+ message.user = User.decode(reader, reader.uint32());
7688
+ continue;
7689
+ }
7690
+ }
7691
+ if ((tag & 7) === 4 || tag === 0) {
7692
+ break;
7693
+ }
7694
+ reader.skip(tag & 7);
7695
+ }
7696
+ return message;
7697
+ },
7698
+ fromJSON(object) {
7699
+ return { user: isSet5(object.user) ? User.fromJSON(object.user) : undefined };
7700
+ },
7701
+ toJSON(message) {
7702
+ const obj = {};
7703
+ if (message.user !== undefined) {
7704
+ obj.user = User.toJSON(message.user);
7705
+ }
7706
+ return obj;
7707
+ },
7708
+ create(base) {
7709
+ return ReinstateUserResponse.fromPartial(base ?? {});
7710
+ },
7711
+ fromPartial(object) {
7712
+ const message = createBaseReinstateUserResponse();
7713
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
6391
7714
  return message;
6392
7715
  }
6393
7716
  };
7717
+ var UsersServiceDefinition = {
7718
+ name: "UsersService",
7719
+ fullName: "zenu.users.v1.UsersService",
7720
+ methods: {
7721
+ sayHello: {
7722
+ name: "SayHello",
7723
+ requestType: SayHelloRequest,
7724
+ requestStream: false,
7725
+ responseType: SayHelloResponse,
7726
+ responseStream: false,
7727
+ options: {}
7728
+ },
7729
+ whoAmI: {
7730
+ name: "WhoAmI",
7731
+ requestType: WhoAmIRequest,
7732
+ requestStream: false,
7733
+ responseType: WhoAmIResponse,
7734
+ responseStream: false,
7735
+ options: {}
7736
+ },
7737
+ getUser: {
7738
+ name: "GetUser",
7739
+ requestType: GetUserRequest,
7740
+ requestStream: false,
7741
+ responseType: GetUserResponse,
7742
+ responseStream: false,
7743
+ options: {}
7744
+ },
7745
+ getUsers: {
7746
+ name: "GetUsers",
7747
+ requestType: GetUsersRequest,
7748
+ requestStream: false,
7749
+ responseType: GetUsersResponse,
7750
+ responseStream: false,
7751
+ options: {}
7752
+ },
7753
+ listUsers: {
7754
+ name: "ListUsers",
7755
+ requestType: ListUsersRequest,
7756
+ requestStream: false,
7757
+ responseType: ListUsersResponse,
7758
+ responseStream: false,
7759
+ options: {}
7760
+ },
7761
+ syncAuthUser: {
7762
+ name: "SyncAuthUser",
7763
+ requestType: SyncAuthUserRequest,
7764
+ requestStream: false,
7765
+ responseType: SyncAuthUserResponse,
7766
+ responseStream: false,
7767
+ options: {}
7768
+ },
7769
+ updateUser: {
7770
+ name: "UpdateUser",
7771
+ requestType: UpdateUserRequest,
7772
+ requestStream: false,
7773
+ responseType: UpdateUserResponse,
7774
+ responseStream: false,
7775
+ options: {}
7776
+ },
7777
+ updateUserStripe: {
7778
+ name: "UpdateUserStripe",
7779
+ requestType: UpdateUserStripeRequest,
7780
+ requestStream: false,
7781
+ responseType: UpdateUserStripeResponse,
7782
+ responseStream: false,
7783
+ options: {}
7784
+ },
7785
+ updateUserRoles: {
7786
+ name: "UpdateUserRoles",
7787
+ requestType: UpdateUserRolesRequest,
7788
+ requestStream: false,
7789
+ responseType: UpdateUserRolesResponse,
7790
+ responseStream: false,
7791
+ options: {}
7792
+ },
7793
+ reinstateUser: {
7794
+ name: "ReinstateUser",
7795
+ requestType: ReinstateUserRequest,
7796
+ requestStream: false,
7797
+ responseType: ReinstateUserResponse,
7798
+ responseStream: false,
7799
+ options: {}
7800
+ }
7801
+ }
7802
+ };
7803
+ function toTimestamp3(date) {
7804
+ const seconds = Math.trunc(date.getTime() / 1000);
7805
+ const nanos = date.getTime() % 1000 * 1e6;
7806
+ return { seconds, nanos };
7807
+ }
7808
+ function fromTimestamp3(t) {
7809
+ let millis = (t.seconds || 0) * 1000;
7810
+ millis += (t.nanos || 0) / 1e6;
7811
+ return new globalThis.Date(millis);
7812
+ }
7813
+ function fromJsonTimestamp3(o) {
7814
+ if (o instanceof globalThis.Date) {
7815
+ return o;
7816
+ } else if (typeof o === "string") {
7817
+ return new globalThis.Date(o);
7818
+ } else {
7819
+ return fromTimestamp3(Timestamp.fromJSON(o));
7820
+ }
7821
+ }
6394
7822
  function isSet5(value) {
6395
7823
  return value !== null && value !== undefined;
6396
7824
  }
6397
-
6398
7825
  // src/gen/zenu/users/v1/ninja_onboarding_service.ts
6399
7826
  var OnboardingStatus = {
6400
7827
  UNSPECIFIED: 0,
@@ -7686,12 +9113,21 @@ export {
7686
9113
  UserAgreementsServiceDefinition,
7687
9114
  UserAgreement,
7688
9115
  User,
9116
+ UpdateUserStripeResponse,
9117
+ UpdateUserStripeRequest,
9118
+ UpdateUserRolesResponse,
9119
+ UpdateUserRolesRequest,
9120
+ UpdateUserRole,
9121
+ UpdateUserResponse,
9122
+ UpdateUserRequest,
7689
9123
  UpdateNinjaOnboardingApplicationResponse,
7690
9124
  UpdateNinjaOnboardingApplicationRequest,
7691
9125
  UpdateAgreementVersionResponse,
7692
9126
  UpdateAgreementVersionRequest,
7693
9127
  UpdateAgreementResponse,
7694
9128
  UpdateAgreementRequest,
9129
+ SyncAuthUserResponse,
9130
+ SyncAuthUserRequest,
7695
9131
  SubmitNinjaOnboardingApplicationResponse,
7696
9132
  SubmitNinjaOnboardingApplicationRequest,
7697
9133
  SetNinjaOnboardingStatusResponse,
@@ -7700,12 +9136,16 @@ export {
7700
9136
  SayHelloRequest,
7701
9137
  RoleScope,
7702
9138
  Role,
9139
+ ReinstateUserResponse,
9140
+ ReinstateUserRequest,
7703
9141
  PublishAgreementVersionResponse,
7704
9142
  PublishAgreementVersionRequest,
7705
9143
  OnboardingStatus,
7706
9144
  NinjaOnboardingServiceDefinition,
7707
9145
  NinjaOnboardingApplicationSummary,
7708
9146
  NinjaOnboardingApplication,
9147
+ ListUsersResponse,
9148
+ ListUsersRequest,
7709
9149
  ListUserAgreementsResponse,
7710
9150
  ListUserAgreementsRequest,
7711
9151
  ListNinjaOnboardingApplicationsResponse,
@@ -7737,6 +9177,7 @@ export {
7737
9177
  AgreementVersionSummary,
7738
9178
  AgreementVersion,
7739
9179
  Agreement,
9180
+ Address,
7740
9181
  AcceptAgreementResponse,
7741
9182
  AcceptAgreementRequest
7742
9183
  };