plugnmeet-sdk-js 1.0.2 → 1.2.1

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.
Files changed (97) hide show
  1. package/README.md +1 -1
  2. package/{PlugNmeet.d.ts → dist/PlugNmeet.d.ts} +0 -0
  3. package/dist/PlugNmeet.js +198 -0
  4. package/dist/PlugNmeet.js.map +1 -0
  5. package/{api.d.ts → dist/api.d.ts} +1 -1
  6. package/dist/api.js +67 -0
  7. package/dist/api.js.map +1 -0
  8. package/dist/cjs/PlugNmeet.d.ts +76 -0
  9. package/{PlugNmeet.js → dist/cjs/PlugNmeet.js} +1 -0
  10. package/dist/cjs/PlugNmeet.js.map +1 -0
  11. package/dist/cjs/api.d.ts +6 -0
  12. package/{api.js → dist/cjs/api.js} +1 -0
  13. package/dist/cjs/api.js.map +1 -0
  14. package/{index.d.ts → dist/cjs/index.d.ts} +1 -1
  15. package/{index.js → dist/cjs/index.js} +1 -0
  16. package/dist/cjs/index.js.map +1 -0
  17. package/dist/cjs/types/RecordingDownloadToken.d.ts +8 -0
  18. package/{types → dist/cjs/types}/RecordingDownloadToken.js +1 -0
  19. package/dist/cjs/types/RecordingDownloadToken.js.map +1 -0
  20. package/{types → dist/cjs/types}/activeRoomInfo.d.ts +5 -5
  21. package/{types → dist/cjs/types}/activeRoomInfo.js +1 -0
  22. package/dist/cjs/types/activeRoomInfo.js.map +1 -0
  23. package/{types → dist/cjs/types}/activeRoomsInfo.d.ts +1 -1
  24. package/{types → dist/cjs/types}/activeRoomsInfo.js +1 -0
  25. package/dist/cjs/types/activeRoomsInfo.js.map +1 -0
  26. package/{types → dist/cjs/types}/clientFiles.d.ts +1 -1
  27. package/{types → dist/cjs/types}/clientFiles.js +1 -0
  28. package/dist/cjs/types/clientFiles.js.map +1 -0
  29. package/{types → dist/cjs/types}/createRoom.d.ts +19 -13
  30. package/{types → dist/cjs/types}/createRoom.js +1 -0
  31. package/dist/cjs/types/createRoom.js.map +1 -0
  32. package/dist/cjs/types/deleteRecordings.d.ts +7 -0
  33. package/{types → dist/cjs/types}/deleteRecordings.js +1 -0
  34. package/dist/cjs/types/deleteRecordings.js.map +1 -0
  35. package/dist/cjs/types/endRoom.d.ts +7 -0
  36. package/{types → dist/cjs/types}/endRoom.js +1 -0
  37. package/dist/cjs/types/endRoom.js.map +1 -0
  38. package/{types → dist/cjs/types}/fetchRecordings.d.ts +4 -4
  39. package/{types → dist/cjs/types}/fetchRecordings.js +1 -0
  40. package/dist/cjs/types/fetchRecordings.js.map +1 -0
  41. package/dist/cjs/types/isRoomActive.d.ts +7 -0
  42. package/{types → dist/cjs/types}/isRoomActive.js +1 -0
  43. package/dist/cjs/types/isRoomActive.js.map +1 -0
  44. package/{types → dist/cjs/types}/joinToken.d.ts +4 -4
  45. package/{types → dist/cjs/types}/joinToken.js +1 -0
  46. package/dist/cjs/types/joinToken.js.map +1 -0
  47. package/dist/index.d.ts +11 -0
  48. package/dist/index.js +2 -0
  49. package/dist/index.js.map +1 -0
  50. package/dist/types/RecordingDownloadToken.d.ts +8 -0
  51. package/dist/types/RecordingDownloadToken.js +2 -0
  52. package/dist/types/RecordingDownloadToken.js.map +1 -0
  53. package/dist/types/activeRoomInfo.d.ts +34 -0
  54. package/dist/types/activeRoomInfo.js +2 -0
  55. package/dist/types/activeRoomInfo.js.map +1 -0
  56. package/dist/types/activeRoomsInfo.d.ts +6 -0
  57. package/dist/types/activeRoomsInfo.js +2 -0
  58. package/dist/types/activeRoomsInfo.js.map +1 -0
  59. package/dist/types/clientFiles.d.ts +6 -0
  60. package/dist/types/clientFiles.js +2 -0
  61. package/dist/types/clientFiles.js.map +1 -0
  62. package/dist/types/createRoom.d.ts +82 -0
  63. package/dist/types/createRoom.js +2 -0
  64. package/dist/types/createRoom.js.map +1 -0
  65. package/dist/types/deleteRecordings.d.ts +7 -0
  66. package/dist/types/deleteRecordings.js +2 -0
  67. package/dist/types/deleteRecordings.js.map +1 -0
  68. package/dist/types/endRoom.d.ts +7 -0
  69. package/dist/types/endRoom.js +2 -0
  70. package/dist/types/endRoom.js.map +1 -0
  71. package/dist/types/fetchRecordings.d.ts +27 -0
  72. package/dist/types/fetchRecordings.js +2 -0
  73. package/dist/types/fetchRecordings.js.map +1 -0
  74. package/dist/types/isRoomActive.d.ts +7 -0
  75. package/dist/types/isRoomActive.js +2 -0
  76. package/dist/types/isRoomActive.js.map +1 -0
  77. package/dist/types/joinToken.d.ts +21 -0
  78. package/dist/types/joinToken.js +2 -0
  79. package/dist/types/joinToken.js.map +1 -0
  80. package/package.json +22 -12
  81. package/src/PlugNmeet.ts +255 -0
  82. package/src/api.ts +92 -0
  83. package/src/index.ts +48 -0
  84. package/src/types/RecordingDownloadToken.ts +9 -0
  85. package/src/types/activeRoomInfo.ts +38 -0
  86. package/src/types/activeRoomsInfo.ts +7 -0
  87. package/src/types/clientFiles.ts +6 -0
  88. package/src/types/createRoom.ts +94 -0
  89. package/src/types/deleteRecordings.ts +8 -0
  90. package/src/types/endRoom.ts +8 -0
  91. package/src/types/fetchRecordings.ts +30 -0
  92. package/src/types/isRoomActive.ts +8 -0
  93. package/src/types/joinToken.ts +25 -0
  94. package/types/RecordingDownloadToken.d.ts +0 -8
  95. package/types/deleteRecordings.d.ts +0 -7
  96. package/types/endRoom.d.ts +0 -7
  97. package/types/isRoomActive.d.ts +0 -7
