@fraym/proto 0.6.1 → 0.6.2
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.
|
@@ -3,7 +3,7 @@ import { PublishEventEnvelope } from "./event";
|
|
|
3
3
|
export declare const protobufPackage = "freym.streams.clientchannel";
|
|
4
4
|
export interface PaginateEventsRequest {
|
|
5
5
|
tenantId: string;
|
|
6
|
-
|
|
6
|
+
topic: string;
|
|
7
7
|
includedEventTypes: string[];
|
|
8
8
|
page: string;
|
|
9
9
|
perPage: string;
|
|
@@ -9,15 +9,15 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
9
9
|
const event_1 = require("./event");
|
|
10
10
|
exports.protobufPackage = "freym.streams.clientchannel";
|
|
11
11
|
function createBasePaginateEventsRequest() {
|
|
12
|
-
return { tenantId: "",
|
|
12
|
+
return { tenantId: "", topic: "", includedEventTypes: [], page: "0", perPage: "0" };
|
|
13
13
|
}
|
|
14
14
|
exports.PaginateEventsRequest = {
|
|
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
|
-
|
|
20
|
-
writer.uint32(18).string(
|
|
19
|
+
if (message.topic !== "") {
|
|
20
|
+
writer.uint32(18).string(message.topic);
|
|
21
21
|
}
|
|
22
22
|
for (const v of message.includedEventTypes) {
|
|
23
23
|
writer.uint32(26).string(v);
|
|
@@ -47,7 +47,7 @@ exports.PaginateEventsRequest = {
|
|
|
47
47
|
if (tag !== 18) {
|
|
48
48
|
break;
|
|
49
49
|
}
|
|
50
|
-
message.
|
|
50
|
+
message.topic = reader.string();
|
|
51
51
|
continue;
|
|
52
52
|
case 3:
|
|
53
53
|
if (tag !== 26) {
|
|
@@ -78,9 +78,7 @@ exports.PaginateEventsRequest = {
|
|
|
78
78
|
fromJSON(object) {
|
|
79
79
|
return {
|
|
80
80
|
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
|
|
81
|
-
|
|
82
|
-
? object.includedTopics.map((e) => globalThis.String(e))
|
|
83
|
-
: [],
|
|
81
|
+
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
84
82
|
includedEventTypes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.includedEventTypes)
|
|
85
83
|
? object.includedEventTypes.map((e) => globalThis.String(e))
|
|
86
84
|
: [],
|
|
@@ -89,15 +87,15 @@ exports.PaginateEventsRequest = {
|
|
|
89
87
|
};
|
|
90
88
|
},
|
|
91
89
|
toJSON(message) {
|
|
92
|
-
var _a
|
|
90
|
+
var _a;
|
|
93
91
|
const obj = {};
|
|
94
92
|
if (message.tenantId !== "") {
|
|
95
93
|
obj.tenantId = message.tenantId;
|
|
96
94
|
}
|
|
97
|
-
if (
|
|
98
|
-
obj.
|
|
95
|
+
if (message.topic !== "") {
|
|
96
|
+
obj.topic = message.topic;
|
|
99
97
|
}
|
|
100
|
-
if ((
|
|
98
|
+
if ((_a = message.includedEventTypes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
101
99
|
obj.includedEventTypes = message.includedEventTypes;
|
|
102
100
|
}
|
|
103
101
|
if (message.page !== "0") {
|
|
@@ -115,7 +113,7 @@ exports.PaginateEventsRequest = {
|
|
|
115
113
|
var _a, _b, _c, _d, _e;
|
|
116
114
|
const message = createBasePaginateEventsRequest();
|
|
117
115
|
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
118
|
-
message.
|
|
116
|
+
message.topic = (_b = object.topic) !== null && _b !== void 0 ? _b : "";
|
|
119
117
|
message.includedEventTypes = ((_c = object.includedEventTypes) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
120
118
|
message.page = (_d = object.page) !== null && _d !== void 0 ? _d : "0";
|
|
121
119
|
message.perPage = (_e = object.perPage) !== null && _e !== void 0 ? _e : "0";
|