@restorecommerce/protos 4.0.0 → 4.1.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.
- package/CHANGELOG.md +27 -0
- package/io/restorecommerce/auth.proto +2 -1
- package/io/restorecommerce/code.proto +2 -2
- package/io/restorecommerce/currency.proto +3 -2
- package/io/restorecommerce/fulfillment.proto +9 -3
- package/io/restorecommerce/invoice.proto +35 -17
- package/io/restorecommerce/meta.proto +3 -2
- package/io/restorecommerce/order.proto +15 -8
- package/io/restorecommerce/product.proto +34 -8
- package/io/restorecommerce/status.proto +8 -8
- package/io/restorecommerce/user.proto +3 -3
- 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
|
+
# [4.1.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@4.0.1...@restorecommerce/protos@4.1.0) (2023-07-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **timestamps:** fix invoice date type by timestamp, add payment_details to invoice trigger request ([139ab69](https://github.com/restorecommerce/libs/commit/139ab69ba1d4739386ac2844d1e1f98c2046b98e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **invoicing:** invoicing supports FulfillmentProducts ([d0684cf](https://github.com/restorecommerce/libs/commit/d0684cf4773ecc2aa0f807bb8c4be1a21a62caab))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [4.0.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@4.0.0...@restorecommerce/protos@4.0.1) (2023-06-29)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **protos:** Make name, email and password mandatory for register request ([64165c1](https://github.com/restorecommerce/libs/commit/64165c1875fe1c9ccd319513671334b625dce20c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [4.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@3.1.2...@restorecommerce/protos@4.0.0) (2023-06-28)
|
|
7
34
|
|
|
8
35
|
|
|
@@ -2,6 +2,7 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package io.restorecommerce.auth;
|
|
4
4
|
import "io/restorecommerce/attribute.proto";
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Subject of creating User
|
|
@@ -33,7 +34,7 @@ message RoleAssociation {
|
|
|
33
34
|
optional string role = 1; // role ID
|
|
34
35
|
repeated io.restorecommerce.attribute.Attribute attributes = 2; // useful attributes for RBAC/ABAC like organizational scope
|
|
35
36
|
optional string id = 3; // identifier for role_association
|
|
36
|
-
optional
|
|
37
|
+
optional google.protobuf.Timestamp created = 4; // timestamp when the role was created
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
message HierarchicalScopesRequest {
|
|
@@ -38,7 +38,7 @@ message CodeResponse {
|
|
|
38
38
|
message Code {
|
|
39
39
|
optional string id = 1;
|
|
40
40
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
41
|
-
optional
|
|
41
|
+
optional StatusCode status = 3;
|
|
42
42
|
optional string common_code = 4;
|
|
43
43
|
optional string name = 5;
|
|
44
44
|
optional string description = 6;
|
|
@@ -51,7 +51,7 @@ message Code {
|
|
|
51
51
|
optional string quantity = 13;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
enum
|
|
54
|
+
enum StatusCode {
|
|
55
55
|
ADDED = 0;
|
|
56
56
|
CHANGED_NAME = 1;
|
|
57
57
|
CHANGED_CHARACTERISTIC = 2;
|
|
@@ -7,6 +7,7 @@ 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 "google/protobuf/timestamp.proto";
|
|
10
11
|
|
|
11
12
|
/*
|
|
12
13
|
* Microservice definition.
|
|
@@ -66,7 +67,7 @@ message ExchangeRate {
|
|
|
66
67
|
message ExchangeRateQuery {
|
|
67
68
|
optional string from_currency_id = 1;
|
|
68
69
|
optional string to_currency_id = 2;
|
|
69
|
-
optional
|
|
70
|
+
optional google.protobuf.Timestamp datetime = 3; // now in general case
|
|
70
71
|
optional double amount = 4; // leave empty == 1.0
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -79,7 +80,7 @@ message ExchangeRateQueryList {
|
|
|
79
80
|
message ExchangeRateResponse {
|
|
80
81
|
optional string from_currency_id = 1;
|
|
81
82
|
ExchangeRate payload = 3;
|
|
82
|
-
optional
|
|
83
|
+
optional google.protobuf.Timestamp timestamp = 2;
|
|
83
84
|
io.restorecommerce.status.Status status = 4;
|
|
84
85
|
}
|
|
85
86
|
|
|
@@ -14,6 +14,7 @@ import "io/restorecommerce/product.proto";
|
|
|
14
14
|
import "io/restorecommerce/options.proto";
|
|
15
15
|
import "io/restorecommerce/amount.proto";
|
|
16
16
|
import "io/restorecommerce/invoice.proto";
|
|
17
|
+
import "google/protobuf/timestamp.proto";
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
Microservice definition.
|
|
@@ -141,7 +142,7 @@ message Packaging {
|
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
message Event {
|
|
144
|
-
optional
|
|
145
|
+
optional google.protobuf.Timestamp timestamp = 1;
|
|
145
146
|
optional string location = 2;
|
|
146
147
|
optional google.protobuf.Any details = 3;
|
|
147
148
|
optional io.restorecommerce.status.Status status = 4;
|
|
@@ -209,10 +210,15 @@ message Deleted {
|
|
|
209
210
|
string id = 1;
|
|
210
211
|
}
|
|
211
212
|
|
|
213
|
+
message InvoiceSection {
|
|
214
|
+
optional string fulfillment_id = 1;
|
|
215
|
+
repeated string selected_parcels = 2; // selects all on empty
|
|
216
|
+
}
|
|
217
|
+
|
|
212
218
|
message InvoiceRequest {
|
|
213
219
|
optional string invoice_number = 1; // if given
|
|
214
|
-
|
|
215
|
-
repeated
|
|
220
|
+
repeated string payment_hints = 2;
|
|
221
|
+
repeated InvoiceSection sections = 3;
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
message InvoiceRequestList {
|
|
@@ -14,11 +14,14 @@ import "io/restorecommerce/amount.proto";
|
|
|
14
14
|
import "io/restorecommerce/price.proto";
|
|
15
15
|
import "io/restorecommerce/file.proto";
|
|
16
16
|
import "io/restorecommerce/reference.proto";
|
|
17
|
+
import "io/restorecommerce/attribute.proto";
|
|
17
18
|
|
|
18
19
|
// Used by resolvers
|
|
19
20
|
import "io/restorecommerce/user.proto";
|
|
20
21
|
import "io/restorecommerce/customer.proto";
|
|
21
22
|
import "io/restorecommerce/shop.proto";
|
|
23
|
+
import "google/protobuf/timestamp.proto";
|
|
24
|
+
import "io/restorecommerce/product.proto";
|
|
22
25
|
|
|
23
26
|
/*
|
|
24
27
|
* Microservice definition.
|
|
@@ -33,7 +36,7 @@ service InvoiceService {
|
|
|
33
36
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
34
37
|
|
|
35
38
|
/*
|
|
36
|
-
*
|
|
39
|
+
* Evaluates and (re-)Renders invoices as PDF to ostorage. (creates if not exist, updates if id is given)
|
|
37
40
|
*/
|
|
38
41
|
rpc Render (InvoiceList) returns (InvoiceListResponse);
|
|
39
42
|
|
|
@@ -145,37 +148,39 @@ message Invoice {
|
|
|
145
148
|
field_name: "shop",
|
|
146
149
|
}
|
|
147
150
|
]; // shop_number --- ref. to sender orga
|
|
148
|
-
optional
|
|
151
|
+
optional google.protobuf.Timestamp timestamp = 8;
|
|
149
152
|
optional PaymentState payment_state = 9;
|
|
150
153
|
optional io.restorecommerce.address.BillingAddress sender = 10;
|
|
151
154
|
optional io.restorecommerce.address.BillingAddress recipient = 11;
|
|
152
|
-
repeated
|
|
155
|
+
repeated Section sections = 12;
|
|
153
156
|
repeated io.restorecommerce.amount.Amount total_amounts = 13;
|
|
154
|
-
repeated string payment_hints = 14;
|
|
157
|
+
repeated string payment_hints = 14;
|
|
155
158
|
repeated io.restorecommerce.file.File documents = 15; // url to rendered PDFs
|
|
156
|
-
optional
|
|
157
|
-
optional
|
|
158
|
-
optional
|
|
159
|
-
optional bool
|
|
160
|
-
optional bool withdrawn = 20;
|
|
159
|
+
optional google.protobuf.Timestamp from_date = 16; // value performance from date
|
|
160
|
+
optional google.protobuf.Timestamp to_date = 17; // value performance to date
|
|
161
|
+
optional bool sent = 18;
|
|
162
|
+
optional bool withdrawn = 19;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
|
-
message
|
|
165
|
+
message Section {
|
|
164
166
|
optional string id = 1;
|
|
165
|
-
|
|
167
|
+
optional string customer_remark = 2;
|
|
168
|
+
repeated Position positions = 3;
|
|
166
169
|
repeated io.restorecommerce.amount.Amount amounts = 5; // repeated in case of multiple currencies?
|
|
167
170
|
}
|
|
168
171
|
|
|
169
|
-
message
|
|
172
|
+
message Position {
|
|
170
173
|
optional string id = 1;
|
|
171
174
|
oneof item_type {
|
|
172
175
|
ProductItem product_item = 2;
|
|
173
|
-
|
|
176
|
+
FulfillmentItem fultillment_item = 3;
|
|
177
|
+
ManualItem manual_item = 4;
|
|
174
178
|
}
|
|
175
|
-
optional io.restorecommerce.price.Price unit_price =
|
|
176
|
-
optional uint32 quantity =
|
|
177
|
-
optional io.restorecommerce.amount.Amount amount =
|
|
178
|
-
optional double contract_start_date =
|
|
179
|
+
optional io.restorecommerce.price.Price unit_price = 5;
|
|
180
|
+
optional uint32 quantity = 6;
|
|
181
|
+
optional io.restorecommerce.amount.Amount amount = 7;
|
|
182
|
+
optional double contract_start_date = 8; // if there is any contract associated with product
|
|
183
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 9;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
message ProductItem {
|
|
@@ -191,6 +196,19 @@ message ProductItem {
|
|
|
191
196
|
optional string variant_id = 2;
|
|
192
197
|
}
|
|
193
198
|
|
|
199
|
+
message FulfillmentItem {
|
|
200
|
+
optional string product_id = 1 [
|
|
201
|
+
(io.restorecommerce.options.resolver) = {
|
|
202
|
+
target_type: ".io.restorecommerce.fulfillment_product.FulfillmentProduct",
|
|
203
|
+
target_service: "fulfillment",
|
|
204
|
+
target_sub_service: "fulfillment_product",
|
|
205
|
+
target_method: "Read",
|
|
206
|
+
field_name: "product",
|
|
207
|
+
}
|
|
208
|
+
];
|
|
209
|
+
optional string variant_id = 2;
|
|
210
|
+
}
|
|
211
|
+
|
|
194
212
|
message ManualItem {
|
|
195
213
|
optional string stock_keeping_unit = 1;
|
|
196
214
|
optional string name = 2;
|
|
@@ -3,12 +3,13 @@ syntax = "proto3";
|
|
|
3
3
|
package io.restorecommerce.meta;
|
|
4
4
|
|
|
5
5
|
import "io/restorecommerce/attribute.proto";
|
|
6
|
+
import "google/protobuf/timestamp.proto";
|
|
6
7
|
|
|
7
8
|
// meta properties common to all resources
|
|
8
9
|
|
|
9
10
|
message Meta {
|
|
10
|
-
optional
|
|
11
|
-
optional
|
|
11
|
+
optional google.protobuf.Timestamp created = 1; // timestamp
|
|
12
|
+
optional google.protobuf.Timestamp modified = 2; // timestamp
|
|
12
13
|
optional string modified_by = 3; // ID from last User who modified it
|
|
13
14
|
repeated io.restorecommerce.attribute.Attribute owners = 4;
|
|
14
15
|
repeated io.restorecommerce.attribute.AttributeObj acls = 5;
|
|
@@ -47,7 +47,7 @@ service OrderService {
|
|
|
47
47
|
rpc TriggerInvoice (InvoiceRequestList) returns (io.restorecommerce.status.StatusListResponse);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
enum
|
|
50
|
+
enum OrderState {
|
|
51
51
|
FAILED = 0;
|
|
52
52
|
INVALID = 1;
|
|
53
53
|
CREATED = 2;
|
|
@@ -58,6 +58,11 @@ enum State {
|
|
|
58
58
|
CANCELLED = 7;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
enum FulfillmentInvoiceMode {
|
|
62
|
+
INCLUDE = 0;
|
|
63
|
+
EXCLUDE = 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
61
66
|
message Item {
|
|
62
67
|
optional string id = 1;
|
|
63
68
|
optional string product_id = 2 [
|
|
@@ -117,7 +122,7 @@ message Order {
|
|
|
117
122
|
}
|
|
118
123
|
];
|
|
119
124
|
repeated Item items = 6;
|
|
120
|
-
optional
|
|
125
|
+
optional OrderState order_state = 7; // Set by service
|
|
121
126
|
optional io.restorecommerce.fulfillment.State fulfillment_state = 8; // Set by kafka
|
|
122
127
|
optional io.restorecommerce.invoice.PaymentState payment_state = 9; // Set by kafka
|
|
123
128
|
repeated io.restorecommerce.amount.Amount total_amounts = 10; // Set by service --- repeated in case of variant currency?
|
|
@@ -161,7 +166,7 @@ message FulfillmentRequest {
|
|
|
161
166
|
optional string export_description = 3; // @TODO: not used!
|
|
162
167
|
optional string invoice_number = 4; // @TODO: not used!
|
|
163
168
|
optional io.restorecommerce.address.ShippingAddress sender_address = 5;
|
|
164
|
-
repeated string
|
|
169
|
+
repeated string selected_items = 6; // select all on empty
|
|
165
170
|
google.protobuf.Any data = 7;
|
|
166
171
|
}
|
|
167
172
|
|
|
@@ -171,15 +176,17 @@ message FulfillmentRequestList {
|
|
|
171
176
|
io.restorecommerce.auth.Subject subject = 3;
|
|
172
177
|
}
|
|
173
178
|
|
|
174
|
-
message
|
|
175
|
-
optional string order_id =
|
|
176
|
-
repeated string
|
|
177
|
-
|
|
179
|
+
message InvoiceSection {
|
|
180
|
+
optional string order_id = 1;
|
|
181
|
+
repeated string selected_items = 2; // select all on empty
|
|
182
|
+
optional FulfillmentInvoiceMode fulfillment_mode = 3;
|
|
183
|
+
repeated io.restorecommerce.fulfillment.InvoiceSection selected_fulfillments = 4; // includes all on empty
|
|
178
184
|
}
|
|
179
185
|
|
|
180
186
|
message InvoiceRequest {
|
|
181
187
|
optional string invoice_number = 1; // if given
|
|
182
|
-
repeated
|
|
188
|
+
repeated string payment_hints = 2;
|
|
189
|
+
repeated InvoiceSection sections = 3;
|
|
183
190
|
}
|
|
184
191
|
|
|
185
192
|
message InvoiceRequestList {
|
|
@@ -91,9 +91,18 @@ message IndividualProduct {
|
|
|
91
91
|
field_name: "manufacturer",
|
|
92
92
|
}
|
|
93
93
|
];
|
|
94
|
-
optional string
|
|
94
|
+
optional string origin_country_id = 4 [
|
|
95
|
+
(io.restorecommerce.options.resolver) = {
|
|
96
|
+
target_type: ".io.restorecommerce.country.Country",
|
|
97
|
+
target_service: "master_data",
|
|
98
|
+
target_sub_service: "country",
|
|
99
|
+
target_method: "Read",
|
|
100
|
+
field_name: "origin_country",
|
|
101
|
+
}
|
|
102
|
+
];
|
|
103
|
+
optional string taric_code = 5;
|
|
95
104
|
oneof classification {
|
|
96
|
-
string prototype_id =
|
|
105
|
+
string prototype_id = 6 [
|
|
97
106
|
(io.restorecommerce.options.resolver) = {
|
|
98
107
|
target_type: ".io.restorecommerce.product_prototype.ProductPrototype",
|
|
99
108
|
target_service: "catalog",
|
|
@@ -102,7 +111,7 @@ message IndividualProduct {
|
|
|
102
111
|
field_name: "prototype",
|
|
103
112
|
}
|
|
104
113
|
];
|
|
105
|
-
string category_id =
|
|
114
|
+
string category_id = 7 [
|
|
106
115
|
(io.restorecommerce.options.resolver) = {
|
|
107
116
|
target_type: ".io.restorecommerce.product_category.ProductCategory",
|
|
108
117
|
target_service: "catalog",
|
|
@@ -112,12 +121,12 @@ message IndividualProduct {
|
|
|
112
121
|
}
|
|
113
122
|
];
|
|
114
123
|
}
|
|
115
|
-
repeated string tax_ids =
|
|
116
|
-
optional string
|
|
117
|
-
optional string gtin = 9;
|
|
124
|
+
repeated string tax_ids = 8;
|
|
125
|
+
optional string gtin = 10;
|
|
118
126
|
oneof nature {
|
|
119
|
-
PhysicalProduct physical =
|
|
120
|
-
|
|
127
|
+
PhysicalProduct physical = 11;
|
|
128
|
+
ServiceProduct service = 12;
|
|
129
|
+
VirtualProduct virtual = 13;
|
|
121
130
|
};
|
|
122
131
|
}
|
|
123
132
|
|
|
@@ -125,6 +134,10 @@ message PhysicalProduct {
|
|
|
125
134
|
repeated PhysicalVariant variants = 1;
|
|
126
135
|
}
|
|
127
136
|
|
|
137
|
+
message ServiceProduct {
|
|
138
|
+
repeated ServiceVariant variants = 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
128
141
|
message VirtualProduct {
|
|
129
142
|
repeated VirtualVariant variants = 1;
|
|
130
143
|
}
|
|
@@ -166,6 +179,19 @@ message PhysicalVariant {
|
|
|
166
179
|
repeated io.restorecommerce.attribute.Attribute attributes = 11;
|
|
167
180
|
}
|
|
168
181
|
|
|
182
|
+
message ServiceVariant {
|
|
183
|
+
optional string id = 1;
|
|
184
|
+
optional string name = 2;
|
|
185
|
+
optional string description = 3;
|
|
186
|
+
optional int32 stock_level = 4;
|
|
187
|
+
optional io.restorecommerce.price.Price price = 5;
|
|
188
|
+
repeated io.restorecommerce.image.Image images = 6;
|
|
189
|
+
repeated io.restorecommerce.file.File files = 7;
|
|
190
|
+
optional string stock_keeping_unit = 8;
|
|
191
|
+
optional string template_variant = 9;
|
|
192
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 10;
|
|
193
|
+
}
|
|
194
|
+
|
|
169
195
|
message VirtualVariant {
|
|
170
196
|
optional string id = 1;
|
|
171
197
|
optional string name = 2;
|
|
@@ -3,9 +3,9 @@ syntax = "proto3";
|
|
|
3
3
|
package io.restorecommerce.status;
|
|
4
4
|
|
|
5
5
|
message Status {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
string id = 1;
|
|
7
|
+
uint32 code = 2;
|
|
8
|
+
string message = 3;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
message StatusArray {
|
|
@@ -13,19 +13,19 @@ message StatusArray {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
message StatusObj {
|
|
16
|
-
|
|
16
|
+
Status status = 1;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
message OperationStatusObj {
|
|
20
|
-
|
|
20
|
+
OperationStatus operation_status = 1;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
message OperationStatus {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
uint32 code = 1;
|
|
25
|
+
string message = 2;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
message StatusListResponse {
|
|
29
29
|
repeated Status status = 1;
|
|
30
|
-
|
|
30
|
+
OperationStatus operation_status = 2;
|
|
31
31
|
}
|
|
@@ -94,11 +94,11 @@ message RegisterRequest {
|
|
|
94
94
|
optional string id = 1;
|
|
95
95
|
optional bool guest = 2;
|
|
96
96
|
optional io.restorecommerce.meta.Meta meta = 3;
|
|
97
|
-
|
|
97
|
+
string name = 4;
|
|
98
98
|
optional string first_name = 5;
|
|
99
99
|
optional string last_name = 6;
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
string email = 7;
|
|
101
|
+
string password = 8;
|
|
102
102
|
optional string timezone_id = 9;
|
|
103
103
|
optional string locale_id = 10;
|
|
104
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/protos",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
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": "7619c89c883143a16d1244e371c1a66e75d0890e"
|
|
19
19
|
}
|