Skip to content
Merged
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
1,504 changes: 1,478 additions & 26 deletions app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitApiController.php

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions app/Security/SummitScopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,7 @@ final class SummitScopes
const WriteAttendeeNotesData = '%s/attendee/notes/write';
const ReadAttendeeNotesData = '%s/attendee/notes/read';

const WriteSummitsConfirmExternalOrders = '%s/summits/confirm-external-orders';
const ReadSummitsConfirmExternalOrders = '%s/summits/read-external-orders';
}

45 changes: 19 additions & 26 deletions app/Swagger/Models/SummitAbstractLocationSchema.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
<?php

namespace App\Swagger\Models;
namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

/**
* Schema for SummitAbstractLocation model
* Base schema for all location types
*/

#[OA\Schema(
schema: 'SummitAbstractLocation',
type: 'object',
description: 'Base location object for summits',
properties: [
new OA\Property(property: 'id', type: 'integer', description: 'Unique identifier'),
new OA\Property(property: 'created', type: 'integer', description: 'Creation timestamp (epoch)'),
new OA\Property(property: 'last_edited', type: 'integer', description: 'Last modification timestamp (epoch)'),
new OA\Property(property: 'name', type: 'string', description: 'Location name'),
new OA\Property(property: 'short_name', type: 'string', description: 'Short name for the location'),
new OA\Property(property: 'description', type: 'string', description: 'Location description'),
new OA\Property(property: 'location_type', type: 'string', description: 'Type of location'),
new OA\Property(property: 'order', type: 'integer', description: 'Display order'),
new OA\Property(property: 'opening_hour', type: 'integer', description: 'Opening hour (0-23)'),
new OA\Property(property: 'closing_hour', type: 'integer', description: 'Closing hour (0-23)'),
new OA\Property(property: 'class_name', type: 'string', description: 'Class name identifier'),
new OA\Property(
property: 'published_events',
type: 'array',
items: new OA\Items(type: 'integer'),
description: 'Array of published event IDs at this location'
),
]
)]
class SummitAbstractLocationSchema {}
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'name', type: 'string'),
new OA\Property(property: 'short_name', type: 'string'),
new OA\Property(property: 'description', type: 'string'),
new OA\Property(property: 'location_type', type: 'string'),
new OA\Property(property: 'order', type: 'integer'),
new OA\Property(property: 'opening_hour', type: 'integer'),
new OA\Property(property: 'closing_hour', type: 'integer'),
new OA\Property(property: 'class_name', type: 'string'),
new OA\Property(property: 'published_events', type: 'array', items: new OA\Items(ref: "#/components/schemas/SummitEvent"), description: 'Array of SummitEvent ids, only if is in ?expand=published_events' ),
])
]
class SummitAbstractLocationSchema
{
}
21 changes: 21 additions & 0 deletions app/Swagger/Models/SummitEventSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SummitEvent',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer'),
new OA\Property(property: 'created', type: 'integer', example: 1630500518),
new OA\Property(property: 'last_edited', type: 'integer', example: 1630500518),
new OA\Property(property: 'title', type: 'string', example: 'This is a title'),
new OA\Property(property: 'description', type: 'string', example: 'This is a Description'),
]
)]
class SummitEventSchema
{
}

104 changes: 100 additions & 4 deletions app/Swagger/Models/SummitSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,107 @@
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1),
new OA\Property(property: 'last_edited', type: 'integer', example: 1),
// @TODO: complete properties
new OA\Property(property: 'created', type: 'integer', example: 1, format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: 'int64', description: 'Unix timestamp'),

