weave-typescript 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,9 +5,10 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/model/v1/service.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ModelCatalogServiceDefinition = exports.ModelCatalogServiceClientImpl = exports.ModelCatalogServiceServiceName = exports.ListCatalogProvidersResponse = exports.ListCatalogProvidersRequest = exports.GetModelResponse = exports.GetModelRequest = exports.ListModelsResponse = exports.ListModelsRequest = exports.protobufPackage = void 0;
8
+ exports.ModelCatalogServiceDefinition = exports.ModelCatalogServiceClientImpl = exports.ModelCatalogServiceServiceName = exports.SetChatDefaultsResponse = exports.SetChatDefaultsRequest = exports.GetChatDefaultsResponse = exports.GetChatDefaultsRequest = exports.OrganizationChatSettings = exports.UnapproveModelResponse = exports.UnapproveModelRequest = exports.ApproveModelResponse = exports.ApproveModelRequest = exports.ListOrganizationApprovedModelsResponse = exports.ListOrganizationApprovedModelsRequest = exports.OrganizationApprovedModel = exports.ListCatalogProvidersResponse = exports.ListCatalogProvidersRequest = exports.GetModelResponse = exports.GetModelRequest = exports.ListModelsResponse = exports.ListModelsRequest = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const timestamp_pb_1 = require("../../../google/protobuf/timestamp.pb");
11
12
  const provider_pb_1 = require("../../provider/v1/provider.pb");
12
13
  const model_pb_1 = require("./model.pb");
13
14
  exports.protobufPackage = "weaveapi.model.v1";
@@ -453,6 +454,923 @@ exports.ListCatalogProvidersResponse = {
453
454
  return message;
454
455
  },
455
456
  };
