@restorecommerce/protos 3.1.1 → 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 +40 -0
- package/io/restorecommerce/address.proto +7 -1
- package/io/restorecommerce/amount.proto +36 -0
- package/io/restorecommerce/contact_point.proto +7 -5
- package/io/restorecommerce/currency.proto +89 -0
- package/io/restorecommerce/customer.proto +18 -47
- package/io/restorecommerce/file.proto +3 -0
- package/io/restorecommerce/fulfillment.proto +48 -23
- package/io/restorecommerce/fulfillment_product.proto +17 -12
- package/io/restorecommerce/invoice.proto +128 -81
- package/io/restorecommerce/location.proto +3 -3
- package/io/restorecommerce/notification_req.proto +2 -0
- package/io/restorecommerce/order.proto +101 -39
- package/io/restorecommerce/organization.proto +14 -23
- 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 +2 -7
- package/io/restorecommerce/tax_type.proto +0 -6
- package/io/restorecommerce/user.proto +4 -4
- package/package.json +2 -2
|
@@ -2,16 +2,23 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package io.restorecommerce.invoice;
|
|
4
4
|
|
|
5
|
+
import "google/protobuf/any.proto";
|
|
5
6
|
import "io/restorecommerce/resource_base.proto";
|
|
6
7
|
import "io/restorecommerce/meta.proto";
|
|
7
8
|
import "io/restorecommerce/organization.proto";
|
|
8
9
|
import "io/restorecommerce/auth.proto";
|
|
9
|
-
import "google/protobuf/any.proto";
|
|
10
10
|
import "io/restorecommerce/status.proto";
|
|
11
11
|
import "io/restorecommerce/options.proto";
|
|
12
|
+
import "io/restorecommerce/address.proto";
|
|
13
|
+
import "io/restorecommerce/amount.proto";
|
|
14
|
+
import "io/restorecommerce/price.proto";
|
|
15
|
+
import "io/restorecommerce/file.proto";
|
|
16
|
+
import "io/restorecommerce/reference.proto";
|
|
12
17
|
|
|
13
18
|
// Used by resolvers
|
|
19
|
+
import "io/restorecommerce/user.proto";
|
|
14
20
|
import "io/restorecommerce/customer.proto";
|
|
21
|
+
import "io/restorecommerce/shop.proto";
|
|
15
22
|
|
|
16
23
|
/*
|
|
17
24
|
* Microservice definition.
|
|
@@ -21,28 +28,50 @@ service InvoiceService {
|
|
|
21
28
|
option (io.restorecommerce.options.is_query) = true;
|
|
22
29
|
};
|
|
23
30
|
rpc Create (InvoiceList) returns (InvoiceListResponse);
|
|
24
|
-
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
25
31
|
rpc Update (InvoiceList) returns (InvoiceListResponse);
|
|
26
32
|
rpc Upsert (InvoiceList) returns (InvoiceListResponse);
|
|
33
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Render invoices as PDF to ostorage. (creates if not exist, updates if id is given)
|
|
37
|
+
*/
|
|
38
|
+
rpc Render (InvoiceList) returns (InvoiceListResponse);
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* Mark invoices as withdrawn
|
|
42
|
+
*/
|
|
43
|
+
rpc Withdraw (InvoiceIdList) returns (InvoiceListResponse);
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* Triggers notification-srv (sends invoice per email for instance)
|
|
47
|
+
*/
|
|
48
|
+
rpc Send (InvoiceIdList) returns (io.restorecommerce.status.StatusListResponse);
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* Generate an incremented invoice number
|
|
52
|
+
*/
|
|
27
53
|
rpc GenerateInvoiceNumber(RequestInvoiceNumber) returns (InvoiceNumberResponse);
|
|
28
54
|
}
|
|
29
55
|
|
|
56
|
+
enum PaymentState {
|
|
57
|
+
UNPAYED = 0;
|
|
58
|
+
PAYED = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
30
61
|
message RequestInvoiceNumber {
|
|
31
|
-
|
|
32
|
-
|
|
62
|
+
optional string shop_id = 1;
|
|
63
|
+
google.protobuf.Any context = 2;
|
|
64
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
33
65
|
}
|
|
34
66
|
|
|
35
67
|
message InvoiceNumberResponse {
|
|
36
|
-
string
|
|
68
|
+
string invoice_number = 1;
|
|
37
69
|
}
|
|
38
70
|
|
|
39
71
|
message Deleted {
|
|
40
72
|
string id = 1;
|
|
41
73
|
}
|
|
42
74
|
|
|
43
|
-
/*
|
|
44
|
-
* For multiple invoices
|
|
45
|
-
*/
|
|
46
75
|
message InvoiceList {
|
|
47
76
|
repeated Invoice items = 1;
|
|
48
77
|
optional uint32 total_count = 2;
|
|
@@ -60,14 +89,45 @@ message InvoiceResponse {
|
|
|
60
89
|
io.restorecommerce.status.Status status = 2;
|
|
61
90
|
}
|
|
62
91
|
|
|
92
|
+
message InvoiceId {
|
|
93
|
+
optional string id = 1;
|
|
94
|
+
repeated string channel_ids = 2;
|
|
95
|
+
optional google.protobuf.Any options = 3;
|
|
96
|
+
optional io.restorecommerce.auth.Subject subject = 4;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message InvoiceIdList {
|
|
100
|
+
repeated InvoiceId items = 1;
|
|
101
|
+
optional uint32 total_count = 2;
|
|
102
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
103
|
+
}
|
|
104
|
+
|
|
63
105
|
/*
|
|
64
|
-
*
|
|
106
|
+
* The Invoice recource, stored in DB.
|
|
65
107
|
*/
|
|
66
108
|
message Invoice {
|
|
109
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
110
|
+
plural: "invoices"
|
|
111
|
+
topic: "io.restorecommerce.invoice.resource"
|
|
112
|
+
created: "invoiceCreated"
|
|
113
|
+
updated: "invoiceUpdated"
|
|
114
|
+
deleted: "invoiceDeleted"
|
|
115
|
+
};
|
|
116
|
+
|
|
67
117
|
optional string id = 1;
|
|
68
118
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
69
|
-
optional string
|
|
70
|
-
|
|
119
|
+
optional string invoice_number = 3;
|
|
120
|
+
repeated io.restorecommerce.reference.Reference references = 4;
|
|
121
|
+
optional string user_id = 5 [
|
|
122
|
+
(io.restorecommerce.options.resolver) = {
|
|
123
|
+
target_type: ".io.restorecommerce.user.User",
|
|
124
|
+
target_service: "identity",
|
|
125
|
+
target_sub_service: "user",
|
|
126
|
+
target_method: "Read",
|
|
127
|
+
field_name: "user",
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
optional string customer_id = 6 [
|
|
71
131
|
(io.restorecommerce.options.resolver) = {
|
|
72
132
|
target_type: ".io.restorecommerce.customer.Customer",
|
|
73
133
|
target_service: "resource",
|
|
@@ -75,77 +135,64 @@ message Invoice {
|
|
|
75
135
|
target_method: "Read",
|
|
76
136
|
field_name: "customer",
|
|
77
137
|
}
|
|
78
|
-
];
|
|
79
|
-
optional string
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
repeated
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
optional string
|
|
97
|
-
|
|
98
|
-
optional
|
|
99
|
-
optional
|
|
100
|
-
optional
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
optional string
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
message RecipientCustomer {
|
|
110
|
-
optional string id = 1; // customer id - used to store the resource in DB
|
|
111
|
-
optional string customer_number = 2; // displayed in invoice
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
message BillingAddress {
|
|
115
|
-
optional string email = 1;
|
|
116
|
-
optional string website = 2;
|
|
117
|
-
optional string street = 3;
|
|
118
|
-
optional string building_number = 4;
|
|
119
|
-
optional string postcode = 5;
|
|
120
|
-
optional string region = 6;
|
|
121
|
-
optional string country_name = 7;
|
|
122
|
-
optional string telephone = 9;
|
|
123
|
-
optional string timezone = 10;
|
|
124
|
-
optional string economic_area = 11;
|
|
125
|
-
optional string locality = 12;
|
|
126
|
-
optional string organization_name = 13;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
message InvoicePosition {
|
|
130
|
-
optional string currency = 1;
|
|
131
|
-
repeated InvoiceRow invoiceRows = 2;
|
|
132
|
-
optional InvoicePrice totalPrice = 3;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
message InvoiceRow {
|
|
136
|
-
optional string product = 1;
|
|
137
|
-
optional double pricePerUnit = 2;
|
|
138
|
-
optional uint32 quantity = 3;
|
|
139
|
-
optional string vat = 4;
|
|
140
|
-
optional double amount = 5;
|
|
141
|
-
optional double contract_start_date = 6; // if there is any contract associated with product
|
|
138
|
+
]; // customer_number ref. to recipent orga
|
|
139
|
+
optional string shop_id = 7 [
|
|
140
|
+
(io.restorecommerce.options.resolver) = {
|
|
141
|
+
target_type: ".io.restorecommerce.shop.Shop",
|
|
142
|
+
target_service: "resource",
|
|
143
|
+
target_sub_service: "shop",
|
|
144
|
+
target_method: "Read",
|
|
145
|
+
field_name: "shop",
|
|
146
|
+
}
|
|
147
|
+
]; // shop_number --- ref. to sender orga
|
|
148
|
+
optional double timestamp = 8;
|
|
149
|
+
optional PaymentState payment_state = 9;
|
|
150
|
+
optional io.restorecommerce.address.BillingAddress sender = 10;
|
|
151
|
+
optional io.restorecommerce.address.BillingAddress recipient = 11;
|
|
152
|
+
repeated Position positions = 12;
|
|
153
|
+
repeated io.restorecommerce.amount.Amount total_amounts = 13;
|
|
154
|
+
repeated string payment_hints = 14; // is there no better type for that?
|
|
155
|
+
repeated io.restorecommerce.file.File documents = 15; // url to rendered PDFs
|
|
156
|
+
optional string customer_remark = 16;
|
|
157
|
+
optional double from_date = 17; // value performance from date
|
|
158
|
+
optional double to_date = 18; // value performance to date
|
|
159
|
+
optional bool sent = 19;
|
|
160
|
+
optional bool withdrawn = 20;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
message Position {
|
|
164
|
+
optional string id = 1;
|
|
165
|
+
repeated Row rows = 3;
|
|
166
|
+
repeated io.restorecommerce.amount.Amount amounts = 5; // repeated in case of multiple currencies?
|
|
142
167
|
}
|
|
143
168
|
|
|
144
|
-
message
|
|
145
|
-
optional
|
|
146
|
-
|
|
169
|
+
message Row {
|
|
170
|
+
optional string id = 1;
|
|
171
|
+
oneof item_type {
|
|
172
|
+
ProductItem product_item = 2;
|
|
173
|
+
ManualItem manual_item = 3;
|
|
174
|
+
}
|
|
175
|
+
optional io.restorecommerce.price.Price unit_price = 4;
|
|
176
|
+
optional uint32 quantity = 5;
|
|
177
|
+
optional io.restorecommerce.amount.Amount amount = 6;
|
|
178
|
+
optional double contract_start_date = 7; // if there is any contract associated with product
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
message ProductItem {
|
|
182
|
+
optional string product_id = 1 [
|
|
183
|
+
(io.restorecommerce.options.resolver) = {
|
|
184
|
+
target_type: ".io.restorecommerce.product.Product",
|
|
185
|
+
target_service: "catalog",
|
|
186
|
+
target_sub_service: "product",
|
|
187
|
+
target_method: "Read",
|
|
188
|
+
field_name: "product",
|
|
189
|
+
}
|
|
190
|
+
];
|
|
191
|
+
optional string variant_id = 2;
|
|
147
192
|
}
|
|
148
193
|
|
|
149
|
-
message
|
|
150
|
-
|
|
151
|
-
|
|
194
|
+
message ManualItem {
|
|
195
|
+
optional string stock_keeping_unit = 1;
|
|
196
|
+
optional string name = 2;
|
|
197
|
+
optional string descritpion = 3;
|
|
198
|
+
}
|
|
@@ -55,7 +55,7 @@ message Location {
|
|
|
55
55
|
optional string organization_id = 5 [
|
|
56
56
|
(io.restorecommerce.options.resolver) = {
|
|
57
57
|
target_type: ".io.restorecommerce.organization.Organization",
|
|
58
|
-
target_service: "
|
|
58
|
+
target_service: "master_data",
|
|
59
59
|
target_sub_service: "organization",
|
|
60
60
|
target_method: "Read",
|
|
61
61
|
field_name: "organization",
|
|
@@ -64,7 +64,7 @@ message Location {
|
|
|
64
64
|
optional string parent_id = 6 [
|
|
65
65
|
(io.restorecommerce.options.resolver) = {
|
|
66
66
|
target_type: ".io.restorecommerce.location.Location",
|
|
67
|
-
target_service: "
|
|
67
|
+
target_service: "master_data",
|
|
68
68
|
target_sub_service: "location",
|
|
69
69
|
target_method: "Read",
|
|
70
70
|
field_name: "parent",
|
|
@@ -73,7 +73,7 @@ message Location {
|
|
|
73
73
|
optional string address_id = 8 [
|
|
74
74
|
(io.restorecommerce.options.resolver) = {
|
|
75
75
|
target_type: ".io.restorecommerce.address.Address",
|
|
76
|
-
target_service: "
|
|
76
|
+
target_service: "master_data",
|
|
77
77
|
target_sub_service: "address",
|
|
78
78
|
target_method: "Read",
|
|
79
79
|
field_name: "address",
|
|
@@ -3,6 +3,7 @@ syntax = "proto3";
|
|
|
3
3
|
package io.restorecommerce.notification_req;
|
|
4
4
|
|
|
5
5
|
import "io/restorecommerce/status.proto";
|
|
6
|
+
import "io/restorecommerce/reference.proto";
|
|
6
7
|
|
|
7
8
|
service NotificationReqService {
|
|
8
9
|
// direct notifications
|
|
@@ -35,6 +36,7 @@ message NotificationReq {
|
|
|
35
36
|
optional string transport = 5; /// 'email', 'log', ... default == 'log'
|
|
36
37
|
optional string provider = 6; /// specific transport provider, eg: 'console' for transport == 'log'
|
|
37
38
|
repeated Attachment attachments = 7;
|
|
39
|
+
optional io.restorecommerce.reference.Reference reference = 8;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
message Email {
|
|
@@ -2,16 +2,23 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package io.restorecommerce.order;
|
|
4
4
|
|
|
5
|
+
import "google/protobuf/any.proto";
|
|
6
|
+
|
|
5
7
|
import "io/restorecommerce/resource_base.proto";
|
|
6
8
|
import "io/restorecommerce/meta.proto";
|
|
7
9
|
import "io/restorecommerce/auth.proto";
|
|
8
10
|
import "io/restorecommerce/status.proto";
|
|
9
11
|
import "io/restorecommerce/options.proto";
|
|
10
12
|
import "io/restorecommerce/address.proto";
|
|
11
|
-
import "io/restorecommerce/
|
|
13
|
+
import "io/restorecommerce/amount.proto";
|
|
14
|
+
import "io/restorecommerce/price.proto";
|
|
12
15
|
import "io/restorecommerce/country.proto";
|
|
13
16
|
import "io/restorecommerce/fulfillment.proto";
|
|
14
17
|
import "io/restorecommerce/fulfillment_product.proto";
|
|
18
|
+
import "io/restorecommerce/invoice.proto";
|
|
19
|
+
|
|
20
|
+
// Used by resolvers
|
|
21
|
+
import "io/restorecommerce/shop.proto";
|
|
15
22
|
|
|
16
23
|
|
|
17
24
|
service OrderService {
|
|
@@ -26,34 +33,46 @@ service OrderService {
|
|
|
26
33
|
rpc Withdraw (OrderIdList) returns (OrderListResponse);
|
|
27
34
|
rpc Cancel (OrderIdList) returns (OrderListResponse);
|
|
28
35
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
29
|
-
|
|
36
|
+
|
|
30
37
|
// Requires Fulfillment Service
|
|
31
38
|
rpc QueryPackingSolution (FulfillmentRequestList) returns (io.restorecommerce.fulfillment_product.PackingSolutionListResponse);
|
|
32
39
|
// Requires Fulfillment Service
|
|
33
40
|
rpc CreateFulfillment (FulfillmentRequestList) returns (io.restorecommerce.fulfillment.FulfillmentListResponse);
|
|
34
41
|
// Requires Fulfillment Service
|
|
35
42
|
rpc TriggerFulfillment (FulfillmentRequestList) returns (io.restorecommerce.status.StatusListResponse);
|
|
43
|
+
|
|
44
|
+
// Requires Invoice Service
|
|
45
|
+
rpc CreateInvoice (InvoiceRequestList) returns (io.restorecommerce.invoice.InvoiceListResponse);
|
|
46
|
+
// Requires Invoice Service
|
|
47
|
+
rpc TriggerInvoice (InvoiceRequestList) returns (io.restorecommerce.status.StatusListResponse);
|
|
36
48
|
}
|
|
37
49
|
|
|
38
|
-
enum
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Cancelled = 8;
|
|
50
|
+
enum State {
|
|
51
|
+
FAILED = 0;
|
|
52
|
+
INVALID = 1;
|
|
53
|
+
CREATED = 2;
|
|
54
|
+
SUBMITTED = 3;
|
|
55
|
+
IN_PROCESS = 4;
|
|
56
|
+
DONE = 5;
|
|
57
|
+
WITHDRAWN = 6;
|
|
58
|
+
CANCELLED = 7;
|
|
48
59
|
}
|
|
49
60
|
|
|
50
|
-
message
|
|
51
|
-
optional string
|
|
52
|
-
optional string
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
message Item {
|
|
62
|
+
optional string id = 1;
|
|
63
|
+
optional string product_id = 2 [
|
|
64
|
+
(io.restorecommerce.options.resolver) = {
|
|
65
|
+
target_type: ".io.restorecommerce.product.Product",
|
|
66
|
+
target_service: "catalog",
|
|
67
|
+
target_sub_service: "product",
|
|
68
|
+
target_method: "Read",
|
|
69
|
+
field_name: "product",
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
optional string variant_id = 3;
|
|
73
|
+
optional int32 quantity = 4;
|
|
74
|
+
optional io.restorecommerce.price.Price unit_price = 5; //Set by service
|
|
75
|
+
optional io.restorecommerce.amount.Amount amount = 6; //Set by service
|
|
57
76
|
}
|
|
58
77
|
|
|
59
78
|
/**
|
|
@@ -70,16 +89,44 @@ message Order {
|
|
|
70
89
|
|
|
71
90
|
optional string id = 1;
|
|
72
91
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
73
|
-
optional
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
optional
|
|
92
|
+
optional string user_id = 3 [
|
|
93
|
+
(io.restorecommerce.options.resolver) = {
|
|
94
|
+
target_type: ".io.restorecommerce.customer.Customer",
|
|
95
|
+
target_service: "resource",
|
|
96
|
+
target_sub_service: "customer",
|
|
97
|
+
target_method: "Read",
|
|
98
|
+
field_name: "customer",
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
optional string customer_id = 4 [
|
|
102
|
+
(io.restorecommerce.options.resolver) = {
|
|
103
|
+
target_type: ".io.restorecommerce.customer.Customer",
|
|
104
|
+
target_service: "resource",
|
|
105
|
+
target_sub_service: "customer",
|
|
106
|
+
target_method: "Read",
|
|
107
|
+
field_name: "customer",
|
|
108
|
+
}
|
|
109
|
+
];
|
|
110
|
+
optional string shop_id = 5 [
|
|
111
|
+
(io.restorecommerce.options.resolver) = {
|
|
112
|
+
target_type: ".io.restorecommerce.shop.Shop",
|
|
113
|
+
target_service: "resource",
|
|
114
|
+
target_sub_service: "shop",
|
|
115
|
+
target_method: "Read",
|
|
116
|
+
field_name: "shop",
|
|
117
|
+
}
|
|
118
|
+
];
|
|
119
|
+
repeated Item items = 6;
|
|
120
|
+
optional State order_state = 7; // Set by service
|
|
121
|
+
optional io.restorecommerce.fulfillment.State fulfillment_state = 8; // Set by kafka
|
|
122
|
+
optional io.restorecommerce.invoice.PaymentState payment_state = 9; // Set by kafka
|
|
123
|
+
repeated io.restorecommerce.amount.Amount total_amounts = 10; // Set by service --- repeated in case of variant currency?
|
|
124
|
+
optional io.restorecommerce.address.ShippingAddress shipping_address = 11;
|
|
125
|
+
optional io.restorecommerce.address.BillingAddress billing_address = 12;
|
|
126
|
+
optional string notification_email = 13;
|
|
127
|
+
optional string customer_order_nr = 14;
|
|
128
|
+
optional string customer_remark = 15;
|
|
129
|
+
optional io.restorecommerce.fulfillment_product.Preferences packaging_preferences = 16;
|
|
83
130
|
}
|
|
84
131
|
|
|
85
132
|
message OrderIdList {
|
|
@@ -108,20 +155,35 @@ message Deleted {
|
|
|
108
155
|
string id = 1;
|
|
109
156
|
}
|
|
110
157
|
|
|
111
|
-
message ShippingDetails {
|
|
112
|
-
optional string export_type = 1;
|
|
113
|
-
optional string export_description = 2;
|
|
114
|
-
optional string invoice_number = 3;
|
|
115
|
-
optional io.restorecommerce.address.ShippingAddress sender_address = 4;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
158
|
message FulfillmentRequest {
|
|
119
|
-
optional string
|
|
120
|
-
optional
|
|
159
|
+
optional string order_id = 1;
|
|
160
|
+
optional string export_type = 2; // @TODO: not used!
|
|
161
|
+
optional string export_description = 3; // @TODO: not used!
|
|
162
|
+
optional string invoice_number = 4; // @TODO: not used!
|
|
163
|
+
optional io.restorecommerce.address.ShippingAddress sender_address = 5;
|
|
164
|
+
repeated string include_items = 6; // includes all if empty
|
|
165
|
+
google.protobuf.Any data = 7;
|
|
121
166
|
}
|
|
122
167
|
|
|
123
168
|
message FulfillmentRequestList {
|
|
124
169
|
repeated FulfillmentRequest items = 1;
|
|
125
170
|
optional uint32 total_count = 2;
|
|
126
171
|
io.restorecommerce.auth.Subject subject = 3;
|
|
127
|
-
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message InvoicePosition {
|
|
175
|
+
optional string order_id = 2;
|
|
176
|
+
repeated string included_items = 3; // includes all on empty
|
|
177
|
+
repeated string included_fulfillments = 4; // includes all on empty
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
message InvoiceRequest {
|
|
181
|
+
optional string invoice_number = 1; // if given
|
|
182
|
+
repeated InvoicePosition positions = 2;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
message InvoiceRequestList {
|
|
186
|
+
repeated InvoiceRequest items = 1;
|
|
187
|
+
optional uint32 total_count = 2;
|
|
188
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
189
|
+
}
|
|
@@ -53,41 +53,32 @@ message OrganizationResponse {
|
|
|
53
53
|
message Organization {
|
|
54
54
|
optional string id = 1; /// Organization ID, unique, key
|
|
55
55
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
56
|
-
optional string
|
|
57
|
-
(io.restorecommerce.options.resolver) = {
|
|
58
|
-
target_type: ".io.restorecommerce.address.Address",
|
|
59
|
-
target_service: "resource",
|
|
60
|
-
target_sub_service: "address",
|
|
61
|
-
target_method: "Read",
|
|
62
|
-
field_name: "address",
|
|
63
|
-
}
|
|
64
|
-
]; /// Address for the organization
|
|
65
|
-
optional string parent_id = 4 [
|
|
56
|
+
optional string parent_id = 3 [
|
|
66
57
|
(io.restorecommerce.options.resolver) = {
|
|
67
58
|
target_type: ".io.restorecommerce.organization.Organization",
|
|
68
|
-
target_service: "
|
|
59
|
+
target_service: "master_data",
|
|
69
60
|
target_sub_service: "organization",
|
|
70
61
|
target_method: "Read",
|
|
71
62
|
field_name: "parent",
|
|
72
63
|
}
|
|
73
64
|
]; // Hierarchically superior organization; may be null
|
|
74
|
-
repeated string contact_point_ids =
|
|
65
|
+
repeated string contact_point_ids = 4 [
|
|
75
66
|
(io.restorecommerce.options.resolver) = {
|
|
76
67
|
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
77
|
-
target_service: "
|
|
68
|
+
target_service: "master_data",
|
|
78
69
|
target_sub_service: "contact_point",
|
|
79
70
|
target_method: "Read",
|
|
80
71
|
field_name: "contactPoints",
|
|
81
72
|
}
|
|
82
73
|
]; // list of possible legal addresses of different types
|
|
83
|
-
optional string website =
|
|
84
|
-
optional string email =
|
|
85
|
-
optional string logo =
|
|
86
|
-
optional string vat_id =
|
|
87
|
-
optional string isic_v4 =
|
|
88
|
-
optional string registration =
|
|
89
|
-
optional string registration_court =
|
|
90
|
-
optional string name =
|
|
91
|
-
repeated string payment_method_ids =
|
|
92
|
-
optional google.protobuf.Any data =
|
|
74
|
+
optional string website = 5;
|
|
75
|
+
optional string email = 6;
|
|
76
|
+
optional string logo = 7; // base64; arangoDB does not support blob storage
|
|
77
|
+
optional string vat_id = 8;
|
|
78
|
+
optional string isic_v4 = 9;
|
|
79
|
+
optional string registration = 10;
|
|
80
|
+
optional string registration_court = 11;
|
|
81
|
+
optional string name = 12;
|
|
82
|
+
repeated string payment_method_ids = 13;
|
|
83
|
+
optional google.protobuf.Any data = 14; /// additional data
|
|
93
84
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.price;
|
|
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 Price {
|
|
11
|
+
optional double regular_price = 1;
|
|
12
|
+
optional bool sale = 2;
|
|
13
|
+
optional double sale_price = 3;
|
|
14
|
+
optional string currency_id = 4 [
|
|
15
|
+
(io.restorecommerce.options.resolver) = {
|
|
16
|
+
target_type: ".io.restorecommerce.currency.Currency",
|
|
17
|
+
target_service: "master_data",
|
|
18
|
+
target_sub_service: "currency",
|
|
19
|
+
target_method: "Read",
|
|
20
|
+
field_name: "currency",
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
repeated string tax_ids = 5 [
|
|
24
|
+
(io.restorecommerce.options.resolver) = {
|
|
25
|
+
target_type: ".io.restorecommerce.tax.Tax",
|
|
26
|
+
target_service: "master_data",
|
|
27
|
+
target_sub_service: "tax",
|
|
28
|
+
target_method: "Read",
|
|
29
|
+
field_name: "taxes",
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
}
|