Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
* [#412](https://github.com/workos/workos-php/pull/412) feat(generated): regenerate from spec (2 changes)

**Features**
* **[radar](https://workos.com/docs/reference/radar)**:
* Added `signals_id` to `RadarStandaloneAssessRequest`
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
* Added model `SendRadarSmsChallenge`
* Added model `SendRadarSmsChallengeResponse`
* Added model `UrnWorkosOAuthGrantTypeRadarEmailChallengeCodeSessionAuthenticateRequest`
* Added model `UrnWorkosOAuthGrantTypeRadarSmsChallengeCodeSessionAuthenticateRequest`
* Added model `MagicAuthSendMagicAuthCodeAndReturnResponse`
* Added model `UserCreateResponse`
* Added `ip_address` to `CreateMagicCodeAndReturn`
* Added `user_agent` to `CreateMagicCodeAndReturn`
* Added `radar_auth_attempt_id` to `CreateMagicCodeAndReturn`
* Added `signals_id` to `CreateMagicCodeAndReturn`
* Added `ip_address` to `CreateUser`
* Added `user_agent` to `CreateUser`
* Added `signals_id` to `CreateUser`
* Added `signals_id` to `AuthorizationCodeSessionAuthenticateRequest`
* Added `signals_id` to `PasswordSessionAuthenticateRequest`
* Added `radar_auth_attempt_id` to `PasswordSessionAuthenticateRequest`
* Added `radar_auth_attempt_id` to `UrnWorkosOAuthGrantTypeMagicAuthCodeSessionAuthenticateRequest`
* Added endpoint `POST /user_management/radar_challenges`

**Fixes**
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
* Changed request body for `UserManagementAuthentication.authenticate`
* Changed response of `UserManagementUsers.create` from `User` to `UserCreateResponse`
* Changed response of `UserManagementMagicAuth.sendMagicAuthCodeAndReturn` from `MagicAuth` to `MagicAuthSendMagicAuthCodeAndReturnResponse`
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dc04d30b352063b5c97e45de03be5c83629f5412
4b4e0618779460dbebc1cf5e0f02197c21796d1f
46 changes: 45 additions & 1 deletion .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "php",
"generatedAt": "2026-07-01T18:19:15.811Z",
"generatedAt": "2026-07-02T14:11:07.085Z",
"files": [
"lib/Resource/ActionAuthenticationDenied.php",
"lib/Resource/ActionAuthenticationDeniedData.php",
Expand Down Expand Up @@ -331,6 +331,7 @@
"lib/Resource/MagicAuthCodeSessionAuthenticateRequest.php",
"lib/Resource/MagicAuthCreated.php",
"lib/Resource/MagicAuthCreatedData.php",
"lib/Resource/MagicAuthSendMagicAuthCodeAndReturnResponse.php",
"lib/Resource/NewConnectApplicationSecret.php",
"lib/Resource/ObjectMetadata.php",
"lib/Resource/ObjectSummary.php",
Expand Down Expand Up @@ -405,9 +406,11 @@
"lib/Resource/PipesConnectedAccountReauthorizationNeeded.php",
"lib/Resource/PortalLinkResponse.php",
"lib/Resource/Profile.php",
"lib/Resource/RadarEmailChallengeCodeSessionAuthenticateRequest.php",
"lib/Resource/RadarListAction.php",
"lib/Resource/RadarListEntryAlreadyPresentResponse.php",
"lib/Resource/RadarListType.php",
"lib/Resource/RadarSmsChallengeCodeSessionAuthenticateRequest.php",
"lib/Resource/RadarStandaloneAssessRequest.php",
"lib/Resource/RadarStandaloneAssessRequestAction.php",
"lib/Resource/RadarStandaloneAssessRequestAuthMethod.php",
Expand Down Expand Up @@ -445,6 +448,8 @@
"lib/Resource/SSOTokenResponse.php",
"lib/Resource/SSOTokenResponseOAuthToken.php",
"lib/Resource/SendEmailChange.php",
"lib/Resource/SendRadarSmsChallenge.php",
"lib/Resource/SendRadarSmsChallengeResponse.php",
"lib/Resource/SendVerificationEmailResponse.php",
"lib/Resource/SessionCreated.php",
"lib/Resource/SessionCreatedData.php",
Expand Down Expand Up @@ -479,6 +484,7 @@
"lib/Resource/UserAuthenticationFactorEnrollResponse.php",
"lib/Resource/UserConsentOption.php",
"lib/Resource/UserConsentOptionChoice.php",
"lib/Resource/UserCreateResponse.php",
"lib/Resource/UserCreated.php",
"lib/Resource/UserDeleted.php",
"lib/Resource/UserIdentitiesGetItem.php",
Expand Down Expand Up @@ -893,6 +899,7 @@
"tests/Fixtures/magic_auth_code_session_authenticate_request.json",
"tests/Fixtures/magic_auth_created.json",
"tests/Fixtures/magic_auth_created_data.json",
"tests/Fixtures/magic_auth_send_magic_auth_code_and_return_response.json",
"tests/Fixtures/mfa_totp_session_authenticate_request.json",
"tests/Fixtures/new_connect_application_secret.json",
"tests/Fixtures/object_metadata.json",
Expand Down Expand Up @@ -963,7 +970,9 @@
"tests/Fixtures/pipes_connected_account_reauthorization_needed.json",
"tests/Fixtures/portal_link_response.json",
"tests/Fixtures/profile.json",
"tests/Fixtures/radar_email_challenge_code_session_authenticate_request.json",
"tests/Fixtures/radar_list_entry_already_present_response.json",
"tests/Fixtures/radar_sms_challenge_code_session_authenticate_request.json",
"tests/Fixtures/radar_standalone_assess_request.json",
"tests/Fixtures/radar_standalone_delete_radar_list_entry_request.json",
"tests/Fixtures/radar_standalone_response.json",
Expand All @@ -988,6 +997,8 @@
"tests/Fixtures/role_updated.json",
"tests/Fixtures/role_updated_data.json",
"tests/Fixtures/send_email_change.json",
"tests/Fixtures/send_radar_sms_challenge.json",
"tests/Fixtures/send_radar_sms_challenge_response.json",
"tests/Fixtures/send_verification_email_response.json",
"tests/Fixtures/session_created.json",
"tests/Fixtures/session_created_data.json",
Expand Down Expand Up @@ -1032,6 +1043,7 @@
"tests/Fixtures/user_authentication_factor_enroll_response.json",
"tests/Fixtures/user_consent_option.json",
"tests/Fixtures/user_consent_option_choice.json",
"tests/Fixtures/user_create_response.json",
"tests/Fixtures/user_created.json",
"tests/Fixtures/user_deleted.json",
"tests/Fixtures/user_identities_get_item.json",
Expand Down Expand Up @@ -1890,6 +1902,38 @@
"GET /user_management/redirect_uris": {
"sdkMethod": "listRedirectUris",
"service": "userManagement"
},
"GET /data-integrations": {
"sdkMethod": "listDataIntegrations",
"service": "pipes"
},
"POST /data-integrations": {
"sdkMethod": "createDataIntegration",
"service": "pipes"
},
"GET /data-integrations/{slug}": {
"sdkMethod": "getDataIntegration",
"service": "pipes"
},
"PUT /data-integrations/{slug}": {
"sdkMethod": "updateDataIntegration",
"service": "pipes"
},
"DELETE /data-integrations/{slug}": {
"sdkMethod": "deleteDataIntegration",
"service": "pipes"
},
"POST /user_management/radar_challenges": {
"sdkMethod": "createRadarChallenge",
"service": "userManagement"
},
"POST /user_management/users/{user_id}/connected_accounts/{slug}": {
"sdkMethod": "createUserConnectedAccount",
"service": "pipes"
},
"PUT /user_management/users/{user_id}/connected_accounts/{slug}": {
"sdkMethod": "updateUserConnectedAccount",
"service": "pipes"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function __construct(
public ?string $deviceId = null,
/** The user agent string from the user's browser. */
public ?string $userAgent = null,
/** An optional Radar signals ID to correlate client-side signals with this authentication attempt. */
public ?string $signalsId = null,
) {
}

Expand All @@ -43,6 +45,7 @@ public static function fromArray(array $data): self
ipAddress: $data['ip_address'] ?? null,
deviceId: $data['device_id'] ?? null,
userAgent: $data['user_agent'] ?? null,
signalsId: $data['signals_id'] ?? null,
);
}

Expand All @@ -58,6 +61,7 @@ public function toArray(): array
'ip_address' => $this->ipAddress,
'device_id' => $this->deviceId,
'user_agent' => $this->userAgent,
'signals_id' => $this->signalsId,
];
}
}
16 changes: 16 additions & 0 deletions lib/Resource/CreateMagicCodeAndReturn.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ public function __construct(
public string $email,
/** The invitation token to associate with this magic code. */
public ?string $invitationToken = null,
/** The IP address of the user's request. */
public ?string $ipAddress = null,
/** The user agent string from the user's request. */
public ?string $userAgent = null,
/** The ID of an existing Radar authentication attempt to associate with this request. */
public ?string $radarAuthAttemptId = null,
/** An optional Radar signals ID to correlate client-side signals with this request. */
public ?string $signalsId = null,
) {
}