new OA\Property(property: 'name', type: 'string'),
new OA\Property(property: 'start_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'end_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'registration_begin_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'registration_end_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'start_showing_venues_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'schedule_start_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'active', type: 'boolean'),
new OA\Property(property: 'type_id', type: 'integer'),
new OA\Property(property: 'dates_label', type: 'string'),
new OA\Property(property: 'max_submission_allowed_per_user', type: 'integer'),
new OA\Property(property: 'published_events_count', type: 'integer'),
new OA\Property(property: 'time_zone_id', type: 'string'),
new OA\Property(property: 'slug', type: 'string'),
new OA\Property(property: 'invite_only_registration', type: 'boolean'),
new OA\Property(property: 'meeting_room_booking_start_time', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'meeting_room_booking_end_time', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'meeting_room_booking_slot_length', type: 'integer'),
new OA\Property(property: 'meeting_room_booking_max_allowed', type: 'integer'),
new OA\Property(property: 'begin_allow_booking_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'end_allow_booking_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'logo', type: 'string', format: 'uri'),
new OA\Property(property: 'secondary_logo', type: 'string', format: 'uri'),
new OA\Property(property: 'reassign_ticket_till_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'registration_disclaimer_content', type: 'string'),
new OA\Property(property: 'registration_disclaimer_mandatory', type: 'boolean'),
new OA\Property(property: 'registration_reminder_email_days_interval', type: 'integer'),
new OA\Property(property: 'registration_link', type: 'string', format: 'uri'),
new OA\Property(property: 'secondary_registration_link', type: 'string', format: 'uri'),
new OA\Property(property: 'secondary_registration_label', type: 'string'),
new OA\Property(property: 'schedule_default_page_url', type: 'string', format: 'uri'),
new OA\Property(property: 'schedule_default_event_detail_url', type: 'string', format: 'uri'),
new OA\Property(property: 'schedule_og_site_name', type: 'string'),
new OA\Property(property: 'schedule_og_image_url', type: 'string'),
new OA\Property(property: 'schedule_og_image_secure_url', type: 'string'),
new OA\Property(property: 'schedule_og_image_width', type: 'integer'),
new OA\Property(property: 'schedule_og_image_height', type: 'integer'),
new OA\Property(property: 'schedule_facebook_app_id', type: 'string'),
new OA\Property(property: 'schedule_ios_app_name', type: 'string'),
new OA\Property(property: 'schedule_ios_app_store_id', type: 'string'),
new OA\Property(property: 'schedule_ios_app_custom_schema', type: 'string'),
new OA\Property(property: 'schedule_android_app_name', type: 'string'),
new OA\Property(property: 'schedule_android_app_package', type: 'string'),
new OA\Property(property: 'schedule_android_custom_schema', type: 'string'),
new OA\Property(property: 'schedule_twitter_app_name', type: 'string'),
new OA\Property(property: 'schedule_twitter_text', type: 'string'),
new OA\Property(property: 'default_page_url', type: 'string'),
new OA\Property(property: 'speaker_confirmation_default_page_url', type: 'string'),
new OA\Property(property: 'virtual_site_url', type: 'string'),
new OA\Property(property: 'marketing_site_url', type: 'string'),
new OA\Property(property: 'support_email', type: 'string'),
new OA\Property(property: 'speakers_support_email', type: 'string'),
new OA\Property(property: 'registration_send_qr_as_image_attachment_on_ticket_email', type: 'boolean'),
new OA\Property(property: 'registration_send_ticket_as_pdf_attachment_on_ticket_email', type: 'boolean'),
new OA\Property(property: 'registration_send_ticket_email_automatically', type: 'boolean'),
new OA\Property(property: 'registration_send_order_email_automatically', type: 'boolean'),
new OA\Property(property: 'registration_allow_automatic_reminder_emails', type: 'boolean'),
new OA\Property(property: 'modality', type: 'string'),
new OA\Property(property: 'allow_update_attendee_extra_questions', type: 'boolean'),
new OA\Property(property: 'time_zone_label', type: 'string'),
new OA\Property(property: 'registration_allowed_refund_request_till_date', type: 'integer', format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'registration_slug_prefix', type: 'string'),
new OA\Property(property: 'marketing_site_oauth2_client_scopes', type: 'string'),
new OA\Property(property: 'default_ticket_type_currency', type: 'string'),
new OA\Property(property: 'default_ticket_type_currency_symbol', type: 'string'),
// Relations as Ids
new OA\Property(property: 'ticket_types', type: 'array', items: new OA\Items(type: "integer")),
new OA\Property(property: 'wifi_connections', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=wifi_connections.'),
new OA\Property(property: 'selection_plans', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=selection_plans.'),
new OA\Property(property: 'meeting_booking_room_allowed_attributes', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=meeting_booking_room_allowed_attributes.'),
new OA\Property(property: 'summit_sponsors', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=summit_sponsors.'),
new OA\Property(property: 'order_extra_questions', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=order_extra_questions.'),
new OA\Property(property: 'tax_types', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=tax_types.'),
new OA\Property(property: 'payment_profiles', type: 'array', items: new OA\Items(type: "object"), description: 'Array of PaymentGatewayProfile, when included in ?relations=payment_profiles.'),
new OA\Property(property: 'email_flows_events', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=email_flows_events.'),
new OA\Property(property: 'summit_documents', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=summit_documents.'),
new OA\Property(property: 'dates_with_events', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=dates_with_events.'),
new OA\Property(property: 'presentation_action_types', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=presentation_action_types.'),
new OA\Property(property: 'schedule_settings', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=schedule_settings.'),
new OA\Property(property: 'badge_view_types', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=badge_view_types.'),
new OA\Property(property: 'lead_report_settings', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=lead_report_settings.'),
new OA\Property(property: 'badge_types', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=badge_types.'),
new OA\Property(property: 'badge_features_types', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=badge_features_types.'),
new OA\Property(property: 'badge_access_level_types', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=badge_access_level_types.'),
new OA\Property(property: 'supported_currencies', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=supported_currencies.'),
// Expanded relations
new OA\Property(property: 'featured_speakers', type: 'array', items: new OA\Items(type: "integer"), description: 'Array of Ids, when included in ?relations=featured_speakers, full objects when included in ?expand=featured_speakers.'),
new OA\Property(property: 'type', ref: '#/components/schemas/SummitType', description: 'SummitType, when included in ?relations=type, full object when included in ?expand=type.'),
new OA\Property(property: 'locations', type: 'array', items: new OA\Items(ref: '#/components/schemas/SummitAbstractLocation'), description: 'Array of SummitAbstractLocation when included in ?expand=locations.'),
new OA\Property(property: 'event_types', type: 'array', items: new OA\Items(type: "object"), description: 'Array of SummitEmailEventFlowType, when included in ?expand=schedule.'),
new OA\Property(property: 'tracks', type: 'array', items: new OA\Items(type: "object"), description: 'Array of PresentationCategory, when included in ?expand=schedule.'),
new OA\Property(property: 'track_groups', type: 'array', items: new OA\Items(type: "object"), description: 'Array of PresentationCategoryGroup, when included in ?expand=schedule.'),
new OA\Property(property: 'schedule', type: 'array', items: new OA\Items(ref: '#/components/schemas/SummitEvent'), description: 'Array of SummitEvent, when included in ?expand=schedule.'),
new OA\Property(property: 'sponsors', type: 'array', items: new OA\Items(ref: "#/components/schemas/Company"), description: 'Array of Company, when included in ?expand=schedule.'),
new OA\Property(property: 'speakers', type: 'array', items: new OA\Items(type: "object"), description: 'Array of PresentationSpeaker, when included in ?expand=schedule.'),

])
]
class SummitSchema
{
}
}
23 changes: 23 additions & 0 deletions app/Swagger/Models/SummitTypeSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;


#[OA\Schema(
schema: 'SummitType',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: 'int64', description: 'Unix timestamp'),
new OA\Property(property: 'name', type: 'string'),
new OA\Property(property: 'color', type: 'string'),
new OA\Property(property: 'type', type: 'string'),

])
]
class SummitTypeSchema
{
}
37 changes: 22 additions & 15 deletions app/Swagger/Security/SummitAuthSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@
use OpenApi\Attributes as OA;

#[
OA\Info(version: "1.0.0", description: "Summit API", title: "Summit API Documentation"),
OA\Server(url: L5_SWAGGER_CONST_HOST, description: "server"),
OA\SecurityScheme(
type: 'oauth2',
securityScheme: 'summit_document_oauth2',
flows: [
new OA\Flow(
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
flow: 'authorizationCode',
scopes: [
SummitScopes::ReadAllSummitData => 'Read All Summit Data',
SummitScopes::WriteSummitData => 'Write Summit Data',
],
),
],
)
type: 'oauth2',
securityScheme: 'summit_oauth2',
flows: [
new OA\Flow(
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
flow: 'authorizationCode',
scopes: [
SummitScopes::ReadSummitData => 'Read Summit Data',
SummitScopes::ReadAllSummitData => 'Read All Summit Data',
SummitScopes::WriteSummitData => 'Write Summit Data',
SummitScopes::ReadBadgeScanValidate => 'Validate Badge Scan',
],
),
],
)
]
class SummitAuthSchema {}

class SummitAuthSchema
{
}
Loading