Skip to content

v7.0.0-beta.1

Pre-release
Pre-release

Choose a tag to compare

@fingerprint-dx-team fingerprint-dx-team released this 14 Apr 19:52
· 221 commits to main since this release
5b98295

Major Changes

  • Migrate to Server API v4.

    Breaking Changes

    • Flatten event structure. Access fields directly instead of through products wrapper/container.
    • Remove getVisits and getRelatedVisitors endpoints (use searchEvents instead).
    • Remove deprecated v3 models (webhook models, product wrapper models, etc.).
    • Rename getEvent parameter $request_id to $event_id. Return type changed from array to Event.
    • Change updateEvent parameter order and body class (EventsUpdateRequest → EventUpdate). Return type changed from array to void. HTTP method changed from PUT to PATCH.
    • Change searchEvents return type from array to EventSearch. new search parameters added.
    • Change deleteVisitorData return type from array to void.
    • Require API key in Configuration constructor: new Configuration(string $apiKey). Remove getDefaultConfiguration() and setDefaultConfiguration().
    • Simplify setApiKey/getApiKey to single-key (no identifier). Remove unnecessary setApiKeyPrefix, setAccessToken, setUsername, setPassword methods.
    • Switch authentication from API key header to Authorization: Bearer token.
    • Change all JSON serialization keys from camelCase to snake_case.
    • Change ErrorCode enum values from PascalCase to snake_case.
    • Append /v4 to all region base URLs.
    • Changed method return signature of operations.

    Migration Guide

    Response/Model structure:

    - $event->getProducts()->getIdentification()->getData()->getVisitorId()
    + $event->getIdentification()->getVisitorId()

    Configuration:

    - $config = Configuration::getDefaultConfiguration('secret-api-key');
    + $config = new Configuration('secret-api-key');

    Region parameter:

    - $config = Configuration::getDefaultConfiguration('key', Configuration::REGION_EUROPE);
    + $config = new Configuration('key', Configuration::REGION_EUROPE);

    New operation return format:

    - list($event, $response) = $api->getEvent($requestId);
    + $event = $api->getEvent($eventId);

    If you need raw response:

    - list($event, $response) = $api->getEvent($requestId);
    + list($event, $response) = $api->getEventWithHttpInfo($eventId);

    Update event:

    - $body = new EventsUpdateRequest(['tag' => ['key' => 'value']]);
    - $api->updateEvent($body, $requestId);
    + $body = new EventUpdate(['tags' => ['key' => 'value']]);
    + $api->updateEvent($eventId, $body);

    New Features

    • New v4 models: BotInfo, Canvas, Emoji, EventRuleAction, RawDeviceAttributes, TamperingDetails, ...
    • New enum models: BotResult, TamperingConfidence, VpnConfidence, ProxyConfidence, RuleActionType, ...
    • New WithHttpInfo method variants for all operations. Each operation now exposes four methods: {operationId}(), {operationId}WithHttpInfo(), {operationId}Async(), {operationId}AsyncWithHttpInfo().
    • mTLS support with setCertFile() and setKeyFile() on Configuration. (67ac090)
  • Drop PHP 8.1 support. Minimum required PHP version is now 8.2. (72432d3)

  • Changed package name to fingerprint/server-sdk

    BREAKING CHANGE:

    • Update the composer dependency to fingerprint/server-sdk
    • Update all use statements to the new namespace Fingerprint\ServerSdk

    MIGRATION GUIDE:

    Replace composer.json dependency:

    "require": {
    -    "fingerprint/fingerprint-pro-server-api-sdk": "^6.10.0"
    +    "fingerprint/server-sdk": "^7.0.0"
    }

    Replace all use statements with the new namespace:

    -use Fingerprint\ServerAPI\Configuration;
    +use Fingerprint\ServerSdk\Configuration;

    The above example applies to all Fingerprint\ServerAPI references. (c72108a)