diff --git a/.changeset/events-search-active-call-filter.md b/.changeset/events-search-active-call-filter.md new file mode 100644 index 00000000..05c52e0c --- /dev/null +++ b/.changeset/events-search-active-call-filter.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/node-sdk': minor +--- + +**events-search**: Add `active_call` filter parameter diff --git a/.changeset/raw-device-attributes-keyboard-layout-name-events.md b/.changeset/raw-device-attributes-keyboard-layout-name-events.md new file mode 100644 index 00000000..fe580e9b --- /dev/null +++ b/.changeset/raw-device-attributes-keyboard-layout-name-events.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/node-sdk': minor +--- + +Add `keyboard_layout_name` to `RawDeviceAttributes` diff --git a/.schema-version b/.schema-version index c03b60b0..ac47b436 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v3.6.0 \ No newline at end of file +v3.7.0 \ No newline at end of file diff --git a/resources/fingerprint-server-api.yaml b/resources/fingerprint-server-api.yaml index f20cd1d4..3c2626a5 100644 --- a/resources/fingerprint-server-api.yaml +++ b/resources/fingerprint-server-api.yaml @@ -940,6 +940,18 @@ paths: > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. + - name: active_call + in: query + schema: + type: boolean + description: > + Filter events by Active Call Detection result on mobile devices. + + + > Note: When using this parameter, only events with the + `active_call` property set to `true` or `false` are returned. Events + without an `active_call` Smart Signal result are left out of the + response. - name: source in: query required: false @@ -2957,6 +2969,16 @@ components: examples: - 3f33b68235d36b8821147349f1161379 description: Unique identifier for the user's keyboard layout. + KeyboardLayoutName: + type: string + examples: + - en-US + - de-DE + - ja-JP + description: >- + Name of the user's configured keyboard layout as a BCP 47-style + identifier. Only available in Chromium-based browsers, omitted + otherwise. RawDeviceAttributes: type: object description: > @@ -3031,6 +3053,8 @@ components: $ref: '#/components/schemas/BatteryLowPowerMode' keyboard_layout_hash: $ref: '#/components/schemas/KeyboardLayoutHash' + keyboard_layout_name: + $ref: '#/components/schemas/KeyboardLayoutName' Labels: type: array items: diff --git a/src/generatedApiTypes.ts b/src/generatedApiTypes.ts index 34f5d72c..5134e088 100644 --- a/src/generatedApiTypes.ts +++ b/src/generatedApiTypes.ts @@ -1286,6 +1286,13 @@ export interface components { * @example 3f33b68235d36b8821147349f1161379 */ KeyboardLayoutHash: string + /** + * @description Name of the user's configured keyboard layout as a BCP 47-style identifier. Only available in Chromium-based browsers, omitted otherwise. + * @example en-US + * @example de-DE + * @example ja-JP + */ + KeyboardLayoutName: string /** @description A curated subset of raw browser/device attributes that the API surface exposes. Each property contains a value or object with the data for the collected signal. */ RawDeviceAttributes: { /** @description Baseline measurement of canonical fonts rendered on the device. Numeric width metrics, in CSS pixels, for the canonical fonts collected by the agent. */ @@ -1364,6 +1371,8 @@ export interface components { battery_low_power_mode?: components['schemas']['BatteryLowPowerMode'] /** @description Unique identifier for the user's keyboard layout. */ keyboard_layout_hash?: components['schemas']['KeyboardLayoutHash'] + /** @description Name of the user's configured keyboard layout as a BCP 47-style identifier. Only available in Chromium-based browsers, omitted otherwise. */ + keyboard_layout_name?: components['schemas']['KeyboardLayoutName'] } /** @description Each label returns a prediction (true or false) for a specific use case (label field) based on a machine learning score. The machine learning score is determined by a model trained on customer data for that use case. This field is in the beta phase and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). */ Labels: { @@ -2121,6 +2130,12 @@ export interface operations { * > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. */ simulator?: boolean + /** + * @description Filter events by Active Call Detection result on mobile devices. + * + * > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. + */ + active_call?: boolean /** * @description Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. * diff --git a/tests/mocked-responses-tests/mocked-responses-data/errors/429_too_many_search_requests.json b/tests/mocked-responses-tests/mocked-responses-data/errors/429_too_many_search_requests.json new file mode 100644 index 00000000..bc42b32a --- /dev/null +++ b/tests/mocked-responses-tests/mocked-responses-data/errors/429_too_many_search_requests.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "too_many_requests", + "message": "too many search requests" + } +} diff --git a/tests/mocked-responses-tests/mocked-responses-data/errors/504_search_timeout_exceeded.json b/tests/mocked-responses-tests/mocked-responses-data/errors/504_search_timeout_exceeded.json new file mode 100644 index 00000000..cc5fcbd7 --- /dev/null +++ b/tests/mocked-responses-tests/mocked-responses-data/errors/504_search_timeout_exceeded.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "failed", + "message": "gateway timeout" + } +} diff --git a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200.json b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200.json index 6d6c726e..72f12f44 100644 --- a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200.json +++ b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200.json @@ -296,6 +296,7 @@ "date_time_locale": "en-US", "audio": 124.04347745512496, "keyboard_layout_hash": "691e3845c85c202a1514b6fd7ef17065", + "keyboard_layout_name": "en-US", "battery_charging": true, "battery_level": 80, "battery_low_power_mode": true, diff --git a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200_with_unknown_field.json b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200_with_unknown_field.json index bdbf8715..e6712e39 100644 --- a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200_with_unknown_field.json +++ b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_200_with_unknown_field.json @@ -297,6 +297,7 @@ "date_time_locale": "en-US", "audio": 124.04347745512496, "keyboard_layout_hash": "691e3845c85c202a1514b6fd7ef17065", + "keyboard_layout_name": "en-US", "battery_charging": true, "battery_level": 80, "battery_low_power_mode": true, diff --git a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_ruleset_200.json b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_ruleset_200.json index 1e5337c0..f775f7d9 100644 --- a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_ruleset_200.json +++ b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_ruleset_200.json @@ -296,6 +296,7 @@ "date_time_locale": "en-US", "audio": 124.04347745512496, "keyboard_layout_hash": "691e3845c85c202a1514b6fd7ef17065", + "keyboard_layout_name": "en-US", "battery_charging": true, "battery_level": 80, "battery_low_power_mode": true, diff --git a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_bot_info_200.json b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_bot_info_200.json index b44a687a..98ca7d5c 100644 --- a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_bot_info_200.json +++ b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_bot_info_200.json @@ -302,6 +302,7 @@ "date_time_locale": "en-US", "audio": 124.04347745512496, "keyboard_layout_hash": "691e3845c85c202a1514b6fd7ef17065", + "keyboard_layout_name": "en-US", "battery_charging": true, "battery_level": 80, "battery_low_power_mode": true, diff --git a/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_edge_200.json b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_edge_200.json new file mode 100644 index 00000000..387c86eb --- /dev/null +++ b/tests/mocked-responses-tests/mocked-responses-data/events/get_event_with_edge_200.json @@ -0,0 +1,51 @@ +{ + "event_id": "1758130560902.8tRtrH", + "timestamp": 1758130560902, + "source": "edge", + "url": "https://example.com/login?foo=bar", + "bot_info": { + "category": "ai_agent", + "provider": "OpenAI", + "provider_url": "https://openai.com", + "name": "ChatGPT Agent", + "identity": "signed", + "confidence": "high" + }, + "ip_info": { + "v4": { + "address": "104.210.139.192", + "geolocation": { + "accuracy_radius": 20, + "latitude": 29.42412, + "longitude": -98.49363, + "postal_code": "78205", + "timezone": "America/Chicago", + "city_name": "San Antonio", + "country_code": "US", + "country_name": "United States", + "continent_code": "NA", + "continent_name": "North America", + "subdivisions": [ + { + "iso_code": "TX", + "name": "Texas" + } + ] + }, + "asn": "8075", + "asn_name": "Microsoft Corporation", + "asn_network": "104.208.0.0/13", + "asn_type": "hosting", + "datacenter_result": true, + "datacenter_name": "Microsoft Azure" + } + }, + "proxy": false, + "proxy_confidence": "high", + "vpn": false, + "vpn_confidence": "medium", + "vpn_methods": { + "public_vpn": false, + "relay": false + } +} \ No newline at end of file diff --git a/tests/mocked-responses-tests/mocked-responses-data/events/search/get_event_search_200.json b/tests/mocked-responses-tests/mocked-responses-data/events/search/get_event_search_200.json index daad06b0..8e9dbdc8 100644 --- a/tests/mocked-responses-tests/mocked-responses-data/events/search/get_event_search_200.json +++ b/tests/mocked-responses-tests/mocked-responses-data/events/search/get_event_search_200.json @@ -298,6 +298,7 @@ "date_time_locale": "en-US", "audio": 124.04347745512496, "keyboard_layout_hash": "691e3845c85c202a1514b6fd7ef17065", + "keyboard_layout_name": "en-US", "battery_charging": true, "battery_level": 80, "battery_low_power_mode": true, diff --git a/tests/mocked-responses-tests/searchEventsTests.spec.ts b/tests/mocked-responses-tests/searchEventsTests.spec.ts index bb5151c5..5c0f059e 100644 --- a/tests/mocked-responses-tests/searchEventsTests.spec.ts +++ b/tests/mocked-responses-tests/searchEventsTests.spec.ts @@ -128,6 +128,7 @@ describe('[Mocked response] Search Events', () => { high_recall_id: 'testHighRecallID', incremental_identification_status: 'partially_completed', simulator: true, + active_call: true, } const response = await client.searchEvents(filters)