@fraym/proto 0.11.0 → 0.11.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.
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.EventGdprValue = exports.EventPayload = exports.EventMetadata = exports.EventOptions = exports.Event_PayloadEntry = exports.Event = exports.GetEventRequest = exports.protobufPackage = void 0;
|
|
7
|
+
const long_1 = __importDefault(require("long"));
|
|
7
8
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
8
9
|
exports.protobufPackage = "freym.streams.management";
|
|
9
10
|
function createBaseGetEventRequest() {
|
|
@@ -98,6 +99,7 @@ function createBaseEvent() {
|
|
|
98
99
|
options: undefined,
|
|
99
100
|
metadata: undefined,
|
|
100
101
|
payload: {},
|
|
102
|
+
raisedAt: "0",
|
|
101
103
|
};
|
|
102
104
|
}
|
|
103
105
|
exports.Event = {
|
|
@@ -129,6 +131,9 @@ exports.Event = {
|
|
|
129
131
|
Object.entries(message.payload).forEach(([key, value]) => {
|
|
130
132
|
exports.Event_PayloadEntry.encode({ key: key, value }, writer.uint32(74).fork()).ldelim();
|
|
131
133
|
});
|
|
134
|
+
if (message.raisedAt !== "0") {
|
|
135
|
+
writer.uint32(80).int64(message.raisedAt);
|
|
136
|
+
}
|
|
132
137
|
return writer;
|
|
133
138
|
},
|
|
134
139
|
decode(input, length) {
|
|
@@ -195,6 +200,12 @@ exports.Event = {
|
|
|
195
200
|
message.payload[entry9.key] = entry9.value;
|
|
196
201
|
}
|
|
197
202
|
continue;
|
|
203
|
+
case 10:
|
|
204
|
+
if (tag !== 80) {
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
message.raisedAt = longToString(reader.int64());
|
|
208
|
+
continue;
|
|
198
209
|
}
|
|
199
210
|
if ((tag & 7) === 4 || tag === 0) {
|
|
200
211
|
break;
|
|
@@ -219,6 +230,7 @@ exports.Event = {
|
|
|
219
230
|
return acc;
|
|
220
231
|
}, {})
|
|
221
232
|
: {},
|
|
233
|
+
raisedAt: isSet(object.raisedAt) ? globalThis.String(object.raisedAt) : "0",
|
|
222
234
|
};
|
|
223
235
|
},
|
|
224
236
|
toJSON(message) {
|
|
@@ -256,13 +268,16 @@ exports.Event = {
|
|
|
256
268
|
});
|
|
257
269
|
}
|
|
258
270
|
}
|
|
271
|
+
if (message.raisedAt !== "0") {
|
|
272
|
+
obj.raisedAt = message.raisedAt;
|
|
273
|
+
}
|
|
259
274
|
return obj;
|
|
260
275
|
},
|
|
261
276
|
create(base) {
|
|
262
277
|
return exports.Event.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
263
278
|
},
|
|
264
279
|
fromPartial(object) {
|
|
265
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
280
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
266
281
|
const message = createBaseEvent();
|
|
267
282
|
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : "";
|
|
268
283
|
message.topic = (_b = object.topic) !== null && _b !== void 0 ? _b : "";
|
|
@@ -282,6 +297,7 @@ exports.Event = {
|
|
|
282
297
|
}
|
|
283
298
|
return acc;
|
|
284
299
|
}, {});
|
|
300
|
+
message.raisedAt = (_h = object.raisedAt) !== null && _h !== void 0 ? _h : "0";
|
|
285
301
|
return message;
|
|
286
302
|
},
|
|
287
303
|
};
|
|
@@ -622,6 +638,13 @@ exports.EventGdprValue = {
|
|
|
622
638
|
return message;
|
|
623
639
|
},
|
|
624
640
|
};
|
|
641
|
+
function longToString(long) {
|
|
642
|
+
return long.toString();
|
|
643
|
+
}
|
|
644
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
645
|
+
minimal_1.default.util.Long = long_1.default;
|
|
646
|
+
minimal_1.default.configure();
|
|
647
|
+
}
|
|
625
648
|
function isObject(value) {
|
|
626
649
|
return typeof value === "object" && value !== null;
|
|
627
650
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { ChannelCredentials, Client, ClientDuplexStream,
|
|
2
|
+
import { ChannelCredentials, Client, ClientDuplexStream, handleBidiStreamingCall, Metadata } from "@grpc/grpc-js";
|
|
3
3
|
import type { CallOptions, ClientOptions, ClientUnaryCall, handleUnaryCall, ServiceError, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
4
4
|
import { BackchannelEventResponse, BackchannelHandledRequest, BackchannelHandledResponse } from "./backchannel";
|
|
5
5
|
import { Event, GetEventRequest } from "./event";
|
|
@@ -32,7 +32,7 @@ export declare const ServiceService: {
|
|
|
32
32
|
readonly getEvent: {
|
|
33
33
|
readonly path: "/freym.streams.management.Service/GetEvent";
|
|
34
34
|
readonly requestStream: false;
|
|
35
|
-
readonly responseStream:
|
|
35
|
+
readonly responseStream: false;
|
|
36
36
|
readonly requestSerialize: (value: GetEventRequest) => Buffer;
|
|
37
37
|
readonly requestDeserialize: (value: Buffer) => GetEventRequest;
|
|
38
38
|
readonly responseSerialize: (value: Event) => Buffer;
|
|
@@ -105,7 +105,7 @@ export declare const ServiceService: {
|
|
|
105
105
|
export interface ServiceServer extends UntypedServiceImplementation {
|
|
106
106
|
publish: handleUnaryCall<PublishRequest, PublishResponse>;
|
|
107
107
|
subscribe: handleBidiStreamingCall<SubscribeRequest, SubscribeResponse>;
|
|
108
|
-
getEvent:
|
|
108
|
+
getEvent: handleUnaryCall<GetEventRequest, Event>;
|
|
109
109
|
isStreamEmpty: handleUnaryCall<IsStreamEmptyRequest, IsStreamEmptyResponse>;
|
|
110
110
|
paginateStream: handleUnaryCall<PaginateStreamRequest, PaginateStreamResponse>;
|
|
111
111
|
paginateEvents: handleUnaryCall<PaginateEventsRequest, PaginateEventsResponse>;
|
|
@@ -121,8 +121,9 @@ export interface ServiceClient extends Client {
|
|
|
121
121
|
subscribe(): ClientDuplexStream<SubscribeRequest, SubscribeResponse>;
|
|
122
122
|
subscribe(options: Partial<CallOptions>): ClientDuplexStream<SubscribeRequest, SubscribeResponse>;
|
|
123
123
|
subscribe(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<SubscribeRequest, SubscribeResponse>;
|
|
124
|
-
getEvent(request: GetEventRequest,
|
|
125
|
-
getEvent(request: GetEventRequest, metadata
|
|
124
|
+
getEvent(request: GetEventRequest, callback: (error: ServiceError | null, response: Event) => void): ClientUnaryCall;
|
|
125
|
+
getEvent(request: GetEventRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Event) => void): ClientUnaryCall;
|
|
126
|
+
getEvent(request: GetEventRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: Event) => void): ClientUnaryCall;
|
|
126
127
|
isStreamEmpty(request: IsStreamEmptyRequest, callback: (error: ServiceError | null, response: IsStreamEmptyResponse) => void): ClientUnaryCall;
|
|
127
128
|
isStreamEmpty(request: IsStreamEmptyRequest, metadata: Metadata, callback: (error: ServiceError | null, response: IsStreamEmptyResponse) => void): ClientUnaryCall;
|
|
128
129
|
isStreamEmpty(request: IsStreamEmptyRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: IsStreamEmptyResponse) => void): ClientUnaryCall;
|
|
@@ -32,7 +32,7 @@ exports.ServiceService = {
|
|
|
32
32
|
getEvent: {
|
|
33
33
|
path: "/freym.streams.management.Service/GetEvent",
|
|
34
34
|
requestStream: false,
|
|
35
|
-
responseStream:
|
|
35
|
+
responseStream: false,
|
|
36
36
|
requestSerialize: (value) => Buffer.from(event_1.GetEventRequest.encode(value).finish()),
|
|
37
37
|
requestDeserialize: (value) => event_1.GetEventRequest.decode(value),
|
|
38
38
|
responseSerialize: (value) => Buffer.from(event_1.Event.encode(value).finish()),
|