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
3,022 changes: 2,799 additions & 223 deletions app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSponsorApiController.php

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions app/Swagger/Models/ExtraQuestionTypeSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;


#[OA\Schema(
schema: 'ExtraQuestionType',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'name', type: 'string', ),
new OA\Property(property: 'type', type: 'string', ),
new OA\Property(property: 'label', type: 'string', ),
new OA\Property(property: 'placeholder', type: 'string', ),
new OA\Property(property: 'order', type: 'integer', ),
new OA\Property(property: 'mandatory', type: 'boolean', ),
new OA\Property(property: 'max_selected_values', type: 'integer', ),
new OA\Property(property: 'class', type: 'string', ),
new OA\Property(property: 'values', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/ExtraQuestionTypeValue'),
new OA\Schema(type: 'integer')
]
), description: 'ID of the ExtraQuestionTypeValue when included in relations, and full objects when expanded'),
new OA\Property(property: 'sub_question_rules', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/SubQuestionRule'),
new OA\Schema(type: 'integer')
]
), description: 'Array of SubQuestionRule IDs when included in relations, and full objects when expanded'),
new OA\Property(property: 'parent_rules', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/SubQuestionRule'),
new OA\Schema(type: 'integer')
]
), description: 'Array of SubQuestionRule IDs when included in relations, and full objects when expanded'),
])
]
class ExtraQuestionTypeSchema
{
}
24 changes: 24 additions & 0 deletions app/Swagger/Models/ExtraQuestionTypeValueSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'ExtraQuestionTypeValue',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'label', type: 'string', ),
new OA\Property(property: 'value', type: 'string', example: 'Option 1'),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(property: 'question_id', type: 'integer', ),
new OA\Property(property: 'is_default', type: 'boolean', ),
new OA\Property(property: 'question', ref: '#/components/schemas/ExtraQuestionType', ),
]
)]
class ExtraQuestionTypeValueSchema
{
}
20 changes: 20 additions & 0 deletions app/Swagger/Models/SponsorAdSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SponsorAd',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'sponsor_id', type: 'integer', example: 1),
new OA\Property(property: 'text', type: 'string', example: 'Ad text'),
new OA\Property(property: 'alt', type: 'string', example: 'Alt text for image'),
new OA\Property(property: 'link', type: 'string', example: 'https://example.com'),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(property: 'image', ref: '#/components/schemas/File', nullable: true),
]
)]
class SponsorAdSchema {}
54 changes: 54 additions & 0 deletions app/Swagger/Models/SponsorBaseSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SponsorBase',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'order', type: 'integer'),
new OA\Property(property: 'summit_id', type: 'integer'),
new OA\Property(property: 'company_id', type: 'integer'),
new OA\Property(property: 'is_published', type: 'boolean'),
new OA\Property(property: 'side_image', type: 'string', format: 'url'),
new OA\Property(property: 'header_image', type: 'string', format: 'url'),
new OA\Property(property: 'header_image_mobile', type: 'string', format: 'url'),
new OA\Property(property: 'carousel_advertise_image', type: 'string', format: 'url'),
new OA\Property(property: 'marquee', type: 'string'),
new OA\Property(property: 'intro', type: 'string'),
new OA\Property(property: 'external_link', type: 'string'),
new OA\Property(property: 'video_link', type: 'string'),
new OA\Property(property: 'chat_link', type: 'string'),
new OA\Property(property: 'featured_event_id', type: 'integer'),
new OA\Property(property: 'header_image_alt_text', type: 'string'),
new OA\Property(property: 'side_image_alt_text', type: 'string'),
new OA\Property(property: 'header_image_mobile_alt_text', type: 'string'),
new OA\Property(property: 'carousel_advertise_image_alt_text', type: 'string'),
new OA\Property(property: 'show_logo_in_event_page', type: 'boolean'),
new OA\Property(property: 'lead_report_setting_id', type: 'integer'),
new OA\Property(property: 'extra_questions', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/SummitSponsorExtraQuestionType'),
new OA\Schema(type: 'integer')
]
), description: 'SummitSponsorExtraQuestionType Ids when included in the relations, and full objects when expanded'),
new OA\Property(property: 'members', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/Member'),
new OA\Schema(type: 'integer')
]
), description: 'Member Ids when included in the relations, and full objects when expanded'),
new OA\Property(property: 'summit', ref: '#/components/schemas/Summit', description: 'Summit object (Public) when included in expand'),
new OA\Property(property: 'company', ref: '#/components/schemas/Company', description: 'Company object when included in expand'),
new OA\Property(property: 'featured_event', ref: '#/components/schemas/SummitEvent', description: 'SummitEvent object when included in expand'),
new OA\Property(property: 'lead_report_setting', ref: '#/components/schemas/SummitLeadReportSetting', description: 'SummitLeadReportSetting object when included in expand'),
]
)]
class SponsorBaseSchema
{
}
20 changes: 20 additions & 0 deletions app/Swagger/Models/SponsorMaterialSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SponsorMaterial',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'sponsor_id', type: 'integer', example: 1),
new OA\Property(property: 'type', type: 'string', example: 'Presentation', enum: ['Presentation', 'Demo', 'Handout', 'Other']),
new OA\Property(property: 'name', type: 'string', example: 'Material Name'),
new OA\Property(property: 'description', type: 'string', example: 'Material description', nullable: true),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(property: 'file', ref: '#/components/schemas/File', nullable: true),
]
)]
class SponsorMaterialSchema {}
23 changes: 23 additions & 0 deletions app/Swagger/Models/SponsorSchema.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: 'Sponsor',
type: 'object',
allOf: [
new OA\Schema(ref: '#/components/schemas/SponsorBase'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'sponsorship_id', type: 'integer'),
new OA\Property(property: 'sponsorship', ref: '#/components/schemas/SummitSponsorship', description: 'SummitSponsorship when expanded'),
]
)
]
)]
class SponsorSchema
{
}
18 changes: 18 additions & 0 deletions app/Swagger/Models/SponsorSocialNetworkSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SponsorSocialNetwork',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'sponsor_id', type: 'integer', example: 1),
new OA\Property(property: 'link', type: 'string', example: 'https://twitter.com/example'),
new OA\Property(property: 'enabled', type: 'boolean', example: true),
new OA\Property(property: 'icon_css_class', type: 'string', example: 'fab fa-twitter'),
]
)]
class SponsorSocialNetworkSchema {}
27 changes: 27 additions & 0 deletions app/Swagger/Models/SponsorV2Schema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SponsorV2',
type: 'object',
allOf: [
new OA\Schema(ref: '#/components/schemas/SponsorBase'),
new OA\Schema(
type: 'object',
properties: [
new OA\Property(property: 'sponsorships', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/SummitSponsorship'),
new OA\Schema(type: 'integer')
]
), description: 'SummitSponsorships Ids when included in relations and full objects when expanded'),
]
)
]
)]
class SponsorV2Schema
{
}
38 changes: 38 additions & 0 deletions app/Swagger/Models/SubQuestionRuleSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;


