protobuf-platform 1.2.716 → 1.2.718

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.
@@ -3,6 +3,11 @@ syntax = "proto3";
3
3
  package loyalty;
4
4
 
5
5
  service Loyalty {
6
+ // Provider-agnostic Store domain hosted by Loyalty; Payment remains financial authority.
7
+ rpc readStoreCatalog(StoreCatalogRequest) returns (StoreCatalogResponse);
8
+ rpc purchaseStoreItem(StorePurchaseRequest) returns (StorePurchaseResponse);
9
+ rpc authorizeExternalStorePurchase(ExternalStorePurchaseRequest) returns (StorePurchaseResponse);
10
+ rpc getStoreAvailableBalance(StoreAvailableBalanceRequest) returns (StoreAvailableBalanceResponse);
6
11
  rpc checkConnection(PingRequest) returns (PongResponse);
7
12
  rpc getMediaResource(GetFileRequest) returns (stream File);
8
13
  //Loyalty Levels
@@ -36,6 +41,61 @@ service Loyalty {
36
41
  rpc readListDepositPointLevelLimits(PaginationRequest) returns (DepositPointLevelLimitItemsResponse);
37
42
  }
38
43
 
44
+ message StoreCatalogRequest {
45
+ int32 user_id = 1;
46
+ string locale = 2;
47
+ }
48
+ message StorePrice {
49
+ string currency = 1;
50
+ string amount_minor = 2;
51
+ int32 currency_scale = 3;
52
+ }
53
+ message StoreCatalogItem {
54
+ string item_id = 1;
55
+ string title = 2;
56
+ string description = 3;
57
+ string locale = 4;
58
+ StorePrice price = 5;
59
+ }
60
+ message StoreCatalogResponse { repeated StoreCatalogItem items = 1; }
61
+ message StorePurchaseRequest {
62
+ int32 user_id = 1;
63
+ string identity = 2;
64
+ string item_id = 3;
65
+ string currency = 4;
66
+ // Price accepted by the client; must match the configured price on first purchase.
67
+ string expected_amount_minor = 5;
68
+ }
69
+ message ExternalStorePurchaseRequest {
70
+ string user_public_id = 1;
71
+ string source = 2;
72
+ string external_reference = 3;
73
+ string currency = 4;
74
+ string amount_minor = 5;
75
+ optional string item_reference = 6;
76
+ }
77
+ message StorePurchaseResponse {
78
+ string purchase_id = 1;
79
+ string status = 2;
80
+ string currency = 3;
81
+ string amount_minor = 4;
82
+ int32 currency_scale = 5;
83
+ bool replay = 6;
84
+ optional string available_minor = 7;
85
+ optional string remainder_numerator = 8;
86
+ optional string remainder_denominator = 9;
87
+ }
88
+ message StoreAvailableBalanceRequest {
89
+ string user_public_id = 1;
90
+ }
91
+ message StoreAvailableBalanceResponse {
92
+ string currency = 1;
93
+ int32 currency_scale = 2;
94
+ string available_minor = 3;
95
+ string remainder_numerator = 4;
96
+ string remainder_denominator = 5;
97
+ }
98
+
39
99
  message PingRequest { string ping = 1; }
40
100
  message PongResponse { string pong = 1; }
41
101
  message PaginationRequest {
@@ -389,4 +449,4 @@ message ClientDepositPointLimit {
389
449
  string earned = 3;
390
450
  string remaining = 4;
391
451
  string resets_at = 5;
392
- }
452
+ }
@@ -70,6 +70,17 @@ function deserialize_loyalty_DepositPointLimitStatusResponse(buffer_arg) {
70
70
  return loyalty_pb.DepositPointLimitStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
71
71
  }
72
72
 
73
+ function serialize_loyalty_ExternalStorePurchaseRequest(arg) {
74
+ if (!(arg instanceof loyalty_pb.ExternalStorePurchaseRequest)) {
75
+ throw new Error('Expected argument of type loyalty.ExternalStorePurchaseRequest');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_loyalty_ExternalStorePurchaseRequest(buffer_arg) {
81
+ return loyalty_pb.ExternalStorePurchaseRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
73
84
  function serialize_loyalty_File(arg) {
74
85
  if (!(arg instanceof loyalty_pb.File)) {
75
86
  throw new Error('Expected argument of type loyalty.File');
@@ -334,6 +345,72 @@ function deserialize_loyalty_SetDepositPointLimitPeriodRequest(buffer_arg) {
334
345
  return loyalty_pb.SetDepositPointLimitPeriodRequest.deserializeBinary(new Uint8Array(buffer_arg));
335
346
  }
336
347
 
348
+ function serialize_loyalty_StoreAvailableBalanceRequest(arg) {
349
+ if (!(arg instanceof loyalty_pb.StoreAvailableBalanceRequest)) {
350
+ throw new Error('Expected argument of type loyalty.StoreAvailableBalanceRequest');
351
+ }
352
+ return Buffer.from(arg.serializeBinary());
353
+ }
354
+
355
+ function deserialize_loyalty_StoreAvailableBalanceRequest(buffer_arg) {
356
+ return loyalty_pb.StoreAvailableBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg));
357
+ }
358
+
359
+ function serialize_loyalty_StoreAvailableBalanceResponse(arg) {
360
+ if (!(arg instanceof loyalty_pb.StoreAvailableBalanceResponse)) {
361
+ throw new Error('Expected argument of type loyalty.StoreAvailableBalanceResponse');
362
+ }
363
+ return Buffer.from(arg.serializeBinary());
364
+ }
365
+
366
+ function deserialize_loyalty_StoreAvailableBalanceResponse(buffer_arg) {
367
+ return loyalty_pb.StoreAvailableBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg));
368
+ }
369
+
370
+ function serialize_loyalty_StoreCatalogRequest(arg) {
371
+ if (!(arg instanceof loyalty_pb.StoreCatalogRequest)) {
372
+ throw new Error('Expected argument of type loyalty.StoreCatalogRequest');
373
+ }
374
+ return Buffer.from(arg.serializeBinary());
375
+ }
376
+
377
+ function deserialize_loyalty_StoreCatalogRequest(buffer_arg) {
378
+ return loyalty_pb.StoreCatalogRequest.deserializeBinary(new Uint8Array(buffer_arg));
379
+ }
380
+
381
+ function serialize_loyalty_StoreCatalogResponse(arg) {
382
+ if (!(arg instanceof loyalty_pb.StoreCatalogResponse)) {
383
+ throw new Error('Expected argument of type loyalty.StoreCatalogResponse');
384
+ }
385
+ return Buffer.from(arg.serializeBinary());
386
+ }
387
+
388
+ function deserialize_loyalty_StoreCatalogResponse(buffer_arg) {
389
+ return loyalty_pb.StoreCatalogResponse.deserializeBinary(new Uint8Array(buffer_arg));
390
+ }
391
+
392
+ function serialize_loyalty_StorePurchaseRequest(arg) {
393
+ if (!(arg instanceof loyalty_pb.StorePurchaseRequest)) {
394
+ throw new Error('Expected argument of type loyalty.StorePurchaseRequest');
395
+ }
396
+ return Buffer.from(arg.serializeBinary());
397
+ }
398
+
399
+ function deserialize_loyalty_StorePurchaseRequest(buffer_arg) {
400
+ return loyalty_pb.StorePurchaseRequest.deserializeBinary(new Uint8Array(buffer_arg));
401
+ }
402
+
403
+ function serialize_loyalty_StorePurchaseResponse(arg) {
404
+ if (!(arg instanceof loyalty_pb.StorePurchaseResponse)) {
405
+ throw new Error('Expected argument of type loyalty.StorePurchaseResponse');
406
+ }
407
+ return Buffer.from(arg.serializeBinary());
408
+ }
409
+
410
+ function deserialize_loyalty_StorePurchaseResponse(buffer_arg) {
411
+ return loyalty_pb.StorePurchaseResponse.deserializeBinary(new Uint8Array(buffer_arg));
412
+ }
413
+
337
414
  function serialize_loyalty_UserLoyaltyPointsResponse(arg) {
338
415
  if (!(arg instanceof loyalty_pb.UserLoyaltyPointsResponse)) {
339
416
  throw new Error('Expected argument of type loyalty.UserLoyaltyPointsResponse');
@@ -358,6 +435,51 @@ function deserialize_loyalty_UserLoyaltyResponse(buffer_arg) {
358
435
 
359
436
 
360
437
  var LoyaltyService = exports.LoyaltyService = {
438
+ // Provider-agnostic Store domain hosted by Loyalty; Payment remains financial authority.
439
+ readStoreCatalog: {
440
+ path: '/loyalty.Loyalty/readStoreCatalog',
441
+ requestStream: false,
442
+ responseStream: false,
443
+ requestType: loyalty_pb.StoreCatalogRequest,
444
+ responseType: loyalty_pb.StoreCatalogResponse,
445
+ requestSerialize: serialize_loyalty_StoreCatalogRequest,
446
+ requestDeserialize: deserialize_loyalty_StoreCatalogRequest,
447
+ responseSerialize: serialize_loyalty_StoreCatalogResponse,
448
+ responseDeserialize: deserialize_loyalty_StoreCatalogResponse,
449
+ },
450
+ purchaseStoreItem: {
451
+ path: '/loyalty.Loyalty/purchaseStoreItem',
452
+ requestStream: false,
453
+ responseStream: false,
454
+ requestType: loyalty_pb.StorePurchaseRequest,
455
+ responseType: loyalty_pb.StorePurchaseResponse,
456
+ requestSerialize: serialize_loyalty_StorePurchaseRequest,
457
+ requestDeserialize: deserialize_loyalty_StorePurchaseRequest,
458
+ responseSerialize: serialize_loyalty_StorePurchaseResponse,
459
+ responseDeserialize: deserialize_loyalty_StorePurchaseResponse,
460
+ },
461
+ authorizeExternalStorePurchase: {
462
+ path: '/loyalty.Loyalty/authorizeExternalStorePurchase',
463
+ requestStream: false,
464
+ responseStream: false,
465
+ requestType: loyalty_pb.ExternalStorePurchaseRequest,
466
+ responseType: loyalty_pb.StorePurchaseResponse,
467
+ requestSerialize: serialize_loyalty_ExternalStorePurchaseRequest,
468
+ requestDeserialize: deserialize_loyalty_ExternalStorePurchaseRequest,
469
+ responseSerialize: serialize_loyalty_StorePurchaseResponse,
470
+ responseDeserialize: deserialize_loyalty_StorePurchaseResponse,
471
+ },
472
+ getStoreAvailableBalance: {
473
+ path: '/loyalty.Loyalty/getStoreAvailableBalance',
474
+ requestStream: false,
475
+ responseStream: false,
476
+ requestType: loyalty_pb.StoreAvailableBalanceRequest,
477
+ responseType: loyalty_pb.StoreAvailableBalanceResponse,
478
+ requestSerialize: serialize_loyalty_StoreAvailableBalanceRequest,
479
+ requestDeserialize: deserialize_loyalty_StoreAvailableBalanceRequest,
480
+ responseSerialize: serialize_loyalty_StoreAvailableBalanceResponse,
481
+ responseDeserialize: deserialize_loyalty_StoreAvailableBalanceResponse,
482
+ },
361
483
  checkConnection: {
362
484
  path: '/loyalty.Loyalty/checkConnection',
363
485
  requestStream: false,