+17
-17
README.md
+17
-17
README.md
···
36
Schema ships with pre-generated PHP classes for all standard AT Protocol and Bluesky lexicons, providing immediate type-safe access without any generation step:
37
38
```php
39
-
use SocialDept\Schema\Generated\App\Bsky\Feed\Post;
40
-
use SocialDept\Schema\Generated\App\Bsky\Graph\Follow;
41
-
use SocialDept\Schema\Generated\Com\Atproto\Repo\StrongRef;
42
43
// Create type-safe records
44
$post = new Post(
···
60
61
Schema includes **220+ pre-generated classes** covering all standard AT Protocol and Bluesky lexicons:
62
63
-
**Record Types (`SocialDept\Schema\Generated\App\Bsky\*`)**
64
- `Feed\Post` - Social media posts
65
- `Feed\Like` - Like records
66
- `Feed\Repost` - Repost records
···
146
## Quick Example
147
148
```php
149
-
use SocialDept\Schema\Data\LexiconDocument;
150
-
use SocialDept\Schema\Validation\Validator;
151
-
use SocialDept\Schema\Parser\SchemaLoader;
152
153
// Load a schema
154
$schema = LexiconDocument::fromArray([
···
205
Choose the validation strictness that fits your use case:
206
207
```php
208
-
use SocialDept\Schema\Validation\Validator;
209
210
// STRICT - Rejects unknown fields
211
$validator->setMode(Validator::MODE_STRICT);
···
222
Upload and validate files with built-in constraints:
223
224
```php
225
-
use SocialDept\Schema\Services\BlobHandler;
226
227
$blobHandler = new BlobHandler('local');
228
···
242
Transform between raw arrays and domain objects:
243
244
```php
245
-
use SocialDept\Schema\Services\ModelMapper;
246
-
use SocialDept\Schema\Contracts\Transformer;
247
248
class Post
249
{
···
290
Work with discriminated unions using the `$type` field:
291
292
```php
293
-
use SocialDept\Schema\Services\UnionResolver;
294
295
$resolver = new UnionResolver();
296
···
312
Here's how to validate a post with an image upload:
313
314
```php
315
-
use SocialDept\Schema\Data\LexiconDocument;
316
-
use SocialDept\Schema\Validation\Validator;
317
-
use SocialDept\Schema\Services\BlobHandler;
318
319
// Load schema
320
$schema = LexiconDocument::fromArray([/* ... */]);
···
381
Add custom logic at key points in the validation lifecycle:
382
383
```php
384
-
use SocialDept\Schema\Support\ExtensionManager;
385
386
$extensions = new ExtensionManager();
387
···
398
Extend core services with custom methods:
399
400
```php
401
-
use SocialDept\Schema\Services\ModelMapper;
402
403
ModelMapper::macro('validateAndTransform', function ($type, $data, $schema) {
404
if (!$this->validator->validate($data, $schema)) {
···
36
Schema ships with pre-generated PHP classes for all standard AT Protocol and Bluesky lexicons, providing immediate type-safe access without any generation step:
37
38
```php
39
+
use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Post;
40
+
use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Follow;
41
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\StrongRef;
42
43
// Create type-safe records
44
$post = new Post(
···
60
61
Schema includes **220+ pre-generated classes** covering all standard AT Protocol and Bluesky lexicons:
62
63
+
**Record Types (`SocialDept\AtpSchema\Generated\App\Bsky\*`)**
64
- `Feed\Post` - Social media posts
65
- `Feed\Like` - Like records
66
- `Feed\Repost` - Repost records
···
146
## Quick Example
147
148
```php
149
+
use SocialDept\AtpSchema\Data\LexiconDocument;
150
+
use SocialDept\AtpSchema\Validation\Validator;
151
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
152
153
// Load a schema
154
$schema = LexiconDocument::fromArray([
···
205
Choose the validation strictness that fits your use case:
206
207
```php
208
+
use SocialDept\AtpSchema\Validation\Validator;
209
210
// STRICT - Rejects unknown fields
211
$validator->setMode(Validator::MODE_STRICT);
···
222
Upload and validate files with built-in constraints:
223
224
```php
225
+
use SocialDept\AtpSchema\Services\BlobHandler;
226
227
$blobHandler = new BlobHandler('local');
228
···
242
Transform between raw arrays and domain objects:
243
244
```php
245
+
use SocialDept\AtpSchema\Services\ModelMapper;
246
+
use SocialDept\AtpSchema\Contracts\Transformer;
247
248
class Post
249
{
···
290
Work with discriminated unions using the `$type` field:
291
292
```php
293
+
use SocialDept\AtpSchema\Services\UnionResolver;
294
295
$resolver = new UnionResolver();
296
···
312
Here's how to validate a post with an image upload:
313
314
```php
315
+
use SocialDept\AtpSchema\Data\LexiconDocument;
316
+
use SocialDept\AtpSchema\Validation\Validator;
317
+
use SocialDept\AtpSchema\Services\BlobHandler;
318
319
// Load schema
320
$schema = LexiconDocument::fromArray([/* ... */]);
···
381
Add custom logic at key points in the validation lifecycle:
382
383
```php
384
+
use SocialDept\AtpSchema\Support\ExtensionManager;
385
386
$extensions = new ExtensionManager();
387
···
398
Extend core services with custom methods:
399
400
```php
401
+
use SocialDept\AtpSchema\Services\ModelMapper;
402
403
ModelMapper::macro('validateAndTransform', function ($type, $data, $schema) {
404
if (!$this->validator->validate($data, $schema)) {
+4
-4
composer.json
+4
-4
composer.json
···
21
},
22
"autoload": {
23
"psr-4": {
24
-
"SocialDept\\Schema\\": "src/"
25
},
26
"files": [
27
"src/helpers.php"
···
29
},
30
"autoload-dev": {
31
"psr-4": {
32
-
"SocialDept\\Schema\\Tests\\": "tests/"
33
}
34
},
35
"extra": {
36
"laravel": {
37
"providers": [
38
-
"SocialDept\\Schema\\SchemaServiceProvider"
39
],
40
"aliases": {
41
-
"Schema": "SocialDept\\Schema\\Facades\\Schema"
42
}
43
}
44
}
···
21
},
22
"autoload": {
23
"psr-4": {
24
+
"SocialDept\\AtpSchema\\": "src/"
25
},
26
"files": [
27
"src/helpers.php"
···
29
},
30
"autoload-dev": {
31
"psr-4": {
32
+
"SocialDept\\AtpSchema\\Tests\\": "tests/"
33
}
34
},
35
"extra": {
36
"laravel": {
37
"providers": [
38
+
"SocialDept\\AtpSchema\\SchemaServiceProvider"
39
],
40
"aliases": {
41
+
"Schema": "SocialDept\\AtpSchema\\Facades\\Schema"
42
}
43
}
44
}
+2
-2
config/schema.php
+2
-2
config/schema.php
···
83
|--------------------------------------------------------------------------
84
|
85
| The package includes pre-generated PHP classes for all standard
86
-
| AT Protocol and Bluesky lexicons in the SocialDept\Schema\Generated
87
| namespace. These provide immediate type-safe access to records.
88
|
89
*/
90
91
'generated' => [
92
// Namespace for bundled pre-generated classes
93
-
'namespace' => 'SocialDept\\Schema\\Generated',
94
95
// Enable usage of bundled generated classes
96
'enabled' => env('SCHEMA_USE_GENERATED', true),
···
83
|--------------------------------------------------------------------------
84
|
85
| The package includes pre-generated PHP classes for all standard
86
+
| AT Protocol and Bluesky lexicons in the SocialDept\AtpSchema\Generated
87
| namespace. These provide immediate type-safe access to records.
88
|
89
*/
90
91
'generated' => [
92
// Namespace for bundled pre-generated classes
93
+
'namespace' => 'SocialDept\\AtpSchema\\Generated',
94
95
// Enable usage of bundled generated classes
96
'enabled' => env('SCHEMA_USE_GENERATED', true),
+1
-1
resources/lexicons/chat/bsky/convo/defs.json
+1
-1
resources/lexicons/chat/bsky/convo/defs.json
+1
-1
src/Console/ClearCacheCommand.php
+1
-1
src/Console/ClearCacheCommand.php
+4
-4
src/Console/GenerateCommand.php
+4
-4
src/Console/GenerateCommand.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Console;
4
5
use Illuminate\Console\Command;
6
-
use SocialDept\Schema\Generator\DTOGenerator;
7
-
use SocialDept\Schema\Parser\SchemaLoader;
8
9
class GenerateCommand extends Command
10
{
···
164
/**
165
* Extract all NSID dependencies from a schema.
166
*/
167
-
protected function extractDependencies(\SocialDept\Schema\Data\LexiconDocument $schema): array
168
{
169
$dependencies = [];
170
$currentNsid = $schema->getNsid();
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Console;
4
5
use Illuminate\Console\Command;
6
+
use SocialDept\AtpSchema\Generator\DTOGenerator;
7
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
8
9
class GenerateCommand extends Command
10
{
···
164
/**
165
* Extract all NSID dependencies from a schema.
166
*/
167
+
protected function extractDependencies(\SocialDept\AtpSchema\Data\LexiconDocument $schema): array
168
{
169
$dependencies = [];
170
$currentNsid = $schema->getNsid();
+2
-2
src/Console/ListCommand.php
+2
-2
src/Console/ListCommand.php
+3
-3
src/Console/ValidateCommand.php
+3
-3
src/Console/ValidateCommand.php
+2
-2
src/Contracts/BlobHandler.php
+2
-2
src/Contracts/BlobHandler.php
+2
-2
src/Contracts/DataGenerator.php
+2
-2
src/Contracts/DataGenerator.php
+1
-1
src/Contracts/DiscriminatedUnion.php
+1
-1
src/Contracts/DiscriminatedUnion.php
+2
-2
src/Contracts/LexiconParser.php
+2
-2
src/Contracts/LexiconParser.php
+2
-2
src/Contracts/LexiconRegistry.php
+2
-2
src/Contracts/LexiconRegistry.php
+2
-2
src/Contracts/LexiconResolver.php
+2
-2
src/Contracts/LexiconResolver.php
+2
-2
src/Contracts/LexiconValidator.php
+2
-2
src/Contracts/LexiconValidator.php
+2
-2
src/Contracts/SchemaRepository.php
+2
-2
src/Contracts/SchemaRepository.php
+1
-1
src/Contracts/Transformer.php
+1
-1
src/Contracts/Transformer.php
+1
-1
src/Contracts/TypeMapper.php
+1
-1
src/Contracts/TypeMapper.php
+7
-3
src/Data/BlobReference.php
+7
-3
src/Data/BlobReference.php
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Data;
4
5
+
use Illuminate\Contracts\Support\Arrayable;
6
+
use SocialDept\AtpSchema\Exceptions\SchemaValidationException;
7
8
+
/**
9
+
* @implements Arrayable<string, mixed>
10
+
*/
11
+
class BlobReference implements Arrayable
12
{
13
/**
14
* CID of the blob.
+3
-3
src/Data/Data.php
+3
-3
src/Data/Data.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Data;
4
5
use Illuminate\Contracts\Support\Arrayable;
6
use Illuminate\Contracts\Support\Jsonable;
7
use JsonSerializable;
8
-
use SocialDept\Schema\Contracts\DiscriminatedUnion;
9
use Stringable;
10
11
abstract class Data implements Arrayable, DiscriminatedUnion, Jsonable, JsonSerializable, Stringable
···
179
*/
180
public function validateWithErrors(): array
181
{
182
-
if (! function_exists('SocialDept\Schema\schema')) {
183
return [];
184
}
185
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Data;
4
5
use Illuminate\Contracts\Support\Arrayable;
6
use Illuminate\Contracts\Support\Jsonable;
7
use JsonSerializable;
8
+
use SocialDept\AtpSchema\Contracts\DiscriminatedUnion;
9
use Stringable;
10
11
abstract class Data implements Arrayable, DiscriminatedUnion, Jsonable, JsonSerializable, Stringable
···
179
*/
180
public function validateWithErrors(): array
181
{
182
+
if (! function_exists('SocialDept\AtpSchema\schema')) {
183
return [];
184
}
185
+3
-3
src/Data/LexiconDocument.php
+3
-3
src/Data/LexiconDocument.php
+2
-2
src/Data/TypeDefinition.php
+2
-2
src/Data/TypeDefinition.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Data;
4
5
abstract class TypeDefinition
6
{
···
38
/**
39
* Validate a value against this type definition.
40
*
41
-
* @throws \SocialDept\Schema\Exceptions\RecordValidationException
42
*/
43
abstract public function validate(mixed $value, string $path = ''): void;
44
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Data;
4
5
abstract class TypeDefinition
6
{
···
38
/**
39
* Validate a value against this type definition.
40
*
41
+
* @throws \SocialDept\AtpSchema\Exceptions\RecordValidationException
42
*/
43
abstract public function validate(mixed $value, string $path = ''): void;
44
+3
-3
src/Data/Types/ArrayType.php
+3
-3
src/Data/Types/ArrayType.php
+3
-3
src/Data/Types/BlobType.php
+3
-3
src/Data/Types/BlobType.php
+3
-3
src/Data/Types/BooleanType.php
+3
-3
src/Data/Types/BooleanType.php
+3
-3
src/Data/Types/BytesType.php
+3
-3
src/Data/Types/BytesType.php
+3
-3
src/Data/Types/CidLinkType.php
+3
-3
src/Data/Types/CidLinkType.php
+3
-3
src/Data/Types/IntegerType.php
+3
-3
src/Data/Types/IntegerType.php
+3
-3
src/Data/Types/NullType.php
+3
-3
src/Data/Types/NullType.php
+3
-3
src/Data/Types/ObjectType.php
+3
-3
src/Data/Types/ObjectType.php
+2
-2
src/Data/Types/RefType.php
+2
-2
src/Data/Types/RefType.php
+3
-3
src/Data/Types/StringType.php
+3
-3
src/Data/Types/StringType.php
+3
-3
src/Data/Types/UnionType.php
+3
-3
src/Data/Types/UnionType.php
+2
-2
src/Data/Types/UnknownType.php
+2
-2
src/Data/Types/UnknownType.php
+1
-1
src/Exceptions/BlobException.php
+1
-1
src/Exceptions/BlobException.php
+1
-1
src/Exceptions/GenerationException.php
+1
-1
src/Exceptions/GenerationException.php
+1
-1
src/Exceptions/RecordValidationException.php
+1
-1
src/Exceptions/RecordValidationException.php
+1
-1
src/Exceptions/SchemaException.php
+1
-1
src/Exceptions/SchemaException.php
+1
-1
src/Exceptions/SchemaNotFoundException.php
+1
-1
src/Exceptions/SchemaNotFoundException.php
+1
-1
src/Exceptions/SchemaParseException.php
+1
-1
src/Exceptions/SchemaParseException.php
+1
-1
src/Exceptions/SchemaValidationException.php
+1
-1
src/Exceptions/SchemaValidationException.php
+1
-1
src/Exceptions/TypeResolutionException.php
+1
-1
src/Exceptions/TypeResolutionException.php
+3
-3
src/Facades/Schema.php
+3
-3
src/Facades/Schema.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Facades;
4
5
use Illuminate\Support\Facades\Facade;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
8
/**
9
* @method static LexiconDocument load(string $nsid)
···
15
* @method static bool validate(string $nsid, array $data)
16
* @method static array validateWithErrors(string $nsid, array $data)
17
*
18
-
* @see \SocialDept\Schema\SchemaManager
19
*/
20
class Schema extends Facade
21
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Facades;
4
5
use Illuminate\Support\Facades\Facade;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
8
/**
9
* @method static LexiconDocument load(string $nsid)
···
15
* @method static bool validate(string $nsid, array $data)
16
* @method static array validateWithErrors(string $nsid, array $data)
17
*
18
+
* @see \SocialDept\AtpSchema\SchemaManager
19
*/
20
class Schema extends Facade
21
{
+2
-2
src/Generated/App/Bsky/Actor/Defs/AdultContentPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/AdultContentPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/BskyAppProgressGuide.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/BskyAppProgressGuide.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/BskyAppStatePref.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/BskyAppStatePref.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Actor\Nux;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
57
return new static(
58
activeProgressGuide: $data['activeProgressGuide'] ?? null,
59
queuedNudges: $data['queuedNudges'] ?? null,
60
-
nuxs: isset($data['nuxs']) ? array_map(fn ($item) => Defs::fromArray($item), $data['nuxs']) : []
61
);
62
}
63
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
7
/**
8
* GENERATED CODE - DO NOT EDIT
···
56
return new static(
57
activeProgressGuide: $data['activeProgressGuide'] ?? null,
58
queuedNudges: $data['queuedNudges'] ?? null,
59
+
nuxs: isset($data['nuxs']) ? array_map(fn ($item) => Nux::fromArray($item), $data['nuxs']) : []
60
);
61
}
62
+2
-2
src/Generated/App/Bsky/Actor/Defs/ContentLabelPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ContentLabelPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/FeedViewPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/FeedViewPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/HiddenPostsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/HiddenPostsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/InterestsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/InterestsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/KnownFollowers.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/KnownFollowers.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/LabelerPrefItem.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/LabelerPrefItem.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/LabelersPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/LabelersPref.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/MutedWord.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/MutedWord.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\MutedWordTarget;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
64
{
65
return new static(
66
value: $data['value'],
67
-
targets: isset($data['targets']) ? array_map(fn ($item) => Defs::fromArray($item), $data['targets']) : [],
68
id: $data['id'] ?? null,
69
actorTarget: $data['actorTarget'] ?? null,
70
expiresAt: isset($data['expiresAt']) ? Carbon::parse($data['expiresAt']) : null
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
63
{
64
return new static(
65
value: $data['value'],
66
+
targets: isset($data['targets']) ? array_map(fn ($item) => MutedWordTarget::fromArray($item), $data['targets']) : [],
67
id: $data['id'] ?? null,
68
actorTarget: $data['actorTarget'] ?? null,
69
expiresAt: isset($data['expiresAt']) ? Carbon::parse($data['expiresAt']) : null
+3
-4
src/Generated/App/Bsky/Actor/Defs/MutedWordsPref.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/MutedWordsPref.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Actor\MutedWord;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
46
public static function fromArray(array $data): static
47
{
48
return new static(
49
-
items: isset($data['items']) ? array_map(fn ($item) => Defs::fromArray($item), $data['items']) : []
50
);
51
}
52
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
7
/**
8
* GENERATED CODE - DO NOT EDIT
···
45
public static function fromArray(array $data): static
46
{
47
return new static(
48
+
items: isset($data['items']) ? array_map(fn ($item) => MutedWord::fromArray($item), $data['items']) : []
49
);
50
}
51
+2
-2
src/Generated/App/Bsky/Actor/Defs/Nux.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/Nux.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/PersonalDetailsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/PersonalDetailsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/PostInteractionSettingsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/PostInteractionSettingsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ProfileAssociated.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ProfileAssociated.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ProfileAssociatedActivitySubscription.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ProfileAssociatedActivitySubscription.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ProfileAssociatedChat.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ProfileAssociatedChat.php
+4
-4
src/Generated/App/Bsky/Actor/Defs/ProfileView.php
+4
-4
src/Generated/App/Bsky/Actor/Defs/ProfileView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
92
indexedAt: isset($data['indexedAt']) ? Carbon::parse($data['indexedAt']) : null,
93
createdAt: isset($data['createdAt']) ? Carbon::parse($data['createdAt']) : null,
94
viewer: $data['viewer'] ?? null,
95
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
96
verification: $data['verification'] ?? null,
97
status: $data['status'] ?? null,
98
debug: $data['debug'] ?? null
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
92
indexedAt: isset($data['indexedAt']) ? Carbon::parse($data['indexedAt']) : null,
93
createdAt: isset($data['createdAt']) ? Carbon::parse($data['createdAt']) : null,
94
viewer: $data['viewer'] ?? null,
95
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
96
verification: $data['verification'] ?? null,
97
status: $data['status'] ?? null,
98
debug: $data['debug'] ?? null
+4
-4
src/Generated/App/Bsky/Actor/Defs/ProfileViewBasic.php
+4
-4
src/Generated/App/Bsky/Actor/Defs/ProfileViewBasic.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
82
avatar: $data['avatar'] ?? null,
83
associated: $data['associated'] ?? null,
84
viewer: $data['viewer'] ?? null,
85
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
86
createdAt: isset($data['createdAt']) ? Carbon::parse($data['createdAt']) : null,
87
verification: $data['verification'] ?? null,
88
status: $data['status'] ?? null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
82
avatar: $data['avatar'] ?? null,
83
associated: $data['associated'] ?? null,
84
viewer: $data['viewer'] ?? null,
85
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
86
createdAt: isset($data['createdAt']) ? Carbon::parse($data['createdAt']) : null,
87
verification: $data['verification'] ?? null,
88
status: $data['status'] ?? null,
+7
-7
src/Generated/App/Bsky/Actor/Defs/ProfileViewDetailed.php
+7
-7
src/Generated/App/Bsky/Actor/Defs/ProfileViewDetailed.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Graph\StarterPackViewBasic;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
-
use SocialDept\Schema\Generated\Com\Atproto\Repo\StrongRef;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
112
followsCount: $data['followsCount'] ?? null,
113
postsCount: $data['postsCount'] ?? null,
114
associated: $data['associated'] ?? null,
115
-
joinedViaStarterPack: isset($data['joinedViaStarterPack']) ? Defs::fromArray($data['joinedViaStarterPack']) : null,
116
indexedAt: isset($data['indexedAt']) ? Carbon::parse($data['indexedAt']) : null,
117
createdAt: isset($data['createdAt']) ? Carbon::parse($data['createdAt']) : null,
118
viewer: $data['viewer'] ?? null,
119
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
120
pinnedPost: isset($data['pinnedPost']) ? StrongRef::fromArray($data['pinnedPost']) : null,
121
verification: $data['verification'] ?? null,
122
status: $data['status'] ?? null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\StarterPackViewBasic;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\StrongRef;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
112
followsCount: $data['followsCount'] ?? null,
113
postsCount: $data['postsCount'] ?? null,
114
associated: $data['associated'] ?? null,
115
+
joinedViaStarterPack: isset($data['joinedViaStarterPack']) ? StarterPackViewBasic::fromArray($data['joinedViaStarterPack']) : null,
116
indexedAt: isset($data['indexedAt']) ? Carbon::parse($data['indexedAt']) : null,
117
createdAt: isset($data['createdAt']) ? Carbon::parse($data['createdAt']) : null,
118
viewer: $data['viewer'] ?? null,
119
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
120
pinnedPost: isset($data['pinnedPost']) ? StrongRef::fromArray($data['pinnedPost']) : null,
121
verification: $data['verification'] ?? null,
122
status: $data['status'] ?? null,
+2
-2
src/Generated/App/Bsky/Actor/Defs/SavedFeed.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/SavedFeed.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/SavedFeedsPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/SavedFeedsPref.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/SavedFeedsPrefV2.php
+3
-4
src/Generated/App/Bsky/Actor/Defs/SavedFeedsPrefV2.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Actor\SavedFeed;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
43
public static function fromArray(array $data): static
44
{
45
return new static(
46
-
items: isset($data['items']) ? array_map(fn ($item) => Defs::fromArray($item), $data['items']) : []
47
);
48
}
49
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
7
/**
8
* GENERATED CODE - DO NOT EDIT
···
42
public static function fromArray(array $data): static
43
{
44
return new static(
45
+
items: isset($data['items']) ? array_map(fn ($item) => SavedFeed::fromArray($item), $data['items']) : []
46
);
47
}
48
+3
-3
src/Generated/App/Bsky/Actor/Defs/StatusView.php
+3
-3
src/Generated/App/Bsky/Actor/Defs/StatusView.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ThreadViewPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/ThreadViewPref.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/VerificationPrefs.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/VerificationPrefs.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/VerificationState.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/VerificationState.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/VerificationView.php
+2
-2
src/Generated/App/Bsky/Actor/Defs/VerificationView.php
+7
-7
src/Generated/App/Bsky/Actor/Defs/ViewerState.php
+7
-7
src/Generated/App/Bsky/Actor/Defs/ViewerState.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Actor\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Graph\ListViewBasic;
7
-
use SocialDept\Schema\Generated\App\Bsky\Notification\ActivitySubscription;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
70
{
71
return new static(
72
muted: $data['muted'] ?? null,
73
-
mutedByList: isset($data['mutedByList']) ? Defs::fromArray($data['mutedByList']) : null,
74
blockedBy: $data['blockedBy'] ?? null,
75
blocking: $data['blocking'] ?? null,
76
-
blockingByList: isset($data['blockingByList']) ? Defs::fromArray($data['blockingByList']) : null,
77
following: $data['following'] ?? null,
78
followedBy: $data['followedBy'] ?? null,
79
knownFollowers: $data['knownFollowers'] ?? null,
80
-
activitySubscription: isset($data['activitySubscription']) ? Defs::fromArray($data['activitySubscription']) : null
81
);
82
}
83
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\ListViewBasic;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Notification\Defs\ActivitySubscription;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
70
{
71
return new static(
72
muted: $data['muted'] ?? null,
73
+
mutedByList: isset($data['mutedByList']) ? ListViewBasic::fromArray($data['mutedByList']) : null,
74
blockedBy: $data['blockedBy'] ?? null,
75
blocking: $data['blocking'] ?? null,
76
+
blockingByList: isset($data['blockingByList']) ? ListViewBasic::fromArray($data['blockingByList']) : null,
77
following: $data['following'] ?? null,
78
followedBy: $data['followedBy'] ?? null,
79
knownFollowers: $data['knownFollowers'] ?? null,
80
+
activitySubscription: isset($data['activitySubscription']) ? ActivitySubscription::fromArray($data['activitySubscription']) : null
81
);
82
}
83
+1
-1
src/Generated/App/Bsky/Actor/MutedWordTarget.php
+1
-1
src/Generated/App/Bsky/Actor/MutedWordTarget.php
+2
-2
src/Generated/App/Bsky/Embed/Defs/AspectRatio.php
+2
-2
src/Generated/App/Bsky/Embed/Defs/AspectRatio.php
+3
-3
src/Generated/App/Bsky/Embed/External/External.php
+3
-3
src/Generated/App/Bsky/Embed/External/External.php
+2
-2
src/Generated/App/Bsky/Embed/External/View.php
+2
-2
src/Generated/App/Bsky/Embed/External/View.php
+2
-2
src/Generated/App/Bsky/Embed/External/ViewExternal.php
+2
-2
src/Generated/App/Bsky/Embed/External/ViewExternal.php
+2
-2
src/Generated/App/Bsky/Embed/External.php
+2
-2
src/Generated/App/Bsky/Embed/External.php
+5
-5
src/Generated/App/Bsky/Embed/Images/Image.php
+5
-5
src/Generated/App/Bsky/Embed/Images/Image.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed\Images;
4
5
-
use SocialDept\Schema\Data\BlobReference;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Embed\AspectRatio;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
53
return new static(
54
image: $data['image'],
55
alt: $data['alt'],
56
-
aspectRatio: isset($data['aspectRatio']) ? Defs::fromArray($data['aspectRatio']) : null
57
);
58
}
59
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\Images;
4
5
+
use SocialDept\AtpSchema\Data\BlobReference;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Embed\Defs\AspectRatio;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
53
return new static(
54
image: $data['image'],
55
alt: $data['alt'],
56
+
aspectRatio: isset($data['aspectRatio']) ? AspectRatio::fromArray($data['aspectRatio']) : null
57
);
58
}
59
+2
-2
src/Generated/App/Bsky/Embed/Images/View.php
+2
-2
src/Generated/App/Bsky/Embed/Images/View.php
+4
-4
src/Generated/App/Bsky/Embed/Images/ViewImage.php
+4
-4
src/Generated/App/Bsky/Embed/Images/ViewImage.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed\Images;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Embed\AspectRatio;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
59
thumb: $data['thumb'],
60
fullsize: $data['fullsize'],
61
alt: $data['alt'],
62
-
aspectRatio: isset($data['aspectRatio']) ? Defs::fromArray($data['aspectRatio']) : null
63
);
64
}
65
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\Images;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Embed\Defs\AspectRatio;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
59
thumb: $data['thumb'],
60
fullsize: $data['fullsize'],
61
alt: $data['alt'],
62
+
aspectRatio: isset($data['aspectRatio']) ? AspectRatio::fromArray($data['aspectRatio']) : null
63
);
64
}
65
+2
-2
src/Generated/App/Bsky/Embed/Images.php
+2
-2
src/Generated/App/Bsky/Embed/Images.php
+3
-3
src/Generated/App/Bsky/Embed/Record/View.php
+3
-3
src/Generated/App/Bsky/Embed/Record/View.php
+4
-4
src/Generated/App/Bsky/Embed/Record/ViewBlocked.php
+4
-4
src/Generated/App/Bsky/Embed/Record/ViewBlocked.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed\Record;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Feed\BlockedAuthor;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
51
return new static(
52
uri: $data['uri'],
53
blocked: $data['blocked'],
54
-
author: Defs::fromArray($data['author'])
55
);
56
}
57
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\Record;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\BlockedAuthor;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
51
return new static(
52
uri: $data['uri'],
53
blocked: $data['blocked'],
54
+
author: BlockedAuthor::fromArray($data['author'])
55
);
56
}
57
+2
-2
src/Generated/App/Bsky/Embed/Record/ViewDetached.php
+2
-2
src/Generated/App/Bsky/Embed/Record/ViewDetached.php
+2
-2
src/Generated/App/Bsky/Embed/Record/ViewNotFound.php
+2
-2
src/Generated/App/Bsky/Embed/Record/ViewNotFound.php
+6
-6
src/Generated/App/Bsky/Embed/Record/ViewRecord.php
+6
-6
src/Generated/App/Bsky/Embed/Record/ViewRecord.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed\Record;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
73
return new static(
74
uri: $data['uri'],
75
cid: $data['cid'],
76
-
author: Defs::fromArray($data['author']),
77
value: $data['value'],
78
indexedAt: Carbon::parse($data['indexedAt']),
79
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
80
replyCount: $data['replyCount'] ?? null,
81
repostCount: $data['repostCount'] ?? null,
82
likeCount: $data['likeCount'] ?? null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\Record;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
73
return new static(
74
uri: $data['uri'],
75
cid: $data['cid'],
76
+
author: ProfileViewBasic::fromArray($data['author']),
77
value: $data['value'],
78
indexedAt: Carbon::parse($data['indexedAt']),
79
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
80
replyCount: $data['replyCount'] ?? null,
81
repostCount: $data['repostCount'] ?? null,
82
likeCount: $data['likeCount'] ?? null,
+3
-3
src/Generated/App/Bsky/Embed/Record.php
+3
-3
src/Generated/App/Bsky/Embed/Record.php
+5
-5
src/Generated/App/Bsky/Embed/RecordWithMedia/View.php
+5
-5
src/Generated/App/Bsky/Embed/RecordWithMedia/View.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed\RecordWithMedia;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Embed\View;
7
-
use SocialDept\Schema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
46
public static function fromArray(array $data): static
47
{
48
return new static(
49
-
record: Record::fromArray($data['record']),
50
media: UnionHelper::validateOpenUnion($data['media'])
51
);
52
}
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\RecordWithMedia;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Embed\Record\View;
7
+
use SocialDept\AtpSchema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
46
public static function fromArray(array $data): static
47
{
48
return new static(
49
+
record: View::fromArray($data['record']),
50
media: UnionHelper::validateOpenUnion($data['media'])
51
);
52
}
+3
-3
src/Generated/App/Bsky/Embed/RecordWithMedia.php
+3
-3
src/Generated/App/Bsky/Embed/RecordWithMedia.php
+3
-3
src/Generated/App/Bsky/Embed/Video/Caption.php
+3
-3
src/Generated/App/Bsky/Embed/Video/Caption.php
+4
-4
src/Generated/App/Bsky/Embed/Video/View.php
+4
-4
src/Generated/App/Bsky/Embed/Video/View.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed\Video;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Embed\AspectRatio;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
60
playlist: $data['playlist'],
61
thumbnail: $data['thumbnail'] ?? null,
62
alt: $data['alt'] ?? null,
63
-
aspectRatio: isset($data['aspectRatio']) ? Defs::fromArray($data['aspectRatio']) : null
64
);
65
}
66
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed\Video;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Embed\Defs\AspectRatio;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
60
playlist: $data['playlist'],
61
thumbnail: $data['thumbnail'] ?? null,
62
alt: $data['alt'] ?? null,
63
+
aspectRatio: isset($data['aspectRatio']) ? AspectRatio::fromArray($data['aspectRatio']) : null
64
);
65
}
66
+5
-4
src/Generated/App/Bsky/Embed/Video.php
+5
-4
src/Generated/App/Bsky/Embed/Video.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Embed;
4
5
-
use SocialDept\Schema\Data\BlobReference;
6
-
use SocialDept\Schema\Data\Data;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
61
video: $data['video'],
62
captions: $data['captions'] ?? [],
63
alt: $data['alt'] ?? null,
64
-
aspectRatio: isset($data['aspectRatio']) ? Defs::fromArray($data['aspectRatio']) : null
65
);
66
}
67
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Embed;
4
5
+
use SocialDept\AtpSchema\Data\BlobReference;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Embed\Defs\AspectRatio;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
62
video: $data['video'],
63
captions: $data['captions'] ?? [],
64
alt: $data['alt'] ?? null,
65
+
aspectRatio: isset($data['aspectRatio']) ? AspectRatio::fromArray($data['aspectRatio']) : null
66
);
67
}
68
+4
-4
src/Generated/App/Bsky/Feed/Defs/BlockedAuthor.php
+4
-4
src/Generated/App/Bsky/Feed/Defs/BlockedAuthor.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ViewerState;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
47
{
48
return new static(
49
did: $data['did'],
50
-
viewer: isset($data['viewer']) ? Defs::fromArray($data['viewer']) : null
51
);
52
}
53
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ViewerState;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
47
{
48
return new static(
49
did: $data['did'],
50
+
viewer: isset($data['viewer']) ? ViewerState::fromArray($data['viewer']) : null
51
);
52
}
53
+2
-2
src/Generated/App/Bsky/Feed/Defs/BlockedPost.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/BlockedPost.php
+3
-3
src/Generated/App/Bsky/Feed/Defs/FeedViewPost.php
+3
-3
src/Generated/App/Bsky/Feed/Defs/FeedViewPost.php
+7
-7
src/Generated/App/Bsky/Feed/Defs/GeneratorView.php
+7
-7
src/Generated/App/Bsky/Feed/Defs/GeneratorView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
8
-
use SocialDept\Schema\Generated\App\Bsky\Richtext\Facet;
9
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
83
uri: $data['uri'],
84
cid: $data['cid'],
85
did: $data['did'],
86
-
creator: Defs::fromArray($data['creator']),
87
displayName: $data['displayName'],
88
indexedAt: Carbon::parse($data['indexedAt']),
89
description: $data['description'] ?? null,
···
91
avatar: $data['avatar'] ?? null,
92
likeCount: $data['likeCount'] ?? null,
93
acceptsInteractions: $data['acceptsInteractions'] ?? null,
94
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
95
viewer: $data['viewer'] ?? null,
96
contentMode: $data['contentMode'] ?? null
97
);
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
8
+
use SocialDept\AtpSchema\Generated\App\Bsky\Richtext\Facet;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
83
uri: $data['uri'],
84
cid: $data['cid'],
85
did: $data['did'],
86
+
creator: ProfileView::fromArray($data['creator']),
87
displayName: $data['displayName'],
88
indexedAt: Carbon::parse($data['indexedAt']),
89
description: $data['description'] ?? null,
···
91
avatar: $data['avatar'] ?? null,
92
likeCount: $data['likeCount'] ?? null,
93
acceptsInteractions: $data['acceptsInteractions'] ?? null,
94
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
95
viewer: $data['viewer'] ?? null,
96
contentMode: $data['contentMode'] ?? null
97
);
+2
-2
src/Generated/App/Bsky/Feed/Defs/GeneratorViewerState.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/GeneratorViewerState.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/Interaction.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/Interaction.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/NotFoundPost.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/NotFoundPost.php
+7
-7
src/Generated/App/Bsky/Feed/Defs/PostView.php
+7
-7
src/Generated/App/Bsky/Feed/Defs/PostView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
-
use SocialDept\Schema\Support\UnionHelper;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
82
return new static(
83
uri: $data['uri'],
84
cid: $data['cid'],
85
-
author: Defs::fromArray($data['author']),
86
record: $data['record'],
87
indexedAt: Carbon::parse($data['indexedAt']),
88
embed: isset($data['embed']) ? UnionHelper::validateOpenUnion($data['embed']) : null,
···
92
likeCount: $data['likeCount'] ?? null,
93
quoteCount: $data['quoteCount'] ?? null,
94
viewer: $data['viewer'] ?? null,
95
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
96
threadgate: $data['threadgate'] ?? null,
97
debug: $data['debug'] ?? null
98
);
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
+
use SocialDept\AtpSchema\Support\UnionHelper;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
82
return new static(
83
uri: $data['uri'],
84
cid: $data['cid'],
85
+
author: ProfileViewBasic::fromArray($data['author']),
86
record: $data['record'],
87
indexedAt: Carbon::parse($data['indexedAt']),
88
embed: isset($data['embed']) ? UnionHelper::validateOpenUnion($data['embed']) : null,
···
92
likeCount: $data['likeCount'] ?? null,
93
quoteCount: $data['quoteCount'] ?? null,
94
viewer: $data['viewer'] ?? null,
95
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
96
threadgate: $data['threadgate'] ?? null,
97
debug: $data['debug'] ?? null
98
);
+2
-2
src/Generated/App/Bsky/Feed/Defs/ReasonPin.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/ReasonPin.php
+4
-4
src/Generated/App/Bsky/Feed/Defs/ReasonRepost.php
+4
-4
src/Generated/App/Bsky/Feed/Defs/ReasonRepost.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
53
public static function fromArray(array $data): static
54
{
55
return new static(
56
-
by: Defs::fromArray($data['by']),
57
indexedAt: Carbon::parse($data['indexedAt']),
58
uri: $data['uri'] ?? null,
59
cid: $data['cid'] ?? null
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
53
public static function fromArray(array $data): static
54
{
55
return new static(
56
+
by: ProfileViewBasic::fromArray($data['by']),
57
indexedAt: Carbon::parse($data['indexedAt']),
58
uri: $data['uri'] ?? null,
59
cid: $data['cid'] ?? null
+5
-5
src/Generated/App/Bsky/Feed/Defs/ReplyRef.php
+5
-5
src/Generated/App/Bsky/Feed/Defs/ReplyRef.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
7
-
use SocialDept\Schema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
53
return new static(
54
root: UnionHelper::validateOpenUnion($data['root']),
55
parent: UnionHelper::validateOpenUnion($data['parent']),
56
-
grandparentAuthor: isset($data['grandparentAuthor']) ? Defs::fromArray($data['grandparentAuthor']) : null
57
);
58
}
59
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
7
+
use SocialDept\AtpSchema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
53
return new static(
54
root: UnionHelper::validateOpenUnion($data['root']),
55
parent: UnionHelper::validateOpenUnion($data['parent']),
56
+
grandparentAuthor: isset($data['grandparentAuthor']) ? ProfileViewBasic::fromArray($data['grandparentAuthor']) : null
57
);
58
}
59
+3
-3
src/Generated/App/Bsky/Feed/Defs/SkeletonFeedPost.php
+3
-3
src/Generated/App/Bsky/Feed/Defs/SkeletonFeedPost.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/SkeletonReasonPin.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/SkeletonReasonPin.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/SkeletonReasonRepost.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/SkeletonReasonRepost.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/ThreadContext.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/ThreadContext.php
+3
-3
src/Generated/App/Bsky/Feed/Defs/ThreadViewPost.php
+3
-3
src/Generated/App/Bsky/Feed/Defs/ThreadViewPost.php
+4
-4
src/Generated/App/Bsky/Feed/Defs/ThreadgateView.php
+4
-4
src/Generated/App/Bsky/Feed/Defs/ThreadgateView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Graph\ListViewBasic;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
53
uri: $data['uri'] ?? null,
54
cid: $data['cid'] ?? null,
55
record: $data['record'] ?? null,
56
-
lists: isset($data['lists']) ? array_map(fn ($item) => Defs::fromArray($item), $data['lists']) : []
57
);
58
}
59
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\ListViewBasic;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
53
uri: $data['uri'] ?? null,
54
cid: $data['cid'] ?? null,
55
record: $data['record'] ?? null,
56
+
lists: isset($data['lists']) ? array_map(fn ($item) => ListViewBasic::fromArray($item), $data['lists']) : []
57
);
58
}
59
+2
-2
src/Generated/App/Bsky/Feed/Defs/ViewerState.php
+2
-2
src/Generated/App/Bsky/Feed/Defs/ViewerState.php
+4
-4
src/Generated/App/Bsky/Feed/GetLikes/Like.php
+4
-4
src/Generated/App/Bsky/Feed/GetLikes/Like.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Feed\GetLikes;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
52
return new static(
53
indexedAt: Carbon::parse($data['indexedAt']),
54
createdAt: Carbon::parse($data['createdAt']),
55
-
actor: Defs::fromArray($data['actor'])
56
);
57
}
58
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Feed\GetLikes;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
52
return new static(
53
indexedAt: Carbon::parse($data['indexedAt']),
54
createdAt: Carbon::parse($data['createdAt']),
55
+
actor: ProfileView::fromArray($data['actor'])
56
);
57
}
58
+3
-3
src/Generated/App/Bsky/Feed/Like.php
+3
-3
src/Generated/App/Bsky/Feed/Like.php
+2
-2
src/Generated/App/Bsky/Feed/Post/Entity.php
+2
-2
src/Generated/App/Bsky/Feed/Post/Entity.php
+3
-3
src/Generated/App/Bsky/Feed/Post/ReplyRef.php
+3
-3
src/Generated/App/Bsky/Feed/Post/ReplyRef.php
+2
-2
src/Generated/App/Bsky/Feed/Post/TextSlice.php
+2
-2
src/Generated/App/Bsky/Feed/Post/TextSlice.php
+4
-4
src/Generated/App/Bsky/Feed/Post.php
+4
-4
src/Generated/App/Bsky/Feed/Post.php
+3
-3
src/Generated/App/Bsky/Feed/Repost.php
+3
-3
src/Generated/App/Bsky/Feed/Repost.php
+2
-2
src/Generated/App/Bsky/Graph/Block.php
+2
-2
src/Generated/App/Bsky/Graph/Block.php
+4
-4
src/Generated/App/Bsky/Graph/Defs/ListItemView.php
+4
-4
src/Generated/App/Bsky/Graph/Defs/ListItemView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Graph\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
47
{
48
return new static(
49
uri: $data['uri'],
50
-
subject: Defs::fromArray($data['subject'])
51
);
52
}
53
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
47
{
48
return new static(
49
uri: $data['uri'],
50
+
subject: ProfileView::fromArray($data['subject'])
51
);
52
}
53
+7
-7
src/Generated/App/Bsky/Graph/Defs/ListView.php
+7
-7
src/Generated/App/Bsky/Graph/Defs/ListView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
8
-
use SocialDept\Schema\Generated\App\Bsky\Richtext\Facet;
9
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
79
return new static(
80
uri: $data['uri'],
81
cid: $data['cid'],
82
-
creator: Defs::fromArray($data['creator']),
83
name: $data['name'],
84
purpose: $data['purpose'],
85
indexedAt: Carbon::parse($data['indexedAt']),
···
87
descriptionFacets: isset($data['descriptionFacets']) ? array_map(fn ($item) => Facet::fromArray($item), $data['descriptionFacets']) : [],
88
avatar: $data['avatar'] ?? null,
89
listItemCount: $data['listItemCount'] ?? null,
90
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
91
viewer: $data['viewer'] ?? null
92
);
93
}
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
8
+
use SocialDept\AtpSchema\Generated\App\Bsky\Richtext\Facet;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
79
return new static(
80
uri: $data['uri'],
81
cid: $data['cid'],
82
+
creator: ProfileView::fromArray($data['creator']),
83
name: $data['name'],
84
purpose: $data['purpose'],
85
indexedAt: Carbon::parse($data['indexedAt']),
···
87
descriptionFacets: isset($data['descriptionFacets']) ? array_map(fn ($item) => Facet::fromArray($item), $data['descriptionFacets']) : [],
88
avatar: $data['avatar'] ?? null,
89
listItemCount: $data['listItemCount'] ?? null,
90
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
91
viewer: $data['viewer'] ?? null
92
);
93
}
+4
-4
src/Generated/App/Bsky/Graph/Defs/ListViewBasic.php
+4
-4
src/Generated/App/Bsky/Graph/Defs/ListViewBasic.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
73
purpose: $data['purpose'],
74
avatar: $data['avatar'] ?? null,
75
listItemCount: $data['listItemCount'] ?? null,
76
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
77
viewer: $data['viewer'] ?? null,
78
indexedAt: isset($data['indexedAt']) ? Carbon::parse($data['indexedAt']) : null
79
);
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
73
purpose: $data['purpose'],
74
avatar: $data['avatar'] ?? null,
75
listItemCount: $data['listItemCount'] ?? null,
76
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
77
viewer: $data['viewer'] ?? null,
78
indexedAt: isset($data['indexedAt']) ? Carbon::parse($data['indexedAt']) : null
79
);
+2
-2
src/Generated/App/Bsky/Graph/Defs/ListViewerState.php
+2
-2
src/Generated/App/Bsky/Graph/Defs/ListViewerState.php
+2
-2
src/Generated/App/Bsky/Graph/Defs/NotFoundActor.php
+2
-2
src/Generated/App/Bsky/Graph/Defs/NotFoundActor.php
+2
-2
src/Generated/App/Bsky/Graph/Defs/Relationship.php
+2
-2
src/Generated/App/Bsky/Graph/Defs/Relationship.php
+8
-8
src/Generated/App/Bsky/Graph/Defs/StarterPackView.php
+8
-8
src/Generated/App/Bsky/Graph/Defs/StarterPackView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
8
-
use SocialDept\Schema\Generated\App\Bsky\Feed\GeneratorView;
9
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
76
uri: $data['uri'],
77
cid: $data['cid'],
78
record: $data['record'],
79
-
creator: Defs::fromArray($data['creator']),
80
indexedAt: Carbon::parse($data['indexedAt']),
81
list: $data['list'] ?? null,
82
listItemsSample: $data['listItemsSample'] ?? [],
83
-
feeds: isset($data['feeds']) ? array_map(fn ($item) => Defs::fromArray($item), $data['feeds']) : [],
84
joinedWeekCount: $data['joinedWeekCount'] ?? null,
85
joinedAllTimeCount: $data['joinedAllTimeCount'] ?? null,
86
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : []
87
);
88
}
89
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
8
+
use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\GeneratorView;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
76
uri: $data['uri'],
77
cid: $data['cid'],
78
record: $data['record'],
79
+
creator: ProfileViewBasic::fromArray($data['creator']),
80
indexedAt: Carbon::parse($data['indexedAt']),
81
list: $data['list'] ?? null,
82
listItemsSample: $data['listItemsSample'] ?? [],
83
+
feeds: isset($data['feeds']) ? array_map(fn ($item) => GeneratorView::fromArray($item), $data['feeds']) : [],
84
joinedWeekCount: $data['joinedWeekCount'] ?? null,
85
joinedAllTimeCount: $data['joinedAllTimeCount'] ?? null,
86
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : []
87
);
88
}
89
+6
-6
src/Generated/App/Bsky/Graph/Defs/StarterPackViewBasic.php
+6
-6
src/Generated/App/Bsky/Graph/Defs/StarterPackViewBasic.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
70
uri: $data['uri'],
71
cid: $data['cid'],
72
record: $data['record'],
73
-
creator: Defs::fromArray($data['creator']),
74
indexedAt: Carbon::parse($data['indexedAt']),
75
listItemCount: $data['listItemCount'] ?? null,
76
joinedWeekCount: $data['joinedWeekCount'] ?? null,
77
joinedAllTimeCount: $data['joinedAllTimeCount'] ?? null,
78
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : []
79
);
80
}
81
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
70
uri: $data['uri'],
71
cid: $data['cid'],
72
record: $data['record'],
73
+
creator: ProfileViewBasic::fromArray($data['creator']),
74
indexedAt: Carbon::parse($data['indexedAt']),
75
listItemCount: $data['listItemCount'] ?? null,
76
joinedWeekCount: $data['joinedWeekCount'] ?? null,
77
joinedAllTimeCount: $data['joinedAllTimeCount'] ?? null,
78
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : []
79
);
80
}
81
+3
-3
src/Generated/App/Bsky/Graph/Follow.php
+3
-3
src/Generated/App/Bsky/Graph/Follow.php
+1
-1
src/Generated/App/Bsky/Graph/ListPurpose.php
+1
-1
src/Generated/App/Bsky/Graph/ListPurpose.php
+7
-6
src/Generated/App/Bsky/Graph/ListRecord.php
+7
-6
src/Generated/App/Bsky/Graph/ListRecord.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Graph;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\BlobReference;
7
-
use SocialDept\Schema\Data\Data;
8
-
use SocialDept\Schema\Generated\App\Bsky\Richtext\Facet;
9
-
use SocialDept\Schema\Support\UnionHelper;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
51
public static function fromArray(array $data): static
52
{
53
return new static(
54
-
purpose: Defs::fromArray($data['purpose']),
55
name: $data['name'],
56
createdAt: Carbon::parse($data['createdAt']),
57
description: $data['description'] ?? null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Graph;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\BlobReference;
7
+
use SocialDept\AtpSchema\Data\Data;
8
+
use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Defs\ListPurpose;
9
+
use SocialDept\AtpSchema\Generated\App\Bsky\Richtext\Facet;
10
+
use SocialDept\AtpSchema\Support\UnionHelper;
11
12
/**
13
* GENERATED CODE - DO NOT EDIT
···
52
public static function fromArray(array $data): static
53
{
54
return new static(
55
+
purpose: ListPurpose::fromArray($data['purpose']),
56
name: $data['name'],
57
createdAt: Carbon::parse($data['createdAt']),
58
description: $data['description'] ?? null,
+2
-2
src/Generated/App/Bsky/Graph/Listitem.php
+2
-2
src/Generated/App/Bsky/Graph/Listitem.php
+6
-6
src/Generated/App/Bsky/Labeler/Defs/LabelerPolicies.php
+6
-6
src/Generated/App/Bsky/Labeler/Defs/LabelerPolicies.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Labeler\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\Com\Atproto\Label\LabelValue;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Label\LabelValueDefinition;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
50
public static function fromArray(array $data): static
51
{
52
return new static(
53
-
labelValues: isset($data['labelValues']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labelValues']) : [],
54
-
labelValueDefinitions: isset($data['labelValueDefinitions']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labelValueDefinitions']) : []
55
);
56
}
57
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Labeler\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\LabelValue;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\LabelValueDefinition;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
50
public static function fromArray(array $data): static
51
{
52
return new static(
53
+
labelValues: isset($data['labelValues']) ? array_map(fn ($item) => LabelValue::fromArray($item), $data['labelValues']) : [],
54
+
labelValueDefinitions: isset($data['labelValueDefinitions']) ? array_map(fn ($item) => LabelValueDefinition::fromArray($item), $data['labelValueDefinitions']) : []
55
);
56
}
57
+6
-6
src/Generated/App/Bsky/Labeler/Defs/LabelerView.php
+6
-6
src/Generated/App/Bsky/Labeler/Defs/LabelerView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Labeler\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
63
return new static(
64
uri: $data['uri'],
65
cid: $data['cid'],
66
-
creator: Defs::fromArray($data['creator']),
67
indexedAt: Carbon::parse($data['indexedAt']),
68
likeCount: $data['likeCount'] ?? null,
69
viewer: $data['viewer'] ?? null,
70
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : []
71
);
72
}
73
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Labeler\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
63
return new static(
64
uri: $data['uri'],
65
cid: $data['cid'],
66
+
creator: ProfileView::fromArray($data['creator']),
67
indexedAt: Carbon::parse($data['indexedAt']),
68
likeCount: $data['likeCount'] ?? null,
69
viewer: $data['viewer'] ?? null,
70
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : []
71
);
72
}
73
+11
-12
src/Generated/App/Bsky/Labeler/Defs/LabelerViewDetailed.php
+11
-12
src/Generated/App/Bsky/Labeler/Defs/LabelerViewDetailed.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Labeler\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
8
-
use SocialDept\Schema\Generated\App\Bsky\Labeler\LabelerPolicies;
9
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
10
-
use SocialDept\Schema\Generated\Com\Atproto\Moderation\ReasonType;
11
-
use SocialDept\Schema\Generated\Com\Atproto\Moderation\SubjectType;
12
13
/**
14
* GENERATED CODE - DO NOT EDIT
···
79
return new static(
80
uri: $data['uri'],
81
cid: $data['cid'],
82
-
creator: Defs::fromArray($data['creator']),
83
-
policies: Defs::fromArray($data['policies']),
84
indexedAt: Carbon::parse($data['indexedAt']),
85
likeCount: $data['likeCount'] ?? null,
86
viewer: $data['viewer'] ?? null,
87
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
88
-
reasonTypes: isset($data['reasonTypes']) ? array_map(fn ($item) => Defs::fromArray($item), $data['reasonTypes']) : [],
89
-
subjectTypes: isset($data['subjectTypes']) ? array_map(fn ($item) => Defs::fromArray($item), $data['subjectTypes']) : [],
90
subjectCollections: $data['subjectCollections'] ?? null
91
);
92
}
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Labeler\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\Defs\ReasonType;
10
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\Defs\SubjectType;
11
12
/**
13
* GENERATED CODE - DO NOT EDIT
···
78
return new static(
79
uri: $data['uri'],
80
cid: $data['cid'],
81
+
creator: ProfileView::fromArray($data['creator']),
82
+
policies: LabelerPolicies::fromArray($data['policies']),
83
indexedAt: Carbon::parse($data['indexedAt']),
84
likeCount: $data['likeCount'] ?? null,
85
viewer: $data['viewer'] ?? null,
86
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
87
+
reasonTypes: isset($data['reasonTypes']) ? array_map(fn ($item) => ReasonType::fromArray($item), $data['reasonTypes']) : [],
88
+
subjectTypes: isset($data['subjectTypes']) ? array_map(fn ($item) => SubjectType::fromArray($item), $data['subjectTypes']) : [],
89
subjectCollections: $data['subjectCollections'] ?? null
90
);
91
}
+2
-2
src/Generated/App/Bsky/Labeler/Defs/LabelerViewerState.php
+2
-2
src/Generated/App/Bsky/Labeler/Defs/LabelerViewerState.php
+9
-8
src/Generated/App/Bsky/Labeler/Service.php
+9
-8
src/Generated/App/Bsky/Labeler/Service.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Labeler;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Moderation\ReasonType;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Moderation\SubjectType;
9
-
use SocialDept\Schema\Support\UnionHelper;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
51
public static function fromArray(array $data): static
52
{
53
return new static(
54
-
policies: Defs::fromArray($data['policies']),
55
createdAt: Carbon::parse($data['createdAt']),
56
labels: isset($data['labels']) ? UnionHelper::validateOpenUnion($data['labels']) : null,
57
-
reasonTypes: isset($data['reasonTypes']) ? array_map(fn ($item) => Defs::fromArray($item), $data['reasonTypes']) : [],
58
-
subjectTypes: isset($data['subjectTypes']) ? array_map(fn ($item) => Defs::fromArray($item), $data['subjectTypes']) : [],
59
subjectCollections: $data['subjectCollections'] ?? null
60
);
61
}
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Labeler;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Labeler\Defs\LabelerPolicies;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\Defs\ReasonType;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\Defs\SubjectType;
10
+
use SocialDept\AtpSchema\Support\UnionHelper;
11
12
/**
13
* GENERATED CODE - DO NOT EDIT
···
52
public static function fromArray(array $data): static
53
{
54
return new static(
55
+
policies: LabelerPolicies::fromArray($data['policies']),
56
createdAt: Carbon::parse($data['createdAt']),
57
labels: isset($data['labels']) ? UnionHelper::validateOpenUnion($data['labels']) : null,
58
+
reasonTypes: isset($data['reasonTypes']) ? array_map(fn ($item) => ReasonType::fromArray($item), $data['reasonTypes']) : [],
59
+
subjectTypes: isset($data['subjectTypes']) ? array_map(fn ($item) => SubjectType::fromArray($item), $data['subjectTypes']) : [],
60
subjectCollections: $data['subjectCollections'] ?? null
61
);
62
}
+2
-2
src/Generated/App/Bsky/Notification/Defs/ActivitySubscription.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/ActivitySubscription.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/ChatPreference.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/ChatPreference.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/FilterablePreference.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/FilterablePreference.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/Preference.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/Preference.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/Preferences.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/Preferences.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/RecordDeleted.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/RecordDeleted.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/SubjectActivitySubscription.php
+2
-2
src/Generated/App/Bsky/Notification/Defs/SubjectActivitySubscription.php
+6
-6
src/Generated/App/Bsky/Notification/ListNotifications/Notification.php
+6
-6
src/Generated/App/Bsky/Notification/ListNotifications/Notification.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Notification\ListNotifications;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileView;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
70
return new static(
71
uri: $data['uri'],
72
cid: $data['cid'],
73
-
author: Defs::fromArray($data['author']),
74
reason: $data['reason'],
75
record: $data['record'],
76
isRead: $data['isRead'],
77
indexedAt: Carbon::parse($data['indexedAt']),
78
reasonSubject: $data['reasonSubject'] ?? null,
79
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : []
80
);
81
}
82
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Notification\ListNotifications;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileView;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
70
return new static(
71
uri: $data['uri'],
72
cid: $data['cid'],
73
+
author: ProfileView::fromArray($data['author']),
74
reason: $data['reason'],
75
record: $data['record'],
76
isRead: $data['isRead'],
77
indexedAt: Carbon::parse($data['indexedAt']),
78
reasonSubject: $data['reasonSubject'] ?? null,
79
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : []
80
);
81
}
82
+2
-2
src/Generated/App/Bsky/Richtext/Facet/ByteSlice.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/ByteSlice.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/Link.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/Link.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/Mention.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/Mention.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/Tag.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet/Tag.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet.php
+2
-2
src/Generated/App/Bsky/Richtext/Facet.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/AgeAssuranceEvent.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/AgeAssuranceEvent.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/AgeAssuranceState.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/AgeAssuranceState.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonSearchActor.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonSearchActor.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonSearchPost.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonSearchPost.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonSearchStarterPack.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonSearchStarterPack.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonTrend.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/SkeletonTrend.php
+4
-4
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemBlocked.php
+4
-4
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemBlocked.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Unspecced\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Feed\BlockedAuthor;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
43
public static function fromArray(array $data): static
44
{
45
return new static(
46
-
author: Defs::fromArray($data['author'])
47
);
48
}
49
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Unspecced\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\BlockedAuthor;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
43
public static function fromArray(array $data): static
44
{
45
return new static(
46
+
author: BlockedAuthor::fromArray($data['author'])
47
);
48
}
49
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemNoUnauthenticated.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemNoUnauthenticated.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemNotFound.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemNotFound.php
+4
-4
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemPost.php
+4
-4
src/Generated/App/Bsky/Unspecced/Defs/ThreadItemPost.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Unspecced\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\App\Bsky\Feed\PostView;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
60
public static function fromArray(array $data): static
61
{
62
return new static(
63
-
post: Defs::fromArray($data['post']),
64
moreParents: $data['moreParents'],
65
moreReplies: $data['moreReplies'],
66
opThread: $data['opThread'],
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Unspecced\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Defs\PostView;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
60
public static function fromArray(array $data): static
61
{
62
return new static(
63
+
post: PostView::fromArray($data['post']),
64
moreParents: $data['moreParents'],
65
moreReplies: $data['moreReplies'],
66
opThread: $data['opThread'],
+4
-4
src/Generated/App/Bsky/Unspecced/Defs/TrendView.php
+4
-4
src/Generated/App/Bsky/Unspecced/Defs/TrendView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\App\Bsky\Unspecced\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\App\Bsky\Actor\ProfileViewBasic;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
64
link: $data['link'],
65
startedAt: Carbon::parse($data['startedAt']),
66
postCount: $data['postCount'],
67
-
actors: isset($data['actors']) ? array_map(fn ($item) => Defs::fromArray($item), $data['actors']) : [],
68
status: $data['status'] ?? null,
69
category: $data['category'] ?? null
70
);
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\App\Bsky\Unspecced\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
64
link: $data['link'],
65
startedAt: Carbon::parse($data['startedAt']),
66
postCount: $data['postCount'],
67
+
actors: isset($data['actors']) ? array_map(fn ($item) => ProfileViewBasic::fromArray($item), $data['actors']) : [],
68
status: $data['status'] ?? null,
69
category: $data['category'] ?? null
70
);
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/TrendingTopic.php
+2
-2
src/Generated/App/Bsky/Unspecced/Defs/TrendingTopic.php
+3
-3
src/Generated/App/Bsky/Video/Defs/JobStatus.php
+3
-3
src/Generated/App/Bsky/Video/Defs/JobStatus.php
+5
-5
src/Generated/Chat/Bsky/Convo/Defs/ConvoView.php
+5
-5
src/Generated/Chat/Bsky/Convo/Defs/ConvoView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Chat\Bsky\Convo\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\Chat\Bsky\Actor\ProfileViewBasic;
7
-
use SocialDept\Schema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
60
return new static(
61
id: $data['id'],
62
rev: $data['rev'],
63
-
members: isset($data['members']) ? array_map(fn ($item) => Defs::fromArray($item), $data['members']) : [],
64
muted: $data['muted'],
65
unreadCount: $data['unreadCount'],
66
lastMessage: isset($data['lastMessage']) ? UnionHelper::validateOpenUnion($data['lastMessage']) : null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Chat\Bsky\Convo\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\App\Bsky\Actor\Defs\ProfileViewBasic;
7
+
use SocialDept\AtpSchema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
60
return new static(
61
id: $data['id'],
62
rev: $data['rev'],
63
+
members: isset($data['members']) ? array_map(fn ($item) => ProfileViewBasic::fromArray($item), $data['members']) : [],
64
muted: $data['muted'],
65
unreadCount: $data['unreadCount'],
66
lastMessage: isset($data['lastMessage']) ? UnionHelper::validateOpenUnion($data['lastMessage']) : null,
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/DeletedMessageView.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/DeletedMessageView.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogAcceptConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogAcceptConvo.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogAddReaction.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogAddReaction.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogBeginConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogBeginConvo.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogCreateMessage.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogCreateMessage.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogDeleteMessage.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogDeleteMessage.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogLeaveConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogLeaveConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogMuteConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogMuteConvo.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogReadMessage.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogReadMessage.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogRemoveReaction.php
+3
-3
src/Generated/Chat/Bsky/Convo/Defs/LogRemoveReaction.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogUnmuteConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/LogUnmuteConvo.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/MessageAndReactionView.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/MessageAndReactionView.php
+4
-4
src/Generated/Chat/Bsky/Convo/Defs/MessageInput.php
+4
-4
src/Generated/Chat/Bsky/Convo/Defs/MessageInput.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/MessageRef.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/MessageRef.php
+4
-4
src/Generated/Chat/Bsky/Convo/Defs/MessageView.php
+4
-4
src/Generated/Chat/Bsky/Convo/Defs/MessageView.php
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Chat\Bsky\Convo\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\App\Bsky\Richtext\Facet;
8
+
use SocialDept\AtpSchema\Support\UnionHelper;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/MessageViewSender.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/MessageViewSender.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/ReactionView.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/ReactionView.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/ReactionViewSender.php
+2
-2
src/Generated/Chat/Bsky/Convo/Defs/ReactionViewSender.php
+5
-5
src/Generated/Com/Atproto/Admin/Defs/AccountView.php
+5
-5
src/Generated/Com/Atproto/Admin/Defs/AccountView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Com\Atproto\Admin\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Server\InviteCode;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
76
indexedAt: Carbon::parse($data['indexedAt']),
77
email: $data['email'] ?? null,
78
relatedRecords: $data['relatedRecords'] ?? null,
79
-
invitedBy: isset($data['invitedBy']) ? Defs::fromArray($data['invitedBy']) : null,
80
-
invites: isset($data['invites']) ? array_map(fn ($item) => Defs::fromArray($item), $data['invites']) : [],
81
invitesDisabled: $data['invitesDisabled'] ?? null,
82
emailConfirmedAt: isset($data['emailConfirmedAt']) ? Carbon::parse($data['emailConfirmedAt']) : null,
83
inviteNote: $data['inviteNote'] ?? null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Com\Atproto\Admin\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Server\Defs\InviteCode;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
76
indexedAt: Carbon::parse($data['indexedAt']),
77
email: $data['email'] ?? null,
78
relatedRecords: $data['relatedRecords'] ?? null,
79
+
invitedBy: isset($data['invitedBy']) ? InviteCode::fromArray($data['invitedBy']) : null,
80
+
invites: isset($data['invites']) ? array_map(fn ($item) => InviteCode::fromArray($item), $data['invites']) : [],
81
invitesDisabled: $data['invitesDisabled'] ?? null,
82
emailConfirmedAt: isset($data['emailConfirmedAt']) ? Carbon::parse($data['emailConfirmedAt']) : null,
83
inviteNote: $data['inviteNote'] ?? null,
+2
-2
src/Generated/Com/Atproto/Admin/Defs/RepoBlobRef.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/RepoBlobRef.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/RepoRef.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/RepoRef.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/StatusAttr.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/StatusAttr.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/ThreatSignature.php
+2
-2
src/Generated/Com/Atproto/Admin/Defs/ThreatSignature.php
+2
-2
src/Generated/Com/Atproto/Identity/Defs/IdentityInfo.php
+2
-2
src/Generated/Com/Atproto/Identity/Defs/IdentityInfo.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/Label.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/Label.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/LabelValueDefinition.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/LabelValueDefinition.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/LabelValueDefinitionStrings.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/LabelValueDefinitionStrings.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/SelfLabel.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/SelfLabel.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/SelfLabels.php
+2
-2
src/Generated/Com/Atproto/Label/Defs/SelfLabels.php
+1
-1
src/Generated/Com/Atproto/Label/LabelValue.php
+1
-1
src/Generated/Com/Atproto/Label/LabelValue.php
+2
-2
src/Generated/Com/Atproto/Label/SubscribeLabels/Info.php
+2
-2
src/Generated/Com/Atproto/Label/SubscribeLabels/Info.php
+4
-4
src/Generated/Com/Atproto/Label/SubscribeLabels/Labels.php
+4
-4
src/Generated/Com/Atproto/Label/SubscribeLabels/Labels.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Com\Atproto\Label\SubscribeLabels;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
46
{
47
return new static(
48
seq: $data['seq'],
49
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : []
50
);
51
}
52
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Com\Atproto\Label\SubscribeLabels;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
46
{
47
return new static(
48
seq: $data['seq'],
49
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : []
50
);
51
}
52
+2
-2
src/Generated/Com/Atproto/Moderation/CreateReport/ModTool.php
+2
-2
src/Generated/Com/Atproto/Moderation/CreateReport/ModTool.php
+1
-1
src/Generated/Com/Atproto/Moderation/ReasonType.php
+1
-1
src/Generated/Com/Atproto/Moderation/ReasonType.php
+1
-1
src/Generated/Com/Atproto/Moderation/SubjectType.php
+1
-1
src/Generated/Com/Atproto/Moderation/SubjectType.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/Create.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/Create.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/CreateResult.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/CreateResult.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/Delete.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/Delete.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/DeleteResult.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/DeleteResult.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/Update.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/Update.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/UpdateResult.php
+2
-2
src/Generated/Com/Atproto/Repo/ApplyWrites/UpdateResult.php
+2
-2
src/Generated/Com/Atproto/Repo/Defs/CommitMeta.php
+2
-2
src/Generated/Com/Atproto/Repo/Defs/CommitMeta.php
+2
-2
src/Generated/Com/Atproto/Repo/ListMissingBlobs/RecordBlob.php
+2
-2
src/Generated/Com/Atproto/Repo/ListMissingBlobs/RecordBlob.php
+2
-2
src/Generated/Com/Atproto/Repo/ListRecords/Record.php
+2
-2
src/Generated/Com/Atproto/Repo/ListRecords/Record.php
+2
-2
src/Generated/Com/Atproto/Repo/StrongRef.php
+2
-2
src/Generated/Com/Atproto/Repo/StrongRef.php
+2
-2
src/Generated/Com/Atproto/Server/CreateAppPassword/AppPassword.php
+2
-2
src/Generated/Com/Atproto/Server/CreateAppPassword/AppPassword.php
+2
-2
src/Generated/Com/Atproto/Server/CreateInviteCodes/AccountCodes.php
+2
-2
src/Generated/Com/Atproto/Server/CreateInviteCodes/AccountCodes.php
+2
-2
src/Generated/Com/Atproto/Server/Defs/InviteCode.php
+2
-2
src/Generated/Com/Atproto/Server/Defs/InviteCode.php
+2
-2
src/Generated/Com/Atproto/Server/Defs/InviteCodeUse.php
+2
-2
src/Generated/Com/Atproto/Server/Defs/InviteCodeUse.php
+2
-2
src/Generated/Com/Atproto/Server/DescribeServer/Contact.php
+2
-2
src/Generated/Com/Atproto/Server/DescribeServer/Contact.php
+2
-2
src/Generated/Com/Atproto/Server/DescribeServer/Links.php
+2
-2
src/Generated/Com/Atproto/Server/DescribeServer/Links.php
+2
-2
src/Generated/Com/Atproto/Server/ListAppPasswords/AppPassword.php
+2
-2
src/Generated/Com/Atproto/Server/ListAppPasswords/AppPassword.php
+1
-1
src/Generated/Com/Atproto/Sync/HostStatus.php
+1
-1
src/Generated/Com/Atproto/Sync/HostStatus.php
+4
-4
src/Generated/Com/Atproto/Sync/ListHosts/Host.php
+4
-4
src/Generated/Com/Atproto/Sync/ListHosts/Host.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Com\Atproto\Sync\ListHosts;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\Com\Atproto\Sync\HostStatus;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
56
hostname: $data['hostname'],
57
seq: $data['seq'] ?? null,
58
accountCount: $data['accountCount'] ?? null,
59
-
status: isset($data['status']) ? Defs::fromArray($data['status']) : null
60
);
61
}
62
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Com\Atproto\Sync\ListHosts;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Sync\Defs\HostStatus;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
56
hostname: $data['hostname'],
57
seq: $data['seq'] ?? null,
58
accountCount: $data['accountCount'] ?? null,
59
+
status: isset($data['status']) ? HostStatus::fromArray($data['status']) : null
60
);
61
}
62
+2
-2
src/Generated/Com/Atproto/Sync/ListRepos/Repo.php
+2
-2
src/Generated/Com/Atproto/Sync/ListRepos/Repo.php
+2
-2
src/Generated/Com/Atproto/Sync/ListReposByCollection/Repo.php
+2
-2
src/Generated/Com/Atproto/Sync/ListReposByCollection/Repo.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Account.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Account.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Commit.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Commit.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Identity.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Identity.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Info.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Info.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/RepoOp.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/RepoOp.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Sync.php
+2
-2
src/Generated/Com/Atproto/Sync/SubscribeRepos/Sync.php
+2
-2
src/Generated/Tools/Ozone/Communication/Defs/TemplateView.php
+2
-2
src/Generated/Tools/Ozone/Communication/Defs/TemplateView.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountHosting.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountHosting.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountStats.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountStats.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountStrike.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AccountStrike.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AgeAssuranceEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AgeAssuranceEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AgeAssuranceOverrideEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/AgeAssuranceOverrideEvent.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/BlobView.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/BlobView.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/CancelScheduledTakedownEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/CancelScheduledTakedownEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/IdentityEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/IdentityEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ImageDetails.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ImageDetails.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventAcknowledge.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventAcknowledge.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventComment.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventComment.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventDivert.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventDivert.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventEmail.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventEmail.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventEscalate.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventEscalate.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventLabel.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventLabel.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventMute.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventMute.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventMuteReporter.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventMuteReporter.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventPriorityScore.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventPriorityScore.php
+4
-4
src/Generated/Tools/Ozone/Moderation/Defs/ModEventReport.php
+4
-4
src/Generated/Tools/Ozone/Moderation/Defs/ModEventReport.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Tools\Ozone\Moderation\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\Com\Atproto\Moderation\ReasonType;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
52
public static function fromArray(array $data): static
53
{
54
return new static(
55
-
reportType: Defs::fromArray($data['reportType']),
56
comment: $data['comment'] ?? null,
57
isReporterMuted: $data['isReporterMuted'] ?? null
58
);
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\Defs\ReasonType;
7
8
/**
9
* GENERATED CODE - DO NOT EDIT
···
52
public static function fromArray(array $data): static
53
{
54
return new static(
55
+
reportType: ReasonType::fromArray($data['reportType']),
56
comment: $data['comment'] ?? null,
57
isReporterMuted: $data['isReporterMuted'] ?? null
58
);
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventResolveAppeal.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventResolveAppeal.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventReverseTakedown.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventReverseTakedown.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventTag.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventTag.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventTakedown.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventTakedown.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventUnmute.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventUnmute.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventUnmuteReporter.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModEventUnmuteReporter.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/ModEventView.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/ModEventView.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/ModEventViewDetail.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/ModEventViewDetail.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModTool.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModTool.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/Moderation.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/Moderation.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModerationDetail.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ModerationDetail.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordHosting.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordHosting.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordView.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordView.php
+4
-4
src/Generated/Tools/Ozone/Moderation/Defs/RecordViewDetail.php
+4
-4
src/Generated/Tools/Ozone/Moderation/Defs/RecordViewDetail.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Tools\Ozone\Moderation\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
68
indexedAt: Carbon::parse($data['indexedAt']),
69
moderation: $data['moderation'],
70
repo: $data['repo'],
71
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : []
72
);
73
}
74
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
68
indexedAt: Carbon::parse($data['indexedAt']),
69
moderation: $data['moderation'],
70
repo: $data['repo'],
71
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : []
72
);
73
}
74
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordViewNotFound.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordViewNotFound.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordsStats.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RecordsStats.php
+6
-6
src/Generated/Tools/Ozone/Moderation/Defs/RepoView.php
+6
-6
src/Generated/Tools/Ozone/Moderation/Defs/RepoView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Tools\Ozone\Moderation\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Admin\ThreatSignature;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Server\InviteCode;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
75
indexedAt: Carbon::parse($data['indexedAt']),
76
moderation: $data['moderation'],
77
email: $data['email'] ?? null,
78
-
invitedBy: isset($data['invitedBy']) ? Defs::fromArray($data['invitedBy']) : null,
79
invitesDisabled: $data['invitesDisabled'] ?? null,
80
inviteNote: $data['inviteNote'] ?? null,
81
deactivatedAt: isset($data['deactivatedAt']) ? Carbon::parse($data['deactivatedAt']) : null,
82
-
threatSignatures: isset($data['threatSignatures']) ? array_map(fn ($item) => Defs::fromArray($item), $data['threatSignatures']) : []
83
);
84
}
85
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Admin\Defs\ThreatSignature;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Server\Defs\InviteCode;
9
10
/**
11
* GENERATED CODE - DO NOT EDIT
···
75
indexedAt: Carbon::parse($data['indexedAt']),
76
moderation: $data['moderation'],
77
email: $data['email'] ?? null,
78
+
invitedBy: isset($data['invitedBy']) ? InviteCode::fromArray($data['invitedBy']) : null,
79
invitesDisabled: $data['invitesDisabled'] ?? null,
80
inviteNote: $data['inviteNote'] ?? null,
81
deactivatedAt: isset($data['deactivatedAt']) ? Carbon::parse($data['deactivatedAt']) : null,
82
+
threatSignatures: isset($data['threatSignatures']) ? array_map(fn ($item) => ThreatSignature::fromArray($item), $data['threatSignatures']) : []
83
);
84
}
85
+9
-9
src/Generated/Tools/Ozone/Moderation/Defs/RepoViewDetail.php
+9
-9
src/Generated/Tools/Ozone/Moderation/Defs/RepoViewDetail.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Tools\Ozone\Moderation\Defs;
4
5
use Carbon\Carbon;
6
-
use SocialDept\Schema\Data\Data;
7
-
use SocialDept\Schema\Generated\Com\Atproto\Admin\ThreatSignature;
8
-
use SocialDept\Schema\Generated\Com\Atproto\Label\Label;
9
-
use SocialDept\Schema\Generated\Com\Atproto\Server\InviteCode;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
83
indexedAt: Carbon::parse($data['indexedAt']),
84
moderation: $data['moderation'],
85
email: $data['email'] ?? null,
86
-
labels: isset($data['labels']) ? array_map(fn ($item) => Defs::fromArray($item), $data['labels']) : [],
87
-
invitedBy: isset($data['invitedBy']) ? Defs::fromArray($data['invitedBy']) : null,
88
-
invites: isset($data['invites']) ? array_map(fn ($item) => Defs::fromArray($item), $data['invites']) : [],
89
invitesDisabled: $data['invitesDisabled'] ?? null,
90
inviteNote: $data['inviteNote'] ?? null,
91
emailConfirmedAt: isset($data['emailConfirmedAt']) ? Carbon::parse($data['emailConfirmedAt']) : null,
92
deactivatedAt: isset($data['deactivatedAt']) ? Carbon::parse($data['deactivatedAt']) : null,
93
-
threatSignatures: isset($data['threatSignatures']) ? array_map(fn ($item) => Defs::fromArray($item), $data['threatSignatures']) : []
94
);
95
}
96
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
4
5
use Carbon\Carbon;
6
+
use SocialDept\AtpSchema\Data\Data;
7
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Admin\Defs\ThreatSignature;
8
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Label\Defs\Label;
9
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Server\Defs\InviteCode;
10
11
/**
12
* GENERATED CODE - DO NOT EDIT
···
83
indexedAt: Carbon::parse($data['indexedAt']),
84
moderation: $data['moderation'],
85
email: $data['email'] ?? null,
86
+
labels: isset($data['labels']) ? array_map(fn ($item) => Label::fromArray($item), $data['labels']) : [],
87
+
invitedBy: isset($data['invitedBy']) ? InviteCode::fromArray($data['invitedBy']) : null,
88
+
invites: isset($data['invites']) ? array_map(fn ($item) => InviteCode::fromArray($item), $data['invites']) : [],
89
invitesDisabled: $data['invitesDisabled'] ?? null,
90
inviteNote: $data['inviteNote'] ?? null,
91
emailConfirmedAt: isset($data['emailConfirmedAt']) ? Carbon::parse($data['emailConfirmedAt']) : null,
92
deactivatedAt: isset($data['deactivatedAt']) ? Carbon::parse($data['deactivatedAt']) : null,
93
+
threatSignatures: isset($data['threatSignatures']) ? array_map(fn ($item) => ThreatSignature::fromArray($item), $data['threatSignatures']) : []
94
);
95
}
96
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RepoViewNotFound.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RepoViewNotFound.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ReporterStats.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ReporterStats.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RevokeAccountCredentialsEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/RevokeAccountCredentialsEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ScheduleTakedownEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ScheduleTakedownEvent.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ScheduledActionView.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/ScheduledActionView.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/SubjectStatusView.php
+3
-3
src/Generated/Tools/Ozone/Moderation/Defs/SubjectStatusView.php
+5
-5
src/Generated/Tools/Ozone/Moderation/Defs/SubjectView.php
+5
-5
src/Generated/Tools/Ozone/Moderation/Defs/SubjectView.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generated\Tools\Ozone\Moderation\Defs;
4
5
-
use SocialDept\Schema\Data\Data;
6
-
use SocialDept\Schema\Generated\Com\Atproto\Moderation\SubjectType;
7
-
use SocialDept\Schema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
57
public static function fromArray(array $data): static
58
{
59
return new static(
60
-
type: Defs::fromArray($data['type']),
61
subject: $data['subject'],
62
status: $data['status'] ?? null,
63
repo: $data['repo'] ?? null,
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
4
5
+
use SocialDept\AtpSchema\Data\Data;
6
+
use SocialDept\AtpSchema\Generated\Com\Atproto\Moderation\Defs\SubjectType;
7
+
use SocialDept\AtpSchema\Support\UnionHelper;
8
9
/**
10
* GENERATED CODE - DO NOT EDIT
···
57
public static function fromArray(array $data): static
58
{
59
return new static(
60
+
type: SubjectType::fromArray($data['type']),
61
subject: $data['subject'],
62
status: $data['status'] ?? null,
63
repo: $data['repo'] ?? null,
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/VideoDetails.php
+2
-2
src/Generated/Tools/Ozone/Moderation/Defs/VideoDetails.php
+1
-1
src/Generated/Tools/Ozone/Moderation/SubjectReviewState.php
+1
-1
src/Generated/Tools/Ozone/Moderation/SubjectReviewState.php
+2
-2
src/Generated/Tools/Ozone/Server/GetConfig/ServiceConfig.php
+2
-2
src/Generated/Tools/Ozone/Server/GetConfig/ServiceConfig.php
+2
-2
src/Generated/Tools/Ozone/Server/GetConfig/ViewerConfig.php
+2
-2
src/Generated/Tools/Ozone/Server/GetConfig/ViewerConfig.php
+12
-6
src/Generator/ClassGenerator.php
+12
-6
src/Generator/ClassGenerator.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generator;
4
5
-
use SocialDept\Schema\Data\LexiconDocument;
6
-
use SocialDept\Schema\Exceptions\GenerationException;
7
-
use SocialDept\Schema\Support\ExtensionManager;
8
9
class ClassGenerator
10
{
···
107
'methods' => $methods,
108
]);
109
110
// Execute post-generation hooks
111
$this->extensions->execute('action:class:generated', $rendered, $document);
112
···
219
*/
220
protected function collectUseStatements(array $definition, string $currentNamespace = '', string $currentClassName = ''): array
221
{
222
-
$uses = ['SocialDept\\Schema\\Data\\Data'];
223
$properties = $definition['properties'] ?? [];
224
$hasUnions = false;
225
$localRefs = [];
···
275
276
// Add UnionHelper if unions are used
277
if ($hasUnions) {
278
-
$uses[] = 'SocialDept\\Schema\\Support\\UnionHelper';
279
}
280
281
// Remove duplicates and sort
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generator;
4
5
+
use SocialDept\AtpSchema\Data\LexiconDocument;
6
+
use SocialDept\AtpSchema\Exceptions\GenerationException;
7
+
use SocialDept\AtpSchema\Support\ExtensionManager;
8
9
class ClassGenerator
10
{
···
107
'methods' => $methods,
108
]);
109
110
+
// Fix blank lines when there's no constructor or properties
111
+
if (empty($properties) && empty($constructor)) {
112
+
// Remove double blank lines after class opening brace
113
+
$rendered = preg_replace('/\{\n\n\n/', "{\n", $rendered);
114
+
}
115
+
116
// Execute post-generation hooks
117
$this->extensions->execute('action:class:generated', $rendered, $document);
118
···
225
*/
226
protected function collectUseStatements(array $definition, string $currentNamespace = '', string $currentClassName = ''): array
227
{
228
+
$uses = ['SocialDept\\AtpSchema\\Data\\Data'];
229
$properties = $definition['properties'] ?? [];
230
$hasUnions = false;
231
$localRefs = [];
···
281
282
// Add UnionHelper if unions are used
283
if ($hasUnions) {
284
+
$uses[] = 'SocialDept\\AtpSchema\\Support\\UnionHelper';
285
}
286
287
// Remove duplicates and sort
+1
-1
src/Generator/ConstructorGenerator.php
+1
-1
src/Generator/ConstructorGenerator.php
+6
-6
src/Generator/DTOGenerator.php
+6
-6
src/Generator/DTOGenerator.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generator;
4
5
-
use SocialDept\Schema\Contracts\DataGenerator;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Parser\SchemaLoader;
8
-
use SocialDept\Schema\Parser\TypeParser;
9
10
class DTOGenerator implements DataGenerator
11
{
···
232
],
233
];
234
235
-
$tempDocument = \SocialDept\Schema\Data\LexiconDocument::fromArray($tempSchema);
236
237
// Use ClassGenerator for proper code generation
238
$code = $this->classGenerator->generate($tempDocument);
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generator;
4
5
+
use SocialDept\AtpSchema\Contracts\DataGenerator;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
8
+
use SocialDept\AtpSchema\Parser\TypeParser;
9
10
class DTOGenerator implements DataGenerator
11
{
···
232
],
233
];
234
235
+
$tempDocument = \SocialDept\AtpSchema\Data\LexiconDocument::fromArray($tempSchema);
236
237
// Use ClassGenerator for proper code generation
238
$code = $this->classGenerator->generate($tempDocument);
+2
-2
src/Generator/DocBlockGenerator.php
+2
-2
src/Generator/DocBlockGenerator.php
+1
-1
src/Generator/EnumGenerator.php
+1
-1
src/Generator/EnumGenerator.php
+2
-2
src/Generator/FileWriter.php
+2
-2
src/Generator/FileWriter.php
+19
-16
src/Generator/MethodGenerator.php
+19
-16
src/Generator/MethodGenerator.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generator;
4
5
-
use SocialDept\Schema\Data\LexiconDocument;
6
-
use SocialDept\Schema\Support\ExtensionManager;
7
8
class MethodGenerator
9
{
···
215
return "\$data['{$name}'] ?? null";
216
}
217
218
-
// Handle NSID fragments - extract just the NSID part
219
if (str_contains($ref, '#')) {
220
-
$ref = explode('#', $ref)[0];
221
}
222
-
223
-
$refClass = $this->naming->nsidToClassName($ref);
224
-
$className = basename(str_replace('\\', '/', $refClass));
225
226
if ($isRequired) {
227
return "{$className}::fromArray(\$data['{$name}'])";
···
241
242
// Handle NSID fragments
243
if (str_contains($ref, '#')) {
244
-
$ref = explode('#', $ref)[0];
245
}
246
-
247
-
$refClass = $this->naming->nsidToClassName($ref);
248
-
$className = basename(str_replace('\\', '/', $refClass));
249
250
return "isset(\$data['{$name}']) ? array_map(fn (\$item) => {$className}::fromArray(\$item), \$data['{$name}']) : []";
251
}
···
279
foreach ($externalRefs as $ref) {
280
// Handle NSID fragments
281
if (str_contains($ref, '#')) {
282
-
$ref = explode('#', $ref)[0];
283
}
284
-
285
-
$refClass = $this->naming->nsidToClassName($ref);
286
-
$className = basename(str_replace('\\', '/', $refClass));
287
$variantClasses[] = "{$className}::class";
288
}
289
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generator;
4
5
+
use SocialDept\AtpSchema\Data\LexiconDocument;
6
+
use SocialDept\AtpSchema\Support\ExtensionManager;
7
8
class MethodGenerator
9
{
···
215
return "\$data['{$name}'] ?? null";
216
}
217
218
+
// Handle NSID fragments
219
if (str_contains($ref, '#')) {
220
+
[$baseNsid, $fragment] = explode('#', $ref, 2);
221
+
$className = $this->naming->toClassName($fragment);
222
+
} else {
223
+
$refClass = $this->naming->nsidToClassName($ref);
224
+
$className = basename(str_replace('\\', '/', $refClass));
225
}
226
227
if ($isRequired) {
228
return "{$className}::fromArray(\$data['{$name}'])";
···
242
243
// Handle NSID fragments
244
if (str_contains($ref, '#')) {
245
+
[$baseNsid, $fragment] = explode('#', $ref, 2);
246
+
$className = $this->naming->toClassName($fragment);
247
+
} else {
248
+
$refClass = $this->naming->nsidToClassName($ref);
249
+
$className = basename(str_replace('\\', '/', $refClass));
250
}
251
252
return "isset(\$data['{$name}']) ? array_map(fn (\$item) => {$className}::fromArray(\$item), \$data['{$name}']) : []";
253
}
···
281
foreach ($externalRefs as $ref) {
282
// Handle NSID fragments
283
if (str_contains($ref, '#')) {
284
+
[$baseNsid, $fragment] = explode('#', $ref, 2);
285
+
$className = $this->naming->toClassName($fragment);
286
+
} else {
287
+
$refClass = $this->naming->nsidToClassName($ref);
288
+
$className = basename(str_replace('\\', '/', $refClass));
289
}
290
$variantClasses[] = "{$className}::class";
291
}
292
+2
-2
src/Generator/ModelMapper.php
+2
-2
src/Generator/ModelMapper.php
+2
-2
src/Generator/NamespaceResolver.php
+2
-2
src/Generator/NamespaceResolver.php
+2
-2
src/Generator/NamingConverter.php
+2
-2
src/Generator/NamingConverter.php
+1
-1
src/Generator/PropertyGenerator.php
+1
-1
src/Generator/PropertyGenerator.php
+2
-2
src/Generator/StubRenderer.php
+2
-2
src/Generator/StubRenderer.php
+2
-2
src/Generator/TemplateRenderer.php
+2
-2
src/Generator/TemplateRenderer.php
+20
-5
src/Generator/TypeMapper.php
+20
-5
src/Generator/TypeMapper.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Generator;
4
5
-
use SocialDept\Schema\Support\ExtensionManager;
6
7
class TypeMapper
8
{
···
407
}
408
409
if ($type === 'blob') {
410
-
return ['SocialDept\\Schema\\Data\\BlobReference'];
411
}
412
413
if ($type === 'ref' && isset($definition['ref'])) {
···
421
// Handle NSID fragments - convert fragment to class name
422
if (str_contains($ref, '#')) {
423
[$baseNsid, $fragment] = explode('#', $ref, 2);
424
-
$namespace = $this->naming->nsidToNamespace($baseNsid);
425
$className = $this->naming->toClassName($fragment);
426
427
return [$namespace . '\\' . $className];
···
449
// Handle NSID fragments - convert fragment to class name
450
if (str_contains($ref, '#')) {
451
[$baseNsid, $fragment] = explode('#', $ref, 2);
452
-
$namespace = $this->naming->nsidToNamespace($baseNsid);
453
$className = $this->naming->toClassName($fragment);
454
$classes[] = $namespace . '\\' . $className;
455
} else {
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Generator;
4
5
+
use SocialDept\AtpSchema\Support\ExtensionManager;
6
7
class TypeMapper
8
{
···
407
}
408
409
if ($type === 'blob') {
410
+
return ['SocialDept\\AtpSchema\\Data\\BlobReference'];
411
}
412
413
if ($type === 'ref' && isset($definition['ref'])) {
···
421
// Handle NSID fragments - convert fragment to class name
422
if (str_contains($ref, '#')) {
423
[$baseNsid, $fragment] = explode('#', $ref, 2);
424
+
// For fragments, we need to include ALL segments of the base NSID
425
+
// Parse the NSID and convert each segment to PascalCase
426
+
$nsid = \SocialDept\AtpSchema\Parser\Nsid::parse($baseNsid);
427
+
$segments = $nsid->getSegments();
428
+
$namespaceParts = array_map(
429
+
fn ($part) => $this->naming->toPascalCase($part),
430
+
$segments
431
+
);
432
+
$namespace = $this->naming->getBaseNamespace() . '\\' . implode('\\', $namespaceParts);
433
$className = $this->naming->toClassName($fragment);
434
435
return [$namespace . '\\' . $className];
···
457
// Handle NSID fragments - convert fragment to class name
458
if (str_contains($ref, '#')) {
459
[$baseNsid, $fragment] = explode('#', $ref, 2);
460
+
// For fragments, we need to include ALL segments of the base NSID
461
+
$nsid = \SocialDept\AtpSchema\Parser\Nsid::parse($baseNsid);
462
+
$segments = $nsid->getSegments();
463
+
$namespaceParts = array_map(
464
+
fn ($part) => $this->naming->toPascalCase($part),
465
+
$segments
466
+
);
467
+
$namespace = $this->naming->getBaseNamespace() . '\\' . implode('\\', $namespaceParts);
468
$className = $this->naming->toClassName($fragment);
469
$classes[] = $namespace . '\\' . $className;
470
} else {
+8
-8
src/Parser/ComplexTypeParser.php
+8
-8
src/Parser/ComplexTypeParser.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Parser;
4
5
-
use SocialDept\Schema\Data\TypeDefinition;
6
-
use SocialDept\Schema\Data\Types\ArrayType;
7
-
use SocialDept\Schema\Data\Types\BlobType;
8
-
use SocialDept\Schema\Data\Types\ObjectType;
9
-
use SocialDept\Schema\Data\Types\RefType;
10
-
use SocialDept\Schema\Data\Types\UnionType;
11
-
use SocialDept\Schema\Exceptions\TypeResolutionException;
12
13
class ComplexTypeParser
14
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Parser;
4
5
+
use SocialDept\AtpSchema\Data\TypeDefinition;
6
+
use SocialDept\AtpSchema\Data\Types\ArrayType;
7
+
use SocialDept\AtpSchema\Data\Types\BlobType;
8
+
use SocialDept\AtpSchema\Data\Types\ObjectType;
9
+
use SocialDept\AtpSchema\Data\Types\RefType;
10
+
use SocialDept\AtpSchema\Data\Types\UnionType;
11
+
use SocialDept\AtpSchema\Exceptions\TypeResolutionException;
12
13
class ComplexTypeParser
14
{
+4
-4
src/Parser/DefaultLexiconParser.php
+4
-4
src/Parser/DefaultLexiconParser.php
+8
-8
src/Parser/DnsLexiconResolver.php
+8
-8
src/Parser/DnsLexiconResolver.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Parser;
4
5
use Illuminate\Support\Facades\Http;
6
-
use SocialDept\Schema\Contracts\LexiconParser;
7
-
use SocialDept\Schema\Contracts\LexiconResolver;
8
-
use SocialDept\Schema\Data\LexiconDocument;
9
-
use SocialDept\Schema\Exceptions\SchemaNotFoundException;
10
11
class DnsLexiconResolver implements LexiconResolver
12
{
···
46
$this->enabled = $enabled;
47
$this->httpTimeout = $httpTimeout;
48
$this->parser = $parser ?? new DefaultLexiconParser();
49
-
$this->hasResolver = class_exists('SocialDept\\Resolver\\Resolver');
50
}
51
52
/**
···
171
172
try {
173
// Get resolver from Laravel container if available
174
-
if (function_exists('app') && app()->has(\SocialDept\Resolver\Resolver::class)) {
175
-
$resolver = app(\SocialDept\Resolver\Resolver::class);
176
} else {
177
// Can't instantiate without dependencies
178
return null;
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Parser;
4
5
use Illuminate\Support\Facades\Http;
6
+
use SocialDept\AtpSchema\Contracts\LexiconParser;
7
+
use SocialDept\AtpSchema\Contracts\LexiconResolver;
8
+
use SocialDept\AtpSchema\Data\LexiconDocument;
9
+
use SocialDept\AtpSchema\Exceptions\SchemaNotFoundException;
10
11
class DnsLexiconResolver implements LexiconResolver
12
{
···
46
$this->enabled = $enabled;
47
$this->httpTimeout = $httpTimeout;
48
$this->parser = $parser ?? new DefaultLexiconParser();
49
+
$this->hasResolver = class_exists('SocialDept\\AtpResolver\\Resolver');
50
}
51
52
/**
···
171
172
try {
173
// Get resolver from Laravel container if available
174
+
if (function_exists('app') && app()->has(\SocialDept\AtpResolver\Resolver::class)) {
175
+
$resolver = app(\SocialDept\AtpResolver\Resolver::class);
176
} else {
177
// Can't instantiate without dependencies
178
return null;
+3
-3
src/Parser/InMemoryLexiconRegistry.php
+3
-3
src/Parser/InMemoryLexiconRegistry.php
+2
-2
src/Parser/Nsid.php
+2
-2
src/Parser/Nsid.php
+10
-10
src/Parser/PrimitiveParser.php
+10
-10
src/Parser/PrimitiveParser.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Parser;
4
5
-
use SocialDept\Schema\Data\TypeDefinition;
6
-
use SocialDept\Schema\Data\Types\BooleanType;
7
-
use SocialDept\Schema\Data\Types\BytesType;
8
-
use SocialDept\Schema\Data\Types\CidLinkType;
9
-
use SocialDept\Schema\Data\Types\IntegerType;
10
-
use SocialDept\Schema\Data\Types\NullType;
11
-
use SocialDept\Schema\Data\Types\StringType;
12
-
use SocialDept\Schema\Data\Types\UnknownType;
13
-
use SocialDept\Schema\Exceptions\TypeResolutionException;
14
15
class PrimitiveParser
16
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Parser;
4
5
+
use SocialDept\AtpSchema\Data\TypeDefinition;
6
+
use SocialDept\AtpSchema\Data\Types\BooleanType;
7
+
use SocialDept\AtpSchema\Data\Types\BytesType;
8
+
use SocialDept\AtpSchema\Data\Types\CidLinkType;
9
+
use SocialDept\AtpSchema\Data\Types\IntegerType;
10
+
use SocialDept\AtpSchema\Data\Types\NullType;
11
+
use SocialDept\AtpSchema\Data\Types\StringType;
12
+
use SocialDept\AtpSchema\Data\Types\UnknownType;
13
+
use SocialDept\AtpSchema\Exceptions\TypeResolutionException;
14
15
class PrimitiveParser
16
{
+8
-8
src/Parser/SchemaLoader.php
+8
-8
src/Parser/SchemaLoader.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Parser;
4
5
use Illuminate\Support\Facades\Cache;
6
use Illuminate\Support\Facades\Http;
7
-
use SocialDept\Schema\Contracts\SchemaRepository;
8
-
use SocialDept\Schema\Data\LexiconDocument;
9
-
use SocialDept\Schema\Exceptions\SchemaNotFoundException;
10
-
use SocialDept\Schema\Exceptions\SchemaParseException;
11
12
class SchemaLoader implements SchemaRepository
13
{
···
79
$this->cachePrefix = $cachePrefix;
80
$this->dnsResolutionEnabled = $dnsResolutionEnabled;
81
$this->httpTimeout = $httpTimeout;
82
-
$this->hasResolver = class_exists('SocialDept\\Resolver\\Resolver');
83
}
84
85
/**
···
436
437
try {
438
// Get resolver from Laravel container if available
439
-
if (function_exists('app') && app()->has(\SocialDept\Resolver\Resolver::class)) {
440
-
$resolver = app(\SocialDept\Resolver\Resolver::class);
441
} else {
442
// Can't instantiate without dependencies
443
return null;
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Parser;
4
5
use Illuminate\Support\Facades\Cache;
6
use Illuminate\Support\Facades\Http;
7
+
use SocialDept\AtpSchema\Contracts\SchemaRepository;
8
+
use SocialDept\AtpSchema\Data\LexiconDocument;
9
+
use SocialDept\AtpSchema\Exceptions\SchemaNotFoundException;
10
+
use SocialDept\AtpSchema\Exceptions\SchemaParseException;
11
12
class SchemaLoader implements SchemaRepository
13
{
···
79
$this->cachePrefix = $cachePrefix;
80
$this->dnsResolutionEnabled = $dnsResolutionEnabled;
81
$this->httpTimeout = $httpTimeout;
82
+
$this->hasResolver = class_exists('SocialDept\\AtpResolver\\Resolver');
83
}
84
85
/**
···
436
437
try {
438
// Get resolver from Laravel container if available
439
+
if (function_exists('app') && app()->has(\SocialDept\AtpResolver\Resolver::class)) {
440
+
$resolver = app(\SocialDept\AtpResolver\Resolver::class);
441
} else {
442
// Can't instantiate without dependencies
443
return null;
+4
-4
src/Parser/TypeParser.php
+4
-4
src/Parser/TypeParser.php
+1
-1
src/Schema.php
+1
-1
src/Schema.php
+5
-5
src/SchemaManager.php
+5
-5
src/SchemaManager.php
+1
-1
src/SchemaServiceProvider.php
+1
-1
src/SchemaServiceProvider.php
+3
-3
src/Services/BlobHandler.php
+3
-3
src/Services/BlobHandler.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Services;
4
5
use Illuminate\Contracts\Filesystem\Filesystem;
6
use Illuminate\Http\UploadedFile;
7
use Illuminate\Support\Facades\Storage;
8
use Illuminate\Support\Traits\Macroable;
9
-
use SocialDept\Schema\Data\BlobReference;
10
-
use SocialDept\Schema\Exceptions\RecordValidationException;
11
12
class BlobHandler
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Services;
4
5
use Illuminate\Contracts\Filesystem\Filesystem;
6
use Illuminate\Http\UploadedFile;
7
use Illuminate\Support\Facades\Storage;
8
use Illuminate\Support\Traits\Macroable;
9
+
use SocialDept\AtpSchema\Data\BlobReference;
10
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
11
12
class BlobHandler
13
{
+3
-3
src/Services/ModelMapper.php
+3
-3
src/Services/ModelMapper.php
+4
-4
src/Services/UnionResolver.php
+4
-4
src/Services/UnionResolver.php
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Services;
4
5
use Illuminate\Support\Traits\Macroable;
6
+
use SocialDept\AtpSchema\Contracts\LexiconRegistry;
7
+
use SocialDept\AtpSchema\Data\LexiconDocument;
8
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
9
10
class UnionResolver
11
{
+3
-3
src/Support/DefaultBlobHandler.php
+3
-3
src/Support/DefaultBlobHandler.php
+1
-1
src/Support/ExtensionManager.php
+1
-1
src/Support/ExtensionManager.php
+3
-3
src/Support/UnionHelper.php
+3
-3
src/Support/UnionHelper.php
+7
-7
src/Validation/LexiconValidator.php
+7
-7
src/Validation/LexiconValidator.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Validation;
4
5
-
use SocialDept\Schema\Contracts\LexiconValidator as LexiconValidatorContract;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Exceptions\RecordValidationException;
8
-
use SocialDept\Schema\Exceptions\SchemaValidationException;
9
-
use SocialDept\Schema\Parser\SchemaLoader;
10
-
use SocialDept\Schema\Parser\TypeParser;
11
12
class LexiconValidator implements LexiconValidatorContract
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Validation;
4
5
+
use SocialDept\AtpSchema\Contracts\LexiconValidator as LexiconValidatorContract;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
8
+
use SocialDept\AtpSchema\Exceptions\SchemaValidationException;
9
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
10
+
use SocialDept\AtpSchema\Parser\TypeParser;
11
12
class LexiconValidator implements LexiconValidatorContract
13
{
+1
-1
src/Validation/Rules/AtDatetime.php
+1
-1
src/Validation/Rules/AtDatetime.php
+1
-1
src/Validation/Rules/AtUri.php
+1
-1
src/Validation/Rules/AtUri.php
+1
-1
src/Validation/Rules/Cid.php
+1
-1
src/Validation/Rules/Cid.php
+3
-3
src/Validation/Rules/Did.php
+3
-3
src/Validation/Rules/Did.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Validation\Rules;
4
5
use Closure;
6
use Illuminate\Contracts\Validation\ValidationRule;
···
19
}
20
21
// Check if Resolver package is available
22
-
if (class_exists('SocialDept\Resolver\Support\Identity')) {
23
-
if (! \SocialDept\Resolver\Support\Identity::isDid($value)) {
24
$fail("The {$attribute} is not a valid DID.");
25
}
26
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Validation\Rules;
4
5
use Closure;
6
use Illuminate\Contracts\Validation\ValidationRule;
···
19
}
20
21
// Check if Resolver package is available
22
+
if (class_exists('SocialDept\AtpResolver\Support\Identity')) {
23
+
if (! \SocialDept\AtpResolver\Support\Identity::isDid($value)) {
24
$fail("The {$attribute} is not a valid DID.");
25
}
26
+3
-3
src/Validation/Rules/Handle.php
+3
-3
src/Validation/Rules/Handle.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Validation\Rules;
4
5
use Closure;
6
use Illuminate\Contracts\Validation\ValidationRule;
···
19
}
20
21
// Check if Resolver package is available
22
-
if (class_exists('SocialDept\Resolver\Support\Identity')) {
23
-
if (! \SocialDept\Resolver\Support\Identity::isHandle($value)) {
24
$fail("The {$attribute} is not a valid handle.");
25
}
26
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Validation\Rules;
4
5
use Closure;
6
use Illuminate\Contracts\Validation\ValidationRule;
···
19
}
20
21
// Check if Resolver package is available
22
+
if (class_exists('SocialDept\AtpResolver\Support\Identity')) {
23
+
if (! \SocialDept\AtpResolver\Support\Identity::isHandle($value)) {
24
$fail("The {$attribute} is not a valid handle.");
25
}
26
+1
-1
src/Validation/Rules/Language.php
+1
-1
src/Validation/Rules/Language.php
+1
-1
src/Validation/Rules/MaxGraphemes.php
+1
-1
src/Validation/Rules/MaxGraphemes.php
+1
-1
src/Validation/Rules/MinGraphemes.php
+1
-1
src/Validation/Rules/MinGraphemes.php
+2
-2
src/Validation/Rules/Nsid.php
+2
-2
src/Validation/Rules/Nsid.php
+2
-2
src/Validation/TypeValidators/ArrayValidator.php
+2
-2
src/Validation/TypeValidators/ArrayValidator.php
+2
-2
src/Validation/TypeValidators/BlobValidator.php
+2
-2
src/Validation/TypeValidators/BlobValidator.php
+2
-2
src/Validation/TypeValidators/BooleanValidator.php
+2
-2
src/Validation/TypeValidators/BooleanValidator.php
+2
-2
src/Validation/TypeValidators/IntegerValidator.php
+2
-2
src/Validation/TypeValidators/IntegerValidator.php
+2
-2
src/Validation/TypeValidators/ObjectValidator.php
+2
-2
src/Validation/TypeValidators/ObjectValidator.php
+3
-3
src/Validation/TypeValidators/StringValidator.php
+3
-3
src/Validation/TypeValidators/StringValidator.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Validation\TypeValidators;
4
5
-
use SocialDept\Schema\Exceptions\RecordValidationException;
6
7
class StringValidator
8
{
···
180
protected function validateNsid(string $value): bool
181
{
182
try {
183
-
\SocialDept\Schema\Parser\Nsid::parse($value);
184
185
return true;
186
} catch (\Exception) {
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Validation\TypeValidators;
4
5
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
6
7
class StringValidator
8
{
···
180
protected function validateNsid(string $value): bool
181
{
182
try {
183
+
\SocialDept\AtpSchema\Parser\Nsid::parse($value);
184
185
return true;
186
} catch (\Exception) {
+3
-3
src/Validation/TypeValidators/UnionValidator.php
+3
-3
src/Validation/TypeValidators/UnionValidator.php
+1
-1
src/Validation/ValidationError.php
+1
-1
src/Validation/ValidationError.php
+1
-1
src/Validation/ValidationErrorFormatter.php
+1
-1
src/Validation/ValidationErrorFormatter.php
+7
-7
src/Validation/Validator.php
+7
-7
src/Validation/Validator.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Validation;
4
5
use Illuminate\Support\Traits\Macroable;
6
-
use SocialDept\Schema\Contracts\LexiconValidator as LexiconValidatorContract;
7
-
use SocialDept\Schema\Data\LexiconDocument;
8
-
use SocialDept\Schema\Exceptions\RecordValidationException;
9
-
use SocialDept\Schema\Exceptions\SchemaValidationException;
10
-
use SocialDept\Schema\Parser\SchemaLoader;
11
-
use SocialDept\Schema\Parser\TypeParser;
12
13
class Validator implements LexiconValidatorContract
14
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Validation;
4
5
use Illuminate\Support\Traits\Macroable;
6
+
use SocialDept\AtpSchema\Contracts\LexiconValidator as LexiconValidatorContract;
7
+
use SocialDept\AtpSchema\Data\LexiconDocument;
8
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
9
+
use SocialDept\AtpSchema\Exceptions\SchemaValidationException;
10
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
11
+
use SocialDept\AtpSchema\Parser\TypeParser;
12
13
class Validator implements LexiconValidatorContract
14
{
+3
-3
src/helpers.php
+3
-3
src/helpers.php
···
1
<?php
2
3
-
use SocialDept\Schema\Data\LexiconDocument;
4
-
use SocialDept\Schema\Facades\Schema;
5
6
if (! function_exists('schema')) {
7
/**
8
* Get the SchemaManager instance or load a schema.
9
*
10
-
* @return \SocialDept\Schema\SchemaManager|LexiconDocument
11
*/
12
function schema(?string $nsid = null)
13
{
···
1
<?php
2
3
+
use SocialDept\AtpSchema\Data\LexiconDocument;
4
+
use SocialDept\AtpSchema\Facades\Schema;
5
6
if (! function_exists('schema')) {
7
/**
8
* Get the SchemaManager instance or load a schema.
9
*
10
+
* @return \SocialDept\AtpSchema\SchemaManager|LexiconDocument
11
*/
12
function schema(?string $nsid = null)
13
{
+8
-8
tests/Integration/CompleteWorkflowTest.php
+8
-8
tests/Integration/CompleteWorkflowTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Integration;
4
5
use Illuminate\Http\UploadedFile;
6
use Illuminate\Support\Facades\Storage;
7
use Orchestra\Testbench\TestCase;
8
-
use SocialDept\Schema\Contracts\LexiconRegistry;
9
-
use SocialDept\Schema\Data\LexiconDocument;
10
-
use SocialDept\Schema\Parser\SchemaLoader;
11
-
use SocialDept\Schema\Services\BlobHandler;
12
-
use SocialDept\Schema\Services\UnionResolver;
13
-
use SocialDept\Schema\Support\ExtensionManager;
14
-
use SocialDept\Schema\Validation\Validator;
15
16
class CompleteWorkflowTest extends TestCase
17
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Integration;
4
5
use Illuminate\Http\UploadedFile;
6
use Illuminate\Support\Facades\Storage;
7
use Orchestra\Testbench\TestCase;
8
+
use SocialDept\AtpSchema\Contracts\LexiconRegistry;
9
+
use SocialDept\AtpSchema\Data\LexiconDocument;
10
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
11
+
use SocialDept\AtpSchema\Services\BlobHandler;
12
+
use SocialDept\AtpSchema\Services\UnionResolver;
13
+
use SocialDept\AtpSchema\Support\ExtensionManager;
14
+
use SocialDept\AtpSchema\Validation\Validator;
15
16
class CompleteWorkflowTest extends TestCase
17
{
+6
-6
tests/Integration/ModelMappingIntegrationTest.php
+6
-6
tests/Integration/ModelMappingIntegrationTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Integration;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Contracts\Transformer;
7
-
use SocialDept\Schema\Data\LexiconDocument;
8
-
use SocialDept\Schema\Parser\SchemaLoader;
9
-
use SocialDept\Schema\Services\ModelMapper;
10
-
use SocialDept\Schema\Validation\Validator;
11
12
class ModelMappingIntegrationTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Integration;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Contracts\Transformer;
7
+
use SocialDept\AtpSchema\Data\LexiconDocument;
8
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
9
+
use SocialDept\AtpSchema\Services\ModelMapper;
10
+
use SocialDept\AtpSchema\Validation\Validator;
11
12
class ModelMappingIntegrationTest extends TestCase
13
{
+5
-5
tests/Integration/ValidationIntegrationTest.php
+5
-5
tests/Integration/ValidationIntegrationTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Integration;
4
5
use Illuminate\Support\Facades\Storage;
6
use Orchestra\Testbench\TestCase;
7
-
use SocialDept\Schema\Data\LexiconDocument;
8
-
use SocialDept\Schema\Parser\SchemaLoader;
9
-
use SocialDept\Schema\Services\BlobHandler;
10
-
use SocialDept\Schema\Validation\Validator;
11
12
class ValidationIntegrationTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Integration;
4
5
use Illuminate\Support\Facades\Storage;
6
use Orchestra\Testbench\TestCase;
7
+
use SocialDept\AtpSchema\Data\LexiconDocument;
8
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
9
+
use SocialDept\AtpSchema\Services\BlobHandler;
10
+
use SocialDept\AtpSchema\Validation\Validator;
11
12
class ValidationIntegrationTest extends TestCase
13
{
+3
-3
tests/Unit/Console/ClearCacheCommandTest.php
+3
-3
tests/Unit/Console/ClearCacheCommandTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Console;
4
5
use Illuminate\Support\Facades\Cache;
6
use Orchestra\Testbench\TestCase;
7
-
use SocialDept\Schema\Console\ClearCacheCommand;
8
-
use SocialDept\Schema\SchemaServiceProvider;
9
10
class ClearCacheCommandTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Console;
4
5
use Illuminate\Support\Facades\Cache;
6
use Orchestra\Testbench\TestCase;
7
+
use SocialDept\AtpSchema\Console\ClearCacheCommand;
8
+
use SocialDept\AtpSchema\SchemaServiceProvider;
9
10
class ClearCacheCommandTest extends TestCase
11
{
+3
-3
tests/Unit/Console/GenerateCommandTest.php
+3
-3
tests/Unit/Console/GenerateCommandTest.php
+3
-3
tests/Unit/Console/ListCommandTest.php
+3
-3
tests/Unit/Console/ListCommandTest.php
+3
-3
tests/Unit/Console/ValidateCommandTest.php
+3
-3
tests/Unit/Console/ValidateCommandTest.php
+3
-3
tests/Unit/Data/BlobReferenceTest.php
+3
-3
tests/Unit/Data/BlobReferenceTest.php
+2
-2
tests/Unit/Data/DataTest.php
+2
-2
tests/Unit/Data/DataTest.php
+4
-4
tests/Unit/Data/LexiconDocumentTest.php
+4
-4
tests/Unit/Data/LexiconDocumentTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Data;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Exceptions\SchemaValidationException;
8
-
use SocialDept\Schema\Parser\Nsid;
9
10
class LexiconDocumentTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Data;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Exceptions\SchemaValidationException;
8
+
use SocialDept\AtpSchema\Parser\Nsid;
9
10
class LexiconDocumentTest extends TestCase
11
{
+4
-4
tests/Unit/Data/Types/ArrayTypeTest.php
+4
-4
tests/Unit/Data/Types/ArrayTypeTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Data\Types;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\Types\ArrayType;
7
-
use SocialDept\Schema\Data\Types\StringType;
8
-
use SocialDept\Schema\Exceptions\RecordValidationException;
9
10
class ArrayTypeTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Data\Types;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\Types\ArrayType;
7
+
use SocialDept\AtpSchema\Data\Types\StringType;
8
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
9
10
class ArrayTypeTest extends TestCase
11
{
+3
-3
tests/Unit/Data/Types/BlobTypeTest.php
+3
-3
tests/Unit/Data/Types/BlobTypeTest.php
+3
-3
tests/Unit/Data/Types/BooleanTypeTest.php
+3
-3
tests/Unit/Data/Types/BooleanTypeTest.php
+3
-3
tests/Unit/Data/Types/BytesTypeTest.php
+3
-3
tests/Unit/Data/Types/BytesTypeTest.php
+3
-3
tests/Unit/Data/Types/CidLinkTypeTest.php
+3
-3
tests/Unit/Data/Types/CidLinkTypeTest.php
+3
-3
tests/Unit/Data/Types/IntegerTypeTest.php
+3
-3
tests/Unit/Data/Types/IntegerTypeTest.php
+3
-3
tests/Unit/Data/Types/NullTypeTest.php
+3
-3
tests/Unit/Data/Types/NullTypeTest.php
+4
-4
tests/Unit/Data/Types/ObjectTypeTest.php
+4
-4
tests/Unit/Data/Types/ObjectTypeTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Data\Types;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\Types\ObjectType;
7
-
use SocialDept\Schema\Data\Types\StringType;
8
-
use SocialDept\Schema\Exceptions\RecordValidationException;
9
10
class ObjectTypeTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Data\Types;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\Types\ObjectType;
7
+
use SocialDept\AtpSchema\Data\Types\StringType;
8
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
9
10
class ObjectTypeTest extends TestCase
11
{
+2
-2
tests/Unit/Data/Types/RefTypeTest.php
+2
-2
tests/Unit/Data/Types/RefTypeTest.php
+3
-3
tests/Unit/Data/Types/StringTypeTest.php
+3
-3
tests/Unit/Data/Types/StringTypeTest.php
+3
-3
tests/Unit/Data/Types/UnionTypeTest.php
+3
-3
tests/Unit/Data/Types/UnionTypeTest.php
+2
-2
tests/Unit/Data/Types/UnknownTypeTest.php
+2
-2
tests/Unit/Data/Types/UnknownTypeTest.php
+4
-4
tests/Unit/Facades/SchemaTest.php
+4
-4
tests/Unit/Facades/SchemaTest.php
+10
-10
tests/Unit/Generator/ClassGeneratorTest.php
+10
-10
tests/Unit/Generator/ClassGeneratorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Exceptions\GenerationException;
8
-
use SocialDept\Schema\Generator\ClassGenerator;
9
-
use SocialDept\Schema\Parser\Nsid;
10
11
class ClassGeneratorTest extends TestCase
12
{
···
105
106
$code = $this->generator->generate($document);
107
108
-
$this->assertStringContainsString('use SocialDept\\Schema\\Data\\Data;', $code);
109
}
110
111
public function test_it_includes_ref_use_statements(): void
···
276
277
$code = $this->generator->generate($document);
278
279
-
$basePos = strpos($code, 'use SocialDept\\Schema\\Data\\Data;');
280
281
$this->assertNotFalse($basePos);
282
$this->assertStringContainsString('class Complex extends Data', $code);
···
288
$typeMapper = $this->generator->getTypeMapper();
289
$renderer = $this->generator->getRenderer();
290
291
-
$this->assertInstanceOf(\SocialDept\Schema\Generator\NamingConverter::class, $naming);
292
-
$this->assertInstanceOf(\SocialDept\Schema\Generator\TypeMapper::class, $typeMapper);
293
-
$this->assertInstanceOf(\SocialDept\Schema\Generator\StubRenderer::class, $renderer);
294
}
295
296
/**
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Exceptions\GenerationException;
8
+
use SocialDept\AtpSchema\Generator\ClassGenerator;
9
+
use SocialDept\AtpSchema\Parser\Nsid;
10
11
class ClassGeneratorTest extends TestCase
12
{
···
105
106
$code = $this->generator->generate($document);
107
108
+
$this->assertStringContainsString('use SocialDept\\AtpSchema\\Data\\Data;', $code);
109
}
110
111
public function test_it_includes_ref_use_statements(): void
···
276
277
$code = $this->generator->generate($document);
278
279
+
$basePos = strpos($code, 'use SocialDept\\AtpSchema\\Data\\Data;');
280
281
$this->assertNotFalse($basePos);
282
$this->assertStringContainsString('class Complex extends Data', $code);
···
288
$typeMapper = $this->generator->getTypeMapper();
289
$renderer = $this->generator->getRenderer();
290
291
+
$this->assertInstanceOf(\SocialDept\AtpSchema\Generator\NamingConverter::class, $naming);
292
+
$this->assertInstanceOf(\SocialDept\AtpSchema\Generator\TypeMapper::class, $typeMapper);
293
+
$this->assertInstanceOf(\SocialDept\AtpSchema\Generator\StubRenderer::class, $renderer);
294
}
295
296
/**
+2
-2
tests/Unit/Generator/ConstructorGeneratorTest.php
+2
-2
tests/Unit/Generator/ConstructorGeneratorTest.php
+4
-4
tests/Unit/Generator/DTOGeneratorTest.php
+4
-4
tests/Unit/Generator/DTOGeneratorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Generator\DTOGenerator;
8
-
use SocialDept\Schema\Parser\SchemaLoader;
9
10
class DTOGeneratorTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Generator\DTOGenerator;
8
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
9
10
class DTOGeneratorTest extends TestCase
11
{
+4
-4
tests/Unit/Generator/DocBlockGeneratorTest.php
+4
-4
tests/Unit/Generator/DocBlockGeneratorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Generator\DocBlockGenerator;
8
-
use SocialDept\Schema\Parser\Nsid;
9
10
class DocBlockGeneratorTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Generator\DocBlockGenerator;
8
+
use SocialDept\AtpSchema\Parser\Nsid;
9
10
class DocBlockGeneratorTest extends TestCase
11
{
+3
-3
tests/Unit/Generator/FileWriterTest.php
+3
-3
tests/Unit/Generator/FileWriterTest.php
+5
-5
tests/Unit/Generator/MethodGeneratorTest.php
+5
-5
tests/Unit/Generator/MethodGeneratorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Generator\MethodGenerator;
8
-
use SocialDept\Schema\Parser\Nsid;
9
10
class MethodGeneratorTest extends TestCase
11
{
···
379
{
380
$mapper = $this->generator->getModelMapper();
381
382
-
$this->assertInstanceOf(\SocialDept\Schema\Generator\ModelMapper::class, $mapper);
383
}
384
385
/**
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Generator\MethodGenerator;
8
+
use SocialDept\AtpSchema\Parser\Nsid;
9
10
class MethodGeneratorTest extends TestCase
11
{
···
379
{
380
$mapper = $this->generator->getModelMapper();
381
382
+
$this->assertInstanceOf(\SocialDept\AtpSchema\Generator\ModelMapper::class, $mapper);
383
}
384
385
/**
+3
-3
tests/Unit/Generator/ModelMapperTest.php
+3
-3
tests/Unit/Generator/ModelMapperTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Generator\ModelMapper;
7
8
class ModelMapperTest extends TestCase
9
{
···
79
'image' => ['type' => 'blob'],
80
]);
81
82
-
$this->assertStringContainsString('\\SocialDept\\Schema\\Data\\BlobReference::fromArray', $body);
83
}
84
85
public function test_it_handles_ref_in_to_model(): void
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Generator\ModelMapper;
7
8
class ModelMapperTest extends TestCase
9
{
···
79
'image' => ['type' => 'blob'],
80
]);
81
82
+
$this->assertStringContainsString('\\SocialDept\\AtpSchema\\Data\\BlobReference::fromArray', $body);
83
}
84
85
public function test_it_handles_ref_in_to_model(): void
+2
-2
tests/Unit/Generator/NamespaceResolverTest.php
+2
-2
tests/Unit/Generator/NamespaceResolverTest.php
+2
-2
tests/Unit/Generator/NamingConverterTest.php
+2
-2
tests/Unit/Generator/NamingConverterTest.php
+2
-2
tests/Unit/Generator/PropertyGeneratorTest.php
+2
-2
tests/Unit/Generator/PropertyGeneratorTest.php
+3
-3
tests/Unit/Generator/StubRendererTest.php
+3
-3
tests/Unit/Generator/StubRendererTest.php
+3
-3
tests/Unit/Generator/TemplateRendererTest.php
+3
-3
tests/Unit/Generator/TemplateRendererTest.php
+4
-4
tests/Unit/Generator/TypeMapperTest.php
+4
-4
tests/Unit/Generator/TypeMapperTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Generator\NamingConverter;
7
-
use SocialDept\Schema\Generator\TypeMapper;
8
9
class TypeMapperTest extends TestCase
10
{
···
234
{
235
$uses = $this->mapper->getUseStatements(['type' => 'blob']);
236
237
-
$this->assertContains('SocialDept\\Schema\\Data\\BlobReference', $uses);
238
}
239
240
public function test_it_gets_use_statements_for_ref(): void
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Generator;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Generator\NamingConverter;
7
+
use SocialDept\AtpSchema\Generator\TypeMapper;
8
9
class TypeMapperTest extends TestCase
10
{
···
234
{
235
$uses = $this->mapper->getUseStatements(['type' => 'blob']);
236
237
+
$this->assertContains('SocialDept\\AtpSchema\\Data\\BlobReference', $uses);
238
}
239
240
public function test_it_gets_use_statements_for_ref(): void
+4
-4
tests/Unit/HelpersTest.php
+4
-4
tests/Unit/HelpersTest.php
+9
-9
tests/Unit/Parser/ComplexTypeParserTest.php
+9
-9
tests/Unit/Parser/ComplexTypeParserTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Parser;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\Types\ArrayType;
7
-
use SocialDept\Schema\Data\Types\BlobType;
8
-
use SocialDept\Schema\Data\Types\ObjectType;
9
-
use SocialDept\Schema\Data\Types\RefType;
10
-
use SocialDept\Schema\Data\Types\StringType;
11
-
use SocialDept\Schema\Data\Types\UnionType;
12
-
use SocialDept\Schema\Exceptions\TypeResolutionException;
13
-
use SocialDept\Schema\Parser\ComplexTypeParser;
14
15
class ComplexTypeParserTest extends TestCase
16
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Parser;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\Types\ArrayType;
7
+
use SocialDept\AtpSchema\Data\Types\BlobType;
8
+
use SocialDept\AtpSchema\Data\Types\ObjectType;
9
+
use SocialDept\AtpSchema\Data\Types\RefType;
10
+
use SocialDept\AtpSchema\Data\Types\StringType;
11
+
use SocialDept\AtpSchema\Data\Types\UnionType;
12
+
use SocialDept\AtpSchema\Exceptions\TypeResolutionException;
13
+
use SocialDept\AtpSchema\Parser\ComplexTypeParser;
14
15
class ComplexTypeParserTest extends TestCase
16
{
+3
-3
tests/Unit/Parser/NsidTest.php
+3
-3
tests/Unit/Parser/NsidTest.php
+10
-10
tests/Unit/Parser/PrimitiveParserTest.php
+10
-10
tests/Unit/Parser/PrimitiveParserTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Parser;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\Types\BooleanType;
7
-
use SocialDept\Schema\Data\Types\BytesType;
8
-
use SocialDept\Schema\Data\Types\CidLinkType;
9
-
use SocialDept\Schema\Data\Types\IntegerType;
10
-
use SocialDept\Schema\Data\Types\NullType;
11
-
use SocialDept\Schema\Data\Types\StringType;
12
-
use SocialDept\Schema\Data\Types\UnknownType;
13
-
use SocialDept\Schema\Exceptions\TypeResolutionException;
14
-
use SocialDept\Schema\Parser\PrimitiveParser;
15
16
class PrimitiveParserTest extends TestCase
17
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Parser;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\Types\BooleanType;
7
+
use SocialDept\AtpSchema\Data\Types\BytesType;
8
+
use SocialDept\AtpSchema\Data\Types\CidLinkType;
9
+
use SocialDept\AtpSchema\Data\Types\IntegerType;
10
+
use SocialDept\AtpSchema\Data\Types\NullType;
11
+
use SocialDept\AtpSchema\Data\Types\StringType;
12
+
use SocialDept\AtpSchema\Data\Types\UnknownType;
13
+
use SocialDept\AtpSchema\Exceptions\TypeResolutionException;
14
+
use SocialDept\AtpSchema\Parser\PrimitiveParser;
15
16
class PrimitiveParserTest extends TestCase
17
{
+5
-5
tests/Unit/Parser/SchemaLoaderTest.php
+5
-5
tests/Unit/Parser/SchemaLoaderTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Parser;
4
5
use Illuminate\Support\Facades\Cache;
6
use Orchestra\Testbench\TestCase;
7
-
use SocialDept\Schema\Data\LexiconDocument;
8
-
use SocialDept\Schema\Exceptions\SchemaNotFoundException;
9
-
use SocialDept\Schema\Exceptions\SchemaParseException;
10
-
use SocialDept\Schema\Parser\SchemaLoader;
11
12
class SchemaLoaderTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Parser;
4
5
use Illuminate\Support\Facades\Cache;
6
use Orchestra\Testbench\TestCase;
7
+
use SocialDept\AtpSchema\Data\LexiconDocument;
8
+
use SocialDept\AtpSchema\Exceptions\SchemaNotFoundException;
9
+
use SocialDept\AtpSchema\Exceptions\SchemaParseException;
10
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
11
12
class SchemaLoaderTest extends TestCase
13
{
+6
-6
tests/Unit/Parser/TypeParserTest.php
+6
-6
tests/Unit/Parser/TypeParserTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Parser;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Data\Types\ObjectType;
8
-
use SocialDept\Schema\Data\Types\StringType;
9
-
use SocialDept\Schema\Exceptions\TypeResolutionException;
10
-
use SocialDept\Schema\Parser\TypeParser;
11
12
class TypeParserTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Parser;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Data\Types\ObjectType;
8
+
use SocialDept\AtpSchema\Data\Types\StringType;
9
+
use SocialDept\AtpSchema\Exceptions\TypeResolutionException;
10
+
use SocialDept\AtpSchema\Parser\TypeParser;
11
12
class TypeParserTest extends TestCase
13
{
+6
-6
tests/Unit/SchemaManagerTest.php
+6
-6
tests/Unit/SchemaManagerTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Generator\DTOGenerator;
8
-
use SocialDept\Schema\Parser\SchemaLoader;
9
-
use SocialDept\Schema\SchemaManager;
10
-
use SocialDept\Schema\Validation\LexiconValidator;
11
12
class SchemaManagerTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Generator\DTOGenerator;
8
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
9
+
use SocialDept\AtpSchema\SchemaManager;
10
+
use SocialDept\AtpSchema\Validation\LexiconValidator;
11
12
class SchemaManagerTest extends TestCase
13
{
+4
-4
tests/Unit/Services/BlobHandlerTest.php
+4
-4
tests/Unit/Services/BlobHandlerTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Services;
4
5
use Illuminate\Http\UploadedFile;
6
use Illuminate\Support\Facades\Storage;
7
use Orchestra\Testbench\TestCase;
8
-
use SocialDept\Schema\Data\BlobReference;
9
-
use SocialDept\Schema\Exceptions\RecordValidationException;
10
-
use SocialDept\Schema\Services\BlobHandler;
11
12
class BlobHandlerTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Services;
4
5
use Illuminate\Http\UploadedFile;
6
use Illuminate\Support\Facades\Storage;
7
use Orchestra\Testbench\TestCase;
8
+
use SocialDept\AtpSchema\Data\BlobReference;
9
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
10
+
use SocialDept\AtpSchema\Services\BlobHandler;
11
12
class BlobHandlerTest extends TestCase
13
{
+4
-4
tests/Unit/Services/ModelMapperTest.php
+4
-4
tests/Unit/Services/ModelMapperTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Services;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Contracts\Transformer;
7
-
use SocialDept\Schema\Exceptions\SchemaException;
8
-
use SocialDept\Schema\Services\ModelMapper;
9
10
class ModelMapperTest extends TestCase
11
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Services;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Contracts\Transformer;
7
+
use SocialDept\AtpSchema\Exceptions\SchemaException;
8
+
use SocialDept\AtpSchema\Services\ModelMapper;
9
10
class ModelMapperTest extends TestCase
11
{
+6
-6
tests/Unit/Services/UnionResolverTest.php
+6
-6
tests/Unit/Services/UnionResolverTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Services;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Contracts\LexiconRegistry;
7
-
use SocialDept\Schema\Data\LexiconDocument;
8
-
use SocialDept\Schema\Exceptions\RecordValidationException;
9
-
use SocialDept\Schema\Parser\Nsid;
10
-
use SocialDept\Schema\Services\UnionResolver;
11
12
class UnionResolverTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Services;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Contracts\LexiconRegistry;
7
+
use SocialDept\AtpSchema\Data\LexiconDocument;
8
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
9
+
use SocialDept\AtpSchema\Parser\Nsid;
10
+
use SocialDept\AtpSchema\Services\UnionResolver;
11
12
class UnionResolverTest extends TestCase
13
{
+2
-2
tests/Unit/Support/ExtensionManagerTest.php
+2
-2
tests/Unit/Support/ExtensionManagerTest.php
+6
-6
tests/Unit/Support/MacroableTest.php
+6
-6
tests/Unit/Support/MacroableTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Support;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Services\BlobHandler;
7
-
use SocialDept\Schema\Services\ModelMapper;
8
-
use SocialDept\Schema\Services\UnionResolver;
9
-
use SocialDept\Schema\Validation\Validator;
10
11
class MacroableTest extends TestCase
12
{
···
74
{
75
Validator::macro('customMethod', fn () => 'validator custom');
76
77
-
$schemaLoader = $this->createMock(\SocialDept\Schema\Parser\SchemaLoader::class);
78
$validator = new Validator($schemaLoader);
79
80
$this->assertEquals('validator custom', $validator->customMethod());
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Support;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Services\BlobHandler;
7
+
use SocialDept\AtpSchema\Services\ModelMapper;
8
+
use SocialDept\AtpSchema\Services\UnionResolver;
9
+
use SocialDept\AtpSchema\Validation\Validator;
10
11
class MacroableTest extends TestCase
12
{
···
74
{
75
Validator::macro('customMethod', fn () => 'validator custom');
76
77
+
$schemaLoader = $this->createMock(\SocialDept\AtpSchema\Parser\SchemaLoader::class);
78
$validator = new Validator($schemaLoader);
79
80
$this->assertEquals('validator custom', $validator->customMethod());
+6
-6
tests/Unit/Validation/LexiconValidatorTest.php
+6
-6
tests/Unit/Validation/LexiconValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Exceptions\RecordValidationException;
8
-
use SocialDept\Schema\Exceptions\SchemaValidationException;
9
-
use SocialDept\Schema\Parser\SchemaLoader;
10
-
use SocialDept\Schema\Validation\LexiconValidator;
11
12
class LexiconValidatorTest extends TestCase
13
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
8
+
use SocialDept\AtpSchema\Exceptions\SchemaValidationException;
9
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
10
+
use SocialDept\AtpSchema\Validation\LexiconValidator;
11
12
class LexiconValidatorTest extends TestCase
13
{
+2
-2
tests/Unit/Validation/Rules/AtDatetimeTest.php
+2
-2
tests/Unit/Validation/Rules/AtDatetimeTest.php
+2
-2
tests/Unit/Validation/Rules/AtUriTest.php
+2
-2
tests/Unit/Validation/Rules/AtUriTest.php
+2
-2
tests/Unit/Validation/Rules/CidTest.php
+2
-2
tests/Unit/Validation/Rules/CidTest.php
+2
-2
tests/Unit/Validation/Rules/DidTest.php
+2
-2
tests/Unit/Validation/Rules/DidTest.php
+2
-2
tests/Unit/Validation/Rules/HandleTest.php
+2
-2
tests/Unit/Validation/Rules/HandleTest.php
+2
-2
tests/Unit/Validation/Rules/LanguageTest.php
+2
-2
tests/Unit/Validation/Rules/LanguageTest.php
+2
-2
tests/Unit/Validation/Rules/MaxGraphemesTest.php
+2
-2
tests/Unit/Validation/Rules/MaxGraphemesTest.php
+2
-2
tests/Unit/Validation/Rules/MinGraphemesTest.php
+2
-2
tests/Unit/Validation/Rules/MinGraphemesTest.php
+2
-2
tests/Unit/Validation/Rules/NsidTest.php
+2
-2
tests/Unit/Validation/Rules/NsidTest.php
+3
-3
tests/Unit/Validation/TypeValidators/ArrayValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/ArrayValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\ArrayValidator;
8
9
class ArrayValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\ArrayValidator;
8
9
class ArrayValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/TypeValidators/BlobValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/BlobValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\BlobValidator;
8
9
class BlobValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\BlobValidator;
8
9
class BlobValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/TypeValidators/BooleanValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/BooleanValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\BooleanValidator;
8
9
class BooleanValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\BooleanValidator;
8
9
class BooleanValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/TypeValidators/IntegerValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/IntegerValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\IntegerValidator;
8
9
class IntegerValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\IntegerValidator;
8
9
class IntegerValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/TypeValidators/ObjectValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/ObjectValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\ObjectValidator;
8
9
class ObjectValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\ObjectValidator;
8
9
class ObjectValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/TypeValidators/StringValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/StringValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\StringValidator;
8
9
class StringValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\StringValidator;
8
9
class StringValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/TypeValidators/UnionValidatorTest.php
+3
-3
tests/Unit/Validation/TypeValidators/UnionValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Exceptions\RecordValidationException;
7
-
use SocialDept\Schema\Validation\TypeValidators\UnionValidator;
8
9
class UnionValidatorTest extends TestCase
10
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation\TypeValidators;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Exceptions\RecordValidationException;
7
+
use SocialDept\AtpSchema\Validation\TypeValidators\UnionValidator;
8
9
class UnionValidatorTest extends TestCase
10
{
+3
-3
tests/Unit/Validation/ValidationErrorFormatterTest.php
+3
-3
tests/Unit/Validation/ValidationErrorFormatterTest.php
+2
-2
tests/Unit/Validation/ValidationErrorTest.php
+2
-2
tests/Unit/Validation/ValidationErrorTest.php
+5
-5
tests/Unit/Validation/ValidatorTest.php
+5
-5
tests/Unit/Validation/ValidatorTest.php
···
1
<?php
2
3
-
namespace SocialDept\Schema\Tests\Unit\Validation;
4
5
use Orchestra\Testbench\TestCase;
6
-
use SocialDept\Schema\Data\LexiconDocument;
7
-
use SocialDept\Schema\Parser\Nsid;
8
-
use SocialDept\Schema\Parser\SchemaLoader;
9
-
use SocialDept\Schema\Validation\Validator;
10
11
class ValidatorTest extends TestCase
12
{
···
1
<?php
2
3
+
namespace SocialDept\AtpSchema\Tests\Unit\Validation;
4
5
use Orchestra\Testbench\TestCase;
6
+
use SocialDept\AtpSchema\Data\LexiconDocument;
7
+
use SocialDept\AtpSchema\Parser\Nsid;
8
+
use SocialDept\AtpSchema\Parser\SchemaLoader;
9
+
use SocialDept\AtpSchema\Validation\Validator;
10
11
class ValidatorTest extends TestCase
12
{