geniebox-shared-lib 2.2.4 → 2.2.5

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.
@@ -71,6 +71,10 @@ export interface ModelsRequest {
71
71
  providerId: string;
72
72
  /** only active models */
73
73
  activeOnly: boolean;
74
+ /** optional, pagination limit (default: 100, max: 1000) */
75
+ limit: number;
76
+ /** optional, pagination offset (default: 0) */
77
+ offset: number;
74
78
  }
75
79
  export interface PricingRequest {
76
80
  /** filter by model */
@@ -126,6 +130,10 @@ export interface ListEndpointsRequest {
126
130
  activeOnly: boolean;
127
131
  /** optional, filter by provider */
128
132
  providerId: string;
133
+ /** optional, pagination limit (default: 100, max: 1000) */
134
+ limit: number;
135
+ /** optional, pagination offset (default: 0) */
136
+ offset: number;
129
137
  }
130
138
  export interface DeleteEndpointRequest {
131
139
  /** required */
@@ -138,6 +146,8 @@ export interface ProvidersResponse {
138
146
  }
139
147
  export interface ModelsResponse {
140
148
  models: Model[];
149
+ /** total count of models matching the query */
150
+ total: number;
141
151
  }
142
152
  export interface PricingResponse {
143
153
  pricing: Pricing[];
@@ -648,7 +648,7 @@ exports.ProvidersRequest = {
648
648
  },
649
649
  };
650
650
  function createBaseModelsRequest() {
651
- return { providerId: "", activeOnly: false };
651
+ return { providerId: "", activeOnly: false, limit: 0, offset: 0 };
652
652
  }
653
653
  exports.ModelsRequest = {
654
654
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -658,6 +658,12 @@ exports.ModelsRequest = {
658
658
  if (message.activeOnly !== false) {
659
659
  writer.uint32(16).bool(message.activeOnly);
660
660
  }
661
+ if (message.limit !== 0) {
662
+ writer.uint32(24).int32(message.limit);
663
+ }
664
+ if (message.offset !== 0) {
665
+ writer.uint32(32).int32(message.offset);
666
+ }
661
667
  return writer;
662
668
  },
663
669
  decode(input, length) {
@@ -681,6 +687,20 @@ exports.ModelsRequest = {
681
687
  message.activeOnly = reader.bool();
682
688
  continue;
683
689
  }
690
+ case 3: {
691
+ if (tag !== 24) {
692
+ break;
693
+ }
694
+ message.limit = reader.int32();
695
+ continue;
696
+ }
697
+ case 4: {
698
+ if (tag !== 32) {
699
+ break;
700
+ }
701
+ message.offset = reader.int32();
702
+ continue;
703
+ }
684
704
  }
685
705
  if ((tag & 7) === 4 || tag === 0) {
686
706
  break;
@@ -1015,7 +1035,7 @@ exports.GetEndpointByIdRequest = {
1015
1035
  },
1016
1036
  };
1017
1037
  function createBaseListEndpointsRequest() {
1018
- return { activeOnly: false, providerId: "" };
1038
+ return { activeOnly: false, providerId: "", limit: 0, offset: 0 };
1019
1039
  }
1020
1040
  exports.ListEndpointsRequest = {
1021
1041
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -1025,6 +1045,12 @@ exports.ListEndpointsRequest = {
1025
1045
  if (message.providerId !== "") {
1026
1046
  writer.uint32(18).string(message.providerId);
1027
1047
  }
1048
+ if (message.limit !== 0) {
1049
+ writer.uint32(24).int32(message.limit);
1050
+ }
1051
+ if (message.offset !== 0) {
1052
+ writer.uint32(32).int32(message.offset);
1053
+ }
1028
1054
  return writer;
1029
1055
  },
1030
1056
  decode(input, length) {
@@ -1048,6 +1074,20 @@ exports.ListEndpointsRequest = {
1048
1074
  message.providerId = reader.string();
1049
1075
  continue;
1050
1076
  }
1077
+ case 3: {
1078
+ if (tag !== 24) {
1079
+ break;
1080
+ }
1081
+ message.limit = reader.int32();
1082
+ continue;
1083
+ }
1084
+ case 4: {
1085
+ if (tag !== 32) {
1086
+ break;
1087
+ }
1088
+ message.offset = reader.int32();
1089
+ continue;
1090
+ }
1051
1091
  }
1052
1092
  if ((tag & 7) === 4 || tag === 0) {
1053
1093
  break;
@@ -1134,13 +1174,16 @@ exports.ProvidersResponse = {
1134
1174
  },
1135
1175
  };
1136
1176
  function createBaseModelsResponse() {
1137
- return { models: [] };
1177
+ return { models: [], total: 0 };
1138
1178
  }
1139
1179
  exports.ModelsResponse = {
1140
1180
  encode(message, writer = new wire_1.BinaryWriter()) {
1141
1181
  for (const v of message.models) {
1142
1182
  exports.Model.encode(v, writer.uint32(10).fork()).join();
1143
1183
  }
1184
+ if (message.total !== 0) {
1185
+ writer.uint32(16).int32(message.total);
1186
+ }
1144
1187
  return writer;
1145
1188
  },
1146
1189
  decode(input, length) {
@@ -1157,6 +1200,13 @@ exports.ModelsResponse = {
1157
1200
  message.models.push(exports.Model.decode(reader, reader.uint32()));
1158
1201
  continue;
1159
1202
  }
1203
+ case 2: {
1204
+ if (tag !== 16) {
1205
+ break;
1206
+ }
1207
+ message.total = reader.int32();
1208
+ continue;
1209
+ }
1160
1210
  }
1161
1211
  if ((tag & 7) === 4 || tag === 0) {
1162
1212
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",