5
5
namespace Typesense ;
6
6
7
7
use Psr \Http \Client \ClientInterface ;
8
+ use Typesense \Requests \Alias ;
9
+ use Typesense \Requests \Analytic ;
10
+ use Typesense \Requests \Cluster ;
8
11
use Typesense \Requests \Collection ;
12
+ use Typesense \Requests \Curation ;
9
13
use Typesense \Requests \Document ;
14
+ use Typesense \Requests \Key ;
15
+ use Typesense \Requests \Synonym ;
10
16
11
17
/**
12
18
* @phpstan-type TypesenseConfiguration array{
17
23
*/
18
24
class Typesense
19
25
{
20
- public Http $ http ;
26
+ public readonly Http $ http ;
21
27
22
- public Collection $ collection ;
28
+ public readonly Collection $ collection ;
23
29
24
- public Document $ document ;
30
+ public readonly Document $ document ;
31
+
32
+ public readonly Analytic $ analytic ;
33
+
34
+ public readonly Key $ key ;
35
+
36
+ public readonly Curation $ curation ;
37
+
38
+ public readonly Alias $ alias ;
39
+
40
+ public readonly Synonym $ synonym ;
41
+
42
+ public readonly Cluster $ cluster ;
25
43
26
44
/**
27
45
* @param TypesenseConfiguration $config
@@ -33,6 +51,18 @@ public function __construct(array $config)
33
51
$ this ->collection = new Collection ($ this ->http );
34
52
35
53
$ this ->document = new Document ($ this ->http );
54
+
55
+ $ this ->analytic = new Analytic ($ this ->http );
56
+
57
+ $ this ->key = new Key ($ this ->http );
58
+
59
+ $ this ->curation = new Curation ($ this ->http );
60
+
61
+ $ this ->alias = new Alias ($ this ->http );
62
+
63
+ $ this ->synonym = new Synonym ($ this ->http );
64
+
65
+ $ this ->cluster = new Cluster ($ this ->http );
36
66
}
37
67
38
68
public function setUrl (string $ url ): static
0 commit comments