457
+ function createBaseOrganizationApprovedModel() {
458
+ return {
459
+ id: "",
460
+ organizationId: "",
461
+ providerConfigurationId: "",
462
+ modelId: "",
463
+ approvedByUserId: "",
464
+ approvedAt: undefined,
465
+ };
466
+ }
467
+ exports.OrganizationApprovedModel = {
468
+ encode(message, writer = new wire_1.BinaryWriter()) {
469
+ if (message.id !== "") {
470
+ writer.uint32(10).string(message.id);
471
+ }
472
+ if (message.organizationId !== "") {
473
+ writer.uint32(18).string(message.organizationId);
474
+ }
475
+ if (message.providerConfigurationId !== "") {
476
+ writer.uint32(26).string(message.providerConfigurationId);
477
+ }
478
+ if (message.modelId !== "") {
479
+ writer.uint32(34).string(message.modelId);
480
+ }
481
+ if (message.approvedByUserId !== "") {
482
+ writer.uint32(42).string(message.approvedByUserId);
483
+ }
484
+ if (message.approvedAt !== undefined) {
485
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.approvedAt), writer.uint32(50).fork()).join();
486
+ }
487
+ return writer;
488
+ },
489
+ decode(input, length) {
490
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
491
+ const end = length === undefined ? reader.len : reader.pos + length;
492
+ const message = createBaseOrganizationApprovedModel();
493
+ while (reader.pos < end) {
494
+ const tag = reader.uint32();
495
+ switch (tag >>> 3) {
496
+ case 1: {
497
+ if (tag !== 10) {
498
+ break;
499
+ }
500
+ message.id = reader.string();
501
+ continue;
502
+ }
503
+ case 2: {
504
+ if (tag !== 18) {
505
+ break;
506
+ }
507
+ message.organizationId = reader.string();
508
+ continue;
509
+ }
510
+ case 3: {
511
+ if (tag !== 26) {
512
+ break;
513
+ }
514
+ message.providerConfigurationId = reader.string();
515
+ continue;
516
+ }
517
+ case 4: {
518
+ if (tag !== 34) {
519
+ break;
520
+ }
521
+ message.modelId = reader.string();
522
+ continue;
523
+ }
524
+ case 5: {
525
+ if (tag !== 42) {
526
+ break;
527
+ }
528
+ message.approvedByUserId = reader.string();
529
+ continue;
530
+ }
531
+ case 6: {
532
+ if (tag !== 50) {
533
+ break;
534
+ }
535
+ message.approvedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
536
+ continue;
537
+ }
538
+ }
539
+ if ((tag & 7) === 4 || tag === 0) {
540
+ break;
541
+ }
542
+ reader.skip(tag & 7);
543
+ }
544
+ return message;
545
+ },
546
+ fromJSON(object) {
547
+ return {
548
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
549
+ organizationId: isSet(object.organizationId)
550
+ ? globalThis.String(object.organizationId)
551
+ : isSet(object.organization_id)
552
+ ? globalThis.String(object.organization_id)
553
+ : "",
554
+ providerConfigurationId: isSet(object.providerConfigurationId)
555
+ ? globalThis.String(object.providerConfigurationId)
556
+ : isSet(object.provider_configuration_id)
557
+ ? globalThis.String(object.provider_configuration_id)
558
+ : "",
559
+ modelId: isSet(object.modelId)
560
+ ? globalThis.String(object.modelId)
561
+ : isSet(object.model_id)
562
+ ? globalThis.String(object.model_id)
563
+ : "",
564
+ approvedByUserId: isSet(object.approvedByUserId)
565
+ ? globalThis.String(object.approvedByUserId)
566
+ : isSet(object.approved_by_user_id)
567
+ ? globalThis.String(object.approved_by_user_id)
568
+ : "",
569
+ approvedAt: isSet(object.approvedAt)
570
+ ? fromJsonTimestamp(object.approvedAt)
571
+ : isSet(object.approved_at)
572
+ ? fromJsonTimestamp(object.approved_at)
573
+ : undefined,
574
+ };
575
+ },
576
+ toJSON(message) {
577
+ const obj = {};
578
+ if (message.id !== "") {
579
+ obj.id = message.id;
580
+ }
581
+ if (message.organizationId !== "") {
582
+ obj.organizationId = message.organizationId;
583
+ }
584
+ if (message.providerConfigurationId !== "") {
585
+ obj.providerConfigurationId = message.providerConfigurationId;
586
+ }
587
+ if (message.modelId !== "") {
588
+ obj.modelId = message.modelId;
589
+ }
590
+ if (message.approvedByUserId !== "") {
591
+ obj.approvedByUserId = message.approvedByUserId;
592
+ }
593
+ if (message.approvedAt !== undefined) {
594
+ obj.approvedAt = message.approvedAt.toISOString();
595
+ }
596
+ return obj;
597
+ },
598
+ create(base) {
599
+ return exports.OrganizationApprovedModel.fromPartial(base !== null && base !== void 0 ? base : {});
600
+ },
601
+ fromPartial(object) {
602
+ var _a, _b, _c, _d, _e, _f;
603
+ const message = createBaseOrganizationApprovedModel();
604
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
605
+ message.organizationId = (_b = object.organizationId) !== null && _b !== void 0 ? _b : "";
606
+ message.providerConfigurationId = (_c = object.providerConfigurationId) !== null && _c !== void 0 ? _c : "";
607
+ message.modelId = (_d = object.modelId) !== null && _d !== void 0 ? _d : "";
608
+ message.approvedByUserId = (_e = object.approvedByUserId) !== null && _e !== void 0 ? _e : "";
609
+ message.approvedAt = (_f = object.approvedAt) !== null && _f !== void 0 ? _f : undefined;
610
+ return message;
611
+ },
612
+ };
613
+ function createBaseListOrganizationApprovedModelsRequest() {
614
+ return { organizationId: "" };
615
+ }
616
+ exports.ListOrganizationApprovedModelsRequest = {
617
+ encode(message, writer = new wire_1.BinaryWriter()) {
618
+ if (message.organizationId !== "") {
619
+ writer.uint32(10).string(message.organizationId);
620
+ }
621
+ return writer;
622
+ },
623
+ decode(input, length) {
624
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
625
+ const end = length === undefined ? reader.len : reader.pos + length;
626
+ const message = createBaseListOrganizationApprovedModelsRequest();
627
+ while (reader.pos < end) {
628
+ const tag = reader.uint32();
629
+ switch (tag >>> 3) {
630
+ case 1: {
631
+ if (tag !== 10) {
632
+ break;
633
+ }
634
+ message.organizationId = reader.string();
635
+ continue;
636
+ }
637
+ }
638
+ if ((tag & 7) === 4 || tag === 0) {
639
+ break;
640
+ }
641
+ reader.skip(tag & 7);
642
+ }
643
+ return message;
644
+ },
645
+ fromJSON(object) {
646
+ return {
647
+ organizationId: isSet(object.organizationId)
648
+ ? globalThis.String(object.organizationId)
649
+ : isSet(object.organization_id)
650
+ ? globalThis.String(object.organization_id)
651
+ : "",
652
+ };
653
+ },
654
+ toJSON(message) {
655
+ const obj = {};
656
+ if (message.organizationId !== "") {
657
+ obj.organizationId = message.organizationId;
658
+ }
659
+ return obj;
660
+ },
661
+ create(base) {
662
+ return exports.ListOrganizationApprovedModelsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
663
+ },
664
+ fromPartial(object) {
665
+ var _a;
666
+ const message = createBaseListOrganizationApprovedModelsRequest();
667
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
668
+ return message;
669
+ },
670
+ };
671
+ function createBaseListOrganizationApprovedModelsResponse() {
672
+ return { approvedModels: [] };
673
+ }
674
+ exports.ListOrganizationApprovedModelsResponse = {
675
+ encode(message, writer = new wire_1.BinaryWriter()) {
676
+ for (const v of message.approvedModels) {
677
+ exports.OrganizationApprovedModel.encode(v, writer.uint32(10).fork()).join();
678
+ }
679
+ return writer;
680
+ },
681
+ decode(input, length) {
682
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
683
+ const end = length === undefined ? reader.len : reader.pos + length;
684
+ const message = createBaseListOrganizationApprovedModelsResponse();
685
+ while (reader.pos < end) {
686
+ const tag = reader.uint32();
687
+ switch (tag >>> 3) {
688
+ case 1: {
689
+ if (tag !== 10) {
690
+ break;
691
+ }
692
+ message.approvedModels.push(exports.OrganizationApprovedModel.decode(reader, reader.uint32()));
693
+ continue;
694
+ }
695
+ }
696
+ if ((tag & 7) === 4 || tag === 0) {
697
+ break;
698
+ }
699
+ reader.skip(tag & 7);
700
+ }
701
+ return message;
702
+ },
703
+ fromJSON(object) {
704
+ return {
705
+ approvedModels: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.approvedModels)
706
+ ? object.approvedModels.map((e) => exports.OrganizationApprovedModel.fromJSON(e))
707
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.approved_models)
708
+ ? object.approved_models.map((e) => exports.OrganizationApprovedModel.fromJSON(e))
709
+ : [],
710
+ };
711
+ },
712
+ toJSON(message) {
713
+ var _a;
714
+ const obj = {};
715
+ if ((_a = message.approvedModels) === null || _a === void 0 ? void 0 : _a.length) {
716
+ obj.approvedModels = message.approvedModels.map((e) => exports.OrganizationApprovedModel.toJSON(e));
717
+ }
718
+ return obj;
719
+ },
720
+ create(base) {
721
+ return exports.ListOrganizationApprovedModelsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
722
+ },
723
+ fromPartial(object) {
724
+ var _a;
725
+ const message = createBaseListOrganizationApprovedModelsResponse();
726
+ message.approvedModels = ((_a = object.approvedModels) === null || _a === void 0 ? void 0 : _a.map((e) => exports.OrganizationApprovedModel.fromPartial(e))) || [];
727
+ return message;
728
+ },
729
+ };
730
+ function createBaseApproveModelRequest() {
731
+ return { organizationId: "", providerConfigurationId: "", modelId: "" };
732
+ }
733
+ exports.ApproveModelRequest = {
734
+ encode(message, writer = new wire_1.BinaryWriter()) {
735
+ if (message.organizationId !== "") {
736
+ writer.uint32(10).string(message.organizationId);
737
+ }
738
+ if (message.providerConfigurationId !== "") {
739
+ writer.uint32(18).string(message.providerConfigurationId);
740
+ }
741
+ if (message.modelId !== "") {
742
+ writer.uint32(26).string(message.modelId);
743
+ }
744
+ return writer;
745
+ },
746
+ decode(input, length) {
747
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
748
+ const end = length === undefined ? reader.len : reader.pos + length;
749
+ const message = createBaseApproveModelRequest();
750
+ while (reader.pos < end) {
751
+ const tag = reader.uint32();
752
+ switch (tag >>> 3) {
753
+ case 1: {
754
+ if (tag !== 10) {
755
+ break;
756
+ }
757
+ message.organizationId = reader.string();
758
+ continue;
759
+ }
760
+ case 2: {
761
+ if (tag !== 18) {
762
+ break;
763
+ }
764
+ message.providerConfigurationId = reader.string();
765
+ continue;
766
+ }
767
+ case 3: {
768
+ if (tag !== 26) {
769
+ break;
770
+ }
771
+ message.modelId = reader.string();
772
+ continue;
773
+ }
774
+ }
775
+ if ((tag & 7) === 4 || tag === 0) {
776
+ break;
777
+ }
778
+ reader.skip(tag & 7);
779
+ }
780
+ return message;
781
+ },
782
+ fromJSON(object) {
783
+ return {
784
+ organizationId: isSet(object.organizationId)
785
+ ? globalThis.String(object.organizationId)
786
+ : isSet(object.organization_id)
787
+ ? globalThis.String(object.organization_id)
788
+ : "",
789
+ providerConfigurationId: isSet(object.providerConfigurationId)
790
+ ? globalThis.String(object.providerConfigurationId)
791
+ : isSet(object.provider_configuration_id)
792
+ ? globalThis.String(object.provider_configuration_id)
793
+ : "",
794
+ modelId: isSet(object.modelId)
795
+ ? globalThis.String(object.modelId)
796
+ : isSet(object.model_id)
797
+ ? globalThis.String(object.model_id)
798
+ : "",
799
+ };
800
+ },
801
+ toJSON(message) {
802
+ const obj = {};
803
+ if (message.organizationId !== "") {
804
+ obj.organizationId = message.organizationId;
805
+ }
806
+ if (message.providerConfigurationId !== "") {
807
+ obj.providerConfigurationId = message.providerConfigurationId;
808
+ }
809
+ if (message.modelId !== "") {
810
+ obj.modelId = message.modelId;
811
+ }
812
+ return obj;
813
+ },
814
+ create(base) {
815
+ return exports.ApproveModelRequest.fromPartial(base !== null && base !== void 0 ? base : {});
816
+ },
817
+ fromPartial(object) {
818
+ var _a, _b, _c;
819
+ const message = createBaseApproveModelRequest();
820
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
821
+ message.providerConfigurationId = (_b = object.providerConfigurationId) !== null && _b !== void 0 ? _b : "";
822
+ message.modelId = (_c = object.modelId) !== null && _c !== void 0 ? _c : "";
823
+ return message;
824
+ },
825
+ };
826
+ function createBaseApproveModelResponse() {
827
+ return { approvedModel: undefined };
828
+ }
829
+ exports.ApproveModelResponse = {
830
+ encode(message, writer = new wire_1.BinaryWriter()) {
831
+ if (message.approvedModel !== undefined) {
832
+ exports.OrganizationApprovedModel.encode(message.approvedModel, writer.uint32(10).fork()).join();
833
+ }
834
+ return writer;
835
+ },
836
+ decode(input, length) {
837
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
838
+ const end = length === undefined ? reader.len : reader.pos + length;
839
+ const message = createBaseApproveModelResponse();
840
+ while (reader.pos < end) {
841
+ const tag = reader.uint32();
842
+ switch (tag >>> 3) {
843
+ case 1: {
844
+ if (tag !== 10) {
845
+ break;
846
+ }
847
+ message.approvedModel = exports.OrganizationApprovedModel.decode(reader, reader.uint32());
848
+ continue;
849
+ }
850
+ }
851
+ if ((tag & 7) === 4 || tag === 0) {
852
+ break;
853
+ }
854
+ reader.skip(tag & 7);
855
+ }
856
+ return message;
857
+ },
858
+ fromJSON(object) {
859
+ return {
860
+ approvedModel: isSet(object.approvedModel)
861
+ ? exports.OrganizationApprovedModel.fromJSON(object.approvedModel)
862
+ : isSet(object.approved_model)
863
+ ? exports.OrganizationApprovedModel.fromJSON(object.approved_model)
864
+ : undefined,
865
+ };
866
+ },
867
+ toJSON(message) {
868
+ const obj = {};
869
+ if (message.approvedModel !== undefined) {
870
+ obj.approvedModel = exports.OrganizationApprovedModel.toJSON(message.approvedModel);
871
+ }
872
+ return obj;
873
+ },
874
+ create(base) {
875
+ return exports.ApproveModelResponse.fromPartial(base !== null && base !== void 0 ? base : {});
876
+ },
877
+ fromPartial(object) {
878
+ const message = createBaseApproveModelResponse();
879
+ message.approvedModel = (object.approvedModel !== undefined && object.approvedModel !== null)
880
+ ? exports.OrganizationApprovedModel.fromPartial(object.approvedModel)
881
+ : undefined;
882
+ return message;
883
+ },
884
+ };
885
+ function createBaseUnapproveModelRequest() {
886
+ return { organizationId: "", approvedModelId: "" };
887
+ }
888
+ exports.UnapproveModelRequest = {
889
+ encode(message, writer = new wire_1.BinaryWriter()) {
890
+ if (message.organizationId !== "") {
891
+ writer.uint32(10).string(message.organizationId);
892
+ }
893
+ if (message.approvedModelId !== "") {
894
+ writer.uint32(18).string(message.approvedModelId);
895
+ }
896
+ return writer;
897
+ },
898
+ decode(input, length) {
899
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
900
+ const end = length === undefined ? reader.len : reader.pos + length;
901
+ const message = createBaseUnapproveModelRequest();
902
+ while (reader.pos < end) {
903
+ const tag = reader.uint32();
904
+ switch (tag >>> 3) {
905
+ case 1: {
906
+ if (tag !== 10) {
907
+ break;
908
+ }
909
+ message.organizationId = reader.string();
910
+ continue;
911
+ }
912
+ case 2: {
913
+ if (tag !== 18) {
914
+ break;
915
+ }
916
+ message.approvedModelId = reader.string();
917
+ continue;
918
+ }
919
+ }
920
+ if ((tag & 7) === 4 || tag === 0) {
921
+ break;
922
+ }
923
+ reader.skip(tag & 7);
924
+ }
925
+ return message;
926
+ },
927
+ fromJSON(object) {
928
+ return {
929
+ organizationId: isSet(object.organizationId)
930
+ ? globalThis.String(object.organizationId)
931
+ : isSet(object.organization_id)
932
+ ? globalThis.String(object.organization_id)
933
+ : "",
934
+ approvedModelId: isSet(object.approvedModelId)
935
+ ? globalThis.String(object.approvedModelId)
936
+ : isSet(object.approved_model_id)
937
+ ? globalThis.String(object.approved_model_id)
938
+ : "",
939
+ };
940
+ },
941
+ toJSON(message) {
942
+ const obj = {};
943
+ if (message.organizationId !== "") {
944
+ obj.organizationId = message.organizationId;
945
+ }
946
+ if (message.approvedModelId !== "") {
947
+ obj.approvedModelId = message.approvedModelId;
948
+ }
949
+ return obj;
950
+ },
951
+ create(base) {
952
+ return exports.UnapproveModelRequest.fromPartial(base !== null && base !== void 0 ? base : {});
953
+ },
954
+ fromPartial(object) {
955
+ var _a, _b;
956
+ const message = createBaseUnapproveModelRequest();
957
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
958
+ message.approvedModelId = (_b = object.approvedModelId) !== null && _b !== void 0 ? _b : "";
959
+ return message;
960
+ },
961
+ };
962
+ function createBaseUnapproveModelResponse() {
963
+ return {};
964
+ }
965
+ exports.UnapproveModelResponse = {
966
+ encode(_, writer = new wire_1.BinaryWriter()) {
967
+ return writer;
968
+ },
969
+ decode(input, length) {
970
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
971
+ const end = length === undefined ? reader.len : reader.pos + length;
972
+ const message = createBaseUnapproveModelResponse();
973
+ while (reader.pos < end) {
974
+ const tag = reader.uint32();
975
+ switch (tag >>> 3) {
976
+ }
977
+ if ((tag & 7) === 4 || tag === 0) {
978
+ break;
979
+ }
980
+ reader.skip(tag & 7);
981
+ }
982
+ return message;
983
+ },
984
+ fromJSON(_) {
985
+ return {};
986
+ },
987
+ toJSON(_) {
988
+ const obj = {};
989
+ return obj;
990
+ },
991
+ create(base) {
992
+ return exports.UnapproveModelResponse.fromPartial(base !== null && base !== void 0 ? base : {});
993
+ },
994
+ fromPartial(_) {
995
+ const message = createBaseUnapproveModelResponse();
996
+ return message;
997
+ },
998
+ };
999
+ function createBaseOrganizationChatSettings() {
1000
+ return { organizationId: "", defaultChatModelId: "", defaultProviderConfigurationId: "", updatedAt: undefined };
1001
+ }
1002
+ exports.OrganizationChatSettings = {
1003
+ encode(message, writer = new wire_1.BinaryWriter()) {
1004
+ if (message.organizationId !== "") {
1005
+ writer.uint32(10).string(message.organizationId);
1006
+ }
1007
+ if (message.defaultChatModelId !== "") {
1008
+ writer.uint32(18).string(message.defaultChatModelId);
1009
+ }
1010
+ if (message.defaultProviderConfigurationId !== "") {
1011
+ writer.uint32(26).string(message.defaultProviderConfigurationId);
1012
+ }
1013
+ if (message.updatedAt !== undefined) {
1014
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(34).fork()).join();
1015
+ }
1016
+ return writer;
1017
+ },
1018
+ decode(input, length) {
1019
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1020
+ const end = length === undefined ? reader.len : reader.pos + length;
1021
+ const message = createBaseOrganizationChatSettings();
1022
+ while (reader.pos < end) {
1023
+ const tag = reader.uint32();
1024
+ switch (tag >>> 3) {
1025
+ case 1: {
1026
+ if (tag !== 10) {
1027
+ break;
1028
+ }
1029
+ message.organizationId = reader.string();
1030
+ continue;
1031
+ }
1032
+ case 2: {
1033
+ if (tag !== 18) {
1034
+ break;
1035
+ }
1036
+ message.defaultChatModelId = reader.string();
1037
+ continue;
1038
+ }
1039
+ case 3: {
1040
+ if (tag !== 26) {
1041
+ break;
1042
+ }
1043
+ message.defaultProviderConfigurationId = reader.string();
1044
+ continue;
1045
+ }
1046
+ case 4: {
1047
+ if (tag !== 34) {
1048
+ break;
1049
+ }
1050
+ message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1051
+ continue;
1052
+ }
1053
+ }
1054
+ if ((tag & 7) === 4 || tag === 0) {
1055
+ break;
1056
+ }
1057
+ reader.skip(tag & 7);
1058
+ }
1059
+ return message;
1060
+ },
1061
+ fromJSON(object) {
1062
+ return {
1063
+ organizationId: isSet(object.organizationId)
1064
+ ? globalThis.String(object.organizationId)
1065
+ : isSet(object.organization_id)
1066
+ ? globalThis.String(object.organization_id)
1067
+ : "",
1068
+ defaultChatModelId: isSet(object.defaultChatModelId)
1069
+ ? globalThis.String(object.defaultChatModelId)
1070
+ : isSet(object.default_chat_model_id)
1071
+ ? globalThis.String(object.default_chat_model_id)
1072
+ : "",
1073
+ defaultProviderConfigurationId: isSet(object.defaultProviderConfigurationId)
1074
+ ? globalThis.String(object.defaultProviderConfigurationId)
1075
+ : isSet(object.default_provider_configuration_id)
1076
+ ? globalThis.String(object.default_provider_configuration_id)
1077
+ : "",
1078
+ updatedAt: isSet(object.updatedAt)
1079
+ ? fromJsonTimestamp(object.updatedAt)
1080
+ : isSet(object.updated_at)
1081
+ ? fromJsonTimestamp(object.updated_at)
1082
+ : undefined,
1083
+ };
1084
+ },
1085
+ toJSON(message) {
1086
+ const obj = {};
1087
+ if (message.organizationId !== "") {
1088
+ obj.organizationId = message.organizationId;
1089
+ }
1090
+ if (message.defaultChatModelId !== "") {
1091
+ obj.defaultChatModelId = message.defaultChatModelId;
1092
+ }
1093
+ if (message.defaultProviderConfigurationId !== "") {
1094
+ obj.defaultProviderConfigurationId = message.defaultProviderConfigurationId;
1095
+ }
1096
+ if (message.updatedAt !== undefined) {
1097
+ obj.updatedAt = message.updatedAt.toISOString();
1098
+ }
1099
+ return obj;
1100
+ },
1101
+ create(base) {
1102
+ return exports.OrganizationChatSettings.fromPartial(base !== null && base !== void 0 ? base : {});
1103
+ },
1104
+ fromPartial(object) {
1105
+ var _a, _b, _c, _d;
1106
+ const message = createBaseOrganizationChatSettings();
1107
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1108
+ message.defaultChatModelId = (_b = object.defaultChatModelId) !== null && _b !== void 0 ? _b : "";
1109
+ message.defaultProviderConfigurationId = (_c = object.defaultProviderConfigurationId) !== null && _c !== void 0 ? _c : "";
1110
+ message.updatedAt = (_d = object.updatedAt) !== null && _d !== void 0 ? _d : undefined;
1111
+ return message;
1112
+ },
1113
+ };
1114
+ function createBaseGetChatDefaultsRequest() {
1115
+ return { organizationId: "" };
1116
+ }
1117
+ exports.GetChatDefaultsRequest = {
1118
+ encode(message, writer = new wire_1.BinaryWriter()) {
1119
+ if (message.organizationId !== "") {
1120
+ writer.uint32(10).string(message.organizationId);
1121
+ }
1122
+ return writer;
1123
+ },
1124
+ decode(input, length) {
1125
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1126
+ const end = length === undefined ? reader.len : reader.pos + length;
1127
+ const message = createBaseGetChatDefaultsRequest();
1128
+ while (reader.pos < end) {
1129
+ const tag = reader.uint32();
1130
+ switch (tag >>> 3) {
1131
+ case 1: {
1132
+ if (tag !== 10) {
1133
+ break;
1134
+ }
1135
+ message.organizationId = reader.string();
1136
+ continue;
1137
+ }
1138
+ }
1139
+ if ((tag & 7) === 4 || tag === 0) {
1140
+ break;
1141
+ }
1142
+ reader.skip(tag & 7);
1143
+ }
1144
+ return message;
1145
+ },
1146
+ fromJSON(object) {
1147
+ return {
1148
+ organizationId: isSet(object.organizationId)
1149
+ ? globalThis.String(object.organizationId)
1150
+ : isSet(object.organization_id)
1151
+ ? globalThis.String(object.organization_id)
1152
+ : "",
1153
+ };
1154
+ },
1155
+ toJSON(message) {
1156
+ const obj = {};
1157
+ if (message.organizationId !== "") {
1158
+ obj.organizationId = message.organizationId;
1159
+ }
1160
+ return obj;
1161
+ },
1162
+ create(base) {
1163
+ return exports.GetChatDefaultsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1164
+ },
1165
+ fromPartial(object) {
1166
+ var _a;
1167
+ const message = createBaseGetChatDefaultsRequest();
1168
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1169
+ return message;
1170
+ },
1171
+ };
1172
+ function createBaseGetChatDefaultsResponse() {
1173
+ return { settings: undefined };
1174
+ }
1175
+ exports.GetChatDefaultsResponse = {
1176
+ encode(message, writer = new wire_1.BinaryWriter()) {
1177
+ if (message.settings !== undefined) {
1178
+ exports.OrganizationChatSettings.encode(message.settings, writer.uint32(10).fork()).join();
1179
+ }
1180
+ return writer;
1181
+ },
1182
+ decode(input, length) {
1183
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1184
+ const end = length === undefined ? reader.len : reader.pos + length;
1185
+ const message = createBaseGetChatDefaultsResponse();
1186
+ while (reader.pos < end) {
1187
+ const tag = reader.uint32();
1188
+ switch (tag >>> 3) {
1189
+ case 1: {
1190
+ if (tag !== 10) {
1191
+ break;
1192
+ }
1193
+ message.settings = exports.OrganizationChatSettings.decode(reader, reader.uint32());
1194
+ continue;
1195
+ }
1196
+ }
1197
+ if ((tag & 7) === 4 || tag === 0) {
1198
+ break;
1199
+ }
1200
+ reader.skip(tag & 7);
1201
+ }
1202
+ return message;
1203
+ },
1204
+ fromJSON(object) {
1205
+ return { settings: isSet(object.settings) ? exports.OrganizationChatSettings.fromJSON(object.settings) : undefined };
1206
+ },
1207
+ toJSON(message) {
1208
+ const obj = {};
1209
+ if (message.settings !== undefined) {
1210
+ obj.settings = exports.OrganizationChatSettings.toJSON(message.settings);
1211
+ }
1212
+ return obj;
1213
+ },
1214
+ create(base) {
1215
+ return exports.GetChatDefaultsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1216
+ },
1217
+ fromPartial(object) {
1218
+ const message = createBaseGetChatDefaultsResponse();
1219
+ message.settings = (object.settings !== undefined && object.settings !== null)
1220
+ ? exports.OrganizationChatSettings.fromPartial(object.settings)
1221
+ : undefined;
1222
+ return message;
1223
+ },
1224
+ };
1225
+ function createBaseSetChatDefaultsRequest() {
1226
+ return { organizationId: "", defaultChatModelId: "", defaultProviderConfigurationId: "" };
1227
+ }
1228
+ exports.SetChatDefaultsRequest = {
1229
+ encode(message, writer = new wire_1.BinaryWriter()) {
1230
+ if (message.organizationId !== "") {
1231
+ writer.uint32(10).string(message.organizationId);
1232
+ }
1233
+ if (message.defaultChatModelId !== "") {
1234
+ writer.uint32(18).string(message.defaultChatModelId);
1235
+ }
1236
+ if (message.defaultProviderConfigurationId !== "") {
1237
+ writer.uint32(26).string(message.defaultProviderConfigurationId);
1238
+ }
1239
+ return writer;
1240
+ },
1241
+ decode(input, length) {
1242
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1243
+ const end = length === undefined ? reader.len : reader.pos + length;
1244
+ const message = createBaseSetChatDefaultsRequest();
1245
+ while (reader.pos < end) {
1246
+ const tag = reader.uint32();
1247
+ switch (tag >>> 3) {
1248
+ case 1: {
1249
+ if (tag !== 10) {
1250
+ break;
1251
+ }
1252
+ message.organizationId = reader.string();
1253
+ continue;
1254
+ }
1255
+ case 2: {
1256
+ if (tag !== 18) {
1257
+ break;
1258
+ }
1259
+ message.defaultChatModelId = reader.string();
1260
+ continue;
1261
+ }
1262
+ case 3: {
1263
+ if (tag !== 26) {
1264
+ break;
1265
+ }
1266
+ message.defaultProviderConfigurationId = reader.string();
1267
+ continue;
1268
+ }
1269
+ }
1270
+ if ((tag & 7) === 4 || tag === 0) {
1271
+ break;
1272
+ }
1273
+ reader.skip(tag & 7);
1274
+ }
1275
+ return message;
1276
+ },
1277
+ fromJSON(object) {
1278
+ return {
1279
+ organizationId: isSet(object.organizationId)
1280
+ ? globalThis.String(object.organizationId)
1281
+ : isSet(object.organization_id)
1282
+ ? globalThis.String(object.organization_id)
1283
+ : "",
1284
+ defaultChatModelId: isSet(object.defaultChatModelId)
1285
+ ? globalThis.String(object.defaultChatModelId)
1286
+ : isSet(object.default_chat_model_id)
1287
+ ? globalThis.String(object.default_chat_model_id)
1288
+ : "",
1289
+ defaultProviderConfigurationId: isSet(object.defaultProviderConfigurationId)
1290
+ ? globalThis.String(object.defaultProviderConfigurationId)
1291
+ : isSet(object.default_provider_configuration_id)
1292
+ ? globalThis.String(object.default_provider_configuration_id)
1293
+ : "",
1294
+ };
1295
+ },
1296
+ toJSON(message) {
1297
+ const obj = {};
1298
+ if (message.organizationId !== "") {
1299
+ obj.organizationId = message.organizationId;
1300
+ }
1301
+ if (message.defaultChatModelId !== "") {
1302
+ obj.defaultChatModelId = message.defaultChatModelId;
1303
+ }
1304
+ if (message.defaultProviderConfigurationId !== "") {
1305
+ obj.defaultProviderConfigurationId = message.defaultProviderConfigurationId;
1306
+ }
1307
+ return obj;
1308
+ },
1309
+ create(base) {
1310
+ return exports.SetChatDefaultsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1311
+ },
1312
+ fromPartial(object) {
1313
+ var _a, _b, _c;
1314
+ const message = createBaseSetChatDefaultsRequest();
1315
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
1316
+ message.defaultChatModelId = (_b = object.defaultChatModelId) !== null && _b !== void 0 ? _b : "";
1317
+ message.defaultProviderConfigurationId = (_c = object.defaultProviderConfigurationId) !== null && _c !== void 0 ? _c : "";
1318
+ return message;
1319
+ },
1320
+ };
1321
+ function createBaseSetChatDefaultsResponse() {
1322
+ return { settings: undefined };
1323
+ }
1324
+ exports.SetChatDefaultsResponse = {
1325
+ encode(message, writer = new wire_1.BinaryWriter()) {
1326
+ if (message.settings !== undefined) {
1327
+ exports.OrganizationChatSettings.encode(message.settings, writer.uint32(10).fork()).join();
1328
+ }
1329
+ return writer;
1330
+ },
1331
+ decode(input, length) {
1332
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1333
+ const end = length === undefined ? reader.len : reader.pos + length;
1334
+ const message = createBaseSetChatDefaultsResponse();
1335
+ while (reader.pos < end) {
1336
+ const tag = reader.uint32();
1337
+ switch (tag >>> 3) {
1338
+ case 1: {
1339
+ if (tag !== 10) {
1340
+ break;
1341
+ }
1342
+ message.settings = exports.OrganizationChatSettings.decode(reader, reader.uint32());
1343
+ continue;
1344
+ }
1345
+ }
1346
+ if ((tag & 7) === 4 || tag === 0) {
1347
+ break;
1348
+ }
1349
+ reader.skip(tag & 7);
1350
+ }
1351
+ return message;
1352
+ },
1353
+ fromJSON(object) {
1354
+ return { settings: isSet(object.settings) ? exports.OrganizationChatSettings.fromJSON(object.settings) : undefined };
1355
+ },
1356
+ toJSON(message) {
1357
+ const obj = {};
1358
+ if (message.settings !== undefined) {
1359
+ obj.settings = exports.OrganizationChatSettings.toJSON(message.settings);
1360
+ }
1361
+ return obj;
1362
+ },
1363
+ create(base) {
1364
+ return exports.SetChatDefaultsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1365
+ },
1366
+ fromPartial(object) {
1367
+ const message = createBaseSetChatDefaultsResponse();
1368
+ message.settings = (object.settings !== undefined && object.settings !== null)
1369
+ ? exports.OrganizationChatSettings.fromPartial(object.settings)
1370
+ : undefined;
1371
+ return message;
1372
+ },
1373
+ };
456
1374
  exports.ModelCatalogServiceServiceName = "weaveapi.model.v1.ModelCatalogService";
