@restorecommerce/protos 2.0.2 → 3.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 +325 -0
- package/google/protobuf/timestamp.proto +147 -0
- package/io/restorecommerce/access_control.proto +1 -3
- package/io/restorecommerce/address.proto +38 -37
- package/io/restorecommerce/attribute.proto +3 -3
- package/io/restorecommerce/auth.proto +15 -15
- package/io/restorecommerce/authentication_log.proto +12 -14
- package/io/restorecommerce/command.proto +10 -12
- package/io/restorecommerce/commandinterface.proto +3 -4
- package/io/restorecommerce/contact_point.proto +11 -13
- package/io/restorecommerce/contact_point_type.proto +5 -7
- package/io/restorecommerce/country.proto +7 -9
- package/io/restorecommerce/credential.proto +9 -9
- package/io/restorecommerce/customer.proto +9 -11
- package/io/restorecommerce/file.proto +23 -0
- package/io/restorecommerce/fulfillment.proto +87 -104
- package/io/restorecommerce/fulfillment_courier.proto +15 -17
- package/io/restorecommerce/fulfillment_product.proto +44 -47
- package/io/restorecommerce/geometry.proto +23 -0
- package/io/restorecommerce/graph.proto +10 -10
- package/io/restorecommerce/image.proto +13 -12
- package/io/restorecommerce/invoice.proto +47 -49
- package/io/restorecommerce/job.proto +43 -45
- package/io/restorecommerce/locale.proto +6 -8
- package/io/restorecommerce/location.proto +11 -13
- package/io/restorecommerce/manufacturer.proto +6 -8
- package/io/restorecommerce/meta.proto +3 -3
- package/io/restorecommerce/notification.proto +8 -10
- package/io/restorecommerce/notification_channel.proto +6 -6
- package/io/restorecommerce/notification_req.proto +16 -16
- package/io/restorecommerce/oauth.proto +1 -1
- package/io/restorecommerce/order.proto +65 -72
- package/io/restorecommerce/organization.proto +15 -17
- package/io/restorecommerce/ostorage.proto +28 -30
- package/io/restorecommerce/payment.proto +32 -34
- package/io/restorecommerce/payment_method.proto +7 -7
- package/io/restorecommerce/policy.proto +16 -18
- package/io/restorecommerce/policy_set.proto +12 -14
- package/io/restorecommerce/price_group.proto +6 -8
- package/io/restorecommerce/product.proto +146 -48
- package/io/restorecommerce/product_category.proto +10 -12
- package/io/restorecommerce/product_prototype.proto +8 -10
- package/io/restorecommerce/resource_base.proto +15 -15
- package/io/restorecommerce/role.proto +6 -8
- package/io/restorecommerce/rule.proto +18 -20
- package/io/restorecommerce/search.proto +3 -5
- package/io/restorecommerce/status.proto +13 -8
- package/io/restorecommerce/tax.proto +13 -10
- package/io/restorecommerce/tax_type.proto +13 -9
- package/io/restorecommerce/timezone.proto +5 -7
- package/io/restorecommerce/token.proto +11 -13
- package/io/restorecommerce/user.proto +45 -48
- package/package.json +2 -2
|
@@ -11,9 +11,7 @@ import "io/restorecommerce/options.proto";
|
|
|
11
11
|
/*
|
|
12
12
|
* Microservice definition.
|
|
13
13
|
*/
|
|
14
|
-
service
|
|
15
|
-
option (io.restorecommerce.options.service_name) = "locale";
|
|
16
|
-
|
|
14
|
+
service LocaleService {
|
|
17
15
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (LocaleListResponse) {
|
|
18
16
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
17
|
};
|
|
@@ -29,7 +27,7 @@ message Deleted {
|
|
|
29
27
|
|
|
30
28
|
message LocaleList {
|
|
31
29
|
repeated Locale items = 1;
|
|
32
|
-
uint32 total_count = 2;
|
|
30
|
+
optional uint32 total_count = 2;
|
|
33
31
|
io.restorecommerce.auth.Subject subject = 3;
|
|
34
32
|
}
|
|
35
33
|
|
|
@@ -45,8 +43,8 @@ message LocaleResponse {
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
message Locale {
|
|
48
|
-
string id = 1;
|
|
49
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
50
|
-
string value = 3;
|
|
51
|
-
string description = 4;
|
|
46
|
+
optional string id = 1;
|
|
47
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
48
|
+
optional string value = 3;
|
|
49
|
+
optional string description = 4;
|
|
52
50
|
}
|
|
@@ -16,9 +16,7 @@ import "io/restorecommerce/address.proto";
|
|
|
16
16
|
/*
|
|
17
17
|
* Microservice definition.
|
|
18
18
|
*/
|
|
19
|
-
service
|
|
20
|
-
option (io.restorecommerce.options.service_name) = "location";
|
|
21
|
-
|
|
19
|
+
service LocationService {
|
|
22
20
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (LocationListResponse) {
|
|
23
21
|
option (io.restorecommerce.options.is_query) = true;
|
|
24
22
|
};
|
|
@@ -34,7 +32,7 @@ message Deleted {
|
|
|
34
32
|
|
|
35
33
|
message LocationList {
|
|
36
34
|
repeated Location items = 1;
|
|
37
|
-
uint32 total_count = 2;
|
|
35
|
+
optional uint32 total_count = 2;
|
|
38
36
|
io.restorecommerce.auth.Subject subject = 3;
|
|
39
37
|
}
|
|
40
38
|
|
|
@@ -50,11 +48,11 @@ message LocationResponse {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
message Location {
|
|
53
|
-
string id = 1; // Location ID, unique, key
|
|
54
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
55
|
-
string name = 3; // Location name
|
|
56
|
-
string description = 4;
|
|
57
|
-
string organization_id = 5 [
|
|
51
|
+
optional string id = 1; // Location ID, unique, key
|
|
52
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
53
|
+
optional string name = 3; // Location name
|
|
54
|
+
optional string description = 4;
|
|
55
|
+
optional string organization_id = 5 [
|
|
58
56
|
(io.restorecommerce.options.resolver) = {
|
|
59
57
|
target_type: ".io.restorecommerce.organization.Organization",
|
|
60
58
|
target_service: "resource",
|
|
@@ -63,7 +61,7 @@ message Location {
|
|
|
63
61
|
field_name: "organization",
|
|
64
62
|
}
|
|
65
63
|
]; // Organization to which this location is linked
|
|
66
|
-
string parent_id = 6 [
|
|
64
|
+
optional string parent_id = 6 [
|
|
67
65
|
(io.restorecommerce.options.resolver) = {
|
|
68
66
|
target_type: ".io.restorecommerce.location.Location",
|
|
69
67
|
target_service: "resource",
|
|
@@ -72,7 +70,7 @@ message Location {
|
|
|
72
70
|
field_name: "parent",
|
|
73
71
|
}
|
|
74
72
|
]; // Location which may contain this location; may be null
|
|
75
|
-
string address_id = 8 [
|
|
73
|
+
optional string address_id = 8 [
|
|
76
74
|
(io.restorecommerce.options.resolver) = {
|
|
77
75
|
target_type: ".io.restorecommerce.address.Address",
|
|
78
76
|
target_service: "resource",
|
|
@@ -81,6 +79,6 @@ message Location {
|
|
|
81
79
|
field_name: "address",
|
|
82
80
|
}
|
|
83
81
|
];
|
|
84
|
-
google.protobuf.Any data = 9; /// additional data
|
|
85
|
-
string type = 10; // location type
|
|
82
|
+
optional google.protobuf.Any data = 9; /// additional data
|
|
83
|
+
optional string type = 10; // location type
|
|
86
84
|
}
|
|
@@ -10,15 +10,15 @@ import "io/restorecommerce/options.proto";
|
|
|
10
10
|
|
|
11
11
|
// Manufacturer resource
|
|
12
12
|
message Manufacturer {
|
|
13
|
-
string id = 1;
|
|
14
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
-
string name = 3;
|
|
16
|
-
string description = 4;
|
|
13
|
+
optional string id = 1;
|
|
14
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
+
optional string name = 3;
|
|
16
|
+
optional string description = 4;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
message ManufacturerList {
|
|
20
20
|
repeated Manufacturer items = 1;
|
|
21
|
-
uint32 total_count = 2;
|
|
21
|
+
optional uint32 total_count = 2;
|
|
22
22
|
io.restorecommerce.auth.Subject subject = 3;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -37,9 +37,7 @@ message Deleted {
|
|
|
37
37
|
string id = 1;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
service
|
|
41
|
-
option (io.restorecommerce.options.service_name) = "manufacturer";
|
|
42
|
-
|
|
40
|
+
service ManufacturerService {
|
|
43
41
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ManufacturerListResponse) {
|
|
44
42
|
option (io.restorecommerce.options.is_query) = true;
|
|
45
43
|
};
|
|
@@ -7,9 +7,9 @@ import "io/restorecommerce/attribute.proto";
|
|
|
7
7
|
// meta properties common to all resources
|
|
8
8
|
|
|
9
9
|
message Meta {
|
|
10
|
-
double created = 1; // timestamp
|
|
11
|
-
double modified = 2; // timestamp
|
|
12
|
-
string modified_by = 3; // ID from last User who modified it
|
|
10
|
+
optional double created = 1; // timestamp
|
|
11
|
+
optional double modified = 2; // timestamp
|
|
12
|
+
optional string modified_by = 3; // ID from last User who modified it
|
|
13
13
|
repeated io.restorecommerce.attribute.Attribute owner = 4;
|
|
14
14
|
repeated io.restorecommerce.attribute.AttributeObj acl = 5;
|
|
15
15
|
}
|
|
@@ -9,9 +9,7 @@ import "io/restorecommerce/status.proto";
|
|
|
9
9
|
import "io/restorecommerce/options.proto";
|
|
10
10
|
|
|
11
11
|
// Message structure for Notification
|
|
12
|
-
service
|
|
13
|
-
option (io.restorecommerce.options.service_name) = "notification";
|
|
14
|
-
|
|
12
|
+
service NotificationService {
|
|
15
13
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (NotificationListResponse) {
|
|
16
14
|
option (io.restorecommerce.options.is_query) = true;
|
|
17
15
|
};
|
|
@@ -27,7 +25,7 @@ message Deleted {
|
|
|
27
25
|
|
|
28
26
|
message NotificationList {
|
|
29
27
|
repeated Notification items = 1;
|
|
30
|
-
uint32 total_count = 2;
|
|
28
|
+
optional uint32 total_count = 2;
|
|
31
29
|
io.restorecommerce.auth.Subject subject = 3;
|
|
32
30
|
}
|
|
33
31
|
|
|
@@ -43,15 +41,15 @@ message NotificationResponse {
|
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
message Notification {
|
|
46
|
-
string id = 1;
|
|
47
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
48
|
-
string name = 3;
|
|
49
|
-
string description = 4;
|
|
44
|
+
optional string id = 1;
|
|
45
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
46
|
+
optional string name = 3;
|
|
47
|
+
optional string description = 4;
|
|
50
48
|
repeated string notification_channel_ids = 5;
|
|
51
49
|
oneof address_type {
|
|
52
50
|
string email = 6;
|
|
53
51
|
string telephone_number = 7;
|
|
54
52
|
}
|
|
55
|
-
string subject_template = 8;
|
|
56
|
-
string body_template = 9;
|
|
53
|
+
optional string subject_template = 8;
|
|
54
|
+
optional string body_template = 9;
|
|
57
55
|
}
|
|
@@ -8,7 +8,7 @@ import "io/restorecommerce/auth.proto";
|
|
|
8
8
|
import "io/restorecommerce/status.proto";
|
|
9
9
|
|
|
10
10
|
// Message structure for Notification Channel
|
|
11
|
-
service
|
|
11
|
+
service NotificationChannelService {
|
|
12
12
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (NotificationChannelListResponse);
|
|
13
13
|
rpc Create (NotificationChannelList) returns (NotificationChannelListResponse);
|
|
14
14
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
@@ -22,7 +22,7 @@ message Deleted {
|
|
|
22
22
|
|
|
23
23
|
message NotificationChannelList {
|
|
24
24
|
repeated NotificationChannel items = 1;
|
|
25
|
-
uint32 total_count = 2;
|
|
25
|
+
optional uint32 total_count = 2;
|
|
26
26
|
io.restorecommerce.auth.Subject subject = 3;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -38,10 +38,10 @@ message NotificationChannelResponse {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
message NotificationChannel {
|
|
41
|
-
string id = 1;
|
|
42
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
43
|
-
string name = 3;
|
|
44
|
-
string description = 4;
|
|
41
|
+
optional string id = 1;
|
|
42
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
43
|
+
optional string name = 3;
|
|
44
|
+
optional string description = 4;
|
|
45
45
|
oneof configuration_type {
|
|
46
46
|
string email = 5;
|
|
47
47
|
string sms = 6;
|
|
@@ -4,24 +4,24 @@ package io.restorecommerce.notification_req;
|
|
|
4
4
|
|
|
5
5
|
import "io/restorecommerce/status.proto";
|
|
6
6
|
|
|
7
|
-
service
|
|
7
|
+
service NotificationReqService {
|
|
8
8
|
// direct notifications
|
|
9
9
|
rpc Send (NotificationReq) returns (io.restorecommerce.status.OperationStatusObj); /// generic fallback
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// mimics nodemailer properties for easy configuration
|
|
13
13
|
message Attachment {
|
|
14
|
-
string filename = 1;
|
|
14
|
+
optional string filename = 1;
|
|
15
15
|
|
|
16
16
|
// the "content" may be on of the following:
|
|
17
|
-
string text = 2; // for textual data
|
|
18
|
-
bytes buffer = 3; // for binary data, eg.: images
|
|
19
|
-
|
|
20
|
-
string path = 4;
|
|
21
|
-
string content_type = 5;
|
|
22
|
-
string content_disposition = 6;
|
|
23
|
-
string cid = 7;
|
|
24
|
-
string encoding = 8;
|
|
17
|
+
optional string text = 2; // for textual data
|
|
18
|
+
optional bytes buffer = 3; // for binary data, eg.: images
|
|
19
|
+
|
|
20
|
+
optional string path = 4;
|
|
21
|
+
optional string content_type = 5;
|
|
22
|
+
optional string content_disposition = 6;
|
|
23
|
+
optional string cid = 7;
|
|
24
|
+
optional string encoding = 8;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// sendEmail NotificationReq event
|
|
@@ -30,10 +30,10 @@ message NotificationReq {
|
|
|
30
30
|
Email email = 1;
|
|
31
31
|
Log log = 2;
|
|
32
32
|
}
|
|
33
|
-
string subject = 3;
|
|
34
|
-
string body = 4; // text/HTML content
|
|
35
|
-
string transport = 5; /// 'email', 'log', ... default == 'log'
|
|
36
|
-
string provider = 6; /// specific transport provider, eg: 'console' for transport == 'log'
|
|
33
|
+
optional string subject = 3;
|
|
34
|
+
optional string body = 4; // text/HTML content
|
|
35
|
+
optional string transport = 5; /// 'email', 'log', ... default == 'log'
|
|
36
|
+
optional string provider = 6; /// specific transport provider, eg: 'console' for transport == 'log'
|
|
37
37
|
repeated Attachment attachments = 7;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -41,9 +41,9 @@ message Email {
|
|
|
41
41
|
repeated string to = 1; // array of to email list
|
|
42
42
|
repeated string cc = 2 ;// array of cc email list
|
|
43
43
|
repeated string bcc = 3; // array of bcc email list
|
|
44
|
-
string replyto = 4; // if set, the outgoing mail will have this replyTo header set
|
|
44
|
+
optional string replyto = 4; // if set, the outgoing mail will have this replyTo header set
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
message Log {
|
|
48
|
-
string level = 1;
|
|
48
|
+
optional string level = 1;
|
|
49
49
|
}
|
|
@@ -7,7 +7,7 @@ import "io/restorecommerce/user.proto";
|
|
|
7
7
|
import "io/restorecommerce/status.proto";
|
|
8
8
|
import "google/protobuf/empty.proto";
|
|
9
9
|
|
|
10
|
-
service
|
|
10
|
+
service OAuthService {
|
|
11
11
|
rpc AvailableServices(google.protobuf.Empty) returns (ServicesResponse);
|
|
12
12
|
rpc GenerateLinks(google.protobuf.Empty) returns (GenerateLinksResponse);
|
|
13
13
|
rpc ExchangeCode(ExchangeCodeRequest) returns (ExchangeCodeResponse);
|
|
@@ -8,55 +8,52 @@ import "io/restorecommerce/auth.proto";
|
|
|
8
8
|
import "io/restorecommerce/status.proto";
|
|
9
9
|
import "io/restorecommerce/options.proto";
|
|
10
10
|
import "io/restorecommerce/address.proto";
|
|
11
|
+
import "io/restorecommerce/tax.proto";
|
|
12
|
+
import "io/restorecommerce/country.proto";
|
|
11
13
|
import "io/restorecommerce/fulfillment.proto";
|
|
14
|
+
import "io/restorecommerce/fulfillment_product.proto";
|
|
12
15
|
|
|
13
16
|
|
|
14
|
-
service
|
|
15
|
-
option (io.restorecommerce.options.service_name) = "order";
|
|
16
|
-
|
|
17
|
+
service OrderService {
|
|
17
18
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (OrderListResponse) {
|
|
18
19
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
20
|
};
|
|
20
21
|
rpc Create (OrderList) returns (OrderListResponse);
|
|
21
22
|
rpc Update (OrderList) returns (OrderListResponse);
|
|
22
23
|
rpc Upsert (OrderList) returns (OrderListResponse);
|
|
24
|
+
rpc Evaluate (OrderList) returns (OrderListResponse);
|
|
23
25
|
rpc Submit (OrderList) returns (OrderListResponse);
|
|
24
|
-
rpc
|
|
26
|
+
rpc Withdraw (OrderIdList) returns (OrderListResponse);
|
|
27
|
+
rpc Cancel (OrderIdList) returns (OrderListResponse);
|
|
25
28
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
26
|
-
|
|
29
|
+
|
|
30
|
+
// Requires Fulfillment Service
|
|
31
|
+
rpc QueryPackingSolution (FulfillmentRequestList) returns (io.restorecommerce.fulfillment_product.PackingSolutionListResponse);
|
|
32
|
+
// Requires Fulfillment Service
|
|
33
|
+
rpc CreateFulfillment (FulfillmentRequestList) returns (io.restorecommerce.fulfillment.FulfillmentListResponse);
|
|
34
|
+
// Requires Fulfillment Service
|
|
35
|
+
rpc TriggerFulfillment (FulfillmentRequestList) returns (io.restorecommerce.status.StatusListResponse);
|
|
27
36
|
}
|
|
28
37
|
|
|
29
|
-
enum
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
enum OrderState {
|
|
39
|
+
Created = 0;
|
|
40
|
+
Submitted = 1;
|
|
41
|
+
Confirmed = 2;
|
|
42
|
+
Invalid = 3;
|
|
43
|
+
Shipping = 4;
|
|
44
|
+
Failed = 5;
|
|
45
|
+
Done = 6;
|
|
46
|
+
Withdrawn = 7;
|
|
47
|
+
Cancelled = 8;
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
message
|
|
41
|
-
|
|
42
|
-
string
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
string prototype_name = 6;
|
|
48
|
-
string prototype_description = 7;
|
|
49
|
-
int32 quantity = 8;
|
|
50
|
-
int32 vat = 9;
|
|
51
|
-
double price = 10;
|
|
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;
|
|
50
|
+
message OrderItem {
|
|
51
|
+
optional string product_id = 1;
|
|
52
|
+
optional string variant_id = 2;
|
|
53
|
+
optional int32 quantity = 3;
|
|
54
|
+
optional double unit_price = 4; //Set by service
|
|
55
|
+
optional double price = 5; //Set by service
|
|
56
|
+
repeated io.restorecommerce.tax.VAT vats = 6; //Set by service
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
/**
|
|
@@ -71,45 +68,28 @@ message Order {
|
|
|
71
68
|
deleted: "orderDeleted"
|
|
72
69
|
};
|
|
73
70
|
|
|
74
|
-
string id = 1;
|
|
75
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
76
|
-
|
|
77
|
-
string
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
io.restorecommerce.address.
|
|
83
|
-
|
|
84
|
-
string
|
|
85
|
-
io.restorecommerce.
|
|
86
|
-
string notification_email = 16;
|
|
87
|
-
repeated string fulfillment_ids = 17;
|
|
88
|
-
}
|
|
89
|
-
|
|
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;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
message TriggerFulfillmentRequest {
|
|
99
|
-
Order order = 1;
|
|
100
|
-
ShippingDetails shipping_details = 2;
|
|
101
|
-
repeated io.restorecommerce.fulfillment.Parcel parcels = 3;
|
|
71
|
+
optional string id = 1;
|
|
72
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
73
|
+
optional OrderState state = 3;
|
|
74
|
+
optional string customer_reference = 4;
|
|
75
|
+
repeated OrderItem items = 5;
|
|
76
|
+
optional double total_price = 6; //Set by service
|
|
77
|
+
optional double total_vat = 7; //Set by service
|
|
78
|
+
optional io.restorecommerce.address.ShippingAddress shipping_address = 8;
|
|
79
|
+
optional io.restorecommerce.address.ShippingAddress billing_address = 9;
|
|
80
|
+
optional string billing_email = 10;
|
|
81
|
+
optional string notification_email = 11;
|
|
82
|
+
optional io.restorecommerce.fulfillment_product.Preferences packing_preferences = 12;
|
|
102
83
|
}
|
|
103
84
|
|
|
104
|
-
message
|
|
105
|
-
repeated
|
|
106
|
-
|
|
107
|
-
io.restorecommerce.auth.Subject subject = 3;
|
|
85
|
+
message OrderIdList {
|
|
86
|
+
repeated string ids = 1;
|
|
87
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
108
88
|
}
|
|
109
89
|
|
|
110
90
|
message OrderList {
|
|
111
91
|
repeated Order items = 1;
|
|
112
|
-
uint32 total_count = 2;
|
|
92
|
+
optional uint32 total_count = 2;
|
|
113
93
|
io.restorecommerce.auth.Subject subject = 3;
|
|
114
94
|
}
|
|
115
95
|
|
|
@@ -124,11 +104,24 @@ message OrderResponse {
|
|
|
124
104
|
io.restorecommerce.status.Status status = 2;
|
|
125
105
|
}
|
|
126
106
|
|
|
127
|
-
message CancelRequestList {
|
|
128
|
-
repeated string ids = 1;
|
|
129
|
-
io.restorecommerce.auth.Subject subject = 2;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
107
|
message Deleted {
|
|
133
108
|
string id = 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
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
|
+
message FulfillmentRequest {
|
|
119
|
+
optional string reference_id = 1;
|
|
120
|
+
optional ShippingDetails shipping_details = 2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message FulfillmentRequestList {
|
|
124
|
+
repeated FulfillmentRequest items = 1;
|
|
125
|
+
optional uint32 total_count = 2;
|
|
126
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
134
127
|
}
|
|
@@ -13,9 +13,7 @@ import "io/restorecommerce/options.proto";
|
|
|
13
13
|
import "io/restorecommerce/address.proto";
|
|
14
14
|
import "io/restorecommerce/contact_point.proto";
|
|
15
15
|
|
|
16
|
-
service
|
|
17
|
-
option (io.restorecommerce.options.service_name) = "organization";
|
|
18
|
-
|
|
16
|
+
service OrganizationService {
|
|
19
17
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (OrganizationListResponse) {
|
|
20
18
|
option (io.restorecommerce.options.is_query) = true;
|
|
21
19
|
};
|
|
@@ -37,7 +35,7 @@ message DeleteOrgData {
|
|
|
37
35
|
|
|
38
36
|
message OrganizationList {
|
|
39
37
|
repeated Organization items = 1;
|
|
40
|
-
uint32 total_count = 2;
|
|
38
|
+
optional uint32 total_count = 2;
|
|
41
39
|
io.restorecommerce.auth.Subject subject = 3;
|
|
42
40
|
}
|
|
43
41
|
|
|
@@ -53,9 +51,9 @@ message OrganizationResponse {
|
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
message Organization {
|
|
56
|
-
string id = 1; /// Organization ID, unique, key
|
|
57
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
58
|
-
string address_id = 3 [
|
|
54
|
+
optional string id = 1; /// Organization ID, unique, key
|
|
55
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
56
|
+
optional string address_id = 3 [
|
|
59
57
|
(io.restorecommerce.options.resolver) = {
|
|
60
58
|
target_type: ".io.restorecommerce.address.Address",
|
|
61
59
|
target_service: "resource",
|
|
@@ -64,7 +62,7 @@ message Organization {
|
|
|
64
62
|
field_name: "address",
|
|
65
63
|
}
|
|
66
64
|
]; /// Address for the organization
|
|
67
|
-
string parent_id = 4 [
|
|
65
|
+
optional string parent_id = 4 [
|
|
68
66
|
(io.restorecommerce.options.resolver) = {
|
|
69
67
|
target_type: ".io.restorecommerce.organization.Organization",
|
|
70
68
|
target_service: "resource",
|
|
@@ -82,14 +80,14 @@ message Organization {
|
|
|
82
80
|
field_name: "contactPoints",
|
|
83
81
|
}
|
|
84
82
|
]; // list of possible legal addresses of different types
|
|
85
|
-
string website = 7;
|
|
86
|
-
string email = 8;
|
|
87
|
-
string logo = 9; // base64; arangoDB does not support blob storage
|
|
88
|
-
string vat_id = 10;
|
|
89
|
-
string isic_v4 = 11;
|
|
90
|
-
string registration = 12;
|
|
91
|
-
string registration_court = 13;
|
|
92
|
-
string name = 14;
|
|
83
|
+
optional string website = 7;
|
|
84
|
+
optional string email = 8;
|
|
85
|
+
optional string logo = 9; // base64; arangoDB does not support blob storage
|
|
86
|
+
optional string vat_id = 10;
|
|
87
|
+
optional string isic_v4 = 11;
|
|
88
|
+
optional string registration = 12;
|
|
89
|
+
optional string registration_court = 13;
|
|
90
|
+
optional string name = 14;
|
|
93
91
|
repeated string payment_method_ids = 15;
|
|
94
|
-
google.protobuf.Any data = 16; /// additional data
|
|
92
|
+
optional google.protobuf.Any data = 16; /// additional data
|
|
95
93
|
}
|
|
@@ -11,9 +11,7 @@ import "io/restorecommerce/status.proto";
|
|
|
11
11
|
import "io/restorecommerce/resource_base.proto";
|
|
12
12
|
import "io/restorecommerce/options.proto";
|
|
13
13
|
|
|
14
|
-
service
|
|
15
|
-
option (io.restorecommerce.options.service_name) = "object";
|
|
16
|
-
|
|
14
|
+
service ObjectService {
|
|
17
15
|
rpc Get (GetRequest) returns (stream ObjectResponse) {
|
|
18
16
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
17
|
};
|
|
@@ -45,8 +43,8 @@ message CopyRequestItem {
|
|
|
45
43
|
string bucket = 1;
|
|
46
44
|
string copySource = 2;
|
|
47
45
|
string key = 3;
|
|
48
|
-
io.restorecommerce.meta.Meta meta = 4;
|
|
49
|
-
Options options = 5;
|
|
46
|
+
optional io.restorecommerce.meta.Meta meta = 4;
|
|
47
|
+
optional Options options = 5;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
message CopyResponseItem {
|
|
@@ -58,24 +56,24 @@ message CopyResponseItem {
|
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
message Options {
|
|
61
|
-
string encoding = 1;
|
|
62
|
-
string content_type = 2;
|
|
63
|
-
string content_language = 3;
|
|
64
|
-
string content_disposition = 4;
|
|
65
|
-
int32 length = 5;
|
|
66
|
-
string version = 6;
|
|
67
|
-
string md5 = 7;
|
|
59
|
+
optional string encoding = 1;
|
|
60
|
+
optional string content_type = 2;
|
|
61
|
+
optional string content_language = 3;
|
|
62
|
+
optional string content_disposition = 4;
|
|
63
|
+
optional int32 length = 5;
|
|
64
|
+
optional string version = 6;
|
|
65
|
+
optional string md5 = 7;
|
|
68
66
|
repeated io.restorecommerce.attribute.Attribute tags = 8;
|
|
69
|
-
google.protobuf.Any data = 9; // optional meta data ex: from and to dates
|
|
67
|
+
optional google.protobuf.Any data = 9; // optional meta data ex: from and to dates
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
message Object {
|
|
73
71
|
string key = 1;
|
|
74
72
|
string bucket = 2;
|
|
75
|
-
bytes object = 3;
|
|
76
|
-
io.restorecommerce.meta.Meta meta = 4;
|
|
77
|
-
string url = 5;
|
|
78
|
-
Options options = 6;
|
|
73
|
+
optional bytes object = 3;
|
|
74
|
+
optional io.restorecommerce.meta.Meta meta = 4;
|
|
75
|
+
optional string url = 5;
|
|
76
|
+
optional Options options = 6;
|
|
79
77
|
io.restorecommerce.auth.Subject subject = 7;
|
|
80
78
|
}
|
|
81
79
|
|
|
@@ -101,7 +99,7 @@ message ObjectResponsePayload {
|
|
|
101
99
|
message GetRequest {
|
|
102
100
|
string key = 1;
|
|
103
101
|
string bucket = 2;
|
|
104
|
-
bool download = 3;
|
|
102
|
+
optional bool download = 3;
|
|
105
103
|
io.restorecommerce.auth.Subject subject = 4;
|
|
106
104
|
}
|
|
107
105
|
|
|
@@ -148,19 +146,19 @@ message Response {
|
|
|
148
146
|
|
|
149
147
|
message ListRequest {
|
|
150
148
|
string bucket = 1;
|
|
151
|
-
io.restorecommerce.filter.FilterOp filters = 2; /// Filter based on fieldName|operation, value|list
|
|
149
|
+
optional io.restorecommerce.filter.FilterOp filters = 2; /// Filter based on fieldName|operation, value|list
|
|
152
150
|
io.restorecommerce.auth.Subject subject = 3;
|
|
153
|
-
int32 max_keys = 4;
|
|
154
|
-
string prefix = 5;
|
|
151
|
+
optional int32 max_keys = 4;
|
|
152
|
+
optional string prefix = 5;
|
|
155
153
|
}
|
|
156
154
|
|
|
157
155
|
// OstorageMessage is used for emitting
|
|
158
156
|
// objectUploaded and objectDownloaded events
|
|
159
157
|
message OstorageMessage {
|
|
160
|
-
string key = 1;
|
|
161
|
-
string bucket = 2;
|
|
162
|
-
google.protobuf.Any metadata = 3;
|
|
163
|
-
io.restorecommerce.auth.Subject subject = 4;
|
|
158
|
+
optional string key = 1;
|
|
159
|
+
optional string bucket = 2;
|
|
160
|
+
optional google.protobuf.Any metadata = 3;
|
|
161
|
+
optional io.restorecommerce.auth.Subject subject = 4;
|
|
164
162
|
}
|
|
165
163
|
|
|
166
164
|
message MoveRequestList {
|
|
@@ -169,11 +167,11 @@ message MoveRequestList {
|
|
|
169
167
|
}
|
|
170
168
|
|
|
171
169
|
message MoveRequestItem {
|
|
172
|
-
string bucket = 1; // destination bucket name
|
|
173
|
-
string sourceObject = 2; // source object with bucket name
|
|
174
|
-
string key = 3; // destination key name
|
|
175
|
-
io.restorecommerce.meta.Meta meta = 4;
|
|
176
|
-
Options options = 5;
|
|
170
|
+
optional string bucket = 1; // destination bucket name
|
|
171
|
+
optional string sourceObject = 2; // source object with bucket name
|
|
172
|
+
optional string key = 3; // destination key name
|
|
173
|
+
optional io.restorecommerce.meta.Meta meta = 4;
|
|
174
|
+
optional Options options = 5;
|
|
177
175
|
}
|
|
178
176
|
|
|
179
177
|
message MoveResponseList {
|