@restorecommerce/protos 1.1.0 → 2.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.
- package/CHANGELOG.md +27 -0
- package/io/restorecommerce/address.proto +49 -19
- package/io/restorecommerce/contact_point.proto +3 -3
- package/io/restorecommerce/fulfillment.proto +72 -60
- package/io/restorecommerce/fulfillment_courier.proto +8 -0
- package/io/restorecommerce/fulfillment_product.proto +30 -10
- package/io/restorecommerce/order.proto +80 -92
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@2.0.0...@restorecommerce/protos@2.0.1) (2022-10-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **protos:** fix fullfillment product for missing import and commented address (does not exist) ([5780cb2](https://github.com/restorecommerce/libs/commit/5780cb245ad3f0955ba27d1b6b60659cc7e4b8d0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@1.1.0...@restorecommerce/protos@2.0.0) (2022-10-12)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Code Refactoring
|
|
21
|
+
|
|
22
|
+
* **protos:** refactor protos for fulfillment-srv, ordering-srv, ready for migration tests ([bf8bfd3](https://github.com/restorecommerce/libs/commit/bf8bfd3a00e614857f6f4be35fb00224634ed066))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### BREAKING CHANGES
|
|
26
|
+
|
|
27
|
+
* **protos:** Address has new fields. Compatiblity must be checked.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [1.1.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@1.0.0...@restorecommerce/protos@1.1.0) (2022-10-04)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -47,12 +47,43 @@ message AddressResponse {
|
|
|
47
47
|
io.restorecommerce.status.Status status = 2;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
message
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
message GeoPoint {
|
|
51
|
+
double latitude = 1;
|
|
52
|
+
double longitude = 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message AddressAddition {
|
|
56
|
+
string field1 = 1;
|
|
57
|
+
string field2 = 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message BusinessAddress {
|
|
61
|
+
string name = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message ResidentialAddress {
|
|
65
|
+
string title = 1;
|
|
66
|
+
string given_name = 2;
|
|
67
|
+
string mid_name = 3;
|
|
68
|
+
string family_name = 4;
|
|
69
|
+
}
|
|
55
70
|
|
|
71
|
+
message PackStation {
|
|
72
|
+
string provider = 1;
|
|
73
|
+
string station_number = 2;
|
|
74
|
+
string post_number = 3;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
Uses by Order-Srv and Fulfillment-Srv
|
|
79
|
+
**/
|
|
80
|
+
message ContactPerson {
|
|
81
|
+
string name = 1;
|
|
82
|
+
string email = 2;
|
|
83
|
+
string phone = 3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message Address {
|
|
56
87
|
string id = 1;
|
|
57
88
|
io.restorecommerce.meta.Meta meta = 2;
|
|
58
89
|
string postcode = 3;
|
|
@@ -65,17 +96,16 @@ message Address {
|
|
|
65
96
|
field_name: "country",
|
|
66
97
|
}
|
|
67
98
|
];
|
|
68
|
-
string locality =
|
|
69
|
-
string street =
|
|
70
|
-
string region =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
99
|
+
string locality = 6;
|
|
100
|
+
string street = 7;
|
|
101
|
+
string region = 8;
|
|
102
|
+
GeoPoint geo_coordinates = 9;
|
|
103
|
+
double altitude = 10;
|
|
104
|
+
string building_number = 11;
|
|
105
|
+
AddressAddition address_addition = 12;
|
|
106
|
+
oneof type {
|
|
107
|
+
BusinessAddress business_address = 13;
|
|
108
|
+
ResidentialAddress residential_address = 14;
|
|
109
|
+
PackStation pack_station = 15;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -59,9 +59,9 @@ message ContactPoint {
|
|
|
59
59
|
field_name: "physicalAddress",
|
|
60
60
|
}
|
|
61
61
|
];
|
|
62
|
-
string website =
|
|
63
|
-
string email =
|
|
64
|
-
string contact_point_type_id =
|
|
62
|
+
string website = 5;
|
|
63
|
+
string email = 6;
|
|
64
|
+
string contact_point_type_id = 7 [
|
|
65
65
|
(io.restorecommerce.options.resolver) = {
|
|
66
66
|
target_type: ".io.restorecommerce.contact_point_type.ContactPointType",
|
|
67
67
|
target_service: "resource",
|
|
@@ -8,7 +8,6 @@ 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
11
|
import "io/restorecommerce/options.proto";
|
|
13
12
|
|
|
14
13
|
/**
|
|
@@ -25,9 +24,24 @@ service Service {
|
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
|
-
Creates
|
|
27
|
+
Creates fulfillment orders
|
|
29
28
|
*/
|
|
30
|
-
rpc Create (
|
|
29
|
+
rpc Create (FulfillmentList) returns (FulfillmentResponseList);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
Updates fulfillment orders unless Status is beyond Ordered
|
|
33
|
+
*/
|
|
34
|
+
rpc Update (FulfillmentList) returns (FulfillmentResponseList);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
Creates or Updates fulfillment orders unless Status is beyond Ordered
|
|
38
|
+
*/
|
|
39
|
+
rpc Upsert (FulfillmentList) returns (FulfillmentResponseList);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
Creates, Executes and Updates fulfillment orders against API
|
|
43
|
+
*/
|
|
44
|
+
rpc Submit (FulfillmentList) returns (FulfillmentResponseList);
|
|
31
45
|
|
|
32
46
|
/**
|
|
33
47
|
Track a batch of fulfillment orders
|
|
@@ -50,50 +64,38 @@ service Service {
|
|
|
50
64
|
enum State {
|
|
51
65
|
Undefined = 0;
|
|
52
66
|
Invalid = 1;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
message Contact {
|
|
61
|
-
string name = 1;
|
|
62
|
-
string email = 2;
|
|
63
|
-
string phone = 3;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
message Branch {
|
|
67
|
-
string provider = 1;
|
|
68
|
-
string branch_number = 2;
|
|
69
|
-
string post_number = 3;
|
|
67
|
+
Failed = 2;
|
|
68
|
+
Cancelled = 3;
|
|
69
|
+
Created = 4;
|
|
70
|
+
Submitted = 5;
|
|
71
|
+
Shipping = 6;
|
|
72
|
+
Done = 7;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
|
-
message
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
string post_number = 3;
|
|
75
|
+
message ShippingAddress {
|
|
76
|
+
io.restorecommerce.address.Address address = 1;
|
|
77
|
+
io.restorecommerce.address.ContactPerson contact_person = 2;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
message
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
};
|
|
86
|
-
io.restorecommerce.country.Country country = 6;
|
|
87
|
-
Contact contact = 7;
|
|
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;
|
|
88
87
|
}
|
|
89
88
|
|
|
90
89
|
message Parcel {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
string product_id = 1 [
|
|
91
|
+
(io.restorecommerce.options.resolver) = {
|
|
92
|
+
target_type: ".io.restorecommerce.fulfillment_product.FulfillmentProduct",
|
|
93
|
+
target_service: "resource",
|
|
94
|
+
target_sub_service: "fulfillment_product",
|
|
95
|
+
target_method: "Read",
|
|
96
|
+
field_name: "product",
|
|
97
|
+
}
|
|
98
|
+
];
|
|
97
99
|
string product_variant_id = 2;
|
|
98
100
|
repeated Item items = 3;
|
|
99
101
|
float weight_in_kg = 4;
|
|
@@ -102,14 +104,6 @@ message Parcel {
|
|
|
102
104
|
float length_in_cm = 7;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
message Order {
|
|
106
|
-
string reference_id = 1;
|
|
107
|
-
repeated Parcel parcels = 2;
|
|
108
|
-
Address sender = 3;
|
|
109
|
-
Address receiver = 4;
|
|
110
|
-
string notify = 5;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
107
|
message Label {
|
|
114
108
|
oneof type {
|
|
115
109
|
string url = 1;
|
|
@@ -121,27 +115,37 @@ message Label {
|
|
|
121
115
|
io.restorecommerce.status.Status status = 6; //API status
|
|
122
116
|
}
|
|
123
117
|
|
|
124
|
-
message
|
|
125
|
-
string
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
message FulfillmentRequestList {
|
|
131
|
-
repeated FulfillmentRequest items = 1;
|
|
132
|
-
uint32 total_count = 2;
|
|
133
|
-
io.restorecommerce.auth.Subject subject = 3;
|
|
118
|
+
message Order {
|
|
119
|
+
string reference_id = 1;
|
|
120
|
+
repeated Parcel parcels = 2;
|
|
121
|
+
ShippingAddress sender = 3;
|
|
122
|
+
ShippingAddress receiver = 4;
|
|
123
|
+
string notify = 5;
|
|
134
124
|
}
|
|
135
125
|
|
|
136
126
|
/**
|
|
137
127
|
This is the message how it get stored to the database
|
|
138
128
|
*/
|
|
139
129
|
message Fulfillment {
|
|
130
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
131
|
+
plural: "fulfillment"
|
|
132
|
+
topic: "io.restorecommerce.fulfillment.resource"
|
|
133
|
+
created: "fulfillmentCreated"
|
|
134
|
+
updated: "fulfillmentUpdated"
|
|
135
|
+
deleted: "fulfillmentDeleted"
|
|
136
|
+
};
|
|
137
|
+
|
|
140
138
|
string id = 1;
|
|
141
139
|
Order order = 2;
|
|
142
140
|
io.restorecommerce.meta.Meta meta = 3;
|
|
143
141
|
repeated Label labels = 4; //filled by service
|
|
144
|
-
|
|
142
|
+
State state = 5;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message FulfillmentList {
|
|
146
|
+
repeated Fulfillment items = 1;
|
|
147
|
+
uint32 total_count = 2;
|
|
148
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
message FulfillmentResponse {
|
|
@@ -181,7 +185,15 @@ message Tracking {
|
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
message TrackingResult {
|
|
184
|
-
Fulfillment fulfillment = 1
|
|
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
|
+
];
|
|
185
197
|
repeated Tracking tracks = 2;
|
|
186
198
|
io.restorecommerce.status.Status status = 3;
|
|
187
199
|
}
|
|
@@ -26,6 +26,14 @@ service Service {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
message FulfillmentCourier {
|
|
29
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
30
|
+
plural: "fulfillmentCouriers"
|
|
31
|
+
topic: "io.restorecommerce.fulfillment_courier.resource"
|
|
32
|
+
created: "fulfillmentCourierCreated"
|
|
33
|
+
updated: "fulfillmentCourierUpdated"
|
|
34
|
+
deleted: "fulfillmentCourierDeleted"
|
|
35
|
+
};
|
|
36
|
+
|
|
29
37
|
string id = 1;
|
|
30
38
|
string name = 4;
|
|
31
39
|
string description = 5;
|
|
@@ -7,17 +7,23 @@ 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/
|
|
10
|
+
import "io/restorecommerce/fulfillment_courier.proto";
|
|
11
11
|
import "io/restorecommerce/fulfillment.proto";
|
|
12
|
-
|
|
12
|
+
import "io/restorecommerce/options.proto";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
Microservice defination
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
service Service {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
option (io.restorecommerce.options.service_name) = "fulfillment_product";
|
|
20
|
+
|
|
21
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentProductResponseList) {
|
|
22
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
23
|
+
};
|
|
24
|
+
rpc Find (QueryList) returns (PackingSolutionResponseList) {
|
|
25
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
26
|
+
};
|
|
21
27
|
rpc Create (FulfillmentProductList) returns (FulfillmentProductResponseList);
|
|
22
28
|
rpc Update (FulfillmentProductList) returns (FulfillmentProductResponseList);
|
|
23
29
|
rpc Upsert (FulfillmentProductList) returns (FulfillmentProductResponseList);
|
|
@@ -32,9 +38,9 @@ message Preferences {
|
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
message Query {
|
|
35
|
-
io.restorecommerce.fulfillment.Address sender = 1;
|
|
36
|
-
io.restorecommerce.fulfillment.Address receiver = 2;
|
|
37
|
-
repeated io.restorecommerce.
|
|
41
|
+
// io.restorecommerce.fulfillment.Address sender = 1;
|
|
42
|
+
// io.restorecommerce.fulfillment.Address receiver = 2;
|
|
43
|
+
repeated io.restorecommerce.fulfillment.Item goods = 3;
|
|
38
44
|
Preferences preferences = 4;
|
|
39
45
|
string reference_id = 5;
|
|
40
46
|
}
|
|
@@ -46,13 +52,27 @@ message QueryList {
|
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
message FulfillmentProduct {
|
|
55
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
56
|
+
plural: "fulfillmentProduct"
|
|
57
|
+
topic: "io.restorecommerce.fulfillment_product.resource"
|
|
58
|
+
created: "fulfillmentProductCreated"
|
|
59
|
+
updated: "fulfillmentProductUpdated"
|
|
60
|
+
deleted: "fulfillmentProductDeleted"
|
|
61
|
+
};
|
|
62
|
+
|
|
49
63
|
string id = 1;
|
|
50
64
|
string name = 2;
|
|
51
65
|
string description = 3;
|
|
52
|
-
string courier_id = 4
|
|
53
|
-
|
|
66
|
+
string courier_id = 4 [
|
|
67
|
+
(io.restorecommerce.options.resolver) = {
|
|
68
|
+
target_type: ".io.restorecommerce.fulfillment_courier.FulfillmentCourier",
|
|
69
|
+
target_service: "resource",
|
|
70
|
+
target_sub_service: "fulfillment_courier",
|
|
71
|
+
target_method: "Read",
|
|
72
|
+
field_name: "courier",
|
|
73
|
+
}
|
|
74
|
+
];
|
|
54
75
|
repeated string start_zones = 6;
|
|
55
|
-
//repeated io.restorecommerce.country.Country destination_country = 7;
|
|
56
76
|
repeated string destination_zones = 8;
|
|
57
77
|
repeated string tax_ids = 9;
|
|
58
78
|
repeated io.restorecommerce.attribute.Attribute attributes = 10;
|
|
@@ -7,9 +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/options.proto";
|
|
10
|
+
import "io/restorecommerce/address.proto";
|
|
11
|
+
import "io/restorecommerce/fulfillment.proto";
|
|
10
12
|
|
|
11
|
-
// Used by resolvers
|
|
12
|
-
import "io/restorecommerce/contact_point.proto";
|
|
13
13
|
|
|
14
14
|
service Service {
|
|
15
15
|
option (io.restorecommerce.options.service_name) = "order";
|
|
@@ -18,65 +18,23 @@ service Service {
|
|
|
18
18
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
19
|
};
|
|
20
20
|
rpc Create (OrderList) returns (OrderListResponse);
|
|
21
|
-
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
22
21
|
rpc Update (OrderList) returns (OrderListResponse);
|
|
23
22
|
rpc Upsert (OrderList) returns (OrderListResponse);
|
|
24
|
-
rpc
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
message OrderList {
|
|
29
|
-
repeated Order items = 1;
|
|
30
|
-
uint32 total_count = 2;
|
|
31
|
-
io.restorecommerce.auth.Subject subject = 3;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
message OrderListResponse {
|
|
35
|
-
repeated OrderResponse items = 1;
|
|
36
|
-
uint32 total_count = 2;
|
|
37
|
-
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
message OrderResponse {
|
|
41
|
-
Order payload = 1;
|
|
42
|
-
io.restorecommerce.status.Status status = 2;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
message Order {
|
|
46
|
-
string id = 1;
|
|
47
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
48
|
-
string name = 3;
|
|
49
|
-
string description = 4;
|
|
50
|
-
string status = 5;
|
|
51
|
-
string customer_reference = 6;
|
|
52
|
-
repeated Items items = 7;
|
|
53
|
-
// sum of all the quantity_price will be total_price
|
|
54
|
-
double total_price = 8;
|
|
55
|
-
// shipping address
|
|
56
|
-
string shipping_contact_point_id = 9 [
|
|
57
|
-
(io.restorecommerce.options.resolver) = {
|
|
58
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
59
|
-
target_service: "resource",
|
|
60
|
-
target_sub_service: "contact_point",
|
|
61
|
-
target_method: "Read",
|
|
62
|
-
field_name: "shippingContactPoint",
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
string billing_contact_point_id = 10 [
|
|
66
|
-
(io.restorecommerce.options.resolver) = {
|
|
67
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
68
|
-
target_service: "resource",
|
|
69
|
-
target_sub_service: "contact_point",
|
|
70
|
-
target_method: "Read",
|
|
71
|
-
field_name: "billingContactPoint",
|
|
72
|
-
}
|
|
73
|
-
];
|
|
74
|
-
double total_weight_in_kg = 11;
|
|
23
|
+
rpc Submit (OrderList) returns (OrderListResponse);
|
|
24
|
+
rpc Cancel (CancelRequestList) returns (OrderListResponse);
|
|
25
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
26
|
+
rpc TriggerFulfillment (TriggerFulfillmentRequestList) returns (io.restorecommerce.status.Status);
|
|
75
27
|
}
|
|
76
28
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
29
|
+
enum State {
|
|
30
|
+
Undefined = 0;
|
|
31
|
+
Invalid = 1;
|
|
32
|
+
Failed = 2;
|
|
33
|
+
Cancelled = 3;
|
|
34
|
+
Created = 4;
|
|
35
|
+
Submitted = 5;
|
|
36
|
+
Shipping = 6;
|
|
37
|
+
Done = 7;
|
|
80
38
|
}
|
|
81
39
|
|
|
82
40
|
message Item {
|
|
@@ -91,56 +49,86 @@ message Item {
|
|
|
91
49
|
int32 quantity = 8;
|
|
92
50
|
int32 vat = 9;
|
|
93
51
|
double price = 10;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
int32
|
|
100
|
-
int32
|
|
52
|
+
double quantity_price = 11;
|
|
53
|
+
string item_type = 12;
|
|
54
|
+
double taric_code = 13;
|
|
55
|
+
string stock_keeping_unit = 14;
|
|
56
|
+
double weight_in_kg = 15;
|
|
57
|
+
int32 length_in_cm = 16;
|
|
58
|
+
int32 width_in_cm = 17;
|
|
59
|
+
int32 height_in_cm = 18;
|
|
101
60
|
}
|
|
102
61
|
|
|
103
|
-
|
|
62
|
+
/**
|
|
63
|
+
Database Entity
|
|
64
|
+
*/
|
|
65
|
+
message Order {
|
|
66
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
67
|
+
plural: "orders"
|
|
68
|
+
topic: "io.restorecommerce.orders.resource"
|
|
69
|
+
created: "orderCreated"
|
|
70
|
+
updated: "orderUpdated"
|
|
71
|
+
deleted: "orderDeleted"
|
|
72
|
+
};
|
|
73
|
+
|
|
104
74
|
string id = 1;
|
|
75
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
76
|
+
string name = 3;
|
|
77
|
+
string description = 4;
|
|
78
|
+
State state = 5;
|
|
79
|
+
string customer_reference = 6;
|
|
80
|
+
repeated Item items = 7;
|
|
81
|
+
double total_price = 8;
|
|
82
|
+
io.restorecommerce.address.Address shipping_address = 11;
|
|
83
|
+
io.restorecommerce.address.Address billing_address = 13;
|
|
84
|
+
string billing_email = 14;
|
|
85
|
+
io.restorecommerce.address.ContactPerson contact_person = 15;
|
|
86
|
+
string notification_email = 16;
|
|
87
|
+
repeated string fulfillment_ids = 17;
|
|
105
88
|
}
|
|
106
89
|
|
|
107
|
-
message
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
message ShippingDetails {
|
|
91
|
+
string export_type = 1;
|
|
92
|
+
string export_description = 2;
|
|
93
|
+
string invoice_number = 3;
|
|
94
|
+
io.restorecommerce.address.Address sender_address = 5;
|
|
95
|
+
io.restorecommerce.address.ContactPerson contact_person = 15;
|
|
110
96
|
}
|
|
111
97
|
|
|
112
|
-
message
|
|
113
|
-
|
|
114
|
-
|
|
98
|
+
message TriggerFulfillmentRequest {
|
|
99
|
+
Order order = 1;
|
|
100
|
+
ShippingDetails shipping_details = 2;
|
|
101
|
+
repeated io.restorecommerce.fulfillment.Parcel parcels = 3;
|
|
115
102
|
}
|
|
116
103
|
|
|
117
|
-
message
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
int32 amount = 3; // number of items
|
|
122
|
-
string export_type = 4;
|
|
123
|
-
string export_description = 5;
|
|
124
|
-
string customs_tariff_number = 6;
|
|
125
|
-
string invoice_number = 7;
|
|
126
|
-
double customs_value = 8;
|
|
104
|
+
message TriggerFulfillmentRequestList {
|
|
105
|
+
repeated TriggerFulfillmentRequest items = 1;
|
|
106
|
+
uint32 total_count = 2;
|
|
107
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
127
108
|
}
|
|
128
109
|
|
|
129
|
-
message
|
|
130
|
-
repeated
|
|
110
|
+
message OrderList {
|
|
111
|
+
repeated Order items = 1;
|
|
112
|
+
uint32 total_count = 2;
|
|
113
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
131
114
|
}
|
|
132
115
|
|
|
133
|
-
message
|
|
134
|
-
|
|
135
|
-
|
|
116
|
+
message OrderListResponse {
|
|
117
|
+
repeated OrderResponse items = 1;
|
|
118
|
+
uint32 total_count = 2;
|
|
119
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
136
120
|
}
|
|
137
121
|
|
|
138
|
-
message
|
|
139
|
-
|
|
140
|
-
|
|
122
|
+
message OrderResponse {
|
|
123
|
+
Order payload = 1;
|
|
124
|
+
io.restorecommerce.status.Status status = 2;
|
|
141
125
|
}
|
|
142
126
|
|
|
143
|
-
message
|
|
144
|
-
repeated string
|
|
145
|
-
|
|
127
|
+
message CancelRequestList {
|
|
128
|
+
repeated string ids = 1;
|
|
129
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
146
130
|
}
|
|
131
|
+
|
|
132
|
+
message Deleted {
|
|
133
|
+
string id = 1;
|
|
134
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/protos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.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": "
|
|
18
|
+
"gitHead": "64f3de896ab288cfa71e66aafe6e01ab3e37af26"
|
|
19
19
|
}
|