@fraym/proto 0.31.1 → 0.31.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:all[name]})}_export(exports,{BackchannelEventRequest:function(){return BackchannelEventRequest},BackchannelEventResponse:function(){return BackchannelEventResponse}});var _wire=require("@bufbuild/protobuf/wire");var _event=require("./event");function _instanceof(left,right){if(right!=null&&typeof Symbol!=="undefined"&&right[Symbol.hasInstance]){return!!right[Symbol.hasInstance](left)}else{return left instanceof right}}function createBaseBackchannelEventRequest(){return{payload:undefined}}var BackchannelEventRequest={encode:function encode(message){var writer=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _wire.BinaryWriter;var _message_payload;switch((_message_payload=message.payload)===null||_message_payload===void 0?void 0:_message_payload.$case){case"broadcast":_event.Event.encode(message.payload.broadcast,writer.uint32(10).fork()).join();break;case"notice":
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:all[name]})}_export(exports,{BackchannelEventRequest:function(){return BackchannelEventRequest},BackchannelEventResponse:function(){return BackchannelEventResponse},BackchannelNotice:function(){return BackchannelNotice}});var _wire=require("@bufbuild/protobuf/wire");var _event=require("./event");function _instanceof(left,right){if(right!=null&&typeof Symbol!=="undefined"&&right[Symbol.hasInstance]){return!!right[Symbol.hasInstance](left)}else{return left instanceof right}}function createBaseBackchannelEventRequest(){return{payload:undefined}}var BackchannelEventRequest={encode:function encode(message){var writer=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _wire.BinaryWriter;var _message_payload;switch((_message_payload=message.payload)===null||_message_payload===void 0?void 0:_message_payload.$case){case"broadcast":_event.Event.encode(message.payload.broadcast,writer.uint32(10).fork()).join();break;case"notice":BackchannelNotice.encode(message.payload.notice,writer.uint32(18).fork()).join();break}return writer},decode:function decode(input,length){var reader=_instanceof(input,_wire.BinaryReader)?input:new _wire.BinaryReader(input);var end=length===undefined?reader.len:reader.pos+length;var message=createBaseBackchannelEventRequest();while(reader.pos<end){var tag=reader.uint32();switch(tag>>>3){case 1:{if(tag!==10){break}message.payload={$case:"broadcast",broadcast:_event.Event.decode(reader,reader.uint32())};continue}case 2:{if(tag!==18){break}message.payload={$case:"notice",notice:BackchannelNotice.decode(reader,reader.uint32())};continue}}if((tag&7)===4||tag===0){break}reader.skip(tag&7)}return message},fromJSON:function fromJSON(object){return{payload:isSet(object.broadcast)?{$case:"broadcast",broadcast:_event.Event.fromJSON(object.broadcast)}:isSet(object.notice)?{$case:"notice",notice:BackchannelNotice.fromJSON(object.notice)}:undefined}},toJSON:function toJSON(message){var _message_payload,_message_payload1;var obj={};if(((_message_payload=message.payload)===null||_message_payload===void 0?void 0:_message_payload.$case)==="broadcast"){obj.broadcast=_event.Event.toJSON(message.payload.broadcast)}else if(((_message_payload1=message.payload)===null||_message_payload1===void 0?void 0:_message_payload1.$case)==="notice"){obj.notice=BackchannelNotice.toJSON(message.payload.notice)}return obj},create:function create(base){return BackchannelEventRequest.fromPartial(base!==null&&base!==void 0?base:{})},fromPartial:function fromPartial(object){var _object_payload;var message=createBaseBackchannelEventRequest();switch((_object_payload=object.payload)===null||_object_payload===void 0?void 0:_object_payload.$case){case"broadcast":{var _object_payload1,_object_payload2;if(((_object_payload1=object.payload)===null||_object_payload1===void 0?void 0:_object_payload1.broadcast)!==undefined&&((_object_payload2=object.payload)===null||_object_payload2===void 0?void 0:_object_payload2.broadcast)!==null){message.payload={$case:"broadcast",broadcast:_event.Event.fromPartial(object.payload.broadcast)}}break}case"notice":{var _object_payload3,_object_payload4;if(((_object_payload3=object.payload)===null||_object_payload3===void 0?void 0:_object_payload3.notice)!==undefined&&((_object_payload4=object.payload)===null||_object_payload4===void 0?void 0:_object_payload4.notice)!==null){message.payload={$case:"notice",notice:BackchannelNotice.fromPartial(object.payload.notice)}}break}}return message}};function createBaseBackchannelNotice(){return{tenantId:"",topic:""}}var BackchannelNotice={encode:function encode(message){var writer=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _wire.BinaryWriter;if(message.tenantId!==""){writer.uint32(10).string(message.tenantId)}if(message.topic!==""){writer.uint32(18).string(message.topic)}return writer},decode:function decode(input,length){var reader=_instanceof(input,_wire.BinaryReader)?input:new _wire.BinaryReader(input);var end=length===undefined?reader.len:reader.pos+length;var message=createBaseBackchannelNotice();while(reader.pos<end){var tag=reader.uint32();switch(tag>>>3){case 1:{if(tag!==10){break}message.tenantId=reader.string();continue}case 2:{if(tag!==18){break}message.topic=reader.string();continue}}if((tag&7)===4||tag===0){break}reader.skip(tag&7)}return message},fromJSON:function fromJSON(object){return{tenantId:isSet(object.tenantId)?globalThis.String(object.tenantId):"",topic:isSet(object.topic)?globalThis.String(object.topic):""}},toJSON:function toJSON(message){var obj={};if(message.tenantId!==""){obj.tenantId=message.tenantId}if(message.topic!==""){obj.topic=message.topic}return obj},create:function create(base){return BackchannelNotice.fromPartial(base!==null&&base!==void 0?base:{})},fromPartial:function fromPartial(object){var message=createBaseBackchannelNotice();var _object_tenantId;message.tenantId=(_object_tenantId=object.tenantId)!==null&&_object_tenantId!==void 0?_object_tenantId:"";var _object_topic;message.topic=(_object_topic=object.topic)!==null&&_object_topic!==void 0?_object_topic:"";return message}};function createBaseBackchannelEventResponse(){return{}}var BackchannelEventResponse={encode:function encode(_){var writer=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new _wire.BinaryWriter;return writer},decode:function decode(input,length){var reader=_instanceof(input,_wire.BinaryReader)?input:new _wire.BinaryReader(input);var end=length===undefined?reader.len:reader.pos+length;var message=createBaseBackchannelEventResponse();while(reader.pos<end){var tag=reader.uint32();switch(tag>>>3){}if((tag&7)===4||tag===0){break}reader.skip(tag&7)}return message},fromJSON:function fromJSON(_){return{}},toJSON:function toJSON(_){var obj={};return obj},create:function create(base){return BackchannelEventResponse.fromPartial(base!==null&&base!==void 0?base:{})},fromPartial:function fromPartial(_){var message=createBaseBackchannelEventResponse();return message}};function isSet(value){return value!==null&&value!==undefined}
|
|
@@ -6,12 +6,17 @@ export interface BackchannelEventRequest {
|
|
|
6
6
|
broadcast: Event;
|
|
7
7
|
} | {
|
|
8
8
|
$case: "notice";
|
|
9
|
-
notice:
|
|
9
|
+
notice: BackchannelNotice;
|
|
10
10
|
} | undefined;
|
|
11
11
|
}
|
|
12
|
+
export interface BackchannelNotice {
|
|
13
|
+
tenantId: string;
|
|
14
|
+
topic: string;
|
|
15
|
+
}
|
|
12
16
|
export interface BackchannelEventResponse {
|
|
13
17
|
}
|
|
14
18
|
export declare const BackchannelEventRequest: MessageFns<BackchannelEventRequest>;
|
|
19
|
+
export declare const BackchannelNotice: MessageFns<BackchannelNotice>;
|
|
15
20
|
export declare const BackchannelEventResponse: MessageFns<BackchannelEventResponse>;
|
|
16
21
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
17
22
|
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|