@pipedream/airmeet 0.0.1 → 0.1.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.
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import app from "../../airmeet.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
name: "Add Authorized Attendee",
|
|
5
|
+
version: "0.0.1",
|
|
6
|
+
key: "airmeet-add-authorized-attendee",
|
|
7
|
+
description: "Add authorized Attendee. [See the documentation](https://help.airmeet.com/support/solutions/articles/82000467794-airmeet-public-apis-v2-0#5.1-Add-Authorized-Attendee)",
|
|
8
|
+
type: "action",
|
|
9
|
+
props: {
|
|
10
|
+
app,
|
|
11
|
+
airmeetId: {
|
|
12
|
+
propDefinition: [
|
|
13
|
+
app,
|
|
14
|
+
"airmeetId",
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
email: {
|
|
18
|
+
type: "string",
|
|
19
|
+
label: "Email",
|
|
20
|
+
description: "Email of the atendee",
|
|
21
|
+
},
|
|
22
|
+
firstName: {
|
|
23
|
+
type: "string",
|
|
24
|
+
label: "First name",
|
|
25
|
+
description: "First name of the atendee",
|
|
26
|
+
},
|
|
27
|
+
lastName: {
|
|
28
|
+
type: "string",
|
|
29
|
+
label: "Last name",
|
|
30
|
+
description: "Last name of the atendee",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
async run({ $ }) {
|
|
34
|
+
const response = await this.app.addAuthorizedAttendee({
|
|
35
|
+
$,
|
|
36
|
+
airmeetId: this.airmeetId,
|
|
37
|
+
data: {
|
|
38
|
+
email: this.email,
|
|
39
|
+
firstName: this.firstName,
|
|
40
|
+
lastName: this.lastName,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
if (response) {
|
|
45
|
+
$.export("$summary", `Successfully added authorized attendee with email \`${response.email}\``);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return response;
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
TIME_ZONES: [
|
|
3
|
+
{
|
|
4
|
+
label: "America/New_York",
|
|
5
|
+
value: "America/New_York",
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
label: "America/Los_Angeles",
|
|
9
|
+
value: "America/Los_Angeles",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: "America/Chicago",
|
|
13
|
+
value: "America/Chicago",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "America/Denver",
|
|
17
|
+
value: "America/Denver",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: "America/Toronto",
|
|
21
|
+
value: "America/Toronto",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Europe/London",
|
|
25
|
+
value: "Europe/London",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "Europe/Paris",
|
|
29
|
+
value: "Europe/Paris",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: "Asia/Tokyo",
|
|
33
|
+
value: "Asia/Tokyo",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Asia/Shanghai",
|
|
37
|
+
value: "Asia/Shanghai",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: "Australia/Sydney",
|
|
41
|
+
value: "Australia/Sydney",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "Africa/Johannesburg",
|
|
45
|
+
value: "Africa/Johannesburg",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "Pacific/Honolulu",
|
|
49
|
+
value: "Pacific/Honolulu",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: "Asia/Dubai",
|
|
53
|
+
value: "Asia/Dubai",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: "Asia/Kolkata",
|
|
57
|
+
value: "Asia/Kolkata",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Europe/Berlin",
|
|
61
|
+
value: "Europe/Berlin",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import app from "../../airmeet.app.mjs";
|
|
3
|
+
import constants from "../common/constants.mjs";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: "Create Airmeet",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
key: "airmeet-create-airmeet",
|
|
9
|
+
description: "Creates an airmeet. [See the documentation](https://help.airmeet.com/support/solutions/articles/82000467794-airmeet-public-apis-v2-0#6.1-Create-Airmeet)",
|
|
10
|
+
type: "action",
|
|
11
|
+
props: {
|
|
12
|
+
app,
|
|
13
|
+
hostEmail: {
|
|
14
|
+
type: "string",
|
|
15
|
+
label: "Host Email",
|
|
16
|
+
description: "Email of the host",
|
|
17
|
+
},
|
|
18
|
+
eventName: {
|
|
19
|
+
type: "string",
|
|
20
|
+
label: "Event Name",
|
|
21
|
+
description: "Name of the event",
|
|
22
|
+
},
|
|
23
|
+
shortDesc: {
|
|
24
|
+
type: "string",
|
|
25
|
+
label: "Short Description",
|
|
26
|
+
description: "Short description of the event",
|
|
27
|
+
},
|
|
28
|
+
startTime: {
|
|
29
|
+
type: "string",
|
|
30
|
+
label: "Start Time",
|
|
31
|
+
description: "Start time for the event in milliseconds or ISO 8601. E.g. `1697458790918` or `2023-10-16T12:18:38+00:00`",
|
|
32
|
+
},
|
|
33
|
+
endTime: {
|
|
34
|
+
type: "string",
|
|
35
|
+
label: "End Time",
|
|
36
|
+
description: "End time for the event in milliseconds or ISO 8601. E.g. `1697458790918` or `2023-10-16T12:18:38+00:00`",
|
|
37
|
+
},
|
|
38
|
+
timezone: {
|
|
39
|
+
type: "string",
|
|
40
|
+
label: "Timezone",
|
|
41
|
+
description: "Timezone for the event in the canonical tz name. E.g. 'Asia/Kolkata'",
|
|
42
|
+
options: constants.TIME_ZONES,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
async run({ $ }) {
|
|
46
|
+
const startTime = dayjs(this.startTime).valueOf();
|
|
47
|
+
const endTime = dayjs(this.endTime).valueOf();
|
|
48
|
+
|
|
49
|
+
const response = await this.app.createAirmeet({
|
|
50
|
+
$,
|
|
51
|
+
data: {
|
|
52
|
+
hostEmail: this.hostEmail,
|
|
53
|
+
eventName: this.eventName,
|
|
54
|
+
shortDesc: this.shortDesc,
|
|
55
|
+
timing: {
|
|
56
|
+
startTime: startTime,
|
|
57
|
+
endTime: endTime,
|
|
58
|
+
timezone: this.timezone,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (response) {
|
|
64
|
+
$.export("$summary", `Successfully created airmeet with UUID \`${response.uuid}\``);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return response;
|
|
68
|
+
},
|
|
69
|
+
};
|
package/airmeet.app.mjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { axios } from "@pipedream/platform";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
type: "app",
|
|
5
|
+
app: "airmeet",
|
|
6
|
+
propDefinitions: {
|
|
7
|
+
airmeetId: {
|
|
8
|
+
type: "string",
|
|
9
|
+
label: "Airmeet ID",
|
|
10
|
+
description: "The Airmeet ID",
|
|
11
|
+
async options() {
|
|
12
|
+
const { data: airmeets } = await this.getAirmeets();
|
|
13
|
+
|
|
14
|
+
return airmeets.map((airmeet) => ({
|
|
15
|
+
value: airmeet.uid,
|
|
16
|
+
label: airmeet.name,
|
|
17
|
+
}));
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
methods: {
|
|
22
|
+
_oauthAccessToken() {
|
|
23
|
+
return this.$auth.oauth_access_token;
|
|
24
|
+
},
|
|
25
|
+
_region() {
|
|
26
|
+
return this.$auth.region;
|
|
27
|
+
},
|
|
28
|
+
_apiUrl() {
|
|
29
|
+
return `https://${this._region()}.airmeet.com/prod`;
|
|
30
|
+
},
|
|
31
|
+
async _makeRequest({
|
|
32
|
+
$ = this, path, ...args
|
|
33
|
+
}) {
|
|
34
|
+
return axios($, {
|
|
35
|
+
url: `${this._apiUrl()}${path}`,
|
|
36
|
+
...args,
|
|
37
|
+
headers: {
|
|
38
|
+
...args.headers,
|
|
39
|
+
"X-Airmeet-Access-Token": this._oauthAccessToken(),
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
createAirmeet(args = {}) {
|
|
44
|
+
return this._makeRequest({
|
|
45
|
+
path: "/airmeet",
|
|
46
|
+
method: "post",
|
|
47
|
+
...args,
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
addAuthorizedAttendee({
|
|
51
|
+
airmeetId, ...args
|
|
52
|
+
}) {
|
|
53
|
+
return this._makeRequest({
|
|
54
|
+
path: `/airmeet/${airmeetId}/attendee`,
|
|
55
|
+
method: "post",
|
|
56
|
+
...args,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
getAirmeets(args = {}) {
|
|
60
|
+
return this._makeRequest({
|
|
61
|
+
path: "/airmeets",
|
|
62
|
+
...args,
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/airmeet",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Pipedream Airmeet Components",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "airmeet.app.mjs",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"pipedream",
|
|
8
8
|
"airmeet"
|
|
9
9
|
],
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
10
|
"homepage": "https://pipedream.com/apps/airmeet",
|
|
14
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
15
12
|
"publishConfig": {
|
|
16
13
|
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@pipedream/platform": "^1.5.1",
|
|
17
|
+
"dayjs": "^1.11.10"
|
|
17
18
|
}
|
|
18
19
|
}
|