Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import ticketsauce from "../../ticketsauce.app.mjs";

export default {
key: "ticketsauce-get-event-details",
name: "Get Event Details",
description: "Get details for a specified event. [See documentation](https://speca.io/ticketsauce/ticketsauce-public-api?key=204000d6bda66da78315e721920f43aa#event-details)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
ticketsauce,
partnerId: {
propDefinition: [
ticketsauce,
"partnerId",
],
},
organizationId: {
propDefinition: [
ticketsauce,
"organizationId",
],
},
eventId: {
propDefinition: [
ticketsauce,
"eventId",
(c) => ({
partnerId: c.partnerId,
organizationId: c.organizationId,
}),
],
},
photos: {
type: "boolean",
label: "Photos",
description: "Whether or not to return the event's photo gallery records.",
optional: true,
default: false,
},
includePerformers: {
propDefinition: [
ticketsauce,
"includePerformers",
],
},
},
async run({ $ }) {
const params = {
photos: this.photos ?
1 :
0,
include_performers: String(this.includePerformers),
};

const response = await this.ticketsauce.getEventDetails($, {
eventId: this.eventId,
params,
});

$.export("$summary", `Successfully retrieved details for event ID: ${this.eventId}`);
return response;
},
};
127 changes: 127 additions & 0 deletions components/ticketsauce/actions/get-events/get-events.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import ticketsauce from "../../ticketsauce.app.mjs";

export default {
key: "ticketsauce-get-events",
name: "Get Events",
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)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
ticketsauce,
partnerId: {
propDefinition: [
ticketsauce,
"partnerId",
],
},
organizationId: {
propDefinition: [
ticketsauce,
"organizationId",
],
},
startAfter: {
type: "string",
label: "Start After",
description: "Only retrieve events that start AFTER the specified UTC date (format: `YYYY-MM-DD`).",
optional: true,
},
endBefore: {
type: "string",
label: "End Before",
description: "Only retrieve events that end BEFORE the specified UTC date (format: `YYYY-MM-DD`).",
optional: true,
},
activeOnly: {
type: "boolean",
label: "Active Only",
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.",
optional: true,
default: true,
},
privacyType: {
type: "string",
label: "Privacy Type",
description: "Filter events by privacy type.",
optional: true,
default: "public",
options: [
{
label: "Public events only",
value: "public",
},
{
label: "All events (no restriction)",
value: "all",
},
{
label: "Unlisted events only",
value: "unlisted",
},
],
},
sortBy: {
type: "string",
label: "Sort By",
description: "Field to sort events by.",
optional: true,
options: [
{
label: "Event start date",
value: "date",
},
{
label: "Event name",
value: "name",
},
{
label: "City location",
value: "city",
},
],
},
sortDir: {
type: "string",
label: "Sort Direction",
description: "Direction to sort results.",
optional: true,
options: [
{
label: "Ascending",
value: "asc",
},
{
label: "Descending",
value: "desc",
},
],
},
includePerformers: {
propDefinition: [
ticketsauce,
"includePerformers",
],
},
},
async run({ $ }) {
const params = {
partner_id: this.partnerId,
organization_id: this.organizationId,
start_after: this.startAfter,
end_before: this.endBefore,
active_only: String(this.activeOnly),
privacy_type: this.privacyType,
sort_by: this.sortBy,
sort_dir: this.sortDir,
include_performers: String(this.includePerformers),
};
return this.ticketsauce.listEvents($, {
params,
});
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import ticketsauce from "../../ticketsauce.app.mjs";

export default {
key: "ticketsauce-get-order-details",
name: "Get Order Details",
description: "Get details for the specified order. [See documentation](https://speca.io/ticketsauce/ticketsauce-public-api?key=204000d6bda66da78315e721920f43aa#order-details)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
ticketsauce,
partnerId: {
propDefinition: [
ticketsauce,
"partnerId",
],
},
organizationId: {
propDefinition: [
ticketsauce,
"organizationId",
],
},
eventId: {
propDefinition: [
ticketsauce,
"eventId",
(c) => ({
partnerId: c.partnerId,
organizationId: c.organizationId,
}),
],
},
orderId: {
propDefinition: [
ticketsauce,
"orderId",
(c) => ({
eventId: c.eventId,
}),
],
},
},
async run({ $ }) {
const response = await this.ticketsauce.getOrderDetails($, {
orderId: this.orderId,
});

$.export("$summary", `Successfully retrieved details for order ID: ${this.orderId}`);
return response;
},
};
Loading
Loading