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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16427,6 +16427,246 @@ var com;
16427
16427
  }
16428
16428
  }
16429
16429
  business.MMerchantDataResponse = MMerchantDataResponse;
16430
+ class AssignAttributionStaffRequest 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, [], this.#one_of_decls);
16435
+ 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;
16441
+ }
16442
+ if ("actionBy" in data && data.actionBy != undefined) {
16443
+ this.actionBy = data.actionBy;
16444
+ }
16445
+ }
16446
+ }
16447
+ get staffId() {
16448
+ return pb_1.Message.getFieldWithDefault(this, 1, "");
16449
+ }
16450
+ set staffId(value) {
16451
+ pb_1.Message.setField(this, 1, value);
16452
+ }
16453
+ get merchantId() {
16454
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
16455
+ }
16456
+ set merchantId(value) {
16457
+ pb_1.Message.setField(this, 2, value);
16458
+ }
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
+ 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;
16472
+ }
16473
+ if (data.actionBy != null) {
16474
+ message.actionBy = data.actionBy;
16475
+ }
16476
+ return message;
16477
+ }
16478
+ toObject() {
16479
+ const data = {};
16480
+ if (this.staffId != null) {
16481
+ data.staffId = this.staffId;
16482
+ }
16483
+ if (this.merchantId != null) {
16484
+ data.merchantId = this.merchantId;
16485
+ }
16486
+ if (this.actionBy != null) {
16487
+ data.actionBy = this.actionBy;
16488
+ }
16489
+ return data;
16490
+ }
16491
+ serialize(w) {
16492
+ 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);
16499
+ if (!w)
16500
+ return writer.getResultBuffer();
16501
+ }
16502
+ static deserialize(bytes) {
16503
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AssignAttributionStaffRequest();
16504
+ while (reader.nextField()) {
16505
+ if (reader.isEndGroup())
16506
+ break;
16507
+ switch (reader.getFieldNumber()) {
16508
+ case 1:
16509
+ message.staffId = reader.readString();
16510
+ break;
16511
+ case 2:
16512
+ message.merchantId = reader.readString();
16513
+ break;
16514
+ case 3:
16515
+ message.actionBy = reader.readString();
16516
+ break;
16517
+ default: reader.skipField();
16518
+ }
16519
+ }
16520
+ return message;
16521
+ }
16522
+ serializeBinary() {
16523
+ return this.serialize();
16524
+ }
16525
+ static deserializeBinary(bytes) {
16526
+ return AssignAttributionStaffRequest.deserialize(bytes);
16527
+ }
16528
+ }
16529
+ business.AssignAttributionStaffRequest = AssignAttributionStaffRequest;
16530
+ class DefaultResponse extends pb_1.Message {
16531
+ #one_of_decls = [];
16532
+ constructor(data) {
16533
+ super();
16534
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls);
16535
+ if (!Array.isArray(data) && typeof data == "object") {
16536
+ if ("success" in data && data.success != undefined) {
16537
+ this.success = data.success;
16538
+ }
16539
+ if ("status" in data && data.status != undefined) {
16540
+ this.status = data.status;
16541
+ }
16542
+ if ("error" in data && data.error != undefined) {
16543
+ this.error = data.error;
16544
+ }
16545
+ if ("message" in data && data.message != undefined) {
16546
+ this.message = data.message;
16547
+ }
16548
+ if ("errors" in data && data.errors != undefined) {
16549
+ this.errors = data.errors;
16550
+ }
16551
+ }
16552
+ }
16553
+ get success() {
16554
+ return pb_1.Message.getFieldWithDefault(this, 1, false);
16555
+ }
16556
+ set success(value) {
16557
+ pb_1.Message.setField(this, 1, value);
16558
+ }
16559
+ get status() {
16560
+ return pb_1.Message.getFieldWithDefault(this, 2, "");
16561
+ }
16562
+ set status(value) {
16563
+ pb_1.Message.setField(this, 2, value);
16564
+ }
16565
+ get error() {
16566
+ return pb_1.Message.getFieldWithDefault(this, 3, "");
16567
+ }
16568
+ set error(value) {
16569
+ pb_1.Message.setField(this, 3, value);
16570
+ }
16571
+ get message() {
16572
+ return pb_1.Message.getFieldWithDefault(this, 4, "");
16573
+ }
16574
+ set message(value) {
16575
+ pb_1.Message.setField(this, 4, value);
16576
+ }
16577
+ get errors() {
16578
+ return pb_1.Message.getRepeatedWrapperField(this, ValidationErrors, 5);
16579
+ }
16580
+ set errors(value) {
16581
+ pb_1.Message.setRepeatedWrapperField(this, 5, value);
16582
+ }
16583
+ static fromObject(data) {
16584
+ const message = new DefaultResponse({});
16585
+ if (data.success != null) {
16586
+ message.success = data.success;
16587
+ }
16588
+ if (data.status != null) {
16589
+ message.status = data.status;
16590
+ }
16591
+ if (data.error != null) {
16592
+ message.error = data.error;
16593
+ }
16594
+ if (data.message != null) {
16595
+ message.message = data.message;
16596
+ }
16597
+ if (data.errors != null) {
16598
+ message.errors = data.errors.map(item => ValidationErrors.fromObject(item));
16599
+ }
16600
+ return message;
16601
+ }
16602
+ toObject() {
16603
+ const data = {};
16604
+ if (this.success != null) {
16605
+ data.success = this.success;
16606
+ }
16607
+ if (this.status != null) {
16608
+ data.status = this.status;
16609
+ }
16610
+ if (this.error != null) {
16611
+ data.error = this.error;
16612
+ }
16613
+ if (this.message != null) {
16614
+ data.message = this.message;
16615
+ }
16616
+ if (this.errors != null) {
16617
+ data.errors = this.errors.map((item) => item.toObject());
16618
+ }
16619
+ return data;
16620
+ }
16621
+ serialize(w) {
16622
+ const writer = w || new pb_1.BinaryWriter();
16623
+ if (this.success != false)
16624
+ writer.writeBool(1, this.success);
16625
+ if (this.status.length)
16626
+ writer.writeString(2, this.status);
16627
+ if (this.error.length)
16628
+ writer.writeString(3, this.error);
16629
+ if (this.message.length)
16630
+ writer.writeString(4, this.message);
16631
+ if (this.errors.length)
16632
+ writer.writeRepeatedMessage(5, this.errors, (item) => item.serialize(writer));
16633
+ if (!w)
16634
+ return writer.getResultBuffer();
16635
+ }
16636
+ static deserialize(bytes) {
16637
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DefaultResponse();
16638
+ while (reader.nextField()) {
16639
+ if (reader.isEndGroup())
16640
+ break;
16641
+ switch (reader.getFieldNumber()) {
16642
+ case 1:
16643
+ message.success = reader.readBool();
16644
+ break;
16645
+ case 2:
16646
+ message.status = reader.readString();
16647
+ break;
16648
+ case 3:
16649
+ message.error = reader.readString();
16650
+ break;
16651
+ case 4:
16652
+ message.message = reader.readString();
16653
+ break;
16654
+ case 5:
16655
+ reader.readMessage(message.errors, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ValidationErrors.deserialize(reader), ValidationErrors));
16656
+ break;
16657
+ default: reader.skipField();
16658
+ }
16659
+ }
16660
+ return message;
16661
+ }
16662
+ serializeBinary() {
16663
+ return this.serialize();
16664
+ }
16665
+ static deserializeBinary(bytes) {
16666
+ return DefaultResponse.deserialize(bytes);
16667
+ }
16668
+ }
16669
+ business.DefaultResponse = DefaultResponse;
16430
16670
  class UnimplementedBusinessService {
16431
16671
  static definition = {
16432
16672
  CreateBusiness: {
@@ -16869,6 +17109,24 @@ var com;
16869
17109
  requestDeserialize: (bytes) => MerchantLookupRequest.deserialize(new Uint8Array(bytes)),
16870
17110
  responseSerialize: (message) => Buffer.from(message.serialize()),
16871
17111
  responseDeserialize: (bytes) => MerchantDataResponse.deserialize(new Uint8Array(bytes))
17112
+ },
17113
+ AssignAttributionStaff: {
17114
+ path: "/com.pkg.business.Business/AssignAttributionStaff",
17115
+ requestStream: false,
17116
+ responseStream: false,
17117
+ requestSerialize: (message) => Buffer.from(message.serialize()),
17118
+ requestDeserialize: (bytes) => AssignAttributionStaffRequest.deserialize(new Uint8Array(bytes)),
17119
+ responseSerialize: (message) => Buffer.from(message.serialize()),
17120
+ responseDeserialize: (bytes) => DefaultResponse.deserialize(new Uint8Array(bytes))
17121
+ },
17122
+ ReassignAttributionStaff: {
17123
+ path: "/com.pkg.business.Business/ReassignAttributionStaff",
17124
+ requestStream: false,
17125
+ responseStream: false,
17126
+ requestSerialize: (message) => Buffer.from(message.serialize()),
17127
+ requestDeserialize: (bytes) => AssignAttributionStaffRequest.deserialize(new Uint8Array(bytes)),
17128
+ responseSerialize: (message) => Buffer.from(message.serialize()),
17129
+ responseDeserialize: (bytes) => DefaultResponse.deserialize(new Uint8Array(bytes))
16872
17130
  }
16873
17131
  };
16874
17132
  }
