@restorecommerce/protos 2.0.2 → 3.0.1

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +336 -0
  2. package/google/protobuf/timestamp.proto +147 -0
  3. package/io/restorecommerce/access_control.proto +3 -5
  4. package/io/restorecommerce/address.proto +38 -37
  5. package/io/restorecommerce/attribute.proto +4 -4
  6. package/io/restorecommerce/auth.proto +15 -15
  7. package/io/restorecommerce/authentication_log.proto +12 -14
  8. package/io/restorecommerce/command.proto +10 -12
  9. package/io/restorecommerce/commandinterface.proto +3 -4
  10. package/io/restorecommerce/contact_point.proto +11 -13
  11. package/io/restorecommerce/contact_point_type.proto +5 -7
  12. package/io/restorecommerce/country.proto +7 -9
  13. package/io/restorecommerce/credential.proto +9 -9
  14. package/io/restorecommerce/customer.proto +9 -11
  15. package/io/restorecommerce/file.proto +23 -0
  16. package/io/restorecommerce/filter.proto +1 -1
  17. package/io/restorecommerce/fulfillment.proto +87 -104
  18. package/io/restorecommerce/fulfillment_courier.proto +15 -17
  19. package/io/restorecommerce/fulfillment_product.proto +44 -47
  20. package/io/restorecommerce/geometry.proto +23 -0
  21. package/io/restorecommerce/graph.proto +17 -17
  22. package/io/restorecommerce/image.proto +13 -12
  23. package/io/restorecommerce/invoice.proto +49 -51
  24. package/io/restorecommerce/job.proto +44 -46
  25. package/io/restorecommerce/locale.proto +6 -8
  26. package/io/restorecommerce/location.proto +11 -13
  27. package/io/restorecommerce/manufacturer.proto +6 -8
  28. package/io/restorecommerce/meta.proto +5 -5
  29. package/io/restorecommerce/notification.proto +8 -10
  30. package/io/restorecommerce/notification_channel.proto +6 -6
  31. package/io/restorecommerce/notification_req.proto +16 -16
  32. package/io/restorecommerce/oauth.proto +1 -1
  33. package/io/restorecommerce/order.proto +65 -72
  34. package/io/restorecommerce/organization.proto +15 -17
  35. package/io/restorecommerce/ostorage.proto +31 -33
  36. package/io/restorecommerce/payment.proto +32 -34
  37. package/io/restorecommerce/payment_method.proto +7 -7
  38. package/io/restorecommerce/policy.proto +16 -18
  39. package/io/restorecommerce/policy_set.proto +12 -14
  40. package/io/restorecommerce/price_group.proto +6 -8
  41. package/io/restorecommerce/product.proto +146 -48
  42. package/io/restorecommerce/product_category.proto +10 -12
  43. package/io/restorecommerce/product_prototype.proto +8 -10
  44. package/io/restorecommerce/rendering.proto +2 -2
  45. package/io/restorecommerce/resource_base.proto +20 -20
  46. package/io/restorecommerce/role.proto +6 -8
  47. package/io/restorecommerce/rule.proto +20 -22
  48. package/io/restorecommerce/search.proto +4 -6
  49. package/io/restorecommerce/status.proto +13 -8
  50. package/io/restorecommerce/tax.proto +13 -10
  51. package/io/restorecommerce/tax_type.proto +13 -9
  52. package/io/restorecommerce/timezone.proto +5 -7
  53. package/io/restorecommerce/token.proto +11 -13
  54. package/io/restorecommerce/user.proto +46 -49
  55. package/package.json +2 -2
@@ -11,9 +11,7 @@ import "io/restorecommerce/options.proto";
11
11
  /*
12
12
  * Microservice definition.
13
13
  */
