@webex/plugin-teams 2.60.0-next.8 → 2.60.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.
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/teams.js +4 -2
- package/dist/teams.js.map +1 -1
- package/package.json +19 -20
- package/test/integration/spec/teams.js +2 -2
package/dist/index.js
CHANGED
|
@@ -13,5 +13,6 @@ var _teams = _interopRequireDefault(require("./teams"));
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
(0, _webexCore.registerPlugin)('teams', _teams.default);
|
|
16
|
-
var _default =
|
|
16
|
+
var _default = _teams.default;
|
|
17
|
+
exports.default = _default;
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_teams","_interopRequireDefault","registerPlugin","Teams","_default","exports","default"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {registerPlugin} from '@webex/webex-core';\n\nimport Teams from './teams';\n\nregisterPlugin('teams', Teams);\n\nexport default Teams;\n"],"mappings":";;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AANA;AACA;AACA;;AAMA,IAAAG,yBAAc,EAAC,OAAO,EAAEC,cAAK,CAAC;AAAC,IAAAC,QAAA,
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_teams","_interopRequireDefault","registerPlugin","Teams","_default","exports","default"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {registerPlugin} from '@webex/webex-core';\n\nimport Teams from './teams';\n\nregisterPlugin('teams', Teams);\n\nexport default Teams;\n"],"mappings":";;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AANA;AACA;AACA;;AAMA,IAAAG,yBAAc,EAAC,OAAO,EAAEC,cAAK,CAAC;AAAC,IAAAC,QAAA,GAEhBD,cAAK;AAAAE,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
package/dist/teams.js
CHANGED
|
@@ -17,6 +17,7 @@ var _webexCore = require("@webex/webex-core");
|
|
|
17
17
|
* @property {isoDate} created - (server generated) The date and time that the
|
|
18
18
|
* team was created
|
|
19
19
|
*/
|
|
20
|
+
|
|
20
21
|
/**
|
|
21
22
|
* @class
|
|
22
23
|
*/
|
|
@@ -155,7 +156,8 @@ var Teams = _webexCore.WebexPlugin.extend({
|
|
|
155
156
|
return res.body;
|
|
156
157
|
});
|
|
157
158
|
},
|
|
158
|
-
version: "2.60.
|
|
159
|
+
version: "2.60.1"
|
|
159
160
|
});
|
|
160
|
-
var _default =
|
|
161
|
+
var _default = Teams;
|
|
162
|
+
exports.default = _default;
|
|
161
163
|
//# sourceMappingURL=teams.js.map
|
package/dist/teams.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","Teams","WebexPlugin","extend","create","team","request","method","service","resource","body","then","res","get","options","id","concat","qs","items","list","_this","Page","webex","update","version","_default","exports","default"],"sources":["teams.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin, Page} from '@webex/webex-core';\n\n/**\n * @typedef {Object} TeamObject\n * @property {string} id - (server generated) Unique identifier for the team\n * @property {string} name - The name of the team\n * @property {isoDate} created - (server generated) The date and time that the\n * team was created\n */\n\n/**\n * @class\n */\nconst Teams = WebexPlugin.extend({\n /**\n * Create a new team.\n * @instance\n * @param {TeamObject} team\n * @returns {Promise<TeamObject>}\n * @memberof Teams\n * @example\n * webex.teams.create({name: 'Create Team Example'})\n * .then(function(team) {\n * var assert = require('assert');\n * assert(team.id);\n * assert(team.name);\n * assert(team.created);\n * return 'success';\n * });\n * // => success\n */\n create(team) {\n return this.request({\n method: 'POST',\n service: 'hydra',\n resource: 'teams',\n body: team,\n }).then((res) => res.body);\n },\n\n /**\n * Returns a single team\n * @instance\n * @param {TeamObject|string} team\n * @param {Object} options\n * @returns {Promise<TeamObject>}\n * @memberof Teams\n * @example\n * var team;\n * webex.teams.create({name: 'Get Team Example'})\n * .then(function(r) {\n * team = r;\n * return webex.teams.get(team.id);\n * })\n * .then(function(team2) {\n * var assert = require('assert');\n * assert.equal(team2.id, team.id);\n * return 'success';\n * });\n * // => success\n */\n get(team, options) {\n const id = team.id || team;\n\n return this.request({\n service: 'hydra',\n resource: `teams/${id}`,\n qs: options,\n }).then((res) => res.body.items || res.body);\n },\n\n /**\n * List teams.\n * @instance\n * @param {object} options\n * @param {object} options.max Limit the maximum number of teams in the\n * response.\n * @returns {Promise<Page<TeamObject>>}\n * @memberof Teams\n * @example\n * var createdRooms;\n * Promise.all([\n * webex.teams.create({name: 'List Teams Example 1'}),\n * webex.teams.create({name: 'List Teams Example 2'}),\n * webex.teams.create({name: 'List Teams Example 3'})\n * ])\n * .then(function(r) {\n * createdRooms = r;\n * return webex.teams.list({max: 3});\n * })\n * .then(function(teams) {\n * var assert = require('assert');\n * assert(teams.length === 3);\n * for (var i = 0; i < teams.items.length; i+= 1) {\n * assert(createdRooms.filter(function(room) {\n * return room.id === teams.items[i].id;\n * }).length === 1);\n * }\n * return 'success';\n * });\n * // => success\n */\n list(options) {\n return this.request({\n service: 'hydra',\n resource: 'teams/',\n qs: options,\n }).then((res) => new Page(res, this.webex));\n },\n\n /**\n * Update a team.\n * @instance\n * @param {TeamObject} team\n * @returns {Promise<TeamObject>}\n * @memberof Teams\n * @example\n * var teams;\n * webex.teams.create({name: 'Update Team Example'})\n * .then(function(r) {\n * teams = r;\n * teams.name = 'Teams Example (Updated Title)';\n * return webex.teams.update(teams);\n * })\n * .then(function() {\n * return webex.teams.get(teams.id);\n * })\n * .then(function(teams) {\n * var assert = require('assert');\n * assert.equal(teams.name, 'Teams Example (Updated Title)');\n * return 'success';\n * });\n * // => success\n\n */\n update(team) {\n const {id} = team;\n\n return this.request({\n method: 'PUT',\n service: 'hydra',\n resource: `teams/${id}`,\n body: team,\n }).then((res) => res.body);\n },\n});\n\nexport default Teams;\n"],"mappings":";;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA
|
|
1
|
+
{"version":3,"names":["_webexCore","require","Teams","WebexPlugin","extend","create","team","request","method","service","resource","body","then","res","get","options","id","concat","qs","items","list","_this","Page","webex","update","version","_default","exports","default"],"sources":["teams.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {WebexPlugin, Page} from '@webex/webex-core';\n\n/**\n * @typedef {Object} TeamObject\n * @property {string} id - (server generated) Unique identifier for the team\n * @property {string} name - The name of the team\n * @property {isoDate} created - (server generated) The date and time that the\n * team was created\n */\n\n/**\n * @class\n */\nconst Teams = WebexPlugin.extend({\n /**\n * Create a new team.\n * @instance\n * @param {TeamObject} team\n * @returns {Promise<TeamObject>}\n * @memberof Teams\n * @example\n * webex.teams.create({name: 'Create Team Example'})\n * .then(function(team) {\n * var assert = require('assert');\n * assert(team.id);\n * assert(team.name);\n * assert(team.created);\n * return 'success';\n * });\n * // => success\n */\n create(team) {\n return this.request({\n method: 'POST',\n service: 'hydra',\n resource: 'teams',\n body: team,\n }).then((res) => res.body);\n },\n\n /**\n * Returns a single team\n * @instance\n * @param {TeamObject|string} team\n * @param {Object} options\n * @returns {Promise<TeamObject>}\n * @memberof Teams\n * @example\n * var team;\n * webex.teams.create({name: 'Get Team Example'})\n * .then(function(r) {\n * team = r;\n * return webex.teams.get(team.id);\n * })\n * .then(function(team2) {\n * var assert = require('assert');\n * assert.equal(team2.id, team.id);\n * return 'success';\n * });\n * // => success\n */\n get(team, options) {\n const id = team.id || team;\n\n return this.request({\n service: 'hydra',\n resource: `teams/${id}`,\n qs: options,\n }).then((res) => res.body.items || res.body);\n },\n\n /**\n * List teams.\n * @instance\n * @param {object} options\n * @param {object} options.max Limit the maximum number of teams in the\n * response.\n * @returns {Promise<Page<TeamObject>>}\n * @memberof Teams\n * @example\n * var createdRooms;\n * Promise.all([\n * webex.teams.create({name: 'List Teams Example 1'}),\n * webex.teams.create({name: 'List Teams Example 2'}),\n * webex.teams.create({name: 'List Teams Example 3'})\n * ])\n * .then(function(r) {\n * createdRooms = r;\n * return webex.teams.list({max: 3});\n * })\n * .then(function(teams) {\n * var assert = require('assert');\n * assert(teams.length === 3);\n * for (var i = 0; i < teams.items.length; i+= 1) {\n * assert(createdRooms.filter(function(room) {\n * return room.id === teams.items[i].id;\n * }).length === 1);\n * }\n * return 'success';\n * });\n * // => success\n */\n list(options) {\n return this.request({\n service: 'hydra',\n resource: 'teams/',\n qs: options,\n }).then((res) => new Page(res, this.webex));\n },\n\n /**\n * Update a team.\n * @instance\n * @param {TeamObject} team\n * @returns {Promise<TeamObject>}\n * @memberof Teams\n * @example\n * var teams;\n * webex.teams.create({name: 'Update Team Example'})\n * .then(function(r) {\n * teams = r;\n * teams.name = 'Teams Example (Updated Title)';\n * return webex.teams.update(teams);\n * })\n * .then(function() {\n * return webex.teams.get(teams.id);\n * })\n * .then(function(teams) {\n * var assert = require('assert');\n * assert.equal(teams.name, 'Teams Example (Updated Title)');\n * return 'success';\n * });\n * // => success\n\n */\n update(team) {\n const {id} = team;\n\n return this.request({\n method: 'PUT',\n service: 'hydra',\n resource: `teams/${id}`,\n body: team,\n }).then((res) => res.body);\n },\n});\n\nexport default Teams;\n"],"mappings":";;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAMC,KAAK,GAAGC,sBAAW,CAACC,MAAM,CAAC;EAC/B;AACF;AACA;AACA;AACA;AACA;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AAC;IAAA,EAAC;EAC7C,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAEEC,MAAM,WAAAA,OAAClB,IAAI,EAAE;IACX,IAAOU,EAAE,GAAIV,IAAI,CAAVU,EAAE;IAET,OAAO,IAAI,CAACT,OAAO,CAAC;MAClBC,MAAM,EAAE,KAAK;MACbC,OAAO,EAAE,OAAO;MAChBC,QAAQ,WAAAO,MAAA,CAAWD,EAAE,CAAE;MACvBL,IAAI,EAAEL;IACR,CAAC,CAAC,CAACM,IAAI,CAAC,UAACC,GAAG;MAAA,OAAKA,GAAG,CAACF,IAAI;IAAA,EAAC;EAC5B,CAAC;EAAAc,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEYxB,KAAK;AAAAyB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-teams",
|
|
3
|
+
"version": "2.60.1",
|
|
3
4
|
"description": "",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"main": "dist/index.js",
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
"directory": "packages/@webex/plugin-teams"
|
|
11
12
|
},
|
|
12
13
|
"engines": {
|
|
13
|
-
"node": ">=
|
|
14
|
+
"node": ">=14"
|
|
14
15
|
},
|
|
15
16
|
"browserify": {
|
|
16
17
|
"transform": [
|
|
@@ -20,37 +21,35 @@
|
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@babel/core": "^7.17.10",
|
|
23
|
-
"@webex/babel-config-legacy": "
|
|
24
|
-
"@webex/eslint-config-legacy": "
|
|
25
|
-
"@webex/jest-config-legacy": "
|
|
26
|
-
"@webex/legacy-tools": "
|
|
27
|
-
"@webex/test-helper-chai": "2.60.
|
|
28
|
-
"@webex/test-helper-mocha": "2.60.
|
|
29
|
-
"@webex/test-helper-mock-webex": "2.60.
|
|
30
|
-
"@webex/test-helper-test-users": "2.60.
|
|
24
|
+
"@webex/babel-config-legacy": "2.60.1",
|
|
25
|
+
"@webex/eslint-config-legacy": "2.60.1",
|
|
26
|
+
"@webex/jest-config-legacy": "2.60.1",
|
|
27
|
+
"@webex/legacy-tools": "2.60.1",
|
|
28
|
+
"@webex/test-helper-chai": "2.60.1",
|
|
29
|
+
"@webex/test-helper-mocha": "2.60.1",
|
|
30
|
+
"@webex/test-helper-mock-webex": "2.60.1",
|
|
31
|
+
"@webex/test-helper-test-users": "2.60.1",
|
|
31
32
|
"eslint": "^8.24.0",
|
|
32
33
|
"prettier": "^2.7.1",
|
|
33
34
|
"sinon": "^9.2.4"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@webex/internal-plugin-device": "2.60.
|
|
37
|
-
"@webex/plugin-logger": "2.60.
|
|
38
|
-
"@webex/plugin-memberships": "2.60.
|
|
39
|
-
"@webex/plugin-rooms": "2.60.
|
|
40
|
-
"@webex/test-helper-chai": "2.60.
|
|
41
|
-
"@webex/test-helper-test-users": "2.60.
|
|
42
|
-
"@webex/webex-core": "2.60.
|
|
37
|
+
"@webex/internal-plugin-device": "2.60.1",
|
|
38
|
+
"@webex/plugin-logger": "2.60.1",
|
|
39
|
+
"@webex/plugin-memberships": "2.60.1",
|
|
40
|
+
"@webex/plugin-rooms": "2.60.1",
|
|
41
|
+
"@webex/test-helper-chai": "2.60.1",
|
|
42
|
+
"@webex/test-helper-test-users": "2.60.1",
|
|
43
|
+
"@webex/webex-core": "2.60.1",
|
|
43
44
|
"lodash": "^4.17.21"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
47
|
"build": "yarn build:src",
|
|
47
48
|
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
48
|
-
"deploy:npm": "yarn npm publish",
|
|
49
49
|
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
50
50
|
"test:browser:broken": "webex-legacy-tools test --integration --unit --runner karma",
|
|
51
51
|
"test:integration:broken": "webex-legacy-tools test --integration --runner mocha",
|
|
52
52
|
"test:style": "eslint ./src/**/*.*",
|
|
53
53
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -153,8 +153,8 @@ describe('plugin-teams', function () {
|
|
|
153
153
|
assert.isTeamRoom(room);
|
|
154
154
|
assert.equal(room.teamId, team.id);
|
|
155
155
|
}));
|
|
156
|
-
|
|
157
|
-
describe
|
|
156
|
+
|
|
157
|
+
describe("when the user leaves the team's general room", () => {
|
|
158
158
|
let room, team;
|
|
159
159
|
|
|
160
160
|
it("no longer returns the team's rooms", () =>
|