@zuzjs/flare 0.2.15 → 0.2.17
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/dist/chunk-DGCKTOF5.cjs +2 -0
- package/dist/grpc.cjs +2 -0
- package/dist/grpc.d.cts +16 -0
- package/dist/grpc.d.ts +16 -0
- package/dist/grpc.js +1 -0
- package/dist/{index-DQHYN410.d.cts → index-B2YceCms.d.cts} +12 -505
- package/dist/{index-DQHYN410.d.ts → index-B8jyF1xs.d.ts} +12 -505
- package/dist/index-BAvE1URE.d.cts +511 -0
- package/dist/index-BAvE1URE.d.ts +511 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +2 -2
- package/dist/react.cjs +1 -1
- package/dist/react.d.cts +2 -1
- package/dist/react.d.ts +2 -1
- package/package.json +6 -3
- package/proto/admin.proto +129 -0
- package/proto/app.proto +69 -0
- package/proto/auth.proto +70 -0
- package/proto/flare.proto +11 -0
- package/proto/query.proto +109 -0
package/proto/app.proto
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package flare;
|
|
4
|
+
|
|
5
|
+
service AppService {
|
|
6
|
+
rpc CreateApp (CreateAppRequest) returns (CreateAppResponse);
|
|
7
|
+
rpc GetApp (GetAppRequest) returns (GetAppResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message CreateAppRequest {
|
|
11
|
+
string name = 1;
|
|
12
|
+
string owner_uid = 2;
|
|
13
|
+
string app_id = 3;
|
|
14
|
+
string api_key = 4;
|
|
15
|
+
string admin_key = 5;
|
|
16
|
+
string jwt_secret = 6;
|
|
17
|
+
string db_name = 7;
|
|
18
|
+
string public_key = 8;
|
|
19
|
+
string private_key = 9;
|
|
20
|
+
AppSettings settings = 10;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message AppSettings {
|
|
24
|
+
int32 max_connections = 1;
|
|
25
|
+
bool enable_encryption = 2;
|
|
26
|
+
string rules_dsl = 3;
|
|
27
|
+
string rules_history_policy = 4;
|
|
28
|
+
repeated string rules_restore_events = 5;
|
|
29
|
+
PushSettings push = 6;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message PushSettings {
|
|
33
|
+
string vapid_public_key = 1;
|
|
34
|
+
string vapid_private_key = 2;
|
|
35
|
+
string vapid_subject = 3;
|
|
36
|
+
string welcome_notification = 4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message CreateAppResponse {
|
|
40
|
+
string app_id = 1;
|
|
41
|
+
string db_name = 2;
|
|
42
|
+
string name = 3;
|
|
43
|
+
string owner_uid = 4;
|
|
44
|
+
string api_key = 5;
|
|
45
|
+
string admin_key = 6;
|
|
46
|
+
string jwt_secret = 7;
|
|
47
|
+
string public_key = 8;
|
|
48
|
+
string private_key = 9;
|
|
49
|
+
AppSettings settings = 10;
|
|
50
|
+
string created_at = 11;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message GetAppRequest {
|
|
54
|
+
string app_id = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message GetAppResponse {
|
|
58
|
+
string app_id = 1;
|
|
59
|
+
string db_name = 2;
|
|
60
|
+
string name = 3;
|
|
61
|
+
string owner_uid = 4;
|
|
62
|
+
string api_key = 5;
|
|
63
|
+
string admin_key = 6;
|
|
64
|
+
string jwt_secret = 7;
|
|
65
|
+
string public_key = 8;
|
|
66
|
+
string private_key = 9;
|
|
67
|
+
AppSettings settings = 10;
|
|
68
|
+
string created_at = 11;
|
|
69
|
+
}
|
package/proto/auth.proto
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package flare;
|
|
4
|
+
|
|
5
|
+
service AuthService {
|
|
6
|
+
rpc Login (LoginRequest) returns (LoginResponse);
|
|
7
|
+
rpc Register (RegisterRequest) returns (RegisterResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message LoginRequest {
|
|
11
|
+
string app_id = 1;
|
|
12
|
+
string client_id = 2;
|
|
13
|
+
string email = 3;
|
|
14
|
+
string username = 4;
|
|
15
|
+
string password = 5;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message LoginResponse {
|
|
19
|
+
string user_id = 1;
|
|
20
|
+
string token = 2;
|
|
21
|
+
string refresh_token = 3;
|
|
22
|
+
string role = 4;
|
|
23
|
+
string error = 5;
|
|
24
|
+
string error_description = 6;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message RegisterRequest {
|
|
28
|
+
string app_id = 1;
|
|
29
|
+
string client_id = 2;
|
|
30
|
+
string email = 3;
|
|
31
|
+
string username = 4;
|
|
32
|
+
string password = 5;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message RegisterResponse {
|
|
36
|
+
string user_id = 1;
|
|
37
|
+
string token = 2;
|
|
38
|
+
string role = 3;
|
|
39
|
+
string error = 4;
|
|
40
|
+
string error_description = 5;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message TokenRequest {
|
|
44
|
+
string app_id = 1;
|
|
45
|
+
string client_id = 2;
|
|
46
|
+
string grant_type = 3;
|
|
47
|
+
string username = 4;
|
|
48
|
+
string email = 5;
|
|
49
|
+
string password = 6;
|
|
50
|
+
string scope = 7;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message TokenResponse {
|
|
54
|
+
string access_token = 1;
|
|
55
|
+
string refresh_token = 2;
|
|
56
|
+
string csrf_token = 3;
|
|
57
|
+
string error = 4;
|
|
58
|
+
string error_description = 5;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message LogoutRequest {
|
|
62
|
+
string app_id = 1;
|
|
63
|
+
string sid = 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message LogoutResponse {
|
|
67
|
+
bool success = 1;
|
|
68
|
+
string error = 2;
|
|
69
|
+
string error_description = 3;
|
|
70
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package flare;
|
|
4
|
+
|
|
5
|
+
service QueryService {
|
|
6
|
+
rpc RunQuery (QueryRequest) returns (QueryResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message QueryRequest {
|
|
10
|
+
string app_id = 1;
|
|
11
|
+
string collection = 2;
|
|
12
|
+
StructuredQuery query = 3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message QueryResponse {
|
|
16
|
+
string collection = 1;
|
|
17
|
+
StructuredQuery query = 2;
|
|
18
|
+
int32 count = 3;
|
|
19
|
+
string data_json = 4;
|
|
20
|
+
string error = 5;
|
|
21
|
+
string error_description = 6;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message StructuredQuery {
|
|
25
|
+
repeated AnyFilter where = 1;
|
|
26
|
+
repeated OrderByClause order_by = 2;
|
|
27
|
+
int32 limit = 3;
|
|
28
|
+
int32 offset = 4;
|
|
29
|
+
CursorValue start_at = 5;
|
|
30
|
+
CursorValue start_after = 6;
|
|
31
|
+
CursorValue end_at = 7;
|
|
32
|
+
CursorValue end_before = 8;
|
|
33
|
+
repeated AggregateSpec aggregate = 9;
|
|
34
|
+
GroupByClause group_by = 10;
|
|
35
|
+
repeated HavingClause having = 11;
|
|
36
|
+
repeated JoinClause joins = 12;
|
|
37
|
+
VectorSearchClause vector_search = 13;
|
|
38
|
+
repeated string select = 14;
|
|
39
|
+
string distinct_field = 15;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message QueryFilter {
|
|
43
|
+
string field = 1;
|
|
44
|
+
string op = 2;
|
|
45
|
+
string value_json = 3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message OrFilter {
|
|
49
|
+
repeated AnyFilter or = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message AndFilter {
|
|
53
|
+
repeated AnyFilter and = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message AnyFilter {
|
|
57
|
+
oneof filter {
|
|
58
|
+
QueryFilter query_filter = 1;
|
|
59
|
+
OrFilter or_filter = 2;
|
|
60
|
+
AndFilter and_filter = 3;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message OrderByClause {
|
|
65
|
+
string field = 1;
|
|
66
|
+
string dir = 2;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message GroupByClause {
|
|
70
|
+
repeated string fields = 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message HavingClause {
|
|
74
|
+
string field = 1;
|
|
75
|
+
string op = 2;
|
|
76
|
+
double value = 3;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message CursorValue {
|
|
80
|
+
repeated string values_json = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message AggregateSpec {
|
|
84
|
+
string fn = 1;
|
|
85
|
+
string field = 2;
|
|
86
|
+
string alias = 3;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message JoinClause {
|
|
90
|
+
string from = 1;
|
|
91
|
+
string local_field = 2;
|
|
92
|
+
string foreign_field = 3;
|
|
93
|
+
string as = 4;
|
|
94
|
+
bool single = 5;
|
|
95
|
+
repeated AnyFilter where = 6;
|
|
96
|
+
repeated OrderByClause order_by = 7;
|
|
97
|
+
int32 limit = 8;
|
|
98
|
+
int32 offset = 9;
|
|
99
|
+
repeated string select = 10;
|
|
100
|
+
repeated JoinClause joins = 11;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message VectorSearchClause {
|
|
104
|
+
string field = 1;
|
|
105
|
+
repeated double vector = 2;
|
|
106
|
+
int32 k = 3;
|
|
107
|
+
string metric = 4;
|
|
108
|
+
double min_score = 5;
|
|
109
|
+
}
|