@@ -17661,6 +17919,38 @@ var com;
17661
17919
  }
17662
17920
  }));
17663
17921
  };
17922
+ AssignAttributionStaff = (message, metadata, options) => {
17923
+ if (!metadata) {
17924
+ metadata = new grpc_1.Metadata;
17925
+ }
17926
+ if (!options) {
17927
+ options = {};
17928
+ }
17929
+ return new Promise((resolve, reject) => super.AssignAttributionStaff(message, metadata, options, (error, response) => {
17930
+ if (error) {
17931
+ reject(error);
17932
+ }
17933
+ else {
17934
+ resolve(response);
17935
+ }
17936
+ }));
17937
+ };
17938
+ ReassignAttributionStaff = (message, metadata, options) => {
17939
+ if (!metadata) {
17940
+ metadata = new grpc_1.Metadata;
17941
+ }
17942
+ if (!options) {
17943
+ options = {};
17944
+ }
17945
+ return new Promise((resolve, reject) => super.ReassignAttributionStaff(message, metadata, options, (error, response) => {
17946
+ if (error) {
17947
+ reject(error);
17948
+ }
17949
+ else {
17950
+ resolve(response);
17951
+ }
17952
+ }));
17953
+ };
17664
17954
  }
17665
17955
  business.BusinessClient = BusinessClient;
