@bite-ninja/zenu-sdk 0.10.1 → 0.11.0

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