@restorecommerce/protos 2.0.1 → 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 +336 -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 +4 -3
- 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) = "authentication_log";
|
|
16
|
-
|
|
14
|
+
service AuthenticationLogService {
|
|
17
15
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (AuthenticationLogListResponse) {
|
|
18
16
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
17
|
};
|
|
@@ -25,7 +23,7 @@ service Service {
|
|
|
25
23
|
|
|
26
24
|
message AuthenticationLogList {
|
|
27
25
|
repeated AuthenticationLog items = 1;
|
|
28
|
-
uint32 total_count = 2;
|
|
26
|
+
optional uint32 total_count = 2;
|
|
29
27
|
io.restorecommerce.auth.Subject subject = 3;
|
|
30
28
|
}
|
|
31
29
|
|
|
@@ -44,16 +42,16 @@ message AuthenticationLogResponse {
|
|
|
44
42
|
* Authentication Log
|
|
45
43
|
*/
|
|
46
44
|
message AuthenticationLog {
|
|
47
|
-
string id = 1; // log id
|
|
48
|
-
string ipv4_address = 2;
|
|
49
|
-
string ipv6_address = 3;
|
|
50
|
-
string operating_system = 4;
|
|
51
|
-
string user_agent = 5;
|
|
52
|
-
double date = 6; // time stamp of login, logout or token update
|
|
53
|
-
string activity = 7; // login, logout
|
|
54
|
-
io.restorecommerce.meta.Meta meta = 8; // meta info
|
|
55
|
-
string subject_id = 9; // subject id
|
|
56
|
-
string token_name = 10; // token name associated with io.restorecommerce.auth.Token.token_name
|
|
45
|
+
optional string id = 1; // log id
|
|
46
|
+
optional string ipv4_address = 2;
|
|
47
|
+
optional string ipv6_address = 3;
|
|
48
|
+
optional string operating_system = 4;
|
|
49
|
+
optional string user_agent = 5;
|
|
50
|
+
optional double date = 6; // time stamp of login, logout or token update
|
|
51
|
+
optional string activity = 7; // login, logout
|
|
52
|
+
optional io.restorecommerce.meta.Meta meta = 8; // meta info
|
|
53
|
+
optional string subject_id = 9; // subject id
|
|
54
|
+
optional string token_name = 10; // token name associated with io.restorecommerce.auth.Token.token_name
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
message Deleted {
|
|
@@ -10,11 +10,11 @@ import "io/restorecommerce/options.proto";
|
|
|
10
10
|
|
|
11
11
|
// command resource
|
|
12
12
|
message Command {
|
|
13
|
-
string id = 1;
|
|
14
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
-
string name = 3; // command name
|
|
13
|
+
optional string id = 1;
|
|
14
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
+
optional string name = 3; // command name
|
|
16
16
|
repeated CommandParameter parameters = 4; // all possible parameters
|
|
17
|
-
string description = 5; // command description
|
|
17
|
+
optional string description = 5; // command description
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
message CommandParameter {
|
|
@@ -26,15 +26,15 @@ message CommandParameter {
|
|
|
26
26
|
string_value = 4;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
string field = 1; // field name
|
|
30
|
-
string description = 2; // field description
|
|
31
|
-
ParameterType type = 3; // field's type
|
|
32
|
-
string properties = 4; // dump properties in case of `object_value``
|
|
29
|
+
optional string field = 1; // field name
|
|
30
|
+
optional string description = 2; // field description
|
|
31
|
+
optional ParameterType type = 3; // field's type
|
|
32
|
+
optional string properties = 4; // dump properties in case of `object_value``
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
message CommandList {
|
|
36
36
|
repeated Command items = 1;
|
|
37
|
-
uint32 total_count = 2;
|
|
37
|
+
optional uint32 total_count = 2;
|
|
38
38
|
io.restorecommerce.auth.Subject subject = 3;
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -49,9 +49,7 @@ message CommandResponse {
|
|
|
49
49
|
io.restorecommerce.status.Status status = 2;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
service
|
|
53
|
-
option (io.restorecommerce.options.service_name) = "command";
|
|
54
|
-
|
|
52
|
+
service CommandService {
|
|
55
53
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CommandListResponse) {
|
|
56
54
|
option (io.restorecommerce.options.is_query) = true;
|
|
57
55
|
};
|
|
@@ -4,12 +4,13 @@ package io.restorecommerce.commandinterface;
|
|
|
4
4
|
|
|
5
5
|
import "google/protobuf/any.proto";
|
|
6
6
|
import "io/restorecommerce/auth.proto";
|
|
7
|
+
import "io/restorecommerce/options.proto";
|
|
7
8
|
|
|
8
9
|
// used to send requests through Kafka or gRPC
|
|
9
10
|
message CommandRequest {
|
|
10
11
|
// command identifier (used to demultiplex operation in the command implementation)
|
|
11
|
-
string name = 1;
|
|
12
|
-
google.protobuf.Any payload = 2; // variable payload
|
|
12
|
+
optional string name = 1;
|
|
13
|
+
optional google.protobuf.Any payload = 2; // variable payload
|
|
13
14
|
io.restorecommerce.auth.Subject subject = 3;
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -25,6 +26,6 @@ message CommandResponse {
|
|
|
25
26
|
/**
|
|
26
27
|
* RPC service for executing commands
|
|
27
28
|
*/
|
|
28
|
-
service
|
|
29
|
+
service CommandInterfaceService {
|
|
29
30
|
rpc Command(CommandRequest) returns (google.protobuf.Any);
|
|
30
31
|
}
|
|
@@ -14,9 +14,7 @@ import "io/restorecommerce/contact_point_type.proto";
|
|
|
14
14
|
import "io/restorecommerce/timezone.proto";
|
|
15
15
|
import "io/restorecommerce/locale.proto";
|
|
16
16
|
|
|
17
|
-
service
|
|
18
|
-
option (io.restorecommerce.options.service_name) = "contact_point";
|
|
19
|
-
|
|
17
|
+
service ContactPointService {
|
|
20
18
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ContactPointListResponse) {
|
|
21
19
|
option (io.restorecommerce.options.is_query) = true;
|
|
22
20
|
};
|
|
@@ -32,7 +30,7 @@ message Deleted {
|
|
|
32
30
|
|
|
33
31
|
message ContactPointList {
|
|
34
32
|
repeated ContactPoint items = 1;
|
|
35
|
-
uint32 total_count = 2;
|
|
33
|
+
optional uint32 total_count = 2;
|
|
36
34
|
io.restorecommerce.auth.Subject subject = 3;
|
|
37
35
|
}
|
|
38
36
|
|
|
@@ -48,9 +46,9 @@ message ContactPointResponse {
|
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
message ContactPoint {
|
|
51
|
-
string id = 1;
|
|
52
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
53
|
-
string physical_address_id = 3 [
|
|
49
|
+
optional string id = 1;
|
|
50
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
51
|
+
optional string physical_address_id = 3 [
|
|
54
52
|
(io.restorecommerce.options.resolver) = {
|
|
55
53
|
target_type: ".io.restorecommerce.address.Address",
|
|
56
54
|
target_service: "resource",
|
|
@@ -59,9 +57,9 @@ message ContactPoint {
|
|
|
59
57
|
field_name: "physicalAddress",
|
|
60
58
|
}
|
|
61
59
|
];
|
|
62
|
-
string website = 5;
|
|
63
|
-
string email = 6;
|
|
64
|
-
string contact_point_type_id = 7 [
|
|
60
|
+
optional string website = 5;
|
|
61
|
+
optional string email = 6;
|
|
62
|
+
optional string contact_point_type_id = 7 [
|
|
65
63
|
(io.restorecommerce.options.resolver) = {
|
|
66
64
|
target_type: ".io.restorecommerce.contact_point_type.ContactPointType",
|
|
67
65
|
target_service: "resource",
|
|
@@ -70,8 +68,8 @@ message ContactPoint {
|
|
|
70
68
|
field_name: "contactPointType",
|
|
71
69
|
}
|
|
72
70
|
];
|
|
73
|
-
string telephone = 8;
|
|
74
|
-
string timezone_id = 9 [
|
|
71
|
+
optional string telephone = 8;
|
|
72
|
+
optional string timezone_id = 9 [
|
|
75
73
|
(io.restorecommerce.options.resolver) = {
|
|
76
74
|
target_type: ".io.restorecommerce.timezone.Timezone",
|
|
77
75
|
target_service: "resource",
|
|
@@ -80,7 +78,7 @@ message ContactPoint {
|
|
|
80
78
|
field_name: "timezone",
|
|
81
79
|
}
|
|
82
80
|
];
|
|
83
|
-
string locale_id = 10 [
|
|
81
|
+
optional string locale_id = 10 [
|
|
84
82
|
(io.restorecommerce.options.resolver) = {
|
|
85
83
|
target_type: ".io.restorecommerce.locale.Locale",
|
|
86
84
|
target_service: "resource",
|
|
@@ -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) = "contact_point_type";
|
|
16
|
-
|
|
14
|
+
service ContactPointTypeService {
|
|
17
15
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ContactPointTypeListResponse) {
|
|
18
16
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
17
|
};
|
|
@@ -29,14 +27,14 @@ message Deleted {
|
|
|
29
27
|
|
|
30
28
|
message ContactPointTypeList {
|
|
31
29
|
repeated ContactPointType 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
|
|
|
36
34
|
message ContactPointType {
|
|
37
|
-
string id = 1;
|
|
38
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
39
|
-
string type = 3;
|
|
35
|
+
optional string id = 1;
|
|
36
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
37
|
+
optional string type = 3;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
message ContactPointTypeListResponse {
|
|
@@ -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) = "country";
|
|
16
|
-
|
|
14
|
+
service CountryService {
|
|
17
15
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CountryListResponse) {
|
|
18
16
|
option (io.restorecommerce.options.is_query) = true;
|
|
19
17
|
};
|
|
@@ -29,7 +27,7 @@ message Deleted {
|
|
|
29
27
|
|
|
30
28
|
message CountryList {
|
|
31
29
|
repeated Country 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,10 +43,10 @@ message CountryResponse {
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
message Country {
|
|
48
|
-
string id = 1;
|
|
49
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
50
|
-
string name = 3;
|
|
51
|
-
string country_code = 4;
|
|
52
|
-
string geographical_name = 5;
|
|
46
|
+
optional string id = 1;
|
|
47
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
48
|
+
optional string name = 3;
|
|
49
|
+
optional string country_code = 4;
|
|
50
|
+
optional string geographical_name = 5;
|
|
53
51
|
repeated string economic_areas = 6;
|
|
54
52
|
}
|
|
@@ -11,7 +11,7 @@ import "io/restorecommerce/status.proto";
|
|
|
11
11
|
/*
|
|
12
12
|
* Microservice definition.
|
|
13
13
|
*/
|
|
14
|
-
service
|
|
14
|
+
service CredentialService {
|
|
15
15
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CredentialListResponse);
|
|
16
16
|
rpc Create (CredentialList) returns (CredentialListResponse);
|
|
17
17
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
@@ -25,7 +25,7 @@ message Deleted {
|
|
|
25
25
|
|
|
26
26
|
message CredentialList {
|
|
27
27
|
repeated Credential items = 1;
|
|
28
|
-
uint32 total_count = 2;
|
|
28
|
+
optional uint32 total_count = 2;
|
|
29
29
|
io.restorecommerce.auth.Subject subject = 3;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -41,11 +41,11 @@ message CredentialResponse {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
message Credential {
|
|
44
|
-
string id = 1;
|
|
45
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
46
|
-
string name = 3;
|
|
47
|
-
string description = 4;
|
|
48
|
-
string user = 5;
|
|
49
|
-
string pass = 6;
|
|
50
|
-
google.protobuf.Any credentials = 7; /// additional credentials as auth key or certificates etc
|
|
44
|
+
optional string id = 1;
|
|
45
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
46
|
+
optional string name = 3;
|
|
47
|
+
optional string description = 4;
|
|
48
|
+
optional string user = 5;
|
|
49
|
+
optional string pass = 6;
|
|
50
|
+
optional google.protobuf.Any credentials = 7; /// additional credentials as auth key or certificates etc
|
|
51
51
|
}
|
|
@@ -17,9 +17,7 @@ import "io/restorecommerce/organization.proto";
|
|
|
17
17
|
/*
|
|
18
18
|
Microservice definition.
|
|
19
19
|
*/
|
|
20
|
-
service
|
|
21
|
-
option (io.restorecommerce.options.service_name) = "customer";
|
|
22
|
-
|
|
20
|
+
service CustomerService {
|
|
23
21
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CustomerListResponse) {
|
|
24
22
|
option (io.restorecommerce.options.is_query) = true;
|
|
25
23
|
};
|
|
@@ -31,7 +29,7 @@ service Service {
|
|
|
31
29
|
|
|
32
30
|
message CustomerList {
|
|
33
31
|
repeated Customer items = 1;
|
|
34
|
-
uint32 total_count = 2;
|
|
32
|
+
optional uint32 total_count = 2;
|
|
35
33
|
io.restorecommerce.auth.Subject subject = 3;
|
|
36
34
|
}
|
|
37
35
|
|
|
@@ -47,8 +45,8 @@ message CustomerResponse {
|
|
|
47
45
|
}
|
|
48
46
|
|
|
49
47
|
message Customer {
|
|
50
|
-
string id = 1;
|
|
51
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
48
|
+
optional string id = 1;
|
|
49
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
52
50
|
oneof customer {
|
|
53
51
|
IndividualUser individual_user = 3;
|
|
54
52
|
OrgUser org_user = 4;
|
|
@@ -57,7 +55,7 @@ message Customer {
|
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
message IndividualUser {
|
|
60
|
-
string user_id = 1 [
|
|
58
|
+
optional string user_id = 1 [
|
|
61
59
|
(io.restorecommerce.options.resolver) = {
|
|
62
60
|
target_type: ".io.restorecommerce.user.User",
|
|
63
61
|
target_service: "identity",
|
|
@@ -66,7 +64,7 @@ message IndividualUser {
|
|
|
66
64
|
field_name: "user",
|
|
67
65
|
}
|
|
68
66
|
];
|
|
69
|
-
string address_id = 2 [
|
|
67
|
+
optional string address_id = 2 [
|
|
70
68
|
(io.restorecommerce.options.resolver) = {
|
|
71
69
|
target_type: ".io.restorecommerce.address.Address",
|
|
72
70
|
target_service: "resource",
|
|
@@ -87,7 +85,7 @@ message IndividualUser {
|
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
message OrgUser {
|
|
90
|
-
string user_id = 1 [
|
|
88
|
+
optional string user_id = 1 [
|
|
91
89
|
(io.restorecommerce.options.resolver) = {
|
|
92
90
|
target_type: ".io.restorecommerce.user.User",
|
|
93
91
|
target_service: "identity",
|
|
@@ -96,7 +94,7 @@ message OrgUser {
|
|
|
96
94
|
field_name: "user",
|
|
97
95
|
}
|
|
98
96
|
];
|
|
99
|
-
string organization_id = 2 [
|
|
97
|
+
optional string organization_id = 2 [
|
|
100
98
|
(io.restorecommerce.options.resolver) = {
|
|
101
99
|
target_type: ".io.restorecommerce.organization.Organization",
|
|
102
100
|
target_service: "resource",
|
|
@@ -109,7 +107,7 @@ message OrgUser {
|
|
|
109
107
|
|
|
110
108
|
message Guest {
|
|
111
109
|
bool guest = 1;
|
|
112
|
-
string address_id = 2 [
|
|
110
|
+
optional string address_id = 2 [
|
|
113
111
|
(io.restorecommerce.options.resolver) = {
|
|
114
112
|
target_type: ".io.restorecommerce.address.Address",
|
|
115
113
|
target_service: "resource",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.file;
|
|
4
|
+
|
|
5
|
+
message File {
|
|
6
|
+
optional string id = 1;
|
|
7
|
+
optional int64 index = 2;
|
|
8
|
+
optional string caption = 3;
|
|
9
|
+
optional string filename = 4;
|
|
10
|
+
optional string content_type = 5;
|
|
11
|
+
optional string url = 6;
|
|
12
|
+
optional int64 bytes = 7;
|
|
13
|
+
repeated string tags = 8;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message FileList {
|
|
17
|
+
repeated File items = 1;
|
|
18
|
+
optional uint32 total_count = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Deleted {
|
|
22
|
+
string id = 1;
|
|
23
|
+
}
|
|
@@ -8,52 +8,61 @@ import "io/restorecommerce/auth.proto";
|
|
|
8
8
|
import "io/restorecommerce/status.proto";
|
|
9
9
|
import "io/restorecommerce/meta.proto";
|
|
10
10
|
import "io/restorecommerce/address.proto";
|
|
11
|
+
import "io/restorecommerce/country.proto";
|
|
12
|
+
import "io/restorecommerce/product.proto";
|
|
11
13
|
import "io/restorecommerce/options.proto";
|
|
14
|
+
import "io/restorecommerce/tax.proto";
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
17
|
Microservice definition.
|
|
15
18
|
*/
|
|
16
|
-
service
|
|
17
|
-
option (io.restorecommerce.options.service_name) = "fulfillment";
|
|
18
|
-
|
|
19
|
+
service FulfillmentService {
|
|
19
20
|
/**
|
|
20
21
|
Returns a list of shipment IDs.
|
|
21
22
|
*/
|
|
22
|
-
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (
|
|
23
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentListResponse) {
|
|
23
24
|
option (io.restorecommerce.options.is_query) = true;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
Creates fulfillment orders
|
|
28
29
|
*/
|
|
29
|
-
rpc Create (FulfillmentList) returns (
|
|
30
|
+
rpc Create (FulfillmentList) returns (FulfillmentListResponse);
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
|
-
Updates fulfillment orders unless Status is beyond
|
|
33
|
+
Updates fulfillment orders unless Status is beyond Submit
|
|
33
34
|
*/
|
|
34
|
-
rpc Update (FulfillmentList) returns (
|
|
35
|
+
rpc Update (FulfillmentList) returns (FulfillmentListResponse);
|
|
35
36
|
|
|
36
37
|
/**
|
|
37
|
-
Creates or Updates fulfillment orders unless Status is beyond
|
|
38
|
+
Creates or Updates fulfillment orders unless Status is beyond Submit
|
|
38
39
|
*/
|
|
39
|
-
rpc Upsert (FulfillmentList) returns (
|
|
40
|
+
rpc Upsert (FulfillmentList) returns (FulfillmentListResponse);
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
|
-
|
|
43
|
+
Evaluate fulfillment for correctness
|
|
43
44
|
*/
|
|
44
|
-
rpc
|
|
45
|
+
rpc Evaluate (FulfillmentList) returns (FulfillmentListResponse);
|
|
45
46
|
|
|
46
47
|
/**
|
|
47
|
-
|
|
48
|
+
Creates, Submits and Updates fulfillment orders against API
|
|
48
49
|
*/
|
|
49
|
-
rpc
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
rpc Submit (FulfillmentList) returns (FulfillmentListResponse);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
Track a batch of fulfillments
|
|
54
|
+
*/
|
|
55
|
+
rpc Track (FulfillmentIdList) returns (FulfillmentListResponse);
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
|
-
|
|
58
|
+
Withdraw a batch of fulfillments and request for cancelation
|
|
55
59
|
*/
|
|
56
|
-
rpc
|
|
60
|
+
rpc Withdraw (FulfillmentIdList) returns (FulfillmentListResponse);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
Cancel a batch of fulfillments
|
|
64
|
+
*/
|
|
65
|
+
rpc Cancel (FulfillmentIdList) returns (FulfillmentListResponse);
|
|
57
66
|
|
|
58
67
|
/**
|
|
59
68
|
Delete a batch of fulfillments from the database
|
|
@@ -62,32 +71,26 @@ service Service {
|
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
enum State {
|
|
65
|
-
|
|
74
|
+
Created = 0;
|
|
66
75
|
Invalid = 1;
|
|
67
76
|
Failed = 2;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
message ShippingAddress {
|
|
76
|
-
io.restorecommerce.address.Address address = 1;
|
|
77
|
-
io.restorecommerce.address.ContactPerson contact_person = 2;
|
|
77
|
+
Submitted = 3;
|
|
78
|
+
InTransit = 4;
|
|
79
|
+
Fulfilled = 5;
|
|
80
|
+
Withdrawn = 6;
|
|
81
|
+
Cancelled = 7;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
message
|
|
81
|
-
|
|
82
|
-
string
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
string taric_code = 4;
|
|
86
|
-
int32 quantity = 5;
|
|
84
|
+
message FulfillmentItem {
|
|
85
|
+
optional string product_id = 1;
|
|
86
|
+
optional string variant_id = 2;
|
|
87
|
+
optional int32 quantity = 3;
|
|
88
|
+
optional io.restorecommerce.product.Package package = 4;
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
message Parcel {
|
|
90
|
-
string
|
|
92
|
+
optional string id = 1;
|
|
93
|
+
optional string product_id = 2 [
|
|
91
94
|
(io.restorecommerce.options.resolver) = {
|
|
92
95
|
target_type: ".io.restorecommerce.fulfillment_product.FulfillmentProduct",
|
|
93
96
|
target_service: "resource",
|
|
@@ -96,12 +99,11 @@ message Parcel {
|
|
|
96
99
|
field_name: "product",
|
|
97
100
|
}
|
|
98
101
|
];
|
|
99
|
-
string
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
float length_in_cm = 7;
|
|
102
|
+
optional string variant_id = 3;
|
|
103
|
+
optional FulfillmentItem item = 4;
|
|
104
|
+
optional double price = 5;
|
|
105
|
+
repeated io.restorecommerce.tax.VAT vats = 6; //Set by service
|
|
106
|
+
optional io.restorecommerce.product.Package package = 7;
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
message Label {
|
|
@@ -110,41 +112,59 @@ message Label {
|
|
|
110
112
|
string pdf = 2;
|
|
111
113
|
string png = 3;
|
|
112
114
|
}
|
|
113
|
-
string
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
optional string parcel_id = 4;
|
|
116
|
+
optional string shipment_number = 5; //filled on Order
|
|
117
|
+
optional State state = 6; //update by Track
|
|
118
|
+
optional io.restorecommerce.status.Status status = 7; //API status
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
message
|
|
119
|
-
string reference_id = 1;
|
|
121
|
+
message Packaging {
|
|
122
|
+
optional string reference_id = 1;
|
|
120
123
|
repeated Parcel parcels = 2;
|
|
121
|
-
ShippingAddress sender = 3;
|
|
122
|
-
ShippingAddress receiver = 4;
|
|
123
|
-
string notify = 5;
|
|
124
|
+
optional io.restorecommerce.address.ShippingAddress sender = 3;
|
|
125
|
+
optional io.restorecommerce.address.ShippingAddress receiver = 4;
|
|
126
|
+
optional string notify = 5;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
message Event {
|
|
130
|
+
optional int64 timestamp = 1;
|
|
131
|
+
optional string location = 2;
|
|
132
|
+
optional google.protobuf.Any details = 3;
|
|
133
|
+
optional io.restorecommerce.status.Status status = 4;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
message Tracking {
|
|
137
|
+
optional string shipment_number = 1;
|
|
138
|
+
repeated Event events = 3;
|
|
139
|
+
optional google.protobuf.Any details = 4;
|
|
140
|
+
optional io.restorecommerce.status.Status status = 5;
|
|
124
141
|
}
|
|
125
142
|
|
|
126
143
|
/**
|
|
127
|
-
This is the message how it get stored to the database
|
|
144
|
+
This is the message of how it get stored to the database
|
|
128
145
|
*/
|
|
129
146
|
message Fulfillment {
|
|
130
147
|
option (restorecommerce.options.kafka_subscriber) = {
|
|
131
|
-
plural: "
|
|
148
|
+
plural: "fulfillments"
|
|
132
149
|
topic: "io.restorecommerce.fulfillment.resource"
|
|
133
150
|
created: "fulfillmentCreated"
|
|
134
151
|
updated: "fulfillmentUpdated"
|
|
135
152
|
deleted: "fulfillmentDeleted"
|
|
136
153
|
};
|
|
137
154
|
|
|
138
|
-
string id = 1;
|
|
139
|
-
|
|
140
|
-
io.restorecommerce.meta.Meta meta = 3;
|
|
155
|
+
optional string id = 1;
|
|
156
|
+
optional Packaging packaging = 2; //filled by user
|
|
157
|
+
optional io.restorecommerce.meta.Meta meta = 3;
|
|
141
158
|
repeated Label labels = 4; //filled by service
|
|
142
|
-
|
|
159
|
+
repeated Tracking tracking = 5; //filled by service
|
|
160
|
+
optional State state = 6; //filled by service
|
|
161
|
+
optional double total_price = 7;
|
|
162
|
+
optional double total_vat = 8;
|
|
143
163
|
}
|
|
144
164
|
|
|
145
165
|
message FulfillmentList {
|
|
146
166
|
repeated Fulfillment items = 1;
|
|
147
|
-
uint32 total_count = 2;
|
|
167
|
+
optional uint32 total_count = 2;
|
|
148
168
|
io.restorecommerce.auth.Subject subject = 3;
|
|
149
169
|
}
|
|
150
170
|
|
|
@@ -153,62 +173,25 @@ message FulfillmentResponse {
|
|
|
153
173
|
io.restorecommerce.status.Status status = 2;
|
|
154
174
|
}
|
|
155
175
|
|
|
156
|
-
message
|
|
176
|
+
message FulfillmentListResponse {
|
|
157
177
|
repeated FulfillmentResponse items = 1;
|
|
158
178
|
uint32 total_count = 2;
|
|
159
179
|
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
160
180
|
}
|
|
161
181
|
|
|
162
|
-
message
|
|
163
|
-
string
|
|
182
|
+
message FulfillmentId {
|
|
183
|
+
optional string id = 1;
|
|
164
184
|
repeated string shipment_numbers = 2; //optional
|
|
165
|
-
google.protobuf.Any options = 3;
|
|
185
|
+
optional google.protobuf.Any options = 3;
|
|
186
|
+
optional io.restorecommerce.auth.Subject subject = 4;
|
|
166
187
|
}
|
|
167
188
|
|
|
168
|
-
message
|
|
169
|
-
repeated
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
message Event {
|
|
174
|
-
int64 timestamp = 1;
|
|
175
|
-
string location = 2;
|
|
176
|
-
google.protobuf.Any details = 3;
|
|
177
|
-
io.restorecommerce.status.Status status = 4;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
message Tracking {
|
|
181
|
-
string shipment_number = 1;
|
|
182
|
-
repeated Event events = 3;
|
|
183
|
-
google.protobuf.Any details = 4;
|
|
184
|
-
io.restorecommerce.status.Status status = 5;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
message TrackingResult {
|
|
188
|
-
Fulfillment fulfillment = 1 [
|
|
189
|
-
(io.restorecommerce.options.resolver) = {
|
|
190
|
-
target_type: ".io.restorecommerce.fulfillment.Fulfillment",
|
|
191
|
-
target_service: "resource",
|
|
192
|
-
target_sub_service: "fulfillment",
|
|
193
|
-
target_method: "Read",
|
|
194
|
-
field_name: "fulfillment",
|
|
195
|
-
}
|
|
196
|
-
];
|
|
197
|
-
repeated Tracking tracks = 2;
|
|
198
|
-
io.restorecommerce.status.Status status = 3;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
message TrackingResultList {
|
|
202
|
-
repeated TrackingResult items = 1;
|
|
203
|
-
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
message CancelRequestList {
|
|
207
|
-
repeated string ids = 1;
|
|
208
|
-
io.restorecommerce.auth.Subject subject = 2;
|
|
189
|
+
message FulfillmentIdList {
|
|
190
|
+
repeated FulfillmentId items = 1;
|
|
191
|
+
optional uint32 total_count = 2;
|
|
192
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
209
193
|
}
|
|
210
194
|
|
|
211
195
|
message Deleted {
|
|
212
196
|
string id = 1;
|
|
213
|
-
}
|
|
214
|
-
|
|
197
|
+
}
|