Skip to content
Draft
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
2,314 changes: 2,314 additions & 0 deletions app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSponsorApiController.php

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions app/Swagger/Models/ExtraQuestionTypeValueSchema.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?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: 'value', type: 'string', example: 'Option 1'),
new OA\Property(property: 'order', type: 'integer', example: 1),
]
)]
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 {}
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',
properties: [
new OA\Property(property: 'id', type: 'integer', example: 1),
new OA\Property(property: 'company_id', type: 'integer', example: 1),
new OA\Property(property: 'sponsorship_type_id', type: 'integer', example: 1),
new OA\Property(property: 'order', type: 'integer', example: 1),
new OA\Property(property: 'badge_scans_count', type: 'integer', example: 0),
new OA\Property(property: 'links_count', type: 'integer', example: 0),
new OA\Property(property: 'company', type: 'object', description: 'Company object'),
new OA\Property(property: 'sponsorship', type: 'object', description: 'Sponsorship object'),
new OA\Property(property: 'is_published', type: 'boolean', example: true),
new OA\Property(property: 'sponsorships', type: 'array', items: new OA\Items(type: 'object'), nullable: true),
]
)]
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 {}
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
Loading