@@ -1,22 +1,22 @@
1
- export declare type FetchRecordingsParams = {
1
+ export type FetchRecordingsParams = {
2
2
  room_ids: Array<string>;
3
3
  from?: number;
4
4
  limit?: number;
5
5
  order_by?: 'ASC' | 'DESC';
6
6
  };
7
- export declare type FetchRecordingsResponse = {
7
+ export type FetchRecordingsResponse = {
8
8
  status: boolean;
9
9
  msg: string;
10
10
  result?: FetchRecordingsResult;
11
11
  };
12
- export declare type FetchRecordingsResult = {
12
+ export type FetchRecordingsResult = {
13
13
  total_recordings: number;
14
14
  from: number;
15
15
  limit: number;
16
16
  order_by: string;
17
17
  recordings_list: Array<RecordingInfo>;
18
18
  };
19
- export declare type RecordingInfo = {
19
+ export type RecordingInfo = {
20
20
  record_id: string;
21
21
  room_id: string;
22
22
  room_sid: string;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=fetchRecordings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchRecordings.js","sourceRoot":"","sources":["../../../src/types/fetchRecordings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type IsRoomActiveParams = {
2
+ room_id: string;
3
+ };
4
+ export type IsRoomActiveResponse = {
5
+ status: boolean;
6
+ msg: string;
7
+ };
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=isRoomActive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRoomActive.js","sourceRoot":"","sources":["../../../src/types/isRoomActive.ts"],"names":[],"mappings":""}
@@ -1,20 +1,20 @@
1
1
  import { LockSettingsParams } from './createRoom';
2
- export declare type JoinTokenParams = {
2
+ export type JoinTokenParams = {
3
3
  room_id: string;
4
4
  user_info: JoinTokenUserInfo;
5
5
  };
6
- export declare type JoinTokenUserInfo = {
6
+ export type JoinTokenUserInfo = {
7
7
  name: string;
8
8
  user_id: string;
9
9
  is_admin: boolean;
10
10
  is_hidden: boolean;
11
11
  user_metadata?: JoinTokenUserMetadata;
12
12
  };
13
- export declare type JoinTokenUserMetadata = {
13
+ export type JoinTokenUserMetadata = {
14
14
  profile_pic?: string;
15
15
  lock_settings?: LockSettingsParams;
16
16
  };
17
- export declare type JoinTokenResponse = {
17
+ export type JoinTokenResponse = {
18
18
  status: boolean;
19
19
  msg: string;
20
20
  token?: string;
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=joinToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joinToken.js","sourceRoot":"","sources":["../../../src/types/joinToken.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export { RooMetadata, CreateRoomParams, CreateRoomResponse, CreateRoomResponseRoomInfo, LockSettingsParams, RoomFeaturesParams, RecordingFeaturesParams, ChatFeaturesParams, SharedNotePadFeaturesParams, WhiteboardFeaturesParams, ExternalMediaPlayerFeatures, WaitingRoomFeatures, BreakoutRoomFeatures, } from './types/createRoom';
2
+ export { JoinTokenParams, JoinTokenResponse, JoinTokenUserMetadata, JoinTokenUserInfo, } from './types/joinToken';
3
+ export { IsRoomActiveParams, IsRoomActiveResponse } from './types/isRoomActive';
4
+ export { Room, ActiveRoomInfoParams, ActiveRoomInfoResponse, ParticipantInfo, ActiveRoomInfo, } from './types/activeRoomInfo';
5
+ export { ActiveRoomsInfoResponse } from './types/activeRoomsInfo';
6
+ export { EndRoomParams, EndRoomResponse } from './types/endRoom';
7
+ export { FetchRecordingsParams, FetchRecordingsResponse, FetchRecordingsResult, RecordingInfo, } from './types/fetchRecordings';
8
+ export { DeleteRecordingsParams, DeleteRecordingsResponse, } from './types/deleteRecordings';
9
+ export { RecordingDownloadTokenParams, RecordingDownloadTokenResponse, } from './types/RecordingDownloadToken';
10
+ export { ClientFilesResponse } from './types/clientFiles';
11
+ export { PlugNmeet } from './PlugNmeet';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { PlugNmeet } from './PlugNmeet';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type RecordingDownloadTokenParams = {
2
+ record_id: string;
3
+ };
4
+ export type RecordingDownloadTokenResponse = {
5
+ status: boolean;
6
+ msg: string;
7
+ token?: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RecordingDownloadToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordingDownloadToken.js","sourceRoot":"","sources":["../../src/types/RecordingDownloadToken.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ export type ActiveRoomInfoParams = {
2
+ room_id: string;
3
+ };
4
+ export type ActiveRoomInfoResponse = {
5
+ status: boolean;
6
+ msg: string;
7
+ room?: Room;
8
+ };
9
+ export type Room = {
10
+ room_info: ActiveRoomInfo;
11
+ participants_info: Array<ParticipantInfo>;
12
+ };
13
+ export type ActiveRoomInfo = {
14
+ room_title: string;
15
+ room_id: string;
16
+ sid: string;
17
+ joined_participants: number;
18
+ is_running: boolean;
19
+ is_recording: boolean;
20
+ is_active_rtmp: boolean;
21
+ webhook_url: string;
22
+ creation_time: number;
23
+ metadata: string;
24
+ };
25
+ export type ParticipantInfo = {
26
+ sid: string;
27
+ identity: string;
28
+ state: string;
29
+ metadata: string;
30
+ joined_at: number;
31
+ name: string;
32
+ version: number;
33
+ permission: any;
34
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=activeRoomInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activeRoomInfo.js","sourceRoot":"","sources":["../../src/types/activeRoomInfo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { Room } from './activeRoomInfo';
2
+ export type ActiveRoomsInfoResponse = {
3
+ status: boolean;
4
+ msg: string;
5
+ rooms?: Array<Room>;
6
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=activeRoomsInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activeRoomsInfo.js","sourceRoot":"","sources":["../../src/types/activeRoomsInfo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export type ClientFilesResponse = {
2
+ status: boolean;
3
+ msg: string;
4
+ css?: Array<string>;
5
+ js?: Array<string>;
6
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=clientFiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientFiles.js","sourceRoot":"","sources":["../../src/types/clientFiles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,82 @@
1
+ export type CreateRoomParams = {
2
+ room_id: string;
3
+ max_participants?: number;
4
+ empty_timeout?: number;
5
+ metadata: RooMetadata;
6
+ };
7
+ export type RooMetadata = {
8
+ room_title: string;
9
+ welcome_message?: string;
10
+ webhook_url?: string;
11
+ room_features: RoomFeaturesParams;
12
+ default_lock_settings?: LockSettingsParams;
13
+ };
14
+ export type RoomFeaturesParams = {
15
+ allow_webcams: boolean;
16
+ mute_on_start: boolean;
17
+ allow_screen_share: boolean;
18
+ allow_rtmp: boolean;
19
+ admin_only_webcams: boolean;
20
+ allow_view_other_webcams: boolean;
21
+ allow_view_other_users_list: boolean;
22
+ recording_features: RecordingFeaturesParams;
23
+ chat_features: ChatFeaturesParams;
24
+ shared_note_pad_features?: SharedNotePadFeaturesParams;
25
+ whiteboard_features?: WhiteboardFeaturesParams;
26
+ external_media_player_features?: ExternalMediaPlayerFeatures;
27
+ waiting_room_features?: WaitingRoomFeatures;
28
+ breakout_room_features?: BreakoutRoomFeatures;
29
+ };
30
+ export type RecordingFeaturesParams = {
31
+ is_allow: boolean;
32
+ is_allow_cloud: boolean;
33
+ is_allow_local: boolean;
34
+ enable_auto_cloud_recording: boolean;
35
+ };
36
+ export type ChatFeaturesParams = {
37
+ allow_chat: boolean;
38
+ allow_file_upload: boolean;
39
+ allowed_file_types: Array<string>;
40
+ max_file_size: number;
41
+ };
42
+ export type SharedNotePadFeaturesParams = {
43
+ allowed_shared_note_pad: boolean;
44
+ };
45
+ export type WhiteboardFeaturesParams = {
46
+ allowed_whiteboard: boolean;
47
+ };
48
+ export type ExternalMediaPlayerFeatures = {
49
+ allowed_external_media_player: boolean;
50
+ };
51
+ export type WaitingRoomFeatures = {
52
+ is_active: boolean;
53
+ waiting_room_msg?: string;
54
+ };
55
+ export type BreakoutRoomFeatures = {
56
+ is_allow: boolean;
57
+ };
58
+ export type LockSettingsParams = {
59
+ lock_microphone?: boolean;
60
+ lock_webcam?: boolean;
61
+ lock_screen_sharing?: boolean;
62
+ lock_whiteboard?: boolean;
63
+ lock_shared_notepad?: boolean;
64
+ lock_chat?: boolean;
65
+ lock_chat_send_message?: boolean;
66
+ lock_chat_file_share?: boolean;
67
+ };
68
+ export type CreateRoomResponse = {
69
+ status: boolean;
70
+ msg: string;
71
+ roomInfo?: CreateRoomResponseRoomInfo;
72
+ };
73
+ export type CreateRoomResponseRoomInfo = {
74
+ sid: string;
75
+ name: string;
76
+ max_participants: number;
77
+ empty_timeout: number;
78
+ creation_time: number;
79
+ turn_password: string;
80
+ enabled_codecs: Array<any>;
81
+ metadata: string;
82
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=createRoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRoom.js","sourceRoot":"","sources":["../../src/types/createRoom.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type DeleteRecordingsParams = {
2
+ record_id: string;
3
+ };
4
+ export type DeleteRecordingsResponse = {
5
+ status: boolean;
6
+ msg: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deleteRecordings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteRecordings.js","sourceRoot":"","sources":["../../src/types/deleteRecordings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type EndRoomParams = {
2
+ room_id: string;
3
+ };
4
+ export type EndRoomResponse = {
5
+ status: boolean;
6
+ msg: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=endRoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endRoom.js","sourceRoot":"","sources":["../../src/types/endRoom.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ export type FetchRecordingsParams = {
2
+ room_ids: Array<string>;
3
+ from?: number;
4
+ limit?: number;
5
+ order_by?: 'ASC' | 'DESC';
6
+ };
7
+ export type FetchRecordingsResponse = {
8
+ status: boolean;
9
+ msg: string;
10
+ result?: FetchRecordingsResult;
11
+ };
12
+ export type FetchRecordingsResult = {
13
+ total_recordings: number;
14
+ from: number;
15
+ limit: number;
16
+ order_by: string;
17
+ recordings_list: Array<RecordingInfo>;
18
+ };
19
+ export type RecordingInfo = {
20
+ record_id: string;
21
+ room_id: string;
22
+ room_sid: string;
23
+ file_path: string;
24
+ file_size: number;
25
+ creation_time: number;
26
+ room_creation_time: number;
27
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fetchRecordings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchRecordings.js","sourceRoot":"","sources":["../../src/types/fetchRecordings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type IsRoomActiveParams = {
2
+ room_id: string;
3
+ };
4
+ export type IsRoomActiveResponse = {
5
+ status: boolean;
6
+ msg: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=isRoomActive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRoomActive.js","sourceRoot":"","sources":["../../src/types/isRoomActive.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { LockSettingsParams } from './createRoom';
2
+ export type JoinTokenParams = {
3
+ room_id: string;
4
+ user_info: JoinTokenUserInfo;
5
+ };
6
+ export type JoinTokenUserInfo = {
7
+ name: string;
8
+ user_id: string;
9
+ is_admin: boolean;
10
+ is_hidden: boolean;
11
+ user_metadata?: JoinTokenUserMetadata;
12
+ };
13
+ export type JoinTokenUserMetadata = {
14
+ profile_pic?: string;
15
+ lock_settings?: LockSettingsParams;
16
+ };
17
+ export type JoinTokenResponse = {
18
+ status: boolean;
19
+ msg: string;
20
+ token?: string;
21
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=joinToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joinToken.js","sourceRoot":"","sources":["../../src/types/joinToken.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,26 +1,36 @@
1
1
  {
2
2
  "name": "plugnmeet-sdk-js",
3
- "version": "1.0.2",
3
+ "version": "1.2.1",
4
4
  "description": "plugNmeet JS SDK",
5
- "main": "src/index.ts",
5
+ "author": "Jibon L. Costa",
6
+ "license": "MIT",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ "types": "./dist/src/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/cjs/index.js"
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "src"
17
+ ],
6
18
  "scripts": {
7
19
  "start": "rm -rf ./dist && concurrently -c \"red,green\" --kill-others \"tsc --watch -p . --outDir ./dist && esw -w --ext '.ts','.js' --fix\"",
8
- "build": "rm -rf ./dist && tsc -p . --outDir ./dist",
20
+ "build": "rm -rf ./dist && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json",
9
21
  "build-docs": "typedoc --sort source-order"
10
22
  },
11
- "author": "Jibon L. Costa",
12
- "license": "MIT",
13
23
  "devDependencies": {
14
- "@types/node": "18.7.18",
15
- "@typescript-eslint/eslint-plugin": "5.37.0",
16
- "@typescript-eslint/parser": "5.37.0",
17
- "concurrently": "7.4.0",
18
- "eslint": "8.23.1",
24
+ "@types/node": "18.11.9",
25
+ "@typescript-eslint/eslint-plugin": "5.43.0",
26
+ "@typescript-eslint/parser": "5.43.0",
27
+ "concurrently": "7.5.0",
28
+ "eslint": "8.28.0",
19
29
  "eslint-config-prettier": "8.5.0",
20
30
  "eslint-plugin-prettier": "4.2.1",
21
31
  "eslint-watch": "8.0.0",
22
32
  "prettier": "2.7.1",
23
- "typedoc": "0.23.14",
24
- "typescript": "4.8.3"
33
+ "typedoc": "0.23.21",
34
+ "typescript": "4.9.3"
25
35
  }
26
36
  }