@wireapp/api-client 27.6.2 → 27.7.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.
|
@@ -7,6 +7,7 @@ export declare class TeamInvitationAPI {
|
|
|
7
7
|
INFO: string;
|
|
8
8
|
INVITATIONS: string;
|
|
9
9
|
EMAIL: string;
|
|
10
|
+
ACCEPT: string;
|
|
10
11
|
};
|
|
11
12
|
constructor(client: HttpClient);
|
|
12
13
|
getInvitation(teamId: string, invitationId: string): Promise<TeamInvitation>;
|
|
@@ -16,5 +17,9 @@ export declare class TeamInvitationAPI {
|
|
|
16
17
|
headInvitation(email: string): Promise<void>;
|
|
17
18
|
postInvitation(teamId: string, invitation: NewTeamInvitation): Promise<TeamInvitation>;
|
|
18
19
|
getInvitationFromCode(invitationCode: string): Promise<TeamInvitation>;
|
|
20
|
+
acceptInvitation(payload: {
|
|
21
|
+
code: string;
|
|
22
|
+
password: string;
|
|
23
|
+
}): Promise<TeamInvitation>;
|
|
19
24
|
}
|
|
20
25
|
//# 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;
|
|
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,CAAC;IAgB5D,cAAc,CACzB,MAAM,EAAE,MAAM,EACd,OAAO,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;CAUlG"}
|
|
@@ -34,6 +34,7 @@ class TeamInvitationAPI {
|
|
|
34
34
|
INFO: 'info',
|
|
35
35
|
INVITATIONS: 'invitations',
|
|
36
36
|
EMAIL: 'by-email',
|
|
37
|
+
ACCEPT: 'accept',
|
|
37
38
|
};
|
|
38
39
|
constructor(client) {
|
|
39
40
|
this.client = client;
|
|
@@ -138,5 +139,14 @@ class TeamInvitationAPI {
|
|
|
138
139
|
const response = await this.client.sendJSON(config);
|
|
139
140
|
return response.data;
|
|
140
141
|
}
|
|
142
|
+
async acceptInvitation(payload) {
|
|
143
|
+
const config = {
|
|
144
|
+
data: payload,
|
|
145
|
+
method: 'post',
|
|
146
|
+
url: `${team_1.TeamAPI.URL.TEAMS}/${TeamInvitationAPI.URL.INVITATIONS}/${TeamInvitationAPI.URL.ACCEPT}`,
|
|
147
|
+
};
|
|
148
|
+
const response = await this.client.sendJSON(config);
|
|
149
|
+
return response.data;
|
|
150
|
+
}
|
|
141
151
|
}
|
|
142
152
|
exports.TeamInvitationAPI = TeamInvitationAPI;
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/ws": "8.5.12",
|
|
40
40
|
"@wireapp/store-engine": "^5.1.11",
|
|
41
41
|
"@wireapp/store-engine-fs": "^3.1.11",
|
|
42
|
-
"browser-sync": "3.0.
|
|
42
|
+
"browser-sync": "3.0.3",
|
|
43
43
|
"concurrently": "9.0.1",
|
|
44
44
|
"cross-env": "7.0.3",
|
|
45
45
|
"dotenv": "16.4.5",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"watch": "webpack serve --config webpack.browser.js",
|
|
67
67
|
"prepare": "yarn dist"
|
|
68
68
|
},
|
|
69
|
-
"version": "27.
|
|
70
|
-
"gitHead": "
|
|
69
|
+
"version": "27.7.1",
|
|
70
|
+
"gitHead": "9a50d86e1b864b5d4d8652d8bb8b44aad315353b"
|
|
71
71
|
}
|