#[OA\Schema(
schema: 'SubQuestionRule',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'created', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'last_edited', type: 'integer', example: 1, format: "time_epoch"),
new OA\Property(property: 'visibility', type: 'string'),
new OA\Property(property: 'visibility_condition', type: 'string'),
new OA\Property(property: 'answer_values', type: 'string_array'),
new OA\Property(property: 'answer_values_operator', type: 'string'),
new OA\Property(property: 'order', type: 'integer'),
new OA\Property(property: 'sub_question_id', type: 'integer'),
new OA\Property(property: 'parent_question_id', type: 'integer'),
new OA\Property(property: 'sub_question_rules', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/ExtraQuestionTypeValue'),
new OA\Schema(type: 'integer')
]
), description: 'ID of the ExtraQuestionTypeValue when included in relations, and full objects when expanded'),
new OA\Property(property: 'parent_rules', type: 'array', items: new OA\Items(
oneOf: [
new OA\Schema(ref: '#/components/schemas/ExtraQuestionTypeValue'),
new OA\Schema(type: 'integer')
]
), description: 'ID of the ExtraQuestionTypeValue when included in relations, and full objects when expanded'),
])
]
class SubQuestionRuleSchema
{
}
21 changes: 21 additions & 0 deletions app/Swagger/Models/SummitLeadReportSettingSchema.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: 'SummitLeadReportSetting',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'sponsor_id', type: 'integer', example: 1),
new OA\Property(
property: 'columns',
type: 'array',
items: new OA\Items(type: 'string', example: 'first_name'),
description: 'Array of column names'
),
]
)]
class SummitLeadReportSettingSchema {}
25 changes: 25 additions & 0 deletions app/Swagger/Models/SummitSponsorExtraQuestionTypeSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Swagger\schemas;

use OpenApi\Attributes as OA;

#[OA\Schema(
schema: 'SummitSponsorExtraQuestionType',
type: 'object',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'sponsor_id', type: 'integer', example: 1),
new OA\Property(property: 'type', type: 'string', example: 'TEXT', enum: ['TEXT', 'CHECKBOX', 'RADIO_BUTTON', 'DROP_DOWN']),
new OA\Property(property: 'label', type: 'string', example: 'Question Label'),
new OA\Property(property: 'mandatory', type: 'boolean', example: false),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(
property: 'values',
type: 'array',
items: new OA\Items(ref: '#/components/schemas/ExtraQuestionTypeValue'),
nullable: true
),
]
)]
class SummitSponsorExtraQuestionTypeSchema {}
25 changes: 25 additions & 0 deletions app/Swagger/Security/SponsorOAuth2Schema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Swagger\schemas;

use App\Security\SummitScopes;
use OpenApi\Attributes as OA;

#[OA\SecurityScheme(
type: 'oauth2',
securityScheme: 'summit_sponsor_oauth2',
flows: [
new OA\Flow(
authorizationUrl: L5_SWAGGER_CONST_AUTH_URL,
tokenUrl: L5_SWAGGER_CONST_TOKEN_URL,
flow: 'authorizationCode',
scopes: [
SummitScopes::ReadSummitData => 'Read Summit Sponsor Data',
SummitScopes::ReadAllSummitData => 'Read All Summit Sponsor Data',
SummitScopes::WriteSummitData => 'Write Summit Sponsor Data',
],
),
],
)
]
class SponsorOAuth2Schema {}
Loading