@jibb-open/jssdk 3.10.1 → 3.13.0

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/api/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var WebexBot=_interopRequireWildcard(require("./webexbot.js"));var Meeting=_interopRequireWildcard(require("./meeting.js"));var SuperAdmin=_interopRequireWildcard(require("./superadmin.js"));var Admin=_interopRequireWildcard(require("./admin.js"));var User=_interopRequireWildcard(require("./user.js"));var Auth=_interopRequireWildcard(require("./auth.js"));var EventBus=_interopRequireWildcard(require("./eventbus.js"));var Recording=_interopRequireWildcard(require("./recording.js"));require("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebexBot=exports.User=exports.SuperAdmin=exports.Recording=exports.Meeting=exports.EventBus=exports.Auth=exports.Admin=void 0,Object.defineProperty(exports,"Whiteboard",{enumerable:!0,get:function get(){return _whiteboard.Whiteboard}}),exports.default=void 0;exports.WebexBot=WebexBot;exports.Meeting=Meeting;exports.SuperAdmin=SuperAdmin;exports.Admin=Admin;exports.User=User;exports.Auth=Auth;exports.EventBus=EventBus;exports.Recording=Recording;var _whiteboard=require("./whiteboard.js"),_index=require("../utils/logger/index.js");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}(0,_index.initPinoLogger)();var _default={WebexBot,Meeting,Auth,User,Admin,SuperAdmin,Recording,Whiteboard:_whiteboard.Whiteboard,EventBus};exports.default=_default;
1
+ "use strict";var WebexBot=_interopRequireWildcard(require("./webexbot.js"));var Meeting=_interopRequireWildcard(require("./meeting.js"));var User=_interopRequireWildcard(require("./user.js"));var Auth=_interopRequireWildcard(require("./auth.js"));var EventBus=_interopRequireWildcard(require("./eventbus.js"));var Recording=_interopRequireWildcard(require("./recording.js"));require("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebexBot=exports.User=exports.Recording=exports.Meeting=exports.EventBus=exports.Auth=void 0,Object.defineProperty(exports,"Whiteboard",{enumerable:!0,get:function get(){return _whiteboard.Whiteboard}}),exports.default=void 0;exports.WebexBot=WebexBot;exports.Meeting=Meeting;exports.User=User;exports.Auth=Auth;exports.EventBus=EventBus;exports.Recording=Recording;var _whiteboard=require("./whiteboard.js"),_index=require("../utils/logger/index.js");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}(0,_index.initPinoLogger)();var _default={WebexBot,Meeting,Auth,User,Recording,Whiteboard:_whiteboard.Whiteboard,EventBus};exports.default=_default;
package/api/meeting.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createMeeting=createMeeting,exports.createShare=createShare,exports.createTemporaryShare=createTemporaryShare,exports.deleteMeeting=deleteMeeting,exports.deleteMeetingImages=deleteMeetingImages,exports.deleteShare=deleteShare,exports.endMeeting=endMeeting,exports.getIncomingShares=getIncomingShares,exports.getMeetingDetails=getMeetingDetails,exports.getMeetingImage=getMeetingImage,exports.getMeetingImages=getMeetingImages,exports.getMeetingList=getMeetingList,exports.getMeetingToken=getMeetingToken,exports.getMeetingTokenFromTempShareId=getMeetingTokenFromTempShareId,exports.getOutgoingShares=getOutgoingShares,exports.isMeetingOwner=isMeetingOwner,exports.startMeeting=startMeeting,exports.updateMeeting=updateMeeting,exports.updateShare=updateShare,require("core-js/modules/es.promise.js"),require("core-js/modules/es.json.stringify.js");var _config=require("../config.js"),_auth=require("./auth.js"),_index=require("../utils/logger/index.js"),_exceptions=require("../types/exceptions.js"),_index2=require("../utils/http/index.js"),_types=require("../types/types.js");async function createMeeting(a){let{title:b,isTemporary:c,capacity:d,meetingType:e}=a,f={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},g={title:b||"",isTemporary:c||!1,capacity:d||2,meetingType:e||_types.MeetingTypes.DEFAULT},h=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings"),g,f);return h.data.meetingId}async function createTemporaryShare(a){let{meetingId:b,permission:c,expiry:d,auxData:e}=a,f={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},g=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/temp-shares"),{permission:c,expiry:{seconds:d||3600},auxilary:e||{}},f);return g.data.shareId}async function getMeetingTokenFromTempShareId(a){let{meetingId:b,shareId:c}=a,d=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/temp-shares/").concat(c),{"Content-Type":"application/json",Accept:"application/json"});return d.data.token}async function deleteMeetingImages(a){let{meetingId:b,mtoken:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":c};return _index2.http.delete("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/images"),d)}async function getMeetingImages(a){let{meetingId:b,meetingToken:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":c},e=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/images"),d);return e.data}async function getMeetingImage(a){let{meetingId:b,meetingToken:c,imageId:d}=a,e={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":c},f=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/images/").concat(d),e);return f.data}async function startMeeting(a){let{meetingId:b,meetingToken:c}=a;try{return await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/actions/start"),{},{"Content-Type":"application/json",Accept:"application/json","x-jibb-meeting-jwt":c})}catch(a){var d;if(404==(null===a||void 0===a||null===(d=a.response)||void 0===d?void 0:d.status))throw new _exceptions.NotFoundError;else throw a}}async function endMeeting(a){let{meetingId:b,meetingToken:c}=a;return _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/actions/end"),{},{"Content-Type":"application/json",Accept:"application/json","x-jibb-meeting-jwt":c})}async function deleteMeeting(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};return _index2.http.delete("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(a),b)}async function getMeetingToken(a){let b,{meetingId:c,permission:d,expiry:e=3600}=a;try{b=await(0,_auth.getUserToken)()}catch(a){throw _index.logger.error({err:a}),new _exceptions.PermissionDeniedError("user is not authenticated")}try{let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":b},f=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(c,"/token/").concat(d,"?expiry.seconds=").concat(e),a);return f.data.token}catch(a){var f;if(404==(null===a||void 0===a||null===(f=a.response)||void 0===f?void 0:f.status))throw new _exceptions.NotFoundError("meeting not found");else throw a}}async function getMeetingList(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};void 0!==a&&(b["x-jibb-pagination"]=JSON.stringify(a));let c=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings"),b);return a=c.headers["x-jibb-pagination"],a=a&&JSON.parse(a),{meetings:c.data.meetings,pagination:a}}async function getMeetingDetails(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},c=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(a),b);return c.data}async function updateMeeting(a){let{meetingId:b,title:c,capacity:d}=a,e={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},f={};return c&&(f.title=c),d&&(f.capacity=d),_index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b),f,e)}async function isMeetingOwner(a){try{let b=new _types.MeetingClaims(a),c=new _types.UserClaims(await(0,_auth.getUserToken)());return c.userId===b.ownerId}catch(a){return!1}}async function createShare(a){let{email:b,meetingId:c,permission:d,meetingToken:e}=a,f={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":e},g=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(c,"/shares"),{email:b,permission:d},f);return g.data}async function getIncomingShares(){let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},b=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares?incoming=true"),a);return b.data.shares}async function getOutgoingShares(){let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},b=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares?outgoing=true"),a);return b.data.shares}async function deleteShare(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};return _index2.http.delete("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares/").concat(a),b)}async function updateShare(a){let{shareId:b,permission:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};return _index2.http.patch("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares/").concat(b),{permission:c},d)}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createMeeting=createMeeting,exports.createShare=createShare,exports.createTemporaryShare=createTemporaryShare,exports.deleteMeeting=deleteMeeting,exports.deleteMeetingImages=deleteMeetingImages,exports.deleteShare=deleteShare,exports.endMeeting=endMeeting,exports.getIncomingShares=getIncomingShares,exports.getMeetingDetails=getMeetingDetails,exports.getMeetingImage=getMeetingImage,exports.getMeetingImages=getMeetingImages,exports.getMeetingList=getMeetingList,exports.getMeetingToken=getMeetingToken,exports.getMeetingTokenFromTempShareId=getMeetingTokenFromTempShareId,exports.getOutgoingShares=getOutgoingShares,exports.isMeetingOwner=isMeetingOwner,exports.startMeeting=startMeeting,exports.updateMeeting=updateMeeting,exports.updateShare=updateShare,require("core-js/modules/es.promise.js"),require("core-js/modules/es.json.stringify.js");var _config=require("../config.js"),_auth=require("./auth.js"),_index=require("../utils/logger/index.js"),_exceptions=require("../types/exceptions.js"),_index2=require("../utils/http/index.js"),_types=require("../types/types.js");async function createMeeting(a){let{title:b,isTemporary:c,capacity:d,meetingType:e}=a,f={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},g={title:b||"",isTemporary:c||!1,capacity:d||2,meetingType:e||_types.MeetingTypes.DEFAULT},h=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings"),g,f);return h.data.meetingId}async function createTemporaryShare(a){let{meetingId:b,permission:c,expiry:d,auxData:e}=a,f={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},g=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/temp-shares"),{permission:c,expiry:{seconds:d||3600},auxilary:e||{}},f);return g.data.shareId}async function getMeetingTokenFromTempShareId(a){let{meetingId:b,shareId:c}=a,d=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/temp-shares/").concat(c),{"Content-Type":"application/json",Accept:"application/json"});return d.data.token}async function deleteMeetingImages(a){let{meetingId:b,mtoken:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":c};return _index2.http.delete("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/images"),d)}async function getMeetingImages(a){let{meetingId:b,meetingToken:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":c},e=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/images"),d);return e.data}async function getMeetingImage(a){let{meetingId:b,meetingToken:c,imageId:d}=a,e={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":c},f=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/images/").concat(d),e);return f.data}async function startMeeting(a){let{meetingId:b,meetingToken:c}=a;try{return await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/actions/start"),{},{"Content-Type":"application/json",Accept:"application/json","x-jibb-meeting-jwt":c})}catch(a){var d;if(404==(null===a||void 0===a||null===(d=a.response)||void 0===d?void 0:d.status))throw new _exceptions.NotFoundError;else throw a}}async function endMeeting(a){let{meetingId:b,meetingToken:c}=a;return _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b,"/actions/end"),{},{"Content-Type":"application/json",Accept:"application/json","x-jibb-meeting-jwt":c})}async function deleteMeeting(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};return _index2.http.delete("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(a),b)}async function getMeetingToken(a){let b,{meetingId:c,permission:d,expiry:e=3600}=a;try{b=await(0,_auth.getUserToken)()}catch(a){throw _index.logger.error({err:a}),new _exceptions.PermissionDeniedError("user is not authenticated")}try{let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":b},f=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(c,"/token"),{permission:d,expiry:{seconds:e}},a);return f.data.token}catch(a){var f;if(404==(null===a||void 0===a||null===(f=a.response)||void 0===f?void 0:f.status))throw new _exceptions.NotFoundError("meeting not found");else throw a}}async function getMeetingList(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};void 0!==a&&(b["x-jibb-pagination"]=JSON.stringify(a));let c=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings"),b);return a=c.headers["x-jibb-pagination"],a=a&&JSON.parse(a),{meetings:c.data.meetings,pagination:a}}async function getMeetingDetails(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},c=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(a),b);return c.data}async function updateMeeting(a){let{meetingId:b,title:c,capacity:d}=a,e={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},f={};return c&&(f.title=c),d&&(f.capacity=d),_index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(b),f,e)}async function isMeetingOwner(a){try{let b=new _types.MeetingClaims(a),c=new _types.UserClaims(await(0,_auth.getUserToken)());return c.userId===b.ownerId}catch(a){return!1}}async function createShare(a){let{email:b,meetingId:c,permission:d,meetingToken:e}=a,f={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)(),"x-jibb-meeting-jwt":e},g=await _index2.http.post("".concat(_config.Config.apiBaseURL,"/v1/meetings/").concat(c,"/shares"),{email:b,permission:d},f);return g.data}async function getIncomingShares(){let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},b=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares?incoming=true"),a);return b.data.shares}async function getOutgoingShares(){let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()},b=await _index2.http.get("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares?outgoing=true"),a);return b.data.shares}async function deleteShare(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};return _index2.http.delete("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares/").concat(a),b)}async function updateShare(a){let{shareId:b,permission:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)()};return _index2.http.patch("".concat(_config.Config.apiBaseURL,"/v1/meetings/shares/").concat(b),{permission:c},d)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jibb-open/jssdk",
3
- "version": "3.10.1",
3
+ "version": "3.13.0",
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 $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,STARTED:1,STOPPED:2,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:"int32",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:"int32",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:"int32",id:1},data:{type:"bytes",id:2}}},Response:{fields:{id:{type:"int32",id:1},image:{type:"bytes",id:5},status:{type:"Status",id:8}}}}}}}}},user:{options:{go_package:"github.com/Inkerz/jibbapis/sdk/go/user"},nested:{Level:{values:{FREE:0,BASIC:1,STUDENT:2,PRO:3,BUSINESS:4,ENTERPRISE:5,EDUCATION:6}},UserType:{values:{UNKNOWN:0,LIMITED:1,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:"int32",id:9},email:{type:"string",id:10}}},UserList:{fields:{users:{rule:"repeated",type:"UserDetails",id:1}}},CreateOrganizationUserRequest:{fields:{organizationId:{type:"int32",id:1},users:{rule:"repeated",type:"User",id:2}},nested:{User:{fields:{email:{type:"string",id:2},firstName:{type:"string",id:3},lastName:{type:"string",id:4},userType:{type:"UserType",id:5}}}}},CreateOrganizationUserResponse:{fields:{failedUsers:{rule:"repeated",type:"string",id:1}}},DeleteOrganizationUserRequest:{fields:{organizationId:{type:"int32",id:1},userId:{type:"int32",id:2}}},ChangeOrganizationUserTypeRequest:{fields:{organizationId:{type:"int32",id:1},userId:{type:"int32",id:2},userType:{type:"UserType",id:3}}},GetOrganizationUsersListRequest:{fields:{organizationId:{type:"int32",id:1}}},GetOrganizationUserRequest:{fields:{organizationId:{type:"int32",id:1},userId:{type:"int32",id:2}}},DeleteSAMLRequest:{fields:{organizationId:{type:"int32",id:1}}},GetSAMLRequest:{fields:{organizationId:{type:"int32",id:1}}},GetOrganizationSettingsRequest:{fields:{organizationId:{type:"int32",id:1}}},SAMLDetails:{fields:{organizationId:{type:"int32",id:1},metadata:{type:"string",id:3},autoAddUsers:{type:"bool",id:4},defaultUserType:{type:"UserType",id:5},enabled:{type:"bool",id:6}}},GetOrganizationRequest:{fields:{organizationId:{type:"int32",id:1}}},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},expiryDate:{type:"google.protobuf.Timestamp",id:7},organizationId:{type:"int32",id:8},subdomainName:{type:"string",id:9}}},OrganizationList:{fields:{organizations:{rule:"repeated",type:"OrganizationDetails",id:1}}},UserClaims:{fields:{level:{type:"Level",id:2},organizationIds:{rule:"repeated",type:"int32",id:3},email:{type:"string",id:4}}},GetUserTokenRequest:{fields:{expiry:{type:"google.protobuf.Duration",id:1},apiKey:{type:"string",id:2}}},GetUserTokenResponse:{fields:{token:{type:"string",id:1}}},GenerateAPIKeyResponse:{fields:{apiKey:{type:"string",id:1}}},GenerateCustomAuthResponse:{fields:{password:{type:"string",id:1}}},VerifyCustomAuthRequest:{fields:{username:{type:"string",id:1},password:{type:"string",id:2}}},VerifyCustomAuthResponse:{fields:{verified:{type:"bool",id:1}}},GetOrganizationIdRequest:{fields:{organizationName:{type:"string",id:1},subdomainName:{type:"string",id:2},domainName:{type:"string",id:3},userEmail:{type:"string",id:4}}},GetOrganizationIdResponse:{fields:{organizationId:{type:"int32",id:1}}},CreateDomainRequest:{fields:{organizationId:{type:"int32",id:1},domainName:{type:"string",id:2}}},DeleteDomainRequest:{fields:{organizationId:{type:"int32",id:1},domainId:{type:"int32",id:2}}},VerifyDomainRequest:{fields:{organizationId:{type:"int32",id:1},domainId:{type:"int32",id:2}}},GetDomainListRequest:{fields:{organizationId:{type:"int32",id:1}}},GetDomainListResponse:{fields:{domains:{rule:"repeated",type:"DomainDetails",id:1}}},GetDomainRequest:{fields:{organizationId:{type:"int32",id:1},domainId:{type:"int32",id:2}}},DomainDetails:{fields:{organizationId:{type:"int32",id:1},domainId:{type:"int32",id:2},domainName:{type:"string",id:3},verificationCode:{type:"string",id:4},verified:{type:"bool",id:5}}},ActivateUserRequest:{fields:{organizationId:{type:"int32",id:1}}},GetUserIdRequest:{fields:{email:{type:"string",id:1},createIfNotExists:{type:"bool",id:2}}},GetUserIdResponse:{fields:{userId:{type:"int32",id:1}}},GetUserDetailsRequest:{fields:{userId:{type:"int32",id:1}}}}},google:{nested:{protobuf:{nested:{Empty:{fields:{}},Duration:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}},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:"int32",id:2},email:{type:"string",id:3},title:{type:"string",id:4}}},Update:{fields:{userId:{type:"int32",id:2},image:{type:"bytes",id:5}}},Drawing:{fields:{userId:{type:"int32",id:2},data:{type:"string",id:4}}},Pointer:{fields:{userId:{type:"int32",id:2},x:{type:"int32",id:4},y:{type:"int32",id:5},email:{type:"string",id:6}}},ImageAck:{fields:{userId:{type:"int32",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}}}}},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=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:"int32",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:"int32",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:"int32",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:"int32",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}}},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},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:"int32",id:2},email:{type:"string",id:3},title:{type:"string",id:4}}},Update:{fields:{userId:{type:"int32",id:2},image:{type:"bytes",id:5}}},Drawing:{fields:{userId:{type:"int32",id:2},data:{type:"string",id:4}}},Pointer:{fields:{userId:{type:"int32",id:2},x:{type:"int32",id:4},y:{type:"int32",id:5},email:{type:"string",id:6}}},ImageAck:{fields:{userId:{type:"int32",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_TYPE:0,MEETING_IMAGE_READ:1,MEETING_IMAGE_WRITE:2,MEETING_ANNOTATION_READ:4,MEETING_ANNOTATION_WRITE:8,MEETING_WRITE:16}},Meeting:{fields:{id:{type:"string",id:1},title:{type:"string",id:2},ownerId:{type:"int32",id:6},creationTime:{type:"int64",id:7},capacity:{type:"int32",id:8},isTemporary:{type:"bool",id:9}}},MeetingClaims:{fields:{meetingId:{type:"string",id:1},ownerId:{type:"int32",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;
package/types/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";var _jwtDecode=_interopRequireDefault(require("jwt-decode"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserType=exports.UserClaims=exports.MeetingTypes=exports.MeetingClaims=exports.AccessLevel=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}const MeetingTypes={DEFAULT:0,WHITEBOARD:1};exports.MeetingTypes=MeetingTypes;const AccessLevel={USER:"USER",ADMIN:"ADMIN",SUPERADMIN:"SUPERADMIN"};exports.AccessLevel=AccessLevel;const UserType={UNKNOWN:0,LIMITED:1,MEMBER:2,ADMIN:3,OWNER:4};exports.UserType=UserType;class StandardClaims{constructor(a){this.token=a,this.claims=(0,_jwtDecode.default)(a),this.expiryTime=new Date(1e3*this.claims.exp)}getSecondsUntilExpiry(){let a=this.expiryTime-Date.now();return 0>a?0:a}getHoursUntilExpiry(){let a=this.getSecondsUntilExpiry();return Math.floor(a/3600)}isExpired(){return 60>=this.getSecondsUntilExpiry()}}class MeetingClaims extends StandardClaims{constructor(a){super(a),this.ownerId=this.claims.data.owner_id,this.meetindId=this.claims.data.meeting_id,this.title=this.claims.data.title,this.capacity=this.claims.data.capacity,this.permission=this.claims.data.permission,this.isTemporary=this.claims.data.is_temporary}}exports.MeetingClaims=MeetingClaims;class UserClaims extends StandardClaims{constructor(a){var b;super(a),this.email=null===(b=this.claims.data)||void 0===b?void 0:b.email,this.userId=this.claims.sub}getUserId(){return this.userId}}exports.UserClaims=UserClaims;
1
+ "use strict";var _jwtDecode=_interopRequireDefault(require("jwt-decode"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserType=exports.UserClaims=exports.MeetingTypes=exports.MeetingClaims=exports.AccessLevel=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}const MeetingTypes={DEFAULT:0,WHITEBOARD:1};exports.MeetingTypes=MeetingTypes;const AccessLevel={USER:"USER",ADMIN:"ADMIN",SUPERADMIN:"SUPERADMIN"};exports.AccessLevel=AccessLevel;const UserType={UNKNOWN:0,LIMITED:1,MEMBER:2,ADMIN:3,OWNER:4};exports.UserType=UserType;class StandardClaims{constructor(a){this.token=a,this.claims=(0,_jwtDecode.default)(a),this.expiryTime=new Date(1e3*this.claims.exp)}getSecondsUntilExpiry(){let a=this.expiryTime-Date.now();return 0>a?0:a}getHoursUntilExpiry(){let a=this.getSecondsUntilExpiry();return Math.floor(a/3600)}isExpired(){return 60>=this.getSecondsUntilExpiry()}}class MeetingClaims extends StandardClaims{constructor(a){super(a),this.ownerId=this.claims.data.owner_id,this.meetindId=this.claims.data.meeting_id,this.title=this.claims.data.title,this.capacity=this.claims.data.capacity,this.permission=this.claims.data.permission,this.isTemporary=this.claims.data.is_temporary}}exports.MeetingClaims=MeetingClaims;class UserClaims extends StandardClaims{constructor(a){var b,c;super(a),this.email=null===(b=this.claims.data)||void 0===b?void 0:b.email,this.userId=this.claims.sub,this.organizationId=null===(c=this.claims.data)||void 0===c?void 0:c.organization_id}getUserId(){return this.userId}}exports.UserClaims=UserClaims;
package/api/admin.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDomain=createDomain,exports.createOrganizationUser=createOrganizationUser,exports.createUsers=createUsers,exports.deleteDomain=deleteDomain,exports.deleteOrganizationUser=deleteOrganizationUser,exports.deleteSAML=deleteSAML,exports.getDomainList=getDomainList,exports.getOrganizationDetails=getOrganizationDetails,exports.getOrganizationList=getOrganizationList,exports.getOrganizationUserDetails=getOrganizationUserDetails,exports.getSAML=getSAML,exports.getUserList=getUserList,exports.setSAML=setSAML,exports.updateUserType=updateUserType,exports.verifyDomain=verifyDomain,require("core-js/modules/es.promise.js"),require("core-js/modules/es.json.stringify.js");var _config=require("../config.js"),_index=require("../utils/http/index.js"),_auth=require("./auth.js"),_types=require("../types/types.js");const accessLevel=_types.AccessLevel.ADMIN;async function getOrganizationList(){let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},b=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations"),a);return b.data.organizations}async function getOrganizationDetails(a){if(!a)throw new Error("organization ID can not be empty");let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},c=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(a),b);return c.data}async function getUserList(a,b){let c={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};void 0!==b&&(c["x-jibb-pagination"]=JSON.stringify(b));let d=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(a,"/users"),c);return b=d.headers["x-jibb-pagination"],b=b&&JSON.parse(b),{users:d.data.users,pagination:b}}async function createUsers(a){let{orgId:b,users:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.post("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/users"),{users:c},d)}async function createOrganizationUser(a){let{orgId:b,email:c,userType:d}=a,e={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.post("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/users"),{users:[{email:c,user_type:d}]},e)}async function deleteOrganizationUser(a){let{orgId:b,userId:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.delete("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/users/").concat(c),d)}async function updateUserType(a){let{orgId:b,userId:c,userType:d}=a,e={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.patch("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/users/").concat(c),{user_type:d},e)}async function getOrganizationUserDetails(a){let{orgId:b,userId:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},e=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/users/").concat(c),d);return e.data}async function setSAML(a){let{orgId:b,metadata:c,autoAddUsers:d,defaultUserType:e,enabled:f}=a;if(!b)throw new Error("organization ID can not be empty");let g={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},h={organization_id:b,metadata:c||"",auto_add_users:d!==void 0&&d,default_user_type:e===void 0?_types.UserType.UNKNOWN:e,enabled:f||!1};return _index.http.put("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/saml"),h,g)}async function deleteSAML(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.delete("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(a,"/saml"),b)}async function getSAML(a){if(!a)throw new Error("organization ID can not be empty");let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},c=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(a,"/saml"),b);return c.data}async function getDomainList(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},c=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(a,"/domains"),b);return c.data}async function createDomain(a){let{orgId:b,domain:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},e=await _index.http.post("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/domains"),{domain_name:c},d);return e.data}async function deleteDomain(a){let{orgId:b,domainId:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.delete("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/domains/").concat(c),d)}async function verifyDomain(a){let{orgId:b,domainId:c}=a,d={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},e=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/admin/organizations/").concat(b,"/domains/").concat(c,"/verify"),d);return e.data}
package/api/superadmin.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createOrganization=createOrganization,exports.deleteOrganization=deleteOrganization,exports.getOrganization=getOrganization,exports.getOrganizationList=getOrganizationList,exports.updateOrganization=updateOrganization,require("core-js/modules/es.promise.js");var _config=require("../config.js"),_index=require("../utils/http/index.js"),_types=require("../types/types.js"),_auth=require("./auth.js");let accessLevel=_types.AccessLevel.SUPERADMIN;async function getOrganizationList(){let a={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},b=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/superadmin/organizations"),a);return b.data.organizations}async function getOrganization(a){if(""===a)throw new Error("organization ID can not be empty");let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})},c=await _index.http.get("".concat(_config.Config.apiBaseURL,"/v1/superadmin/organizations/").concat(a),b);return c.data}async function createOrganization(a){let{organizationName:b,ownerEmail:c,level:d,licenseCount:e,expiryDate:f}=a,g={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.post("".concat(_config.Config.apiBaseURL,"/v1/superadmin/organizations/"),{name:b,owner_email:c,level:d,license_count:e,expiry_date:f},g)}async function updateOrganization(a){let{organizationId:b,organizationName:c,ownerEmail:d,level:e,licenseCount:f,expiryDate:g}=a,h={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.put("".concat(_config.Config.apiBaseURL,"/v1/superadmin/organizations/").concat(b),{name:c,owner_email:d,level:e,license_count:f,expiry_date:g},h)}async function deleteOrganization(a){let b={"Content-Type":"application/json",Accept:"application/json","x-jibb-user-jwt":await(0,_auth.getUserToken)({accessLevel:accessLevel})};return _index.http.delete("".concat(_config.Config.apiBaseURL,"/v1/superadmin/organizations/").concat(a),b)}