@peabody-soft/mbs-protos 1.2.0 → 1.3.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.
@@ -3,13 +3,19 @@ package com.merabills.storefront;
3
3
  option java_multiple_files = true;
4
4
  option java_package = "com.merabills.server.core.generated";
5
5
 
6
+ import "AuthTokens.proto";
7
+
6
8
  // The answer to a BusinessSyncInRequest: the update number the server assigned to the pushed
7
9
  // entities, one per entity type. Raise the matching cursor to this value so the next sync out does
8
10
  // not fetch back what was just sent; 0 means nothing of that type was accepted. Carries no entities
9
11
  // - sync out again to see the server's view of what was pushed.
10
12
  message BusinessSyncInResponse {
11
13
 
14
+ // The tokens to send with the next request, when the server has renewed one of them. Absent means
15
+ // what the client already holds still works - never a signal to drop the tokens it has.
16
+ optional AuthTokens authTokens = 1;
17
+
12
18
  // Highest update number assigned to the messages of the request - entity type
13
- // Constants.MESSAGE_ENTITY_TYPE_ID, the only field this response carries.
14
- int64 messageUpdateNumber = 1;
19
+ // Constants.MESSAGE_ENTITY_TYPE_ID, the only entity field this response carries.
20
+ int64 messageUpdateNumber = 2;
15
21
  }
@@ -4,6 +4,7 @@ option java_multiple_files = true;
4
4
  option java_package = "com.merabills.server.core.generated";
5
5
 
6
6
  import "Attachment.proto";
7
+ import "AuthTokens.proto";
7
8
  import "Business.proto";
8
9
  import "Configuration.proto";
9
10
  import "Message.proto";
@@ -23,31 +24,35 @@ import "UrlAndToken.proto";
23
24
  // call again with the raised cursors.
24
25
  message BusinessSyncOutResponse {
25
26
 
27
+ // The tokens to send with the next request, when the server has renewed one of them. Absent means
28
+ // what the client already holds still works - never a signal to drop the tokens it has.
29
+ optional AuthTokens authTokens = 1;
30
+
26
31
  // The business named by the request. Absent unless it has changed. Also carried by a
27
32
  // ProfileSyncOutResponse, with its own separate cursor - keep the two update numbers apart.
28
- Business business = 1;
33
+ Business business = 2;
29
34
 
30
35
  // Photos of the business, its products and its packages.
31
- repeated Attachment attachments = 2;
36
+ repeated Attachment attachments = 3;
32
37
 
33
38
  // Where the files of every attachment of the business are, and the token that authorizes reading
34
39
  // them - one value for the whole business, not per photo. Absent means what the client already
35
40
  // holds still works; a client holding none sends 0 and always gets one back. Never a tombstone and
36
41
  // never counted against Constants.SYNC_OUT_LIMIT.
37
- UrlAndToken attachmentBaseUrl = 3;
42
+ UrlAndToken attachmentBaseUrl = 4;
38
43
 
39
44
  // The settings of the business. An array because a business can have more than one public
40
45
  // configuration, even though only the general settings are typed today.
41
- repeated Configuration configurations = 4;
46
+ repeated Configuration configurations = 5;
42
47
 
43
48
  // The orders of the customer, and their shopping cart
44
- repeated Message messages = 5;
49
+ repeated Message messages = 6;
45
50
 
46
51
  // Item entities, in the order a client needs them: a category before its products, a product
47
52
  // before its packages, and both a package and a price list before the prices that name them
48
- repeated ProductCategory productCategories = 6;
49
- repeated Product products = 7;
50
- repeated Package packages = 8;
51
- repeated PriceList priceLists = 9;
52
- repeated Price prices = 10;
53
+ repeated ProductCategory productCategories = 7;
54
+ repeated Product products = 8;
55
+ repeated Package packages = 9;
56
+ repeated PriceList priceLists = 10;
57
+ repeated Price prices = 11;
53
58
  }
@@ -3,6 +3,7 @@ package com.merabills.storefront;
3
3
  option java_multiple_files = true;
4
4
  option java_package = "com.merabills.server.core.generated";
5
5
 
6
+ import "AuthTokens.proto";
6
7
  import "Business.proto";
7
8
  import "BusinessLink.proto";
8
9
  import "User.proto";
@@ -13,12 +14,16 @@ import "User.proto";
13
14
  // bits = Constants.UPDATE_TYPE_DELETED) means the entity, and what it owned, was deleted.
14
15
  message ProfileSyncOutResponse {
15
16
 
17
+ // The tokens to send with the next request, when the server has renewed one of them. Absent means
18
+ // what the client already holds still works - never a signal to drop the tokens it has.
19
+ optional AuthTokens authTokens = 1;
20
+
16
21
  // The caller. Absent unless their own profile has changed.
17
- User user = 1;
22
+ User user = 2;
18
23
 
19
24
  // The businesses the caller is linked to, and the token for each. Empty unless a link has changed.
20
- repeated BusinessLink businessLinks = 2;
25
+ repeated BusinessLink businessLinks = 3;
21
26
 
22
27
  // The businesses those links name. Empty unless a business has changed.
23
- repeated Business businesses = 3;
28
+ repeated Business businesses = 4;
24
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peabody-soft/mbs-protos",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "The MeraBills shop wire protocol",
5
5
  "author": "Peabody Soft",
6
6
  "license": "AGPL-3.0-or-later",