@jibb-open/jssdk 3.14.3 → 3.14.5
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/package.json +1 -1
- package/types/jibb.pb.js +1 -1
- package/ws/meeting.js +1 -1
package/package.json
CHANGED
package/types/jibb.pb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var $protobuf=require("protobufjs/light"),$root=($protobuf.roots["default"]||($protobuf.roots["default"]=new $protobuf.Root)).addJSON({types:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/types"},nested:{Code:{values:{SUCCESS:0,ERR_IO:4e3,ERR_CLOSED:4001,ERR_TIMEOUT:4002,ERR_BAD_REQUEST:4003,ERR_UNAUTHORIZED:4004,ERR_INTERNAL:4005,ERR_TOO_MANY_CONNECTIONS:4006,ERR_OUT_OF_LICENSE:4008}},ErrorLevel:{values:{DEBUG:0,INFO:1,WARNING:2,ERROR:3,CRITICAL:4}},Error:{fields:{level:{type:"ErrorLevel",id:1},code:{type:"Code",id:2},reason:{type:"string",id:3}}},TriState:{values:{DEFAULT:0,ENABLE:1,DISABLE:2}},SurfaceType:{values:{UNKNOWN:0,PAPER:1,WHITEBOARD:2}},ClientType:{options:{allow_alias:!0},values:{UNKNOWN_CLIENT_TYPE:0,ANY:0,IPSA:1,MOBILE:2,WEBAPP:3,COMPANION:4,ipsa:1,mobile:2,webapp:3,companion:4}},ClientDetails:{fields:{clientType:{type:"ClientType",id:1},id:{type:"string",id:2},name:{type:"string",id:3}}},ContentType:{values:{UNKNOWN_TYPE:0,IMAGE_JPEG:1,IMAGE_WEBP:2}}}},jibb:{nested:{ipsa:{nested:{v1:{options:{java_package:"ai.jibb.ipsa",java_outer_classname:"IPSA",go_package:"github.com/Inkerz/jibbapis/sdk/go/ipsa"},nested:{StatusCode:{values:{SUCCESS:0,INVALID_INPUT:3,SESSION_BUSY:6,SURFACE_DETECTED:110,SURFACE_NOT_DETECTED:100,SURFACE_NOT_STABILIZED:101,SURFACE_CHANGED:103,SURFACE_TOO_LEFT:104,SURFACE_TOO_RIGHT:105,SURFACE_TOO_CLOSE:106,SURFACE_TOO_FAR:109,SURFACE_TOO_DARK:107,SURFACE_TOO_BRIGHT:108,INTERNAL_ERROR:200}},Rotation:{values:{ROTATE_0:0,ROTATE_90_CLOCKWISE:1,ROTATE_180:2,ROTATE_90_COUNTERCLOCKWISE:3}},Encoding:{values:{JPEG:0,VP8:1,VP9:2,H264:3}},Config:{fields:{surfaceType:{type:"types.SurfaceType",id:1},enableStabilization:{type:"types.TriState",id:3},enableTransformation:{type:"types.TriState",id:4},userId:{type:"string",id:5},mbusTopicStatus:{type:"string",id:7},mbusTopicImage:{type:"string",id:8},encoding:{type:"Encoding",id:10}}},RuntimeConfig:{fields:{customCorners:{rule:"repeated",type:"sint32",id:1},fixedCorners:{type:"bool",id:2},enableColor:{type:"bool",id:3},rotation:{type:"Rotation",id:4},flipUpDown:{type:"bool",id:5},flipLeftRight:{type:"bool",id:6},enableEstimation:{type:"bool",id:7},inputRotation:{type:"Rotation",id:8}}},VersionResponse:{fields:{version:{type:"string",id:1}}},SurfaceTransformationRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},img:{type:"bytes",id:2}}},SurfaceTransformationResponse:{fields:{img:{type:"bytes",id:1}}},SurfaceSegmentationRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},overlay:{type:"bool",id:2},img:{type:"bytes",id:3}}},SurfaceSegmentationResponse:{fields:{img:{type:"bytes",id:1}}},SurfaceDetectionRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},img:{type:"bytes",id:2},overlay:{type:"bool",id:3}}},SurfaceDetectionResponse:{fields:{img:{type:"bytes",id:1},corners:{rule:"repeated",type:"sint32",id:2}}},ObjectRemovalRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},overlay:{type:"bool",id:2},enableTransformation:{type:"bool",id:3},img:{type:"bytes",id:4}}},ObjectRemovalResponse:{fields:{img:{type:"bytes",id:1}}},ContentExtractionRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},enableTransformation:{type:"bool",id:2},enableColor:{type:"bool",id:4},img:{type:"bytes",id:3}}},ContentExtractionResponse:{fields:{img:{type:"bytes",id:1},transformedImg:{type:"bytes",id:2}}},GetSimilarityRequest:{fields:{newImage:{type:"bytes",id:1},prevImage:{type:"bytes",id:2},level:{type:"SensivityLevel",id:3}},nested:{SensivityLevel:{values:{NORMAL:0,LOW:1,HIGH:2}}}},GetSimilarityResponse:{fields:{isSimilar:{type:"bool",id:1},addedContentCount:{type:"int32",id:2}}},Ipsa:{fields:{data:{type:"bytes",id:1}}},Request:{oneofs:{Command:{oneof:["config","ipsa","resetSession","recalibrate","runtimeConfig"]}},fields:{id:{type:"int32",id:1},config:{type:"Config",id:2},ipsa:{type:"Ipsa",id:3},resetSession:{type:"google.protobuf.Empty",id:4},recalibrate:{type:"google.protobuf.Empty",id:5},runtimeConfig:{type:"RuntimeConfig",id:6}}},Status:{fields:{userId:{type:"string",id:1},corners:{rule:"repeated",type:"float",id:2},codes:{rule:"repeated",type:"StatusCode",id:3},processingTime:{type:"int32",id:4},upsampling:{type:"float",id:5},paperDetectionConfidence:{type:"int32",id:6}}},Image:{fields:{userId:{type:"string",id:1},data:{type:"bytes",id:2}}},Response:{fields:{id:{type:"int32",id:1},image:{type:"bytes",id:5},status:{type:"Status",id:8}}},Started:{fields:{}},Stopped:{fields:{}}}}}}}},user:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/user"},nested:{Level:{values:{FREE:0,BASIC:1,PRO:3,BUSINESS:4,ENTERPRISE:5}},UserType:{values:{UNKNOWN:0,MEMBER:2,ADMIN:3,OWNER:4}},UserDetails:{fields:{organizationName:{type:"string",id:2},level:{type:"Level",id:3},firstName:{type:"string",id:4},lastName:{type:"string",id:5},organizationId:{type:"int32",id:6},userType:{type:"UserType",id:7},activated:{type:"bool",id:8},userId:{type:"string",id:9},email:{type:"string",id:10},lastLogin:{type:"google.protobuf.Timestamp",id:11}}},UserClaims:{fields:{level:{type:"Level",id:2},organizationId:{type:"int32",id:3},email:{type:"string",id:4},organizationName:{type:"string",id:5},userId:{type:"string",id:6},isDevice:{type:"bool",id:7}}},OrganizationDetails:{fields:{name:{type:"string",id:1},ownerEmail:{type:"string",id:2},level:{type:"Level",id:3},licenseCount:{type:"int32",id:4},usersCount:{type:"int32",id:5},creationDate:{type:"google.protobuf.Timestamp",id:6},startDate:{type:"google.protobuf.Timestamp",id:12},expiryDate:{type:"google.protobuf.Timestamp",id:7},organizationId:{type:"int32",id:8},subdomainName:{type:"string",id:9},deviceLicenseCount:{type:"int32",id:10},devicesCount:{type:"int32",id:11}}}}},google:{nested:{protobuf:{nested:{Empty:{fields:{}},Timestamp:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}}}},meeting:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/meeting"},nested:{Participant:{fields:{id:{type:"int32",id:1},userId:{type:"string",id:2},email:{type:"string",id:3},title:{type:"string",id:4}}},Update:{fields:{userId:{type:"string",id:2},image:{type:"bytes",id:5}}},Drawing:{fields:{userId:{type:"string",id:2},data:{type:"string",id:4}}},Pointer:{fields:{userId:{type:"string",id:2},x:{type:"int32",id:4},y:{type:"int32",id:5},email:{type:"string",id:6}}},ImageAck:{fields:{userId:{type:"string",id:2}}},Message:{oneofs:{event:{oneof:["join","leave","update","drawing","pointer","imageAck"]}},fields:{join:{type:"Participant",id:1},leave:{type:"Participant",id:2},update:{type:"Update",id:3},drawing:{type:"Drawing",id:6},pointer:{type:"Pointer",id:7},imageAck:{type:"ImageAck",id:8}}},SharePermission:{values:{UNKNOWN_SHARE_TYPE:0,SHARE_READ:1,SHARE_WRITE:2}},Permission:{values:{UNKNOWN_PERMISSION:0,IMAGE_READ:1,IMAGE_WRITE:2,ANNOTATION_READ:4,ANNOTATION_WRITE:8,MODIFY:16,MASK_READ_ONLY:5,MASK_WRITE_ONLY:10,MASK_READ_WRITE:15,MASK_FULL_ACCESS:31}},Meeting:{fields:{id:{type:"string",id:1},title:{type:"string",id:2},ownerId:{type:"string",id:6},creationTime:{type:"int64",id:7},capacity:{type:"int32",id:8},isTemporary:{type:"bool",id:9}}},SharedMeeting:{fields:{id:{type:"int32",id:1},userId:{type:"string",id:2},meetingId:{type:"int32",id:3},email:{type:"string",id:4},permission:{type:"SharePermission",id:5}}},MeetingClaims:{fields:{meetingId:{type:"string",id:1},ownerId:{type:"string",id:3},capacity:{type:"int32",id:4},auxilary:{keyType:"string",type:"string",id:5},title:{type:"string",id:6},isTemporary:{type:"bool",id:7},permission:{type:"uint32",id:9}}}}},cilix:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/cilix"},nested:{CameraDescription:{fields:{id:{type:"string",id:1},name:{type:"string",id:2}}},StartRequest:{fields:{config:{type:"jibb.ipsa.v1.Config",id:2},runtimeConfig:{type:"jibb.ipsa.v1.RuntimeConfig",id:4},camera:{type:"CameraDescription",id:5},meetingToken:{type:"string",id:6}}},PreviewRequest:{fields:{source:{type:"CameraDescription",id:2}}},PreviewResponse:{fields:{image:{type:"bytes",id:1}}},GetCameraListResponse:{fields:{items:{rule:"repeated",type:"CameraDescription",id:1}}},GetClientStatusListResponse:{fields:{clients:{rule:"repeated",type:"types.ClientDetails",id:1}}},BusMessage:{oneofs:{messageType:{oneof:["clientConnected","clientDisconnected","tooManyPublishers","ipsaResponse","startRequest","stopRequest","newPageRequest","previewRequest","previewResponse","cameraListRequest","cameraListResponse","runtimeConfigRequest","clientStatusRequest","recordingStarted","recordingStopped","error"]}},fields:{clientConnected:{type:"google.protobuf.Empty",id:2},clientDisconnected:{type:"google.protobuf.Empty",id:3},tooManyPublishers:{type:"google.protobuf.Empty",id:4},ipsaResponse:{type:"jibb.ipsa.v1.Response",id:6},startRequest:{type:"StartRequest",id:50},stopRequest:{type:"google.protobuf.Empty",id:51},newPageRequest:{type:"google.protobuf.Empty",id:52},previewRequest:{type:"PreviewRequest",id:53},previewResponse:{type:"PreviewResponse",id:54},cameraListRequest:{type:"google.protobuf.Empty",id:55},cameraListResponse:{type:"GetCameraListResponse",id:56},runtimeConfigRequest:{type:"jibb.ipsa.v1.RuntimeConfig",id:57},clientStatusRequest:{type:"google.protobuf.Empty",id:58},recordingStarted:{type:"google.protobuf.Empty",id:59},recordingStopped:{type:"google.protobuf.Empty",id:60},error:{type:"types.Code",id:100},src:{type:"types.ClientDetails",id:30},dst:{type:"types.ClientDetails",id:31}}}}}});module.exports=$root;
|
|
1
|
+
"use strict";var $protobuf=_interopRequireWildcard(require("protobufjs/light"));require("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}const $root=($protobuf.roots["default"]||($protobuf.roots["default"]=new $protobuf.Root)).addJSON({types:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/types"},nested:{Code:{values:{SUCCESS:0,ERR_IO:4e3,ERR_CLOSED:4001,ERR_TIMEOUT:4002,ERR_BAD_REQUEST:4003,ERR_UNAUTHORIZED:4004,ERR_INTERNAL:4005,ERR_TOO_MANY_CONNECTIONS:4006,ERR_OUT_OF_LICENSE:4008}},ErrorLevel:{values:{DEBUG:0,INFO:1,WARNING:2,ERROR:3,CRITICAL:4}},Error:{fields:{level:{type:"ErrorLevel",id:1},code:{type:"Code",id:2},reason:{type:"string",id:3}}},TriState:{values:{DEFAULT:0,ENABLE:1,DISABLE:2}},SurfaceType:{values:{UNKNOWN:0,PAPER:1,WHITEBOARD:2}},ClientType:{options:{allow_alias:!0},values:{UNKNOWN_CLIENT_TYPE:0,ANY:0,IPSA:1,MOBILE:2,WEBAPP:3,COMPANION:4,ipsa:1,mobile:2,webapp:3,companion:4}},ClientDetails:{fields:{clientType:{type:"ClientType",id:1},id:{type:"string",id:2},name:{type:"string",id:3}}},ContentType:{values:{UNKNOWN_TYPE:0,IMAGE_JPEG:1,IMAGE_WEBP:2}}}},jibb:{nested:{ipsa:{nested:{v1:{options:{java_package:"ai.jibb.ipsa",java_outer_classname:"IPSA",go_package:"github.com/Inkerz/jibbapis/sdk/go/ipsa"},nested:{StatusCode:{values:{SUCCESS:0,INVALID_INPUT:3,SESSION_BUSY:6,SURFACE_DETECTED:110,SURFACE_NOT_DETECTED:100,SURFACE_NOT_STABILIZED:101,SURFACE_CHANGED:103,SURFACE_TOO_LEFT:104,SURFACE_TOO_RIGHT:105,SURFACE_TOO_CLOSE:106,SURFACE_TOO_FAR:109,SURFACE_TOO_DARK:107,SURFACE_TOO_BRIGHT:108,INTERNAL_ERROR:200}},Rotation:{values:{ROTATE_0:0,ROTATE_90_CLOCKWISE:1,ROTATE_180:2,ROTATE_90_COUNTERCLOCKWISE:3}},Encoding:{values:{JPEG:0,VP8:1,VP9:2,H264:3}},Config:{fields:{surfaceType:{type:"types.SurfaceType",id:1},enableStabilization:{type:"types.TriState",id:3},enableTransformation:{type:"types.TriState",id:4},userId:{type:"string",id:5},mbusTopicStatus:{type:"string",id:7},mbusTopicImage:{type:"string",id:8},encoding:{type:"Encoding",id:10}}},RuntimeConfig:{fields:{customCorners:{rule:"repeated",type:"sint32",id:1},fixedCorners:{type:"bool",id:2},enableColor:{type:"bool",id:3},rotation:{type:"Rotation",id:4},flipUpDown:{type:"bool",id:5},flipLeftRight:{type:"bool",id:6},enableEstimation:{type:"bool",id:7},inputRotation:{type:"Rotation",id:8}}},VersionResponse:{fields:{version:{type:"string",id:1}}},SurfaceTransformationRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},img:{type:"bytes",id:2}}},SurfaceTransformationResponse:{fields:{img:{type:"bytes",id:1}}},SurfaceSegmentationRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},overlay:{type:"bool",id:2},img:{type:"bytes",id:3}}},SurfaceSegmentationResponse:{fields:{img:{type:"bytes",id:1}}},SurfaceDetectionRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},img:{type:"bytes",id:2},overlay:{type:"bool",id:3}}},SurfaceDetectionResponse:{fields:{img:{type:"bytes",id:1},corners:{rule:"repeated",type:"sint32",id:2}}},ObjectRemovalRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},overlay:{type:"bool",id:2},enableTransformation:{type:"bool",id:3},img:{type:"bytes",id:4}}},ObjectRemovalResponse:{fields:{img:{type:"bytes",id:1}}},ContentExtractionRequest:{fields:{surfaceType:{type:"types.SurfaceType",id:1},enableTransformation:{type:"bool",id:2},enableColor:{type:"bool",id:4},img:{type:"bytes",id:3}}},ContentExtractionResponse:{fields:{img:{type:"bytes",id:1},transformedImg:{type:"bytes",id:2}}},GetSimilarityRequest:{fields:{newImage:{type:"bytes",id:1},prevImage:{type:"bytes",id:2},level:{type:"SensivityLevel",id:3}},nested:{SensivityLevel:{values:{NORMAL:0,LOW:1,HIGH:2}}}},GetSimilarityResponse:{fields:{isSimilar:{type:"bool",id:1},addedContentCount:{type:"int32",id:2}}},Ipsa:{fields:{data:{type:"bytes",id:1}}},Request:{oneofs:{Command:{oneof:["config","ipsa","resetSession","recalibrate","runtimeConfig"]}},fields:{id:{type:"int32",id:1},config:{type:"Config",id:2},ipsa:{type:"Ipsa",id:3},resetSession:{type:"google.protobuf.Empty",id:4},recalibrate:{type:"google.protobuf.Empty",id:5},runtimeConfig:{type:"RuntimeConfig",id:6}}},Status:{fields:{userId:{type:"string",id:1},corners:{rule:"repeated",type:"float",id:2},codes:{rule:"repeated",type:"StatusCode",id:3},processingTime:{type:"int32",id:4},upsampling:{type:"float",id:5},paperDetectionConfidence:{type:"int32",id:6}}},Image:{fields:{userId:{type:"string",id:1},data:{type:"bytes",id:2}}},Response:{fields:{id:{type:"int32",id:1},image:{type:"bytes",id:5},status:{type:"Status",id:8}}},Started:{fields:{}},Stopped:{fields:{}}}}}}}},user:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/user"},nested:{Level:{values:{FREE:0,BASIC:1,PRO:3,BUSINESS:4,ENTERPRISE:5}},UserType:{values:{UNKNOWN:0,MEMBER:2,ADMIN:3,OWNER:4}},UserDetails:{fields:{organizationName:{type:"string",id:2},level:{type:"Level",id:3},firstName:{type:"string",id:4},lastName:{type:"string",id:5},organizationId:{type:"int32",id:6},userType:{type:"UserType",id:7},activated:{type:"bool",id:8},userId:{type:"string",id:9},email:{type:"string",id:10},lastLogin:{type:"google.protobuf.Timestamp",id:11}}},UserClaims:{fields:{level:{type:"Level",id:2},organizationId:{type:"int32",id:3},email:{type:"string",id:4},organizationName:{type:"string",id:5},userId:{type:"string",id:6},isDevice:{type:"bool",id:7}}},OrganizationDetails:{fields:{name:{type:"string",id:1},ownerEmail:{type:"string",id:2},level:{type:"Level",id:3},licenseCount:{type:"int32",id:4},usersCount:{type:"int32",id:5},creationDate:{type:"google.protobuf.Timestamp",id:6},startDate:{type:"google.protobuf.Timestamp",id:12},expiryDate:{type:"google.protobuf.Timestamp",id:7},organizationId:{type:"int32",id:8},subdomainName:{type:"string",id:9},deviceLicenseCount:{type:"int32",id:10},devicesCount:{type:"int32",id:11}}}}},google:{nested:{protobuf:{nested:{Empty:{fields:{}},Timestamp:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}}}},meeting:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/meeting"},nested:{Participant:{fields:{id:{type:"int32",id:1},userId:{type:"string",id:2},email:{type:"string",id:3},title:{type:"string",id:4}}},Update:{fields:{userId:{type:"string",id:2},image:{type:"bytes",id:5}}},Drawing:{fields:{userId:{type:"string",id:2},data:{type:"string",id:4}}},Pointer:{fields:{userId:{type:"string",id:2},x:{type:"int32",id:4},y:{type:"int32",id:5},email:{type:"string",id:6}}},ImageAck:{fields:{userId:{type:"string",id:2}}},Message:{oneofs:{event:{oneof:["join","leave","update","drawing","pointer","imageAck"]}},fields:{join:{type:"Participant",id:1},leave:{type:"Participant",id:2},update:{type:"Update",id:3},drawing:{type:"Drawing",id:6},pointer:{type:"Pointer",id:7},imageAck:{type:"ImageAck",id:8}}},SharePermission:{values:{UNKNOWN_SHARE_TYPE:0,SHARE_READ:1,SHARE_WRITE:2}},Permission:{values:{UNKNOWN_PERMISSION:0,IMAGE_READ:1,IMAGE_WRITE:2,ANNOTATION_READ:4,ANNOTATION_WRITE:8,MODIFY:16,MASK_READ_ONLY:5,MASK_WRITE_ONLY:10,MASK_READ_WRITE:15,MASK_FULL_ACCESS:31}},Meeting:{fields:{id:{type:"string",id:1},title:{type:"string",id:2},ownerId:{type:"string",id:6},creationTime:{type:"int64",id:7},capacity:{type:"int32",id:8},isTemporary:{type:"bool",id:9}}},SharedMeeting:{fields:{id:{type:"int32",id:1},userId:{type:"string",id:2},meetingId:{type:"int32",id:3},email:{type:"string",id:4},permission:{type:"SharePermission",id:5}}},MeetingClaims:{fields:{meetingId:{type:"string",id:1},ownerId:{type:"string",id:3},capacity:{type:"int32",id:4},auxilary:{keyType:"string",type:"string",id:5},title:{type:"string",id:6},isTemporary:{type:"bool",id:7},permission:{type:"uint32",id:9}}}}},cilix:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/cilix"},nested:{CameraDescription:{fields:{id:{type:"string",id:1},name:{type:"string",id:2}}},StartRequest:{fields:{config:{type:"jibb.ipsa.v1.Config",id:2},runtimeConfig:{type:"jibb.ipsa.v1.RuntimeConfig",id:4},camera:{type:"CameraDescription",id:5},meetingToken:{type:"string",id:6}}},PreviewRequest:{fields:{source:{type:"CameraDescription",id:2}}},PreviewResponse:{fields:{image:{type:"bytes",id:1}}},GetCameraListResponse:{fields:{items:{rule:"repeated",type:"CameraDescription",id:1}}},GetClientStatusListResponse:{fields:{clients:{rule:"repeated",type:"types.ClientDetails",id:1}}},BusMessage:{oneofs:{messageType:{oneof:["clientConnected","clientDisconnected","tooManyPublishers","ipsaResponse","startRequest","stopRequest","newPageRequest","previewRequest","previewResponse","cameraListRequest","cameraListResponse","runtimeConfigRequest","clientStatusRequest","recordingStarted","recordingStopped","error"]}},fields:{clientConnected:{type:"google.protobuf.Empty",id:2},clientDisconnected:{type:"google.protobuf.Empty",id:3},tooManyPublishers:{type:"google.protobuf.Empty",id:4},ipsaResponse:{type:"jibb.ipsa.v1.Response",id:6},startRequest:{type:"StartRequest",id:50},stopRequest:{type:"google.protobuf.Empty",id:51},newPageRequest:{type:"google.protobuf.Empty",id:52},previewRequest:{type:"PreviewRequest",id:53},previewResponse:{type:"PreviewResponse",id:54},cameraListRequest:{type:"google.protobuf.Empty",id:55},cameraListResponse:{type:"GetCameraListResponse",id:56},runtimeConfigRequest:{type:"jibb.ipsa.v1.RuntimeConfig",id:57},clientStatusRequest:{type:"google.protobuf.Empty",id:58},recordingStarted:{type:"google.protobuf.Empty",id:59},recordingStopped:{type:"google.protobuf.Empty",id:60},error:{type:"types.Code",id:100},src:{type:"types.ClientDetails",id:30},dst:{type:"types.ClientDetails",id:31}}}}}});exports.default=$root;
|
package/ws/meeting.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MeetingConnection=void 0,require("core-js/modules/es.global-this.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/web.url.js"),require("core-js/modules/web.url-search-params.js"),require("core-js/modules/es.array-buffer.constructor.js"),require("core-js/modules/es.array-buffer.slice.js"),require("core-js/modules/es.typed-array.uint8-array.js"),require("core-js/modules/es.typed-array.fill.js"),require("core-js/modules/es.typed-array.set.js"),require("core-js/modules/es.typed-array.sort.js"),require("core-js/modules/es.typed-array.to-locale-string.js");var _auth=require("../api/auth.js"),_config=require("../config.js"),_index=require("../utils/logger/index.js"),_types=require("../types/types.js"),_proto=require("../types/proto.js"),_exceptions=require("../types/exceptions.js"),_observable_connection=require("./observable_connection.js");function _classPrivateMethodInitSpec(a,b){_checkPrivateRedeclaration(a,b),b.add(a)}function _classPrivateFieldInitSpec(a,b,c){_checkPrivateRedeclaration(a,b),b.set(a,c)}function _checkPrivateRedeclaration(a,b){if(b.has(a))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(a,b,c){if(!b.has(a))throw new TypeError("attempted to get private field on non-instance");return c}function _classPrivateFieldGet(a,b){var c=_classExtractFieldDescriptor(a,b,"get");return _classApplyDescriptorGet(a,c)}function _classApplyDescriptorGet(a,b){return b.get?b.get.call(a):b.value}function _classPrivateFieldSet(a,b,c){var d=_classExtractFieldDescriptor(a,b,"set");return _classApplyDescriptorSet(a,d,c),c}function _classExtractFieldDescriptor(a,b,c){if(!b.has(a))throw new TypeError("attempted to "+c+" private field on non-instance");return b.get(a)}function _classApplyDescriptorSet(a,b,c){if(b.set)b.set.call(a,c);else{if(!b.writable)throw new TypeError("attempted to set read only private field");b.value=c}}function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}let Message=_proto.meeting.Message,ErrorCode=_proto.types.Code;(null===globalThis||void 0===globalThis?void 0:globalThis.WebSocket)==null&&Promise.resolve().then(()=>_interopRequireWildcard(require("isomorphic-ws"))).then(a=>{globalThis.WebSocket=a.default}).catch(a=>{console.log(a)});var _expiryTimer=/*#__PURE__*/new WeakMap,_sendImageAck=/*#__PURE__*/new WeakSet;class MeetingConnectionImp extends _observable_connection.ObservableRetryConnection{constructor(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{maxRetryCount:10,minRetryIntervalMs:500,maxRetryIntervalMs:32e3};super("meeting",a),_classPrivateMethodInitSpec(this,_sendImageAck),_classPrivateFieldInitSpec(this,_expiryTimer,{writable:!0,value:void 0}),this.meetingId=null,this.meetingToken=null,_classPrivateFieldSet(this,_expiryTimer,null)}start(a){this.meetingToken=a,this.meetingClaims=new _types.MeetingClaims(a),this.meetingId=this.meetingClaims.meetindId,this.name="meeting-".concat(this.meetingId);let b=this.meetingClaims.getSecondsUntilExpiry();if(0>=b){let a=new _exceptions.PermissionDeniedError("meeting token expired");throw this.onError(a),a}_classPrivateFieldSet(this,_expiryTimer,setTimeout(()=>{this.stop(),this.onError(new _exceptions.SessionTimeoutError("meeting token expired"))},b)),super.start()}stop(){clearTimeout(_classPrivateFieldGet(this,_expiryTimer)),super.stop()}async getURI(){try{if(this.meetingClaims.isExpired()){let a=new _exceptions.PermissionDeniedError("meeting token expired");throw this.onError(a),a}}catch(a){let b=new _exceptions.PermissionDeniedError(a);throw b}let a=new URL(_config.Config.apiBaseURL);return"wss://"+a.hostname+"/ws/meetings/"+this.meetingId+"?meeting_token="+this.meetingToken}async onData(a){try{if(a instanceof ArrayBuffer){let b=new Uint8Array(a),c=Message.decode(b);return null!==c&&void 0!==c&&c.update&&(this.notify("onMeetingUpdate",c.update),await _classPrivateMethodGet(this,_sendImageAck,_sendImageAck2).call(this,c.update.userId)),null!==c&&void 0!==c&&c.drawing&&this.notify("onDrawing",c.drawing),void(null!==c&&void 0!==c&&c.pointer?this.notify("onPointer",c):null!==c&&void 0!==c&&c.join?this.notify("onMeetingJoin",c.join):null!==c&&void 0!==c&&c.leave&&this.notify("onMeetingLeave",c.leave))}}catch(a){_index.logger.error(a)}this.parseJSONResponse(a)}async sendPointer(a,b){let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MeetingConnection=void 0,require("core-js/modules/es.global-this.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/web.url.js"),require("core-js/modules/web.url-search-params.js"),require("core-js/modules/es.array-buffer.constructor.js"),require("core-js/modules/es.array-buffer.slice.js"),require("core-js/modules/es.typed-array.uint8-array.js"),require("core-js/modules/es.typed-array.fill.js"),require("core-js/modules/es.typed-array.set.js"),require("core-js/modules/es.typed-array.sort.js"),require("core-js/modules/es.typed-array.to-locale-string.js");var _auth=require("../api/auth.js"),_config=require("../config.js"),_index=require("../utils/logger/index.js"),_types=require("../types/types.js"),_proto=require("../types/proto.js"),_exceptions=require("../types/exceptions.js"),_observable_connection=require("./observable_connection.js");function _classPrivateMethodInitSpec(a,b){_checkPrivateRedeclaration(a,b),b.add(a)}function _classPrivateFieldInitSpec(a,b,c){_checkPrivateRedeclaration(a,b),b.set(a,c)}function _checkPrivateRedeclaration(a,b){if(b.has(a))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(a,b,c){if(!b.has(a))throw new TypeError("attempted to get private field on non-instance");return c}function _classPrivateFieldGet(a,b){var c=_classExtractFieldDescriptor(a,b,"get");return _classApplyDescriptorGet(a,c)}function _classApplyDescriptorGet(a,b){return b.get?b.get.call(a):b.value}function _classPrivateFieldSet(a,b,c){var d=_classExtractFieldDescriptor(a,b,"set");return _classApplyDescriptorSet(a,d,c),c}function _classExtractFieldDescriptor(a,b,c){if(!b.has(a))throw new TypeError("attempted to "+c+" private field on non-instance");return b.get(a)}function _classApplyDescriptorSet(a,b,c){if(b.set)b.set.call(a,c);else{if(!b.writable)throw new TypeError("attempted to set read only private field");b.value=c}}function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=_getRequireWildcardCache(b);if(c&&c.has(a))return c.get(a);var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!=f&&Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(d,f,g):d[f]=a[f]}return d.default=a,c&&c.set(a,d),d}let Message=_proto.meeting.Message,ErrorCode=_proto.types.Code;(null===globalThis||void 0===globalThis?void 0:globalThis.WebSocket)==null&&Promise.resolve().then(()=>_interopRequireWildcard(require("isomorphic-ws"))).then(a=>{globalThis.WebSocket=a.default}).catch(a=>{console.log(a)});var _expiryTimer=/*#__PURE__*/new WeakMap,_sendImageAck=/*#__PURE__*/new WeakSet;class MeetingConnectionImp extends _observable_connection.ObservableRetryConnection{constructor(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{maxRetryCount:10,minRetryIntervalMs:500,maxRetryIntervalMs:32e3};super("meeting",a),_classPrivateMethodInitSpec(this,_sendImageAck),_classPrivateFieldInitSpec(this,_expiryTimer,{writable:!0,value:void 0}),this.meetingId=null,this.meetingToken=null,_classPrivateFieldSet(this,_expiryTimer,null)}start(a){this.meetingToken=a,this.meetingClaims=new _types.MeetingClaims(a),this.meetingId=this.meetingClaims.meetindId,this.name="meeting-".concat(this.meetingId);let b=this.meetingClaims.getSecondsUntilExpiry();if(0>=b){let a=new _exceptions.PermissionDeniedError("meeting token expired");throw this.onError(a),a}_classPrivateFieldSet(this,_expiryTimer,setTimeout(()=>{this.stop(),this.onError(new _exceptions.SessionTimeoutError("meeting token expired"))},b)),super.start()}stop(){clearTimeout(_classPrivateFieldGet(this,_expiryTimer)),super.stop()}async getURI(){try{if(this.meetingClaims.isExpired()){let a=new _exceptions.PermissionDeniedError("meeting token expired");throw this.onError(a),a}}catch(a){let b=new _exceptions.PermissionDeniedError(a);throw b}let a=new URL(_config.Config.apiBaseURL);return"wss://"+a.hostname+"/ws/meetings/"+this.meetingId+"?meeting_token="+this.meetingToken}async onData(a){try{if(a instanceof ArrayBuffer){let b=new Uint8Array(a),c=Message.decode(b);return null!==c&&void 0!==c&&c.update&&(this.notify("onMeetingUpdate",c.update),await _classPrivateMethodGet(this,_sendImageAck,_sendImageAck2).call(this,c.update.userId)),null!==c&&void 0!==c&&c.drawing&&this.notify("onDrawing",c.drawing),void(null!==c&&void 0!==c&&c.pointer?this.notify("onPointer",c):null!==c&&void 0!==c&&c.join?this.notify("onMeetingJoin",c.join):null!==c&&void 0!==c&&c.leave&&this.notify("onMeetingLeave",c.leave))}}catch(a){_index.logger.error(a)}this.parseJSONResponse(a)}async sendPointer(a,b,c){let d="";try{let a=await(0,_auth.getUserClaims)();d=a.email}catch(a){d=c}let e=Message.fromObject({pointer:{email:d,x:a,y:b}}),f=Message.encode(e).finish();await this.write(f)}async sendDrawing(a){let{email:b,data:c}=a,d=Message.fromObject({drawing:{email:b,data:c}});_index.logger.debug("".concat(this.name,".Drawing: "),Message.toObject(d));let e=Message.encode(d).finish();await this.write(e)}}async function _sendImageAck2(a){let b=Message.fromObject({imageAck:{userId:a}}),c=Message.encode(b).finish();await this.write(c)}let MeetingConnection=new MeetingConnectionImp({maxRetryCount:10,minRetryIntervalMs:500,maxRetryIntervalMs:8e3});exports.MeetingConnection=MeetingConnection;
|