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
42 changes: 42 additions & 0 deletions build/CoreApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@
namespace AirLST\SdkPhp;

use AirLST\SdkPhp\Resources\BookableGroups;
use AirLST\SdkPhp\Resources\Checkins;
use AirLST\SdkPhp\Resources\Company;
use AirLST\SdkPhp\Resources\Contacts;
use AirLST\SdkPhp\Resources\Documents;
use AirLST\SdkPhp\Resources\Emails;
use AirLST\SdkPhp\Resources\Events;
use AirLST\SdkPhp\Resources\ExtendedFields;
use AirLST\SdkPhp\Resources\GuestGroups;
use AirLST\SdkPhp\Resources\GuestImport;
use AirLST\SdkPhp\Resources\Guests;
use AirLST\SdkPhp\Resources\Orders;
use AirLST\SdkPhp\Resources\SubEvents;
use AirLST\SdkPhp\Resources\Tracking;
use Saloon\Http\Connector;
use Saloon\Http\Request;
use Saloon\PaginationPlugin\Contracts\HasPagination;
Expand Down Expand Up @@ -46,6 +53,11 @@ public function bookableGroups(): BookableGroups
return new BookableGroups($this);
}

public function checkins(): Checkins
{
return new Checkins($this);
}

public function company(): Company
{
return new Company($this);
Expand All @@ -71,11 +83,41 @@ public function events(): Events
return new Events($this);
}

public function extendedFields(): ExtendedFields
{
return new ExtendedFields($this);
}

public function guestGroups(): GuestGroups
{
return new GuestGroups($this);
}

public function guestImport(): GuestImport
{
return new GuestImport($this);
}

public function guests(): Guests
{
return new Guests($this);
}

public function orders(): Orders
{
return new Orders($this);
}

public function subEvents(): SubEvents
{
return new SubEvents($this);
}

public function tracking(): Tracking
{
return new Tracking($this);
}

protected function defaultHeaders(): array
{
return ['X-Api-Key' => $this->apiKey];
Expand Down
14 changes: 8 additions & 6 deletions build/Requests/BookableGroups/GetAvailabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ class GetAvailabilities extends Request implements HasBody
protected Method $method = Method::POST;

/**
* @param mixed $eventUuid Event UUID
* @param mixed $bookableGroupUuid BookableGroup UUID
* @param mixed $bookableUuid Bookable object UUID
* @param string $startDate Start date
* @param string $endDate End date
* @param mixed $eventUuid Event UUID
* @param mixed $bookableGroupUuid BookableGroup UUID
* @param mixed $bookableUuid Bookable object UUID
* @param string $startDate Start of the window to list availabilities for. An absolute instant: a value without a zone is read as UTC, not as event-local time.
* @param string $endDate End of the window to list availabilities for. An absolute instant: a value without a zone is read as UTC, not as event-local time.
* @param string|null $guestCode Optional guest code used to compute the guest-specific reservations and remaining capacity
*/
public function __construct(
protected mixed $eventUuid,
protected mixed $bookableGroupUuid,
protected mixed $bookableUuid,
protected string $startDate,
protected string $endDate,
protected ?string $guestCode = null,
) {}

public function resolveEndpoint(): string
Expand All @@ -40,6 +42,6 @@ public function resolveEndpoint(): string

public function defaultBody(): array
{
return array_filter(['start_date' => $this->startDate, 'end_date' => $this->endDate]);
return array_filter(['start_date' => $this->startDate, 'end_date' => $this->endDate, 'guest_code' => $this->guestCode]);
}
}
14 changes: 12 additions & 2 deletions build/Requests/BookableGroups/ListBookableGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,33 @@

use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\PaginationPlugin\Contracts\Paginatable;

/**
* listBookableGroups.
*/
class ListBookableGroups extends Request
class ListBookableGroups extends Request implements Paginatable
{
protected Method $method = Method::GET;

/**
* @param mixed $eventUuid Event UUID
* @param mixed $eventUuid Event UUID
* @param int|null $perPage Number of items per page. Defaults to 100.
* @param int|null $page Page number
*/
public function __construct(
protected mixed $eventUuid,
protected ?int $perPage = null,
protected ?int $page = null,
) {}

public function resolveEndpoint(): string
{
return "/api/events/{$this->eventUuid}/bookables/groups";
}

protected function defaultQuery(): array
{
return array_filter(['perPage' => $this->perPage, 'page' => $this->page]);
}
}
16 changes: 13 additions & 3 deletions build/Requests/BookableGroups/ListBookablesForGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,35 @@

use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\PaginationPlugin\Contracts\Paginatable;