Expand All @@ -23,6 +31,10 @@ public static function fromArray(array $data): self
return new self(
email: $data['email'],
invitationToken: $data['invitation_token'] ?? null,
ipAddress: $data['ip_address'] ?? null,
userAgent: $data['user_agent'] ?? null,
radarAuthAttemptId: $data['radar_auth_attempt_id'] ?? null,
signalsId: $data['signals_id'] ?? null,
);
}

Expand All @@ -31,6 +43,10 @@ public function toArray(): array
return [
'email' => $this->email,
'invitation_token' => $this->invitationToken,
'ip_address' => $this->ipAddress,
'user_agent' => $this->userAgent,
'radar_auth_attempt_id' => $this->radarAuthAttemptId,
'signals_id' => $this->signalsId,
];
}
}
12 changes: 12 additions & 0 deletions lib/Resource/CreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public function __construct(
public ?array $metadata = null,
/** The external ID of the user. */
public ?string $externalId = null,
/** The IP address of the user's request. */
public ?string $ipAddress = null,
/** The user agent string from the user's request. */
public ?string $userAgent = null,
/** An optional Radar signals ID to correlate client-side signals with this request. */
public ?string $signalsId = null,
/** The password to set for the user. Mutually exclusive with `password_hash` and `password_hash_type`. */
public ?string $password = null,
/** The hashed password to set for the user. Required with `password_hash_type`. Mutually exclusive with `password`. */
Expand All @@ -47,6 +53,9 @@ public static function fromArray(array $data): self
emailVerified: $data['email_verified'] ?? null,
metadata: $data['metadata'] ?? null,
externalId: $data['external_id'] ?? null,
ipAddress: $data['ip_address'] ?? null,
userAgent: $data['user_agent'] ?? null,
signalsId: $data['signals_id'] ?? null,
password: $data['password'] ?? null,
passwordHash: $data['password_hash'] ?? null,
passwordHashType: isset($data['password_hash_type']) ? CreateUserPasswordHashType::from($data['password_hash_type']) : null,
Expand All @@ -63,6 +72,9 @@ public function toArray(): array
'email_verified' => $this->emailVerified,
'metadata' => $this->metadata,
'external_id' => $this->externalId,
'ip_address' => $this->ipAddress,
'user_agent' => $this->userAgent,
'signals_id' => $this->signalsId,
'password' => $this->password,
'password_hash' => $this->passwordHash,
'password_hash_type' => $this->passwordHashType?->value,
Expand Down
4 changes: 4 additions & 0 deletions lib/Resource/MagicAuthCodeSessionAuthenticateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function __construct(
public ?string $deviceId = null,
/** The user agent string from the user's browser. */
public ?string $userAgent = null,
/** The ID of an existing Radar authentication attempt to associate with this authentication. */
public ?string $radarAuthAttemptId = null,
) {
}

Expand All @@ -43,6 +45,7 @@ public static function fromArray(array $data): self
ipAddress: $data['ip_address'] ?? null,
deviceId: $data['device_id'] ?? null,
userAgent: $data['user_agent'] ?? null,
radarAuthAttemptId: $data['radar_auth_attempt_id'] ?? null,
);
}

