@wireapp/api-client 27.8.1 → 27.9.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.
@@ -1,3 +1,4 @@
1
+ import { TeamMigrationPayload } from './TeamMigrationPayload';
1
2
  import { HttpClient } from '../../http/';
2
3
  import { NewTeamInvitation, TeamInvitation, TeamInvitationChunk } from '../invitation/';
3
4
  export declare class TeamInvitationAPI {
@@ -8,6 +9,7 @@ export declare class TeamInvitationAPI {
8
9
  INVITATIONS: string;
9
10
  EMAIL: string;
10
11
  ACCEPT: string;
12
+ UPGRADE_PERSONAL_TO_TEAM: string;
11
13
  };
12
14
  constructor(client: HttpClient);
13
15
  getInvitation(teamId: string, invitationId: string): Promise<TeamInvitation>;
@@ -21,5 +23,6 @@ export declare class TeamInvitationAPI {
21
23
  code: string;
22
24
  password: string;
23
25
  }): Promise<TeamInvitation>;
26
+ upgradePersonalToTeamUser({ iconKey, icon, name, currency, }: TeamMigrationPayload): Promise<TeamInvitation>;
24
27
  }
25
28
  //# sourceMappingURL=TeamInvitationAPI.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TeamInvitationAPI.d.ts","sourceRoot":"","sources":["../../../src/team/invitation/TeamInvitationAPI.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAC,UAAU,EAAkC,MAAM,aAAa,CAAC;AACxE,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAGtF,qBAAa,iBAAiB;IAShB,OAAO,CAAC,QAAQ,CAAC,MAAM;IARnC,gBAAuB,cAAc,OAAO;IAC5C,gBAAuB,GAAG;;;;;MAKxB;gBAE2B,MAAM,EAAE,UAAU;IAElC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAU5E,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,C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,CAAC,EAAE,MAAM,EAChB,KAAK,SAAmC,GACvC,OAAO,CAAC,mBAAmB,CAAC;IAclB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASrE,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B5C,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAwBtF,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAatE,gBAAgB,CAAC,OAAO,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAWpF,yBAAyB,CAAC,EACrC,OAAO,EACP,IAAgB,EAChB,IAAI,EACJ,QAAQ,GACT,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;CAUlD"}
@@ -35,6 +35,7 @@ class TeamInvitationAPI {
35
35
  INVITATIONS: 'invitations',
36
36
  EMAIL: 'by-email',
37
37
  ACCEPT: 'accept',
38
+ UPGRADE_PERSONAL_TO_TEAM: 'upgrade-personal-to-team',
38
39
  };
39
40
  constructor(client) {
40
41
  this.client = client;
@@ -148,5 +149,14 @@ class TeamInvitationAPI {
148
149
  const response = await this.client.sendJSON(config);
149
150
  return response.data;
150
151
  }
152
+ async upgradePersonalToTeamUser({ iconKey, icon = 'default', name, currency, }) {
153
+ const config = {
154
+ data: { icon_key: iconKey, icon, name, currency },
155
+ method: 'post',
156
+ url: `/${TeamInvitationAPI.URL.UPGRADE_PERSONAL_TO_TEAM}`,
157
+ };
158
+ const response = await this.client.sendJSON(config);
159
+ return response.data;
160
+ }
151
161
  }
152
162
  exports.TeamInvitationAPI = TeamInvitationAPI;
@@ -0,0 +1,7 @@
1
+ export interface TeamMigrationPayload {
2
+ currency?: string;
3
+ icon?: string;
4
+ iconKey?: string;
5
+ name: string;
6
+ }
7
+ //# sourceMappingURL=TeamMigrationPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamMigrationPayload.d.ts","sourceRoot":"","sources":["../../../src/team/invitation/TeamMigrationPayload.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Wire
4
+ * Copyright (C) 2024 Wire Swiss GmbH
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program. If not, see http://www.gnu.org/licenses/.
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,4 +3,5 @@ export * from './TeamInvitationAPI';
3
3
  export * from './InvitationError';
4
4
  export * from './TeamInvitationChunk';
5
5
  export * from './TeamInvitation';
6
+ export * from './TeamMigrationPayload';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/team/invitation/index.ts"],"names":[],"mappings":"AAmBA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/team/invitation/index.ts"],"names":[],"mappings":"AAmBA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
@@ -37,3 +37,4 @@ __exportStar(require("./TeamInvitationAPI"), exports);
37
37
  __exportStar(require("./InvitationError"), exports);
38
38
  __exportStar(require("./TeamInvitationChunk"), exports);
39
39
  __exportStar(require("./TeamInvitation"), exports);
40
+ __exportStar(require("./TeamMigrationPayload"), exports);
package/package.json CHANGED
@@ -66,6 +66,6 @@
66
66
  "watch": "webpack serve --config webpack.browser.js",
67
67
  "prepare": "yarn dist"
68
68
  },
69
- "version": "27.8.1",
70
- "gitHead": "c709c87e9713b96036328e905142cf79d2ebc6e7"
69
+ "version": "27.9.0",
70
+ "gitHead": "3490bcd91134c3f12b0028c73a66c43121f4bada"
71
71
  }