@technova-tech/olive-proto-lib 3.2.1 → 3.2.2

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.
@@ -15781,6 +15781,269 @@ var com;
15781
15781
  }
15782
15782
  }
15783
15783
  business.MerchantLookupRequest = MerchantLookupRequest;
15784
+ class Role extends pb_1.Message {
15785
+ #one_of_decls = [];
15786
+ constructor(data) {
15787
+ super();
15788
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
15789
+ if (!Array.isArray(data) && typeof data == "object") {
15790
+ if ("id" in data && data.id != undefined) {
15791
+ this.id = data.id;
15792
+ }
15793
+ if ("name" in data && data.name != undefined) {
15794
+ this.name = data.name;
15795
+ }
15796
+ }
15797
+ }
15798
+ get id() {
15799
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
15800
+ }
15801
+ set id(value) {
15802
+ pb_1.Message.setField(this, 1, value);
15803
+ }
15804
+ get name() {
15805
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
15806
+ }
15807
+ set name(value) {
15808
+ pb_1.Message.setField(this, 2, value);
15809
+ }
15810
+ static fromObject(data) {
15811
+ const message = new Role({});
15812
+ if (data.id != null) {
15813
+ message.id = data.id;
15814
+ }
15815
+ if (data.name != null) {
15816
+ message.name = data.name;
15817
+ }
15818
+ return message;
15819
+ }
15820
+ toObject() {
15821
+ const data = {};
15822
+ if (this.id != null) {
15823
+ data.id = this.id;
15824
+ }
15825
+ if (this.name != null) {
15826
+ data.name = this.name;
15827
+ }
15828
+ return data;
15829
+ }
15830
+ serialize(w) {
15831
+ const writer = w || new pb_1.BinaryWriter();
15832
+ if (this.id.length)
15833
+ writer.writeString(1, this.id);
15834
+ if (this.name.length)
15835
+ writer.writeString(2, this.name);
15836
+ if (!w)
15837
+ return writer.getResultBuffer();
15838
+ }
15839
+ static deserialize(bytes) {
15840
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Role();
15841
+ while (reader.nextField()) {
15842
+ if (reader.isEndGroup())
15843
+ break;
15844
+ switch (reader.getFieldNumber()) {
15845
+ case 1:
15846
+ message.id = reader.readString();
15847
+ break;
15848
+ case 2:
15849
+ message.name = reader.readString();
15850
+ break;
15851
+ default: reader.skipField();
15852
+ }
15853
+ }
15854
+ return message;
15855
+ }
15856
+ serializeBinary() {
15857
+ return this.serialize();
15858
+ }
15859
+ static deserializeBinary(bytes) {
15860
+ return Role.deserialize(bytes);
15861
+ }
15862
+ }
15863
+ business.Role = Role;
15864
+ class StaffAttributionData extends pb_1.Message {
15865
+ #one_of_decls = [];
15866
+ constructor(data) {
15867
+ super();
15868
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
15869
+ if (!Array.isArray(data) && typeof data == "object") {
15870
+ if ("id" in data && data.id != undefined) {
15871
+ this.id = data.id;
15872
+ }
15873
+ if ("firstName" in data && data.firstName != undefined) {
15874
+ this.firstName = data.firstName;
15875
+ }
15876
+ if ("lastName" in data && data.lastName != undefined) {
15877
+ this.lastName = data.lastName;
15878
+ }
15879
+ if ("email" in data && data.email != undefined) {
15880
+ this.email = data.email;
15881
+ }
15882
+ if ("phone" in data && data.phone != undefined) {
15883
+ this.phone = data.phone;
15884
+ }
15885
+ if ("active" in data && data.active != undefined) {
15886
+ this.active = data.active;
15887
+ }
15888
+ if ("role" in data && data.role != undefined) {
15889
+ this.role = data.role;
15890
+ }
15891
+ }
15892
+ }
15893
+ get id() {
15894
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
15895
+ }
15896
+ set id(value) {
15897
+ pb_1.Message.setField(this, 1, value);
15898
+ }
15899
+ get firstName() {
15900
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
15901
+ }
15902
+ set firstName(value) {
15903
+ pb_1.Message.setField(this, 2, value);
15904
+ }
15905
+ get lastName() {
15906
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
15907
+ }
15908
+ set lastName(value) {
15909
+ pb_1.Message.setField(this, 3, value);
15910
+ }
15911
+ get email() {
15912
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
15913
+ }
15914
+ set email(value) {
15915
+ pb_1.Message.setField(this, 4, value);
15916
+ }
15917
+ get phone() {
15918
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
15919
+ }
15920
+ set phone(value) {
15921
+ pb_1.Message.setField(this, 5, value);
15922
+ }
15923
+ get active() {
15924
+ return pb_1.Message.getFieldWithDefault(this, 6, false);
15925
+ }
15926
+ set active(value) {
15927
+ pb_1.Message.setField(this, 6, value);
15928
+ }
15929
+ get role() {
15930
+ return pb_1.Message.getWrapperField(this, Role, 7);
15931
+ }
15932
+ set role(value) {
15933
+ pb_1.Message.setWrapperField(this, 7, value);
15934
+ }
15935
+ get hasRole() {
15936
+ return pb_1.Message.getField(this, 7) != null;
15937
+ }
15938
+ static fromObject(data) {
15939
+ const message = new StaffAttributionData({});
15940
+ if (data.id != null) {
15941
+ message.id = data.id;
15942
+ }
15943
+ if (data.firstName != null) {
15944
+ message.firstName = data.firstName;
15945
+ }
15946
+ if (data.lastName != null) {
15947
+ message.lastName = data.lastName;
15948
+ }
15949
+ if (data.email != null) {
15950
+ message.email = data.email;
15951
+ }
15952
+ if (data.phone != null) {
15953
+ message.phone = data.phone;
15954
+ }
15955
+ if (data.active != null) {
15956
+ message.active = data.active;
15957
+ }
15958
+ if (data.role != null) {
15959
+ message.role = Role.fromObject(data.role);
15960
+ }
15961
+ return message;
15962
+ }
15963
+ toObject() {
15964
+ const data = {};
15965
+ if (this.id != null) {
15966
+ data.id = this.id;
15967
+ }
15968
+ if (this.firstName != null) {
15969
+ data.firstName = this.firstName;
15970
+ }
15971
+ if (this.lastName != null) {
15972
+ data.lastName = this.lastName;
15973
+ }
15974
+ if (this.email != null) {
15975
+ data.email = this.email;
15976
+ }
15977
+ if (this.phone != null) {
15978
+ data.phone = this.phone;
15979
+ }
15980
+ if (this.active != null) {
15981
+ data.active = this.active;
15982
+ }
15983
+ if (this.role != null) {
15984
+ data.role = this.role.toObject();
15985
+ }
15986
+ return data;
15987
+ }
15988
+ serialize(w) {
15989
+ const writer = w || new pb_1.BinaryWriter();
15990
+ if (this.id.length)
15991
+ writer.writeString(1, this.id);
15992
+ if (this.firstName.length)
15993
+ writer.writeString(2, this.firstName);
15994
+ if (this.lastName.length)
15995
+ writer.writeString(3, this.lastName);
15996
+ if (this.email.length)
15997
+ writer.writeString(4, this.email);
15998
+ if (this.phone.length)
15999
+ writer.writeString(5, this.phone);
16000
+ if (this.active != false)
16001
+ writer.writeBool(6, this.active);
16002
+ if (this.hasRole)
16003
+ writer.writeMessage(7, this.role, () => this.role.serialize(writer));
16004
+ if (!w)
16005
+ return writer.getResultBuffer();
16006
+ }
16007
+ static deserialize(bytes) {
16008
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StaffAttributionData();
16009
+ while (reader.nextField()) {
16010
+ if (reader.isEndGroup())
16011
+ break;
16012
+ switch (reader.getFieldNumber()) {
16013
+ case 1:
16014
+ message.id = reader.readString();
16015
+ break;
16016
+ case 2:
16017
+ message.firstName = reader.readString();
16018
+ break;
16019
+ case 3:
16020
+ message.lastName = reader.readString();
16021
+ break;
16022
+ case 4:
16023
+ message.email = reader.readString();
16024
+ break;
16025
+ case 5:
16026
+ message.phone = reader.readString();
16027
+ break;
16028
+ case 6:
16029
+ message.active = reader.readBool();
16030
+ break;
16031
+ case 7:
16032
+ reader.readMessage(message.role, () => message.role = Role.deserialize(reader));
16033
+ break;
16034
+ default: reader.skipField();
16035
+ }
16036
+ }
16037
+ return message;
16038
+ }
16039
+ serializeBinary() {
16040
+ return this.serialize();
16041
+ }
16042
+ static deserializeBinary(bytes) {
16043
+ return StaffAttributionData.deserialize(bytes);
16044
+ }
16045
+ }
16046
+ business.StaffAttributionData = StaffAttributionData;
15784
16047
  class MerchantData extends pb_1.Message {
15785
16048
  #one_of_decls = [];
15786
16049
  constructor(data) {
@@ -15826,6 +16089,18 @@ var com;
15826
16089
  if ("updatedAt" in data && data.updatedAt != undefined) {
15827
16090
  this.updatedAt = data.updatedAt;
15828
16091
  }
16092
+ if ("staffAttributedId" in data && data.staffAttributedId != undefined) {
16093
+ this.staffAttributedId = data.staffAttributedId;
16094
+ }
16095
+ if ("staffAttributedLastUpdateDatetime" in data && data.staffAttributedLastUpdateDatetime != undefined) {
16096
+ this.staffAttributedLastUpdateDatetime = data.staffAttributedLastUpdateDatetime;
16097
+ }
16098
+ if ("staffAttributedStatus" in data && data.staffAttributedStatus != undefined) {
16099
+ this.staffAttributedStatus = data.staffAttributedStatus;
16100
+ }
16101
+ if ("staffAttributed" in data && data.staffAttributed != undefined) {
16102
+ this.staffAttributed = data.staffAttributed;
16103
+ }
15829
16104
  }
15830
16105
  }