Expand All @@ -58,6 +61,7 @@ public function toArray(): array
'ip_address' => $this->ipAddress,
'device_id' => $this->deviceId,
'user_agent' => $this->userAgent,
'radar_auth_attempt_id' => $this->radarAuthAttemptId,
];
}
}
32 changes: 32 additions & 0 deletions lib/Resource/MagicAuthSendMagicAuthCodeAndReturnResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

readonly class MagicAuthSendMagicAuthCodeAndReturnResponse implements \JsonSerializable
{
use JsonSerializableTrait;

public function __construct(
/** The ID of the Radar authentication attempt created for this request when Radar is enabled. Pass this value to the authenticate endpoint to associate the subsequent authentication with this Radar attempt. */
public ?string $radarAuthAttemptId = null,
) {
}

public static function fromArray(array $data): self
{
return new self(
radarAuthAttemptId: $data['radar_auth_attempt_id'] ?? null,
);
}

public function toArray(): array
{
return [
'radar_auth_attempt_id' => $this->radarAuthAttemptId,
];
}
}
8 changes: 8 additions & 0 deletions lib/Resource/PasswordSessionAuthenticateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public function __construct(
public ?string $deviceId = null,
/** The user agent string from the user's browser. */
public ?string $userAgent = null,
/** An optional Radar signals ID to correlate client-side signals with this authentication attempt. */
public ?string $signalsId = null,
/** The ID of an existing Radar authentication attempt to associate with this authentication. */
public ?string $radarAuthAttemptId = null,
) {
}