17666
17956
  })(business = pkg.business || (pkg.business = {}));
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "compile": "tsc -p tsconfig.json"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "3.2.0",
14
+ "version": "3.2.1",
15
15
  "devDependencies": {
16
16
  "@types/google-protobuf": "^3.15.12",
17
17
  "protoc-gen-ts": "^0.8.7",
@@ -7455,6 +7455,77 @@ export declare namespace com.pkg.business {
7455
7455
  serializeBinary(): Uint8Array;
7456
7456
  static deserializeBinary(bytes: Uint8Array): MMerchantDataResponse;
7457
7457
  }
7458
+ export class AssignAttributionStaffRequest extends pb_1.Message {
7459
+ #private;
7460
+ constructor(data?: any[] | {
7461
+ staffId?: string;
7462
+ merchantId?: string;
7463
+ actionBy?: string;
7464
+ });
7465
+ get staffId(): string;
7466
+ set staffId(value: string);
7467
+ get merchantId(): string;
7468
+ set merchantId(value: string);
7469
+ get actionBy(): string;
7470
+ set actionBy(value: string);
7471
+ static fromObject(data: {
7472
+ staffId?: string;
7473
+ merchantId?: string;
7474
+ actionBy?: string;
7475
+ }): AssignAttributionStaffRequest;
7476
+ toObject(): {
7477
+ staffId?: string | undefined;
7478
+ merchantId?: string | undefined;
7479
+ actionBy?: string | undefined;
7480
+ };
7481
+ serialize(): Uint8Array;
7482
+ serialize(w: pb_1.BinaryWriter): void;
7483
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AssignAttributionStaffRequest;
7484
+ serializeBinary(): Uint8Array;
7485
+ static deserializeBinary(bytes: Uint8Array): AssignAttributionStaffRequest;
7486
+ }
7487
+ export class DefaultResponse extends pb_1.Message {
7488
+ #private;
7489
+ constructor(data?: any[] | {
7490
+ success?: boolean;
7491
+ status?: string;
7492
+ error?: string;
7493
+ message?: string;
7494
+ errors?: ValidationErrors[];
7495
+ });
7496
+ get success(): boolean;
7497
+ set success(value: boolean);
7498
+ get status(): string;
7499
+ set status(value: string);
7500
+ get error(): string;
7501
+ set error(value: string);
7502
+ get message(): string;
7503
+ set message(value: string);
7504
+ get errors(): ValidationErrors[];
7505
+ set errors(value: ValidationErrors[]);
7506
+ static fromObject(data: {
7507
+ success?: boolean;
7508
+ status?: string;
7509
+ error?: string;
7510
+ message?: string;
7511
+ errors?: ReturnType<typeof ValidationErrors.prototype.toObject>[];
7512
+ }): DefaultResponse;
7513
+ toObject(): {
7514
+ success?: boolean | undefined;
7515
+ status?: string | undefined;
7516
+ error?: string | undefined;
7517
+ message?: string | undefined;
7518
+ errors?: {
7519
+ field?: string | undefined;
7520
+ message?: string | undefined;
7521
+ }[] | undefined;
7522
+ };
7523
+ serialize(): Uint8Array;
7524
+ serialize(w: pb_1.BinaryWriter): void;
7525
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DefaultResponse;
7526
+ serializeBinary(): Uint8Array;
7527
+ static deserializeBinary(bytes: Uint8Array): DefaultResponse;
7528
+ }
7458
7529
  interface GrpcPromiseServiceInterface<P, R> {
7459
7530
  (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
7460
7531
  (message: P, options?: grpc_1.CallOptions): Promise<R>;
@@ -7902,6 +7973,24 @@ export declare namespace com.pkg.business {
7902
7973
  responseSerialize: (message: MerchantDataResponse) => Buffer;
7903
7974
  responseDeserialize: (bytes: Buffer) => MerchantDataResponse;
7904
7975
  };
7976
+ AssignAttributionStaff: {
7977
+ path: string;
7978
+ requestStream: boolean;
7979
+ responseStream: boolean;
7980
+ requestSerialize: (message: AssignAttributionStaffRequest) => Buffer;
7981
+ requestDeserialize: (bytes: Buffer) => AssignAttributionStaffRequest;
7982
+ responseSerialize: (message: DefaultResponse) => Buffer;
7983
+ responseDeserialize: (bytes: Buffer) => DefaultResponse;
7984
+ };
7985
+ ReassignAttributionStaff: {
7986
+ path: string;
7987
+ requestStream: boolean;
7988
+ responseStream: boolean;
7989
+ requestSerialize: (message: AssignAttributionStaffRequest) => Buffer;
7990
+ requestDeserialize: (bytes: Buffer) => AssignAttributionStaffRequest;
7991
+ responseSerialize: (message: DefaultResponse) => Buffer;
7992
+ responseDeserialize: (bytes: Buffer) => DefaultResponse;
7993
+ };
7905
7994
  };
7906
7995
  [method: string]: grpc_1.UntypedHandleCall;
7907
7996
  abstract CreateBusiness(call: grpc_1.ServerUnaryCall<CreateBusinessRequest, BusinessDataResponse>, callback: grpc_1.sendUnaryData<BusinessDataResponse>): void;
@@ -7953,6 +8042,8 @@ export declare namespace com.pkg.business {
7953
8042
  abstract GetBusinessIndustries(call: grpc_1.ServerUnaryCall<PaginatedRequest, BusinessIndustryDataResponse>, callback: grpc_1.sendUnaryData<BusinessIndustryDataResponse>): void;
7954
8043
  abstract GetMerchants(call: grpc_1.ServerUnaryCall<MerchantFilterRequest, MMerchantDataResponse>, callback: grpc_1.sendUnaryData<MMerchantDataResponse>): void;
7955
8044
  abstract GetMerchant(call: grpc_1.ServerUnaryCall<MerchantLookupRequest, MerchantDataResponse>, callback: grpc_1.sendUnaryData<MerchantDataResponse>): void;
8045
+ abstract AssignAttributionStaff(call: grpc_1.ServerUnaryCall<AssignAttributionStaffRequest, DefaultResponse>, callback: grpc_1.sendUnaryData<DefaultResponse>): void;
8046
+ abstract ReassignAttributionStaff(call: grpc_1.ServerUnaryCall<AssignAttributionStaffRequest, DefaultResponse>, callback: grpc_1.sendUnaryData<DefaultResponse>): void;
7956
8047
  }
7957
8048
  const BusinessClient_base: grpc_1.ServiceClientConstructor;
7958
8049
  export class BusinessClient extends BusinessClient_base {
@@ -8006,6 +8097,8 @@ export declare namespace com.pkg.business {
8006
8097
  GetBusinessIndustries: GrpcPromiseServiceInterface<PaginatedRequest, BusinessIndustryDataResponse>;
8007
8098
  GetMerchants: GrpcPromiseServiceInterface<MerchantFilterRequest, MMerchantDataResponse>;
8008
8099
  GetMerchant: GrpcPromiseServiceInterface<MerchantLookupRequest, MerchantDataResponse>;
8100
+ AssignAttributionStaff: GrpcPromiseServiceInterface<AssignAttributionStaffRequest, DefaultResponse>;
8101
+ ReassignAttributionStaff: GrpcPromiseServiceInterface<AssignAttributionStaffRequest, DefaultResponse>;
8009
8102
  }
8010
8103
  export {};
8011
8104
  }