@restorecommerce/protos 0.7.2 → 1.1.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 +28 -0
- package/echo/echo.proto +24 -0
- package/io/restorecommerce/auth.proto +3 -5
- package/io/restorecommerce/job.proto +1 -1
- package/io/restorecommerce/options.proto +12 -0
- package/io/restorecommerce/resource_base.proto +10 -7
- package/io/restorecommerce/search.proto +3 -0
- package/io/restorecommerce/user.proto +8 -0
- package/package.json +2 -2
- package/test/test.proto +38 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
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.1.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@1.0.0...@restorecommerce/protos@1.1.0) (2022-10-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **protos:** added timezone on Job cron repeat options. ([d25a5c0](https://github.com/restorecommerce/libs/commit/d25a5c0740d8f04102691a5eb3b4c5745fbb75ad))
|
|
12
|
+
* **protos:** restore subject id for auth subject ([150e663](https://github.com/restorecommerce/libs/commit/150e663c0c090721da9b7ce028714d5df7994972))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **facade:** add subscriptions ([d9006e9](https://github.com/restorecommerce/libs/commit/d9006e9ebcd1522a67373f8ca8bfa751c551b36f))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# [1.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@0.7.2...@restorecommerce/protos@1.0.0) (2022-08-25)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* move to fully typed grpc client and server ([aeee2f2](https://github.com/restorecommerce/libs/commit/aeee2f2b7ca470223d7bc42fd7cafd4bb8387796))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
6
34
|
## [0.7.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@0.7.1...@restorecommerce/protos@0.7.2) (2022-06-14)
|
|
7
35
|
|
|
8
36
|
|
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
|
+
}
|
|
@@ -8,11 +8,9 @@ import "io/restorecommerce/attribute.proto";
|
|
|
8
8
|
*/
|
|
9
9
|
message Subject {
|
|
10
10
|
string id = 1; // user id
|
|
11
|
-
string scope = 2; // target scope
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
bool unauthenticated = 5; // for unauthenticated context
|
|
15
|
-
string token = 6;
|
|
11
|
+
string scope = 2; // target scope (ID of the target scoping entity)
|
|
12
|
+
bool unauthenticated = 3; // for unauthenticated context
|
|
13
|
+
string token = 4;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
message Tokens {
|
|
@@ -96,11 +96,11 @@ message Repeat {
|
|
|
96
96
|
string endDate = 4;
|
|
97
97
|
uint32 count = 5;
|
|
98
98
|
string jobId = 6; // To override the job ID - by default, the job ID is a unique generated by bull
|
|
99
|
+
string tz = 7; // time zone
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
// Data which is stored within a job instance
|
|
102
103
|
message Data {
|
|
103
|
-
string timezone = 1;
|
|
104
104
|
google.protobuf.Any payload = 2; // optional variable payload
|
|
105
105
|
io.restorecommerce.meta.Meta meta = 3;
|
|
106
106
|
string subject_id = 4; // id of job creator
|
|
@@ -23,3 +23,15 @@ message Resolver {
|
|
|
23
23
|
string target_method = 4;
|
|
24
24
|
string field_name = 5;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
extend google.protobuf.MessageOptions {
|
|
28
|
+
KafkaSubscription kafka_subscriber = 31003;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message KafkaSubscription {
|
|
32
|
+
string plural = 1;
|
|
33
|
+
string topic = 2;
|
|
34
|
+
string created = 3;
|
|
35
|
+
string updated = 4;
|
|
36
|
+
string deleted = 5;
|
|
37
|
+
}
|
|
@@ -66,6 +66,12 @@ message FilterOp {
|
|
|
66
66
|
Operator operator = 2;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
message Search {
|
|
70
|
+
string search = 1; // search string
|
|
71
|
+
repeated string fields = 2; // list of fields to be searched on entity (if not specified all indexed fields will be searched)
|
|
72
|
+
bool case_sensitive = 3; // default search is case insensitive
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
message ReadRequest {
|
|
70
76
|
uint32 offset = 1;
|
|
71
77
|
uint32 limit = 2;
|
|
@@ -76,7 +82,6 @@ message ReadRequest {
|
|
|
76
82
|
|
|
77
83
|
/// Fields selector
|
|
78
84
|
repeated FieldFilter field = 5;
|
|
79
|
-
repeated string search = 6;
|
|
80
85
|
|
|
81
86
|
/** Check the query parameters of HTTP request.
|
|
82
87
|
* If query parameter `locales` is given,
|
|
@@ -90,6 +95,7 @@ message ReadRequest {
|
|
|
90
95
|
repeated string custom_queries = 8;
|
|
91
96
|
google.protobuf.Any custom_arguments = 9;
|
|
92
97
|
io.restorecommerce.auth.Subject subject = 10;
|
|
98
|
+
Search search = 11;
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
message DeleteRequest {
|
|
@@ -98,6 +104,8 @@ message DeleteRequest {
|
|
|
98
104
|
/// Delete specified documents
|
|
99
105
|
repeated string ids = 2;
|
|
100
106
|
io.restorecommerce.auth.Subject subject = 3;
|
|
107
|
+
repeated string view = 4; // list of views to be dropped
|
|
108
|
+
repeated string analyzer = 5; // list of analyzers to be deleted
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
message DeleteResponse {
|
|
@@ -129,9 +137,4 @@ message ResourceResponse {
|
|
|
129
137
|
message Resource {
|
|
130
138
|
string id = 1;
|
|
131
139
|
io.restorecommerce.meta.Meta meta = 2;
|
|
132
|
-
|
|
133
|
-
string text = 4;
|
|
134
|
-
bool active = 5;
|
|
135
|
-
double created = 6;
|
|
136
|
-
string status = 7;
|
|
137
|
-
}
|
|
140
|
+
}
|
|
@@ -3,9 +3,12 @@ package io.restorecommerce.search;
|
|
|
3
3
|
|
|
4
4
|
import "google/protobuf/any.proto";
|
|
5
5
|
import "io/restorecommerce/auth.proto";
|
|
6
|
+
import "io/restorecommerce/options.proto";
|
|
6
7
|
|
|
7
8
|
// Service provides the CRUD operations
|
|
8
9
|
service Service {
|
|
10
|
+
option (io.restorecommerce.options.service_name) = "search";
|
|
11
|
+
|
|
9
12
|
rpc Search (SearchRequest) returns (SearchResponse);
|
|
10
13
|
}
|
|
11
14
|
|
|
@@ -258,6 +258,14 @@ message FindByRoleRequest {
|
|
|
258
258
|
* A User resource.
|
|
259
259
|
*/
|
|
260
260
|
message User {
|
|
261
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
262
|
+
plural: "users"
|
|
263
|
+
topic: "io.restorecommerce.users.resource"
|
|
264
|
+
created: "userCreated"
|
|
265
|
+
updated: "userUpdated"
|
|
266
|
+
deleted: "userDeleted"
|
|
267
|
+
};
|
|
268
|
+
|
|
261
269
|
string id = 1; /// User ID, unique, key
|
|
262
270
|
io.restorecommerce.meta.Meta meta = 2;
|
|
263
271
|
string name = 3; // The name of the user, can be used for login
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/protos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.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": "0f34bd9515033e3933b0fe578d8e9b7b0b7bcc30"
|
|
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
|
+
}
|