14
- service Service {
15
- option (io.restorecommerce.options.service_name) = "tax_type";
16
-
14
+ service TaxTypeService {
17
15
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (TaxTypeListResponse) {
18
16
  option (io.restorecommerce.options.is_query) = true;
19
17
  };
@@ -23,13 +21,18 @@ service Service {
23
21
  rpc Upsert (TaxTypeList) returns (TaxTypeListResponse);
24
22
  }
25
23
 
24
+ enum Behavior {
25
+ NONE = 0;
26
+ ADDITIVE_ON_GROSS = 1;
27
+ }
28
+
26
29
  message Deleted {
27
- string id = 1;
30
+ optional string id = 1;
28
31
  }
29
32
 
30
33
  message TaxTypeList {
31
34
  repeated TaxType items = 1;
32
- uint32 total_count = 2;
35
+ optional uint32 total_count = 2;
33
36
  io.restorecommerce.auth.Subject subject = 3;
34
37
  }
35
38
 
@@ -45,8 +48,9 @@ message TaxTypeResponse {
45
48
  }
46
49
 
47
50
  message TaxType {
48
- string id = 1;
49
- io.restorecommerce.meta.Meta meta = 2;
50
- string type = 3;
51
- string description = 4;
51
+ optional string id = 1;
52
+ optional io.restorecommerce.meta.Meta meta = 2;
53
+ optional string type = 3;
54
+ optional string description = 4;
55
+ optional Behavior behavior = 5;
52
56
  }
@@ -11,9 +11,7 @@ import "io/restorecommerce/options.proto";
11
11
  /*
12
12
  * Microservice definition.
13
13
  */
14
- service Service {
15
- option (io.restorecommerce.options.service_name) = "timezone";
16
-
14
+ service TimezoneService {
17
15
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (TimezoneListResponse) {
18
16
  option (io.restorecommerce.options.is_query) = true;
19
17
  };
@@ -29,7 +27,7 @@ message Deleted {
29
27
 
30
28
  message TimezoneList {
31
29
  repeated Timezone items = 1;
32
- uint32 total_count = 2;
30
+ optional uint32 total_count = 2;
33
31
  io.restorecommerce.auth.Subject subject = 3;
34
32
  }
35
33
 
@@ -45,7 +43,7 @@ message TimezoneResponse {
45
43
  }
46
44
 
47
45
  message Timezone {
48
- string id = 1;
49
- io.restorecommerce.meta.Meta meta = 2;
50
- string description = 3;
46
+ optional string id = 1;
47
+ optional io.restorecommerce.meta.Meta meta = 2;
48
+ optional string description = 3;
51
49
  }
@@ -9,9 +9,7 @@ import "io/restorecommerce/options.proto";
9
9
  /*
10
10
  * Microservice definition.
11
11
  */
12
- service Service {
13
- option (io.restorecommerce.options.service_name) = "token";
14
-
12
+ service TokenService {
15
13
  rpc upsert (TokenData) returns (google.protobuf.Any); // creates or upserts ID_token to `Redis` and returns sucess or failure message
16
14
  rpc find (Identifier) returns (google.protobuf.Any) {
17
15
  option (io.restorecommerce.options.is_query) = true;
@@ -22,20 +20,20 @@ service Service {
22
20
  }
23
21
 
24
22
  message TokenData {
25
- string id = 1;
26
- google.protobuf.Any payload = 2;
27
- double expires_in = 3;
28
- string type = 4;
29
- io.restorecommerce.auth.Subject subject = 5;
23
+ optional string id = 1;
24
+ optional google.protobuf.Any payload = 2;
25
+ optional double expires_in = 3;
26
+ optional string type = 4;
27
+ optional io.restorecommerce.auth.Subject subject = 5;
30
28
  }
31
29
 
32
30
  message Identifier {
33
- string id = 1;
34
- string type = 2;
35
- io.restorecommerce.auth.Subject subject = 3;
31
+ optional string id = 1;
32
+ optional string type = 2;
33
+ optional io.restorecommerce.auth.Subject subject = 3;
36
34
  }
37
35
 
38
36
  message GrantId {
39
- string grant_id = 1;
40
- io.restorecommerce.auth.Subject subject = 2;
37
+ optional string grant_id = 1;
38
+ optional io.restorecommerce.auth.Subject subject = 2;
41
39
  }
@@ -19,9 +19,7 @@ import "io/restorecommerce/locale.proto";
19
19
  /**
20
20
  * The microservice for the user resource.
21
21
  */
22
- service Service {
23
- option (io.restorecommerce.options.service_name) = "user";
24
-
22
+ service UserService {
25
23
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (UserListWithRoleResponse) {
26
24
  option (io.restorecommerce.options.is_query) = true;
27
25
  };
@@ -60,8 +58,8 @@ service Service {
60
58
  */
61
59
  message LoginRequest {
62
60
  string identifier = 1; // User name or email
63
- string password = 2; // Raw password
64
- string token = 3;
61
+ optional string password = 2; // Raw password
62
+ optional string token = 3;
65
63
  }
66
64
 
67
65
  message OrgIDRequest {
@@ -75,9 +73,9 @@ message DeleteUsersByOrgResponse {
75
73
  }
76
74
 
77
75
  message FindRequest {
78
- string id = 1; /// User ID
79
- string name = 2;
80
- string email = 3;
76
+ optional string id = 1; /// User ID
77
+ optional string name = 2;
78
+ optional string email = 3;
81
79
  io.restorecommerce.auth.Subject subject = 4;
82
80
  }
83
81
 
@@ -93,20 +91,20 @@ enum UserType {
93
91
  }
94
92
 
95
93
  message RegisterRequest {
96
- string id = 1;
97
- bool guest = 2;
98
- io.restorecommerce.meta.Meta meta = 3;
99
- string name = 4;
100
- string first_name = 5;
101
- string last_name = 6;
102
- string email = 7;
103
- string password = 8;
104
- string timezone_id = 9;
105
- string locale_id = 10;
106
-
107
- string default_scope = 11; // default hierarchical scope
108
- UserType user_type = 12;
109
- string captcha_code = 13;
94
+ optional string id = 1;
95
+ optional bool guest = 2;
96
+ optional io.restorecommerce.meta.Meta meta = 3;
97
+ optional string name = 4;
98
+ optional string first_name = 5;
99
+ optional string last_name = 6;
100
+ optional string email = 7;
101
+ optional string password = 8;
102
+ optional string timezone_id = 9;
103
+ optional string locale_id = 10;
104
+
105
+ optional string default_scope = 11; // default hierarchical scope
106
+ optional UserType user_type = 12;
107
+ optional string captcha_code = 13;
110
108
  }
111
109
 
112
110
  message ActivateRequest {
@@ -129,7 +127,6 @@ message SendInvitationEmailRequest {
129
127
  }
130
128
 
131
129
  message ChangePasswordRequest {
132
- string identifier = 1; /// user name or email
133
130
  string password = 2;
134
131
  string new_password = 3;
135
132
  io.restorecommerce.auth.Subject subject = 4;
@@ -215,7 +212,7 @@ message EmailChangeConfirmed {
215
212
  */
216
213
  message UserList {
217
214
  repeated User items = 1;
218
- uint32 total_count = 2;
215
+ optional uint32 total_count = 2;
219
216
  io.restorecommerce.auth.Subject subject = 3;
220
217
  }
221
218
 
@@ -266,19 +263,19 @@ message User {
266
263
  deleted: "userDeleted"
267
264
  };
268
265
 
269
- string id = 1; /// User ID, unique, key
270
- io.restorecommerce.meta.Meta meta = 2;
271
- string name = 3; // The name of the user, can be used for login
272
- string first_name = 4;
273
- string last_name = 5;
274
- string email = 6; /// Email address, can be used for login
275
- string new_email = 7; /// New email address; set by `requestEmailChange` and overrides actual email upon `confirmEmailChange`
276
- bool active = 8; /// If the user was activated via the activation process
277
- string activation_code = 9; /// Activation code used in the activation process
278
- string password = 10; /// Raw password, not stored
279
- string password_hash = 11; /// Encrypted password, stored
266
+ optional string id = 1; /// User ID, unique, key
267
+ optional io.restorecommerce.meta.Meta meta = 2;
268
+ optional string name = 3; // The name of the user, can be used for login
269
+ optional string first_name = 4;
270
+ optional string last_name = 5;
271
+ optional string email = 6; /// Email address, can be used for login
272
+ optional string new_email = 7; /// New email address; set by `requestEmailChange` and overrides actual email upon `confirmEmailChange`
273
+ optional bool active = 8; /// If the user was activated via the activation process
274
+ optional string activation_code = 9; /// Activation code used in the activation process
275
+ optional string password = 10; /// Raw password, not stored
276
+ optional string password_hash = 11; /// Encrypted password, stored
280
277
  repeated io.restorecommerce.auth.RoleAssociation role_associations = 12; // A user can have multiple roles and different attributes coupled with each role
281
- string timezone_id = 13 [
278
+ optional string timezone_id = 13 [
282
279
  (io.restorecommerce.options.resolver) = {
283
280
  target_type: ".io.restorecommerce.timezone.Timezone",
284
281
  target_service: "resource",
@@ -287,7 +284,7 @@ message User {
287
284
  field_name: "timezone",
288
285
  }
289
286
  ]; // timezone_id specifications
290
- string locale_id = 14 [
287
+ optional string locale_id = 14 [
291
288
  (io.restorecommerce.options.resolver) = {
292
289
  target_type: ".io.restorecommerce.locale.Locale",
293
290
  target_service: "resource",
@@ -296,18 +293,18 @@ message User {
296
293
  field_name: "locale",
297
294
  }
298
295
  ]; // locale specifications
299
- string default_scope = 15; // default hierarchical scope
300
- bool unauthenticated = 16; // true in case in case of `register`; set to false after activation
301
- bool guest = 17; /// Is the user a guest. A guest is a automatically generated user which can later be turned in a non-guest user.
302
- io.restorecommerce.image.Image image = 18;
303
- UserType user_type = 19;
304
- bool invite = 20; // For user invitation
305
- string invited_by_user_name = 21; // user who is inviting
306
- string invited_by_user_first_name = 22; // First name of user inviting
307
- string invited_by_user_last_name = 23; // Last name of user inviting
296
+ optional string default_scope = 15; // default hierarchical scope
297
+ optional bool unauthenticated = 16; // true in case in case of `register`; set to false after activation
298
+ optional bool guest = 17; /// Is the user a guest. A guest is a automatically generated user which can later be turned in a non-guest user.
299
+ optional io.restorecommerce.image.Image image = 18;
300
+ optional UserType user_type = 19;
301
+ optional bool invite = 20; // For user invitation
302
+ optional string invited_by_user_name = 21; // user who is inviting
303
+ optional string invited_by_user_first_name = 22; // First name of user inviting
304
+ optional string invited_by_user_last_name = 23; // Last name of user inviting
308
305
  repeated io.restorecommerce.auth.Tokens tokens = 24;
309
- double last_access = 25;
310
- google.protobuf.Any data = 26; /// additional data
306
+ optional double last_access = 25;
307
+ optional google.protobuf.Any data = 26; /// additional data
311
308
  }
312
309
 
313
310
  /**
@@ -356,5 +353,5 @@ message UserRole {
356
353
  repeated io.restorecommerce.auth.Tokens tokens = 24;
357
354
  double last_access = 25;
358
355
  google.protobuf.Any data = 26; /// additional data
359
- repeated io.restorecommerce.role.Role role = 27;
356
+ repeated io.restorecommerce.role.Role roles = 27;
360
357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restorecommerce/protos",
3
- "version": "2.0.2",
3
+ "version": "3.0.1",
4
4
  "description": "Protobuf descriptors for Restorecommerce services",
5
5
  "author": "n-fuse GmbH",
6
6
  "repository": {
@@ -15,5 +15,5 @@
15
15
  "protobufs"
16
16
  ],
17
17
  "scripts": {},
18
- "gitHead": "2ec001696f611681778a13842a9e047f1db08059"
18
+ "gitHead": "1c4ac0aaccaa55439930b96256d6db3884690cb0"
19
19
  }