@restorecommerce/protos 3.1.2 → 4.0.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 +32 -0
- package/io/restorecommerce/address.proto +6 -0
- package/io/restorecommerce/amount.proto +36 -0
- package/io/restorecommerce/contact_point.proto +3 -1
- package/io/restorecommerce/currency.proto +89 -0
- package/io/restorecommerce/customer.proto +15 -44
- package/io/restorecommerce/file.proto +3 -0
- package/io/restorecommerce/fulfillment.proto +47 -22
- package/io/restorecommerce/fulfillment_product.proto +17 -12
- package/io/restorecommerce/invoice.proto +129 -82
- package/io/restorecommerce/notification_req.proto +2 -0
- package/io/restorecommerce/order.proto +101 -39
- package/io/restorecommerce/organization.proto +12 -21
- package/io/restorecommerce/price.proto +32 -0
- package/io/restorecommerce/product.proto +33 -26
- package/io/restorecommerce/product_prototype.proto +12 -1
- package/io/restorecommerce/reference.proto +8 -0
- package/io/restorecommerce/resource_base.proto +2 -2
- package/io/restorecommerce/shop.proto +63 -0
- package/io/restorecommerce/tax.proto +0 -5
- package/io/restorecommerce/tax_type.proto +0 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
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.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@3.1.2...@restorecommerce/protos@4.0.0) (2023-06-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* correct protos, facade calls, apollo route ([ff52c38](https://github.com/restorecommerce/libs/commit/ff52c38ee4e6c6236747d6921361b5e4131384a2))
|
|
12
|
+
* **fix orga:** fix numbers in orga ([72c3885](https://github.com/restorecommerce/libs/commit/72c3885938fb5311222e3d75c64d45d25925e289))
|
|
13
|
+
* **fulfillment.proto:** use Price everywhere ([c2a2cb5](https://github.com/restorecommerce/libs/commit/c2a2cb57cb84eac9e046413fc5f41dec7efc1132))
|
|
14
|
+
* **fulfillment:** fix type errors ([615ab2c](https://github.com/restorecommerce/libs/commit/615ab2cf738708d8dffd20343ebf0953a0da7a78))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **currency.proto:** add currency proto, update invoice.proto ([988d161](https://github.com/restorecommerce/libs/commit/988d161913d01fc88d383810a2bd963e9c75a2f8))
|
|
20
|
+
* **invoice.proto:** adjust invoice.proto to ordering-srv and fulfillment-srv ([71ee108](https://github.com/restorecommerce/libs/commit/71ee1088eec9fc54b61ab189e988504180687902))
|
|
21
|
+
* **invoice:** support multiple orders and fulfillments per invoice ([e2092a0](https://github.com/restorecommerce/libs/commit/e2092a081d886722fc7112a760b9a3a3fa434519))
|
|
22
|
+
* **shop.proto:** add shop.proto, remove double addresses and more ([a872677](https://github.com/restorecommerce/libs/commit/a8726777447cf443809f3d7eba7d808e7339bbba))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### BREAKING CHANGES
|
|
26
|
+
|
|
27
|
+
* **invoice:** invoice has repeated references
|
|
28
|
+
* **fulfillment.proto:** ordering, fulfillment, invoice
|
|
29
|
+
* **currency.proto:** Significant changes in Invoice
|
|
30
|
+
* **invoice.proto:** The invoicing-srv must be refactored!
|
|
31
|
+
* **shop.proto:** significant changes in product.proto, order, organization, invoice, tax_type,
|
|
32
|
+
fulfillment, customer, contact_point
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [3.1.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@3.1.1...@restorecommerce/protos@3.1.2) (2023-06-16)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @restorecommerce/protos
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.amount;
|
|
4
|
+
|
|
5
|
+
// Used by resolvers
|
|
6
|
+
import "io/restorecommerce/options.proto";
|
|
7
|
+
import "io/restorecommerce/tax.proto";
|
|
8
|
+
import "io/restorecommerce/currency.proto";
|
|
9
|
+
|
|
10
|
+
message VAT {
|
|
11
|
+
optional string tax_id = 1 [
|
|
12
|
+
(io.restorecommerce.options.resolver) = {
|
|
13
|
+
target_type: ".io.restorecommerce.tax.Tax",
|
|
14
|
+
target_service: "master_data",
|
|
15
|
+
target_sub_service: "tax",
|
|
16
|
+
target_method: "Read",
|
|
17
|
+
field_name: "tax",
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
optional double vat = 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message Amount {
|
|
24
|
+
optional string currency_id = 1 [
|
|
25
|
+
(io.restorecommerce.options.resolver) = {
|
|
26
|
+
target_type: ".io.restorecommerce.currency.Currency",
|
|
27
|
+
target_service: "master_data",
|
|
28
|
+
target_sub_service: "currency",
|
|
29
|
+
target_method: "Read",
|
|
30
|
+
field_name: "currency",
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
optional double gross = 2;
|
|
34
|
+
optional double net = 3;
|
|
35
|
+
repeated VAT vats = 4;
|
|
36
|
+
}
|
|
@@ -59,7 +59,7 @@ message ContactPoint {
|
|
|
59
59
|
];
|
|
60
60
|
optional string website = 5;
|
|
61
61
|
optional string email = 6;
|
|
62
|
-
|
|
62
|
+
repeated string contact_point_type_ids = 7 [
|
|
63
63
|
(io.restorecommerce.options.resolver) = {
|
|
64
64
|
target_type: ".io.restorecommerce.contact_point_type.ContactPointType",
|
|
65
65
|
target_service: "master_data",
|
|
@@ -87,4 +87,6 @@ message ContactPoint {
|
|
|
87
87
|
field_name: "locale",
|
|
88
88
|
}
|
|
89
89
|
];
|
|
90
|
+
optional string name = 11;
|
|
91
|
+
optional string description = 12;
|
|
90
92
|
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.currency;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/auth.proto";
|
|
8
|
+
import "io/restorecommerce/status.proto";
|
|
9
|
+
import "io/restorecommerce/options.proto";
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Microservice definition.
|
|
13
|
+
*/
|
|
14
|
+
service CurrencyService {
|
|
15
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CurrencyListResponse) {
|
|
16
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
17
|
+
};
|
|
18
|
+
rpc Create (CurrencyList) returns (CurrencyListResponse);
|
|
19
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
20
|
+
rpc Update (CurrencyList) returns (CurrencyListResponse);
|
|
21
|
+
rpc Upsert (CurrencyList) returns (CurrencyListResponse);
|
|
22
|
+
rpc QueryExchangeRate (ExchangeRateQueryList) returns (ExchangeRateListResponse);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message Deleted {
|
|
26
|
+
string id = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message CurrencyList {
|
|
30
|
+
repeated Currency items = 1;
|
|
31
|
+
optional uint32 total_count = 2;
|
|
32
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message CurrencyListResponse {
|
|
36
|
+
repeated CurrencyResponse items = 1;
|
|
37
|
+
uint32 total_count = 2;
|
|
38
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message CurrencyResponse {
|
|
42
|
+
Currency payload = 1;
|
|
43
|
+
io.restorecommerce.status.Status status = 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message Currency {
|
|
47
|
+
optional string id = 1;
|
|
48
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
49
|
+
optional string name = 3;
|
|
50
|
+
optional string symbol = 4;
|
|
51
|
+
optional string country_id = 5;
|
|
52
|
+
/*
|
|
53
|
+
* For custom exchange rates beyond market.
|
|
54
|
+
* Regular rates are retrived from API by calling QueryExchangeRate.
|
|
55
|
+
*/
|
|
56
|
+
repeated ExchangeRate custom_exchange_rates = 6;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message ExchangeRate {
|
|
60
|
+
optional string to_currency_id = 1;
|
|
61
|
+
optional double rate = 3;
|
|
62
|
+
optional double expenses = 4; //fees
|
|
63
|
+
optional double amount = 5; // leave empty == 1.0
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message ExchangeRateQuery {
|
|
67
|
+
optional string from_currency_id = 1;
|
|
68
|
+
optional string to_currency_id = 2;
|
|
69
|
+
optional double datetime = 3; // now in general case
|
|
70
|
+
optional double amount = 4; // leave empty == 1.0
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message ExchangeRateQueryList {
|
|
74
|
+
repeated ExchangeRate items = 1;
|
|
75
|
+
optional uint32 total_count = 2;
|
|
76
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message ExchangeRateResponse {
|
|
80
|
+
optional string from_currency_id = 1;
|
|
81
|
+
ExchangeRate payload = 3;
|
|
82
|
+
optional double timestamp = 2;
|
|
83
|
+
io.restorecommerce.status.Status status = 4;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message ExchangeRateListResponse {
|
|
87
|
+
repeated ExchangeRateResponse items = 1;
|
|
88
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
89
|
+
}
|
|
@@ -10,7 +10,6 @@ import "io/restorecommerce/options.proto";
|
|
|
10
10
|
|
|
11
11
|
// Used by resolvers
|
|
12
12
|
import "io/restorecommerce/user.proto";
|
|
13
|
-
import "io/restorecommerce/address.proto";
|
|
14
13
|
import "io/restorecommerce/contact_point.proto";
|
|
15
14
|
import "io/restorecommerce/organization.proto";
|
|
16
15
|
|
|
@@ -47,14 +46,14 @@ message CustomerResponse {
|
|
|
47
46
|
message Customer {
|
|
48
47
|
optional string id = 1;
|
|
49
48
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
50
|
-
oneof
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
49
|
+
oneof type {
|
|
50
|
+
Private private = 3;
|
|
51
|
+
Commercial commercial = 4;
|
|
52
|
+
PublicSector public_sector = 5;
|
|
53
|
+
};
|
|
55
54
|
}
|
|
56
55
|
|
|
57
|
-
message
|
|
56
|
+
message Private {
|
|
58
57
|
optional string user_id = 1 [
|
|
59
58
|
(io.restorecommerce.options.resolver) = {
|
|
60
59
|
target_type: ".io.restorecommerce.user.User",
|
|
@@ -64,16 +63,7 @@ message IndividualUser {
|
|
|
64
63
|
field_name: "user",
|
|
65
64
|
}
|
|
66
65
|
];
|
|
67
|
-
|
|
68
|
-
(io.restorecommerce.options.resolver) = {
|
|
69
|
-
target_type: ".io.restorecommerce.address.Address",
|
|
70
|
-
target_service: "master_data",
|
|
71
|
-
target_sub_service: "address",
|
|
72
|
-
target_method: "Read",
|
|
73
|
-
field_name: "address",
|
|
74
|
-
}
|
|
75
|
-
];
|
|
76
|
-
repeated string contact_point_ids = 3 [
|
|
66
|
+
repeated string contact_point_ids = 2 [
|
|
77
67
|
(io.restorecommerce.options.resolver) = {
|
|
78
68
|
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
79
69
|
target_service: "master_data",
|
|
@@ -84,17 +74,8 @@ message IndividualUser {
|
|
|
84
74
|
];
|
|
85
75
|
}
|
|
86
76
|
|
|
87
|
-
message
|
|
88
|
-
optional string
|
|
89
|
-
(io.restorecommerce.options.resolver) = {
|
|
90
|
-
target_type: ".io.restorecommerce.user.User",
|
|
91
|
-
target_service: "identity",
|
|
92
|
-
target_sub_service: "user",
|
|
93
|
-
target_method: "Read",
|
|
94
|
-
field_name: "user",
|
|
95
|
-
}
|
|
96
|
-
];
|
|
97
|
-
optional string organization_id = 2 [
|
|
77
|
+
message Commercial {
|
|
78
|
+
optional string organization_id = 1 [
|
|
98
79
|
(io.restorecommerce.options.resolver) = {
|
|
99
80
|
target_type: ".io.restorecommerce.organization.Organization",
|
|
100
81
|
target_service: "master_data",
|
|
@@ -105,24 +86,14 @@ message OrgUser {
|
|
|
105
86
|
];
|
|
106
87
|
}
|
|
107
88
|
|
|
108
|
-
message
|
|
109
|
-
|
|
110
|
-
optional string address_id = 2 [
|
|
89
|
+
message PublicSector {
|
|
90
|
+
optional string organization_id = 1 [
|
|
111
91
|
(io.restorecommerce.options.resolver) = {
|
|
112
|
-
target_type: ".io.restorecommerce.
|
|
113
|
-
target_service: "master_data",
|
|
114
|
-
target_sub_service: "address",
|
|
115
|
-
target_method: "Read",
|
|
116
|
-
field_name: "address",
|
|
117
|
-
}
|
|
118
|
-
];
|
|
119
|
-
repeated string contact_point_ids = 3 [
|
|
120
|
-
(io.restorecommerce.options.resolver) = {
|
|
121
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
92
|
+
target_type: ".io.restorecommerce.organization.Organization",
|
|
122
93
|
target_service: "master_data",
|
|
123
|
-
target_sub_service: "
|
|
94
|
+
target_sub_service: "organization",
|
|
124
95
|
target_method: "Read",
|
|
125
|
-
field_name: "
|
|
96
|
+
field_name: "organization",
|
|
126
97
|
}
|
|
127
98
|
];
|
|
128
|
-
}
|
|
99
|
+
}
|
|
@@ -2,6 +2,8 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package io.restorecommerce.file;
|
|
4
4
|
|
|
5
|
+
import "io/restorecommerce/image.proto";
|
|
6
|
+
|
|
5
7
|
message File {
|
|
6
8
|
optional string id = 1;
|
|
7
9
|
optional int64 index = 2;
|
|
@@ -11,6 +13,7 @@ message File {
|
|
|
11
13
|
optional string url = 6;
|
|
12
14
|
optional int64 bytes = 7;
|
|
13
15
|
repeated string tags = 8;
|
|
16
|
+
optional io.restorecommerce.image.Image thumbnail = 9;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
message FileList {
|
|
@@ -3,6 +3,7 @@ syntax = "proto3";
|
|
|
3
3
|
package io.restorecommerce.fulfillment;
|
|
4
4
|
|
|
5
5
|
import "google/protobuf/any.proto";
|
|
6
|
+
import "io/restorecommerce/reference.proto";
|
|
6
7
|
import "io/restorecommerce/resource_base.proto";
|
|
7
8
|
import "io/restorecommerce/auth.proto";
|
|
8
9
|
import "io/restorecommerce/status.proto";
|
|
@@ -11,7 +12,8 @@ import "io/restorecommerce/address.proto";
|
|
|
11
12
|
import "io/restorecommerce/country.proto";
|
|
12
13
|
import "io/restorecommerce/product.proto";
|
|
13
14
|
import "io/restorecommerce/options.proto";
|
|
14
|
-
import "io/restorecommerce/
|
|
15
|
+
import "io/restorecommerce/amount.proto";
|
|
16
|
+
import "io/restorecommerce/invoice.proto";
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
Microservice definition.
|
|
@@ -68,20 +70,30 @@ service FulfillmentService {
|
|
|
68
70
|
Delete a batch of fulfillments from the database
|
|
69
71
|
*/
|
|
70
72
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
Requires Invoice Service
|
|
76
|
+
*/
|
|
77
|
+
rpc CreateInvoice (InvoiceRequestList) returns (io.restorecommerce.invoice.InvoiceListResponse);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
Requires Invoice Service
|
|
81
|
+
*/
|
|
82
|
+
rpc TriggerInvoice (InvoiceRequestList) returns (io.restorecommerce.status.StatusListResponse);
|
|
71
83
|
}
|
|
72
84
|
|
|
73
85
|
enum State {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
FAILED = 0;
|
|
87
|
+
INVALID = 1;
|
|
88
|
+
CREATED = 2;
|
|
89
|
+
SUBMITTED = 3;
|
|
90
|
+
IN_TRANSIT = 4;
|
|
91
|
+
FULFILLED = 5;
|
|
92
|
+
WITHDRAWN = 6;
|
|
93
|
+
CANCELLED = 7;
|
|
82
94
|
}
|
|
83
95
|
|
|
84
|
-
message
|
|
96
|
+
message Item {
|
|
85
97
|
optional string product_id = 1;
|
|
86
98
|
optional string variant_id = 2;
|
|
87
99
|
optional int32 quantity = 3;
|
|
@@ -100,10 +112,9 @@ message Parcel {
|
|
|
100
112
|
}
|
|
101
113
|
];
|
|
102
114
|
optional string variant_id = 3;
|
|
103
|
-
optional
|
|
104
|
-
optional
|
|
105
|
-
|
|
106
|
-
optional io.restorecommerce.product.Package package = 7;
|
|
115
|
+
optional Item item = 4;
|
|
116
|
+
optional io.restorecommerce.amount.Amount amount = 5;
|
|
117
|
+
optional io.restorecommerce.product.Package package = 6;
|
|
107
118
|
}
|
|
108
119
|
|
|
109
120
|
message Label {
|
|
@@ -119,11 +130,14 @@ message Label {
|
|
|
119
130
|
}
|
|
120
131
|
|
|
121
132
|
message Packaging {
|
|
122
|
-
optional
|
|
133
|
+
optional io.restorecommerce.reference.Reference reference = 1;
|
|
123
134
|
repeated Parcel parcels = 2;
|
|
124
135
|
optional io.restorecommerce.address.ShippingAddress sender = 3;
|
|
125
|
-
optional io.restorecommerce.address.ShippingAddress
|
|
136
|
+
optional io.restorecommerce.address.ShippingAddress recipient = 4;
|
|
126
137
|
optional string notify = 5;
|
|
138
|
+
optional string export_type = 6;
|
|
139
|
+
optional string export_description = 7;
|
|
140
|
+
optional string invoice_number = 8;
|
|
127
141
|
}
|
|
128
142
|
|
|
129
143
|
message Event {
|
|
@@ -153,13 +167,12 @@ message Fulfillment {
|
|
|
153
167
|
};
|
|
154
168
|
|
|
155
169
|
optional string id = 1;
|
|
156
|
-
optional Packaging packaging = 2; //
|
|
170
|
+
optional Packaging packaging = 2; //set by user
|
|
157
171
|
optional io.restorecommerce.meta.Meta meta = 3;
|
|
158
|
-
repeated Label labels = 4; //
|
|
159
|
-
repeated Tracking trackings = 5; //
|
|
160
|
-
|
|
161
|
-
optional
|
|
162
|
-
optional double total_vat = 8;
|
|
172
|
+
repeated Label labels = 4; //set by service
|
|
173
|
+
repeated Tracking trackings = 5; //set by service
|
|
174
|
+
repeated io.restorecommerce.amount.Amount total_amounts = 6; //set by service
|
|
175
|
+
optional State state = 8; //set by service
|
|
163
176
|
}
|
|
164
177
|
|
|
165
178
|
message FulfillmentList {
|
|
@@ -194,4 +207,16 @@ message FulfillmentIdList {
|
|
|
194
207
|
|
|
195
208
|
message Deleted {
|
|
196
209
|
string id = 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
message InvoiceRequest {
|
|
213
|
+
optional string invoice_number = 1; // if given
|
|
214
|
+
optional string fulfillment_id = 2;
|
|
215
|
+
repeated string included_parcels = 3; // includes all on empty
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
message InvoiceRequestList {
|
|
219
|
+
repeated InvoiceRequest items = 1;
|
|
220
|
+
optional uint32 total_count = 2;
|
|
221
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
197
222
|
}
|
|
@@ -2,13 +2,15 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package io.restorecommerce.fulfillment_product;
|
|
4
4
|
|
|
5
|
+
import "io/restorecommerce/reference.proto";
|
|
5
6
|
import "io/restorecommerce/resource_base.proto";
|
|
6
7
|
import "io/restorecommerce/meta.proto";
|
|
7
8
|
import "io/restorecommerce/auth.proto";
|
|
8
9
|
import "io/restorecommerce/status.proto";
|
|
9
10
|
import "io/restorecommerce/attribute.proto";
|
|
10
11
|
import "io/restorecommerce/address.proto";
|
|
11
|
-
import "io/restorecommerce/
|
|
12
|
+
import "io/restorecommerce/amount.proto";
|
|
13
|
+
import "io/restorecommerce/price.proto";
|
|
12
14
|
import "io/restorecommerce/geometry.proto";
|
|
13
15
|
import "io/restorecommerce/fulfillment_courier.proto";
|
|
14
16
|
import "io/restorecommerce/fulfillment.proto";
|
|
@@ -39,8 +41,12 @@ message Preferences {
|
|
|
39
41
|
message ProductQuery {
|
|
40
42
|
optional io.restorecommerce.address.ShippingAddress sender = 1;
|
|
41
43
|
optional io.restorecommerce.address.ShippingAddress receiver = 2;
|
|
42
|
-
repeated io.restorecommerce.fulfillment.
|
|
44
|
+
repeated io.restorecommerce.fulfillment.Item items = 3;
|
|
43
45
|
optional Preferences preferences = 4;
|
|
46
|
+
/*
|
|
47
|
+
* A forigner_key using the following pattern: `${collection}/${id}`
|
|
48
|
+
* most likly an order_id or fulfillment_id.
|
|
49
|
+
*/
|
|
44
50
|
optional string reference_id = 5;
|
|
45
51
|
}
|
|
46
52
|
|
|
@@ -65,25 +71,25 @@ message FulfillmentProduct {
|
|
|
65
71
|
optional string courier_id = 4 [
|
|
66
72
|
(io.restorecommerce.options.resolver) = {
|
|
67
73
|
target_type: ".io.restorecommerce.fulfillment_courier.FulfillmentCourier",
|
|
68
|
-
target_service: "
|
|
74
|
+
target_service: "fulfillment",
|
|
69
75
|
target_sub_service: "fulfillment_courier",
|
|
70
76
|
target_method: "Read",
|
|
71
77
|
field_name: "courier",
|
|
72
78
|
}
|
|
73
79
|
];
|
|
74
80
|
repeated string start_zones = 6;
|
|
75
|
-
repeated string destination_zones =
|
|
76
|
-
repeated string tax_ids =
|
|
77
|
-
repeated io.restorecommerce.attribute.Attribute attributes =
|
|
78
|
-
repeated Variant variants =
|
|
79
|
-
optional io.restorecommerce.meta.Meta meta =
|
|
81
|
+
repeated string destination_zones = 7;
|
|
82
|
+
repeated string tax_ids = 8;
|
|
83
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 9;
|
|
84
|
+
repeated Variant variants = 10;
|
|
85
|
+
optional io.restorecommerce.meta.Meta meta = 11;
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
message Variant {
|
|
83
89
|
optional string id = 1;
|
|
84
90
|
optional string name = 2;
|
|
85
91
|
optional string description = 3;
|
|
86
|
-
optional
|
|
92
|
+
optional io.restorecommerce.price.Price price = 4;
|
|
87
93
|
optional io.restorecommerce.geometry.BoundingBox3D max_size = 6;
|
|
88
94
|
optional double max_weight = 7;
|
|
89
95
|
}
|
|
@@ -106,16 +112,15 @@ message FulfillmentProductListResponse {
|
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
message PackingSolution {
|
|
109
|
-
|
|
115
|
+
repeated io.restorecommerce.amount.Amount amounts = 1;
|
|
110
116
|
optional double compactness = 2;
|
|
111
117
|
optional double homogeneity = 3;
|
|
112
118
|
optional double score = 4;
|
|
113
119
|
repeated io.restorecommerce.fulfillment.Parcel parcels = 5;
|
|
114
|
-
repeated io.restorecommerce.tax.VAT vats = 6;
|
|
115
120
|
}
|
|
116
121
|
|
|
117
122
|
message PackingSolutionResponse {
|
|
118
|
-
optional
|
|
123
|
+
optional io.restorecommerce.reference.Reference reference = 1;
|
|
119
124
|
repeated PackingSolution solutions = 2;
|
|
120
125
|
optional io.restorecommerce.status.Status status = 3;
|
|
121
126
|
}
|