@fatehan/tsrp 1.4.6 → 1.4.8

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.
@@ -1,7 +1,8 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
2
  import Long from "long";
3
+ import { Workflow, WorkflowDetail } from "../activities/workflow";
3
4
  import { Car, CarBrand, CarModel, Device, DeviceIcon, SystemIo, Tracker } from "../devices/devices";
4
- import { Wallet } from "../financial/financial";
5
+ import { Currency, PaymentGateway, Product, ProductType, Wallet } from "../financial/financial";
5
6
  import { Driver, Organization, Person, User } from "../identities/identities";
6
7
  import { DeviceStatus } from "../packets/dataModel";
7
8
  export declare const protobufPackage = "com.fatehan.services";
@@ -38,12 +39,44 @@ export interface CarModelRepo {
38
39
  carModel?: CarModel | undefined;
39
40
  carBrand?: CarBrand | undefined;
40
41
  }
42
+ export interface WorkflowTaskRepo {
43
+ workflow?: Workflow | undefined;
44
+ workflowDetail?: WorkflowDetail | undefined;
45
+ organization?: Organization | undefined;
46
+ device?: Device | undefined;
47
+ car?: Car | undefined;
48
+ tanesh?: WorkflowTaskRepo_TaneshRepo | undefined;
49
+ payambar?: WorkflowTaskRepo_PayambarRepo | undefined;
50
+ }
51
+ export interface WorkflowTaskRepo_TaneshRepo {
52
+ passengerName?: string | undefined;
53
+ driverName?: string | undefined;
54
+ }
55
+ export interface WorkflowTaskRepo_PayambarRepo {
56
+ }
57
+ export interface SubscriptionRepo {
58
+ partnerId: Long;
59
+ customSubs: Product[];
60
+ packages: Product[];
61
+ gateways: PaymentGateway[];
62
+ }
63
+ export interface ProductRepo {
64
+ components: Product[];
65
+ currency?: Currency | undefined;
66
+ productType?: ProductType | undefined;
67
+ properties?: string | undefined;
68
+ }
41
69
  export declare const DeviceRepo: MessageFns<DeviceRepo>;
42
70
  export declare const CarRepo: MessageFns<CarRepo>;
43
71
  export declare const PersonRepo: MessageFns<PersonRepo>;
44
72
  export declare const UserRepo: MessageFns<UserRepo>;
45
73
  export declare const DriverRepo: MessageFns<DriverRepo>;
46
74
  export declare const CarModelRepo: MessageFns<CarModelRepo>;
75
+ export declare const WorkflowTaskRepo: MessageFns<WorkflowTaskRepo>;
76
+ export declare const WorkflowTaskRepo_TaneshRepo: MessageFns<WorkflowTaskRepo_TaneshRepo>;
77
+ export declare const WorkflowTaskRepo_PayambarRepo: MessageFns<WorkflowTaskRepo_PayambarRepo>;
78
+ export declare const SubscriptionRepo: MessageFns<SubscriptionRepo>;
79
+ export declare const ProductRepo: MessageFns<ProductRepo>;
47
80
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
48
81
  export type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
49
82
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -1 +1 @@
1
- {"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../../../src/fatehan/services/repositories.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,E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I,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAAE,CAAC;AAMnG,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
@@ -4,10 +4,15 @@
4
4
  // protoc-gen-ts_proto v2.7.5
5
5
  // protoc v6.31.1
6
6
  // source: services/repositories.proto
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
7
10
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.CarModelRepo = exports.DriverRepo = exports.UserRepo = exports.PersonRepo = exports.CarRepo = exports.DeviceRepo = exports.protobufPackage = void 0;
11
+ exports.ProductRepo = exports.SubscriptionRepo = exports.WorkflowTaskRepo_PayambarRepo = exports.WorkflowTaskRepo_TaneshRepo = exports.WorkflowTaskRepo = exports.CarModelRepo = exports.DriverRepo = exports.UserRepo = exports.PersonRepo = exports.CarRepo = exports.DeviceRepo = exports.protobufPackage = void 0;
9
12
  /* eslint-disable */
10
13
  const wire_1 = require("@bufbuild/protobuf/wire");
14
+ const long_1 = __importDefault(require("long"));
15
+ const workflow_1 = require("../activities/workflow");
11
16
  const devices_1 = require("../devices/devices");
12
17
  const financial_1 = require("../financial/financial");
13
18
  const identities_1 = require("../identities/identities");
@@ -604,6 +609,487 @@ exports.CarModelRepo = {
604
609
  return message;
605
610
  },
606
611
  };
