-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathWorkOS.php
More file actions
253 lines (212 loc) · 7.5 KB
/
Copy pathWorkOS.php
File metadata and controls
253 lines (212 loc) · 7.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<?php
declare(strict_types=1);
// This file is auto-generated by oagen. Do not edit.
namespace WorkOS;
use WorkOS\Service\AdminPortal;
use WorkOS\Service\Agents;
use WorkOS\Service\ApiKeys;
use WorkOS\Service\AuditLogs;
use WorkOS\Service\Authorization;
use WorkOS\Service\ClientApi;
use WorkOS\Service\Connect;
use WorkOS\Service\DirectorySync;
use WorkOS\Service\Events;
use WorkOS\Service\FeatureFlags;
use WorkOS\Service\Groups;
use WorkOS\Service\MultiFactorAuth;
use WorkOS\Service\OrganizationDomains;
use WorkOS\Service\OrganizationMembershipService;
use WorkOS\Service\Organizations;
use WorkOS\Service\Pipes;
use WorkOS\Service\PipesProvider;
use WorkOS\Service\PlatformTeams;
use WorkOS\Service\Radar;
use WorkOS\Service\SSO;
use WorkOS\Service\UserManagement;
use WorkOS\Service\Vault;
use WorkOS\Service\Webhooks;
use WorkOS\Service\Widgets;
class WorkOS
{
private static ?string $apiKey = null;
private static ?string $clientId = null;
private ?HttpClient $httpClient = null;
public static function getApiKey(): ?string
{
return self::$apiKey;
}
public static function setApiKey(?string $key): void
{
self::$apiKey = $key;
}
public static function getClientId(): ?string
{
return self::$clientId;
}
public static function setClientId(?string $id): void
{
self::$clientId = $id;
}
private ?Service\Agents $agents = null;
private ?Service\MultiFactorAuth $multiFactorAuth = null;
private ?Service\Connect $connect = null;
private ?Service\Authorization $authorization = null;
private ?Service\ClientApi $clientApi = null;
private ?Service\SSO $sso = null;
private ?Service\Pipes $pipes = null;
private ?Service\DirectorySync $directorySync = null;
private ?Service\Events $events = null;
private ?Service\FeatureFlags $featureFlags = null;
private ?Service\OrganizationDomains $organizationDomains = null;
private ?Service\Organizations $organizations = null;
private ?Service\ApiKeys $apiKeys = null;
private ?Service\PipesProvider $pipesProvider = null;
private ?Service\Groups $groups = null;
private ?Service\PlatformTeams $platformTeams = null;
private ?Service\AdminPortal $adminPortal = null;
private ?Service\Radar $radar = null;
private ?Service\UserManagement $userManagement = null;
private ?Service\OrganizationMembershipService $organizationMembership = null;
private ?Service\Vault $vault = null;
private ?Service\Webhooks $webhooks = null;
private ?Service\Widgets $widgets = null;
private ?Service\AuditLogs $auditLogs = null;
public function __construct(
?string $apiKey = null,
?string $clientId = null,
string $baseUrl = 'https://api.workos.com',
int $timeout = 60,
int $maxRetries = 3,
?\GuzzleHttp\HandlerStack $handler = null,
?string $userAgent = null,
) {
$apiKey ??= getenv('WORKOS_API_KEY') ?: self::$apiKey ?? '';
$clientId ??= getenv('WORKOS_CLIENT_ID') ?: self::$clientId;
$this->httpClient = new HttpClient($apiKey, $clientId, $baseUrl, $timeout, $maxRetries, $handler, $userAgent);
}
public function agents(): Agents
{
return $this->agents ??= new Service\Agents($this->httpClient);
}
public function multiFactorAuth(): MultiFactorAuth
{
return $this->multiFactorAuth ??= new Service\MultiFactorAuth($this->httpClient);
}
public function connect(): Connect
{
return $this->connect ??= new Service\Connect($this->httpClient);
}
public function authorization(): Authorization
{
return $this->authorization ??= new Service\Authorization($this->httpClient);
}
public function clientApi(): ClientApi
{
return $this->clientApi ??= new Service\ClientApi($this->httpClient);
}
public function sso(): SSO
{
return $this->sso ??= new Service\SSO($this->httpClient);
}
public function pipes(): Pipes
{
return $this->pipes ??= new Service\Pipes($this->httpClient);
}
public function directorySync(): DirectorySync
{
return $this->directorySync ??= new Service\DirectorySync($this->httpClient);
}
public function events(): Events
{
return $this->events ??= new Service\Events($this->httpClient);
}
public function featureFlags(): FeatureFlags
{
return $this->featureFlags ??= new Service\FeatureFlags($this->httpClient);
}
public function organizationDomains(): OrganizationDomains
{
return $this->organizationDomains ??= new Service\OrganizationDomains($this->httpClient);
}
public function organizations(): Organizations
{
return $this->organizations ??= new Service\Organizations($this->httpClient);
}
public function apiKeys(): ApiKeys
{
return $this->apiKeys ??= new Service\ApiKeys($this->httpClient);
}
public function pipesProvider(): PipesProvider
{
return $this->pipesProvider ??= new Service\PipesProvider($this->httpClient);
}
public function groups(): Groups
{
return $this->groups ??= new Service\Groups($this->httpClient);
}
public function platformTeams(): PlatformTeams
{
return $this->platformTeams ??= new Service\PlatformTeams($this->httpClient);
}
public function adminPortal(): AdminPortal
{
return $this->adminPortal ??= new Service\AdminPortal($this->httpClient);
}
public function radar(): Radar
{
return $this->radar ??= new Service\Radar($this->httpClient);
}
public function userManagement(): UserManagement
{
return $this->userManagement ??= new Service\UserManagement($this->httpClient);
}
public function organizationMembership(): OrganizationMembershipService
{
return $this->organizationMembership ??= new Service\OrganizationMembershipService($this->httpClient);
}
public function vault(): Vault
{
return $this->vault ??= new Service\Vault($this->httpClient);
}
public function webhooks(): Webhooks
{
return $this->webhooks ??= new Service\Webhooks($this->httpClient);
}
public function widgets(): Widgets
{
return $this->widgets ??= new Service\Widgets($this->httpClient);
}
public function auditLogs(): AuditLogs
{
return $this->auditLogs ??= new Service\AuditLogs($this->httpClient);
}
// @oagen-ignore-start — non-spec service accessors (hand-maintained)
public function passwordless(): Passwordless
{
return $this->passwordless ??= new Passwordless($this->httpClient);
}
public function webhookVerification(): WebhookVerification
{
return $this->webhookVerification ??= new WebhookVerification($this->httpClient);
}
public function actions(): Actions
{
return $this->actions ??= new Actions($this->httpClient);
}
public function sessionManager(): SessionManager
{
return $this->sessionManager ??= new SessionManager($this->httpClient);
}
public function pkce(): PKCEHelper
{
return $this->pkce ??= new PKCEHelper($this->httpClient);
}
// @oagen-ignore-end
// @oagen-ignore-start — non-spec service properties (hand-maintained)
private ?Passwordless $passwordless = null;
private ?WebhookVerification $webhookVerification = null;
private ?Actions $actions = null;
private ?SessionManager $sessionManager = null;
private ?PKCEHelper $pkce = null;
// @oagen-ignore-end
}