@fraym/proto 0.11.3 → 0.12.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/freym/projections/delivery/get_projection_data.d.ts +2 -0
- package/freym/projections/delivery/get_projection_data.js +44 -3
- package/freym/streams/management/paginate.d.ts +1 -0
- package/freym/streams/management/paginate.js +25 -11
- package/freym/streams/management/stream.d.ts +1 -0
- package/freym/streams/management/stream.js +18 -4
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export interface GetProjectionDataRequest {
|
|
|
8
8
|
filter: DataFilter | undefined;
|
|
9
9
|
returnEmptyDataIfNotFound: boolean;
|
|
10
10
|
wait: DataWait | undefined;
|
|
11
|
+
useStrongConsistency: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface GetProjectionDataListRequest {
|
|
13
14
|
projection: string;
|
|
@@ -16,6 +17,7 @@ export interface GetProjectionDataListRequest {
|
|
|
16
17
|
page: string;
|
|
17
18
|
filter: DataFilter | undefined;
|
|
18
19
|
order: DataOrder[];
|
|
20
|
+
useStrongConsistency: boolean;
|
|
19
21
|
}
|
|
20
22
|
export interface DataWait {
|
|
21
23
|
conditionFilter: DataFilter | undefined;
|
|
@@ -16,6 +16,7 @@ function createBaseGetProjectionDataRequest() {
|
|
|
16
16
|
filter: undefined,
|
|
17
17
|
returnEmptyDataIfNotFound: false,
|
|
18
18
|
wait: undefined,
|
|
19
|
+
useStrongConsistency: false,
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
exports.GetProjectionDataRequest = {
|
|
@@ -38,6 +39,9 @@ exports.GetProjectionDataRequest = {
|
|
|
38
39
|
if (message.wait !== undefined) {
|
|
39
40
|
exports.DataWait.encode(message.wait, writer.uint32(50).fork()).ldelim();
|
|
40
41
|
}
|
|
42
|
+
if (message.useStrongConsistency === true) {
|
|
43
|
+
writer.uint32(56).bool(message.useStrongConsistency);
|
|
44
|
+
}
|
|
41
45
|
return writer;
|
|
42
46
|
},
|
|
43
47
|
decode(input, length) {
|
|
@@ -83,6 +87,12 @@ exports.GetProjectionDataRequest = {
|
|
|
83
87
|
}
|
|
84
88
|
message.wait = exports.DataWait.decode(reader, reader.uint32());
|
|
85
89
|
continue;
|
|
90
|
+
case 7:
|
|
91
|
+
if (tag !== 56) {
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
message.useStrongConsistency = reader.bool();
|
|
95
|
+
continue;
|
|
86
96
|
}
|
|
87
97
|
if ((tag & 7) === 4 || tag === 0) {
|
|
88
98
|
break;
|
|
@@ -101,6 +111,9 @@ exports.GetProjectionDataRequest = {
|
|
|
101
111
|
? globalThis.Boolean(object.returnEmptyDataIfNotFound)
|
|
102
112
|
: false,
|
|
103
113
|
wait: isSet(object.wait) ? exports.DataWait.fromJSON(object.wait) : undefined,
|
|
114
|
+
useStrongConsistency: isSet(object.useStrongConsistency)
|
|
115
|
+
? globalThis.Boolean(object.useStrongConsistency)
|
|
116
|
+
: false,
|
|
104
117
|
};
|
|
105
118
|
},
|
|
106
119
|
toJSON(message) {
|
|
@@ -123,13 +136,16 @@ exports.GetProjectionDataRequest = {
|
|
|
123
136
|
if (message.wait !== undefined) {
|
|
124
137
|
obj.wait = exports.DataWait.toJSON(message.wait);
|
|
125
138
|
}
|
|
139
|
+
if (message.useStrongConsistency === true) {
|
|
140
|
+
obj.useStrongConsistency = message.useStrongConsistency;
|
|
141
|
+
}
|
|
126
142
|
return obj;
|
|
127
143
|
},
|
|
128
144
|
create(base) {
|
|
129
145
|
return exports.GetProjectionDataRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
130
146
|
},
|
|
131
147
|
fromPartial(object) {
|
|
132
|
-
var _a, _b, _c;
|
|
148
|
+
var _a, _b, _c, _d;
|
|
133
149
|
const message = createBaseGetProjectionDataRequest();
|
|
134
150
|
message.projection = (_a = object.projection) !== null && _a !== void 0 ? _a : "";
|
|
135
151
|
message.auth = (object.auth !== undefined && object.auth !== null) ? shared_1.AuthData.fromPartial(object.auth) : undefined;
|
|
@@ -139,11 +155,20 @@ exports.GetProjectionDataRequest = {
|
|
|
139
155
|
: undefined;
|
|
140
156
|
message.returnEmptyDataIfNotFound = (_c = object.returnEmptyDataIfNotFound) !== null && _c !== void 0 ? _c : false;
|
|
141
157
|
message.wait = (object.wait !== undefined && object.wait !== null) ? exports.DataWait.fromPartial(object.wait) : undefined;
|
|
158
|
+
message.useStrongConsistency = (_d = object.useStrongConsistency) !== null && _d !== void 0 ? _d : false;
|
|
142
159
|
return message;
|
|
143
160
|
},
|
|
144
161
|
};
|
|
145
162
|
function createBaseGetProjectionDataListRequest() {
|
|
146
|
-
return {
|
|
163
|
+
return {
|
|
164
|
+
projection: "",
|
|
165
|
+
auth: undefined,
|
|
166
|
+
limit: "0",
|
|
167
|
+
page: "0",
|
|
168
|
+
filter: undefined,
|
|
169
|
+
order: [],
|
|
170
|
+
useStrongConsistency: false,
|
|
171
|
+
};
|
|
147
172
|
}
|
|
148
173
|
exports.GetProjectionDataListRequest = {
|
|
149
174
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -165,6 +190,9 @@ exports.GetProjectionDataListRequest = {
|
|
|
165
190
|
for (const v of message.order) {
|
|
166
191
|
exports.DataOrder.encode(v, writer.uint32(50).fork()).ldelim();
|
|
167
192
|
}
|
|
193
|
+
if (message.useStrongConsistency === true) {
|
|
194
|
+
writer.uint32(56).bool(message.useStrongConsistency);
|
|
195
|
+
}
|
|
168
196
|
return writer;
|
|
169
197
|
},
|
|
170
198
|
decode(input, length) {
|
|
@@ -210,6 +238,12 @@ exports.GetProjectionDataListRequest = {
|
|
|
210
238
|
}
|
|
211
239
|
message.order.push(exports.DataOrder.decode(reader, reader.uint32()));
|
|
212
240
|
continue;
|
|
241
|
+
case 7:
|
|
242
|
+
if (tag !== 56) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
message.useStrongConsistency = reader.bool();
|
|
246
|
+
continue;
|
|
213
247
|
}
|
|
214
248
|
if ((tag & 7) === 4 || tag === 0) {
|
|
215
249
|
break;
|
|
@@ -226,6 +260,9 @@ exports.GetProjectionDataListRequest = {
|
|
|
226
260
|
page: isSet(object.page) ? globalThis.String(object.page) : "0",
|
|
227
261
|
filter: isSet(object.filter) ? shared_1.DataFilter.fromJSON(object.filter) : undefined,
|
|
228
262
|
order: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.order) ? object.order.map((e) => exports.DataOrder.fromJSON(e)) : [],
|
|
263
|
+
useStrongConsistency: isSet(object.useStrongConsistency)
|
|
264
|
+
? globalThis.Boolean(object.useStrongConsistency)
|
|
265
|
+
: false,
|
|
229
266
|
};
|
|
230
267
|
},
|
|
231
268
|
toJSON(message) {
|
|
@@ -249,13 +286,16 @@ exports.GetProjectionDataListRequest = {
|
|
|
249
286
|
if ((_a = message.order) === null || _a === void 0 ? void 0 : _a.length) {
|
|
250
287
|
obj.order = message.order.map((e) => exports.DataOrder.toJSON(e));
|
|
251
288
|
}
|
|
289
|
+
if (message.useStrongConsistency === true) {
|
|
290
|
+
obj.useStrongConsistency = message.useStrongConsistency;
|
|
291
|
+
}
|
|
252
292
|
return obj;
|
|
253
293
|
},
|
|
254
294
|
create(base) {
|
|
255
295
|
return exports.GetProjectionDataListRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
256
296
|
},
|
|
257
297
|
fromPartial(object) {
|
|
258
|
-
var _a, _b, _c, _d;
|
|
298
|
+
var _a, _b, _c, _d, _e;
|
|
259
299
|
const message = createBaseGetProjectionDataListRequest();
|
|
260
300
|
message.projection = (_a = object.projection) !== null && _a !== void 0 ? _a : "";
|
|
261
301
|
message.auth = (object.auth !== undefined && object.auth !== null) ? shared_1.AuthData.fromPartial(object.auth) : undefined;
|
|
@@ -265,6 +305,7 @@ exports.GetProjectionDataListRequest = {
|
|
|
265
305
|
? shared_1.DataFilter.fromPartial(object.filter)
|
|
266
306
|
: undefined;
|
|
267
307
|
message.order = ((_d = object.order) === null || _d === void 0 ? void 0 : _d.map((e) => exports.DataOrder.fromPartial(e))) || [];
|
|
308
|
+
message.useStrongConsistency = (_e = object.useStrongConsistency) !== null && _e !== void 0 ? _e : false;
|
|
268
309
|
return message;
|
|
269
310
|
},
|
|
270
311
|
};
|
|
@@ -9,21 +9,24 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
9
9
|
const event_1 = require("./event");
|
|
10
10
|
exports.protobufPackage = "freym.streams.management";
|
|
11
11
|
function createBasePaginateStreamRequest() {
|
|
12
|
-
return { tenantId: "", stream: "", page: "0", perPage: "0" };
|
|
12
|
+
return { tenantId: "", topic: "", stream: "", page: "0", perPage: "0" };
|
|
13
13
|
}
|
|
14
14
|
exports.PaginateStreamRequest = {
|
|
15
15
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
16
16
|
if (message.tenantId !== "") {
|
|
17
17
|
writer.uint32(10).string(message.tenantId);
|
|
18
18
|
}
|
|
19
|
+
if (message.topic !== "") {
|
|
20
|
+
writer.uint32(18).string(message.topic);
|
|
21
|
+
}
|
|
19
22
|
if (message.stream !== "") {
|
|
20
|
-
writer.uint32(
|
|
23
|
+
writer.uint32(26).string(message.stream);
|
|
21
24
|
}
|
|
22
25
|
if (message.page !== "0") {
|
|
23
|
-
writer.uint32(
|
|
26
|
+
writer.uint32(32).int64(message.page);
|
|
24
27
|
}
|
|
25
28
|
if (message.perPage !== "0") {
|
|
26
|
-
writer.uint32(
|
|
29
|
+
writer.uint32(40).int64(message.perPage);
|
|
27
30
|
}
|
|
28
31
|
return writer;
|
|
29
32
|
},
|
|
@@ -44,18 +47,24 @@ exports.PaginateStreamRequest = {
|
|
|
44
47
|
if (tag !== 18) {
|
|
45
48
|
break;
|
|
46
49
|
}
|
|
47
|
-
message.
|
|
50
|
+
message.topic = reader.string();
|
|
48
51
|
continue;
|
|
49
52
|
case 3:
|
|
50
|
-
if (tag !==
|
|
53
|
+
if (tag !== 26) {
|
|
51
54
|
break;
|
|
52
55
|
}
|
|
53
|
-
message.
|
|
56
|
+
message.stream = reader.string();
|
|
54
57
|
continue;
|
|
55
58
|
case 4:
|
|
56
59
|
if (tag !== 32) {
|
|
57
60
|
break;
|
|
58
61
|
}
|
|
62
|
+
message.page = longToString(reader.int64());
|
|
63
|
+
continue;
|
|
64
|
+
case 5:
|
|
65
|
+
if (tag !== 40) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
59
68
|
message.perPage = longToString(reader.int64());
|
|
60
69
|
continue;
|
|
61
70
|
}
|
|
@@ -69,6 +78,7 @@ exports.PaginateStreamRequest = {
|
|
|
69
78
|
fromJSON(object) {
|
|
70
79
|
return {
|
|
71
80
|
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
81
|
+
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
72
82
|
stream: isSet(object.stream) ? globalThis.String(object.stream) : "",
|
|
73
83
|
page: isSet(object.page) ? globalThis.String(object.page) : "0",
|
|
74
84
|
perPage: isSet(object.perPage) ? globalThis.String(object.perPage) : "0",
|
|
@@ -79,6 +89,9 @@ exports.PaginateStreamRequest = {
|
|
|
79
89
|
if (message.tenantId !== "") {
|
|
80
90
|
obj.tenantId = message.tenantId;
|
|
81
91
|
}
|
|
92
|
+
if (message.topic !== "") {
|
|
93
|
+
obj.topic = message.topic;
|
|
94
|
+
}
|
|
82
95
|
if (message.stream !== "") {
|
|
83
96
|
obj.stream = message.stream;
|
|
84
97
|
}
|
|
@@ -94,12 +107,13 @@ exports.PaginateStreamRequest = {
|
|
|
94
107
|
return exports.PaginateStreamRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
95
108
|
},
|
|
96
109
|
fromPartial(object) {
|
|
97
|
-
var _a, _b, _c, _d;
|
|
110
|
+
var _a, _b, _c, _d, _e;
|
|
98
111
|
const message = createBasePaginateStreamRequest();
|
|
99
112
|
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
100
|
-
message.
|
|
101
|
-
message.
|
|
102
|
-
message.
|
|
113
|
+
message.topic = (_b = object.topic) !== null && _b !== void 0 ? _b : "";
|
|
114
|
+
message.stream = (_c = object.stream) !== null && _c !== void 0 ? _c : "";
|
|
115
|
+
message.page = (_d = object.page) !== null && _d !== void 0 ? _d : "0";
|
|
116
|
+
message.perPage = (_e = object.perPage) !== null && _e !== void 0 ? _e : "0";
|
|
103
117
|
return message;
|
|
104
118
|
},
|
|
105
119
|
};
|
|
@@ -7,15 +7,18 @@ exports.IsStreamEmptyResponse = exports.IsStreamEmptyRequest = exports.protobufP
|
|
|
7
7
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
8
8
|
exports.protobufPackage = "freym.streams.management";
|
|
9
9
|
function createBaseIsStreamEmptyRequest() {
|
|
10
|
-
return { tenantId: "", stream: "" };
|
|
10
|
+
return { tenantId: "", topic: "", stream: "" };
|
|
11
11
|
}
|
|
12
12
|
exports.IsStreamEmptyRequest = {
|
|
13
13
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
14
|
if (message.tenantId !== "") {
|
|
15
15
|
writer.uint32(10).string(message.tenantId);
|
|
16
16
|
}
|
|
17
|
+
if (message.topic !== "") {
|
|
18
|
+
writer.uint32(18).string(message.topic);
|
|
19
|
+
}
|
|
17
20
|
if (message.stream !== "") {
|
|
18
|
-
writer.uint32(
|
|
21
|
+
writer.uint32(26).string(message.stream);
|
|
19
22
|
}
|
|
20
23
|
return writer;
|
|
21
24
|
},
|
|
@@ -36,6 +39,12 @@ exports.IsStreamEmptyRequest = {
|
|
|
36
39
|
if (tag !== 18) {
|
|
37
40
|
break;
|
|
38
41
|
}
|
|
42
|
+
message.topic = reader.string();
|
|
43
|
+
continue;
|
|
44
|
+
case 3:
|
|
45
|
+
if (tag !== 26) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
39
48
|
message.stream = reader.string();
|
|
40
49
|
continue;
|
|
41
50
|
}
|
|
@@ -49,6 +58,7 @@ exports.IsStreamEmptyRequest = {
|
|
|
49
58
|
fromJSON(object) {
|
|
50
59
|
return {
|
|
51
60
|
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
61
|
+
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
52
62
|
stream: isSet(object.stream) ? globalThis.String(object.stream) : "",
|
|
53
63
|
};
|
|
54
64
|
},
|
|
@@ -57,6 +67,9 @@ exports.IsStreamEmptyRequest = {
|
|
|
57
67
|
if (message.tenantId !== "") {
|
|
58
68
|
obj.tenantId = message.tenantId;
|
|
59
69
|
}
|
|
70
|
+
if (message.topic !== "") {
|
|
71
|
+
obj.topic = message.topic;
|
|
72
|
+
}
|
|
60
73
|
if (message.stream !== "") {
|
|
61
74
|
obj.stream = message.stream;
|
|
62
75
|
}
|
|
@@ -66,10 +79,11 @@ exports.IsStreamEmptyRequest = {
|
|
|
66
79
|
return exports.IsStreamEmptyRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
67
80
|
},
|
|
68
81
|
fromPartial(object) {
|
|
69
|
-
var _a, _b;
|
|
82
|
+
var _a, _b, _c;
|
|
70
83
|
const message = createBaseIsStreamEmptyRequest();
|
|
71
84
|
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
72
|
-
message.
|
|
85
|
+
message.topic = (_b = object.topic) !== null && _b !== void 0 ? _b : "";
|
|
86
|
+
message.stream = (_c = object.stream) !== null && _c !== void 0 ? _c : "";
|
|
73
87
|
return message;
|
|
74
88
|
},
|
|
75
89
|
};
|