diff --git a/.changeset/pre.json b/.changeset/pre.json index 71a027f6..c161099b 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,6 +1,6 @@ { "mode": "pre", - "tag": "rc", + "tag": "exit", "initialVersions": { "fingerprint-pro-server-api-php-sdk": "5.1.1" }, diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 9dc31240..83b79054 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -16,7 +16,7 @@ jobs: strategy: max-parallel: 1 matrix: - php_version: [ "8.1", "8.2", "8.3" ] + php_version: [ "8.1", "8.2", "8.3", "8.4" ] steps: - uses: actions/checkout@v4 with: @@ -45,4 +45,4 @@ jobs: notification_title: 'PHP SDK Tests has {status_message}' job_status: ${{ needs.functional_tests.result }} secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d84fd91..f488983f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - php_version: [ "8.1", "8.2", "8.3" ] + php_version: [ "8.1", "8.2", "8.3", "8.4" ] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index a4ed753a..39f2554c 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ $client = new FingerprintApi( try { // Fetch the event with a given requestId list($model, $response) = $client->getEvent(FPJS_REQUEST_ID); - echo "
" . $response->__toString() . "
"; + echo "
" . $response->getBody()->getContents() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; } diff --git a/docs/Model/BotdBotResult.md b/docs/Model/BotdBotResult.md index 6094b1b3..e13c25db 100644 --- a/docs/Model/BotdBotResult.md +++ b/docs/Model/BotdBotResult.md @@ -1,10 +1,7 @@ # BotdBotResult -Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on +Bot detection result: + * `notDetected` - the visitor is not a bot + * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on + * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/Model/ErrorCode.md b/docs/Model/ErrorCode.md index f3a7152c..8d718997 100644 --- a/docs/Model/ErrorCode.md +++ b/docs/Model/ErrorCode.md @@ -1,10 +1,21 @@ # ErrorCode -Error code: * `RequestCannotBeParsed` - the query parameters or JSON payload contains some errors that prevented us from parsing it (wrong type/surpassed limits). * `TokenRequired` - `Auth-API-Key` header is missing or empty. * `TokenNotFound` - no Fingerprint application found for specified secret key. * `SubscriptionNotActive` - Fingerprint application is not active. * `WrongRegion` - server and application region differ. * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application. * `RequestNotFound` - the specified request ID was not found. It never existed, expired, or it has been deleted. * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. * `TooManyRequests` - the limit on secret API key requests per second has been exceeded. * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded. * `StateNotReady` - The event specified with request id is not ready for updates yet. Try again. This error happens in rare cases when update API is called immediately after receiving the request id on the client. In case you need to send information right away, we recommend using the JS agent API instead. * `Failed` - internal server error. +Error code: + * `RequestCannotBeParsed` - the query parameters or JSON payload contains some errors + that prevented us from parsing it (wrong type/surpassed limits). + * `TokenRequired` - `Auth-API-Key` header is missing or empty. + * `TokenNotFound` - no Fingerprint application found for specified secret key. + * `SubscriptionNotActive` - Fingerprint application is not active. + * `WrongRegion` - server and application region differ. + * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application. + * `RequestNotFound` - the specified request ID was not found. It never existed, expired, or it has been deleted. + * `VisitorNotFound` - The specified visitor ID was not found. It never existed or it may have already been deleted. + * `TooManyRequests` - the limit on secret API key requests per second has been exceeded. + * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded. + * `StateNotReady` - The event specified with request id is + not ready for updates yet. Try again. + This error happens in rare cases when update API is called immediately + after receiving the request id on the client. In case you need to send + information right away, we recommend using the JS agent API instead. + * `Failed` - internal server error. -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/docs/Model/VPNConfidence.md b/docs/Model/VPNConfidence.md index ed8d367c..bc6faed5 100644 --- a/docs/Model/VPNConfidence.md +++ b/docs/Model/VPNConfidence.md @@ -1,10 +1,3 @@ # VPNConfidence -A confidence rating for the VPN detection result — \"low\", \"medium\", or \"high\". Depends on the combination of results returned from all VPN detection methods. - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) +A confidence rating for the VPN detection result — "low", "medium", or "high". Depends on the combination of results returned from all VPN detection methods. diff --git a/docs/Model/Velocity.md b/docs/Model/Velocity.md index b1e93870..1f145a41 100644 --- a/docs/Model/Velocity.md +++ b/docs/Model/Velocity.md @@ -1,5 +1,20 @@ # Velocity -Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time intervals: 5 minutes, 1 hour, and 24 hours as follows: - Number of distinct IP addresses associated to the visitor ID. - Number of distinct linked IDs associated with the visitor ID. - Number of distinct countries associated with the visitor ID. - Number of identification events associated with the visitor ID. - Number of identification events associated with the detected IP address. - Number of distinct IP addresses associated with the provided linked ID. - Number of distinct visitor IDs associated with the provided linked ID. The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, `distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted if the number of `events` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. +Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time +intervals: 5 minutes, 1 hour, and 24 hours as follows: + +- Number of distinct IP addresses associated to the visitor ID. +- Number of distinct linked IDs associated with the visitor ID. +- Number of distinct countries associated with the visitor ID. +- Number of identification events associated with the visitor ID. +- Number of identification events associated with the detected IP address. +- Number of distinct IP addresses associated with the provided linked ID. +- Number of distinct visitor IDs associated with the provided linked ID. + +The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, +`distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted +if the number of `events` for the visitor ID in the last 24 +hours (`events.intervals.['24h']`) is higher than 20.000. + ## Properties diff --git a/docs/Model/VelocityIntervals.md b/docs/Model/VelocityIntervals.md index 7c0c94be..e6e408f4 100644 --- a/docs/Model/VelocityIntervals.md +++ b/docs/Model/VelocityIntervals.md @@ -2,6 +2,7 @@ Is absent if the velocity data could not be generated for the visitor ID. + ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Model/WebhookVelocity.md b/docs/Model/WebhookVelocity.md index 2e318d1f..74388081 100644 --- a/docs/Model/WebhookVelocity.md +++ b/docs/Model/WebhookVelocity.md @@ -1,5 +1,20 @@ # WebhookVelocity -Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time intervals: 5 minutes, 1 hour, and 24 hours as follows: - Number of distinct IP addresses associated to the visitor ID. - Number of distinct linked IDs associated with the visitor ID. - Number of distinct countries associated with the visitor ID. - Number of identification events associated with the visitor ID. - Number of identification events associated with the detected IP address. - Number of distinct IP addresses associated with the provided linked ID. - Number of distinct visitor IDs associated with the provided linked ID. The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, `distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted if the number of `events` for the visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher than 20.000. +Sums key data points for a specific `visitorId`, `ipAddress` and `linkedId` at three distinct time +intervals: 5 minutes, 1 hour, and 24 hours as follows: + +- Number of distinct IP addresses associated to the visitor ID. +- Number of distinct linked IDs associated with the visitor ID. +- Number of distinct countries associated with the visitor ID. +- Number of identification events associated with the visitor ID. +- Number of identification events associated with the detected IP address. +- Number of distinct IP addresses associated with the provided linked ID. +- Number of distinct visitor IDs associated with the provided linked ID. + +The `24h` interval of `distinctIp`, `distinctLinkedId`, `distinctCountry`, +`distinctIpByLinkedId` and `distinctVisitorIdByLinkedId` will be omitted +if the number of `events` for the visitor ID in the last 24 +hours (`events.intervals.['24h']`) is higher than 20.000. + ## Properties diff --git a/template/README.mustache b/template/README.mustache index 866b7df5..598f8fea 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -117,7 +117,7 @@ $client = new FingerprintApi( try { // Fetch the event with a given requestId list($model, $response) = $client->getEvent(FPJS_REQUEST_ID); - echo "
" . $response->__toString() . "
"; + echo "
" . $response->getBody()->getContents() . "
"; } catch (Exception $e) { echo 'Exception when calling FingerprintApi->getEvent: ', $e->getMessage(), PHP_EOL; } diff --git a/template/model_doc.mustache b/template/model_doc.mustache index ec5f0209..8426239d 100644 --- a/template/model_doc.mustache +++ b/template/model_doc.mustache @@ -1,8 +1,9 @@ {{#models}}{{#model}}# {{classname}} -{{#description}} +{{#unescapedDescription}} {{{.}}} -{{/description}} +{{/unescapedDescription}} +{{^emptyVars}} ## Properties Name | Type | Description | Notes @@ -12,4 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) -{{/model}}{{/models}} +{{/emptyVars}}{{/model}}{{/models}}