457
1375
  class ModelCatalogServiceClientImpl {
458
1376
  constructor(rpc, opts) {
@@ -461,6 +1379,11 @@ class ModelCatalogServiceClientImpl {
461
1379
  this.ListModels = this.ListModels.bind(this);
462
1380
  this.GetModel = this.GetModel.bind(this);
463
1381
  this.ListCatalogProviders = this.ListCatalogProviders.bind(this);
1382
+ this.ListOrganizationApprovedModels = this.ListOrganizationApprovedModels.bind(this);
1383
+ this.ApproveModel = this.ApproveModel.bind(this);
1384
+ this.UnapproveModel = this.UnapproveModel.bind(this);
1385
+ this.GetChatDefaults = this.GetChatDefaults.bind(this);
1386
+ this.SetChatDefaults = this.SetChatDefaults.bind(this);
464
1387
  }
465
1388
  ListModels(request) {
466
1389
  const data = exports.ListModelsRequest.encode(request).finish();
@@ -477,6 +1400,31 @@ class ModelCatalogServiceClientImpl {
477
1400
  const promise = this.rpc.request(this.service, "ListCatalogProviders", data);
478
1401
  return promise.then((data) => exports.ListCatalogProvidersResponse.decode(new wire_1.BinaryReader(data)));
479
1402
  }
1403
+ ListOrganizationApprovedModels(request) {
1404
+ const data = exports.ListOrganizationApprovedModelsRequest.encode(request).finish();
1405
+ const promise = this.rpc.request(this.service, "ListOrganizationApprovedModels", data);
1406
+ return promise.then((data) => exports.ListOrganizationApprovedModelsResponse.decode(new wire_1.BinaryReader(data)));
1407
+ }
1408
+ ApproveModel(request) {
1409
+ const data = exports.ApproveModelRequest.encode(request).finish();
1410
+ const promise = this.rpc.request(this.service, "ApproveModel", data);
1411
+ return promise.then((data) => exports.ApproveModelResponse.decode(new wire_1.BinaryReader(data)));
1412
+ }
1413
+ UnapproveModel(request) {
1414
+ const data = exports.UnapproveModelRequest.encode(request).finish();
1415
+ const promise = this.rpc.request(this.service, "UnapproveModel", data);
1416
+ return promise.then((data) => exports.UnapproveModelResponse.decode(new wire_1.BinaryReader(data)));
1417
+ }
1418
+ GetChatDefaults(request) {
1419
+ const data = exports.GetChatDefaultsRequest.encode(request).finish();
1420
+ const promise = this.rpc.request(this.service, "GetChatDefaults", data);
1421
+ return promise.then((data) => exports.GetChatDefaultsResponse.decode(new wire_1.BinaryReader(data)));
1422
+ }
1423
+ SetChatDefaults(request) {
1424
+ const data = exports.SetChatDefaultsRequest.encode(request).finish();
1425
+ const promise = this.rpc.request(this.service, "SetChatDefaults", data);
1426
+ return promise.then((data) => exports.SetChatDefaultsResponse.decode(new wire_1.BinaryReader(data)));
1427
+ }
480
1428
  }
481
1429
  exports.ModelCatalogServiceClientImpl = ModelCatalogServiceClientImpl;
482
1430
  exports.ModelCatalogServiceDefinition = {
@@ -572,8 +1520,391 @@ exports.ModelCatalogServiceDefinition = {
572
1520
  },
573
1521
  },
574
1522
  },
1523
+ listOrganizationApprovedModels: {
1524
+ name: "ListOrganizationApprovedModels",
1525
+ requestType: exports.ListOrganizationApprovedModelsRequest,
1526
+ requestStream: false,
1527
+ responseType: exports.ListOrganizationApprovedModelsResponse,
1528
+ responseStream: false,
1529
+ options: {
1530
+ _unknownFields: {
1531
+ 578365826: [
1532
+ new Uint8Array([
1533
+ 52,
1534
+ 18,
1535
+ 50,
1536
+ 47,
1537
+ 118,
1538
+ 49,
1539
+ 47,
1540
+ 111,
1541
+ 114,
1542
+ 103,
1543
+ 47,
1544
+ 123,
1545
+ 111,
1546
+ 114,
1547
+ 103,
1548
+ 97,
1549
+ 110,
1550
+ 105,
1551
+ 122,
1552
+ 97,
1553
+ 116,
1554
+ 105,
1555
+ 111,
1556
+ 110,
1557
+ 95,
1558
+ 105,
1559
+ 100,
1560
+ 125,
1561
+ 47,
1562
+ 115,
1563
+ 101,
1564
+ 116,
1565
+ 116,
1566
+ 105,
1567
+ 110,
1568
+ 103,
1569
+ 115,
1570
+ 47,
1571
+ 97,
1572
+ 112,
1573
+ 112,
1574
+ 114,
1575
+ 111,
1576
+ 118,
1577
+ 101,
1578
+ 100,
1579
+ 45,
1580
+ 109,
1581
+ 111,
1582
+ 100,
1583
+ 101,
1584
+ 108,
1585
+ 115,
1586
+ ]),
1587
+ ],
1588
+ },
1589
+ },
1590
+ },
1591
+ approveModel: {
1592
+ name: "ApproveModel",
1593
+ requestType: exports.ApproveModelRequest,
1594
+ requestStream: false,
1595
+ responseType: exports.ApproveModelResponse,
1596
+ responseStream: false,
1597
+ options: {
1598
+ _unknownFields: {
1599
+ 578365826: [
1600
+ new Uint8Array([
1601
+ 55,
1602
+ 58,
1603
+ 1,
1604
+ 42,
1605
+ 34,
1606
+ 50,
1607
+ 47,
1608
+ 118,
1609
+ 49,
1610
+ 47,
1611
+ 111,
1612
+ 114,
1613
+ 103,
1614
+ 47,
1615
+ 123,
1616
+ 111,
1617
+ 114,
1618
+ 103,
1619
+ 97,
1620
+ 110,
1621
+ 105,
1622
+ 122,
1623
+ 97,
1624
+ 116,
1625
+ 105,
1626
+ 111,
1627
+ 110,
1628
+ 95,
1629
+ 105,
1630
+ 100,
1631
+ 125,
1632
+ 47,
1633
+ 115,
1634
+ 101,
1635
+ 116,
1636
+ 116,
1637
+ 105,
1638
+ 110,
1639
+ 103,
1640
+ 115,
1641
+ 47,
1642
+ 97,
1643
+ 112,
1644
+ 112,
1645
+ 114,
1646
+ 111,
1647
+ 118,
1648
+ 101,
1649
+ 100,
1650
+ 45,
1651
+ 109,
1652
+ 111,
1653
+ 100,
1654
+ 101,
1655
+ 108,
1656
+ 115,
1657
+ ]),
1658
+ ],
1659
+ },
1660
+ },
1661
+ },
1662
+ unapproveModel: {
1663
+ name: "UnapproveModel",
1664
+ requestType: exports.UnapproveModelRequest,
1665
+ requestStream: false,
1666
+ responseType: exports.UnapproveModelResponse,
1667
+ responseStream: false,
1668
+ options: {
1669
+ _unknownFields: {
1670
+ 578365826: [
1671
+ new Uint8Array([
1672
+ 72,
1673
+ 42,
1674
+ 70,
1675
+ 47,
1676
+ 118,
1677
+ 49,
1678
+ 47,
1679
+ 111,
1680
+ 114,
1681
+ 103,
1682
+ 47,
1683
+ 123,
1684
+ 111,
1685
+ 114,
1686
+ 103,
1687
+ 97,
1688
+ 110,
1689
+ 105,
1690
+ 122,
1691
+ 97,
1692
+ 116,
1693
+ 105,
1694
+ 111,
1695
+ 110,
1696
+ 95,
1697
+ 105,
1698
+ 100,
1699
+ 125,
1700
+ 47,
1701
+ 115,
1702
+ 101,
1703
+ 116,
1704
+ 116,
1705
+ 105,
1706
+ 110,
1707
+ 103,
1708
+ 115,
1709
+ 47,
1710
+ 97,
1711
+ 112,
1712
+ 112,
1713
+ 114,
1714
+ 111,
1715
+ 118,
1716
+ 101,
1717
+ 100,
1718
+ 45,
1719
+ 109,
1720
+ 111,
1721
+ 100,
1722
+ 101,
1723
+ 108,
1724
+ 115,
1725
+ 47,
1726
+ 123,
1727
+ 97,
1728
+ 112,
1729
+ 112,
1730
+ 114,
1731
+ 111,
1732
+ 118,
1733
+ 101,
1734
+ 100,
1735
+ 95,
1736
+ 109,
1737
+ 111,
1738
+ 100,
1739
+ 101,
1740
+ 108,
1741
+ 95,
1742
+ 105,
1743
+ 100,
1744
+ 125,
1745
+ ]),
1746
+ ],
1747
+ },
1748
+ },
1749
+ },
1750
+ getChatDefaults: {
1751
+ name: "GetChatDefaults",
1752
+ requestType: exports.GetChatDefaultsRequest,
1753
+ requestStream: false,
1754
+ responseType: exports.GetChatDefaultsResponse,
1755
+ responseStream: false,
1756
+ options: {
1757
+ _unknownFields: {
1758
+ 578365826: [
1759
+ new Uint8Array([
1760
+ 50,
1761
+ 18,
1762
+ 48,
1763
+ 47,
1764
+ 118,
1765
+ 49,
1766
+ 47,
1767
+ 111,
1768
+ 114,
1769
+ 103,
1770
+ 47,
1771
+ 123,
1772
+ 111,
1773
+ 114,
1774
+ 103,
1775
+ 97,
1776
+ 110,
1777
+ 105,
1778
+ 122,
1779
+ 97,
1780
+ 116,
1781
+ 105,
1782
+ 111,
1783
+ 110,
1784
+ 95,
1785
+ 105,
1786
+ 100,
1787
+ 125,
1788
+ 47,
1789
+ 115,
1790
+ 101,
1791
+ 116,
1792
+ 116,
1793
+ 105,
1794
+ 110,
1795
+ 103,
1796
+ 115,
1797
+ 47,
1798
+ 99,
1799
+ 104,
1800
+ 97,
1801
+ 116,
1802
+ 45,
1803
+ 100,
1804
+ 101,
1805
+ 102,
1806
+ 97,
1807
+ 117,
1808
+ 108,
1809
+ 116,
1810
+ 115,
1811
+ ]),
1812
+ ],
1813
+ },
1814
+ },
1815
+ },
1816
+ setChatDefaults: {
1817
+ name: "SetChatDefaults",
1818
+ requestType: exports.SetChatDefaultsRequest,
1819
+ requestStream: false,
1820
+ responseType: exports.SetChatDefaultsResponse,
1821
+ responseStream: false,
1822
+ options: {
1823
+ _unknownFields: {
1824
+ 578365826: [
1825
+ new Uint8Array([
1826
+ 53,
1827
+ 58,
1828
+ 1,
1829
+ 42,
1830
+ 50,
1831
+ 48,
1832
+ 47,
1833
+ 118,
1834
+ 49,
1835
+ 47,
1836
+ 111,
1837
+ 114,
1838
+ 103,
1839
+ 47,
1840
+ 123,
1841
+ 111,
1842
+ 114,
1843
+ 103,
1844
+ 97,
1845
+ 110,
1846
+ 105,
1847
+ 122,
1848
+ 97,
1849
+ 116,
1850
+ 105,
1851
+ 111,
1852
+ 110,
1853
+ 95,
1854
+ 105,
1855
+ 100,
1856
+ 125,
1857
+ 47,
1858
+ 115,
1859
+ 101,
1860
+ 116,
1861
+ 116,
1862
+ 105,
1863
+ 110,
1864
+ 103,
1865
+ 115,
1866
+ 47,
1867
+ 99,
1868
+ 104,
1869
+ 97,
1870
+ 116,
1871
+ 45,
1872
+ 100,
1873
+ 101,
1874
+ 102,
1875
+ 97,
1876
+ 117,
1877
+ 108,
1878
+ 116,
1879
+ 115,
1880
+ ]),
1881
+ ],
1882
+ },
1883
+ },
1884
+ },
575
1885
  },
576
1886
  };
1887
+ function toTimestamp(date) {
1888
+ const seconds = Math.trunc(date.getTime() / 1000);
1889
+ const nanos = (date.getTime() % 1000) * 1000000;
1890
+ return { seconds, nanos };
1891
+ }
1892
+ function fromTimestamp(t) {
1893
+ let millis = (t.seconds || 0) * 1000;
1894
+ millis += (t.nanos || 0) / 1000000;
1895
+ return new globalThis.Date(millis);
1896
+ }
1897
+ function fromJsonTimestamp(o) {
1898
+ if (o instanceof globalThis.Date) {
1899
+ return o;
1900
+ }
1901
+ else if (typeof o === "string") {
1902
+ return new globalThis.Date(o);
1903
+ }
1904
+ else {
1905
+ return fromTimestamp(timestamp_pb_1.Timestamp.fromJSON(o));
1906
+ }
1907
+ }
577
1908
  function isSet(value) {
578
1909
  return value !== null && value !== undefined;
579
1910
  }