@restorecommerce/protos 0.4.5
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 +214 -0
- package/LICENSE +19 -0
- package/README.md +9 -0
- package/google/protobuf/any.proto +133 -0
- package/google/protobuf/descriptor.proto +805 -0
- package/google/protobuf/empty.proto +53 -0
- package/google/protobuf/struct.proto +96 -0
- package/google/protobuf/wrappers.proto +123 -0
- package/grpc/health/v1/health.proto +50 -0
- package/grpc/reflection/v1alpha/reflection.proto +154 -0
- package/io/restorecommerce/access_control.proto +48 -0
- package/io/restorecommerce/address.proto +65 -0
- package/io/restorecommerce/attribute.proto +13 -0
- package/io/restorecommerce/auth.proto +48 -0
- package/io/restorecommerce/authentication_log.proto +56 -0
- package/io/restorecommerce/command.proto +57 -0
- package/io/restorecommerce/commandinterface.proto +30 -0
- package/io/restorecommerce/contact_point.proto +49 -0
- package/io/restorecommerce/contact_point_type.proto +46 -0
- package/io/restorecommerce/country.proto +49 -0
- package/io/restorecommerce/credential.proto +51 -0
- package/io/restorecommerce/customer.proto +63 -0
- package/io/restorecommerce/filter.proto +38 -0
- package/io/restorecommerce/fulfillment.proto +199 -0
- package/io/restorecommerce/fulfillment_courier.proto +54 -0
- package/io/restorecommerce/fulfillment_product.proto +49 -0
- package/io/restorecommerce/graph.proto +76 -0
- package/io/restorecommerce/image.proto +24 -0
- package/io/restorecommerce/invoice.proto +121 -0
- package/io/restorecommerce/job.proto +173 -0
- package/io/restorecommerce/locale.proto +47 -0
- package/io/restorecommerce/location.proto +53 -0
- package/io/restorecommerce/manufacturer.proto +45 -0
- package/io/restorecommerce/meta.proto +15 -0
- package/io/restorecommerce/notification.proto +52 -0
- package/io/restorecommerce/notification_channel.proto +50 -0
- package/io/restorecommerce/notification_req.proto +49 -0
- package/io/restorecommerce/order.proto +121 -0
- package/io/restorecommerce/organization.proto +63 -0
- package/io/restorecommerce/ostorage.proto +154 -0
- package/io/restorecommerce/payment.proto +115 -0
- package/io/restorecommerce/payment_method.proto +60 -0
- package/io/restorecommerce/policy.proto +59 -0
- package/io/restorecommerce/policy_set.proto +53 -0
- package/io/restorecommerce/price_group.proto +45 -0
- package/io/restorecommerce/product.proto +101 -0
- package/io/restorecommerce/product_category.proto +53 -0
- package/io/restorecommerce/product_prototype.proto +47 -0
- package/io/restorecommerce/rendering.proto +34 -0
- package/io/restorecommerce/resource_base.proto +137 -0
- package/io/restorecommerce/role.proto +45 -0
- package/io/restorecommerce/rule.proto +86 -0
- package/io/restorecommerce/search.proto +21 -0
- package/io/restorecommerce/status.proto +26 -0
- package/io/restorecommerce/tax.proto +49 -0
- package/io/restorecommerce/tax_type.proto +47 -0
- package/io/restorecommerce/timezone.proto +46 -0
- package/io/restorecommerce/token.proto +36 -0
- package/io/restorecommerce/user.proto +258 -0
- package/package.json +19 -0
- package/test/test.proto +71 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.tax_type;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/auth.proto";
|
|
8
|
+
import "io/restorecommerce/status.proto";
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Microservice definition.
|
|
12
|
+
*/
|
|
13
|
+
service Service {
|
|
14
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (TaxTypeListResponse);
|
|
15
|
+
rpc Create (TaxTypeList) returns (TaxTypeListResponse);
|
|
16
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
17
|
+
rpc Update (TaxTypeList) returns (TaxTypeListResponse);
|
|
18
|
+
rpc Upsert (TaxTypeList) returns (TaxTypeListResponse);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Deleted {
|
|
22
|
+
string id = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message TaxTypeList {
|
|
26
|
+
repeated TaxType items = 1;
|
|
27
|
+
uint32 total_count = 2;
|
|
28
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message TaxTypeListResponse {
|
|
32
|
+
repeated TaxTypeResponse items = 1;
|
|
33
|
+
uint32 total_count = 2;
|
|
34
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message TaxTypeResponse {
|
|
38
|
+
TaxType payload = 1;
|
|
39
|
+
io.restorecommerce.status.Status status = 3;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message TaxType {
|
|
43
|
+
string id = 1;
|
|
44
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
45
|
+
string type = 3;
|
|
46
|
+
string description = 4;
|
|
47
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.timezone;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/auth.proto";
|
|
8
|
+
import "io/restorecommerce/status.proto";
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Microservice definition.
|
|
12
|
+
*/
|
|
13
|
+
service Service {
|
|
14
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (TimezoneListResponse);
|
|
15
|
+
rpc Create (TimezoneList) returns (TimezoneListResponse);
|
|
16
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
17
|
+
rpc Update (TimezoneList) returns (TimezoneListResponse);
|
|
18
|
+
rpc Upsert (TimezoneList) returns (TimezoneListResponse);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Deleted {
|
|
22
|
+
string id = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message TimezoneList {
|
|
26
|
+
repeated Timezone items = 1;
|
|
27
|
+
uint32 total_count = 2;
|
|
28
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message TimezoneListResponse {
|
|
32
|
+
repeated TimezoneResponse items = 1;
|
|
33
|
+
uint32 total_count = 2;
|
|
34
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message TimezoneResponse {
|
|
38
|
+
Timezone payload = 1;
|
|
39
|
+
io.restorecommerce.status.Status status = 2;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message Timezone {
|
|
43
|
+
string id = 1;
|
|
44
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
45
|
+
string description = 3;
|
|
46
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.token;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/auth.proto";
|
|
6
|
+
import "google/protobuf/any.proto";
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Microservice definition.
|
|
10
|
+
*/
|
|
11
|
+
service Service {
|
|
12
|
+
rpc upsert (TokenData) returns (google.protobuf.Any); // creates or upserts ID_token to `Redis` and returns sucess or failure message
|
|
13
|
+
rpc find (Identifier) returns (google.protobuf.Any); // find id_token using access_token identifier (Return previously stored instance of an oidc-provider model)
|
|
14
|
+
rpc destroy (Identifier) returns (google.protobuf.Any); // removes the id_token from redis
|
|
15
|
+
rpc revokeByGrantId (GrantId) returns (google.protobuf.Any); // Destroy/Drop/Remove a stored id_token by its grantId property reference.
|
|
16
|
+
rpc consume (Identifier) returns (google.protobuf.Any); // Mark a stored id_token as consumed (not yet expired though!). Future finds for this id should be fulfilled with an object containing additional property named "consumed" with a truthy value (timestamp, date, boolean, etc).
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message TokenData {
|
|
20
|
+
string id = 1;
|
|
21
|
+
google.protobuf.Any payload = 2;
|
|
22
|
+
double expires_in = 3;
|
|
23
|
+
string type = 4;
|
|
24
|
+
io.restorecommerce.auth.Subject subject = 5;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message Identifier {
|
|
28
|
+
string id = 1;
|
|
29
|
+
string type = 2;
|
|
30
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message GrantId {
|
|
34
|
+
string grant_id = 1;
|
|
35
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
36
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.user;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/auth.proto";
|
|
8
|
+
import "io/restorecommerce/attribute.proto";
|
|
9
|
+
import "io/restorecommerce/image.proto";
|
|
10
|
+
import "io/restorecommerce/status.proto";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The microservice for the user resource.
|
|
14
|
+
*/
|
|
15
|
+
service Service {
|
|
16
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (UserListResponse);
|
|
17
|
+
rpc Create (UserList) returns (UserListResponse);
|
|
18
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
19
|
+
rpc Update (UserList) returns (UserListResponse);
|
|
20
|
+
rpc Upsert (UserList) returns (UserListResponse);
|
|
21
|
+
|
|
22
|
+
rpc Find (FindRequest) returns (UserListResponse);
|
|
23
|
+
rpc Register (RegisterRequest) returns (UserResponse);
|
|
24
|
+
rpc Activate (ActivateRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
25
|
+
rpc ChangePassword (ChangePasswordRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
26
|
+
rpc RequestPasswordChange (RequestPasswordChangeRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
27
|
+
rpc RequestEmailChange (ChangeEmailRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
28
|
+
rpc ConfirmPasswordChange (ConfirmPasswordChangeRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
29
|
+
rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
30
|
+
rpc Unregister (UnregisterRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
31
|
+
rpc Login (LoginRequest) returns (UserResponse);
|
|
32
|
+
rpc FindByRole (FindByRoleRequest) returns (UserListResponse);
|
|
33
|
+
rpc DeleteUsersByOrg (OrgIDRequest) returns (DeleteUsersByOrgResponse);
|
|
34
|
+
rpc ConfirmUserInvitation (ConfirmUserInvitationRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
35
|
+
rpc SendInvitationEmail (SendInvitationEmailRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
36
|
+
rpc FindByToken (FindByTokenRequest) returns (UserResponse);
|
|
37
|
+
rpc SendActivationEmail (SendActivationEmailRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Request to verify password and retrieve the user's info.
|
|
42
|
+
* Either name or email can be provided.
|
|
43
|
+
*/
|
|
44
|
+
message LoginRequest {
|
|
45
|
+
string identifier = 1; // User name or email
|
|
46
|
+
string password = 2; // Raw password
|
|
47
|
+
string token = 3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message OrgIDRequest {
|
|
51
|
+
repeated string org_ids = 1;
|
|
52
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message DeleteUsersByOrgResponse {
|
|
56
|
+
repeated string user_ids = 1;
|
|
57
|
+
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message FindRequest {
|
|
61
|
+
string id = 1; /// User ID
|
|
62
|
+
string name = 2;
|
|
63
|
+
string email = 3;
|
|
64
|
+
io.restorecommerce.auth.Subject subject = 4;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message FindByTokenRequest {
|
|
68
|
+
string token = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
enum UserType {
|
|
72
|
+
ORG_USER = 0;
|
|
73
|
+
INDIVIDUAL_USER = 1;
|
|
74
|
+
GUEST = 2;
|
|
75
|
+
TECHNICAL_USER = 3;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message RegisterRequest {
|
|
79
|
+
string id = 1;
|
|
80
|
+
bool guest = 2;
|
|
81
|
+
io.restorecommerce.meta.Meta meta = 3;
|
|
82
|
+
string name = 4;
|
|
83
|
+
string first_name = 5;
|
|
84
|
+
string last_name = 6;
|
|
85
|
+
string email = 7;
|
|
86
|
+
string password = 8;
|
|
87
|
+
string timezone_id = 9;
|
|
88
|
+
string locale_id = 10;
|
|
89
|
+
|
|
90
|
+
string default_scope = 11; // default hierarchical scope
|
|
91
|
+
UserType user_type = 12;
|
|
92
|
+
string captcha_code = 13;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
message ActivateRequest {
|
|
96
|
+
string identifier = 1; /// user name or email
|
|
97
|
+
string activation_code = 2;
|
|
98
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message ConfirmUserInvitationRequest {
|
|
102
|
+
string identifier = 1; // user name or email
|
|
103
|
+
string password = 2;
|
|
104
|
+
string activation_code = 3;
|
|
105
|
+
io.restorecommerce.auth.Subject subject = 4;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message SendInvitationEmailRequest {
|
|
109
|
+
string identifier = 1; // user name or email
|
|
110
|
+
string invited_by_user_identifier = 2;
|
|
111
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
message ChangePasswordRequest {
|
|
115
|
+
string identifier = 1; /// user name or email
|
|
116
|
+
string password = 2;
|
|
117
|
+
string new_password = 3;
|
|
118
|
+
io.restorecommerce.auth.Subject subject = 4;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
message RequestPasswordChangeRequest {
|
|
122
|
+
string identifier = 1; // user name or email
|
|
123
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
message ConfirmPasswordChangeRequest {
|
|
127
|
+
string identifier = 1; // user name or email
|
|
128
|
+
string activation_code = 2;
|
|
129
|
+
string password = 3;
|
|
130
|
+
io.restorecommerce.auth.Subject subject = 4;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
message ChangeEmailRequest {
|
|
134
|
+
string identifier = 1; // user name or email
|
|
135
|
+
string new_email = 2;
|
|
136
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message ConfirmEmailChangeRequest {
|
|
140
|
+
string identifier = 1; // user name or email
|
|
141
|
+
string activation_code = 2;
|
|
142
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message UnregisterRequest {
|
|
146
|
+
string identifier = 1; /// User ID
|
|
147
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message SendActivationEmailRequest {
|
|
151
|
+
string identifier = 1; /// User name or email
|
|
152
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* User deletion event.
|
|
157
|
+
* Send when a user was deleted or unregistered.
|
|
158
|
+
*
|
|
159
|
+
* Events:
|
|
160
|
+
* usersDeleted,
|
|
161
|
+
* unregistered,
|
|
162
|
+
*/
|
|
163
|
+
message Deleted {
|
|
164
|
+
string id = 1;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* User password changed event.
|
|
169
|
+
*
|
|
170
|
+
* Events:
|
|
171
|
+
* passwordChanged,
|
|
172
|
+
*/
|
|
173
|
+
message PasswordChanged {
|
|
174
|
+
string id = 1; /// User ID
|
|
175
|
+
string password_hash = 2;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message PasswordChangeRequested {
|
|
179
|
+
string id = 1; // User ID
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* User email id changed event.
|
|
184
|
+
*/
|
|
185
|
+
message EmailChangeRequested {
|
|
186
|
+
string id = 1;
|
|
187
|
+
string activation_code = 2;
|
|
188
|
+
string new_email = 3;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
message EmailChangeConfirmed {
|
|
192
|
+
string id = 1; /// User ID
|
|
193
|
+
string email = 2;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A list of User.
|
|
198
|
+
*/
|
|
199
|
+
message UserList {
|
|
200
|
+
repeated User items = 1;
|
|
201
|
+
uint32 total_count = 2;
|
|
202
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
message UserListResponse {
|
|
206
|
+
repeated UserResponse items = 1;
|
|
207
|
+
uint32 total_count = 2;
|
|
208
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
message UserResponse {
|
|
212
|
+
User payload = 1;
|
|
213
|
+
io.restorecommerce.status.Status status = 2;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* User activation request.
|
|
218
|
+
*/
|
|
219
|
+
message Activate {
|
|
220
|
+
string id = 1; /// User ID
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
message FindByRoleRequest {
|
|
224
|
+
string role = 1;
|
|
225
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 2;
|
|
226
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* A User resource.
|
|
231
|
+
*/
|
|
232
|
+
message User {
|
|
233
|
+
string id = 1; /// User ID, unique, key
|
|
234
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
235
|
+
string name = 3; // The name of the user, can be used for login
|
|
236
|
+
string first_name = 4;
|
|
237
|
+
string last_name = 5;
|
|
238
|
+
string email = 6; /// Email address, can be used for login
|
|
239
|
+
string new_email = 7; /// New email address; set by `requestEmailChange` and overrides actual email upon `confirmEmailChange`
|
|
240
|
+
bool active = 8; /// If the user was activated via the activation process
|
|
241
|
+
string activation_code = 9; /// Activation code used in the activation process
|
|
242
|
+
string password = 10; /// Raw password, not stored
|
|
243
|
+
string password_hash = 11; /// Encrypted password, stored
|
|
244
|
+
repeated io.restorecommerce.auth.RoleAssociation role_associations = 12; // A user can have multiple roles and different attributes coupled with each role
|
|
245
|
+
string timezone_id = 13; // timezone_id specifications
|
|
246
|
+
string locale_id = 14; // locale specifications
|
|
247
|
+
string default_scope = 15; // default hierarchical scope
|
|
248
|
+
bool unauthenticated = 16; // true in case in case of `register`; set to false after activation
|
|
249
|
+
bool guest = 17; /// Is the user a guest. A guest is a automatically generated user which can later be turned in a non-guest user.
|
|
250
|
+
io.restorecommerce.image.Image image = 18;
|
|
251
|
+
UserType user_type = 19;
|
|
252
|
+
bool invite = 20; // For user invitation
|
|
253
|
+
string invited_by_user_name = 21; // user who is inviting
|
|
254
|
+
string invited_by_user_first_name = 22; // First name of user inviting
|
|
255
|
+
string invited_by_user_last_name = 23; // Last name of user inviting
|
|
256
|
+
repeated io.restorecommerce.auth.Tokens tokens = 24;
|
|
257
|
+
double last_access = 25;
|
|
258
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@restorecommerce/protos",
|
|
3
|
+
"version": "0.4.5",
|
|
4
|
+
"description": "Protobuf descriptors for Restorecommerce services",
|
|
5
|
+
"author": "n-fuse GmbH",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/restorecommerce/libs.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"restore",
|
|
13
|
+
"commerce",
|
|
14
|
+
"protos",
|
|
15
|
+
"protobufs"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {},
|
|
18
|
+
"gitHead": "9e4e1727b7aec6a7fd0e23e29fc01ba44fba4e59"
|
|
19
|
+
}
|
package/test/test.proto
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package test;
|
|
3
|
+
|
|
4
|
+
import "google/protobuf/any.proto";
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/status.proto";
|
|
8
|
+
|
|
9
|
+
service Test {
|
|
10
|
+
rpc Test (TestRequest) returns (TestResponse);
|
|
11
|
+
rpc Throw (TestRequest) returns (TestResponse);
|
|
12
|
+
rpc NotImplemented (TestRequest) returns (TestResponse);
|
|
13
|
+
rpc NotFound (TestRequest) returns (TestResponse);
|
|
14
|
+
rpc Create (TestBufferedDataList) returns (TestBufferedDataListResponse);
|
|
15
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (TestBufferedDataListResponse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Stream test service
|
|
20
|
+
*/
|
|
21
|
+
service Stream {
|
|
22
|
+
rpc BiStream (stream TestRequest) returns (stream StreamTestResponse);
|
|
23
|
+
rpc ResponseStream (TestRequest) returns (stream StreamTestResponse);
|
|
24
|
+
rpc RequestStream (stream TestRequest) returns (TestResponse);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message TestRequest {
|
|
28
|
+
string value = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message StreamTestResponse {
|
|
32
|
+
string result = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message TestResponse {
|
|
36
|
+
string result = 1;
|
|
37
|
+
io.restorecommerce.status.Status status = 4;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message TestEvent {
|
|
41
|
+
string value = 1;
|
|
42
|
+
int32 count = 2;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
message TestBufferedData {
|
|
46
|
+
string id = 1;
|
|
47
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
48
|
+
string value = 3;
|
|
49
|
+
int32 count = 4;
|
|
50
|
+
google.protobuf.Any data = 5;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message TestBufferedDataList {
|
|
54
|
+
repeated TestBufferedData items = 1;
|
|
55
|
+
uint32 total_count = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message TestBufferedDataResponse {
|
|
59
|
+
TestBufferedData payload = 1;
|
|
60
|
+
io.restorecommerce.status.Status status = 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message TestBufferedDataListResponse {
|
|
64
|
+
repeated TestBufferedDataResponse items = 1;
|
|
65
|
+
uint32 total_count = 2;
|
|
66
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message ExtendMe {
|
|
70
|
+
int32 bar = 126;
|
|
71
|
+
}
|