From 7a0ff1d44cf65c9d0b6a870da033aa34b5a656ba Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Tue, 25 Jun 2024 15:42:09 +0000 Subject: [PATCH] chore: generated code for commit 496fabbccc1e23663e5d050040060b4a59c457f0. [skip ci] Co-authored-by: Pierre Millot --- .../csharp/src/generated/requests/Insights.test.cs | 10 +++++----- tests/output/dart/test/requests/insights_test.dart | 6 +++--- .../java/com/algolia/requests/Insights.test.java | 12 ++++++------ .../javascript/src/requests/insights.test.ts | 12 ++++++------ .../kotlin/com/algolia/requests/InsightsTest.kt | 6 +++--- tests/output/php/src/requests/InsightsTest.php | 10 +++++----- .../output/python/tests/requests/insights_test.py | 14 +++++++------- tests/output/ruby/test/requests/insights_test.rb | 14 +++++++------- .../algoliasearch/requests/InsightsTest.scala | 10 +++++----- .../swift/Tests/requests/InsightsTests.swift | 10 +++++----- 10 files changed, 52 insertions(+), 52 deletions(-) diff --git a/tests/output/csharp/src/generated/requests/Insights.test.cs b/tests/output/csharp/src/generated/requests/Insights.test.cs index ab8314dbf3..64b864cb33 100644 --- a/tests/output/csharp/src/generated/requests/Insights.test.cs +++ b/tests/output/csharp/src/generated/requests/Insights.test.cs @@ -602,7 +602,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1719014400000L, + Timestamp = 1719273600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", } @@ -615,7 +615,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1719014400000L, + Timestamp = 1719273600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } ) @@ -627,7 +627,7 @@ await _client.PushEventsAsync( Assert.Equal("/1/events", req.Path); Assert.Equal("POST", req.Method.ToString()); JsonAssert.EqualOverrideDefault( - "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719014400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719014400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", + "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719273600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719273600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", req.Body, new JsonDiffConfig(false) ); @@ -648,7 +648,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1719014400000L, + Timestamp = 1719273600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, QueryID = "43b15df305339e827f0ac0bdc5ebcaa7", } @@ -661,7 +661,7 @@ await _client.PushEventsAsync( Index = "products", UserToken = "user-123456", AuthenticatedUserToken = "user-123456", - Timestamp = 1719014400000L, + Timestamp = 1719273600000L, ObjectIDs = new List { "9780545139700", "9780439784542" }, } ) diff --git a/tests/output/dart/test/requests/insights_test.dart b/tests/output/dart/test/requests/insights_test.dart index 25e4055839..fd4a76ebf0 100644 --- a/tests/output/dart/test/requests/insights_test.dart +++ b/tests/output/dart/test/requests/insights_test.dart @@ -633,7 +633,7 @@ void main() { index: "products", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: [ "9780545139700", "9780439784542", @@ -646,7 +646,7 @@ void main() { index: "products", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: [ "9780545139700", "9780439784542", @@ -659,7 +659,7 @@ void main() { expectPath(request.path, '/1/events'); expect(request.method, 'post'); expectBody(request.body, - """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"]}]}"""); + """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"]}]}"""); }, ), ); diff --git a/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java b/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java index fa7f45f1ca..26aabdb0c6 100644 --- a/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java +++ b/tests/output/java/src/test/java/com/algolia/requests/Insights.test.java @@ -615,7 +615,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1719014400000L) + .setTimestamp(1719273600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) .setQueryID("43b15df305339e827f0ac0bdc5ebcaa7"), new ViewedObjectIDs() @@ -624,7 +624,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1719014400000L) + .setTimestamp(1719273600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) ) ) @@ -636,9 +636,9 @@ void pushEventsTest1() { assertDoesNotThrow(() -> JSONAssert.assertEquals( "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product" + - " Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719014400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product" + + " Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719273600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product" + " Detail Page" + - " Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719014400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", + " Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719273600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}", req.body, JSONCompareMode.STRICT ) @@ -654,7 +654,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1719014400000L) + .setTimestamp(1719273600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) .setQueryID("43b15df305339e827f0ac0bdc5ebcaa7"), new ViewedObjectIDs() @@ -663,7 +663,7 @@ void pushEventsTest1() { .setIndex("products") .setUserToken("user-123456") .setAuthenticatedUserToken("user-123456") - .setTimestamp(1719014400000L) + .setTimestamp(1719273600000L) .setObjectIDs(List.of("9780545139700", "9780439784542")) ) ) diff --git a/tests/output/javascript/src/requests/insights.test.ts b/tests/output/javascript/src/requests/insights.test.ts index 10823897db..2e86045ed5 100644 --- a/tests/output/javascript/src/requests/insights.test.ts +++ b/tests/output/javascript/src/requests/insights.test.ts @@ -428,7 +428,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: ['9780545139700', '9780439784542'], queryID: '43b15df305339e827f0ac0bdc5ebcaa7', }, @@ -438,7 +438,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: ['9780545139700', '9780439784542'], }, ], @@ -454,7 +454,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: ['9780545139700', '9780439784542'], queryID: '43b15df305339e827f0ac0bdc5ebcaa7', }, @@ -464,7 +464,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: ['9780545139700', '9780439784542'], }, ], @@ -479,7 +479,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: ['9780545139700', '9780439784542'], queryID: '43b15df305339e827f0ac0bdc5ebcaa7', }, @@ -489,7 +489,7 @@ describe('pushEvents', () => { index: 'products', userToken: 'user-123456', authenticatedUserToken: 'user-123456', - timestamp: 1719014400000, + timestamp: 1719273600000, objectIDs: ['9780545139700', '9780439784542'], }, ], diff --git a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt index 94b1c819e7..b5faebbabf 100644 --- a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt +++ b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/InsightsTest.kt @@ -529,7 +529,7 @@ class InsightsTest { index = "products", userToken = "user-123456", authenticatedUserToken = "user-123456", - timestamp = 1719014400000L, + timestamp = 1719273600000L, objectIDs = listOf("9780545139700", "9780439784542"), queryID = "43b15df305339e827f0ac0bdc5ebcaa7", ), @@ -539,7 +539,7 @@ class InsightsTest { index = "products", userToken = "user-123456", authenticatedUserToken = "user-123456", - timestamp = 1719014400000L, + timestamp = 1719273600000L, objectIDs = listOf("9780545139700", "9780439784542"), ), ), @@ -549,7 +549,7 @@ class InsightsTest { intercept = { assertEquals("/1/events".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"]}]}""", it.body) + assertJsonBody("""{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"]}]}""", it.body) }, ) } diff --git a/tests/output/php/src/requests/InsightsTest.php b/tests/output/php/src/requests/InsightsTest.php index cc7c25b712..309150ee4b 100644 --- a/tests/output/php/src/requests/InsightsTest.php +++ b/tests/output/php/src/requests/InsightsTest.php @@ -632,7 +632,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1719014400000, + 'timestamp' => 1719273600000, 'objectIDs' => [ '9780545139700', @@ -646,7 +646,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1719014400000, + 'timestamp' => 1719273600000, 'objectIDs' => [ '9780545139700', @@ -661,7 +661,7 @@ public function testPushEvents1() [ 'path' => '/1/events', 'method' => 'POST', - 'body' => json_decode('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"]}]}'), + 'body' => json_decode('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"]}]}'), ], ]); @@ -673,7 +673,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1719014400000, + 'timestamp' => 1719273600000, 'objectIDs' => [ '9780545139700', @@ -687,7 +687,7 @@ public function testPushEvents1() 'index' => 'products', 'userToken' => 'user-123456', 'authenticatedUserToken' => 'user-123456', - 'timestamp' => 1719014400000, + 'timestamp' => 1719273600000, 'objectIDs' => [ '9780545139700', diff --git a/tests/output/python/tests/requests/insights_test.py b/tests/output/python/tests/requests/insights_test.py index ec7a831670..56eaf17f40 100644 --- a/tests/output/python/tests/requests/insights_test.py +++ b/tests/output/python/tests/requests/insights_test.py @@ -477,7 +477,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1719014400000, + "timestamp": 1719273600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -490,7 +490,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1719014400000, + "timestamp": 1719273600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -505,7 +505,7 @@ async def test_push_events_1(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"]}]}""" + """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"]}]}""" ) raw_resp = await InsightsClient( @@ -519,7 +519,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1719014400000, + "timestamp": 1719273600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -532,7 +532,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1719014400000, + "timestamp": 1719273600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -554,7 +554,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1719014400000, + "timestamp": 1719273600000, "objectIDs": [ "9780545139700", "9780439784542", @@ -567,7 +567,7 @@ async def test_push_events_1(self): "index": "products", "userToken": "user-123456", "authenticatedUserToken": "user-123456", - "timestamp": 1719014400000, + "timestamp": 1719273600000, "objectIDs": [ "9780545139700", "9780439784542", diff --git a/tests/output/ruby/test/requests/insights_test.rb b/tests/output/ruby/test/requests/insights_test.rb index dfe86e9645..962d099e35 100644 --- a/tests/output/ruby/test/requests/insights_test.rb +++ b/tests/output/ruby/test/requests/insights_test.rb @@ -365,7 +365,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_719_014_400_000, + timestamp: 1_719_273_600_000, object_ids: ["9780545139700", "9780439784542"], query_id: "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -375,7 +375,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_719_014_400_000, + timestamp: 1_719_273_600_000, object_ids: ["9780545139700", "9780439784542"] ) ] @@ -387,7 +387,7 @@ def test_push_events1 assert_equal({}.to_a, req.query_params.to_a) assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) assert_equal( - JSON.parse('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"]}]}'), JSON.parse(req.body) + JSON.parse('{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"]}]}'), JSON.parse(req.body) ) res = @e2e_client.push_events_with_http_info( @@ -399,7 +399,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_719_014_400_000, + timestamp: 1_719_273_600_000, object_ids: ["9780545139700", "9780439784542"], query_id: "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -409,7 +409,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_719_014_400_000, + timestamp: 1_719_273_600_000, object_ids: ["9780545139700", "9780439784542"] ) ] @@ -426,7 +426,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_719_014_400_000, + timestamp: 1_719_273_600_000, object_ids: ["9780545139700", "9780439784542"], query_id: "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -436,7 +436,7 @@ def test_push_events1 index: "products", user_token: "user-123456", authenticated_user_token: "user-123456", - timestamp: 1_719_014_400_000, + timestamp: 1_719_273_600_000, object_ids: ["9780545139700", "9780439784542"] ) ] diff --git a/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala b/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala index 728f1f8a02..40ecf379d9 100644 --- a/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala +++ b/tests/output/scala/src/test/scala/algoliasearch/requests/InsightsTest.scala @@ -597,7 +597,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1719014400000L), + timestamp = Some(1719273600000L), objectIDs = Seq("9780545139700", "9780439784542"), queryID = "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -607,7 +607,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1719014400000L), + timestamp = Some(1719273600000L), objectIDs = Seq("9780545139700", "9780439784542") ) ) @@ -620,7 +620,7 @@ class InsightsTest extends AnyFunSuite { assert(res.path == "/1/events") assert(res.method == "POST") val expectedBody = parse( - """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719014400000,"objectIDs":["9780545139700","9780439784542"]}]}""" + """{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1719273600000,"objectIDs":["9780545139700","9780439784542"]}]}""" ) val actualBody = parse(res.body.get) assert(actualBody == expectedBody) @@ -634,7 +634,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1719014400000L), + timestamp = Some(1719273600000L), objectIDs = Seq("9780545139700", "9780439784542"), queryID = "43b15df305339e827f0ac0bdc5ebcaa7" ), @@ -644,7 +644,7 @@ class InsightsTest extends AnyFunSuite { index = "products", userToken = "user-123456", authenticatedUserToken = Some("user-123456"), - timestamp = Some(1719014400000L), + timestamp = Some(1719273600000L), objectIDs = Seq("9780545139700", "9780439784542") ) ) diff --git a/tests/output/swift/Tests/requests/InsightsTests.swift b/tests/output/swift/Tests/requests/InsightsTests.swift index 9fd4f98e47..55d33feb0d 100644 --- a/tests/output/swift/Tests/requests/InsightsTests.swift +++ b/tests/output/swift/Tests/requests/InsightsTests.swift @@ -843,7 +843,7 @@ final class InsightsClientRequestsTests: XCTestCase { queryID: "43b15df305339e827f0ac0bdc5ebcaa7", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_719_014_400_000) + timestamp: Int64(1_719_273_600_000) )), EventsItems.viewedObjectIDs(ViewedObjectIDs( eventName: "Product Detail Page Viewed", @@ -852,7 +852,7 @@ final class InsightsClientRequestsTests: XCTestCase { objectIDs: ["9780545139700", "9780439784542"], userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_719_014_400_000) + timestamp: Int64(1_719_273_600_000) )), ])) let responseBodyData = try XCTUnwrap(response.bodyData) @@ -862,7 +862,7 @@ final class InsightsClientRequestsTests: XCTestCase { let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) let expectedBodyData = - "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719014400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719014400000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}" + "{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719273600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1719273600000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}" .data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString) @@ -887,7 +887,7 @@ final class InsightsClientRequestsTests: XCTestCase { queryID: "43b15df305339e827f0ac0bdc5ebcaa7", userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_719_014_400_000) + timestamp: Int64(1_719_273_600_000) )), EventsItems.viewedObjectIDs(ViewedObjectIDs( eventName: "Product Detail Page Viewed", @@ -896,7 +896,7 @@ final class InsightsClientRequestsTests: XCTestCase { objectIDs: ["9780545139700", "9780439784542"], userToken: "user-123456", authenticatedUserToken: "user-123456", - timestamp: Int64(1_719_014_400_000) + timestamp: Int64(1_719_273_600_000) )), ])) let e2eResponseBody = try XCTUnwrap(e2eResponse.body)