612
+ function createBaseWorkflowTaskRepo() {
613
+ return {
614
+ workflow: undefined,
615
+ workflowDetail: undefined,
616
+ organization: undefined,
617
+ device: undefined,
618
+ car: undefined,
619
+ tanesh: undefined,
620
+ payambar: undefined,
621
+ };
622
+ }
623
+ exports.WorkflowTaskRepo = {
624
+ encode(message, writer = new wire_1.BinaryWriter()) {
625
+ if (message.workflow !== undefined) {
626
+ workflow_1.Workflow.encode(message.workflow, writer.uint32(10).fork()).join();
627
+ }
628
+ if (message.workflowDetail !== undefined) {
629
+ workflow_1.WorkflowDetail.encode(message.workflowDetail, writer.uint32(18).fork()).join();
630
+ }
631
+ if (message.organization !== undefined) {
632
+ identities_1.Organization.encode(message.organization, writer.uint32(26).fork()).join();
633
+ }
634
+ if (message.device !== undefined) {
635
+ devices_1.Device.encode(message.device, writer.uint32(34).fork()).join();
636
+ }
637
+ if (message.car !== undefined) {
638
+ devices_1.Car.encode(message.car, writer.uint32(42).fork()).join();
639
+ }
640
+ if (message.tanesh !== undefined) {
641
+ exports.WorkflowTaskRepo_TaneshRepo.encode(message.tanesh, writer.uint32(90).fork()).join();
642
+ }
643
+ if (message.payambar !== undefined) {
644
+ exports.WorkflowTaskRepo_PayambarRepo.encode(message.payambar, writer.uint32(98).fork()).join();
645
+ }
646
+ return writer;
647
+ },
648
+ decode(input, length) {
649
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
650
+ const end = length === undefined ? reader.len : reader.pos + length;
651
+ const message = createBaseWorkflowTaskRepo();
652
+ while (reader.pos < end) {
653
+ const tag = reader.uint32();
654
+ switch (tag >>> 3) {
655
+ case 1: {
656
+ if (tag !== 10) {
657
+ break;
658
+ }
659
+ message.workflow = workflow_1.Workflow.decode(reader, reader.uint32());
660
+ continue;
661
+ }
662
+ case 2: {
663
+ if (tag !== 18) {
664
+ break;
665
+ }
666
+ message.workflowDetail = workflow_1.WorkflowDetail.decode(reader, reader.uint32());
667
+ continue;
668
+ }
669
+ case 3: {
670
+ if (tag !== 26) {
671
+ break;
672
+ }
673
+ message.organization = identities_1.Organization.decode(reader, reader.uint32());
674
+ continue;
675
+ }
676
+ case 4: {
677
+ if (tag !== 34) {
678
+ break;
679
+ }
680
+ message.device = devices_1.Device.decode(reader, reader.uint32());
681
+ continue;
682
+ }
683
+ case 5: {
684
+ if (tag !== 42) {
685
+ break;
686
+ }
687
+ message.car = devices_1.Car.decode(reader, reader.uint32());
688
+ continue;
689
+ }
690
+ case 11: {
691
+ if (tag !== 90) {
692
+ break;
693
+ }
694
+ message.tanesh = exports.WorkflowTaskRepo_TaneshRepo.decode(reader, reader.uint32());
695
+ continue;
696
+ }
697
+ case 12: {
698
+ if (tag !== 98) {
699
+ break;
700
+ }
701
+ message.payambar = exports.WorkflowTaskRepo_PayambarRepo.decode(reader, reader.uint32());
702
+ continue;
703
+ }
704
+ }
705
+ if ((tag & 7) === 4 || tag === 0) {
706
+ break;
707
+ }
708
+ reader.skip(tag & 7);
709
+ }
710
+ return message;
711
+ },
712
+ fromJSON(object) {
713
+ return {
714
+ workflow: isSet(object.workflow) ? workflow_1.Workflow.fromJSON(object.workflow) : undefined,
715
+ workflowDetail: isSet(object.workflow_detail) ? workflow_1.WorkflowDetail.fromJSON(object.workflow_detail) : undefined,
716
+ organization: isSet(object.organization) ? identities_1.Organization.fromJSON(object.organization) : undefined,
717
+ device: isSet(object.device) ? devices_1.Device.fromJSON(object.device) : undefined,
718
+ car: isSet(object.car) ? devices_1.Car.fromJSON(object.car) : undefined,
719
+ tanesh: isSet(object.tanesh) ? exports.WorkflowTaskRepo_TaneshRepo.fromJSON(object.tanesh) : undefined,
720
+ payambar: isSet(object.payambar) ? exports.WorkflowTaskRepo_PayambarRepo.fromJSON(object.payambar) : undefined,
721
+ };
722
+ },
723
+ toJSON(message) {
724
+ const obj = {};
725
+ if (message.workflow !== undefined) {
726
+ obj.workflow = workflow_1.Workflow.toJSON(message.workflow);
727
+ }
728
+ if (message.workflowDetail !== undefined) {
729
+ obj.workflow_detail = workflow_1.WorkflowDetail.toJSON(message.workflowDetail);
730
+ }
731
+ if (message.organization !== undefined) {
732
+ obj.organization = identities_1.Organization.toJSON(message.organization);
733
+ }
734
+ if (message.device !== undefined) {
735
+ obj.device = devices_1.Device.toJSON(message.device);
736
+ }
737
+ if (message.car !== undefined) {
738
+ obj.car = devices_1.Car.toJSON(message.car);
739
+ }
740
+ if (message.tanesh !== undefined) {
741
+ obj.tanesh = exports.WorkflowTaskRepo_TaneshRepo.toJSON(message.tanesh);
742
+ }
743
+ if (message.payambar !== undefined) {
744
+ obj.payambar = exports.WorkflowTaskRepo_PayambarRepo.toJSON(message.payambar);
745
+ }
746
+ return obj;
747
+ },
748
+ create(base) {
749
+ return exports.WorkflowTaskRepo.fromPartial(base !== null && base !== void 0 ? base : {});
750
+ },
751
+ fromPartial(object) {
752
+ const message = createBaseWorkflowTaskRepo();
753
+ message.workflow = (object.workflow !== undefined && object.workflow !== null)
754
+ ? workflow_1.Workflow.fromPartial(object.workflow)
755
+ : undefined;
756
+ message.workflowDetail = (object.workflowDetail !== undefined && object.workflowDetail !== null)
757
+ ? workflow_1.WorkflowDetail.fromPartial(object.workflowDetail)
758
+ : undefined;
759
+ message.organization = (object.organization !== undefined && object.organization !== null)
760
+ ? identities_1.Organization.fromPartial(object.organization)
761
+ : undefined;
762
+ message.device = (object.device !== undefined && object.device !== null)
763
+ ? devices_1.Device.fromPartial(object.device)
764
+ : undefined;
765
+ message.car = (object.car !== undefined && object.car !== null) ? devices_1.Car.fromPartial(object.car) : undefined;
766
+ message.tanesh = (object.tanesh !== undefined && object.tanesh !== null)
767
+ ? exports.WorkflowTaskRepo_TaneshRepo.fromPartial(object.tanesh)
768
+ : undefined;
769
+ message.payambar = (object.payambar !== undefined && object.payambar !== null)
770
+ ? exports.WorkflowTaskRepo_PayambarRepo.fromPartial(object.payambar)
771
+ : undefined;
772
+ return message;
773
+ },
774
+ };
775
+ function createBaseWorkflowTaskRepo_TaneshRepo() {
776
+ return { passengerName: undefined, driverName: undefined };
777
+ }
778
+ exports.WorkflowTaskRepo_TaneshRepo = {
779
+ encode(message, writer = new wire_1.BinaryWriter()) {
780
+ if (message.passengerName !== undefined) {
781
+ writer.uint32(10).string(message.passengerName);
782
+ }
783
+ if (message.driverName !== undefined) {
784
+ writer.uint32(18).string(message.driverName);
785
+ }
786
+ return writer;
787
+ },
788
+ decode(input, length) {
789
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
790
+ const end = length === undefined ? reader.len : reader.pos + length;
791
+ const message = createBaseWorkflowTaskRepo_TaneshRepo();
792
+ while (reader.pos < end) {
793
+ const tag = reader.uint32();
794
+ switch (tag >>> 3) {
795
+ case 1: {
796
+ if (tag !== 10) {
797
+ break;
798
+ }
799
+ message.passengerName = reader.string();
800
+ continue;
801
+ }
802
+ case 2: {
803
+ if (tag !== 18) {
804
+ break;
805
+ }
806
+ message.driverName = reader.string();
807
+ continue;
808
+ }
809
+ }
810
+ if ((tag & 7) === 4 || tag === 0) {
811
+ break;
812
+ }
813
+ reader.skip(tag & 7);
814
+ }
815
+ return message;
816
+ },
817
+ fromJSON(object) {
818
+ return {
819
+ passengerName: isSet(object.passenger_name) ? globalThis.String(object.passenger_name) : undefined,
820
+ driverName: isSet(object.driver_name) ? globalThis.String(object.driver_name) : undefined,
821
+ };
822
+ },
823
+ toJSON(message) {
824
+ const obj = {};
825
+ if (message.passengerName !== undefined) {
826
+ obj.passenger_name = message.passengerName;
827
+ }
828
+ if (message.driverName !== undefined) {
829
+ obj.driver_name = message.driverName;
830
+ }
831
+ return obj;
832
+ },
833
+ create(base) {
834
+ return exports.WorkflowTaskRepo_TaneshRepo.fromPartial(base !== null && base !== void 0 ? base : {});
835
+ },
836
+ fromPartial(object) {
837
+ var _a, _b;
838
+ const message = createBaseWorkflowTaskRepo_TaneshRepo();
839
+ message.passengerName = (_a = object.passengerName) !== null && _a !== void 0 ? _a : undefined;
840
+ message.driverName = (_b = object.driverName) !== null && _b !== void 0 ? _b : undefined;
841
+ return message;
842
+ },
843
+ };
844
+ function createBaseWorkflowTaskRepo_PayambarRepo() {
845
+ return {};
846
+ }
847
+ exports.WorkflowTaskRepo_PayambarRepo = {
848
+ encode(_, writer = new wire_1.BinaryWriter()) {
849
+ return writer;
850
+ },
851
+ decode(input, length) {
852
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
853
+ const end = length === undefined ? reader.len : reader.pos + length;
854
+ const message = createBaseWorkflowTaskRepo_PayambarRepo();
855
+ while (reader.pos < end) {
856
+ const tag = reader.uint32();
857
+ switch (tag >>> 3) {
858
+ }
859
+ if ((tag & 7) === 4 || tag === 0) {
860
+ break;
861
+ }
862
+ reader.skip(tag & 7);
863
+ }
864
+ return message;
865
+ },
866
+ fromJSON(_) {
867
+ return {};
868
+ },
869
+ toJSON(_) {
870
+ const obj = {};
871
+ return obj;
872
+ },
873
+ create(base) {
874
+ return exports.WorkflowTaskRepo_PayambarRepo.fromPartial(base !== null && base !== void 0 ? base : {});
875
+ },
876
+ fromPartial(_) {
877
+ const message = createBaseWorkflowTaskRepo_PayambarRepo();
878
+ return message;
879
+ },
880
+ };
881
+ function createBaseSubscriptionRepo() {
882
+ return { partnerId: long_1.default.UZERO, customSubs: [], packages: [], gateways: [] };
883
+ }
884
+ exports.SubscriptionRepo = {
885
+ encode(message, writer = new wire_1.BinaryWriter()) {
886
+ if (!message.partnerId.equals(long_1.default.UZERO)) {
887
+ writer.uint32(8).uint64(message.partnerId.toString());
888
+ }
889
+ for (const v of message.customSubs) {
890
+ financial_1.Product.encode(v, writer.uint32(18).fork()).join();
891
+ }
892
+ for (const v of message.packages) {
893
+ financial_1.Product.encode(v, writer.uint32(26).fork()).join();
894
+ }
895
+ for (const v of message.gateways) {
896
+ financial_1.PaymentGateway.encode(v, writer.uint32(34).fork()).join();
897
+ }
898
+ return writer;
899
+ },
900
+ decode(input, length) {
901
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
902
+ const end = length === undefined ? reader.len : reader.pos + length;
903
+ const message = createBaseSubscriptionRepo();
904
+ while (reader.pos < end) {
905
+ const tag = reader.uint32();
906
+ switch (tag >>> 3) {
907
+ case 1: {
908
+ if (tag !== 8) {
909
+ break;
910
+ }
911
+ message.partnerId = long_1.default.fromString(reader.uint64().toString(), true);
912
+ continue;
913
+ }
914
+ case 2: {
915
+ if (tag !== 18) {
916
+ break;
917
+ }
918
+ message.customSubs.push(financial_1.Product.decode(reader, reader.uint32()));
919
+ continue;
920
+ }
921
+ case 3: {
922
+ if (tag !== 26) {
923
+ break;
924
+ }
925
+ message.packages.push(financial_1.Product.decode(reader, reader.uint32()));
926
+ continue;
927
+ }
928
+ case 4: {
929
+ if (tag !== 34) {
930
+ break;
931
+ }
932
+ message.gateways.push(financial_1.PaymentGateway.decode(reader, reader.uint32()));
933
+ continue;
934
+ }
935
+ }
936
+ if ((tag & 7) === 4 || tag === 0) {
937
+ break;
938
+ }
939
+ reader.skip(tag & 7);
940
+ }
941
+ return message;
942
+ },
943
+ fromJSON(object) {
944
+ return {
945
+ partnerId: isSet(object.partnerId) ? long_1.default.fromValue(object.partnerId) : long_1.default.UZERO,
946
+ customSubs: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.customSubs)
947
+ ? object.customSubs.map((e) => financial_1.Product.fromJSON(e))
948
+ : [],
949
+ packages: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.packages) ? object.packages.map((e) => financial_1.Product.fromJSON(e)) : [],
950
+ gateways: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.gateways)
951
+ ? object.gateways.map((e) => financial_1.PaymentGateway.fromJSON(e))
952
+ : [],
953
+ };
954
+ },
955
+ toJSON(message) {
956
+ var _a, _b, _c;
957
+ const obj = {};
958
+ if (!message.partnerId.equals(long_1.default.UZERO)) {
959
+ obj.partnerId = (message.partnerId || long_1.default.UZERO).toString();
960
+ }
961
+ if ((_a = message.customSubs) === null || _a === void 0 ? void 0 : _a.length) {
962
+ obj.customSubs = message.customSubs.map((e) => financial_1.Product.toJSON(e));
963
+ }
964
+ if ((_b = message.packages) === null || _b === void 0 ? void 0 : _b.length) {
965
+ obj.packages = message.packages.map((e) => financial_1.Product.toJSON(e));
966
+ }
967
+ if ((_c = message.gateways) === null || _c === void 0 ? void 0 : _c.length) {
968
+ obj.gateways = message.gateways.map((e) => financial_1.PaymentGateway.toJSON(e));
969
+ }
970
+ return obj;
971
+ },
972
+ create(base) {
973
+ return exports.SubscriptionRepo.fromPartial(base !== null && base !== void 0 ? base : {});
974
+ },
975
+ fromPartial(object) {
976
+ var _a, _b, _c;
977
+ const message = createBaseSubscriptionRepo();
978
+ message.partnerId = (object.partnerId !== undefined && object.partnerId !== null)
979
+ ? long_1.default.fromValue(object.partnerId)
980
+ : long_1.default.UZERO;
981
+ message.customSubs = ((_a = object.customSubs) === null || _a === void 0 ? void 0 : _a.map((e) => financial_1.Product.fromPartial(e))) || [];
982
+ message.packages = ((_b = object.packages) === null || _b === void 0 ? void 0 : _b.map((e) => financial_1.Product.fromPartial(e))) || [];
983
+ message.gateways = ((_c = object.gateways) === null || _c === void 0 ? void 0 : _c.map((e) => financial_1.PaymentGateway.fromPartial(e))) || [];
984
+ return message;
985
+ },
986
+ };
987
+ function createBaseProductRepo() {
988
+ return { components: [], currency: undefined, productType: undefined, properties: undefined };
989
+ }
990
+ exports.ProductRepo = {
991
+ encode(message, writer = new wire_1.BinaryWriter()) {
992
+ for (const v of message.components) {
993
+ financial_1.Product.encode(v, writer.uint32(186).fork()).join();
994
+ }
995
+ if (message.currency !== undefined) {
996
+ financial_1.Currency.encode(message.currency, writer.uint32(154).fork()).join();
997
+ }
998
+ if (message.productType !== undefined) {
999
+ financial_1.ProductType.encode(message.productType, writer.uint32(162).fork()).join();
1000
+ }
1001
+ if (message.properties !== undefined) {
1002
+ writer.uint32(74).string(message.properties);
1003
+ }
1004
+ return writer;
1005
+ },
1006
+ decode(input, length) {
1007
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1008
+ const end = length === undefined ? reader.len : reader.pos + length;
1009
+ const message = createBaseProductRepo();
1010
+ while (reader.pos < end) {
1011
+ const tag = reader.uint32();
1012
+ switch (tag >>> 3) {
1013
+ case 23: {
1014
+ if (tag !== 186) {
1015
+ break;
1016
+ }
1017
+ message.components.push(financial_1.Product.decode(reader, reader.uint32()));
1018
+ continue;
1019
+ }
1020
+ case 19: {
1021
+ if (tag !== 154) {
1022
+ break;
1023
+ }
1024
+ message.currency = financial_1.Currency.decode(reader, reader.uint32());
1025
+ continue;
1026
+ }
1027
+ case 20: {
1028
+ if (tag !== 162) {
1029
+ break;
1030
+ }
1031
+ message.productType = financial_1.ProductType.decode(reader, reader.uint32());
1032
+ continue;
1033
+ }
1034
+ case 9: {
1035
+ if (tag !== 74) {
1036
+ break;
1037
+ }
1038
+ message.properties = reader.string();
1039
+ continue;
1040
+ }
1041
+ }
1042
+ if ((tag & 7) === 4 || tag === 0) {
1043
+ break;
1044
+ }
1045
+ reader.skip(tag & 7);
1046
+ }
1047
+ return message;
1048
+ },
1049
+ fromJSON(object) {
1050
+ return {
1051
+ components: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.components)
1052
+ ? object.components.map((e) => financial_1.Product.fromJSON(e))
1053
+ : [],
1054
+ currency: isSet(object.currency) ? financial_1.Currency.fromJSON(object.currency) : undefined,
1055
+ productType: isSet(object.product_type) ? financial_1.ProductType.fromJSON(object.product_type) : undefined,
1056
+ properties: isSet(object.properties) ? globalThis.String(object.properties) : undefined,
1057
+ };
1058
+ },
1059
+ toJSON(message) {
1060
+ var _a;
1061
+ const obj = {};
1062
+ if ((_a = message.components) === null || _a === void 0 ? void 0 : _a.length) {
1063
+ obj.components = message.components.map((e) => financial_1.Product.toJSON(e));
1064
+ }
1065
+ if (message.currency !== undefined) {
1066
+ obj.currency = financial_1.Currency.toJSON(message.currency);
1067
+ }
1068
+ if (message.productType !== undefined) {
1069
+ obj.product_type = financial_1.ProductType.toJSON(message.productType);
1070
+ }
1071
+ if (message.properties !== undefined) {
1072
+ obj.properties = message.properties;
1073
+ }
1074
+ return obj;
1075
+ },
1076
+ create(base) {
1077
+ return exports.ProductRepo.fromPartial(base !== null && base !== void 0 ? base : {});
1078
+ },
1079
+ fromPartial(object) {
1080
+ var _a, _b;
1081
+ const message = createBaseProductRepo();
1082
+ message.components = ((_a = object.components) === null || _a === void 0 ? void 0 : _a.map((e) => financial_1.Product.fromPartial(e))) || [];
1083
+ message.currency = (object.currency !== undefined && object.currency !== null)
1084
+ ? financial_1.Currency.fromPartial(object.currency)
1085
+ : undefined;
1086
+ message.productType = (object.productType !== undefined && object.productType !== null)
1087
+ ? financial_1.ProductType.fromPartial(object.productType)
1088
+ : undefined;
1089
+ message.properties = (_b = object.properties) !== null && _b !== void 0 ? _b : undefined;
1090
+ return message;
1091
+ },
1092
+ };
607
1093
  function isSet(value) {
608
1094
  return value !== null && value !== undefined;
609
1095
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fatehan/tsrp",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "fatehan main models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",