/**
* listBookablesForGroup.
*/
class ListBookablesForGroup extends Request
class ListBookablesForGroup extends Request implements Paginatable
{
protected Method $method = Method::GET;

/**
* @param mixed $eventUuid Event UUID
* @param mixed $bookableGroupUuid BookableGroup UUID
* @param mixed $eventUuid Event UUID
* @param mixed $bookableGroupUuid BookableGroup UUID
* @param int|null $perPage Number of items per page. Defaults to 100.
* @param int|null $page Page number
*/
public function __construct(
protected mixed $eventUuid,
protected mixed $bookableGroupUuid,
protected ?int $perPage = null,
protected ?int $page = null,
) {}

public function resolveEndpoint(): string
{
return "/api/events/{$this->eventUuid}/bookables/groups/{$this->bookableGroupUuid}";
}

protected function defaultQuery(): array
{
return array_filter(['perPage' => $this->perPage, 'page' => $this->page]);
}
}
65 changes: 65 additions & 0 deletions build/Requests/Checkins/GetCheckins.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

declare(strict_types=1);

namespace AirLST\SdkPhp\Requests\Checkins;

use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\PaginationPlugin\Contracts\Paginatable;

/**
* getCheckins.
*
* Returns a paginated list of check-ins for an event. Supports filtering by timestamp, type, location,
* and device.
*/
class GetCheckins extends Request implements Paginatable
{
protected Method $method = Method::GET;

/**
* @param mixed $eventUuid Event UUID
* @param int|null $perPage Number of items per page
* @param int|null $page Page number
* @param string|null $search Quick search across guest code, name, email, and company
* @param string|null $filtersTimestampbetween Filter checkins within a timestamp range (inclusive). Use the `between` operator with two values separated by `||`. Example: filters(timestamp*between)=1704067200||1735689599. Supports unix timestamps and ISO 8601 date strings.
* @param string|null $filtersTypeeq Filter by check-in type. Available operators: eq (equal), neq (not equal), in (multiple values with || separator). Example: filters(type*eq)=check-in
* @param string|null $filtersLocationlike Filter by location with partial matching. Available operators: eq (equal), neq (not equal), like (partial match). Example: filters(location*like)=Main
* @param string|null $filtersTimestampgte Filter checkins from a specific timestamp (greater than or equal). Supports unix timestamps and ISO 8601 dates. Example: filters(timestamp*gte)=1704067200
* @param string|null $filtersTimestamplte Filter checkins up to a specific timestamp (less than or equal). Supports unix timestamps and ISO 8601 dates. Example: filters(timestamp*lte)=1735689599
* @param string|null $sortsTimestamp0 Sort by field. Template: sorts(field*order)=value. Order can be asc or desc. Default sort is timestamp descending. Example: sorts(timestamp*0)=asc
*/
public function __construct(
protected mixed $eventUuid,
protected ?int $perPage = null,
protected ?int $page = null,
protected ?string $search = null,
protected ?string $filtersTimestampbetween = null,
protected ?string $filtersTypeeq = null,
protected ?string $filtersLocationlike = null,
protected ?string $filtersTimestampgte = null,
protected ?string $filtersTimestamplte = null,
protected ?string $sortsTimestamp0 = null,
) {}

public function resolveEndpoint(): string
{
return "/api/events/{$this->eventUuid}/guests/checkins";
}

protected function defaultQuery(): array
{
return array_filter([
'per_page' => $this->perPage,
'page' => $this->page,
'search' => $this->search,
'filters(timestamp*between)' => $this->filtersTimestampbetween,
'filters(type*eq)' => $this->filtersTypeeq,
'filters(location*like)' => $this->filtersLocationlike,
'filters(timestamp*gte)' => $this->filtersTimestampgte,
'filters(timestamp*lte)' => $this->filtersTimestamplte,
'sorts(timestamp*0)' => $this->sortsTimestamp0,
]);
}
}
60 changes: 59 additions & 1 deletion build/Requests/Company/GetCompanyEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,73 @@

