@wireapp/api-client 27.87.1 → 27.88.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/lib/userGroups/UserGroup.d.ts +3 -0
- package/lib/userGroups/UserGroup.d.ts.map +1 -1
- package/lib/userGroups/UserGroupAPI.d.ts +0 -1
- package/lib/userGroups/UserGroupAPI.d.ts.map +1 -1
- package/lib/userGroups/UserGroupAPI.js +8 -14
- package/lib/userGroups/UserGroupSearchOptions.d.ts +1 -0
- package/lib/userGroups/UserGroupSearchOptions.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { UserGroupManagedBy } from './UserGroupManagedBy';
|
|
2
|
+
import { QualifiedId } from '../user/QualifiedId';
|
|
2
3
|
export interface UserGroup {
|
|
3
4
|
createdAt: string;
|
|
4
5
|
id: string;
|
|
5
6
|
managedBy: UserGroupManagedBy;
|
|
6
7
|
members: string[];
|
|
7
8
|
membersCount?: number;
|
|
9
|
+
channelsCount?: number;
|
|
8
10
|
name: string;
|
|
11
|
+
channels?: QualifiedId[];
|
|
9
12
|
}
|
|
10
13
|
//# sourceMappingURL=UserGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserGroup.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroup.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,kBAAkB,CAAC;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"UserGroup.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroup.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAEhD,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,kBAAkB,CAAC;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserGroupAPI.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroupAPI.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAe,UAAU,EAAE,iBAAiB,EAAsB,MAAM,SAAS,CAAC;AAGzF,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C
|
|
1
|
+
{"version":3,"file":"UserGroupAPI.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroupAPI.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAe,UAAU,EAAE,iBAAiB,EAAsB,MAAM,SAAS,CAAC;AAGzF,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAE/C;;OAEG;IACU,gBAAgB,CAAC,EAAC,KAAK,EAAE,GAAG,OAAO,EAAC,GAAE,sBAA2B,GAAG,OAAO,CACtF,iBAAiB,CAAC,qBAAqB,CAAC,CACzC;IA+BD;;OAEG;IACU,eAAe,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,SAAS,CAAC;IAW9E;;OAEG;IACU,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAU1D;;OAEG;IACU,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUtE;;OAEG;IACU,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASxD;;OAEG;IACU,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUtF;;OAEG;IACU,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAS3F"}
|
|
@@ -26,19 +26,13 @@ class UserGroupAPI {
|
|
|
26
26
|
constructor(client) {
|
|
27
27
|
this.client = client;
|
|
28
28
|
}
|
|
29
|
-
static ENDPOINTS = {
|
|
30
|
-
base: '/user-groups',
|
|
31
|
-
byId: (gid) => `/user-groups/${gid}`,
|
|
32
|
-
users: (gid) => `/user-groups/${gid}/users`,
|
|
33
|
-
channels: (gid) => `/user-groups/${gid}/channels`,
|
|
34
|
-
};
|
|
35
29
|
/**
|
|
36
30
|
* Search for user groups (cancelable).
|
|
37
31
|
*/
|
|
38
32
|
async searchUserGroups({ query, ...options } = {}) {
|
|
39
33
|
const controller = new AbortController();
|
|
40
34
|
const config = {
|
|
41
|
-
url:
|
|
35
|
+
url: '/user-groups',
|
|
42
36
|
method: 'get',
|
|
43
37
|
params: { q: query, ...options },
|
|
44
38
|
signal: controller.signal,
|
|
@@ -66,7 +60,7 @@ class UserGroupAPI {
|
|
|
66
60
|
*/
|
|
67
61
|
async createUserGroup(body) {
|
|
68
62
|
const config = {
|
|
69
|
-
url:
|
|
63
|
+
url: '/user-groups',
|
|
70
64
|
method: 'post',
|
|
71
65
|
data: body,
|
|
72
66
|
};
|
|
@@ -78,7 +72,7 @@ class UserGroupAPI {
|
|
|
78
72
|
*/
|
|
79
73
|
async getUserGroup(gid) {
|
|
80
74
|
const config = {
|
|
81
|
-
url:
|
|
75
|
+
url: `/user-groups/${gid}`,
|
|
82
76
|
method: 'get',
|
|
83
77
|
};
|
|
84
78
|
const { data } = await this.client.sendJSON(config);
|
|
@@ -89,7 +83,7 @@ class UserGroupAPI {
|
|
|
89
83
|
*/
|
|
90
84
|
async updateUserGroup(gid, name) {
|
|
91
85
|
const config = {
|
|
92
|
-
url:
|
|
86
|
+
url: `/user-groups/${gid}`,
|
|
93
87
|
method: 'put',
|
|
94
88
|
data: { name },
|
|
95
89
|
};
|
|
@@ -100,7 +94,7 @@ class UserGroupAPI {
|
|
|
100
94
|
*/
|
|
101
95
|
async deleteUserGroup(gid) {
|
|
102
96
|
const config = {
|
|
103
|
-
url:
|
|
97
|
+
url: `/user-groups/${gid}`,
|
|
104
98
|
method: 'delete',
|
|
105
99
|
};
|
|
106
100
|
await this.client.sendJSON(config);
|
|
@@ -110,8 +104,8 @@ class UserGroupAPI {
|
|
|
110
104
|
*/
|
|
111
105
|
async updateUsersInGroup(gid, body) {
|
|
112
106
|
const config = {
|
|
113
|
-
url:
|
|
114
|
-
method: '
|
|
107
|
+
url: `/user-groups/${gid}/users`,
|
|
108
|
+
method: 'put',
|
|
115
109
|
data: body,
|
|
116
110
|
};
|
|
117
111
|
await this.client.sendJSON(config);
|
|
@@ -121,7 +115,7 @@ class UserGroupAPI {
|
|
|
121
115
|
*/
|
|
122
116
|
async updateChannelsInGroup(gid, body) {
|
|
123
117
|
const config = {
|
|
124
|
-
url:
|
|
118
|
+
url: `/user-groups/${gid}/channels`,
|
|
125
119
|
method: 'post',
|
|
126
120
|
data: body,
|
|
127
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserGroupSearchOptions.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroupSearchOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UserGroupSearchOptions.d.ts","sourceRoot":"","sources":["../../src/userGroups/UserGroupSearchOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
package/package.json
CHANGED