@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
@@ -8,52 +8,61 @@ import "io/restorecommerce/auth.proto";
8
8
  import "io/restorecommerce/status.proto";
9
9
  import "io/restorecommerce/meta.proto";
10
10
  import "io/restorecommerce/address.proto";
11
+ import "io/restorecommerce/country.proto";
12
+ import "io/restorecommerce/product.proto";
11
13
  import "io/restorecommerce/options.proto";
14
+ import "io/restorecommerce/tax.proto";
12
15
 
13
16
  /**
14
17
  Microservice definition.
15
18
  */
16
- service Service {
17
- option (io.restorecommerce.options.service_name) = "fulfillment";
18
-
19
+ service FulfillmentService {
19
20
  /**
20
21
  Returns a list of shipment IDs.
21
22
  */
22
- rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentResponseList) {
23
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentListResponse) {
23
24
  option (io.restorecommerce.options.is_query) = true;
24
25
  };
25
26
 
26
27
  /**
27
28
  Creates fulfillment orders
28
29
  */
29
- rpc Create (FulfillmentList) returns (FulfillmentResponseList);
30
+ rpc Create (FulfillmentList) returns (FulfillmentListResponse);
30
31
 
31
32
  /**
32
- Updates fulfillment orders unless Status is beyond Ordered
33
+ Updates fulfillment orders unless Status is beyond Submit
33
34
  */
34
- rpc Update (FulfillmentList) returns (FulfillmentResponseList);
35
+ rpc Update (FulfillmentList) returns (FulfillmentListResponse);
35
36
 
36
37
  /**
37
- Creates or Updates fulfillment orders unless Status is beyond Ordered
38
+ Creates or Updates fulfillment orders unless Status is beyond Submit
38
39
  */
39
- rpc Upsert (FulfillmentList) returns (FulfillmentResponseList);
40
+ rpc Upsert (FulfillmentList) returns (FulfillmentListResponse);
40
41
 
41
42
  /**
42
- Creates, Executes and Updates fulfillment orders against API
43
+ Evaluate fulfillment for correctness
43
44
  */
44
- rpc Submit (FulfillmentList) returns (FulfillmentResponseList);
45
+ rpc Evaluate (FulfillmentList) returns (FulfillmentListResponse);
45
46
 
46
47
  /**
47
- Track a batch of fulfillment orders
48
+ Creates, Submits and Updates fulfillment orders against API
48
49
  */
49
- rpc Track (TrackingRequestList) returns (TrackingResultList) {
50
- option (io.restorecommerce.options.is_query) = true;
51
- };
50
+ rpc Submit (FulfillmentList) returns (FulfillmentListResponse);
51
+
52
+ /**
53
+ Track a batch of fulfillments
54
+ */
55
+ rpc Track (FulfillmentIdList) returns (FulfillmentListResponse);
52
56
 
53
57
  /**
54
- Cancel a batch of fulfillment orders
58
+ Withdraw a batch of fulfillments and request for cancelation
55
59
  */
56
- rpc Cancel (CancelRequestList) returns (FulfillmentResponseList);
60
+ rpc Withdraw (FulfillmentIdList) returns (FulfillmentListResponse);
61
+
62
+ /**
63
+ Cancel a batch of fulfillments
64
+ */
65
+ rpc Cancel (FulfillmentIdList) returns (FulfillmentListResponse);
57
66
 
58
67
  /**
59
68
  Delete a batch of fulfillments from the database
@@ -62,32 +71,26 @@ service Service {
62
71
  }
63
72
 
64
73
  enum State {
65
- Undefined = 0;
74
+ Created = 0;
66
75
  Invalid = 1;
67
76
  Failed = 2;
68
- Cancelled = 3;
69
- Created = 4;
70
- Submitted = 5;
71
- Shipping = 6;
72
- Done = 7;
73
- }
74
-
75
- message ShippingAddress {
76
- io.restorecommerce.address.Address address = 1;
77
- io.restorecommerce.address.ContactPerson contact_person = 2;
77
+ Submitted = 3;
78
+ InTransit = 4;
79
+ Fulfilled = 5;
80
+ Withdrawn = 6;
81
+ Cancelled = 7;
78
82
  }
79
83
 
80
- message Item {
81
- //Catalog item!
82
- string item_id = 1;
83
- string name = 2;
84
- string description = 3;
85
- string taric_code = 4;
86
- int32 quantity = 5;
84
+ message FulfillmentItem {
85
+ optional string product_id = 1;
86
+ optional string variant_id = 2;
87
+ optional int32 quantity = 3;
88
+ optional io.restorecommerce.product.Package package = 4;
87
89
  }
88
90
 
89
91
  message Parcel {
90
- string product_id = 1 [
92
+ optional string id = 1;
93
+ optional string product_id = 2 [
91
94
  (io.restorecommerce.options.resolver) = {
92
95
  target_type: ".io.restorecommerce.fulfillment_product.FulfillmentProduct",
93
96
  target_service: "resource",
@@ -96,12 +99,11 @@ message Parcel {
96
99
  field_name: "product",
97
100
  }
98
101
  ];
99
- string product_variant_id = 2;
100
- repeated Item items = 3;
101
- float weight_in_kg = 4;
102
- float height_in_cm = 5;
103
- float width_in_cm = 6;
104
- float length_in_cm = 7;
102
+ optional string variant_id = 3;
103
+ optional FulfillmentItem item = 4;
104
+ optional double price = 5;
105
+ repeated io.restorecommerce.tax.VAT vats = 6; //Set by service
106
+ optional io.restorecommerce.product.Package package = 7;
105
107
  }
106
108
 
107
109
  message Label {
@@ -110,41 +112,59 @@ message Label {
110
112
  string pdf = 2;
111
113
  string png = 3;
112
114
  }
113
- string shipment_number = 4; //filled on Order
114
- State state = 5; //update by Track
115
- io.restorecommerce.status.Status status = 6; //API status
115
+ optional string parcel_id = 4;
116
+ optional string shipment_number = 5; //filled on Order
117
+ optional State state = 6; //update by Track
118
+ optional io.restorecommerce.status.Status status = 7; //API status
116
119
  }
117
120
 
118
- message Order {
119
- string reference_id = 1;
121
+ message Packaging {
122
+ optional string reference_id = 1;
120
123
  repeated Parcel parcels = 2;
121
- ShippingAddress sender = 3;
122
- ShippingAddress receiver = 4;
123
- string notify = 5;
124
+ optional io.restorecommerce.address.ShippingAddress sender = 3;
125
+ optional io.restorecommerce.address.ShippingAddress receiver = 4;
126
+ optional string notify = 5;
127
+ }
128
+
129
+ message Event {
130
+ optional int64 timestamp = 1;
131
+ optional string location = 2;
132
+ optional google.protobuf.Any details = 3;
133
+ optional io.restorecommerce.status.Status status = 4;
134
+ }
135
+
136
+ message Tracking {
137
+ optional string shipment_number = 1;
138
+ repeated Event events = 3;
139
+ optional google.protobuf.Any details = 4;
140
+ optional io.restorecommerce.status.Status status = 5;
124
141
  }
125
142
 
126
143
  /**
127
- This is the message how it get stored to the database
144
+ This is the message of how it get stored to the database
128
145
  */
129
146
  message Fulfillment {
130
147
  option (restorecommerce.options.kafka_subscriber) = {
131
- plural: "fulfillment"
148
+ plural: "fulfillments"
132
149
  topic: "io.restorecommerce.fulfillment.resource"
133
150
  created: "fulfillmentCreated"
134
151
  updated: "fulfillmentUpdated"
135
152
  deleted: "fulfillmentDeleted"
136
153
  };
137
154
 
138
- string id = 1;
139
- Order order = 2;
140
- io.restorecommerce.meta.Meta meta = 3;
155
+ optional string id = 1;
156
+ optional Packaging packaging = 2; //filled by user
157
+ optional io.restorecommerce.meta.Meta meta = 3;
141
158
  repeated Label labels = 4; //filled by service
142
- State state = 5;
159
+ repeated Tracking trackings = 5; //filled by service
160
+ optional State state = 6; //filled by service
161
+ optional double total_price = 7;
162
+ optional double total_vat = 8;
143
163
  }
144
164
 
145
165
  message FulfillmentList {
146
166
  repeated Fulfillment items = 1;
147
- uint32 total_count = 2;
167
+ optional uint32 total_count = 2;
148
168
  io.restorecommerce.auth.Subject subject = 3;
149
169
  }
150
170
 
@@ -153,62 +173,25 @@ message FulfillmentResponse {
153
173
  io.restorecommerce.status.Status status = 2;
154
174
  }
155
175
 
156
- message FulfillmentResponseList {
176
+ message FulfillmentListResponse {
157
177
  repeated FulfillmentResponse items = 1;
158
178
  uint32 total_count = 2;
159
179
  io.restorecommerce.status.OperationStatus operation_status = 3;
160
180
  }
161
181
 
162
- message TrackingRequest {
163
- string fulfillment_id = 1;
182
+ message FulfillmentId {
183
+ optional string id = 1;
164
184
  repeated string shipment_numbers = 2; //optional
165
- google.protobuf.Any options = 3;
185
+ optional google.protobuf.Any options = 3;
186
+ optional io.restorecommerce.auth.Subject subject = 4;
166
187
  }
167
188
 
168
- message TrackingRequestList {
169
- repeated TrackingRequest items = 1;
170
- io.restorecommerce.auth.Subject subject = 2;
171
- }
172
-
173
- message Event {
174
- int64 timestamp = 1;
175
- string location = 2;
176
- google.protobuf.Any details = 3;
177
- io.restorecommerce.status.Status status = 4;
178
- }
179
-
180
- message Tracking {
181
- string shipment_number = 1;
182
- repeated Event events = 3;
183
- google.protobuf.Any details = 4;
184
- io.restorecommerce.status.Status status = 5;
185
- }
186
-
187
- message TrackingResult {
188
- Fulfillment fulfillment = 1 [
189
- (io.restorecommerce.options.resolver) = {
190
- target_type: ".io.restorecommerce.fulfillment.Fulfillment",
191
- target_service: "resource",
192
- target_sub_service: "fulfillment",
193
- target_method: "Read",
194
- field_name: "fulfillment",
195
- }
196
- ];
197
- repeated Tracking tracks = 2;
198
- io.restorecommerce.status.Status status = 3;
199
- }
200
-
201
- message TrackingResultList {
202
- repeated TrackingResult items = 1;
203
- io.restorecommerce.status.OperationStatus operation_status = 2;
204
- }
205
-
206
- message CancelRequestList {
207
- repeated string ids = 1;
208
- io.restorecommerce.auth.Subject subject = 2;
189
+ message FulfillmentIdList {
190
+ repeated FulfillmentId items = 1;
191
+ optional uint32 total_count = 2;
192
+ io.restorecommerce.auth.Subject subject = 3;
209
193
  }
210
194
 
211
195
  message Deleted {
212
196
  string id = 1;
213
- }
214
-
197
+ }
@@ -13,15 +13,13 @@ import "io/restorecommerce/options.proto";
13
13
  Microservice defination
14
14
  */
15
15
 
16
- service Service {
17
- option (io.restorecommerce.options.service_name) = "fulfillment_courier";
18
-
19
- rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentCourierResponseList) {
16
+ service FulfillmentCourierService {
17
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentCourierListResponse) {
20
18
  option (io.restorecommerce.options.is_query) = true;
21
19
  };
22
- rpc Create (FulfillmentCourierList) returns (FulfillmentCourierResponseList);
23
- rpc Update (FulfillmentCourierList) returns (FulfillmentCourierResponseList);
24
- rpc Upsert (FulfillmentCourierList) returns (FulfillmentCourierResponseList);
20
+ rpc Create (FulfillmentCourierList) returns (FulfillmentCourierListResponse);
21
+ rpc Update (FulfillmentCourierList) returns (FulfillmentCourierListResponse);
22
+ rpc Upsert (FulfillmentCourierList) returns (FulfillmentCourierListResponse);
25
23
  rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
26
24
  }
27
25
 
@@ -34,19 +32,19 @@ message FulfillmentCourier {
34
32
  deleted: "fulfillmentCourierDeleted"
35
33
  };
36
34
 
37
- string id = 1;
38
- string name = 4;
39
- string description = 5;
40
- string logo = 6;
41
- string website = 7;
42
- string stub_type = 8;
43
- google.protobuf.Any configuration = 10;
44
- io.restorecommerce.meta.Meta meta = 11;
35
+ optional string id = 1;
36
+ optional string name = 4;
37
+ optional string description = 5;
38
+ optional string logo = 6;
39
+ optional string website = 7;
40
+ optional string stub_type = 8;
41
+ optional google.protobuf.Any configuration = 10;
42
+ optional io.restorecommerce.meta.Meta meta = 11;
45
43
  }
46
44
 
47
45
  message FulfillmentCourierList {
48
46
  repeated FulfillmentCourier items = 1;
49
- uint32 total_count = 2;
47
+ optional uint32 total_count = 2;
50
48
  io.restorecommerce.auth.Subject subject = 3;
51
49
  }
52
50
 
@@ -55,7 +53,7 @@ message FulfillmentCourierResponse {
55
53
  io.restorecommerce.status.Status status = 2;
56
54
  }
57
55
 
58
- message FulfillmentCourierResponseList {
56
+ message FulfillmentCourierListResponse {
59
57
  repeated FulfillmentCourierResponse items = 1;
60
58
  uint32 total_count = 2;
61
59
  io.restorecommerce.status.OperationStatus operation_status = 3;
@@ -7,6 +7,9 @@ import "io/restorecommerce/meta.proto";
7
7
  import "io/restorecommerce/auth.proto";
8
8
  import "io/restorecommerce/status.proto";
9
9
  import "io/restorecommerce/attribute.proto";
10
+ import "io/restorecommerce/address.proto";
11
+ import "io/restorecommerce/tax.proto";
12
+ import "io/restorecommerce/geometry.proto";
10
13
  import "io/restorecommerce/fulfillment_courier.proto";
11
14
  import "io/restorecommerce/fulfillment.proto";
12
15
  import "io/restorecommerce/options.proto";
@@ -15,55 +18,51 @@ import "io/restorecommerce/options.proto";
15
18
  Microservice defination
16
19
  */
17
20
 
18
- service Service {
19
- option (io.restorecommerce.options.service_name) = "fulfillment_product";
20
-
21
- rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentProductResponseList) {
21
+ service FulfillmentProductService {
22
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentProductListResponse) {
22
23
  option (io.restorecommerce.options.is_query) = true;
23
24
  };
24
- rpc Find (QueryList) returns (PackingSolutionResponseList) {
25
+ rpc Find (ProductQueryList) returns (PackingSolutionListResponse) {
25
26
  option (io.restorecommerce.options.is_query) = true;
26
27
  };
27
- rpc Create (FulfillmentProductList) returns (FulfillmentProductResponseList);
28
- rpc Update (FulfillmentProductList) returns (FulfillmentProductResponseList);
29
- rpc Upsert (FulfillmentProductList) returns (FulfillmentProductResponseList);
28
+ rpc Create (FulfillmentProductList) returns (FulfillmentProductListResponse);
29
+ rpc Update (FulfillmentProductList) returns (FulfillmentProductListResponse);
30
+ rpc Upsert (FulfillmentProductList) returns (FulfillmentProductListResponse);
30
31
  rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
31
32
  }
32
33
 
33
34
  message Preferences {
34
35
  repeated io.restorecommerce.attribute.Attribute couriers = 1; //ID, name or type
35
- float pricing = 2;
36
- float compactness = 3;
37
- float homogeneity = 4;
36
+ repeated io.restorecommerce.attribute.Attribute options = 2;
38
37
  }
39
38
 
40
- message Query {
41
- // io.restorecommerce.fulfillment.Address sender = 1;
42
- // io.restorecommerce.fulfillment.Address receiver = 2;
43
- repeated io.restorecommerce.fulfillment.Item goods = 3;
44
- Preferences preferences = 4;
45
- string reference_id = 5;
39
+ message ProductQuery {
40
+ optional io.restorecommerce.address.ShippingAddress sender = 1;
41
+ optional io.restorecommerce.address.ShippingAddress receiver = 2;
42
+ repeated io.restorecommerce.fulfillment.FulfillmentItem items = 3;
43
+ optional Preferences preferences = 4;
44
+ optional string reference_id = 5;
46
45
  }
47
46
 
48
- message QueryList {
49
- repeated Query items = 1;
50
- uint32 total_count = 2;
47
+ message ProductQueryList {
48
+ repeated ProductQuery items = 1;
49
+ optional uint32 total_count = 2;
51
50
  io.restorecommerce.auth.Subject subject = 3;
52
51
  }
53
52
 
54
53
  message FulfillmentProduct {
55
54
  option (restorecommerce.options.kafka_subscriber) = {
56
- plural: "fulfillmentProduct"
55
+ plural: "fulfillment_products"
57
56
  topic: "io.restorecommerce.fulfillment_product.resource"
58
57
  created: "fulfillmentProductCreated"
59
58
  updated: "fulfillmentProductUpdated"
60
59
  deleted: "fulfillmentProductDeleted"
61
60
  };
62
61
 
63
- string id = 1;
64
- string name = 2;
65
- string description = 3;
66
- string courier_id = 4 [
62
+ optional string id = 1;
63
+ optional string name = 2;
64
+ optional string description = 3;
65
+ optional string courier_id = 4 [
67
66
  (io.restorecommerce.options.resolver) = {
68
67
  target_type: ".io.restorecommerce.fulfillment_courier.FulfillmentCourier",
69
68
  target_service: "resource",
@@ -77,24 +76,21 @@ message FulfillmentProduct {
77
76
  repeated string tax_ids = 9;
78
77
  repeated io.restorecommerce.attribute.Attribute attributes = 10;
79
78
  repeated Variant variants = 11;
80
- io.restorecommerce.meta.Meta meta = 12;
79
+ optional io.restorecommerce.meta.Meta meta = 12;
81
80
  }
82
81
 
83
82
  message Variant {
84
- string id = 1;
85
- string name = 2;
86
- string description = 3;
87
- double price = 4;
88
- double max_weight = 5;
89
- double max_width = 6;
90
- double max_height = 7;
91
- double max_length = 8;
92
- double max_volume = 9;
83
+ optional string id = 1;
84
+ optional string name = 2;
85
+ optional string description = 3;
86
+ optional double price = 4;
87
+ optional io.restorecommerce.geometry.BoundingBox3D max_size = 6;
88
+ optional double max_weight = 7;
93
89
  }
94
90
 
95
91
  message FulfillmentProductList {
96
92
  repeated FulfillmentProduct items = 1;
97
- uint32 total_count = 2;
93
+ optional uint32 total_count = 2;
98
94
  io.restorecommerce.auth.Subject subject = 3;
99
95
  }
100
96
 
@@ -103,29 +99,30 @@ message FulfillmentProductResponse {
103
99
  io.restorecommerce.status.Status status = 2;
104
100
  }
105
101
 
106
- message FulfillmentProductResponseList {
102
+ message FulfillmentProductListResponse {
107
103
  repeated FulfillmentProductResponse items = 1;
108
104
  uint32 total_count = 2;
109
105
  io.restorecommerce.status.OperationStatus operation_status = 3;
110
106
  }
111
107
 
112
108
  message PackingSolution {
113
- string reference_id = 1;
114
- float price = 2;
115
- float compactness = 3;
116
- float homogeneity = 4;
117
- float score = 5;
118
- repeated io.restorecommerce.fulfillment.Parcel parcels = 6;
109
+ optional double price = 1;
110
+ optional double compactness = 2;
111
+ optional double homogeneity = 3;
112
+ optional double score = 4;
113
+ repeated io.restorecommerce.fulfillment.Parcel parcels = 5;
114
+ repeated io.restorecommerce.tax.VAT vats = 6;
119
115
  }
120
116
 
121
117
  message PackingSolutionResponse {
122
- repeated PackingSolution solutions = 1;
123
- io.restorecommerce.status.Status status = 2;
118
+ optional string reference_id = 1;
119
+ repeated PackingSolution solutions = 2;
120
+ optional io.restorecommerce.status.Status status = 3;
124
121
  }
125
122
 
126
- message PackingSolutionResponseList {
123
+ message PackingSolutionListResponse {
127
124
  repeated PackingSolutionResponse items = 1;
128
- uint32 total_count = 2;
125
+ optional uint32 total_count = 2;
129
126
  io.restorecommerce.status.OperationStatus operation_status = 3;
130
127
  }
131
128
 
@@ -0,0 +1,23 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.geometry;
4
+
5
+ import "io/restorecommerce/options.proto";
6
+
7
+
8
+ message Vector3D {
9
+ optional double x = 1;
10
+ optional double y = 2;
11
+ optional double z = 3;
12
+ }
13
+
14
+ message BoundingBox3D {
15
+ optional double width = 1;
16
+ optional double height = 2;
17
+ optional double length = 3;
18
+ }
19
+
20
+ message OriginBoundingBox {
21
+ optional Vector3D origin = 1;
22
+ optional BoundingBox3D bbox = 2;
23
+ }
@@ -7,7 +7,7 @@ import "io/restorecommerce/status.proto";
7
7
  import "io/restorecommerce/resource_base.proto";
8
8
 
9
9
  // Service provides the CRUD operations
10
- service Service {
10
+ service GraphService {
11
11
  rpc Traversal (TraversalRequest) returns (stream TraversalResponse);
12
12
  }
13
13
 
@@ -17,29 +17,29 @@ message TraversalRequest {
17
17
  Vertices vertices = 1;
18
18
  Collection collection = 2;
19
19
  }
20
- Options opts = 3;
21
- bool path = 4;
20
+ optional Options opts = 3;
21
+ optional bool path = 4;
22
22
  io.restorecommerce.auth.Subject subject = 5;
23
23
  repeated Filters filters = 6;
24
24
  }
25
25
 
26
26
  message Vertices {
27
27
  string collection_name = 1;
28
- repeated string start_vertex_id = 2;
28
+ repeated string start_vertex_ids = 2;
29
29
  }
30
30
 
31
31
  message Collection {
32
32
  string collection_name = 1;
33
33
  uint32 limit = 2;
34
34
  uint32 offset = 3;
35
- repeated io.restorecommerce.resourcebase.Sort sort = 4;
35
+ repeated io.restorecommerce.resourcebase.Sort sorts = 4;
36
36
  }
37
37
 
38
38
  message Options {
39
- repeated string include_vertex = 1; // to include vertices
40
- repeated string exclude_vertex = 2; // to exclude vertices
41
- repeated string include_edge = 3; // to include vertices
42
- repeated string exclude_edge = 4; // to exclude vertices
39
+ repeated string include_vertexs = 1; // to include vertices
40
+ repeated string exclude_vertexs = 2; // to exclude vertices
41
+ repeated string include_edges = 3; // to include vertices
42
+ repeated string exclude_edges = 4; // to exclude vertices
43
43
  Direction direction = 5; // either inbound or outbound, defaults to outbound direction
44
44
  enum Direction {
45
45
  OUTBOUND = 0;
@@ -49,18 +49,18 @@ message Options {
49
49
 
50
50
 
51
51
  message Filters {
52
- string entity = 1; // entity on which the filters are applied
53
- string edge = 2; // if edge is specified depending on the direction filter are applied only for those entities
54
- repeated Filter filter = 3;
52
+ optional string entity = 1; // entity on which the filters are applied
53
+ optional string edge = 2; // if edge is specified depending on the direction filter are applied only for those entities
54
+ repeated Filter filters = 3;
55
55
  enum Operator {
56
56
  and = 0;
57
57
  or = 1;
58
58
  }
59
- Operator operator = 4;
59
+ optional Operator operator = 4;
60
60
  }
61
61
 
62
62
  message Filter {
63
- string field = 1;
63
+ optional string field = 1;
64
64
  enum Operation {
65
65
  eq = 0;
66
66
  lt = 1;
@@ -72,8 +72,8 @@ message Filter {
72
72
  in = 7;
73
73
  neq = 8;
74
74
  }
75
- Operation operation = 2;
76
- string value = 3;
75
+ optional Operation operation = 2;
76
+ optional string value = 3;
77
77
  enum ValueType {
78
78
  STRING = 0; // default value type if not specified
79
79
  NUMBER = 1;
@@ -81,7 +81,7 @@ message Filter {
81
81
  DATE = 3;
82
82
  ARRAY = 4;
83
83
  }
84
- ValueType type = 4;
84
+ optional ValueType type = 4;
85
85
  repeated Filters filters = 5;
86
86
  }
87
87
 
@@ -2,23 +2,24 @@ syntax = "proto3";
2
2
 
3
3
  package io.restorecommerce.image;
4
4
 
5
- // ProductCategory resource
6
5
  message Image {
7
- string id = 1;
8
- string caption = 2;
9
- string filename = 3;
10
- string content_type = 4;
11
- string url = 5;
12
- double width = 6;
13
- double height = 7;
14
- double length = 8;
6
+ optional string id = 1;
7
+ optional string caption = 2;
8
+ optional string filename = 3;
9
+ optional string content_type = 4;
10
+ optional string url = 5;
11
+ optional double width = 6;
12
+ optional double height = 7;
13
+ optional double length = 8;
14
+ repeated string tags = 9;
15
+ optional int64 index = 10;
15
16
  }
16
17
 
17
18
  message ImageList {
18
- repeated Image items = 1;
19
- uint32 total_count = 2;
19
+ repeated Image items = 1;
20
+ optional uint32 total_count = 2;
20
21
  }
21
22
 
22
23
  message Deleted {
23
- string id = 1;
24
+ string id = 1;
24
25
  }