15831
16106
  get id() {
@@ -15906,19 +16181,46 @@ var com;
15906
16181
  set updatedAt(value) {
15907
16182
  pb_1.Message.setField(this, 13, value);
15908
16183
  }
15909
- static fromObject(data) {
15910
- const message = new MerchantData({});
15911
- if (data.id != null) {
15912
- message.id = data.id;
15913
- }
15914
- if (data.email != null) {
15915
- message.email = data.email;
15916
- }
15917
- if (data.phoneNumber != null) {
15918
- message.phoneNumber = data.phoneNumber;
15919
- }
15920
- if (data.businessName != null) {
15921
- message.businessName = data.businessName;
16184
+ get staffAttributedId() {
16185
+ return pb_1.Message.getFieldWithDefault(this, 14, "");
16186
+ }
16187
+ set staffAttributedId(value) {
16188
+ pb_1.Message.setField(this, 14, value);
16189
+ }
16190
+ get staffAttributedLastUpdateDatetime() {
16191
+ return pb_1.Message.getFieldWithDefault(this, 15, "");
16192
+ }
16193
+ set staffAttributedLastUpdateDatetime(value) {
16194
+ pb_1.Message.setField(this, 15, value);
16195
+ }
16196
+ get staffAttributedStatus() {
16197
+ return pb_1.Message.getFieldWithDefault(this, 16, "");
16198
+ }
16199
+ set staffAttributedStatus(value) {
16200
+ pb_1.Message.setField(this, 16, value);
16201
+ }
16202
+ get staffAttributed() {
16203
+ return pb_1.Message.getWrapperField(this, StaffAttributionData, 17);
16204
+ }
16205
+ set staffAttributed(value) {
16206
+ pb_1.Message.setWrapperField(this, 17, value);
16207
+ }
16208
+ get hasStaffAttributed() {
16209
+ return pb_1.Message.getField(this, 17) != null;
16210
+ }
16211
+ static fromObject(data) {
16212
+ const message = new MerchantData({});
16213
+ if (data.id != null) {
16214
+ message.id = data.id;
16215
+ }
16216
+ if (data.email != null) {
16217
+ message.email = data.email;
16218
+ }
16219
+ if (data.phoneNumber != null) {
16220
+ message.phoneNumber = data.phoneNumber;
16221
+ }
16222
+ if (data.businessName != null) {
16223
+ message.businessName = data.businessName;
15922
16224
  }
15923
16225
  if (data.accountNumber != null) {
15924
16226
  message.accountNumber = data.accountNumber;
@@ -15947,6 +16249,18 @@ var com;
15947
16249
  if (data.updatedAt != null) {
15948
16250
  message.updatedAt = data.updatedAt;
15949
16251
  }
16252
+ if (data.staffAttributedId != null) {
16253
+ message.staffAttributedId = data.staffAttributedId;
16254
+ }
16255
+ if (data.staffAttributedLastUpdateDatetime != null) {
16256
+ message.staffAttributedLastUpdateDatetime = data.staffAttributedLastUpdateDatetime;
16257
+ }
16258
+ if (data.staffAttributedStatus != null) {
16259
+ message.staffAttributedStatus = data.staffAttributedStatus;
16260
+ }
16261
+ if (data.staffAttributed != null) {
16262
+ message.staffAttributed = StaffAttributionData.fromObject(data.staffAttributed);
16263
+ }
15950
16264
  return message;
15951
16265
  }
15952
16266
  toObject() {
@@ -15975,98 +16289,576 @@ var com;
15975
16289
  if (this.isVerified != null) {
15976
16290
  data.isVerified = this.isVerified;
15977
16291
  }
15978
- if (this.isValidated != null) {
15979
- data.isValidated = this.isValidated;
16292
+ if (this.isValidated != null) {
16293
+ data.isValidated = this.isValidated;
16294
+ }
16295
+ if (this.isActive != null) {
16296
+ data.isActive = this.isActive;
16297
+ }
16298
+ if (this.hasPin != null) {
16299
+ data.hasPin = this.hasPin;
16300
+ }
16301
+ if (this.createdAt != null) {
16302
+ data.createdAt = this.createdAt;
16303
+ }
16304
+ if (this.updatedAt != null) {
16305
+ data.updatedAt = this.updatedAt;
16306
+ }
16307
+ if (this.staffAttributedId != null) {
16308
+ data.staffAttributedId = this.staffAttributedId;
16309
+ }
16310
+ if (this.staffAttributedLastUpdateDatetime != null) {
16311
+ data.staffAttributedLastUpdateDatetime = this.staffAttributedLastUpdateDatetime;
16312
+ }
16313
+ if (this.staffAttributedStatus != null) {
16314
+ data.staffAttributedStatus = this.staffAttributedStatus;
16315
+ }
16316
+ if (this.staffAttributed != null) {
16317
+ data.staffAttributed = this.staffAttributed.toObject();
16318
+ }
16319
+ return data;
16320
+ }
16321
+ serialize(w) {
16322
+ const writer = w || new pb_1.BinaryWriter();
16323
+ if (this.id.length)
16324
+ writer.writeString(1, this.id);
16325
+ if (this.email.length)
16326
+ writer.writeString(2, this.email);
16327
+ if (this.phoneNumber.length)
16328
+ writer.writeString(3, this.phoneNumber);
16329
+ if (this.businessName.length)
16330
+ writer.writeString(4, this.businessName);
16331
+ if (this.accountNumber.length)
16332
+ writer.writeString(5, this.accountNumber);
16333
+ if (this.bvn.length)
16334
+ writer.writeString(6, this.bvn);
16335
+ if (this.nin.length)
16336
+ writer.writeString(7, this.nin);
16337
+ if (this.isVerified != false)
16338
+ writer.writeBool(8, this.isVerified);
16339
+ if (this.isValidated != false)
16340
+ writer.writeBool(9, this.isValidated);
16341
+ if (this.isActive != false)
16342
+ writer.writeBool(10, this.isActive);
16343
+ if (this.hasPin != false)
16344
+ writer.writeBool(11, this.hasPin);
16345
+ if (this.createdAt.length)
16346
+ writer.writeString(12, this.createdAt);
16347
+ if (this.updatedAt.length)
16348
+ writer.writeString(13, this.updatedAt);
16349
+ if (this.staffAttributedId.length)
16350
+ writer.writeString(14, this.staffAttributedId);
16351
+ if (this.staffAttributedLastUpdateDatetime.length)
16352
+ writer.writeString(15, this.staffAttributedLastUpdateDatetime);
16353
+ if (this.staffAttributedStatus.length)
16354
+ writer.writeString(16, this.staffAttributedStatus);
16355
+ if (this.hasStaffAttributed)
16356
+ writer.writeMessage(17, this.staffAttributed, () => this.staffAttributed.serialize(writer));
16357
+ if (!w)
16358
+ return writer.getResultBuffer();
16359
+ }
16360
+ static deserialize(bytes) {
16361
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerchantData();
16362
+ while (reader.nextField()) {
16363
+ if (reader.isEndGroup())
16364
+ break;
16365
+ switch (reader.getFieldNumber()) {
16366
+ case 1:
16367
+ message.id = reader.readString();
16368
+ break;
16369
+ case 2:
16370
+ message.email = reader.readString();
16371
+ break;
16372
+ case 3:
16373
+ message.phoneNumber = reader.readString();
16374
+ break;
16375
+ case 4:
16376
+ message.businessName = reader.readString();
16377
+ break;
16378
+ case 5:
16379
+ message.accountNumber = reader.readString();
16380
+ break;
16381
+ case 6:
16382
+ message.bvn = reader.readString();
16383
+ break;
16384
+ case 7:
16385
+ message.nin = reader.readString();
16386
+ break;
16387
+ case 8:
16388
+ message.isVerified = reader.readBool();
16389
+ break;
16390
+ case 9:
16391
+ message.isValidated = reader.readBool();
16392
+ break;
16393
+ case 10:
16394
+ message.isActive = reader.readBool();
16395
+ break;
16396
+ case 11:
16397
+ message.hasPin = reader.readBool();
16398
+ break;
16399
+ case 12:
16400
+ message.createdAt = reader.readString();
16401
+ break;
16402
+ case 13:
16403
+ message.updatedAt = reader.readString();
16404
+ break;
16405
+ case 14:
16406
+ message.staffAttributedId = reader.readString();
16407
+ break;
16408
+ case 15:
16409
+ message.staffAttributedLastUpdateDatetime = reader.readString();
16410
+ break;
16411
+ case 16:
16412
+ message.staffAttributedStatus = reader.readString();
16413
+ break;
16414
+ case 17:
16415
+ reader.readMessage(message.staffAttributed, () => message.staffAttributed = StaffAttributionData.deserialize(reader));
16416
+ break;
16417
+ default: reader.skipField();
16418
+ }
16419
+ }
16420
+ return message;
16421
+ }
16422
+ serializeBinary() {
16423
+ return this.serialize();
16424
+ }
16425
+ static deserializeBinary(bytes) {
16426
+ return MerchantData.deserialize(bytes);
16427
+ }
16428
+ }
16429
+ business.MerchantData = MerchantData;
16430
+ class MerchantDataResponse extends pb_1.Message {
16431
+ #one_of_decls = [];
16432
+ constructor(data) {
16433
+ super();
16434
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls);
16435
+ if (!Array.isArray(data) && typeof data == "object") {
16436
+ if ("success" in data && data.success != undefined) {
16437
+ this.success = data.success;
16438
+ }
16439
+ if ("status" in data && data.status != undefined) {
16440
+ this.status = data.status;
16441
+ }
16442
+ if ("data" in data && data.data != undefined) {
16443
+ this.data = data.data;
16444
+ }
16445
+ if ("error" in data && data.error != undefined) {
16446
+ this.error = data.error;
16447
+ }
16448
+ if ("message" in data && data.message != undefined) {
16449
+ this.message = data.message;
16450
+ }
16451
+ if ("errors" in data && data.errors != undefined) {
16452
+ this.errors = data.errors;
16453
+ }
16454
+ }
16455
+ }
16456
+ get success() {
16457
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
16458
+ }
16459
+ set success(value) {
16460
+ pb_1.Message.setField(this, 1, value);
16461
+ }
16462
+ get status() {
16463
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
16464
+ }
16465
+ set status(value) {
16466
+ pb_1.Message.setField(this, 2, value);
16467
+ }
16468
+ get data() {
16469
+ return pb_1.Message.getWrapperField(this, MerchantData, 3);
16470
+ }
16471
+ set data(value) {
16472
+ pb_1.Message.setWrapperField(this, 3, value);
16473
+ }
16474
+ get hasData() {
16475
+ return pb_1.Message.getField(this, 3) != null;
16476
+ }
16477
+ get error() {
16478
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
16479
+ }
16480
+ set error(value) {
16481
+ pb_1.Message.setField(this, 4, value);
16482
+ }
16483
+ get message() {
16484
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
16485
+ }
16486
+ set message(value) {
16487
+ pb_1.Message.setField(this, 5, value);
16488
+ }
16489
+ get errors() {
16490
+ return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 6);
16491
+ }
16492
+ set errors(value) {
16493
+ pb_1.Message.setRepeatedWrapperField(this, 6, value);
16494
+ }
16495
+ static fromObject(data) {
16496
+ const message = new MerchantDataResponse({});
16497
+ if (data.success != null) {
16498
+ message.success = data.success;
16499
+ }
16500
+ if (data.status != null) {
16501
+ message.status = data.status;
16502
+ }
16503
+ if (data.data != null) {
16504
+ message.data = MerchantData.fromObject(data.data);
16505
+ }
16506
+ if (data.error != null) {
16507
+ message.error = data.error;
16508
+ }
16509
+ if (data.message != null) {
16510
+ message.message = data.message;
16511
+ }
16512
+ if (data.errors != null) {
16513
+ message.errors = data.errors.map(item => ValidationErrors.fromObject(item));
16514
+ }
16515
+ return message;
16516
+ }
16517
+ toObject() {
16518
+ const data = {};
16519
+ if (this.success != null) {
16520
+ data.success = this.success;
16521
+ }
16522
+ if (this.status != null) {
16523
+ data.status = this.status;
16524
+ }
16525
+ if (this.data != null) {
16526
+ data.data = this.data.toObject();
16527
+ }
16528
+ if (this.error != null) {
16529
+ data.error = this.error;
16530
+ }
16531
+ if (this.message != null) {
16532
+ data.message = this.message;
16533
+ }
16534
+ if (this.errors != null) {
16535
+ data.errors = this.errors.map((item) => item.toObject());
16536
+ }
16537
+ return data;
16538
+ }
16539
+ serialize(w) {
16540
+ const writer = w || new pb_1.BinaryWriter();
16541
+ if (this.success != false)
16542
+ writer.writeBool(1, this.success);
16543
+ if (this.status.length)
16544
+ writer.writeString(2, this.status);
16545
+ if (this.hasData)
16546
+ writer.writeMessage(3, this.data, () => this.data.serialize(writer));
16547
+ if (this.error.length)
16548
+ writer.writeString(4, this.error);
16549
+ if (this.message.length)
16550
+ writer.writeString(5, this.message);
16551
+ if (this.errors.length)
16552
+ writer.writeRepeatedMessage(6, this.errors, (item) => item.serialize(writer));
16553
+ if (!w)
16554
+ return writer.getResultBuffer();
16555
+ }
16556
+ static deserialize(bytes) {
16557
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerchantDataResponse();
16558
+ while (reader.nextField()) {
16559
+ if (reader.isEndGroup())
16560
+ break;
16561
+ switch (reader.getFieldNumber()) {
16562
+ case 1:
16563
+ message.success = reader.readBool();
16564
+ break;
16565
+ case 2:
16566
+ message.status = reader.readString();
16567
+ break;
16568
+ case 3:
16569
+ reader.readMessage(message.data, () => message.data = MerchantData.deserialize(reader));
16570
+ break;
16571
+ case 4:
16572
+ message.error = reader.readString();
16573
+ break;
16574
+ case 5:
16575
+ message.message = reader.readString();
16576
+ break;
16577
+ case 6:
16578
+ reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ValidationErrors.deserialize(reader), ValidationErrors));
16579
+ break;
16580
+ default: reader.skipField();
16581
+ }
16582
+ }
16583
+ return message;
16584
+ }
16585
+ serializeBinary() {
16586
+ return this.serialize();
16587
+ }
16588
+ static deserializeBinary(bytes) {
16589
+ return MerchantDataResponse.deserialize(bytes);
16590
+ }
16591
+ }
16592
+ business.MerchantDataResponse = MerchantDataResponse;
16593
+ class MMerchantDataResponse extends pb_1.Message {
16594
+ #one_of_decls = [];
16595
+ constructor(data) {
16596
+ super();
16597
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 7], this.#one_of_decls);
16598
+ if (!Array.isArray(data) && typeof data == "object") {
16599
+ if ("success" in data && data.success != undefined) {
16600
+ this.success = data.success;
16601
+ }
16602
+ if ("status" in data && data.status != undefined) {
16603
+ this.status = data.status;
16604
+ }
16605
+ if ("data" in data && data.data != undefined) {
16606
+ this.data = data.data;
16607
+ }
16608
+ if ("error" in data && data.error != undefined) {
16609
+ this.error = data.error;
16610
+ }
16611
+ if ("message" in data && data.message != undefined) {
16612
+ this.message = data.message;
16613
+ }
16614
+ if ("pagination" in data && data.pagination != undefined) {
16615
+ this.pagination = data.pagination;
16616
+ }
16617
+ if ("errors" in data && data.errors != undefined) {
16618
+ this.errors = data.errors;
16619
+ }
16620
+ }
16621
+ }
16622
+ get success() {
16623
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
16624
+ }
16625
+ set success(value) {
16626
+ pb_1.Message.setField(this, 1, value);
16627
+ }
16628
+ get status() {
16629
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
16630
+ }
16631
+ set status(value) {
16632
+ pb_1.Message.setField(this, 2, value);
16633
+ }
16634
+ get data() {
16635
+ return pb_1.Message.getRepeatedWrapperField(this, MerchantData, 3);
16636
+ }
16637
+ set data(value) {
16638
+ pb_1.Message.setRepeatedWrapperField(this, 3, value);
16639
+ }
16640
+ get error() {
16641
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
16642
+ }
16643
+ set error(value) {
16644
+ pb_1.Message.setField(this, 4, value);
16645
+ }
16646
+ get message() {
16647
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
16648
+ }
16649
+ set message(value) {
16650
+ pb_1.Message.setField(this, 5, value);
16651
+ }
16652
+ get pagination() {
16653
+ return pb_1.Message.getWrapperField(this, Pagination, 6);
16654
+ }
16655
+ set pagination(value) {
16656
+ pb_1.Message.setWrapperField(this, 6, value);
16657
+ }
16658
+ get hasPagination() {
16659
+ return pb_1.Message.getField(this, 6) != null;
16660
+ }
16661
+ get errors() {
16662
+ return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 7);
16663
+ }
16664
+ set errors(value) {
16665
+ pb_1.Message.setRepeatedWrapperField(this, 7, value);
16666
+ }
16667
+ static fromObject(data) {
16668
+ const message = new MMerchantDataResponse({});
16669
+ if (data.success != null) {
16670
+ message.success = data.success;
16671
+ }
16672
+ if (data.status != null) {
16673
+ message.status = data.status;
16674
+ }
16675
+ if (data.data != null) {
16676
+ message.data = data.data.map(item => MerchantData.fromObject(item));
16677
+ }
16678
+ if (data.error != null) {
16679
+ message.error = data.error;
16680
+ }
16681
+ if (data.message != null) {
16682
+ message.message = data.message;
16683
+ }
16684
+ if (data.pagination != null) {
16685
+ message.pagination = Pagination.fromObject(data.pagination);
16686
+ }
16687
+ if (data.errors != null) {
16688
+ message.errors = data.errors.map(item => ValidationErrors.fromObject(item));
16689
+ }
16690
+ return message;
16691
+ }
16692
+ toObject() {
16693
+ const data = {};
16694
+ if (this.success != null) {
16695
+ data.success = this.success;
16696
+ }
16697
+ if (this.status != null) {
16698
+ data.status = this.status;
16699
+ }
16700
+ if (this.data != null) {
16701
+ data.data = this.data.map((item) => item.toObject());
16702
+ }
16703
+ if (this.error != null) {
16704
+ data.error = this.error;
16705
+ }
16706
+ if (this.message != null) {
16707
+ data.message = this.message;
16708
+ }
16709
+ if (this.pagination != null) {
16710
+ data.pagination = this.pagination.toObject();
16711
+ }
16712
+ if (this.errors != null) {
16713
+ data.errors = this.errors.map((item) => item.toObject());
16714
+ }
16715
+ return data;
16716
+ }
16717
+ serialize(w) {
16718
+ const writer = w || new pb_1.BinaryWriter();
16719
+ if (this.success != false)
16720
+ writer.writeBool(1, this.success);
16721
+ if (this.status.length)
16722
+ writer.writeString(2, this.status);
16723
+ if (this.data.length)
16724
+ writer.writeRepeatedMessage(3, this.data, (item) => item.serialize(writer));
16725
+ if (this.error.length)
16726
+ writer.writeString(4, this.error);
16727
+ if (this.message.length)
16728
+ writer.writeString(5, this.message);
16729
+ if (this.hasPagination)
16730
+ writer.writeMessage(6, this.pagination, () => this.pagination.serialize(writer));
16731
+ if (this.errors.length)
16732
+ writer.writeRepeatedMessage(7, this.errors, (item) => item.serialize(writer));
16733
+ if (!w)
16734
+ return writer.getResultBuffer();
16735
+ }
16736
+ static deserialize(bytes) {
16737
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MMerchantDataResponse();
16738
+ while (reader.nextField()) {
16739
+ if (reader.isEndGroup())
16740
+ break;
16741
+ switch (reader.getFieldNumber()) {
16742
+ case 1:
16743
+ message.success = reader.readBool();
16744
+ break;
16745
+ case 2:
16746
+ message.status = reader.readString();
16747
+ break;
16748
+ case 3:
16749
+ reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, MerchantData.deserialize(reader), MerchantData));
16750
+ break;
16751
+ case 4:
16752
+ message.error = reader.readString();
16753
+ break;
16754
+ case 5:
16755
+ message.message = reader.readString();
16756
+ break;
16757
+ case 6:
16758
+ reader.readMessage(message.pagination, () => message.pagination = Pagination.deserialize(reader));
16759
+ break;
16760
+ case 7:
16761
+ reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 7, ValidationErrors.deserialize(reader), ValidationErrors));
16762
+ break;
16763
+ default: reader.skipField();
16764
+ }
16765
+ }
16766
+ return message;
16767
+ }
16768
+ serializeBinary() {
16769
+ return this.serialize();
16770
+ }
16771
+ static deserializeBinary(bytes) {
16772
+ return MMerchantDataResponse.deserialize(bytes);
16773
+ }
16774
+ }
16775
+ business.MMerchantDataResponse = MMerchantDataResponse;
16776
+ class AssignAttributionStaffRequest extends pb_1.Message {
16777
+ #one_of_decls = [];
16778
+ constructor(data) {
16779
+ super();
16780
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
16781
+ if (!Array.isArray(data) && typeof data == "object") {
16782
+ if ("staffId" in data && data.staffId != undefined) {
16783
+ this.staffId = data.staffId;
16784
+ }
16785
+ if ("merchantId" in data && data.merchantId != undefined) {
16786
+ this.merchantId = data.merchantId;
16787
+ }
16788
+ if ("actionBy" in data && data.actionBy != undefined) {
16789
+ this.actionBy = data.actionBy;
16790
+ }
16791
+ }
16792
+ }
16793
+ get staffId() {
16794
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
16795
+ }
16796
+ set staffId(value) {
16797
+ pb_1.Message.setField(this, 1, value);
16798
+ }
16799
+ get merchantId() {
16800
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
16801
+ }
16802
+ set merchantId(value) {
16803
+ pb_1.Message.setField(this, 2, value);
16804
+ }
16805
+ get actionBy() {
16806
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
16807
+ }
16808
+ set actionBy(value) {
16809
+ pb_1.Message.setField(this, 3, value);
16810
+ }
16811
+ static fromObject(data) {
16812
+ const message = new AssignAttributionStaffRequest({});
16813
+ if (data.staffId != null) {
16814
+ message.staffId = data.staffId;
16815
+ }
16816
+ if (data.merchantId != null) {
16817
+ message.merchantId = data.merchantId;
15980
16818
  }
15981
- if (this.isActive != null) {
15982
- data.isActive = this.isActive;
16819
+ if (data.actionBy != null) {
16820
+ message.actionBy = data.actionBy;
15983
16821
  }
15984
- if (this.hasPin != null) {
15985
- data.hasPin = this.hasPin;
16822
+ return message;
16823
+ }
16824
+ toObject() {
16825
+ const data = {};
16826
+ if (this.staffId != null) {
16827
+ data.staffId = this.staffId;
15986
16828
  }
15987
- if (this.createdAt != null) {
15988
- data.createdAt = this.createdAt;
16829
+ if (this.merchantId != null) {
16830
+ data.merchantId = this.merchantId;
15989
16831
  }
15990
- if (this.updatedAt != null) {
15991
- data.updatedAt = this.updatedAt;
16832
+ if (this.actionBy != null) {
16833
+ data.actionBy = this.actionBy;
15992
16834
  }
15993
16835
  return data;
15994
16836
  }
15995
16837
  serialize(w) {
15996
16838
  const writer = w || new pb_1.BinaryWriter();
15997
- if (this.id.length)
15998
- writer.writeString(1, this.id);
15999
- if (this.email.length)
16000
- writer.writeString(2, this.email);
16001
- if (this.phoneNumber.length)
16002
- writer.writeString(3, this.phoneNumber);
16003
- if (this.businessName.length)
16004
- writer.writeString(4, this.businessName);
16005
- if (this.accountNumber.length)
16006
- writer.writeString(5, this.accountNumber);
16007
- if (this.bvn.length)
16008
- writer.writeString(6, this.bvn);
16009
- if (this.nin.length)
16010
- writer.writeString(7, this.nin);
16011
- if (this.isVerified != false)
16012
- writer.writeBool(8, this.isVerified);
16013
- if (this.isValidated != false)
16014
- writer.writeBool(9, this.isValidated);
16015
- if (this.isActive != false)
16016
- writer.writeBool(10, this.isActive);
16017
- if (this.hasPin != false)
16018
- writer.writeBool(11, this.hasPin);
16019
- if (this.createdAt.length)
16020
- writer.writeString(12, this.createdAt);
16021
- if (this.updatedAt.length)
16022
- writer.writeString(13, this.updatedAt);
16839
+ if (this.staffId.length)
16840
+ writer.writeString(1, this.staffId);
16841
+ if (this.merchantId.length)
16842
+ writer.writeString(2, this.merchantId);
16843
+ if (this.actionBy.length)
16844
+ writer.writeString(3, this.actionBy);
16023
16845
  if (!w)
16024
16846
  return writer.getResultBuffer();
16025
16847
  }
16026
16848
  static deserialize(bytes) {
16027
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerchantData();
16849
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssignAttributionStaffRequest();
16028
16850
  while (reader.nextField()) {
16029
16851
  if (reader.isEndGroup())
16030
16852
  break;
16031
16853
  switch (reader.getFieldNumber()) {
16032
16854
  case 1:
16033
- message.id = reader.readString();
16855
+ message.staffId = reader.readString();
16034
16856
  break;
16035
16857
  case 2:
16036
- message.email = reader.readString();
16858
+ message.merchantId = reader.readString();
16037
16859
  break;
16038
16860
  case 3:
16039
- message.phoneNumber = reader.readString();
16040
- break;
16041
- case 4:
16042
- message.businessName = reader.readString();
16043
- break;
16044
- case 5:
16045
- message.accountNumber = reader.readString();
16046
- break;
16047
- case 6:
16048
- message.bvn = reader.readString();
16049
- break;
16050
- case 7:
16051
- message.nin = reader.readString();
16052
- break;
16053
- case 8:
16054
- message.isVerified = reader.readBool();
16055
- break;
16056
- case 9:
16057
- message.isValidated = reader.readBool();
16058
- break;
16059
- case 10:
16060
- message.isActive = reader.readBool();
16061
- break;
16062
- case 11:
16063
- message.hasPin = reader.readBool();
16064
- break;
16065
- case 12:
16066
- message.createdAt = reader.readString();
16067
- break;
16068
- case 13:
16069
- message.updatedAt = reader.readString();
16861
+ message.actionBy = reader.readString();
16070
16862
  break;
16071
16863
  default: reader.skipField();
16072
16864
  }
@@ -16077,15 +16869,15 @@ var com;
16077
16869
  return this.serialize();
16078
16870
  }
16079
16871
  static deserializeBinary(bytes) {
16080
- return MerchantData.deserialize(bytes);
16872
+ return AssignAttributionStaffRequest.deserialize(bytes);
16081
16873
  }
16082
16874
  }
16083
- business.MerchantData = MerchantData;
16084
- class MerchantDataResponse extends pb_1.Message {
16875
+ business.AssignAttributionStaffRequest = AssignAttributionStaffRequest;
16876
+ class DefaultResponse extends pb_1.Message {
16085
16877
  #one_of_decls = [];
16086
16878
  constructor(data) {
16087
16879
  super();
16088
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls);
16880
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls);
16089
16881
  if (!Array.isArray(data) && typeof data == "object") {
16090
16882
  if ("success" in data && data.success != undefined) {
16091
16883
  this.success = data.success;
@@ -16093,9 +16885,6 @@ var com;
16093
16885
  if ("status" in data && data.status != undefined) {
16094
16886
  this.status = data.status;
16095
16887
  }
16096
- if ("data" in data && data.data != undefined) {
16097
- this.data = data.data;
16098
- }
16099
16888
  if ("error" in data && data.error != undefined) {
16100
16889
  this.error = data.error;
16101
16890
  }
@@ -16119,44 +16908,32 @@ var com;
16119
16908
  set status(value) {
16120
16909
  pb_1.Message.setField(this, 2, value);
16121
16910
  }
16122
- get data() {
16123
- return pb_1.Message.getWrapperField(this, MerchantData, 3);
16124
- }
16125
- set data(value) {
16126
- pb_1.Message.setWrapperField(this, 3, value);
16127
- }
16128
- get hasData() {
16129
- return pb_1.Message.getField(this, 3) != null;
16130
- }
16131
16911
  get error() {
16132
- return pb_1.Message.getFieldWithDefault(this, 4, "");
16912
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
16133
16913
  }
16134
16914
  set error(value) {
16135
- pb_1.Message.setField(this, 4, value);
16915
+ pb_1.Message.setField(this, 3, value);
16136
16916
  }
16137
16917
  get message() {
16138
- return pb_1.Message.getFieldWithDefault(this, 5, "");
16918
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
16139
16919
  }
16140
16920
  set message(value) {
16141
- pb_1.Message.setField(this, 5, value);
16921
+ pb_1.Message.setField(this, 4, value);
16142
16922
  }
16143
16923
  get errors() {
16144
- return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 6);
16924
+ return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 5);
16145
16925
  }
16146
16926
  set errors(value) {
16147
- pb_1.Message.setRepeatedWrapperField(this, 6, value);
16927
+ pb_1.Message.setRepeatedWrapperField(this, 5, value);
16148
16928
  }
16149
16929
  static fromObject(data) {
16150
- const message = new MerchantDataResponse({});
16930
+ const message = new DefaultResponse({});
16151
16931
  if (data.success != null) {
16152
16932
  message.success = data.success;
16153
16933
  }
16154
16934
  if (data.status != null) {
16155
16935
  message.status = data.status;
16156
16936
  }
16157
- if (data.data != null) {
16158
- message.data = MerchantData.fromObject(data.data);
16159
- }
16160
16937
  if (data.error != null) {
16161
16938
  message.error = data.error;
16162
16939
  }
@@ -16176,9 +16953,6 @@ var com;
16176
16953
  if (this.status != null) {
16177
16954
  data.status = this.status;
16178
16955
  }
16179
- if (this.data != null) {
16180
- data.data = this.data.toObject();
16181
- }
16182
16956
  if (this.error != null) {
16183
16957
  data.error = this.error;
16184
16958
  }
@@ -16196,19 +16970,17 @@ var com;
16196
16970
  writer.writeBool(1, this.success);
16197
16971
  if (this.status.length)
16198
16972
  writer.writeString(2, this.status);
16199
- if (this.hasData)
16200
- writer.writeMessage(3, this.data, () => this.data.serialize(writer));
16201
16973
  if (this.error.length)
16202
- writer.writeString(4, this.error);
16974
+ writer.writeString(3, this.error);
16203
16975
  if (this.message.length)
16204
- writer.writeString(5, this.message);
16976
+ writer.writeString(4, this.message);
16205
16977
  if (this.errors.length)
16206
- writer.writeRepeatedMessage(6, this.errors, (item) => item.serialize(writer));
16978
+ writer.writeRepeatedMessage(5, this.errors, (item) => item.serialize(writer));
16207
16979
  if (!w)
16208
16980
  return writer.getResultBuffer();
16209
16981
  }
16210
16982
  static deserialize(bytes) {
16211
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MerchantDataResponse();
16983
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DefaultResponse();
16212
16984
  while (reader.nextField()) {
16213
16985
  if (reader.isEndGroup())
16214
16986
  break;
@@ -16220,16 +16992,13 @@ var com;
16220
16992
  message.status = reader.readString();
16221
16993
  break;
16222
16994
  case 3:
16223
- reader.readMessage(message.data, () => message.data = MerchantData.deserialize(reader));
16224
- break;
16225
- case 4:
16226
16995
  message.error = reader.readString();
16227
16996
  break;
16228
- case 5:
16997
+ case 4:
16229
16998
  message.message = reader.readString();
16230
16999
  break;
16231
- case 6:
16232
- reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ValidationErrors.deserialize(reader), ValidationErrors));
17000
+ case 5:
17001
+ reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ValidationErrors.deserialize(reader), ValidationErrors));
16233
17002
  break;
16234
17003
  default: reader.skipField();
16235
17004
  }
@@ -16240,179 +17009,56 @@ var com;
16240
17009
  return this.serialize();
16241
17010
  }
16242
17011
  static deserializeBinary(bytes) {
16243
- return MerchantDataResponse.deserialize(bytes);
17012
+ return DefaultResponse.deserialize(bytes);
16244
17013
  }
16245
17014
  }
16246
- business.MerchantDataResponse = MerchantDataResponse;
16247
- class MMerchantDataResponse extends pb_1.Message {
17015
+ business.DefaultResponse = DefaultResponse;
17016
+ class GetByIdRequest extends pb_1.Message {
16248
17017
  #one_of_decls = [];
16249
17018
  constructor(data) {
16250
17019
  super();
16251
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 7], this.#one_of_decls);
17020
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
16252
17021
  if (!Array.isArray(data) && typeof data == "object") {
16253
- if ("success" in data && data.success != undefined) {
16254
- this.success = data.success;
16255
- }
16256
- if ("status" in data && data.status != undefined) {
16257
- this.status = data.status;
16258
- }
16259
- if ("data" in data && data.data != undefined) {
16260
- this.data = data.data;
16261
- }
16262
- if ("error" in data && data.error != undefined) {
16263
- this.error = data.error;
16264
- }
16265
- if ("message" in data && data.message != undefined) {
16266
- this.message = data.message;
16267
- }
16268
- if ("pagination" in data && data.pagination != undefined) {
16269
- this.pagination = data.pagination;
16270
- }
16271
- if ("errors" in data && data.errors != undefined) {
16272
- this.errors = data.errors;
17022
+ if ("id" in data && data.id != undefined) {
17023
+ this.id = data.id;
16273
17024
  }
16274
17025
  }
16275
17026
  }
16276
- get success() {
16277
- return pb_1.Message.getFieldWithDefault(this, 1, false);
17027
+ get id() {
17028
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
16278
17029
  }
16279
- set success(value) {
17030
+ set id(value) {
16280
17031
  pb_1.Message.setField(this, 1, value);
16281
- }
16282
- get status() {
16283
- return pb_1.Message.getFieldWithDefault(this, 2, "");
16284
- }
16285
- set status(value) {
16286
- pb_1.Message.setField(this, 2, value);
16287
- }
16288
- get data() {
16289
- return pb_1.Message.getRepeatedWrapperField(this, MerchantData, 3);
16290
- }
16291
- set data(value) {
16292
- pb_1.Message.setRepeatedWrapperField(this, 3, value);
16293
- }
16294
- get error() {
16295
- return pb_1.Message.getFieldWithDefault(this, 4, "");
16296
- }
16297
- set error(value) {
16298
- pb_1.Message.setField(this, 4, value);
16299
- }
16300
- get message() {
16301
- return pb_1.Message.getFieldWithDefault(this, 5, "");
16302
- }
16303
- set message(value) {
16304
- pb_1.Message.setField(this, 5, value);
16305
- }
16306
- get pagination() {
16307
- return pb_1.Message.getWrapperField(this, Pagination, 6);
16308
- }
16309
- set pagination(value) {
16310
- pb_1.Message.setWrapperField(this, 6, value);
16311
- }
16312
- get hasPagination() {
16313
- return pb_1.Message.getField(this, 6) != null;
16314
- }
16315
- get errors() {
16316
- return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 7);
16317
- }
16318
- set errors(value) {
16319
- pb_1.Message.setRepeatedWrapperField(this, 7, value);
16320
- }
16321
- static fromObject(data) {
16322
- const message = new MMerchantDataResponse({});
16323
- if (data.success != null) {
16324
- message.success = data.success;
16325
- }
16326
- if (data.status != null) {
16327
- message.status = data.status;
16328
- }
16329
- if (data.data != null) {
16330
- message.data = data.data.map(item => MerchantData.fromObject(item));
16331
- }
16332
- if (data.error != null) {
16333
- message.error = data.error;
16334
- }
16335
- if (data.message != null) {
16336
- message.message = data.message;
16337
- }
16338
- if (data.pagination != null) {
16339
- message.pagination = Pagination.fromObject(data.pagination);
16340
- }
16341
- if (data.errors != null) {
16342
- message.errors = data.errors.map(item => ValidationErrors.fromObject(item));
17032
+ }
17033
+ static fromObject(data) {
17034
+ const message = new GetByIdRequest({});
17035
+ if (data.id != null) {
17036
+ message.id = data.id;
16343
17037
  }
16344
17038
  return message;
16345
17039
  }
16346
17040
  toObject() {
16347
17041
  const data = {};
16348
- if (this.success != null) {
16349
- data.success = this.success;
16350
- }
16351
- if (this.status != null) {
16352
- data.status = this.status;
16353
- }
16354
- if (this.data != null) {
16355
- data.data = this.data.map((item) => item.toObject());
16356
- }
16357
- if (this.error != null) {
16358
- data.error = this.error;
16359
- }
16360
- if (this.message != null) {
16361
- data.message = this.message;
16362
- }
16363
- if (this.pagination != null) {
16364
- data.pagination = this.pagination.toObject();
16365
- }
16366
- if (this.errors != null) {
16367
- data.errors = this.errors.map((item) => item.toObject());
17042
+ if (this.id != null) {
17043
+ data.id = this.id;
16368
17044
  }
16369
17045
  return data;
16370
17046
  }
16371
17047
  serialize(w) {
16372
17048
  const writer = w || new pb_1.BinaryWriter();
16373
- if (this.success != false)
16374
- writer.writeBool(1, this.success);
16375
- if (this.status.length)
16376
- writer.writeString(2, this.status);
16377
- if (this.data.length)
16378
- writer.writeRepeatedMessage(3, this.data, (item) => item.serialize(writer));
16379
- if (this.error.length)
16380
- writer.writeString(4, this.error);
16381
- if (this.message.length)
16382
- writer.writeString(5, this.message);
16383
- if (this.hasPagination)
16384
- writer.writeMessage(6, this.pagination, () => this.pagination.serialize(writer));
16385
- if (this.errors.length)
16386
- writer.writeRepeatedMessage(7, this.errors, (item) => item.serialize(writer));
17049
+ if (this.id.length)
17050
+ writer.writeString(1, this.id);
16387
17051
  if (!w)
16388
17052
  return writer.getResultBuffer();
16389
17053
  }
16390
17054
  static deserialize(bytes) {
16391
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new MMerchantDataResponse();
17055
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetByIdRequest();
16392
17056
  while (reader.nextField()) {
16393
17057
  if (reader.isEndGroup())
16394
17058
  break;
16395
17059
  switch (reader.getFieldNumber()) {
16396
17060
  case 1:
16397
- message.success = reader.readBool();
16398
- break;
16399
- case 2:
16400
- message.status = reader.readString();
16401
- break;
16402
- case 3:
16403
- reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 3, MerchantData.deserialize(reader), MerchantData));
16404
- break;
16405
- case 4:
16406
- message.error = reader.readString();
16407
- break;
16408
- case 5:
16409
- message.message = reader.readString();
16410
- break;
16411
- case 6:
16412
- reader.readMessage(message.pagination, () => message.pagination = Pagination.deserialize(reader));
16413
- break;
16414
- case 7:
16415
- reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 7, ValidationErrors.deserialize(reader), ValidationErrors));
17061
+ message.id = reader.readString();
16416
17062
  break;
16417
17063
  default: reader.skipField();
16418
17064
  }
@@ -16423,96 +17069,76 @@ var com;
16423
17069
  return this.serialize();
16424
17070
  }
16425
17071
  static deserializeBinary(bytes) {
16426
- return MMerchantDataResponse.deserialize(bytes);
17072
+ return GetByIdRequest.deserialize(bytes);
16427
17073
  }
16428
17074
  }
16429
- business.MMerchantDataResponse = MMerchantDataResponse;
16430
- class AssignAttributionStaffRequest extends pb_1.Message {
17075
+ business.GetByIdRequest = GetByIdRequest;
17076
+ class OrphanMerchant extends pb_1.Message {
16431
17077
  #one_of_decls = [];
16432
17078
  constructor(data) {
16433
17079
  super();
16434
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
17080
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
16435
17081
  if (!Array.isArray(data) && typeof data == "object") {
16436
- if ("staffId" in data && data.staffId != undefined) {
16437
- this.staffId = data.staffId;
16438
- }
16439
- if ("merchantId" in data && data.merchantId != undefined) {
16440
- this.merchantId = data.merchantId;
17082
+ if ("total" in data && data.total != undefined) {
17083
+ this.total = data.total;
16441
17084
  }
16442
- if ("actionBy" in data && data.actionBy != undefined) {
16443
- this.actionBy = data.actionBy;
17085
+ if ("merchantIds" in data && data.merchantIds != undefined) {
17086
+ this.merchantIds = data.merchantIds;
16444
17087
  }
16445
17088
  }
16446
17089
  }
16447
- get staffId() {
16448
- return pb_1.Message.getFieldWithDefault(this, 1, "");
17090
+ get total() {
17091
+ return pb_1.Message.getFieldWithDefault(this, 1, 0);
16449
17092
  }
16450
- set staffId(value) {
17093
+ set total(value) {
16451
17094
  pb_1.Message.setField(this, 1, value);
16452
17095
  }
16453
- get merchantId() {
16454
- return pb_1.Message.getFieldWithDefault(this, 2, "");
17096
+ get merchantIds() {
17097
+ return pb_1.Message.getFieldWithDefault(this, 2, []);
16455
17098
  }
16456
- set merchantId(value) {
17099
+ set merchantIds(value) {
16457
17100
  pb_1.Message.setField(this, 2, value);
16458
17101
  }
16459
- get actionBy() {
16460
- return pb_1.Message.getFieldWithDefault(this, 3, "");
16461
- }
16462
- set actionBy(value) {
16463
- pb_1.Message.setField(this, 3, value);
16464
- }
16465
17102
  static fromObject(data) {
16466
- const message = new AssignAttributionStaffRequest({});
16467
- if (data.staffId != null) {
16468
- message.staffId = data.staffId;
16469
- }
16470
- if (data.merchantId != null) {
16471
- message.merchantId = data.merchantId;
17103
+ const message = new OrphanMerchant({});
17104
+ if (data.total != null) {
17105
+ message.total = data.total;
16472
17106
  }
16473
- if (data.actionBy != null) {
16474
- message.actionBy = data.actionBy;
17107
+ if (data.merchantIds != null) {
17108
+ message.merchantIds = data.merchantIds;
16475
17109
  }
16476
17110
  return message;
16477
17111
  }
16478
17112
  toObject() {
16479
17113
  const data = {};
16480
- if (this.staffId != null) {
16481
- data.staffId = this.staffId;
16482
- }
16483
- if (this.merchantId != null) {
16484
- data.merchantId = this.merchantId;
17114
+ if (this.total != null) {
17115
+ data.total = this.total;
16485
17116
  }
16486
- if (this.actionBy != null) {
16487
- data.actionBy = this.actionBy;
17117
+ if (this.merchantIds != null) {
17118
+ data.merchantIds = this.merchantIds;
16488
17119
  }
16489
17120
  return data;
16490
17121
  }
16491
17122
  serialize(w) {
16492
17123
  const writer = w || new pb_1.BinaryWriter();
16493
- if (this.staffId.length)
16494
- writer.writeString(1, this.staffId);
16495
- if (this.merchantId.length)
16496
- writer.writeString(2, this.merchantId);
16497
- if (this.actionBy.length)
16498
- writer.writeString(3, this.actionBy);
17124
+ if (this.total != 0)
17125
+ writer.writeUint32(1, this.total);
17126
+ if (this.merchantIds.length)
17127
+ writer.writeRepeatedString(2, this.merchantIds);
16499
17128
  if (!w)
16500
17129
  return writer.getResultBuffer();
16501
17130
  }
16502
17131
  static deserialize(bytes) {
16503
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssignAttributionStaffRequest();
17132
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OrphanMerchant();
16504
17133
  while (reader.nextField()) {
16505
17134
  if (reader.isEndGroup())
16506
17135
  break;
16507
17136
  switch (reader.getFieldNumber()) {
16508
17137
  case 1:
16509
- message.staffId = reader.readString();
17138
+ message.total = reader.readUint32();
16510
17139
  break;
16511
17140
  case 2:
16512
- message.merchantId = reader.readString();
16513
- break;
16514
- case 3:
16515
- message.actionBy = reader.readString();
17141
+ pb_1.Message.addToRepeatedField(message, 2, reader.readString());
16516
17142
  break;
16517
17143
  default: reader.skipField();
16518
17144
  }
@@ -16523,77 +17149,92 @@ var com;
16523
17149
  return this.serialize();
16524
17150
  }
16525
17151
  static deserializeBinary(bytes) {
16526
- return AssignAttributionStaffRequest.deserialize(bytes);
17152
+ return OrphanMerchant.deserialize(bytes);
16527
17153
  }
16528
17154
  }
16529
- business.AssignAttributionStaffRequest = AssignAttributionStaffRequest;
16530
- class DefaultResponse extends pb_1.Message {
17155
+ business.OrphanMerchant = OrphanMerchant;
17156
+ class OrphanMerchantsResponse extends pb_1.Message {
16531
17157
  #one_of_decls = [];
16532
17158
  constructor(data) {
16533
17159
  super();
16534
- pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls);
17160
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls);
16535
17161
  if (!Array.isArray(data) && typeof data == "object") {
16536
17162
  if ("success" in data && data.success != undefined) {
16537
17163
  this.success = data.success;
16538
17164
  }
17165
+ if ("message" in data && data.message != undefined) {
17166
+ this.message = data.message;
17167
+ }
17168
+ if ("data" in data && data.data != undefined) {
17169
+ this.data = data.data;
17170
+ }
16539
17171
  if ("status" in data && data.status != undefined) {
16540
17172
  this.status = data.status;
16541
17173
  }
16542
17174
  if ("error" in data && data.error != undefined) {
16543
17175
  this.error = data.error;
16544
17176
  }
16545
- if ("message" in data && data.message != undefined) {
16546
- this.message = data.message;
16547
- }
16548
17177
  if ("errors" in data && data.errors != undefined) {
16549
17178
  this.errors = data.errors;
16550
17179
  }
16551
17180
  }
16552
17181
  }
16553
17182
  get success() {
16554
- return pb_1.Message.getFieldWithDefault(this, 1, false);
17183
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
16555
17184
  }
16556
17185
  set success(value) {
16557
17186
  pb_1.Message.setField(this, 1, value);
16558
17187
  }
16559
- get status() {
17188
+ get message() {
16560
17189
  return pb_1.Message.getFieldWithDefault(this, 2, "");
16561
17190
  }
16562
- set status(value) {
17191
+ set message(value) {
16563
17192
  pb_1.Message.setField(this, 2, value);
16564
17193
  }
16565
- get error() {
16566
- return pb_1.Message.getFieldWithDefault(this, 3, "");
17194
+ get data() {
17195
+ return pb_1.Message.getWrapperField(this, OrphanMerchant, 3);
16567
17196
  }
16568
- set error(value) {
16569
- pb_1.Message.setField(this, 3, value);
17197
+ set data(value) {
17198
+ pb_1.Message.setWrapperField(this, 3, value);
16570
17199
  }
16571
- get message() {
17200
+ get hasData() {
17201
+ return pb_1.Message.getField(this, 3) != null;
17202
+ }
17203
+ get status() {
16572
17204
  return pb_1.Message.getFieldWithDefault(this, 4, "");
16573
17205
  }
16574
- set message(value) {
17206
+ set status(value) {
16575
17207
  pb_1.Message.setField(this, 4, value);
16576
17208
  }
17209
+ get error() {
17210
+ return pb_1.Message.getFieldWithDefault(this, 5, "");
17211
+ }
17212
+ set error(value) {
17213
+ pb_1.Message.setField(this, 5, value);
17214
+ }
16577
17215
  get errors() {
16578
- return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 5);
17216
+ return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 6);
16579
17217
  }
16580
17218
  set errors(value) {
16581
- pb_1.Message.setRepeatedWrapperField(this, 5, value);
17219
+ pb_1.Message.setRepeatedWrapperField(this, 6, value);
16582
17220
  }
16583
17221
  static fromObject(data) {
16584
- const message = new DefaultResponse({});
17222
+ const message = new OrphanMerchantsResponse({});
16585
17223
  if (data.success != null) {
16586
17224
  message.success = data.success;
16587
17225
  }
17226
+ if (data.message != null) {
17227
+ message.message = data.message;
17228
+ }
17229
+ if (data.data != null) {
17230
+ message.data = OrphanMerchant.fromObject(data.data);
17231
+ }
16588
17232
  if (data.status != null) {
16589
17233
  message.status = data.status;
16590
17234
  }
16591
17235
  if (data.error != null) {
16592
17236
  message.error = data.error;
16593
17237
  }
16594
- if (data.message != null) {
16595
- message.message = data.message;
16596
- }
16597
17238
  if (data.errors != null) {
16598
17239
  message.errors = data.errors.map(item => ValidationErrors.fromObject(item));
16599
17240
  }
@@ -16604,15 +17245,18 @@ var com;
16604
17245
  if (this.success != null) {
16605
17246
  data.success = this.success;
16606
17247
  }
17248
+ if (this.message != null) {
17249
+ data.message = this.message;
17250
+ }
17251
+ if (this.data != null) {
17252
+ data.data = this.data.toObject();
17253
+ }
16607
17254
  if (this.status != null) {
16608
17255
  data.status = this.status;
16609
17256
  }
16610
17257
  if (this.error != null) {
16611
17258
  data.error = this.error;
16612
17259
  }
16613
- if (this.message != null) {
16614
- data.message = this.message;
16615
- }
16616
17260
  if (this.errors != null) {
16617
17261
  data.errors = this.errors.map((item) => item.toObject());
16618
17262
  }
@@ -16620,39 +17264,44 @@ var com;
16620
17264
  }
16621
17265
  serialize(w) {
16622
17266
  const writer = w || new pb_1.BinaryWriter();
16623
- if (this.success != false)
16624
- writer.writeBool(1, this.success);
17267
+ if (this.success.length)
17268
+ writer.writeString(1, this.success);
17269
+ if (this.message.length)
17270
+ writer.writeString(2, this.message);
17271
+ if (this.hasData)
17272
+ writer.writeMessage(3, this.data, () => this.data.serialize(writer));
16625
17273
  if (this.status.length)
16626
- writer.writeString(2, this.status);
17274
+ writer.writeString(4, this.status);
16627
17275
  if (this.error.length)
16628
- writer.writeString(3, this.error);
16629
- if (this.message.length)
16630
- writer.writeString(4, this.message);
17276
+ writer.writeString(5, this.error);
16631
17277
  if (this.errors.length)
16632
- writer.writeRepeatedMessage(5, this.errors, (item) => item.serialize(writer));
17278
+ writer.writeRepeatedMessage(6, this.errors, (item) => item.serialize(writer));
16633
17279
  if (!w)
16634
17280
  return writer.getResultBuffer();
16635
17281
  }
16636
17282
  static deserialize(bytes) {
16637
- const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DefaultResponse();
17283
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OrphanMerchantsResponse();
16638
17284
  while (reader.nextField()) {
16639
17285
  if (reader.isEndGroup())
16640
17286
  break;
16641
17287
  switch (reader.getFieldNumber()) {
16642
17288
  case 1:
16643
- message.success = reader.readBool();
17289
+ message.success = reader.readString();
16644
17290
  break;
16645
17291
  case 2:
16646
- message.status = reader.readString();
17292
+ message.message = reader.readString();
16647
17293
  break;
16648
17294
  case 3:
16649
- message.error = reader.readString();
17295
+ reader.readMessage(message.data, () => message.data = OrphanMerchant.deserialize(reader));
16650
17296
  break;
16651
17297
  case 4:
16652
- message.message = reader.readString();
17298
+ message.status = reader.readString();
16653
17299
  break;
16654
17300
  case 5:
16655
- reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ValidationErrors.deserialize(reader), ValidationErrors));
17301
+ message.error = reader.readString();
17302
+ break;
17303
+ case 6:
17304
+ reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 6, ValidationErrors.deserialize(reader), ValidationErrors));
16656
17305
  break;
16657
17306
  default: reader.skipField();
16658
17307
  }
@@ -16663,10 +17312,10 @@ var com;
16663
17312
  return this.serialize();
16664
17313
  }
16665
17314
  static deserializeBinary(bytes) {
16666
- return DefaultResponse.deserialize(bytes);
17315
+ return OrphanMerchantsResponse.deserialize(bytes);
16667
17316
  }
16668
17317
  }
16669
- business.DefaultResponse = DefaultResponse;
17318
+ business.OrphanMerchantsResponse = OrphanMerchantsResponse;
16670
17319
  class UnimplementedBusinessService {
16671
17320
  static definition = {
16672
17321
  CreateBusiness: {
@@ -17127,6 +17776,24 @@ var com;
17127
17776
  requestDeserialize: (bytes) => AssignAttributionStaffRequest.deserialize(new Uint8Array(bytes)),
17128
17777
  responseSerialize: (message) => Buffer.from(message.serialize()),
17129
17778
  responseDeserialize: (bytes) => DefaultResponse.deserialize(new Uint8Array(bytes))
17779
+ },
17780
+ GetMerchantsByAttributionStaff: {
17781
+ path: "/com.pkg.business.Business/GetMerchantsByAttributionStaff",
17782
+ requestStream: false,
17783
+ responseStream: false,
17784
+ requestSerialize: (message) => Buffer.from(message.serialize()),
17785
+ requestDeserialize: (bytes) => GetByIdRequest.deserialize(new Uint8Array(bytes)),
17786
+ responseSerialize: (message) => Buffer.from(message.serialize()),
17787
+ responseDeserialize: (bytes) => MMerchantDataResponse.deserialize(new Uint8Array(bytes))
17788
+ },
17789
+ OrphanMerchants: {
17790
+ path: "/com.pkg.business.Business/OrphanMerchants",
17791
+ requestStream: false,
17792
+ responseStream: false,
17793
+ requestSerialize: (message) => Buffer.from(message.serialize()),
17794
+ requestDeserialize: (bytes) => GetByIdRequest.deserialize(new Uint8Array(bytes)),
17795
+ responseSerialize: (message) => Buffer.from(message.serialize()),
17796
+ responseDeserialize: (bytes) => OrphanMerchantsResponse.deserialize(new Uint8Array(bytes))
17130
17797
  }
17131
17798
  };
17132
17799
  }
@@ -17951,6 +18618,38 @@ var com;
17951
18618
  }
17952
18619
  }));
17953
18620
  };
18621
+ GetMerchantsByAttributionStaff = (message, metadata, options) => {
18622
+ if (!metadata) {
18623
+ metadata = new grpc_1.Metadata;
18624
+ }
18625
+ if (!options) {
18626
+ options = {};
18627
+ }
18628
+ return new Promise((resolve, reject) => super.GetMerchantsByAttributionStaff(message, metadata, options, (error, response) => {
18629
+ if (error) {
18630
+ reject(error);
18631
+ }
18632
+ else {
18633
+ resolve(response);
18634
+ }
18635
+ }));
18636
+ };
18637
+ OrphanMerchants = (message, metadata, options) => {
18638
+ if (!metadata) {
18639
+ metadata = new grpc_1.Metadata;
18640
+ }
18641
+ if (!options) {
18642
+ options = {};
18643
+ }
18644
+ return new Promise((resolve, reject) => super.OrphanMerchants(message, metadata, options, (error, response) => {
18645
+ if (error) {
18646
+ reject(error);
18647
+ }
18648
+ else {
18649
+ resolve(response);
18650
+ }
18651
+ }));
18652
+ };
17954
18653
  }
17955
18654
  business.BusinessClient = BusinessClient;
17956
18655
  })(business = pkg.business || (pkg.business = {}));