/**
* getCompanyEvents.
*
* Returns the events of the authenticated company, including the event-level custom fields
* (`extended_fields`). An event that is currently being copied is omitted until the copy
* finishes.
*
* **Filtering.** Narrow the list with query parameters in the form
* `filters(field*operator)=value`. The parentheses and the `*` are literal (AWS CloudFront drops the
* standard `filters[...]` bracket syntax, so this API uses `(...)`). Omit `*operator` for an exact
* match. Target a field on the address relation with a `:` separator, for example
* `filters(address:city*eq)=Munich`.
*
* **Operators:** `eq` (equals, default), `neq` (not equals),
* `like` (case-insensitive partial match), `in` (any of), `gt`, `gte`, `lt`, `lte`, `between`,
* `empty`, `nempty`. Pass several values to `in` and the two bounds of `between` separated by `||`,
* for example `filters(starts_at*between)=2026-01-01||2026-12-31`. Date filters accept ISO 8601
* strings or unix timestamps and are matched in UTC.
*
* **Filterable fields:** `id`, `name`, `category`,
* `timezone`, `centerstage_public_url`, `starts_at`, `ends_at`; the address fields `address:name` (the
* response `location_name`), `address:address_line_1`, `address:address_line_2`, `address:city`,
* `address:zip`, `address:country`; and any event-level custom field via
* `filters(extended_fields->'field_key'*operator)=value`.
*/
class GetCompanyEvents extends Request
{
protected Method $method = Method::GET;

public function __construct() {}
/**
* @param string|null $filtersNamelike Filter by event name. Operators: eq, neq, like, in.
* @param string|null $filtersCategoryeq Filter by event category. Operators: eq, neq, in.
* @param string|null $filtersStartsAtbetween Filter by start date. Operators: eq, gt, gte, lt, lte, between. Two ISO 8601 dates or unix timestamps separated by ||, matched in UTC.
* @param string|null $filtersEndsAtlte Filter by end date. Operators: eq, gt, gte, lt, lte, between. ISO 8601 date or unix timestamp, matched in UTC.
* @param string|null $filtersTimezoneeq Filter by IANA timezone. Operators: eq, neq, like, in.
* @param string|null $filtersAddressCitylike Filter by city of the event address. Operators: eq, neq, like, in.
* @param string|null $filtersAddressCountryeq Filter by ISO 3166-1 alpha-2 country code of the event address. Operators: eq, neq, in.
* @param string|null $filtersAddressNamelike Filter by location name (the response `location_name`, stored on the address relation). Operators: eq, neq, like.
* @param string|null $filtersExtendedFieldsFieldKeyeq Filter by an event-level custom field value. Replace field_key with the extended field key (see listExtendedFields). Operators: eq, neq, like, in, gt, gte, lt, lte, empty, nempty.
*/
public function __construct(
protected ?string $filtersNamelike = null,
protected ?string $filtersCategoryeq = null,
protected ?string $filtersStartsAtbetween = null,
protected ?string $filtersEndsAtlte = null,
protected ?string $filtersTimezoneeq = null,
protected ?string $filtersAddressCitylike = null,
protected ?string $filtersAddressCountryeq = null,
protected ?string $filtersAddressNamelike = null,
protected ?string $filtersExtendedFieldsFieldKeyeq = null,
) {}

public function resolveEndpoint(): string
{
return '/api/companies/events';
}

protected function defaultQuery(): array
{
return array_filter([
'filters(name*like)' => $this->filtersNamelike,
'filters(category*eq)' => $this->filtersCategoryeq,
'filters(starts_at*between)' => $this->filtersStartsAtbetween,
'filters(ends_at*lte)' => $this->filtersEndsAtlte,
'filters(timezone*eq)' => $this->filtersTimezoneeq,
'filters(address:city*like)' => $this->filtersAddressCitylike,
'filters(address:country*eq)' => $this->filtersAddressCountryeq,
'filters(address:name*like)' => $this->filtersAddressNamelike,
"filters(extended_fields->'field_key'*eq)" => $this->filtersExtendedFieldsFieldKeyeq,
]);
}
}
35 changes: 35 additions & 0 deletions build/Requests/Contacts/UpdateContact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

declare(strict_types=1);

namespace AirLST\SdkPhp\Requests\Contacts;

use Saloon\Enums\Method;
use Saloon\Http\Request;

/**
* updateContact.
*/
class UpdateContact extends Request
{
protected Method $method = Method::PUT;

/**
* @param mixed $contactCode Contact code
* @param array|null $contact Contact details for guest
*/
public function __construct(
protected mixed $contactCode,
protected ?array $contact = null,
) {}

public function resolveEndpoint(): string
{
return "/api/companies/contacts/{$this->contactCode}";
}

public function defaultBody(): array
{
return array_filter(['contact' => $this->contact]);
}
}
4 changes: 2 additions & 2 deletions build/Requests/Contacts/ValidateContactCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class ValidateContactCode extends Request implements HasBody
protected Method $method = Method::POST;

/**
* @param string|null $code The contact code
* @param string $code The contact code
*/
public function __construct(
protected ?string $code = null,
protected string $code,
) {}

public function resolveEndpoint(): string
Expand Down
Loading
Loading