Expand All @@ -43,6 +47,8 @@ public static function fromArray(array $data): self
ipAddress: $data['ip_address'] ?? null,
deviceId: $data['device_id'] ?? null,
userAgent: $data['user_agent'] ?? null,
signalsId: $data['signals_id'] ?? null,
radarAuthAttemptId: $data['radar_auth_attempt_id'] ?? null,
);
}

Expand All @@ -58,6 +64,8 @@ public function toArray(): array
'ip_address' => $this->ipAddress,
'device_id' => $this->deviceId,
'user_agent' => $this->userAgent,
'signals_id' => $this->signalsId,
'radar_auth_attempt_id' => $this->radarAuthAttemptId,
];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php

declare(strict_types=1);

// This file is auto-generated by oagen. Do not edit.

namespace WorkOS\Resource;

readonly class RadarEmailChallengeCodeSessionAuthenticateRequest implements \JsonSerializable
{
use JsonSerializableTrait;

public function __construct(
/** The client ID of the application. */
public string $clientId,
/** The client secret of the application. */
public string $clientSecret,
public string $grantType,
/** The one-time code from the Radar email challenge. */
public string $code,
/** The ID of the Radar email challenge being verified. */
public string $radarChallengeId,
/** The pending authentication token from a previous authentication attempt. */
public string $pendingAuthenticationToken,
/** The IP address of the user's request. */
public ?string $ipAddress = null,
/** A unique identifier for the device. */
public ?string $deviceId = null,
/** The user agent string from the user's browser. */
public ?string $userAgent = null,
) {
}

public static function fromArray(array $data): self
{
return new self(
clientId: $data['client_id'],
clientSecret: $data['client_secret'],
grantType: $data['grant_type'] ?? 'urn:workos:oauth:grant-type:radar-email-challenge:code',
code: $data['code'],
radarChallengeId: $data['radar_challenge_id'],
pendingAuthenticationToken: $data['pending_authentication_token'],
ipAddress: $data['ip_address'] ?? null,
deviceId: $data['device_id'] ?? null,
userAgent: $data['user_agent'] ?? null,
);
}

public function toArray(): array
{
return [
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
'grant_type' => $this->grantType,
'code' => $this->code,
'radar_challenge_id' => $this->radarChallengeId,
'pending_authentication_token' => $this->pendingAuthenticationToken,
'ip_address' => $this->ipAddress,
'device_id' => $this->deviceId,
'user_agent' => $this->userAgent,
];
}
}
Loading