protobuf-platform 1.2.393 → 1.2.394

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.
package/bonus/bonus.proto CHANGED
@@ -37,6 +37,8 @@ service Bonus {
37
37
  rpc readListBonusStatuses(PaginationRequest) returns (BonusStatusesResponse);
38
38
  //Dashboard
39
39
  rpc getDashboardInfo(DashboardRequest) returns (DashboardResponse);
40
+ // Lightweight batch read for notification CTA target enrichment.
41
+ rpc getBonusSnapshotsByIds(GetBonusSnapshotsByIdsRequest) returns (BonusSnapshotItemsResponse);
40
42
  }
41
43
  //Technical
42
44
  message PingRequest { string ping = 1; }
@@ -210,6 +212,24 @@ message BonusItemsResponse {
210
212
  optional int32 total_pages = 2;
211
213
  optional int32 total_items = 3;
212
214
  }
215
+ message GetBonusSnapshotsByIdsRequest {
216
+ repeated int32 ids = 1;
217
+ optional string locale = 2;
218
+ }
219
+ message BonusSnapshotItem {
220
+ int32 id = 1;
221
+ optional string title = 2;
222
+ optional string slug = 3;
223
+ optional string image = 4;
224
+ optional string image_cdn = 5;
225
+ optional string mobile_image = 6;
226
+ optional string mobile_image_cdn = 7;
227
+ optional string status = 8;
228
+ optional int32 status_id = 9;
229
+ }
230
+ message BonusSnapshotItemsResponse {
231
+ repeated BonusSnapshotItem items = 1;
232
+ }
213
233
  message BonusStatusResponse {
214
234
  string status = 1;
215
235
  }
@@ -81,6 +81,17 @@ function deserialize_bonus_BonusRewardsRequest(buffer_arg) {
81
81
  return bonus_pb.BonusRewardsRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
82
  }
83
83
 
84
+ function serialize_bonus_BonusSnapshotItemsResponse(arg) {
85
+ if (!(arg instanceof bonus_pb.BonusSnapshotItemsResponse)) {
86
+ throw new Error('Expected argument of type bonus.BonusSnapshotItemsResponse');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_bonus_BonusSnapshotItemsResponse(buffer_arg) {
92
+ return bonus_pb.BonusSnapshotItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
84
95
  function serialize_bonus_BonusStatusResponse(arg) {
85
96
  if (!(arg instanceof bonus_pb.BonusStatusResponse)) {
86
97
  throw new Error('Expected argument of type bonus.BonusStatusResponse');
@@ -213,6 +224,17 @@ function deserialize_bonus_GetBonusRequest(buffer_arg) {
213
224
  return bonus_pb.GetBonusRequest.deserializeBinary(new Uint8Array(buffer_arg));
214
225
  }
215
226
 
227
+ function serialize_bonus_GetBonusSnapshotsByIdsRequest(arg) {
228
+ if (!(arg instanceof bonus_pb.GetBonusSnapshotsByIdsRequest)) {
229
+ throw new Error('Expected argument of type bonus.GetBonusSnapshotsByIdsRequest');
230
+ }
231
+ return Buffer.from(arg.serializeBinary());
232
+ }
233
+
234
+ function deserialize_bonus_GetBonusSnapshotsByIdsRequest(buffer_arg) {
235
+ return bonus_pb.GetBonusSnapshotsByIdsRequest.deserializeBinary(new Uint8Array(buffer_arg));
236
+ }
237
+
216
238
  function serialize_bonus_GetBonusTranslationRequest(arg) {
217
239
  if (!(arg instanceof bonus_pb.GetBonusTranslationRequest)) {
218
240
  throw new Error('Expected argument of type bonus.GetBonusTranslationRequest');
@@ -715,6 +737,18 @@ getDashboardInfo: {
715
737
  responseSerialize: serialize_bonus_DashboardResponse,
716
738
  responseDeserialize: deserialize_bonus_DashboardResponse,
717
739
  },
740
+ // Lightweight batch read for notification CTA target enrichment.
741
+ getBonusSnapshotsByIds: {
742
+ path: '/bonus.Bonus/getBonusSnapshotsByIds',
743
+ requestStream: false,
744
+ responseStream: false,
745
+ requestType: bonus_pb.GetBonusSnapshotsByIdsRequest,
746
+ responseType: bonus_pb.BonusSnapshotItemsResponse,
747
+ requestSerialize: serialize_bonus_GetBonusSnapshotsByIdsRequest,
748
+ requestDeserialize: deserialize_bonus_GetBonusSnapshotsByIdsRequest,
749
+ responseSerialize: serialize_bonus_BonusSnapshotItemsResponse,
750
+ responseDeserialize: deserialize_bonus_BonusSnapshotItemsResponse,
751
+ },
718
752
  };
719
753
 
720
754
  exports.BonusClient = grpc.makeGenericClientConstructor(BonusService, 'Bonus');