@restorecommerce/protos 0.7.0 → 1.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 +33 -0
- package/echo/echo.proto +24 -0
- package/io/restorecommerce/address.proto +5 -5
- package/io/restorecommerce/contact_point.proto +20 -20
- package/io/restorecommerce/customer.proto +35 -35
- package/io/restorecommerce/invoice.proto +5 -5
- package/io/restorecommerce/location.proto +15 -15
- package/io/restorecommerce/options.proto +3 -3
- package/io/restorecommerce/order.proto +10 -10
- package/io/restorecommerce/organization.proto +15 -15
- package/io/restorecommerce/product.proto +5 -5
- package/io/restorecommerce/product_category.proto +5 -5
- package/io/restorecommerce/resource_base.proto +1 -6
- package/io/restorecommerce/tax.proto +10 -10
- package/io/restorecommerce/user.proto +20 -20
- package/package.json +2 -2
- package/test/test.proto +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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
|
+
# [1.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@0.7.2...@restorecommerce/protos@1.0.0) (2022-08-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* move to fully typed grpc client and server ([aeee2f2](https://github.com/restorecommerce/libs/commit/aeee2f2b7ca470223d7bc42fd7cafd4bb8387796))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.7.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@0.7.1...@restorecommerce/protos@0.7.2) (2022-06-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* remove optional from protos ([dee7264](https://github.com/restorecommerce/libs/commit/dee7264ec862bbe7fa5ada55dcb3fd9227e06ef8))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [0.7.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@0.7.0...@restorecommerce/protos@0.7.1) (2022-06-14)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* change semicolon to comma in options ([9e4b9e1](https://github.com/restorecommerce/libs/commit/9e4b9e190c31edadc414dba6b5311fe931e2f372))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [0.7.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@0.6.9...@restorecommerce/protos@0.7.0) (2022-06-10)
|
|
7
40
|
|
|
8
41
|
|
package/echo/echo.proto
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package echo;
|
|
3
|
+
|
|
4
|
+
// import "google/protobuf/wrappers.proto";
|
|
5
|
+
import "google/protobuf/any.proto";
|
|
6
|
+
|
|
7
|
+
// The greeting service definition.
|
|
8
|
+
service EchoService {
|
|
9
|
+
// Sends a greeting
|
|
10
|
+
rpc echoUnary (EchoRequest) returns (EchoResponse) {}
|
|
11
|
+
rpc echoServerStream (EchoRequest) returns (stream EchoResponse) {}
|
|
12
|
+
rpc echoClientStream (stream EchoRequest) returns (EchoResponse) {}
|
|
13
|
+
rpc echoBidiStream (stream EchoRequest) returns (stream EchoResponse) {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message EchoRequest {
|
|
17
|
+
string message = 1;
|
|
18
|
+
google.protobuf.Any test = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message EchoResponse {
|
|
22
|
+
string message = 1;
|
|
23
|
+
google.protobuf.Any test = 2;
|
|
24
|
+
}
|
|
@@ -58,11 +58,11 @@ message Address {
|
|
|
58
58
|
string postcode = 3;
|
|
59
59
|
string country_id = 4 [
|
|
60
60
|
(io.restorecommerce.options.resolver) = {
|
|
61
|
-
target_type: ".io.restorecommerce.country.Country"
|
|
62
|
-
target_service: "resource"
|
|
63
|
-
target_sub_service: "country"
|
|
64
|
-
target_method: "Read"
|
|
65
|
-
field_name: "country"
|
|
61
|
+
target_type: ".io.restorecommerce.country.Country",
|
|
62
|
+
target_service: "resource",
|
|
63
|
+
target_sub_service: "country",
|
|
64
|
+
target_method: "Read",
|
|
65
|
+
field_name: "country",
|
|
66
66
|
}
|
|
67
67
|
];
|
|
68
68
|
string locality = 5;
|
|
@@ -52,41 +52,41 @@ message ContactPoint {
|
|
|
52
52
|
io.restorecommerce.meta.Meta meta = 2;
|
|
53
53
|
string physical_address_id = 3 [
|
|
54
54
|
(io.restorecommerce.options.resolver) = {
|
|
55
|
-
target_type: ".io.restorecommerce.address.Address"
|
|
56
|
-
target_service: "resource"
|
|
57
|
-
target_sub_service: "address"
|
|
58
|
-
target_method: "Read"
|
|
59
|
-
field_name: "physicalAddress"
|
|
55
|
+
target_type: ".io.restorecommerce.address.Address",
|
|
56
|
+
target_service: "resource",
|
|
57
|
+
target_sub_service: "address",
|
|
58
|
+
target_method: "Read",
|
|
59
|
+
field_name: "physicalAddress",
|
|
60
60
|
}
|
|
61
61
|
];
|
|
62
62
|
string website = 4;
|
|
63
63
|
string email = 5;
|
|
64
64
|
string contact_point_type_id = 6 [
|
|
65
65
|
(io.restorecommerce.options.resolver) = {
|
|
66
|
-
target_type: ".io.restorecommerce.contact_point_type.ContactPointType"
|
|
67
|
-
target_service: "resource"
|
|
68
|
-
target_sub_service: "contact_point_type"
|
|
69
|
-
target_method: "Read"
|
|
70
|
-
field_name: "contactPointType"
|
|
66
|
+
target_type: ".io.restorecommerce.contact_point_type.ContactPointType",
|
|
67
|
+
target_service: "resource",
|
|
68
|
+
target_sub_service: "contact_point_type",
|
|
69
|
+
target_method: "Read",
|
|
70
|
+
field_name: "contactPointType",
|
|
71
71
|
}
|
|
72
72
|
];
|
|
73
73
|
string telephone = 8;
|
|
74
74
|
string timezone_id = 9 [
|
|
75
75
|
(io.restorecommerce.options.resolver) = {
|
|
76
|
-
target_type: ".io.restorecommerce.timezone.Timezone"
|
|
77
|
-
target_service: "resource"
|
|
78
|
-
target_sub_service: "timezone"
|
|
79
|
-
target_method: "Read"
|
|
80
|
-
field_name: "timezone"
|
|
76
|
+
target_type: ".io.restorecommerce.timezone.Timezone",
|
|
77
|
+
target_service: "resource",
|
|
78
|
+
target_sub_service: "timezone",
|
|
79
|
+
target_method: "Read",
|
|
80
|
+
field_name: "timezone",
|
|
81
81
|
}
|
|
82
82
|
];
|
|
83
83
|
string locale_id = 10 [
|
|
84
84
|
(io.restorecommerce.options.resolver) = {
|
|
85
|
-
target_type: ".io.restorecommerce.locale.Locale"
|
|
86
|
-
target_service: "resource"
|
|
87
|
-
target_sub_service: "locale"
|
|
88
|
-
target_method: "Read"
|
|
89
|
-
field_name: "locale"
|
|
85
|
+
target_type: ".io.restorecommerce.locale.Locale",
|
|
86
|
+
target_service: "resource",
|
|
87
|
+
target_sub_service: "locale",
|
|
88
|
+
target_method: "Read",
|
|
89
|
+
field_name: "locale",
|
|
90
90
|
}
|
|
91
91
|
];
|
|
92
92
|
}
|
|
@@ -59,29 +59,29 @@ message Customer {
|
|
|
59
59
|
message IndividualUser {
|
|
60
60
|
string user_id = 1 [
|
|
61
61
|
(io.restorecommerce.options.resolver) = {
|
|
62
|
-
target_type: ".io.restorecommerce.user.User"
|
|
63
|
-
target_service: "identity"
|
|
64
|
-
target_sub_service: "user"
|
|
65
|
-
target_method: "Read"
|
|
66
|
-
field_name: "user"
|
|
62
|
+
target_type: ".io.restorecommerce.user.User",
|
|
63
|
+
target_service: "identity",
|
|
64
|
+
target_sub_service: "user",
|
|
65
|
+
target_method: "Read",
|
|
66
|
+
field_name: "user",
|
|
67
67
|
}
|
|
68
68
|
];
|
|
69
69
|
string address_id = 2 [
|
|
70
70
|
(io.restorecommerce.options.resolver) = {
|
|
71
|
-
target_type: ".io.restorecommerce.address.Address"
|
|
72
|
-
target_service: "resource"
|
|
73
|
-
target_sub_service: "address"
|
|
74
|
-
target_method: "Read"
|
|
75
|
-
field_name: "address"
|
|
71
|
+
target_type: ".io.restorecommerce.address.Address",
|
|
72
|
+
target_service: "resource",
|
|
73
|
+
target_sub_service: "address",
|
|
74
|
+
target_method: "Read",
|
|
75
|
+
field_name: "address",
|
|
76
76
|
}
|
|
77
77
|
];
|
|
78
78
|
repeated string contact_point_ids = 3 [
|
|
79
79
|
(io.restorecommerce.options.resolver) = {
|
|
80
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint"
|
|
81
|
-
target_service: "resource"
|
|
82
|
-
target_sub_service: "contact_point"
|
|
83
|
-
target_method: "Read"
|
|
84
|
-
field_name: "contactPoints"
|
|
80
|
+
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
81
|
+
target_service: "resource",
|
|
82
|
+
target_sub_service: "contact_point",
|
|
83
|
+
target_method: "Read",
|
|
84
|
+
field_name: "contactPoints",
|
|
85
85
|
}
|
|
86
86
|
];
|
|
87
87
|
}
|
|
@@ -89,20 +89,20 @@ message IndividualUser {
|
|
|
89
89
|
message OrgUser {
|
|
90
90
|
string user_id = 1 [
|
|
91
91
|
(io.restorecommerce.options.resolver) = {
|
|
92
|
-
target_type: ".io.restorecommerce.user.User"
|
|
93
|
-
target_service: "identity"
|
|
94
|
-
target_sub_service: "user"
|
|
95
|
-
target_method: "Read"
|
|
96
|
-
field_name: "user"
|
|
92
|
+
target_type: ".io.restorecommerce.user.User",
|
|
93
|
+
target_service: "identity",
|
|
94
|
+
target_sub_service: "user",
|
|
95
|
+
target_method: "Read",
|
|
96
|
+
field_name: "user",
|
|
97
97
|
}
|
|
98
98
|
];
|
|
99
99
|
string organization_id = 2 [
|
|
100
100
|
(io.restorecommerce.options.resolver) = {
|
|
101
|
-
target_type: ".io.restorecommerce.organization.Organization"
|
|
102
|
-
target_service: "resource"
|
|
103
|
-
target_sub_service: "organization"
|
|
104
|
-
target_method: "Read"
|
|
105
|
-
field_name: "organization"
|
|
101
|
+
target_type: ".io.restorecommerce.organization.Organization",
|
|
102
|
+
target_service: "resource",
|
|
103
|
+
target_sub_service: "organization",
|
|
104
|
+
target_method: "Read",
|
|
105
|
+
field_name: "organization",
|
|
106
106
|
}
|
|
107
107
|
];
|
|
108
108
|
}
|
|
@@ -111,20 +111,20 @@ message Guest {
|
|
|
111
111
|
bool guest = 1;
|
|
112
112
|
string address_id = 2 [
|
|
113
113
|
(io.restorecommerce.options.resolver) = {
|
|
114
|
-
target_type: ".io.restorecommerce.address.Address"
|
|
115
|
-
target_service: "resource"
|
|
116
|
-
target_sub_service: "address"
|
|
117
|
-
target_method: "Read"
|
|
118
|
-
field_name: "address"
|
|
114
|
+
target_type: ".io.restorecommerce.address.Address",
|
|
115
|
+
target_service: "resource",
|
|
116
|
+
target_sub_service: "address",
|
|
117
|
+
target_method: "Read",
|
|
118
|
+
field_name: "address",
|
|
119
119
|
}
|
|
120
120
|
];
|
|
121
121
|
repeated string contact_point_ids = 3 [
|
|
122
122
|
(io.restorecommerce.options.resolver) = {
|
|
123
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint"
|
|
124
|
-
target_service: "resource"
|
|
125
|
-
target_sub_service: "contact_point"
|
|
126
|
-
target_method: "Read"
|
|
127
|
-
field_name: "contactPoints"
|
|
123
|
+
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
124
|
+
target_service: "resource",
|
|
125
|
+
target_sub_service: "contact_point",
|
|
126
|
+
target_method: "Read",
|
|
127
|
+
field_name: "contactPoints",
|
|
128
128
|
}
|
|
129
129
|
];
|
|
130
130
|
}
|
|
@@ -71,11 +71,11 @@ message Invoice {
|
|
|
71
71
|
string timestamp = 4;
|
|
72
72
|
string customer_id = 5 [
|
|
73
73
|
(io.restorecommerce.options.resolver) = {
|
|
74
|
-
target_type: ".io.restorecommerce.customer.Customer"
|
|
75
|
-
target_service: "resource"
|
|
76
|
-
target_sub_service: "customer"
|
|
77
|
-
target_method: "Read"
|
|
78
|
-
field_name: "customer"
|
|
74
|
+
target_type: ".io.restorecommerce.customer.Customer",
|
|
75
|
+
target_service: "resource",
|
|
76
|
+
target_sub_service: "customer",
|
|
77
|
+
target_method: "Read",
|
|
78
|
+
field_name: "customer",
|
|
79
79
|
}
|
|
80
80
|
];
|
|
81
81
|
string payment_status = 6;
|
|
@@ -56,29 +56,29 @@ message Location {
|
|
|
56
56
|
string description = 4;
|
|
57
57
|
string organization_id = 5 [
|
|
58
58
|
(io.restorecommerce.options.resolver) = {
|
|
59
|
-
target_type: ".io.restorecommerce.organization.Organization"
|
|
60
|
-
target_service: "resource"
|
|
61
|
-
target_sub_service: "organization"
|
|
62
|
-
target_method: "Read"
|
|
63
|
-
field_name: "organization"
|
|
59
|
+
target_type: ".io.restorecommerce.organization.Organization",
|
|
60
|
+
target_service: "resource",
|
|
61
|
+
target_sub_service: "organization",
|
|
62
|
+
target_method: "Read",
|
|
63
|
+
field_name: "organization",
|
|
64
64
|
}
|
|
65
65
|
]; // Organization to which this location is linked
|
|
66
66
|
string parent_id = 6 [
|
|
67
67
|
(io.restorecommerce.options.resolver) = {
|
|
68
|
-
target_type: ".io.restorecommerce.location.Location"
|
|
69
|
-
target_service: "resource"
|
|
70
|
-
target_sub_service: "location"
|
|
71
|
-
target_method: "Read"
|
|
72
|
-
field_name: "parent"
|
|
68
|
+
target_type: ".io.restorecommerce.location.Location",
|
|
69
|
+
target_service: "resource",
|
|
70
|
+
target_sub_service: "location",
|
|
71
|
+
target_method: "Read",
|
|
72
|
+
field_name: "parent",
|
|
73
73
|
}
|
|
74
74
|
]; // Location which may contain this location; may be null
|
|
75
75
|
string address_id = 8 [
|
|
76
76
|
(io.restorecommerce.options.resolver) = {
|
|
77
|
-
target_type: ".io.restorecommerce.address.Address"
|
|
78
|
-
target_service: "resource"
|
|
79
|
-
target_sub_service: "address"
|
|
80
|
-
target_method: "Read"
|
|
81
|
-
field_name: "address"
|
|
77
|
+
target_type: ".io.restorecommerce.address.Address",
|
|
78
|
+
target_service: "resource",
|
|
79
|
+
target_sub_service: "address",
|
|
80
|
+
target_method: "Read",
|
|
81
|
+
field_name: "address",
|
|
82
82
|
}
|
|
83
83
|
];
|
|
84
84
|
google.protobuf.Any data = 9; /// additional data
|
|
@@ -5,15 +5,15 @@ import "google/protobuf/descriptor.proto";
|
|
|
5
5
|
package io.restorecommerce.options;
|
|
6
6
|
|
|
7
7
|
extend google.protobuf.FieldOptions {
|
|
8
|
-
|
|
8
|
+
Resolver resolver = 31000;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
extend google.protobuf.MethodOptions {
|
|
12
|
-
|
|
12
|
+
bool is_query = 31001;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
extend google.protobuf.ServiceOptions {
|
|
16
|
-
|
|
16
|
+
string service_name = 31002;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
message Resolver {
|
|
@@ -55,20 +55,20 @@ message Order {
|
|
|
55
55
|
// shipping address
|
|
56
56
|
string shipping_contact_point_id = 9 [
|
|
57
57
|
(io.restorecommerce.options.resolver) = {
|
|
58
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint"
|
|
59
|
-
target_service: "resource"
|
|
60
|
-
target_sub_service: "contact_point"
|
|
61
|
-
target_method: "Read"
|
|
62
|
-
field_name: "shippingContactPoint"
|
|
58
|
+
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
59
|
+
target_service: "resource",
|
|
60
|
+
target_sub_service: "contact_point",
|
|
61
|
+
target_method: "Read",
|
|
62
|
+
field_name: "shippingContactPoint",
|
|
63
63
|
}
|
|
64
64
|
];
|
|
65
65
|
string billing_contact_point_id = 10 [
|
|
66
66
|
(io.restorecommerce.options.resolver) = {
|
|
67
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint"
|
|
68
|
-
target_service: "resource"
|
|
69
|
-
target_sub_service: "contact_point"
|
|
70
|
-
target_method: "Read"
|
|
71
|
-
field_name: "billingContactPoint"
|
|
67
|
+
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
68
|
+
target_service: "resource",
|
|
69
|
+
target_sub_service: "contact_point",
|
|
70
|
+
target_method: "Read",
|
|
71
|
+
field_name: "billingContactPoint",
|
|
72
72
|
}
|
|
73
73
|
];
|
|
74
74
|
double total_weight_in_kg = 11;
|
|
@@ -57,29 +57,29 @@ message Organization {
|
|
|
57
57
|
io.restorecommerce.meta.Meta meta = 2;
|
|
58
58
|
string address_id = 3 [
|
|
59
59
|
(io.restorecommerce.options.resolver) = {
|
|
60
|
-
target_type: ".io.restorecommerce.address.Address"
|
|
61
|
-
target_service: "resource"
|
|
62
|
-
target_sub_service: "address"
|
|
63
|
-
target_method: "Read"
|
|
64
|
-
field_name: "address"
|
|
60
|
+
target_type: ".io.restorecommerce.address.Address",
|
|
61
|
+
target_service: "resource",
|
|
62
|
+
target_sub_service: "address",
|
|
63
|
+
target_method: "Read",
|
|
64
|
+
field_name: "address",
|
|
65
65
|
}
|
|
66
66
|
]; /// Address for the organization
|
|
67
67
|
string parent_id = 4 [
|
|
68
68
|
(io.restorecommerce.options.resolver) = {
|
|
69
|
-
target_type: ".io.restorecommerce.organization.Organization"
|
|
70
|
-
target_service: "resource"
|
|
71
|
-
target_sub_service: "organization"
|
|
72
|
-
target_method: "Read"
|
|
73
|
-
field_name: "parent"
|
|
69
|
+
target_type: ".io.restorecommerce.organization.Organization",
|
|
70
|
+
target_service: "resource",
|
|
71
|
+
target_sub_service: "organization",
|
|
72
|
+
target_method: "Read",
|
|
73
|
+
field_name: "parent",
|
|
74
74
|
}
|
|
75
75
|
]; // Hierarchically superior organization; may be null
|
|
76
76
|
repeated string contact_point_ids = 6 [
|
|
77
77
|
(io.restorecommerce.options.resolver) = {
|
|
78
|
-
target_type: ".io.restorecommerce.contact_point.ContactPoint"
|
|
79
|
-
target_service: "resource"
|
|
80
|
-
target_sub_service: "contact_point"
|
|
81
|
-
target_method: "Read"
|
|
82
|
-
field_name: "contactPoints"
|
|
78
|
+
target_type: ".io.restorecommerce.contact_point.ContactPoint",
|
|
79
|
+
target_service: "resource",
|
|
80
|
+
target_sub_service: "contact_point",
|
|
81
|
+
target_method: "Read",
|
|
82
|
+
field_name: "contactPoints",
|
|
83
83
|
}
|
|
84
84
|
]; // list of possible legal addresses of different types
|
|
85
85
|
string website = 7;
|
|
@@ -42,11 +42,11 @@ message Product {
|
|
|
42
42
|
string description = 3;
|
|
43
43
|
string manufacturer_id = 4 [
|
|
44
44
|
(io.restorecommerce.options.resolver) = {
|
|
45
|
-
target_type: ".io.restorecommerce.manufacturer.Manufacturer"
|
|
46
|
-
target_service: "catalog"
|
|
47
|
-
target_sub_service: "manufacturer"
|
|
48
|
-
target_method: "Read"
|
|
49
|
-
field_name: "manufacturer"
|
|
45
|
+
target_type: ".io.restorecommerce.manufacturer.Manufacturer",
|
|
46
|
+
target_service: "catalog",
|
|
47
|
+
target_sub_service: "manufacturer",
|
|
48
|
+
target_method: "Read",
|
|
49
|
+
field_name: "manufacturer",
|
|
50
50
|
}
|
|
51
51
|
];
|
|
52
52
|
string taric_code = 5;
|
|
@@ -20,11 +20,11 @@ message ProductCategory {
|
|
|
20
20
|
string description = 4;
|
|
21
21
|
string price_group_id = 5 [
|
|
22
22
|
(io.restorecommerce.options.resolver) = {
|
|
23
|
-
target_type: ".io.restorecommerce.price_group.PriceGroup"
|
|
24
|
-
target_service: "catalog"
|
|
25
|
-
target_sub_service: "price_group"
|
|
26
|
-
target_method: "Read"
|
|
27
|
-
field_name: "priceGroup"
|
|
23
|
+
target_type: ".io.restorecommerce.price_group.PriceGroup",
|
|
24
|
+
target_service: "catalog",
|
|
25
|
+
target_sub_service: "price_group",
|
|
26
|
+
target_method: "Read",
|
|
27
|
+
field_name: "priceGroup",
|
|
28
28
|
}
|
|
29
29
|
];
|
|
30
30
|
io.restorecommerce.image.Image image = 6;
|
|
@@ -53,22 +53,22 @@ message Tax {
|
|
|
53
53
|
io.restorecommerce.meta.Meta meta = 2;
|
|
54
54
|
string country_id = 3 [
|
|
55
55
|
(io.restorecommerce.options.resolver) = {
|
|
56
|
-
target_type: ".io.restorecommerce.country.Country"
|
|
57
|
-
target_service: "resource"
|
|
58
|
-
target_sub_service: "country"
|
|
59
|
-
target_method: "Read"
|
|
60
|
-
field_name: "country"
|
|
56
|
+
target_type: ".io.restorecommerce.country.Country",
|
|
57
|
+
target_service: "resource",
|
|
58
|
+
target_sub_service: "country",
|
|
59
|
+
target_method: "Read",
|
|
60
|
+
field_name: "country",
|
|
61
61
|
}
|
|
62
62
|
];
|
|
63
63
|
double rate = 4;
|
|
64
64
|
string variant = 5;
|
|
65
65
|
string type_id = 6 [
|
|
66
66
|
(io.restorecommerce.options.resolver) = {
|
|
67
|
-
target_type: ".io.restorecommerce.tax_type.TaxType"
|
|
68
|
-
target_service: "resource"
|
|
69
|
-
target_sub_service: "tax_type"
|
|
70
|
-
target_method: "Read"
|
|
71
|
-
field_name: "type"
|
|
67
|
+
target_type: ".io.restorecommerce.tax_type.TaxType",
|
|
68
|
+
target_service: "resource",
|
|
69
|
+
target_sub_service: "tax_type",
|
|
70
|
+
target_method: "Read",
|
|
71
|
+
field_name: "type",
|
|
72
72
|
}
|
|
73
73
|
];
|
|
74
74
|
}
|
|
@@ -272,20 +272,20 @@ message User {
|
|
|
272
272
|
repeated io.restorecommerce.auth.RoleAssociation role_associations = 12; // A user can have multiple roles and different attributes coupled with each role
|
|
273
273
|
string timezone_id = 13 [
|
|
274
274
|
(io.restorecommerce.options.resolver) = {
|
|
275
|
-
target_type: ".io.restorecommerce.timezone.Timezone"
|
|
276
|
-
target_service: "resource"
|
|
277
|
-
target_sub_service: "timezone"
|
|
278
|
-
target_method: "Read"
|
|
279
|
-
field_name: "timezone"
|
|
275
|
+
target_type: ".io.restorecommerce.timezone.Timezone",
|
|
276
|
+
target_service: "resource",
|
|
277
|
+
target_sub_service: "timezone",
|
|
278
|
+
target_method: "Read",
|
|
279
|
+
field_name: "timezone",
|
|
280
280
|
}
|
|
281
281
|
]; // timezone_id specifications
|
|
282
282
|
string locale_id = 14 [
|
|
283
283
|
(io.restorecommerce.options.resolver) = {
|
|
284
|
-
target_type: ".io.restorecommerce.locale.Locale"
|
|
285
|
-
target_service: "resource"
|
|
286
|
-
target_sub_service: "locale"
|
|
287
|
-
target_method: "Read"
|
|
288
|
-
field_name: "locale"
|
|
284
|
+
target_type: ".io.restorecommerce.locale.Locale",
|
|
285
|
+
target_service: "resource",
|
|
286
|
+
target_sub_service: "locale",
|
|
287
|
+
target_method: "Read",
|
|
288
|
+
field_name: "locale",
|
|
289
289
|
}
|
|
290
290
|
]; // locale specifications
|
|
291
291
|
string default_scope = 15; // default hierarchical scope
|
|
@@ -320,20 +320,20 @@ message UserRole {
|
|
|
320
320
|
repeated io.restorecommerce.auth.RoleAssociation role_associations = 12; // A user can have multiple roles and different attributes coupled with each role
|
|
321
321
|
string timezone_id = 13 [
|
|
322
322
|
(io.restorecommerce.options.resolver) = {
|
|
323
|
-
target_type: ".io.restorecommerce.timezone.Timezone"
|
|
324
|
-
target_service: "resource"
|
|
325
|
-
target_sub_service: "timezone"
|
|
326
|
-
target_method: "Read"
|
|
327
|
-
field_name: "timezone"
|
|
323
|
+
target_type: ".io.restorecommerce.timezone.Timezone",
|
|
324
|
+
target_service: "resource",
|
|
325
|
+
target_sub_service: "timezone",
|
|
326
|
+
target_method: "Read",
|
|
327
|
+
field_name: "timezone",
|
|
328
328
|
}
|
|
329
329
|
]; // timezone_id specifications
|
|
330
330
|
string locale_id = 14 [
|
|
331
331
|
(io.restorecommerce.options.resolver) = {
|
|
332
|
-
target_type: ".io.restorecommerce.locale.Locale"
|
|
333
|
-
target_service: "resource"
|
|
334
|
-
target_sub_service: "locale"
|
|
335
|
-
target_method: "Read"
|
|
336
|
-
field_name: "locale"
|
|
332
|
+
target_type: ".io.restorecommerce.locale.Locale",
|
|
333
|
+
target_service: "resource",
|
|
334
|
+
target_sub_service: "locale",
|
|
335
|
+
target_method: "Read",
|
|
336
|
+
field_name: "locale",
|
|
337
337
|
}
|
|
338
338
|
]; // locale specifications
|
|
339
339
|
string default_scope = 15; // default hierarchical scope
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/protos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Protobuf descriptors for Restorecommerce services",
|
|
5
5
|
"author": "n-fuse GmbH",
|
|
6
6
|
"repository": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"protobufs"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "2b25803ec9494c298f4f008a55485bc201c83bb8"
|
|
19
19
|
}
|
package/test/test.proto
CHANGED
|
@@ -5,6 +5,7 @@ import "google/protobuf/any.proto";
|
|
|
5
5
|
import "io/restorecommerce/resource_base.proto";
|
|
6
6
|
import "io/restorecommerce/meta.proto";
|
|
7
7
|
import "io/restorecommerce/status.proto";
|
|
8
|
+
import "io/restorecommerce/auth.proto";
|
|
8
9
|
|
|
9
10
|
service Test {
|
|
10
11
|
rpc Test (TestRequest) returns (TestResponse);
|
|
@@ -24,6 +25,14 @@ service Stream {
|
|
|
24
25
|
rpc RequestStream (stream TestRequest) returns (TestResponse);
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
service CRUD {
|
|
29
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ResourceListResponse);
|
|
30
|
+
rpc Create (ResourceList) returns (ResourceListResponse);
|
|
31
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
32
|
+
rpc Update (ResourceList) returns (ResourceListResponse);
|
|
33
|
+
rpc Upsert (ResourceList) returns (ResourceListResponse);
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
message TestRequest {
|
|
28
37
|
string value = 1;
|
|
29
38
|
}
|
|
@@ -69,3 +78,32 @@ message TestBufferedDataListResponse {
|
|
|
69
78
|
message ExtendMe {
|
|
70
79
|
int32 bar = 126;
|
|
71
80
|
}
|
|
81
|
+
|
|
82
|
+
message ResourceList {
|
|
83
|
+
repeated Resource items = 1;
|
|
84
|
+
uint32 total_count = 2;
|
|
85
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message ResourceListResponse {
|
|
89
|
+
repeated ResourceResponse items = 1;
|
|
90
|
+
uint32 total_count = 2;
|
|
91
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message ResourceResponse {
|
|
95
|
+
Resource payload = 1;
|
|
96
|
+
io.restorecommerce.status.Status status = 2;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/// Example resource
|
|
100
|
+
message Resource {
|
|
101
|
+
string id = 1;
|
|
102
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
103
|
+
int32 value = 3;
|
|
104
|
+
string text = 4;
|
|
105
|
+
bool active = 5;
|
|
106
|
+
double created = 6;
|
|
107
|
+
string status = 7;
|
|
108
|
+
optional google.protobuf.Any data = 8;
|
|
109
|
+
}
|