@jibb-open/jssdk 3.5.9 → 3.5.10
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/{dist/api → api}/admin.js +0 -0
- package/{dist/api → api}/auth.js +0 -0
- package/{dist/api → api}/eventbus.js +0 -0
- package/{dist/api → api}/index.js +0 -0
- package/{dist/api → api}/meeting.js +0 -0
- package/{dist/api → api}/recording.js +0 -0
- package/{dist/api → api}/superadmin.js +0 -0
- package/{dist/api → api}/user.js +0 -0
- package/{dist/api → api}/webexbot.js +0 -0
- package/{dist/api → api}/whiteboard.js +0 -0
- package/{dist/config.js → config.js} +0 -0
- package/{dist/examples → examples}/browser/462.jibb.js +0 -0
- package/{dist/examples → examples}/browser/index.html +0 -0
- package/{dist/examples → examples}/browser/jibb.js +0 -0
- package/{dist/examples → examples}/browser/startSession.js +0 -0
- package/{dist/examples → examples}/examples.js +0 -0
- package/{dist/examples → examples}/webexDevicesMacros/cameraPresets/jibb.js +0 -0
- package/{dist/examples → examples}/webexDevicesMacros/simplestExample/jibb.js +0 -0
- package/{dist/examples → examples}/webexDevicesMacros/webexDevice JSSDK/jibb_WebexXapi.js +0 -0
- package/{dist/examples → examples}/webexDevicesMacros/withCameraControl/jibb.js +0 -0
- package/package.json +1 -1
- package/{dist/post-processing.js → post-processing.js} +0 -0
- package/{dist/types → types}/exceptions.js +0 -0
- package/{dist/types → types}/jibb.pb.js +0 -0
- package/{dist/types → types}/proto.js +0 -0
- package/{dist/types → types}/types.js +0 -0
- package/{dist/utils → utils}/cached_variable.js +0 -0
- package/{dist/utils → utils}/future.js +0 -0
- package/{dist/utils → utils}/http/http.axios.js +0 -0
- package/{dist/utils → utils}/http/index.js +0 -0
- package/{dist/utils → utils}/index.js +0 -0
- package/{dist/utils → utils}/logger/index.js +0 -0
- package/{dist/utils → utils}/logger/logger.empty.js +0 -0
- package/{dist/utils → utils}/logger/logger.pino.js +0 -0
- package/{dist/ws → ws}/connection_base.js +0 -0
- package/{dist/ws → ws}/eventbus.js +0 -0
- package/{dist/ws → ws}/index.js +0 -0
- package/{dist/ws → ws}/ipsa.js +0 -0
- package/{dist/ws → ws}/meeting.js +0 -0
- package/{dist/ws → ws}/observable_connection.js +0 -0
- package/{dist/ws → ws}/retry_connection.js +0 -0
- package/.babelrc +0 -31
- package/README.md +0 -4
- package/dist/package.json +0 -69
- package/src/api/admin.js +0 -333
- package/src/api/auth.js +0 -208
- package/src/api/eventbus.js +0 -246
- package/src/api/index.js +0 -26
- package/src/api/meeting.js +0 -421
- package/src/api/recording.js +0 -225
- package/src/api/superadmin.js +0 -84
- package/src/api/user.js +0 -46
- package/src/api/webexbot.js +0 -32
- package/src/api/whiteboard.js +0 -175
- package/src/config.js +0 -12
- package/src/examples/browser/462.jibb.js +0 -1
- package/src/examples/browser/index.html +0 -17
- package/src/examples/browser/jibb.js +0 -2
- package/src/examples/browser/startSession.js +0 -112
- package/src/examples/examples.js +0 -5
- package/src/examples/webexDevicesMacros/cameraPresets/jibb.js +0 -338
- package/src/examples/webexDevicesMacros/simplestExample/jibb.js +0 -212
- package/src/examples/webexDevicesMacros/webexDevice JSSDK/jibb_WebexXapi.js +0 -2
- package/src/examples/webexDevicesMacros/withCameraControl/jibb.js +0 -303
- package/src/index.webex-devices.js +0 -13
- package/src/post-processing.js +0 -39
- package/src/types/exceptions.js +0 -48
- package/src/types/jibb.pb.js +0 -1357
- package/src/types/proto.js +0 -7
- package/src/types/types.js +0 -64
- package/src/utils/cached_variable.js +0 -23
- package/src/utils/future.js +0 -24
- package/src/utils/http/http.axios.js +0 -34
- package/src/utils/http/http.xapi.js +0 -87
- package/src/utils/http/index.js +0 -8
- package/src/utils/index.js +0 -5
- package/src/utils/logger/index.js +0 -11
- package/src/utils/logger/logger.empty.js +0 -25
- package/src/utils/logger/logger.pino.js +0 -15
- package/src/ws/connection_base.js +0 -81
- package/src/ws/eventbus.js +0 -363
- package/src/ws/index.js +0 -15
- package/src/ws/ipsa.js +0 -246
- package/src/ws/meeting.js +0 -170
- package/src/ws/observable_connection.js +0 -84
- package/src/ws/retry_connection.js +0 -82
- package/webpack.config.cjs +0 -144
|
File without changes
|
package/{dist/api → api}/auth.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{dist/api → api}/user.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{dist/ws → ws}/index.js
RENAMED
|
File without changes
|
package/{dist/ws → ws}/ipsa.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.babelrc
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"webapp": {
|
|
4
|
-
"ignore": ["**/*.xapi.js", "**/*.webex-devices.js"],
|
|
5
|
-
"presets": [
|
|
6
|
-
[
|
|
7
|
-
"@babel/env",
|
|
8
|
-
{
|
|
9
|
-
"targets": {
|
|
10
|
-
"edge": "17",
|
|
11
|
-
"firefox": "60",
|
|
12
|
-
"chrome": "67",
|
|
13
|
-
"safari": "11.1"
|
|
14
|
-
},
|
|
15
|
-
"useBuiltIns": "usage",
|
|
16
|
-
"corejs": "3.6.5"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
],
|
|
20
|
-
|
|
21
|
-
"plugins": [
|
|
22
|
-
[
|
|
23
|
-
"babel-plugin-transform-import-ignore",
|
|
24
|
-
{
|
|
25
|
-
"patterns": [".webex-devices.js", "*xapi*"]
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
package/README.md
DELETED
package/dist/package.json
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jibb-open/jssdk",
|
|
3
|
-
"version": "3.5.9",
|
|
4
|
-
"description": "",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "LOG_LEVEL=error mocha --timeout 10000 ",
|
|
7
|
-
"coverage": "npm run test",
|
|
8
|
-
"build": "BABEL_ENV=webapp babel src --out-dir dist --copy-files --no-copy-ignored",
|
|
9
|
-
"watch": "watch 'npm run build' src",
|
|
10
|
-
"docs": "jsdoc -r ./src/ ./README.md"
|
|
11
|
-
},
|
|
12
|
-
"repository": "https://github.com/Inkerz/jibb-jssdk",
|
|
13
|
-
"author": "",
|
|
14
|
-
"license": "ISC",
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/Inkerz/jibb-jssdk/issues"
|
|
17
|
-
},
|
|
18
|
-
"homepage": "https://github.com/Inkerz/jibb-jssdk#readme",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"axios": "^0.24.0",
|
|
21
|
-
"browser-or-node": "^2.0.0",
|
|
22
|
-
"buffer": "^6.0.3",
|
|
23
|
-
"bufferutil": "^4.0.6",
|
|
24
|
-
"core-js": "^3.23.1",
|
|
25
|
-
"dateformat": "^5.0.3",
|
|
26
|
-
"isomorphic-ws": "^4.0.1",
|
|
27
|
-
"jwt-decode": "^3.1.2",
|
|
28
|
-
"path": "^0.12.7",
|
|
29
|
-
"pino": "^7.6.5",
|
|
30
|
-
"pino-pretty": "^7.5.3",
|
|
31
|
-
"protobufjs": "6.11.3",
|
|
32
|
-
"rimraf": "^3.0.2",
|
|
33
|
-
"utf-8-validate": "^5.0.9",
|
|
34
|
-
"ws": "^8.5.0"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@babel/cli": "^7.17.10",
|
|
38
|
-
"@babel/core": "^7.19.6",
|
|
39
|
-
"@babel/node": "^7.20.0",
|
|
40
|
-
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
|
|
41
|
-
"@babel/plugin-transform-runtime": "^7.18.5",
|
|
42
|
-
"@babel/polyfill": "^7.12.1",
|
|
43
|
-
"@babel/preset-env": "^7.19.4",
|
|
44
|
-
"@babel/runtime": "^7.20.0",
|
|
45
|
-
"babel-loader": "^8.2.5",
|
|
46
|
-
"babel-plugin-add-module-exports": "^1.0.4",
|
|
47
|
-
"babel-plugin-transform-import-ignore": "^1.1.0",
|
|
48
|
-
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
|
|
49
|
-
"chai": "^4.3.6",
|
|
50
|
-
"chai-http": "^4.3.0",
|
|
51
|
-
"chai-spies": "^1.0.0",
|
|
52
|
-
"copy-webpack-plugin": "^10.2.4",
|
|
53
|
-
"core-js": "^3.23.1",
|
|
54
|
-
"dotenv": "^16.0.0",
|
|
55
|
-
"esm": "^3.2.25",
|
|
56
|
-
"file-loader": "^6.2.0",
|
|
57
|
-
"gzip-loader": "^0.0.1",
|
|
58
|
-
"jsdoc": "^4.0.0",
|
|
59
|
-
"mocha": "^9.2.0",
|
|
60
|
-
"null-loader": "^4.0.1",
|
|
61
|
-
"nyc": "^15.1.0",
|
|
62
|
-
"pako": "^2.0.4",
|
|
63
|
-
"raw-loader": "^4.0.2",
|
|
64
|
-
"watch": "^1.0.2",
|
|
65
|
-
"webpack": "^5.74.0",
|
|
66
|
-
"webpack-bundle-analyzer": "^4.6.1",
|
|
67
|
-
"webpack-cli": "^4.9.2"
|
|
68
|
-
}
|
|
69
|
-
}
|
package/src/api/admin.js
DELETED
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import {Config} from '../config.js';
|
|
2
|
-
import {http} from "../utils/http/index.js"
|
|
3
|
-
import {Auth} from "./auth.js"
|
|
4
|
-
import {AccessLevel, UserType} from "../types/types.js"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @module admin
|
|
10
|
-
* This is an experimental API.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const accessLevel = AccessLevel.ADMIN
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @async
|
|
20
|
-
* @returns {array} - list of Organization
|
|
21
|
-
*/
|
|
22
|
-
export async function getOrganizationList() {
|
|
23
|
-
let headers = {
|
|
24
|
-
"Content-Type": "application/json",
|
|
25
|
-
Accept: "application/json",
|
|
26
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
27
|
-
}
|
|
28
|
-
let response = await http.get(`${Config.apiBaseURL}/v1/admin/organizations`, headers)
|
|
29
|
-
return response.data.organizations
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @async
|
|
35
|
-
* @param {number} orgId
|
|
36
|
-
* @returns {object}
|
|
37
|
-
*/
|
|
38
|
-
export async function getOrganizationDetails(orgId) {
|
|
39
|
-
if (orgId === "") {
|
|
40
|
-
throw new Error("organization ID can not be empty")
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let headers = {
|
|
44
|
-
"Content-Type": "application/json",
|
|
45
|
-
Accept: "application/json",
|
|
46
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
47
|
-
}
|
|
48
|
-
let response = await http.get(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}`, headers)
|
|
49
|
-
return response.data
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @async
|
|
55
|
-
* @param {number} orgId
|
|
56
|
-
* @param {*} pagination
|
|
57
|
-
* @returns {list}
|
|
58
|
-
*/
|
|
59
|
-
export async function getUserList(orgId, pagination) {
|
|
60
|
-
let headers = {
|
|
61
|
-
"Content-Type": "application/json",
|
|
62
|
-
Accept: "application/json",
|
|
63
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
64
|
-
}
|
|
65
|
-
if (pagination !== undefined) headers["x-jibb-pagination"] = JSON.stringify(pagination)
|
|
66
|
-
let response = await http.get(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/users`, headers)
|
|
67
|
-
|
|
68
|
-
pagination = response.headers["x-jibb-pagination"]
|
|
69
|
-
pagination = pagination && JSON.parse(pagination)
|
|
70
|
-
return {
|
|
71
|
-
users: response.data.users,
|
|
72
|
-
pagination: pagination,
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @async
|
|
79
|
-
* @param {object} param0
|
|
80
|
-
* @param {Number} param0.orgId
|
|
81
|
-
* @param {list} param0.users - list of user object that contain email, first_name, last_name, user_type. user_type is a number from 0-4
|
|
82
|
-
* @returns - http result
|
|
83
|
-
*/
|
|
84
|
-
export async function createUsers({ orgId, users }) {
|
|
85
|
-
let headers = {
|
|
86
|
-
"Content-Type": "application/json",
|
|
87
|
-
Accept: "application/json",
|
|
88
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
89
|
-
}
|
|
90
|
-
let body = {
|
|
91
|
-
users,
|
|
92
|
-
}
|
|
93
|
-
return http.post(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/users`, body, headers)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
*
|
|
99
|
-
* @async
|
|
100
|
-
* @param {object} param0
|
|
101
|
-
* @param {string} param0.orgId
|
|
102
|
-
* @param {string} param0.email
|
|
103
|
-
* @param {number} param0.userType - UNKNOWN = 0; LIMITED = 1; MEMBER = 2; ADMIN = 3; OWNER = 4;
|
|
104
|
-
* @returns - http result
|
|
105
|
-
*/
|
|
106
|
-
export async function createOrganizationUser({ orgId, email, userType }) {
|
|
107
|
-
let headers = {
|
|
108
|
-
"Content-Type": "application/json",
|
|
109
|
-
Accept: "application/json",
|
|
110
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
111
|
-
}
|
|
112
|
-
let body = {
|
|
113
|
-
users: [
|
|
114
|
-
{
|
|
115
|
-
email: email,
|
|
116
|
-
user_type: userType,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
}
|
|
120
|
-
return http.post(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/users`, body, headers)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
*
|
|
125
|
-
* @async
|
|
126
|
-
* @param {object} param0
|
|
127
|
-
* @param {number} param0.orgId
|
|
128
|
-
* @param {number} param0.userId
|
|
129
|
-
* @returns - http result
|
|
130
|
-
*/
|
|
131
|
-
export async function SendUserActivationEmail({ orgId, userIds }) {
|
|
132
|
-
let headers = {
|
|
133
|
-
"Content-Type": "application/json",
|
|
134
|
-
Accept: "application/json",
|
|
135
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
136
|
-
}
|
|
137
|
-
let body = {
|
|
138
|
-
user_ids: userIds,
|
|
139
|
-
}
|
|
140
|
-
return http.post(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/activation/email`, body, headers)
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* @async
|
|
145
|
-
* @param {object} param0
|
|
146
|
-
* @param {number} param0.orgId
|
|
147
|
-
* @param {number} param0.userId
|
|
148
|
-
* @returns - http result
|
|
149
|
-
*/
|
|
150
|
-
export async function deleteOrganizationUser({ orgId, userId }) {
|
|
151
|
-
let headers = {
|
|
152
|
-
"Content-Type": "application/json",
|
|
153
|
-
Accept: "application/json",
|
|
154
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
155
|
-
}
|
|
156
|
-
return http.delete(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/users/${userId}`, headers)
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
*
|
|
160
|
-
* @async
|
|
161
|
-
* @param {object} param0
|
|
162
|
-
* @param {number} param0.orgId
|
|
163
|
-
* @param {number} param0.userId
|
|
164
|
-
* @param {number} param0.userType - UNKNOWN = 0; LIMITED = 1; MEMBER = 2; ADMIN = 3; OWNER = 4;
|
|
165
|
-
* @returns - http result
|
|
166
|
-
*/
|
|
167
|
-
export async function updateUserType({ orgId, userId, userType }) {
|
|
168
|
-
let headers = {
|
|
169
|
-
"Content-Type": "application/json",
|
|
170
|
-
Accept: "application/json",
|
|
171
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
172
|
-
}
|
|
173
|
-
let body = {
|
|
174
|
-
user_type: userType,
|
|
175
|
-
}
|
|
176
|
-
return http.patch(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/users/${userId}`, body, headers)
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
*
|
|
180
|
-
* @async
|
|
181
|
-
* @param {object} param0
|
|
182
|
-
* @param {number} param0.orgId
|
|
183
|
-
* @param {number} param0.userId
|
|
184
|
-
* @returns {object}
|
|
185
|
-
*/
|
|
186
|
-
export async function getOrganizationUserDetails({ orgId, userId }) {
|
|
187
|
-
let headers = {
|
|
188
|
-
"Content-Type": "application/json",
|
|
189
|
-
Accept: "application/json",
|
|
190
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
191
|
-
}
|
|
192
|
-
let response = await http.get(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/users/${userId}`, headers)
|
|
193
|
-
return response.data
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// error code:401 status:Unauthorized should we / what token to use ? , orgId? not sure of the body
|
|
197
|
-
/**
|
|
198
|
-
*
|
|
199
|
-
* @async
|
|
200
|
-
* @param {object} param0
|
|
201
|
-
* @param {number} param0.orgId
|
|
202
|
-
* @param {string} [param0.metadata=]
|
|
203
|
-
* @param {boolean} [param0.autoAddUsers=false]
|
|
204
|
-
* @param {UserType} [param0.defaultUserType=0] - UNKNOWN = 0; LIMITED = 1; MEMBER = 2; ADMIN = 3; OWNER = 4;
|
|
205
|
-
* @param {boolean} [param0.enabled=fales]
|
|
206
|
-
* @returns - http result
|
|
207
|
-
*/
|
|
208
|
-
export async function setSAML({ orgId, metadata, autoAddUsers, defaultUserType, enabled }) {
|
|
209
|
-
if (orgId === "" || orgId === undefined) {
|
|
210
|
-
throw new Error("organization ID can not be empty")
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
let headers = {
|
|
214
|
-
"Content-Type": "application/json",
|
|
215
|
-
Accept: "application/json",
|
|
216
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
217
|
-
}
|
|
218
|
-
let body = {
|
|
219
|
-
organization_id: orgId,
|
|
220
|
-
metadata: metadata || "",
|
|
221
|
-
auto_add_users: autoAddUsers !== undefined ? autoAddUsers : false,
|
|
222
|
-
default_user_type: defaultUserType !== undefined ? defaultUserType : UserType.UNKNOWN,
|
|
223
|
-
enabled: enabled || false,
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
return http.put(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/saml`, body, headers)
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// error code:401 status:Unauthorized should we / what token to use ? , orgId? not sure of the body
|
|
230
|
-
/**
|
|
231
|
-
* @async
|
|
232
|
-
* @param {number} orgId
|
|
233
|
-
* @returns - http result
|
|
234
|
-
*/
|
|
235
|
-
export async function deleteSAML(orgId) {
|
|
236
|
-
let headers = {
|
|
237
|
-
"Content-Type": "application/json",
|
|
238
|
-
Accept: "application/json",
|
|
239
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
240
|
-
}
|
|
241
|
-
return http.delete(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/saml`, headers)
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
*
|
|
245
|
-
* @async
|
|
246
|
-
* @param {number} orgId
|
|
247
|
-
* @returns {object}
|
|
248
|
-
*/
|
|
249
|
-
export async function getSAML(orgId) {
|
|
250
|
-
if (orgId === "") {
|
|
251
|
-
throw new Error("organization ID can not be empty")
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
let headers = {
|
|
255
|
-
"Content-Type": "application/json",
|
|
256
|
-
Accept: "application/json",
|
|
257
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
258
|
-
}
|
|
259
|
-
let response = await http.get(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/saml`, headers)
|
|
260
|
-
return response.data
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
*
|
|
264
|
-
* @async
|
|
265
|
-
* @param {number} orgId
|
|
266
|
-
* @returns {object}
|
|
267
|
-
*/
|
|
268
|
-
export async function getDomainList(orgId) {
|
|
269
|
-
let headers = {
|
|
270
|
-
"Content-Type": "application/json",
|
|
271
|
-
Accept: "application/json",
|
|
272
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
273
|
-
}
|
|
274
|
-
let response = await http.get(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/domains`, headers)
|
|
275
|
-
return response.data
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
*
|
|
279
|
-
* @async
|
|
280
|
-
* @param {object} param0
|
|
281
|
-
* @param {object} param0.orgId
|
|
282
|
-
* @param {string} param0.domain
|
|
283
|
-
* @returns {object}
|
|
284
|
-
*/
|
|
285
|
-
export async function createDomain({ orgId, domain }) {
|
|
286
|
-
let headers = {
|
|
287
|
-
"Content-Type": "application/json",
|
|
288
|
-
Accept: "application/json",
|
|
289
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
290
|
-
}
|
|
291
|
-
let body = {
|
|
292
|
-
domain_name: domain,
|
|
293
|
-
}
|
|
294
|
-
let response = await http.post(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/domains`, body, headers)
|
|
295
|
-
return response.data
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
*
|
|
299
|
-
* @async
|
|
300
|
-
* @param {object} param0
|
|
301
|
-
* @param {object} param0.orgId
|
|
302
|
-
* @param {string} param0.domain
|
|
303
|
-
* @returns - http result
|
|
304
|
-
*/
|
|
305
|
-
export async function deleteDomain({ orgId, domainId }) {
|
|
306
|
-
let headers = {
|
|
307
|
-
"Content-Type": "application/json",
|
|
308
|
-
Accept: "application/json",
|
|
309
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
310
|
-
}
|
|
311
|
-
return http.delete(`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/domains/${domainId}`, headers)
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
*
|
|
315
|
-
* @async
|
|
316
|
-
* @param {object} param0
|
|
317
|
-
* @param {object} param0.orgId
|
|
318
|
-
* @param {string} param0.domain
|
|
319
|
-
* @returns {object}
|
|
320
|
-
*/
|
|
321
|
-
export async function verifyDomain({ orgId, domainId }) {
|
|
322
|
-
let headers = {
|
|
323
|
-
"Content-Type": "application/json",
|
|
324
|
-
Accept: "application/json",
|
|
325
|
-
"x-jibb-user-jwt": await Auth.getUserToken({ accessLevel: accessLevel }),
|
|
326
|
-
}
|
|
327
|
-
let response = await http.get(
|
|
328
|
-
`${Config.apiBaseURL}/v1/admin/organizations/${orgId}/domains/${domainId}/verify`,
|
|
329
|
-
headers
|
|
330
|
-
)
|
|
331
|
-
return response.data
|
|
332
|
-
}
|
|
333
|
-
|