Skip to content

Commit d66833b

Browse files
ju5tjshah4517
andauthored
chore: add docblocks for autocompletion (#280)
* chore: add docblocks for autocompletion * fix: support model casting * fix phpcs and add comments * Fix property type for parent in Department model * fix phpcs * Update castAttribute method signature to typed parameters * set iterable types in CreateArticle * set iterable types in CreateMessage * set iterable types in CreateTicket * set iterable types in UpdateTicket * set iterable types in User Requests * set iterable types in models * fix phpstan contravariant error * fix? * fix phpcs * refactor code * fix * chore: add missing `null` to properties * chore: add missing null types --------- Co-authored-by: Jay <[email protected]>
1 parent e554797 commit d66833b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+821
-1
lines changed

src/Model/Core/Brand.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,43 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property int $id
9+
* @property string $name
10+
* @property int $enabled
11+
* @property string $system_url
12+
* @property int|null $enable_ssl
13+
* @property string|null $brand_colour
14+
* @property string|null $frontend_logo
15+
* @property string|null $frontend_logo_dark_mode
16+
* @property string|null $website_url
17+
* @property string|null $favicon
18+
* @property string|null $favicon_dark_mode
19+
* @property string $frontend_template
20+
* @property string|null $operator_icon
21+
* @property string|null $operator_template
22+
* @property string $default_email
23+
* @property string $global_email_header
24+
* @property string $global_email_footer
25+
* @property string $email_method
26+
* @property string|null $smtp_host
27+
* @property int|null $smtp_port
28+
* @property string|null $smtp_encryption
29+
* @property int|null $smtp_requires_auth
30+
* @property string|null $smtp_auth_mech
31+
* @property string|null $smtp_username
32+
* @property string|null $smtp_password
33+
* @property string|null $smtp_oauth
34+
* @property string $default_country
35+
* @property string $default_timezone
36+
* @property string $date_format
37+
* @property string $time_format
38+
* @property string $default_language
39+
* @property int $language_toggle
40+
* @property int $created_at
41+
* @property int $updated_at
42+
* @property BrandTranslation[] $translations
43+
*/
744
class Brand extends Model
845
{
946
/** @var array<string, string> */

src/Model/Core/BrandTranslation.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
use SupportPal\ApiClient\Model\Translation;
66

7+
/**
8+
* @property int $id
9+
* @property string $name
10+
* @property int $brand_id
11+
*/
712
class BrandTranslation extends Translation
813
{
914
/** @var array<string, string> */

src/Model/Core/IpBan.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property int $id
9+
* @property string|null $ip
10+
* @property string|null $reason
11+
* @property bool $event_user
12+
* @property bool $event_operator
13+
* @property bool $event_api
14+
* @property int $type
15+
* @property int|null $expiry
16+
* @property int $created_at
17+
* @property int $updated_at
18+
*/
719
class IpBan extends Model
820
{
921
/** @var array<string, string> */

src/Model/Core/Language.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property int $id
9+
* @property string $name
10+
* @property string $code
11+
* @property bool $enabled
12+
* @property bool $upgrade_available
13+
* @property string|null $version
14+
* @property int $created_at
15+
* @property int $updated_at
16+
* @property string $formatted_name
17+
*/
718
class Language extends Model
819
{
920
/** @var array<string, string> */

src/Model/Core/Request/CreateIpBan.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property string $ip
9+
* @property string $reason
10+
* @property int $type
11+
* @property bool $event_user
12+
* @property bool $event_operator
13+
* @property bool $event_api
14+
* @property int $expiry_time
15+
*/
716
class CreateIpBan extends Model
817
{
918
/** @var array<string, string> */

src/Model/Core/Request/CreateSpamRule.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property string $text
9+
* @property int $type
10+
* @property bool $event_message
11+
* @property bool $event_comment
12+
*/
713
class CreateSpamRule extends Model
814
{
915
/** @var array<string, string> */

src/Model/Core/Request/CreateWhitelistedIp.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property string $ip
9+
* @property string $description
10+
* @property bool $event_user
11+
* @property bool $event_operator
12+
* @property bool $event_api
13+
*/
714
class CreateWhitelistedIp extends Model
815
{
916
/** @var array<string, string> */

src/Model/Core/SpamRule.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property int $id
9+
* @property string $text
10+
* @property bool $event_message
11+
* @property bool $event_comment
12+
* @property int $type
13+
* @property int $created_at
14+
* @property int $updated_at
15+
*/
716
class SpamRule extends Model
817
{
918
/** @var array<string, string> */

src/Model/Core/Upload.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property string $hash
9+
* @property string $filename
10+
* @property string $folder
11+
* @property string $mime
12+
* @property string $size
13+
* @property string|null $token
14+
* @property string|null $session_id
15+
* @property int $created_at
16+
* @property int $updated_at
17+
*/
718
class Upload extends Model
819
{
920
/** @var array<string, string> */

src/Model/Core/WhitelistedIp.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
use SupportPal\ApiClient\Model\Model;
66

7+
/**
8+
* @property int $id
9+
* @property string|null $ip
10+
* @property string|null $description
11+
* @property bool $event_user
12+
* @property bool $event_operator
13+
* @property bool $event_api
14+
* @property int $created_at
15+
* @property int $updated_at
16+
*/
717
class WhitelistedIp extends Model
818
{
919
/** @var array<string, string> */

0 commit comments

Comments
 (0)