@bite-ninja/zenu-sdk 0.8.1 → 0.10.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
@@ -5324,106 +5324,98 @@ function isSet3(value) {
5324
5324
  return value !== null && value !== undefined;
5325
5325
  }
5326
5326
  // src/gen/zenu/users/v1/users_service.ts
5327
- var RoleScope;
5328
- ((RoleScope2) => {
5329
- RoleScope2[RoleScope2["ROLE_SCOPE_UNSPECIFIED"] = 0] = "ROLE_SCOPE_UNSPECIFIED";
5330
- RoleScope2[RoleScope2["ROLE_SCOPE_GLOBAL"] = 1] = "ROLE_SCOPE_GLOBAL";
5331
- RoleScope2[RoleScope2["ROLE_SCOPE_ORGANIZATION"] = 2] = "ROLE_SCOPE_ORGANIZATION";
5332
- RoleScope2[RoleScope2["ROLE_SCOPE_LOCATION"] = 3] = "ROLE_SCOPE_LOCATION";
5333
- RoleScope2[RoleScope2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
5334
- })(RoleScope ||= {});
5327
+ var RoleScope = { UNSPECIFIED: 0, GLOBAL: 1, ORGANIZATION: 2, LOCATION: 3, UNRECOGNIZED: -1 };
5335
5328
  function roleScopeFromJSON(object) {
5336
5329
  switch (object) {
5337
5330
  case 0:
5338
5331
  case "ROLE_SCOPE_UNSPECIFIED":
5339
- return 0 /* ROLE_SCOPE_UNSPECIFIED */;
5332
+ return RoleScope.UNSPECIFIED;
5340
5333
  case 1:
5341
5334
  case "ROLE_SCOPE_GLOBAL":
5342
- return 1 /* ROLE_SCOPE_GLOBAL */;
5335
+ return RoleScope.GLOBAL;
5343
5336
  case 2:
5344
5337
  case "ROLE_SCOPE_ORGANIZATION":
5345
- return 2 /* ROLE_SCOPE_ORGANIZATION */;
5338
+ return RoleScope.ORGANIZATION;
5346
5339
  case 3:
5347
5340
  case "ROLE_SCOPE_LOCATION":
5348
- return 3 /* ROLE_SCOPE_LOCATION */;
5341
+ return RoleScope.LOCATION;
5349
5342
  case -1:
5350
5343
  case "UNRECOGNIZED":
5351
5344
  default:
5352
- return -1 /* UNRECOGNIZED */;
5345
+ return RoleScope.UNRECOGNIZED;
5353
5346
  }
5354
5347
  }
5355
5348
  function roleScopeToJSON(object) {
5356
5349
  switch (object) {
5357
- case 0 /* ROLE_SCOPE_UNSPECIFIED */:
5350
+ case RoleScope.UNSPECIFIED:
5358
5351
  return "ROLE_SCOPE_UNSPECIFIED";
5359
- case 1 /* ROLE_SCOPE_GLOBAL */:
5352
+ case RoleScope.GLOBAL:
5360
5353
  return "ROLE_SCOPE_GLOBAL";
5361
- case 2 /* ROLE_SCOPE_ORGANIZATION */:
5354
+ case RoleScope.ORGANIZATION:
5362
5355
  return "ROLE_SCOPE_ORGANIZATION";
5363
- case 3 /* ROLE_SCOPE_LOCATION */:
5356
+ case RoleScope.LOCATION:
5364
5357
  return "ROLE_SCOPE_LOCATION";
5365
- case -1 /* UNRECOGNIZED */:
5358
+ case RoleScope.UNRECOGNIZED:
5366
5359
  default:
5367
5360
  return "UNRECOGNIZED";
5368
5361
  }
5369
5362
  }
5370
- var Role;
5371
- ((Role2) => {
5372
- Role2[Role2["ROLE_UNSPECIFIED"] = 0] = "ROLE_UNSPECIFIED";
5373
- Role2[Role2["ROLE_ADMINISTRATOR"] = 1] = "ROLE_ADMINISTRATOR";
5374
- Role2[Role2["ROLE_DEVELOPER"] = 2] = "ROLE_DEVELOPER";
5375
- Role2[Role2["ROLE_MANAGER"] = 3] = "ROLE_MANAGER";
5376
- Role2[Role2["ROLE_NINJA"] = 4] = "ROLE_NINJA";
5377
- Role2[Role2["ROLE_INSTORE"] = 5] = "ROLE_INSTORE";
5378
- Role2[Role2["ROLE_EMPLOYEE"] = 6] = "ROLE_EMPLOYEE";
5379
- Role2[Role2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
5380
- })(Role ||= {});
5363
+ var Role = {
5364
+ UNSPECIFIED: 0,
5365
+ ADMINISTRATOR: 1,
5366
+ DEVELOPER: 2,
5367
+ MANAGER: 3,
5368
+ NINJA: 4,
5369
+ INSTORE: 5,
5370
+ EMPLOYEE: 6,
5371
+ UNRECOGNIZED: -1
5372
+ };
5381
5373
  function roleFromJSON(object) {
5382
5374
  switch (object) {
5383
5375
  case 0:
5384
5376
  case "ROLE_UNSPECIFIED":
5385
- return 0 /* ROLE_UNSPECIFIED */;
5377
+ return Role.UNSPECIFIED;
5386
5378
  case 1:
5387
5379
  case "ROLE_ADMINISTRATOR":
5388
- return 1 /* ROLE_ADMINISTRATOR */;
5380
+ return Role.ADMINISTRATOR;
5389
5381
  case 2:
5390
5382
  case "ROLE_DEVELOPER":
5391
- return 2 /* ROLE_DEVELOPER */;
5383
+ return Role.DEVELOPER;
5392
5384
  case 3:
5393
5385
  case "ROLE_MANAGER":
5394
- return 3 /* ROLE_MANAGER */;
5386
+ return Role.MANAGER;
5395
5387
  case 4:
5396
5388
  case "ROLE_NINJA":
5397
- return 4 /* ROLE_NINJA */;
5389
+ return Role.NINJA;
5398
5390
  case 5:
5399
5391
  case "ROLE_INSTORE":
5400
- return 5 /* ROLE_INSTORE */;
5392
+ return Role.INSTORE;
5401
5393
  case 6:
5402
5394
  case "ROLE_EMPLOYEE":
5403
- return 6 /* ROLE_EMPLOYEE */;
5395
+ return Role.EMPLOYEE;
5404
5396
  case -1:
5405
5397
  case "UNRECOGNIZED":
5406
5398
  default:
5407
- return -1 /* UNRECOGNIZED */;
5399
+ return Role.UNRECOGNIZED;
5408
5400
  }
5409
5401
  }
5410
5402
  function roleToJSON(object) {
5411
5403
  switch (object) {
5412
- case 0 /* ROLE_UNSPECIFIED */:
5404
+ case Role.UNSPECIFIED:
5413
5405
  return "ROLE_UNSPECIFIED";
5414
- case 1 /* ROLE_ADMINISTRATOR */:
5406
+ case Role.ADMINISTRATOR:
5415
5407
  return "ROLE_ADMINISTRATOR";
5416
- case 2 /* ROLE_DEVELOPER */:
5408
+ case Role.DEVELOPER:
5417
5409
  return "ROLE_DEVELOPER";
5418
- case 3 /* ROLE_MANAGER */:
5410
+ case Role.MANAGER:
5419
5411
  return "ROLE_MANAGER";
5420
- case 4 /* ROLE_NINJA */:
5412
+ case Role.NINJA:
5421
5413
  return "ROLE_NINJA";
5422
- case 5 /* ROLE_INSTORE */:
5414
+ case Role.INSTORE:
5423
5415
  return "ROLE_INSTORE";
5424
- case 6 /* ROLE_EMPLOYEE */:
5416
+ case Role.EMPLOYEE:
5425
5417
  return "ROLE_EMPLOYEE";
5426
- case -1 /* UNRECOGNIZED */:
5418
+ case Role.UNRECOGNIZED:
5427
5419
  default:
5428
5420
  return "UNRECOGNIZED";
5429
5421
  }
@@ -5635,6 +5627,214 @@ var WhoAmIResponse = {
5635
5627
  return message;
5636
5628
  }
5637
5629
  };
5630
+ function createBaseGetUserRequest() {
5631
+ return { userId: "" };
5632
+ }
5633
+ var GetUserRequest = {
5634
+ encode(message, writer = new BinaryWriter) {
5635
+ if (message.userId !== "") {
5636
+ writer.uint32(10).string(message.userId);
5637
+ }
5638
+ return writer;
5639
+ },
5640
+ decode(input, length) {
5641
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5642
+ const end = length === undefined ? reader.len : reader.pos + length;
5643
+ const message = createBaseGetUserRequest();
5644
+ while (reader.pos < end) {
5645
+ const tag = reader.uint32();
5646
+ switch (tag >>> 3) {
5647
+ case 1: {
5648
+ if (tag !== 10) {
5649
+ break;
5650
+ }
5651
+ message.userId = reader.string();
5652
+ continue;
5653
+ }
5654
+ }
5655
+ if ((tag & 7) === 4 || tag === 0) {
5656
+ break;
5657
+ }
5658
+ reader.skip(tag & 7);
5659
+ }
5660
+ return message;
5661
+ },
5662
+ fromJSON(object) {
5663
+ return {
5664
+ userId: isSet4(object.userId) ? globalThis.String(object.userId) : isSet4(object.user_id) ? globalThis.String(object.user_id) : ""
5665
+ };
5666
+ },
5667
+ toJSON(message) {
5668
+ const obj = {};
5669
+ if (message.userId !== "") {
5670
+ obj.userId = message.userId;
5671
+ }
5672
+ return obj;
5673
+ },
5674
+ create(base) {
5675
+ return GetUserRequest.fromPartial(base ?? {});
5676
+ },
5677
+ fromPartial(object) {
5678
+ const message = createBaseGetUserRequest();
5679
+ message.userId = object.userId ?? "";
5680
+ return message;
5681
+ }
5682
+ };
5683
+ function createBaseGetUserResponse() {
5684
+ return { user: undefined };
5685
+ }
5686
+ var GetUserResponse = {
5687
+ encode(message, writer = new BinaryWriter) {
5688
+ if (message.user !== undefined) {
5689
+ User.encode(message.user, writer.uint32(10).fork()).join();
5690
+ }
5691
+ return writer;
5692
+ },
5693
+ decode(input, length) {
5694
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5695
+ const end = length === undefined ? reader.len : reader.pos + length;
5696
+ const message = createBaseGetUserResponse();
5697
+ while (reader.pos < end) {
5698
+ const tag = reader.uint32();
5699
+ switch (tag >>> 3) {
5700
+ case 1: {
5701
+ if (tag !== 10) {
5702
+ break;
5703
+ }
5704
+ message.user = User.decode(reader, reader.uint32());
5705
+ continue;
5706
+ }
5707
+ }
5708
+ if ((tag & 7) === 4 || tag === 0) {
5709
+ break;
5710
+ }
5711
+ reader.skip(tag & 7);
5712
+ }
5713
+ return message;
5714
+ },
5715
+ fromJSON(object) {
5716
+ return { user: isSet4(object.user) ? User.fromJSON(object.user) : undefined };
5717
+ },
5718
+ toJSON(message) {
5719
+ const obj = {};
5720
+ if (message.user !== undefined) {
5721
+ obj.user = User.toJSON(message.user);
5722
+ }
5723
+ return obj;
5724
+ },
5725
+ create(base) {
5726
+ return GetUserResponse.fromPartial(base ?? {});
5727
+ },
5728
+ fromPartial(object) {
5729
+ const message = createBaseGetUserResponse();
5730
+ message.user = object.user !== undefined && object.user !== null ? User.fromPartial(object.user) : undefined;
5731
+ return message;
5732
+ }
5733
+ };
5734
+ function createBaseGetUsersRequest() {
5735
+ return { userIds: [] };
5736
+ }
5737
+ var GetUsersRequest = {
5738
+ encode(message, writer = new BinaryWriter) {
5739
+ for (const v of message.userIds) {
5740
+ writer.uint32(10).string(v);
5741
+ }
5742
+ return writer;
5743
+ },
5744
+ decode(input, length) {
5745
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5746
+ const end = length === undefined ? reader.len : reader.pos + length;
5747
+ const message = createBaseGetUsersRequest();
5748
+ while (reader.pos < end) {
5749
+ const tag = reader.uint32();
5750
+ switch (tag >>> 3) {
5751
+ case 1: {
5752
+ if (tag !== 10) {
5753
+ break;
5754
+ }
5755
+ message.userIds.push(reader.string());
5756
+ continue;
5757
+ }
5758
+ }
5759
+ if ((tag & 7) === 4 || tag === 0) {
5760
+ break;
5761
+ }
5762
+ reader.skip(tag & 7);
5763
+ }
5764
+ return message;
5765
+ },
5766
+ fromJSON(object) {
5767
+ return {
5768
+ userIds: globalThis.Array.isArray(object?.userIds) ? object.userIds.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : []
5769
+ };
5770
+ },
5771
+ toJSON(message) {
5772
+ const obj = {};
5773
+ if (message.userIds?.length) {
5774
+ obj.userIds = message.userIds;
5775
+ }
5776
+ return obj;
5777
+ },
5778
+ create(base) {
5779
+ return GetUsersRequest.fromPartial(base ?? {});
5780
+ },
5781
+ fromPartial(object) {
5782
+ const message = createBaseGetUsersRequest();
5783
+ message.userIds = object.userIds?.map((e) => e) || [];
5784
+ return message;
5785
+ }
5786
+ };
5787
+ function createBaseGetUsersResponse() {
5788
+ return { users: [] };
5789
+ }
5790
+ var GetUsersResponse = {
5791
+ encode(message, writer = new BinaryWriter) {
5792
+ for (const v of message.users) {
5793
+ User.encode(v, writer.uint32(10).fork()).join();
5794
+ }
5795
+ return writer;
5796
+ },
5797
+ decode(input, length) {
5798
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5799
+ const end = length === undefined ? reader.len : reader.pos + length;
5800
+ const message = createBaseGetUsersResponse();
5801
+ while (reader.pos < end) {
5802
+ const tag = reader.uint32();
5803
+ switch (tag >>> 3) {
5804
+ case 1: {
5805
+ if (tag !== 10) {
5806
+ break;
5807
+ }
5808
+ message.users.push(User.decode(reader, reader.uint32()));
5809
+ continue;
5810
+ }
5811
+ }
5812
+ if ((tag & 7) === 4 || tag === 0) {
5813
+ break;
5814
+ }
5815
+ reader.skip(tag & 7);
5816
+ }
5817
+ return message;
5818
+ },
5819
+ fromJSON(object) {
5820
+ return { users: globalThis.Array.isArray(object?.users) ? object.users.map((e) => User.fromJSON(e)) : [] };
5821
+ },
5822
+ toJSON(message) {
5823
+ const obj = {};
5824
+ if (message.users?.length) {
5825
+ obj.users = message.users.map((e) => User.toJSON(e));
5826
+ }
5827
+ return obj;
5828
+ },
5829
+ create(base) {
5830
+ return GetUsersResponse.fromPartial(base ?? {});
5831
+ },
5832
+ fromPartial(object) {
5833
+ const message = createBaseGetUsersResponse();
5834
+ message.users = object.users?.map((e) => User.fromPartial(e)) || [];
5835
+ return message;
5836
+ }
5837
+ };
5638
5838
  function createBaseUser() {
5639
5839
  return {
5640
5840
  id: "",
@@ -5645,7 +5845,10 @@ function createBaseUser() {
5645
5845
  image: "",
5646
5846
  createdAt: undefined,
5647
5847
  updatedAt: undefined,
5648
- roles: []
5848
+ roles: [],
5849
+ stripeAccountId: undefined,
5850
+ stripeDetailsSubmitted: false,
5851
+ stripePayoutsEnabled: false
5649
5852
  };
5650
5853
  }
5651
5854
  var User = {
@@ -5677,6 +5880,15 @@ var User = {
5677
5880
  for (const v of message.roles) {
5678
5881
  UserRole.encode(v, writer.uint32(74).fork()).join();
5679
5882
  }
5883
+ if (message.stripeAccountId !== undefined) {
5884
+ writer.uint32(82).string(message.stripeAccountId);
5885
+ }
5886
+ if (message.stripeDetailsSubmitted !== false) {
5887
+ writer.uint32(88).bool(message.stripeDetailsSubmitted);
5888
+ }
5889
+ if (message.stripePayoutsEnabled !== false) {
5890
+ writer.uint32(96).bool(message.stripePayoutsEnabled);
5891
+ }
5680
5892
  return writer;
5681
5893
  },
5682
5894
  decode(input, length) {
@@ -5749,6 +5961,27 @@ var User = {
5749
5961
  message.roles.push(UserRole.decode(reader, reader.uint32()));
5750
5962
  continue;
5751
5963
  }
5964
+ case 10: {
5965
+ if (tag !== 82) {
5966
+ break;
5967
+ }
5968
+ message.stripeAccountId = reader.string();
5969
+ continue;
5970
+ }
5971
+ case 11: {
5972
+ if (tag !== 88) {
5973
+ break;
5974
+ }
5975
+ message.stripeDetailsSubmitted = reader.bool();
5976
+ continue;
5977
+ }
5978
+ case 12: {
5979
+ if (tag !== 96) {
5980
+ break;
5981
+ }
5982
+ message.stripePayoutsEnabled = reader.bool();
5983
+ continue;
5984
+ }
5752
5985
  }
5753
5986
  if ((tag & 7) === 4 || tag === 0) {
5754
5987
  break;
@@ -5767,7 +6000,10 @@ var User = {
5767
6000
  image: isSet4(object.image) ? globalThis.String(object.image) : "",
5768
6001
  createdAt: isSet4(object.createdAt) ? fromJsonTimestamp3(object.createdAt) : isSet4(object.created_at) ? fromJsonTimestamp3(object.created_at) : undefined,
5769
6002
  updatedAt: isSet4(object.updatedAt) ? fromJsonTimestamp3(object.updatedAt) : isSet4(object.updated_at) ? fromJsonTimestamp3(object.updated_at) : undefined,
5770
- roles: globalThis.Array.isArray(object?.roles) ? object.roles.map((e) => UserRole.fromJSON(e)) : []
6003
+ 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
5771
6007
  };
5772
6008
  },
5773
6009
  toJSON(message) {
@@ -5799,6 +6035,15 @@ var User = {
5799
6035
  if (message.roles?.length) {
5800
6036
  obj.roles = message.roles.map((e) => UserRole.toJSON(e));
5801
6037
  }
6038
+ if (message.stripeAccountId !== undefined) {
6039
+ obj.stripeAccountId = message.stripeAccountId;
6040
+ }
6041
+ if (message.stripeDetailsSubmitted !== false) {
6042
+ obj.stripeDetailsSubmitted = message.stripeDetailsSubmitted;
6043
+ }
6044
+ if (message.stripePayoutsEnabled !== false) {
6045
+ obj.stripePayoutsEnabled = message.stripePayoutsEnabled;
6046
+ }
5802
6047
  return obj;
5803
6048
  },
5804
6049
  create(base) {
@@ -5815,6 +6060,9 @@ var User = {
5815
6060
  message.createdAt = object.createdAt ?? undefined;
5816
6061
  message.updatedAt = object.updatedAt ?? undefined;
5817
6062
  message.roles = object.roles?.map((e) => UserRole.fromPartial(e)) || [];
6063
+ message.stripeAccountId = object.stripeAccountId ?? undefined;
6064
+ message.stripeDetailsSubmitted = object.stripeDetailsSubmitted ?? false;
6065
+ message.stripePayoutsEnabled = object.stripePayoutsEnabled ?? false;
5818
6066
  return message;
5819
6067
  }
5820
6068
  };
@@ -5935,83 +6183,269 @@ var UsersServiceDefinition = {
5935
6183
  responseType: WhoAmIResponse,
5936
6184
  responseStream: false,
5937
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 };
6230
+ }
6231
+ var PaginationRequest = {
6232
+ encode(message, writer = new BinaryWriter) {
6233
+ if (message.pageSize !== undefined) {
6234
+ writer.uint32(8).int32(message.pageSize);
6235
+ }
6236
+ if (message.page !== undefined) {
6237
+ writer.uint32(16).int32(message.page);
6238
+ }
6239
+ if (message.includeCount !== undefined) {
6240
+ writer.uint32(24).bool(message.includeCount);
6241
+ }
6242
+ return writer;
6243
+ },
6244
+ decode(input, length) {
6245
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6246
+ const end = length === undefined ? reader.len : reader.pos + length;
6247
+ const message = createBasePaginationRequest();
6248
+ while (reader.pos < end) {
6249
+ const tag = reader.uint32();
6250
+ switch (tag >>> 3) {
6251
+ case 1: {
6252
+ if (tag !== 8) {
6253
+ break;
6254
+ }
6255
+ message.pageSize = reader.int32();
6256
+ continue;
6257
+ }
6258
+ case 2: {
6259
+ if (tag !== 16) {
6260
+ break;
6261
+ }
6262
+ message.page = reader.int32();
6263
+ continue;
6264
+ }
6265
+ case 3: {
6266
+ if (tag !== 24) {
6267
+ break;
6268
+ }
6269
+ message.includeCount = reader.bool();
6270
+ continue;
6271
+ }
6272
+ }
6273
+ if ((tag & 7) === 4 || tag === 0) {
6274
+ break;
6275
+ }
6276
+ reader.skip(tag & 7);
6277
+ }
6278
+ return message;
6279
+ },
6280
+ fromJSON(object) {
6281
+ 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
6285
+ };
6286
+ },
6287
+ toJSON(message) {
6288
+ const obj = {};
6289
+ if (message.pageSize !== undefined) {
6290
+ obj.pageSize = Math.round(message.pageSize);
6291
+ }
6292
+ if (message.page !== undefined) {
6293
+ obj.page = Math.round(message.page);
6294
+ }
6295
+ if (message.includeCount !== undefined) {
6296
+ obj.includeCount = message.includeCount;
6297
+ }
6298
+ return obj;
6299
+ },
6300
+ create(base) {
6301
+ return PaginationRequest.fromPartial(base ?? {});
6302
+ },
6303
+ fromPartial(object) {
6304
+ const message = createBasePaginationRequest();
6305
+ message.pageSize = object.pageSize ?? undefined;
6306
+ message.page = object.page ?? undefined;
6307
+ message.includeCount = object.includeCount ?? undefined;
6308
+ return message;
6309
+ }
6310
+ };
6311
+ function createBasePaginationResponse() {
6312
+ return { pageSize: 0, page: 0, count: undefined };
6313
+ }
6314
+ var PaginationResponse = {
6315
+ encode(message, writer = new BinaryWriter) {
6316
+ if (message.pageSize !== 0) {
6317
+ writer.uint32(8).int32(message.pageSize);
6318
+ }
6319
+ if (message.page !== 0) {
6320
+ writer.uint32(16).int32(message.page);
6321
+ }
6322
+ if (message.count !== undefined) {
6323
+ writer.uint32(24).int32(message.count);
6324
+ }
6325
+ return writer;
6326
+ },
6327
+ decode(input, length) {
6328
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6329
+ const end = length === undefined ? reader.len : reader.pos + length;
6330
+ const message = createBasePaginationResponse();
6331
+ while (reader.pos < end) {
6332
+ const tag = reader.uint32();
6333
+ switch (tag >>> 3) {
6334
+ case 1: {
6335
+ if (tag !== 8) {
6336
+ break;
6337
+ }
6338
+ message.pageSize = reader.int32();
6339
+ continue;
6340
+ }
6341
+ case 2: {
6342
+ if (tag !== 16) {
6343
+ break;
6344
+ }
6345
+ message.page = reader.int32();
6346
+ continue;
6347
+ }
6348
+ case 3: {
6349
+ if (tag !== 24) {
6350
+ break;
6351
+ }
6352
+ message.count = reader.int32();
6353
+ continue;
6354
+ }
6355
+ }
6356
+ if ((tag & 7) === 4 || tag === 0) {
6357
+ break;
6358
+ }
6359
+ reader.skip(tag & 7);
6360
+ }
6361
+ return message;
6362
+ },
6363
+ fromJSON(object) {
6364
+ 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
6368
+ };
6369
+ },
6370
+ toJSON(message) {
6371
+ const obj = {};
6372
+ if (message.pageSize !== 0) {
6373
+ obj.pageSize = Math.round(message.pageSize);
6374
+ }
6375
+ if (message.page !== 0) {
6376
+ obj.page = Math.round(message.page);
5938
6377
  }
6378
+ if (message.count !== undefined) {
6379
+ obj.count = Math.round(message.count);
6380
+ }
6381
+ return obj;
6382
+ },
6383
+ create(base) {
6384
+ return PaginationResponse.fromPartial(base ?? {});
6385
+ },
6386
+ fromPartial(object) {
6387
+ const message = createBasePaginationResponse();
6388
+ message.pageSize = object.pageSize ?? 0;
6389
+ message.page = object.page ?? 0;
6390
+ message.count = object.count ?? undefined;
6391
+ return message;
5939
6392
  }
5940
6393
  };
5941
- function toTimestamp3(date) {
5942
- const seconds = Math.trunc(date.getTime() / 1000);
5943
- const nanos = date.getTime() % 1000 * 1e6;
5944
- return { seconds, nanos };
5945
- }
5946
- function fromTimestamp3(t) {
5947
- let millis = (t.seconds || 0) * 1000;
5948
- millis += (t.nanos || 0) / 1e6;
5949
- return new globalThis.Date(millis);
5950
- }
5951
- function fromJsonTimestamp3(o) {
5952
- if (o instanceof globalThis.Date) {
5953
- return o;
5954
- } else if (typeof o === "string") {
5955
- return new globalThis.Date(o);
5956
- } else {
5957
- return fromTimestamp3(Timestamp.fromJSON(o));
5958
- }
5959
- }
5960
- function isSet4(value) {
6394
+ function isSet5(value) {
5961
6395
  return value !== null && value !== undefined;
5962
6396
  }
6397
+
5963
6398
  // src/gen/zenu/users/v1/ninja_onboarding_service.ts
5964
- var OnboardingStatus;
5965
- ((OnboardingStatus2) => {
5966
- OnboardingStatus2[OnboardingStatus2["ONBOARDING_STATUS_UNSPECIFIED"] = 0] = "ONBOARDING_STATUS_UNSPECIFIED";
5967
- OnboardingStatus2[OnboardingStatus2["ONBOARDING_STATUS_APPLICATION"] = 1] = "ONBOARDING_STATUS_APPLICATION";
5968
- OnboardingStatus2[OnboardingStatus2["ONBOARDING_STATUS_REVIEW"] = 2] = "ONBOARDING_STATUS_REVIEW";
5969
- OnboardingStatus2[OnboardingStatus2["ONBOARDING_STATUS_ACCEPTED"] = 3] = "ONBOARDING_STATUS_ACCEPTED";
5970
- OnboardingStatus2[OnboardingStatus2["ONBOARDING_STATUS_DECLINED"] = 4] = "ONBOARDING_STATUS_DECLINED";
5971
- OnboardingStatus2[OnboardingStatus2["ONBOARDING_STATUS_COMPLETE"] = 5] = "ONBOARDING_STATUS_COMPLETE";
5972
- OnboardingStatus2[OnboardingStatus2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
5973
- })(OnboardingStatus ||= {});
6399
+ var OnboardingStatus = {
6400
+ UNSPECIFIED: 0,
6401
+ DRAFT: 1,
6402
+ REVIEW: 2,
6403
+ ACCEPTED: 3,
6404
+ DECLINED: 4,
6405
+ COMPLETE: 5,
6406
+ UNRECOGNIZED: -1
6407
+ };
5974
6408
  function onboardingStatusFromJSON(object) {
5975
6409
  switch (object) {
5976
6410
  case 0:
5977
6411
  case "ONBOARDING_STATUS_UNSPECIFIED":
5978
- return 0 /* ONBOARDING_STATUS_UNSPECIFIED */;
6412
+ return OnboardingStatus.UNSPECIFIED;
5979
6413
  case 1:
5980
- case "ONBOARDING_STATUS_APPLICATION":
5981
- return 1 /* ONBOARDING_STATUS_APPLICATION */;
6414
+ case "ONBOARDING_STATUS_DRAFT":
6415
+ return OnboardingStatus.DRAFT;
5982
6416
  case 2:
5983
6417
  case "ONBOARDING_STATUS_REVIEW":
5984
- return 2 /* ONBOARDING_STATUS_REVIEW */;
6418
+ return OnboardingStatus.REVIEW;
5985
6419
  case 3:
5986
6420
  case "ONBOARDING_STATUS_ACCEPTED":
5987
- return 3 /* ONBOARDING_STATUS_ACCEPTED */;
6421
+ return OnboardingStatus.ACCEPTED;
5988
6422
  case 4:
5989
6423
  case "ONBOARDING_STATUS_DECLINED":
5990
- return 4 /* ONBOARDING_STATUS_DECLINED */;
6424
+ return OnboardingStatus.DECLINED;
5991
6425
  case 5:
5992
6426
  case "ONBOARDING_STATUS_COMPLETE":
5993
- return 5 /* ONBOARDING_STATUS_COMPLETE */;
6427
+ return OnboardingStatus.COMPLETE;
5994
6428
  case -1:
5995
6429
  case "UNRECOGNIZED":
5996
6430
  default:
5997
- return -1 /* UNRECOGNIZED */;
6431
+ return OnboardingStatus.UNRECOGNIZED;
5998
6432
  }
5999
6433
  }
6000
6434
  function onboardingStatusToJSON(object) {
6001
6435
  switch (object) {
6002
- case 0 /* ONBOARDING_STATUS_UNSPECIFIED */:
6436
+ case OnboardingStatus.UNSPECIFIED:
6003
6437
  return "ONBOARDING_STATUS_UNSPECIFIED";
6004
- case 1 /* ONBOARDING_STATUS_APPLICATION */:
6005
- return "ONBOARDING_STATUS_APPLICATION";
6006
- case 2 /* ONBOARDING_STATUS_REVIEW */:
6438
+ case OnboardingStatus.DRAFT:
6439
+ return "ONBOARDING_STATUS_DRAFT";
6440
+ case OnboardingStatus.REVIEW:
6007
6441
  return "ONBOARDING_STATUS_REVIEW";
6008
- case 3 /* ONBOARDING_STATUS_ACCEPTED */:
6442
+ case OnboardingStatus.ACCEPTED:
6009
6443
  return "ONBOARDING_STATUS_ACCEPTED";
6010
- case 4 /* ONBOARDING_STATUS_DECLINED */:
6444
+ case OnboardingStatus.DECLINED:
6011
6445
  return "ONBOARDING_STATUS_DECLINED";
6012
- case 5 /* ONBOARDING_STATUS_COMPLETE */:
6446
+ case OnboardingStatus.COMPLETE:
6013
6447
  return "ONBOARDING_STATUS_COMPLETE";
6014
- case -1 /* UNRECOGNIZED */:
6448
+ case OnboardingStatus.UNRECOGNIZED:
6015
6449
  default:
6016
6450
  return "UNRECOGNIZED";
6017
6451
  }
@@ -6060,8 +6494,8 @@ var Assessment = {
6060
6494
  },
6061
6495
  fromJSON(object) {
6062
6496
  return {
6063
- question: isSet5(object.question) ? globalThis.String(object.question) : "",
6064
- answer: isSet5(object.answer) ? globalThis.String(object.answer) : ""
6497
+ question: isSet6(object.question) ? globalThis.String(object.question) : "",
6498
+ answer: isSet6(object.answer) ? globalThis.String(object.answer) : ""
6065
6499
  };
6066
6500
  },
6067
6501
  toJSON(message) {
@@ -6252,19 +6686,19 @@ var NinjaOnboardingApplication = {
6252
6686
  },
6253
6687
  fromJSON(object) {
6254
6688
  return {
6255
- id: isSet5(object.id) ? globalThis.String(object.id) : "",
6256
- userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : "",
6257
- isAdult: isSet5(object.isAdult) ? globalThis.Boolean(object.isAdult) : isSet5(object.is_adult) ? globalThis.Boolean(object.is_adult) : false,
6258
- isUsWorkAuthorized: isSet5(object.isUsWorkAuthorized) ? globalThis.Boolean(object.isUsWorkAuthorized) : isSet5(object.is_us_work_authorized) ? globalThis.Boolean(object.is_us_work_authorized) : false,
6689
+ id: isSet6(object.id) ? globalThis.String(object.id) : "",
6690
+ userId: isSet6(object.userId) ? globalThis.String(object.userId) : isSet6(object.user_id) ? globalThis.String(object.user_id) : "",
6691
+ isAdult: isSet6(object.isAdult) ? globalThis.Boolean(object.isAdult) : isSet6(object.is_adult) ? globalThis.Boolean(object.is_adult) : false,
6692
+ isUsWorkAuthorized: isSet6(object.isUsWorkAuthorized) ? globalThis.Boolean(object.isUsWorkAuthorized) : isSet6(object.is_us_work_authorized) ? globalThis.Boolean(object.is_us_work_authorized) : false,
6259
6693
  languages: globalThis.Array.isArray(object?.languages) ? object.languages.map((e) => globalThis.String(e)) : [],
6260
- uploadSpeedMbps: isSet5(object.uploadSpeedMbps) ? globalThis.Number(object.uploadSpeedMbps) : isSet5(object.upload_speed_mbps) ? globalThis.Number(object.upload_speed_mbps) : 0,
6261
- downloadSpeedMbps: isSet5(object.downloadSpeedMbps) ? globalThis.Number(object.downloadSpeedMbps) : isSet5(object.download_speed_mbps) ? globalThis.Number(object.download_speed_mbps) : 0,
6262
- hasRecentComputer: isSet5(object.hasRecentComputer) ? globalThis.Boolean(object.hasRecentComputer) : isSet5(object.has_recent_computer) ? globalThis.Boolean(object.has_recent_computer) : false,
6263
- hasQuietSpace: isSet5(object.hasQuietSpace) ? globalThis.Boolean(object.hasQuietSpace) : isSet5(object.has_quiet_space) ? globalThis.Boolean(object.has_quiet_space) : false,
6264
- hasRetailExperience: isSet5(object.hasRetailExperience) ? globalThis.Boolean(object.hasRetailExperience) : isSet5(object.has_retail_experience) ? globalThis.Boolean(object.has_retail_experience) : false,
6694
+ uploadSpeedMbps: isSet6(object.uploadSpeedMbps) ? globalThis.Number(object.uploadSpeedMbps) : isSet6(object.upload_speed_mbps) ? globalThis.Number(object.upload_speed_mbps) : 0,
6695
+ downloadSpeedMbps: isSet6(object.downloadSpeedMbps) ? globalThis.Number(object.downloadSpeedMbps) : isSet6(object.download_speed_mbps) ? globalThis.Number(object.download_speed_mbps) : 0,
6696
+ hasRecentComputer: isSet6(object.hasRecentComputer) ? globalThis.Boolean(object.hasRecentComputer) : isSet6(object.has_recent_computer) ? globalThis.Boolean(object.has_recent_computer) : false,
6697
+ hasQuietSpace: isSet6(object.hasQuietSpace) ? globalThis.Boolean(object.hasQuietSpace) : isSet6(object.has_quiet_space) ? globalThis.Boolean(object.has_quiet_space) : false,
6698
+ hasRetailExperience: isSet6(object.hasRetailExperience) ? globalThis.Boolean(object.hasRetailExperience) : isSet6(object.has_retail_experience) ? globalThis.Boolean(object.has_retail_experience) : false,
6265
6699
  availability: globalThis.Array.isArray(object?.availability) ? object.availability.map((e) => globalThis.String(e)) : [],
6266
6700
  assessments: globalThis.Array.isArray(object?.assessments) ? object.assessments.map((e) => Assessment.fromJSON(e)) : [],
6267
- status: isSet5(object.status) ? onboardingStatusFromJSON(object.status) : 0
6701
+ status: isSet6(object.status) ? onboardingStatusFromJSON(object.status) : 0
6268
6702
  };
6269
6703
  },
6270
6704
  toJSON(message) {
@@ -6331,6 +6765,294 @@ var NinjaOnboardingApplication = {
6331
6765
  return message;
6332
6766
  }
6333
6767
  };
6768
+ function createBaseNinjaOnboardingApplicationSummary() {
6769
+ return { id: "", userId: "", status: 0, email: "", familyName: "", givenName: "" };
6770
+ }
6771
+ var NinjaOnboardingApplicationSummary = {
6772
+ encode(message, writer = new BinaryWriter) {
6773
+ if (message.id !== "") {
6774
+ writer.uint32(10).string(message.id);
6775
+ }
6776
+ if (message.userId !== "") {
6777
+ writer.uint32(18).string(message.userId);
6778
+ }
6779
+ if (message.status !== 0) {
6780
+ writer.uint32(24).int32(message.status);
6781
+ }
6782
+ if (message.email !== "") {
6783
+ writer.uint32(34).string(message.email);
6784
+ }
6785
+ if (message.familyName !== "") {
6786
+ writer.uint32(42).string(message.familyName);
6787
+ }
6788
+ if (message.givenName !== "") {
6789
+ writer.uint32(50).string(message.givenName);
6790
+ }
6791
+ return writer;
6792
+ },
6793
+ decode(input, length) {
6794
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6795
+ const end = length === undefined ? reader.len : reader.pos + length;
6796
+ const message = createBaseNinjaOnboardingApplicationSummary();
6797
+ while (reader.pos < end) {
6798
+ const tag = reader.uint32();
6799
+ switch (tag >>> 3) {
6800
+ case 1: {
6801
+ if (tag !== 10) {
6802
+ break;
6803
+ }
6804
+ message.id = reader.string();
6805
+ continue;
6806
+ }
6807
+ case 2: {
6808
+ if (tag !== 18) {
6809
+ break;
6810
+ }
6811
+ message.userId = reader.string();
6812
+ continue;
6813
+ }
6814
+ case 3: {
6815
+ if (tag !== 24) {
6816
+ break;
6817
+ }
6818
+ message.status = reader.int32();
6819
+ continue;
6820
+ }
6821
+ case 4: {
6822
+ if (tag !== 34) {
6823
+ break;
6824
+ }
6825
+ message.email = reader.string();
6826
+ continue;
6827
+ }
6828
+ case 5: {
6829
+ if (tag !== 42) {
6830
+ break;
6831
+ }
6832
+ message.familyName = reader.string();
6833
+ continue;
6834
+ }
6835
+ case 6: {
6836
+ if (tag !== 50) {
6837
+ break;
6838
+ }
6839
+ message.givenName = reader.string();
6840
+ continue;
6841
+ }
6842
+ }
6843
+ if ((tag & 7) === 4 || tag === 0) {
6844
+ break;
6845
+ }
6846
+ reader.skip(tag & 7);
6847
+ }
6848
+ return message;
6849
+ },
6850
+ fromJSON(object) {
6851
+ return {
6852
+ id: isSet6(object.id) ? globalThis.String(object.id) : "",
6853
+ userId: isSet6(object.userId) ? globalThis.String(object.userId) : isSet6(object.user_id) ? globalThis.String(object.user_id) : "",
6854
+ status: isSet6(object.status) ? onboardingStatusFromJSON(object.status) : 0,
6855
+ email: isSet6(object.email) ? globalThis.String(object.email) : "",
6856
+ familyName: isSet6(object.familyName) ? globalThis.String(object.familyName) : isSet6(object.family_name) ? globalThis.String(object.family_name) : "",
6857
+ givenName: isSet6(object.givenName) ? globalThis.String(object.givenName) : isSet6(object.given_name) ? globalThis.String(object.given_name) : ""
6858
+ };
6859
+ },
6860
+ toJSON(message) {
6861
+ const obj = {};
6862
+ if (message.id !== "") {
6863
+ obj.id = message.id;
6864
+ }
6865
+ if (message.userId !== "") {
6866
+ obj.userId = message.userId;
6867
+ }
6868
+ if (message.status !== 0) {
6869
+ obj.status = onboardingStatusToJSON(message.status);
6870
+ }
6871
+ if (message.email !== "") {
6872
+ obj.email = message.email;
6873
+ }
6874
+ if (message.familyName !== "") {
6875
+ obj.familyName = message.familyName;
6876
+ }
6877
+ if (message.givenName !== "") {
6878
+ obj.givenName = message.givenName;
6879
+ }
6880
+ return obj;
6881
+ },
6882
+ create(base) {
6883
+ return NinjaOnboardingApplicationSummary.fromPartial(base ?? {});
6884
+ },
6885
+ fromPartial(object) {
6886
+ const message = createBaseNinjaOnboardingApplicationSummary();
6887
+ message.id = object.id ?? "";
6888
+ message.userId = object.userId ?? "";
6889
+ message.status = object.status ?? 0;
6890
+ message.email = object.email ?? "";
6891
+ message.familyName = object.familyName ?? "";
6892
+ message.givenName = object.givenName ?? "";
6893
+ return message;
6894
+ }
6895
+ };
6896
+ function createBaseListNinjaOnboardingApplicationsRequest() {
6897
+ return { pagination: undefined, statuses: [], search: undefined };
6898
+ }
6899
+ var ListNinjaOnboardingApplicationsRequest = {
6900
+ encode(message, writer = new BinaryWriter) {
6901
+ if (message.pagination !== undefined) {
6902
+ PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
6903
+ }
6904
+ writer.uint32(18).fork();
6905
+ for (const v of message.statuses) {
6906
+ writer.int32(v);
6907
+ }
6908
+ writer.join();
6909
+ if (message.search !== undefined) {
6910
+ writer.uint32(26).string(message.search);
6911
+ }
6912
+ return writer;
6913
+ },
6914
+ decode(input, length) {
6915
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6916
+ const end = length === undefined ? reader.len : reader.pos + length;
6917
+ const message = createBaseListNinjaOnboardingApplicationsRequest();
6918
+ while (reader.pos < end) {
6919
+ const tag = reader.uint32();
6920
+ switch (tag >>> 3) {
6921
+ case 1: {
6922
+ if (tag !== 10) {
6923
+ break;
6924
+ }
6925
+ message.pagination = PaginationRequest.decode(reader, reader.uint32());
6926
+ continue;
6927
+ }
6928
+ case 2: {
6929
+ if (tag === 16) {
6930
+ message.statuses.push(reader.int32());
6931
+ continue;
6932
+ }
6933
+ if (tag === 18) {
6934
+ const end2 = reader.uint32() + reader.pos;
6935
+ while (reader.pos < end2) {
6936
+ message.statuses.push(reader.int32());
6937
+ }
6938
+ continue;
6939
+ }
6940
+ break;
6941
+ }
6942
+ case 3: {
6943
+ if (tag !== 26) {
6944
+ break;
6945
+ }
6946
+ message.search = reader.string();
6947
+ continue;
6948
+ }
6949
+ }
6950
+ if ((tag & 7) === 4 || tag === 0) {
6951
+ break;
6952
+ }
6953
+ reader.skip(tag & 7);
6954
+ }
6955
+ return message;
6956
+ },
6957
+ fromJSON(object) {
6958
+ return {
6959
+ pagination: isSet6(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
6960
+ statuses: globalThis.Array.isArray(object?.statuses) ? object.statuses.map((e) => onboardingStatusFromJSON(e)) : [],
6961
+ search: isSet6(object.search) ? globalThis.String(object.search) : undefined
6962
+ };
6963
+ },
6964
+ toJSON(message) {
6965
+ const obj = {};
6966
+ if (message.pagination !== undefined) {
6967
+ obj.pagination = PaginationRequest.toJSON(message.pagination);
6968
+ }
6969
+ if (message.statuses?.length) {
6970
+ obj.statuses = message.statuses.map((e) => onboardingStatusToJSON(e));
6971
+ }
6972
+ if (message.search !== undefined) {
6973
+ obj.search = message.search;
6974
+ }
6975
+ return obj;
6976
+ },
6977
+ create(base) {
6978
+ return ListNinjaOnboardingApplicationsRequest.fromPartial(base ?? {});
6979
+ },
6980
+ fromPartial(object) {
6981
+ const message = createBaseListNinjaOnboardingApplicationsRequest();
6982
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PaginationRequest.fromPartial(object.pagination) : undefined;
6983
+ message.statuses = object.statuses?.map((e) => e) || [];
6984
+ message.search = object.search ?? undefined;
6985
+ return message;
6986
+ }
6987
+ };
6988
+ function createBaseListNinjaOnboardingApplicationsResponse() {
6989
+ return { pagination: undefined, applications: [] };
6990
+ }
6991
+ var ListNinjaOnboardingApplicationsResponse = {
6992
+ encode(message, writer = new BinaryWriter) {
6993
+ if (message.pagination !== undefined) {
6994
+ PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
6995
+ }
6996
+ for (const v of message.applications) {
6997
+ NinjaOnboardingApplicationSummary.encode(v, writer.uint32(18).fork()).join();
6998
+ }
6999
+ return writer;
7000
+ },
7001
+ decode(input, length) {
7002
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7003
+ const end = length === undefined ? reader.len : reader.pos + length;
7004
+ const message = createBaseListNinjaOnboardingApplicationsResponse();
7005
+ while (reader.pos < end) {
7006
+ const tag = reader.uint32();
7007
+ switch (tag >>> 3) {
7008
+ case 1: {
7009
+ if (tag !== 10) {
7010
+ break;
7011
+ }
7012
+ message.pagination = PaginationResponse.decode(reader, reader.uint32());
7013
+ continue;
7014
+ }
7015
+ case 2: {
7016
+ if (tag !== 18) {
7017
+ break;
7018
+ }
7019
+ message.applications.push(NinjaOnboardingApplicationSummary.decode(reader, reader.uint32()));
7020
+ continue;
7021
+ }
7022
+ }
7023
+ if ((tag & 7) === 4 || tag === 0) {
7024
+ break;
7025
+ }
7026
+ reader.skip(tag & 7);
7027
+ }
7028
+ return message;
7029
+ },
7030
+ fromJSON(object) {
7031
+ return {
7032
+ pagination: isSet6(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
7033
+ applications: globalThis.Array.isArray(object?.applications) ? object.applications.map((e) => NinjaOnboardingApplicationSummary.fromJSON(e)) : []
7034
+ };
7035
+ },
7036
+ toJSON(message) {
7037
+ const obj = {};
7038
+ if (message.pagination !== undefined) {
7039
+ obj.pagination = PaginationResponse.toJSON(message.pagination);
7040
+ }
7041
+ if (message.applications?.length) {
7042
+ obj.applications = message.applications.map((e) => NinjaOnboardingApplicationSummary.toJSON(e));
7043
+ }
7044
+ return obj;
7045
+ },
7046
+ create(base) {
7047
+ return ListNinjaOnboardingApplicationsResponse.fromPartial(base ?? {});
7048
+ },
7049
+ fromPartial(object) {
7050
+ const message = createBaseListNinjaOnboardingApplicationsResponse();
7051
+ message.pagination = object.pagination !== undefined && object.pagination !== null ? PaginationResponse.fromPartial(object.pagination) : undefined;
7052
+ message.applications = object.applications?.map((e) => NinjaOnboardingApplicationSummary.fromPartial(e)) || [];
7053
+ return message;
7054
+ }
7055
+ };
6334
7056
  function createBaseGetNinjaOnboardingApplicationRequest() {
6335
7057
  return { userId: undefined };
6336
7058
  }
@@ -6365,7 +7087,7 @@ var GetNinjaOnboardingApplicationRequest = {
6365
7087
  },
6366
7088
  fromJSON(object) {
6367
7089
  return {
6368
- userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : undefined
7090
+ userId: isSet6(object.userId) ? globalThis.String(object.userId) : isSet6(object.user_id) ? globalThis.String(object.user_id) : undefined
6369
7091
  };
6370
7092
  },
6371
7093
  toJSON(message) {
@@ -6418,7 +7140,7 @@ var GetNinjaOnboardingApplicationResponse = {
6418
7140
  },
6419
7141
  fromJSON(object) {
6420
7142
  return {
6421
- application: isSet5(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
7143
+ application: isSet6(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
6422
7144
  };
6423
7145
  },
6424
7146
  toJSON(message) {
@@ -6572,14 +7294,14 @@ var UpdateNinjaOnboardingApplicationRequest = {
6572
7294
  },
6573
7295
  fromJSON(object) {
6574
7296
  return {
6575
- isAdult: isSet5(object.isAdult) ? globalThis.Boolean(object.isAdult) : isSet5(object.is_adult) ? globalThis.Boolean(object.is_adult) : undefined,
6576
- isUsWorkAuthorized: isSet5(object.isUsWorkAuthorized) ? globalThis.Boolean(object.isUsWorkAuthorized) : isSet5(object.is_us_work_authorized) ? globalThis.Boolean(object.is_us_work_authorized) : undefined,
7297
+ isAdult: isSet6(object.isAdult) ? globalThis.Boolean(object.isAdult) : isSet6(object.is_adult) ? globalThis.Boolean(object.is_adult) : undefined,
7298
+ isUsWorkAuthorized: isSet6(object.isUsWorkAuthorized) ? globalThis.Boolean(object.isUsWorkAuthorized) : isSet6(object.is_us_work_authorized) ? globalThis.Boolean(object.is_us_work_authorized) : undefined,
6577
7299
  languages: globalThis.Array.isArray(object?.languages) ? object.languages.map((e) => globalThis.String(e)) : [],
6578
- uploadSpeedMbps: isSet5(object.uploadSpeedMbps) ? globalThis.Number(object.uploadSpeedMbps) : isSet5(object.upload_speed_mbps) ? globalThis.Number(object.upload_speed_mbps) : undefined,
6579
- downloadSpeedMbps: isSet5(object.downloadSpeedMbps) ? globalThis.Number(object.downloadSpeedMbps) : isSet5(object.download_speed_mbps) ? globalThis.Number(object.download_speed_mbps) : undefined,
6580
- hasRecentComputer: isSet5(object.hasRecentComputer) ? globalThis.Boolean(object.hasRecentComputer) : isSet5(object.has_recent_computer) ? globalThis.Boolean(object.has_recent_computer) : undefined,
6581
- hasQuietSpace: isSet5(object.hasQuietSpace) ? globalThis.Boolean(object.hasQuietSpace) : isSet5(object.has_quiet_space) ? globalThis.Boolean(object.has_quiet_space) : undefined,
6582
- hasRetailExperience: isSet5(object.hasRetailExperience) ? globalThis.Boolean(object.hasRetailExperience) : isSet5(object.has_retail_experience) ? globalThis.Boolean(object.has_retail_experience) : undefined,
7300
+ uploadSpeedMbps: isSet6(object.uploadSpeedMbps) ? globalThis.Number(object.uploadSpeedMbps) : isSet6(object.upload_speed_mbps) ? globalThis.Number(object.upload_speed_mbps) : undefined,
7301
+ downloadSpeedMbps: isSet6(object.downloadSpeedMbps) ? globalThis.Number(object.downloadSpeedMbps) : isSet6(object.download_speed_mbps) ? globalThis.Number(object.download_speed_mbps) : undefined,
7302
+ hasRecentComputer: isSet6(object.hasRecentComputer) ? globalThis.Boolean(object.hasRecentComputer) : isSet6(object.has_recent_computer) ? globalThis.Boolean(object.has_recent_computer) : undefined,
7303
+ hasQuietSpace: isSet6(object.hasQuietSpace) ? globalThis.Boolean(object.hasQuietSpace) : isSet6(object.has_quiet_space) ? globalThis.Boolean(object.has_quiet_space) : undefined,
7304
+ hasRetailExperience: isSet6(object.hasRetailExperience) ? globalThis.Boolean(object.hasRetailExperience) : isSet6(object.has_retail_experience) ? globalThis.Boolean(object.has_retail_experience) : undefined,
6583
7305
  availability: globalThis.Array.isArray(object?.availability) ? object.availability.map((e) => globalThis.String(e)) : [],
6584
7306
  assessments: globalThis.Array.isArray(object?.assessments) ? object.assessments.map((e) => Assessment.fromJSON(e)) : []
6585
7307
  };
@@ -6670,7 +7392,7 @@ var UpdateNinjaOnboardingApplicationResponse = {
6670
7392
  },
6671
7393
  fromJSON(object) {
6672
7394
  return {
6673
- application: isSet5(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
7395
+ application: isSet6(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
6674
7396
  };
6675
7397
  },
6676
7398
  toJSON(message) {
@@ -6760,7 +7482,7 @@ var SubmitNinjaOnboardingApplicationResponse = {
6760
7482
  },
6761
7483
  fromJSON(object) {
6762
7484
  return {
6763
- application: isSet5(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
7485
+ application: isSet6(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
6764
7486
  };
6765
7487
  },
6766
7488
  toJSON(message) {
@@ -6823,8 +7545,8 @@ var SetNinjaOnboardingStatusRequest = {
6823
7545
  },
6824
7546
  fromJSON(object) {
6825
7547
  return {
6826
- userId: isSet5(object.userId) ? globalThis.String(object.userId) : isSet5(object.user_id) ? globalThis.String(object.user_id) : "",
6827
- status: isSet5(object.status) ? onboardingStatusFromJSON(object.status) : 0
7548
+ userId: isSet6(object.userId) ? globalThis.String(object.userId) : isSet6(object.user_id) ? globalThis.String(object.user_id) : "",
7549
+ status: isSet6(object.status) ? onboardingStatusFromJSON(object.status) : 0
6828
7550
  };
6829
7551
  },
6830
7552
  toJSON(message) {
@@ -6881,7 +7603,7 @@ var SetNinjaOnboardingStatusResponse = {
6881
7603
  },
6882
7604
  fromJSON(object) {
6883
7605
  return {
6884
- application: isSet5(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
7606
+ application: isSet6(object.application) ? NinjaOnboardingApplication.fromJSON(object.application) : undefined
6885
7607
  };
6886
7608
  },
6887
7609
  toJSON(message) {
@@ -6904,6 +7626,14 @@ var NinjaOnboardingServiceDefinition = {
6904
7626
  name: "NinjaOnboardingService",
6905
7627
  fullName: "zenu.users.v1.NinjaOnboardingService",
6906
7628
  methods: {
7629
+ listNinjaOnboardingApplications: {
7630
+ name: "ListNinjaOnboardingApplications",
7631
+ requestType: ListNinjaOnboardingApplicationsRequest,
7632
+ requestStream: false,
7633
+ responseType: ListNinjaOnboardingApplicationsResponse,
7634
+ responseStream: false,
7635
+ options: {}
7636
+ },
6907
7637
  getNinjaOnboardingApplication: {
6908
7638
  name: "GetNinjaOnboardingApplication",
6909
7639
  requestType: GetNinjaOnboardingApplicationRequest,
@@ -6938,7 +7668,7 @@ var NinjaOnboardingServiceDefinition = {
6938
7668
  }
6939
7669
  }
6940
7670
  };
6941
- function isSet5(value) {
7671
+ function isSet6(value) {
6942
7672
  return value !== null && value !== undefined;
6943
7673
  }
6944
7674
  export {
@@ -6974,13 +7704,20 @@ export {
6974
7704
  PublishAgreementVersionRequest,
6975
7705
  OnboardingStatus,
6976
7706
  NinjaOnboardingServiceDefinition,
7707
+ NinjaOnboardingApplicationSummary,
6977
7708
  NinjaOnboardingApplication,
6978
7709
  ListUserAgreementsResponse,
6979
7710
  ListUserAgreementsRequest,
7711
+ ListNinjaOnboardingApplicationsResponse,
7712
+ ListNinjaOnboardingApplicationsRequest,
6980
7713
  ListAgreementsResponse,
6981
7714
  ListAgreementsRequest,
6982
7715
  ListAgreementVersionsResponse,
6983
7716
  ListAgreementVersionsRequest,
7717
+ GetUsersResponse,
7718
+ GetUsersRequest,
7719
+ GetUserResponse,
7720
+ GetUserRequest,
6984
7721
  GetNinjaOnboardingApplicationResponse,
6985
7722
  GetNinjaOnboardingApplicationRequest,
6986
7723
  GetAgreementVersionResponse,