Skip to content

Commit 7fbf1d0

Browse files
new ticketsauce actions and source
1 parent 650445a commit 7fbf1d0

File tree

9 files changed

+692
-5
lines changed

9 files changed

+692
-5
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import ticketsauce from "../../ticketsauce.app.mjs";
2+
3+
export default {
4+
key: "ticketsauce-get-event-details",
5+
name: "Get Event Details",
6+
description: "Get details for a specified event. [See documentation](https://speca.io/ticketsauce/ticketsauce-public-api?key=204000d6bda66da78315e721920f43aa#event-details)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
ticketsauce,
11+
partnerId: {
12+
type: "string",
13+
label: "Partner ID",
14+
description: "Including this ID will limit the event selection to the specific partner.",
15+
optional: true,
16+
},
17+
organizationId: {
18+
type: "string",
19+
label: "Organization ID",
20+
description: "Including this ID will limit the event selection to the specific organization.",
21+
optional: true,
22+
},
23+
eventId: {
24+
propDefinition: [
25+
ticketsauce,
26+
"eventId",
27+
(c) => ({
28+
partnerId: c.partnerId,
29+
organizationId: c.organizationId,
30+
}),
31+
],
32+
},
33+
photos: {
34+
type: "string",
35+
label: "Photos",
36+
description: "Whether or not to return the event's photo gallery records.",
37+
optional: true,
38+
default: "0",
39+
options: [
40+
"0",
41+
"1"
42+
],
43+
},
44+
includePerformers: {
45+
type: "boolean",
46+
label: "Include Performers",
47+
description: "Returns any associated performers/artists with the event.",
48+
optional: true,
49+
default: false,
50+
},
51+
},
52+
async run() {
53+
const params = {
54+
photos: this.photos,
55+
include_performers: this.includePerformers,
56+
};
57+
58+
return this.ticketsauce.getEventDetails({
59+
eventId: this.eventId,
60+
params,
61+
});
62+
},
63+
};
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import ticketsauce from "../../ticketsauce.app.mjs";
2+
3+
export default {
4+
key: "ticketsauce-get-events",
5+
name: "Get Events",
6+
description: "Get a list of all events owned by the authenticated account. [See documentation](https://speca.io/ticketsauce/ticketsauce-public-api?key=204000d6bda66da78315e721920f43aa#list-of-events)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
ticketsauce,
11+
partnerId: {
12+
type: "string",
13+
label: "Partner ID",
14+
description: "Including this ID will limit the result set to the specific partner.",
15+
optional: true,
16+
},
17+
organizationId: {
18+
type: "string",
19+
label: "Organization ID",
20+
description: "Including this ID will limit the result set to the specific organization.",
21+
optional: true,
22+
},
23+
startAfter: {
24+
type: "string",
25+
label: "Start After",
26+
description: "Only retrieve events that start AFTER the specified UTC date (format: YYYY-MM-DD).",
27+
optional: true,
28+
},
29+
endBefore: {
30+
type: "string",
31+
label: "End Before",
32+
description: "Only retrieve events that end BEFORE the specified UTC date (format: YYYY-MM-DD).",
33+
optional: true,
34+
},
35+
activeOnly: {
36+
type: "boolean",
37+
label: "Active Only",
38+
description: "Leaving this as true will restrict retrieved events to only 'active' events. Setting to false will allow the retrieval of both active and inactive events.",
39+
optional: true,
40+
default: true,
41+
},
42+
privacyType: {
43+
type: "string",
44+
label: "Privacy Type",
45+
description: "By default, this will restrict events to only those that are public. Changing to 'all' will remove all restriction, or changing to 'unlisted' will make it only pull those events that are set to unlisted.",
46+
optional: true,
47+
default: "public",
48+
options: [
49+
"public",
50+
"all",
51+
"unlisted"
52+
],
53+
},
54+
sortBy: {
55+
type: "string",
56+
label: "Sort By",
57+
description: "Which field to sort by. By default ('date'), will sort events by their start date. Other options are 'name' (event name) or 'city' (the city where the event is located).",
58+
optional: true,
59+
options: [
60+
"date",
61+
"name",
62+
"city"
63+
],
64+
},
65+
sortDir: {
66+
type: "string",
67+
label: "Sort Direction",
68+
description: "Which direction you'd like to sort - either ascending ('asc' - the default) or descending ('desc').",
69+
optional: true,
70+
options: [
71+
"asc",
72+
"desc"
73+
],
74+
},
75+
includePerformers: {
76+
type: "boolean",
77+
label: "Include Performers",
78+
description: "Returns any associated performers/artists with an event",
79+
optional: true,
80+
},
81+
},
82+
async run() {
83+
const params = {
84+
partner_id: this.partnerId,
85+
organization_id: this.organizationId,
86+
start_after: this.startAfter,
87+
start_before: this.startBefore,
88+
start_phrase: this.startPhrase,
89+
end_after: this.endAfter,
90+
end_before: this.endBefore,
91+
created_after: this.createdAfter,
92+
created_before: this.createdBefore,
93+
active_only: this.activeOnly,
94+
privacy_type: this.privacyType,
95+
sort_by: this.sortBy,
96+
sort_dir: this.sortDir,
97+
include_performers: this.includePerformers,
98+
};
99+
100+
return this.ticketsauce.listEvents({ params });
101+
},
102+
};
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import ticketsauce from "../../ticketsauce.app.mjs";
2+
3+
export default {
4+
key: "ticketsauce-get-order-details",
5+
name: "Get Order Details",
6+
description: "Get details for the specified order. [See documentation](https://speca.io/ticketsauce/ticketsauce-public-api?key=204000d6bda66da78315e721920f43aa#order-details)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
ticketsauce,
11+
partnerId: {
12+
type: "string",
13+
label: "Partner ID",
14+
description: "Including this ID will limit the event selection to the specific partner.",
15+
optional: true,
16+
},
17+
organizationId: {
18+
type: "string",
19+
label: "Organization ID",
20+
description: "Including this ID will limit the event selection to the specific organization.",
21+
optional: true,
22+
},
23+
eventId: {
24+
propDefinition: [
25+
ticketsauce,
26+
"eventId",
27+
(c) => ({
28+
partnerId: c.partnerId,
29+
organizationId: c.organizationId,
30+
}),
31+
],
32+
},
33+
orderId: {
34+
propDefinition: [
35+
ticketsauce,
36+
"orderId",
37+
(c) => ({
38+
eventId: c.eventId,
39+
}),
40+
],
41+
},
42+
},
43+
async run() {
44+
return this.ticketsauce.getOrderDetails({
45+
orderId: this.orderId,
46+
});
47+
},
48+
};
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
import ticketsauce from "../../ticketsauce.app.mjs";
2+
3+
export default {
4+
key: "ticketsauce-get-orders",
5+
name: "Get Orders",
6+
description: "Get a list of orders from the specified event. [See documentation](https://speca.io/ticketsauce/ticketsauce-public-api?key=204000d6bda66da78315e721920f43aa#orders)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
ticketsauce,
11+
partnerId: {
12+
type: "string",
13+
label: "Partner ID",
14+
description: "Including this ID will limit the event selection to the specific partner.",
15+
optional: true,
16+
},
17+
organizationId: {
18+
type: "string",
19+
label: "Organization ID",
20+
description: "Including this ID will limit the event selection to the specific organization.",
21+
optional: true,
22+
},
23+
eventId: {
24+
propDefinition: [
25+
ticketsauce,
26+
"eventId",
27+
(c) => ({
28+
partnerId: c.partnerId,
29+
organizationId: c.organizationId,
30+
}),
31+
],
32+
},
33+
perPage: {
34+
type: "string",
35+
label: "Per Page",
36+
description: "How many results to retrieve (per page). Max 500.",
37+
optional: true,
38+
default: "100",
39+
},
40+
page: {
41+
type: "string",
42+
label: "Page",
43+
description: "Which page to return. For example, if per_page is 20, and page is 3, the results would show 41-60.",
44+
optional: true,
45+
default: "1",
46+
},
47+
q: {
48+
type: "string",
49+
label: "Search Query",
50+
description: "Exact email address or last name attached to an order.",
51+
optional: true,
52+
},
53+
returnQuestionnaires: {
54+
type: "boolean",
55+
label: "Return Questionnaires",
56+
description: "Whether or not to return the question responses from questionnaires (will include attendee responses as well IF tickets are returned)",
57+
optional: true,
58+
},
59+
returnTickets: {
60+
type: "boolean",
61+
label: "Return Tickets",
62+
description: "Whether or not to return the tickets for each order as well.",
63+
optional: true,
64+
},
65+
returnLineItemFees: {
66+
type: "boolean",
67+
label: "Return Line Item Fees",
68+
description: "Whether or not to return the itemized line item fees for each order (if they exist).",
69+
optional: true,
70+
},
71+
orderedAfter: {
72+
type: "string",
73+
label: "Ordered After",
74+
description: "Only retrieve orders that were ordered AFTER the specified date/time (format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).",
75+
optional: true,
76+
},
77+
orderedBefore: {
78+
type: "string",
79+
label: "Ordered Before",
80+
description: "Only retrieve orders that were ordered BEFORE the specified date/time (format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).",
81+
optional: true,
82+
},
83+
modifiedAfter: {
84+
type: "string",
85+
label: "Modified After",
86+
description: "Only retrieve orders that were modified AFTER the specified date/time (format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).",
87+
optional: true,
88+
},
89+
modifiedBefore: {
90+
type: "string",
91+
label: "Modified Before",
92+
description: "Only retrieve orders that were modified BEFORE the specified date/time (format: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).",
93+
optional: true,
94+
},
95+
sortBy: {
96+
type: "string",
97+
label: "Sort By",
98+
description: "Which field to sort by. By default ('date'), this will sort orders by their ordered date. Or 'name' to order by last name.",
99+
optional: true,
100+
default: "date",
101+
options: [
102+
"date",
103+
"name"
104+
],
105+
},
106+
sortDir: {
107+
type: "string",
108+
label: "Sort Direction",
109+
description: "Which direction you'd like to sort - either ascending ('asc' - the default) or descending ('desc').",
110+
optional: true,
111+
default: "asc",
112+
options: [
113+
"asc",
114+
"desc"
115+
],
116+
},
117+
totalAbove: {
118+
type: "string",
119+
label: "Total Above",
120+
description: "Return only orders who's order total is greater than this value.",
121+
optional: true,
122+
},
123+
totalBelow: {
124+
type: "string",
125+
label: "Total Below",
126+
description: "Return only orders who's order total is less than this value.",
127+
optional: true,
128+
},
129+
},
130+
async run() {
131+
const params = {
132+
per_page: this.perPage,
133+
page: this.page,
134+
q: this.q,
135+
return_questionnaires: this.returnQuestionnaires,
136+
return_tickets: this.returnTickets,
137+
return_line_item_fees: this.returnLineItemFees,
138+
ordered_after: this.orderedAfter,
139+
ordered_before: this.orderedBefore,
140+
ordered_phrase: this.orderedPhrase,
141+
modified_after: this.modifiedAfter,
142+
modified_before: this.modifiedBefore,
143+
sort_by: this.sortBy,
144+
sort_dir: this.sortDir,
145+
total_above: this.totalAbove,
146+
total_below: this.totalBelow,
147+
};
148+
149+
return this.ticketsauce.listOrders({
150+
eventId: this.eventId,
151+
params,
152+
});
153+
},
154+
};

0 commit comments

Comments
 (0)