@wireapp/api-client 22.10.2 → 22.11.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.
@@ -16,8 +16,9 @@ export declare class MemberAPI {
16
16
  postMembers(teamId: string, member: MemberData): Promise<void>;
17
17
  putMembers(teamId: string, member: UpdatedMemberData): Promise<void>;
18
18
  /**
19
- * This endpoint returns all members of the a team unless it's a large team (>2000 team members).
19
+ * This endpoint returns all members of the a team.
20
20
  * If the queried team is a large team the `hasMore` flag will switch to `true`.
21
+ * Supplying the paging state from the last response will return the next page of results.
21
22
  */
22
23
  getAllMembers(teamId: string, maxResults?: number, pagingState?: string): Promise<Members>;
23
24
  getMembers(teamId: string, parameters: {
@@ -1 +1 @@
1
- {"version":3,"file":"MemberAPI.d.ts","sourceRoot":"","sources":["../../../src/team/member/MemberAPI.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EAElB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAC,UAAU,EAAE,OAAO,EAAC,MAAM,YAAY,CAAC;AAG/C,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,MAAM;IADnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAQ;gBAC7B,MAAM,EAAE,UAAU;IAE/C,gBAAuB,GAAG;;;;MAIxB;IAEW,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAU9D,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7E,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,E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AAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7E,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYjF;;;;OAIG;IACU,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,SAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAcxF,UAAU,CACrB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE;QAAC,GAAG,EAAE,MAAM,EAAE,CAAA;KAAC,EAC3B,KAAK,SAAuC,GAC3C,OAAO,CAAC,UAAU,EAAE,CAAC;YAkBV,WAAW;IAWZ,gBAAgB,CAC3B,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,gBAAgB,GAClC,OAAO,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CA8BjD"}
@@ -70,8 +70,9 @@ class MemberAPI {
70
70
  await this.client.sendJSON(config);
71
71
  }
72
72
  /**
73
- * This endpoint returns all members of the a team unless it's a large team (>2000 team members).
73
+ * This endpoint returns all members of the a team.
74
74
  * If the queried team is a large team the `hasMore` flag will switch to `true`.
75
+ * Supplying the paging state from the last response will return the next page of results.
75
76
  */
76
77
  async getAllMembers(teamId, maxResults = 2000, pagingState) {
77
78
  const config = {
@@ -4,7 +4,8 @@ export declare enum Role {
4
4
  ADMIN = "admin",
5
5
  EXTERNAL = "partner",
6
6
  MEMBER = "member",
7
- OWNER = "owner"
7
+ OWNER = "owner",
8
+ NONE = "none"
8
9
  }
9
10
  export declare const roleToPermissions: (role: string) => Permissions;
10
11
  export declare const permissionsToRole: (permissions: PermissionsData) => Role | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Role.d.ts","sourceRoot":"","sources":["../../../src/team/member/Role.ts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vE,CAAC;AAEF,eAAO,MAAM,SAAS,gBAAiB,eAAe,KAAG,OAExD,CAAC;AAEF,eAAO,MAAM,QAAQ,gBAAiB,eAAe,KAAG,OAEvD,CAAC;AAEF,eAAO,MAAM,OAAO,gBAAiB,eAAe,KAAG,OAEtD,CAAC;AAEF,eAAO,MAAM,OAAO,gBAAiB,eAAe,KAAG,OAEtD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBAAiB,eAAe,KAAG,OAE/D,CAAC;AAEF,eAAO,MAAM,eAAe,gBAAiB,eAAe,KAAG,OAE9D,CAAC;AAEF,eAAO,MAAM,cAAc,gBAAiB,eAAe,KAAG,OAE7D,CAAC;AAEF,eAAO,MAAM,cAAc,gBAAiB,eAAe,oBAAoB,eAAe,KAAG,OAOhG,CAAC"}
@@ -26,6 +26,7 @@ var Role;
26
26
  Role["EXTERNAL"] = "partner";
27
27
  Role["MEMBER"] = "member";
28
28
  Role["OWNER"] = "owner";
29
+ Role["NONE"] = "none";
29
30
  })(Role = exports.Role || (exports.Role = {}));
30
31
  const roleToPermissions = (role) => {
31
32
  switch (role.toLowerCase()) {
@@ -13,5 +13,7 @@ export interface TeamSearchOptions {
13
13
  sortby?: keyof Pick<TeamContact, 'email' | 'name' | 'handle' | 'created_at' | 'role' | 'managed_by' | 'saml_idp'>;
14
14
  /** Sort order (asc | desc | undefined) */
15
15
  sortorder?: SearchOrder;
16
+ /** Paging state. returns next page when provided*/
17
+ pagingState?: string;
16
18
  }
17
19
  //# sourceMappingURL=TeamSearchOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TeamSearchOptions.d.ts","sourceRoot":"","sources":["../../../src/team/search/TeamSearchOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AAExB,oBAAY,WAAW;IACrB,SAAS,QAAQ;IACjB,UAAU,SAAS;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC,CAAC;IAClH,0CAA0C;IAC1C,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB"}
1
+ {"version":3,"file":"TeamSearchOptions.d.ts","sourceRoot":"","sources":["../../../src/team/search/TeamSearchOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,IAAI,EAAC,MAAM,IAAI,CAAC;AAExB,oBAAY,WAAW;IACrB,SAAS,QAAQ;IACjB,UAAU,SAAS;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC,CAAC;IAClH,0CAA0C;IAC1C,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -2,7 +2,15 @@ import { TeamContact } from './TeamContact';
2
2
  export interface TeamSearchResult {
3
3
  documents: TeamContact[];
4
4
  found: number;
5
+ has_more?: boolean;
6
+ paging_state?: string;
5
7
  returned: number;
8
+ search_policy?: FederatedSearchPolicy[];
6
9
  took: number;
7
10
  }
11
+ export declare enum FederatedSearchPolicy {
12
+ noSearch = "no_search",
13
+ fullSearch = "full_search",
14
+ exactHandleSearch = "exact_handle_search"
15
+ }
8
16
  //# sourceMappingURL=TeamSearchResult.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TeamSearchResult.d.ts","sourceRoot":"","sources":["../../../src/team/search/TeamSearchResult.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"TeamSearchResult.d.ts","sourceRoot":"","sources":["../../../src/team/search/TeamSearchResult.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,qBAAqB;IAC/B,QAAQ,cAAc;IACtB,UAAU,gBAAgB;IAC1B,iBAAiB,wBAAwB;CAC1C"}
@@ -18,3 +18,10 @@
18
18
  *
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.FederatedSearchPolicy = void 0;
22
+ var FederatedSearchPolicy;
23
+ (function (FederatedSearchPolicy) {
24
+ FederatedSearchPolicy["noSearch"] = "no_search";
25
+ FederatedSearchPolicy["fullSearch"] = "full_search";
26
+ FederatedSearchPolicy["exactHandleSearch"] = "exact_handle_search";
27
+ })(FederatedSearchPolicy = exports.FederatedSearchPolicy || (exports.FederatedSearchPolicy = {}));
@@ -116,7 +116,7 @@ export declare class UserAPI {
116
116
  getUser(userId: string | QualifiedId): Promise<User>;
117
117
  getUserPreKeys(userId: string | QualifiedId): Promise<PreKeyBundle>;
118
118
  /**
119
- * @deprecated use getUser instead
119
+ * @deprecated use getUser, getSearchContacts or postListUsers instead
120
120
  * List users.
121
121
  * Note: The 'ids' and 'handles' parameters are mutually exclusive.
122
122
  * @param parameters Multiple user's handles or IDs
@@ -259,7 +259,7 @@ class UserAPI {
259
259
  return response.data;
260
260
  }
261
261
  /**
262
- * @deprecated use getUser instead
262
+ * @deprecated use getUser, getSearchContacts or postListUsers instead
263
263
  * List users.
264
264
  * Note: The 'ids' and 'handles' parameters are mutually exclusive.
265
265
  * @param parameters Multiple user's handles or IDs
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  "@types/ws": "8.5.3",
37
37
  "@wireapp/store-engine": "^5.0.3",
38
38
  "@wireapp/store-engine-fs": "^3.0.4",
39
- "browser-sync": "2.27.10",
39
+ "browser-sync": "2.27.11",
40
40
  "concurrently": "7.6.0",
41
41
  "cross-env": "7.0.3",
42
42
  "dotenv": "16.0.3",
@@ -63,6 +63,6 @@
63
63
  "watch": "webpack serve --config webpack.browser.js",
64
64
  "prepare": "yarn dist"
65
65
  },
66
- "version": "22.10.2",
67
- "gitHead": "329f791d6e6366664571b495563c571a05c2f55a"
66
+ "version": "22.11.0",
67
+ "gitHead": "eebabf50943170b87f1c8aa6d8cbf4527e9a9238"
68
68
  }