@webex/plugin-teams 3.0.0-bnr.4 → 3.0.0-next.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/.eslintrc.js +6 -0
- package/babel.config.js +3 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/teams.js +2 -4
- package/dist/teams.js.map +1 -1
- package/jest.config.js +3 -0
- package/package.json +29 -11
- package/process +1 -0
- package/test/integration/spec/teams.js +2 -2
- package/dist/plugin-teams.d.ts +0 -7
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/index.d.ts +0 -2
- package/dist/types/teams.d.ts +0 -27
package/.eslintrc.js
ADDED
package/babel.config.js
ADDED
package/dist/index.js
CHANGED
|
@@ -13,6 +13,5 @@ var _teams = _interopRequireDefault(require("./teams"));
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
(0, _webexCore.registerPlugin)('teams', _teams.default);
|
|
16
|
-
var _default = _teams.default;
|
|
17
|
-
exports.default = _default;
|
|
16
|
+
var _default = exports.default = _teams.default;
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerPlugin","Teams"],"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;AAEA;AANA;AACA;AACA;;AAMA,
|
|
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,GAAAC,OAAA,CAAAC,OAAA,GAEhBH,cAAK"}
|
package/dist/teams.js
CHANGED
|
@@ -17,7 +17,6 @@ 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
|
-
|
|
21
20
|
/**
|
|
22
21
|
* @class
|
|
23
22
|
*/
|
|
@@ -156,8 +155,7 @@ var Teams = _webexCore.WebexPlugin.extend({
|
|
|
156
155
|
return res.body;
|
|
157
156
|
});
|
|
158
157
|
},
|
|
159
|
-
version: "3.0.0-
|
|
158
|
+
version: "3.0.0-next.1"
|
|
160
159
|
});
|
|
161
|
-
var _default = Teams;
|
|
162
|
-
exports.default = _default;
|
|
160
|
+
var _default = exports.default = Teams;
|
|
163
161
|
//# sourceMappingURL=teams.js.map
|
package/dist/teams.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Teams","WebexPlugin","extend","create","team","request","method","service","resource","body","then","res","get","options","id","qs","items","list","Page","webex","update"],"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;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;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E,KAAK,CAAC;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,GAAAC,OAAA,CAAAC,OAAA,GAEY1B,KAAK"}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-teams",
|
|
3
|
-
"version": "3.0.0-bnr.4",
|
|
4
3
|
"description": "",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"main": "dist/index.js",
|
|
@@ -20,17 +19,36 @@
|
|
|
20
19
|
]
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
22
|
+
"@babel/core": "^7.17.10",
|
|
23
|
+
"@webex/babel-config-legacy": "0.0.0",
|
|
24
|
+
"@webex/eslint-config-legacy": "0.0.0",
|
|
25
|
+
"@webex/jest-config-legacy": "0.0.0",
|
|
26
|
+
"@webex/legacy-tools": "0.0.0",
|
|
27
|
+
"@webex/test-helper-chai": "3.0.0-next.1",
|
|
28
|
+
"@webex/test-helper-mocha": "3.0.0-next.1",
|
|
29
|
+
"@webex/test-helper-mock-webex": "3.0.0-next.1",
|
|
30
|
+
"@webex/test-helper-test-users": "3.0.0-next.1",
|
|
31
|
+
"eslint": "^8.24.0",
|
|
32
|
+
"prettier": "^2.7.1",
|
|
23
33
|
"sinon": "^9.2.4"
|
|
24
34
|
},
|
|
25
35
|
"dependencies": {
|
|
26
|
-
"@webex/internal-plugin-device": "
|
|
27
|
-
"@webex/plugin-logger": "
|
|
28
|
-
"@webex/plugin-memberships": "
|
|
29
|
-
"@webex/plugin-rooms": "
|
|
30
|
-
"@webex/
|
|
31
|
-
"@webex/test-helper-
|
|
32
|
-
"@webex/
|
|
33
|
-
"@webex/webex-core": "workspace:^",
|
|
36
|
+
"@webex/internal-plugin-device": "3.0.0-next.1",
|
|
37
|
+
"@webex/plugin-logger": "3.0.0-next.1",
|
|
38
|
+
"@webex/plugin-memberships": "3.0.0-next.1",
|
|
39
|
+
"@webex/plugin-rooms": "3.0.0-next.1",
|
|
40
|
+
"@webex/test-helper-chai": "3.0.0-next.1",
|
|
41
|
+
"@webex/test-helper-test-users": "3.0.0-next.1",
|
|
42
|
+
"@webex/webex-core": "3.0.0-next.1",
|
|
34
43
|
"lodash": "^4.17.21"
|
|
35
|
-
}
|
|
36
|
-
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "yarn build:src",
|
|
47
|
+
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
48
|
+
"deploy:npm": "yarn npm publish",
|
|
49
|
+
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
50
|
+
"test:browser:broken": "webex-legacy-tools test --integration --runner karma",
|
|
51
|
+
"test:style": "eslint ./src/**/*.*"
|
|
52
|
+
},
|
|
53
|
+
"version": "3.0.0-next.1"
|
|
54
|
+
}
|
package/process
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {browser: true};
|
|
@@ -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("when the user leaves the team's general room", () => {
|
|
156
|
+
// SPARK-413317
|
|
157
|
+
describe.skip("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", () =>
|
package/dist/plugin-teams.d.ts
DELETED
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.34.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
package/dist/types/index.d.ts
DELETED
package/dist/types/teams.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export default Teams;
|
|
2
|
-
export type TeamObject = {
|
|
3
|
-
/**
|
|
4
|
-
* - (server generated) Unique identifier for the team
|
|
5
|
-
*/
|
|
6
|
-
id: string;
|
|
7
|
-
/**
|
|
8
|
-
* - The name of the team
|
|
9
|
-
*/
|
|
10
|
-
name: string;
|
|
11
|
-
/**
|
|
12
|
-
* - (server generated) The date and time that the
|
|
13
|
-
* team was created
|
|
14
|
-
*/
|
|
15
|
-
created: isoDate;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @typedef {Object} TeamObject
|
|
19
|
-
* @property {string} id - (server generated) Unique identifier for the team
|
|
20
|
-
* @property {string} name - The name of the team
|
|
21
|
-
* @property {isoDate} created - (server generated) The date and time that the
|
|
22
|
-
* team was created
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* @class
|
|
26
|
-
*/
|
|
27
|
-
declare const Teams: any;
|