@jibb-open/jssdk 3.17.4 → 3.17.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jibb-open/jssdk",
3
- "version": "3.17.4",
3
+ "version": "3.17.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "LOG_LEVEL=error mocha --timeout 10000 ",
package/types/jibb.pb.js CHANGED
@@ -1 +1 @@
1
- "use strict";var _light=_interopRequireDefault(require("protobufjs/light.js"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}const $protobuf=_light.default,$root=exports.default=($protobuf.roots["default"]||($protobuf.roots["default"]=new $protobuf.Root)).setOptions({syntax:"proto3"}).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","dummy"]}},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},dummy:{type:"google.protobuf.Empty",id:7}}},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}},DeviceType:{values:{NOT_CONFIGURED:0,ON_PREMISE:1,CLOUD:2}},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},imageCollection:{type:"bool",id:14}}}}},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}}},MousePointer:{fields:{userId:{type:"string",id:2},x:{type:"int32",id:4},y:{type:"int32",id:5},email:{type:"string",id:6}}},IndexPointer:{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","mousePointer","imageAck","indexPointer"]}},fields:{join:{type:"Participant",id:1},leave:{type:"Participant",id:2},update:{type:"Update",id:3},drawing:{type:"Drawing",id:6},mousePointer:{type:"MousePointer",id:7},imageAck:{type:"ImageAck",id:8},indexPointer:{type:"IndexPointer",id:9}}},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}}},ShortUrlDetails:{fields:{fullUrl:{type:"string",id:1},password:{type:"string",id:2}}}}},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}}}}}});
1
+ "use strict";var $protobuf=require("protobufjs/light"),$root=($protobuf.roots["default"]||($protobuf.roots["default"]=new $protobuf.Root)).setOptions({syntax:"proto3"}).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","dummy"]}},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},dummy:{type:"google.protobuf.Empty",id:7}}},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}},DeviceType:{values:{NOT_CONFIGURED:0,ON_PREMISE:1,CLOUD:2}},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},imageCollection:{type:"bool",id:14}}}}},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}}},MousePointer:{fields:{userId:{type:"string",id:2},x:{type:"int32",id:4},y:{type:"int32",id:5},email:{type:"string",id:6}}},IndexPointer:{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","mousePointer","imageAck","indexPointer"]}},fields:{join:{type:"Participant",id:1},leave:{type:"Participant",id:2},update:{type:"Update",id:3},drawing:{type:"Drawing",id:6},mousePointer:{type:"MousePointer",id:7},imageAck:{type:"ImageAck",id:8},indexPointer:{type:"IndexPointer",id:9}}},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}}},ShortUrlDetails:{fields:{fullUrl:{type:"string",id:1},password:{type:"string",id:2}}}}},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;
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.array-buffer.constructor.js"),require("core-js/modules/es.array-buffer.slice.js"),require("core-js/modules/es.global-this.js"),require("core-js/modules/es.promise.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"),require("core-js/modules/es.weak-map.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/web.url.js"),require("core-js/modules/web.url.to-json.js"),require("core-js/modules/web.url-search-params.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 _classPrivateFieldGet(b,c){return b.get(_assertClassBrand(b,c))}function _classPrivateFieldSet(b,c,a){return b.set(_assertClassBrand(b,c),a),a}function _assertClassBrand(a,b,c){if("function"==typeof a?a===b:a.has(b))return 3>arguments.length?b:c;throw new TypeError("Private element is not present on this object")}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(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&{}.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e.default=b,d&&d.set(b,e),e}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,_MeetingConnectionImp_brand=/*#__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,_MeetingConnectionImp_brand),_classPrivateFieldInitSpec(this,_expiryTimer,void 0),this.meetingId=null,this.meetingToken=null,_classPrivateFieldSet(_expiryTimer,this,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(_expiryTimer,this,setTimeout(()=>{this.stop(),this.onError(new _exceptions.SessionTimeoutError("meeting token expired"))},b)),super.start()}stop(){clearTimeout(_classPrivateFieldGet(_expiryTimer,this)),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),b=a.host+("/"===a.pathname?"":a.pathname);return"wss://"+b+"/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 _assertClassBrand(_MeetingConnectionImp_brand,this,_sendImageAck).call(this,c.update.userId)),void(null!==c&&void 0!==c&&c.drawing?this.notify("onDrawing",c.drawing):null!==c&&void 0!==c&&c.MousePointer?this.notify("onMousePointer",c):null!==c&&void 0!==c&&c.IndexPointer?this.notify("onIndexPointer",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 sendMousePointer(a,b,c){let d="";if(""!=c)d=c;else try{let a=await(0,_auth.getUserClaims)();d=a.email}catch(a){d=c}let e=Message.fromObject({MousePointer:{email:d,x:a,y:b}}),f=Message.encode(e).finish();await this.write(f)}async sendIndexPointer(a,b,c){let d="";if(""!=c)d=c;else try{let a=await(0,_auth.getUserClaims)();d=a.email}catch(a){d=c}let e=Message.fromObject({IndexPointer:{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 _sendImageAck(a){let b=Message.fromObject({imageAck:{userId:a}}),c=Message.encode(b).finish();await this.write(c)}let MeetingConnection=exports.MeetingConnection=new MeetingConnectionImp({maxRetryCount:10,minRetryIntervalMs:500,maxRetryIntervalMs:8e3});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MeetingConnection=void 0,require("core-js/modules/es.array-buffer.constructor.js"),require("core-js/modules/es.array-buffer.slice.js"),require("core-js/modules/es.global-this.js"),require("core-js/modules/es.promise.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"),require("core-js/modules/es.weak-map.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/web.url.js"),require("core-js/modules/web.url.to-json.js"),require("core-js/modules/web.url-search-params.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 _classPrivateFieldGet(b,c){return b.get(_assertClassBrand(b,c))}function _classPrivateFieldSet(b,c,a){return b.set(_assertClassBrand(b,c),a),a}function _assertClassBrand(a,b,c){if("function"==typeof a?a===b:a.has(b))return 3>arguments.length?b:c;throw new TypeError("Private element is not present on this object")}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(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&{}.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e.default=b,d&&d.set(b,e),e}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,_MeetingConnectionImp_brand=/*#__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,_MeetingConnectionImp_brand),_classPrivateFieldInitSpec(this,_expiryTimer,void 0),this.meetingId=null,this.meetingToken=null,_classPrivateFieldSet(_expiryTimer,this,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(_expiryTimer,this,setTimeout(()=>{this.stop(),this.onError(new _exceptions.SessionTimeoutError("meeting token expired"))},b)),super.start()}stop(){clearTimeout(_classPrivateFieldGet(_expiryTimer,this)),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),b=a.host+("/"===a.pathname?"":a.pathname);return"wss://"+b+"/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 _assertClassBrand(_MeetingConnectionImp_brand,this,_sendImageAck).call(this,c.update.userId)),void(null!==c&&void 0!==c&&c.drawing?this.notify("onDrawing",c.drawing):null!==c&&void 0!==c&&c.mousePointer?this.notify("onMousePointer",c):null!==c&&void 0!==c&&c.indexPointer?this.notify("onIndexPointer",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 sendMousePointer(a,b,c){let d="";if(""!=c)d=c;else try{let a=await(0,_auth.getUserClaims)();d=a.email}catch(a){d=c}let e=Message.fromObject({mousePointer:{email:d,x:a,y:b}}),f=Message.encode(e).finish();await this.write(f)}async sendIndexPointer(a,b,c){let d="";if(""!=c)d=c;else try{let a=await(0,_auth.getUserClaims)();d=a.email}catch(a){d=c}let e=Message.fromObject({indexPointer:{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 _sendImageAck(a){let b=Message.fromObject({imageAck:{userId:a}}),c=Message.encode(b).finish();await this.write(c)}let MeetingConnection=exports.MeetingConnection=new MeetingConnectionImp({maxRetryCount:10,minRetryIntervalMs:500,maxRetryIntervalMs:8e3});