Skip to content

Commit

Permalink
chore: generated code for commit 496fabb. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
  • Loading branch information
algolia-bot and millotp committed Jun 25, 2024
1 parent 496fabb commit 7a0ff1d
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 52 deletions.
10 changes: 5 additions & 5 deletions tests/output/csharp/src/generated/requests/Insights.test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ await _client.PushEventsAsync(
Index = "products",
UserToken = "user-123456",
AuthenticatedUserToken = "user-123456",
Timestamp = 1719014400000L,
Timestamp = 1719273600000L,
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
QueryID = "43b15df305339e827f0ac0bdc5ebcaa7",
}
Expand All @@ -615,7 +615,7 @@ await _client.PushEventsAsync(
Index = "products",
UserToken = "user-123456",
AuthenticatedUserToken = "user-123456",
Timestamp = 1719014400000L,
Timestamp = 1719273600000L,
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
}
)
Expand All @@ -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)
);
Expand All @@ -648,7 +648,7 @@ await _client.PushEventsAsync(
Index = "products",
UserToken = "user-123456",
AuthenticatedUserToken = "user-123456",
Timestamp = 1719014400000L,
Timestamp = 1719273600000L,
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
QueryID = "43b15df305339e827f0ac0bdc5ebcaa7",
}
Expand All @@ -661,7 +661,7 @@ await _client.PushEventsAsync(
Index = "products",
UserToken = "user-123456",
AuthenticatedUserToken = "user-123456",
Timestamp = 1719014400000L,
Timestamp = 1719273600000L,
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
}
)
Expand Down
6 changes: 3 additions & 3 deletions tests/output/dart/test/requests/insights_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ void main() {
index: "products",
userToken: "user-123456",
authenticatedUserToken: "user-123456",
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: [
"9780545139700",
"9780439784542",
Expand All @@ -646,7 +646,7 @@ void main() {
index: "products",
userToken: "user-123456",
authenticatedUserToken: "user-123456",
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: [
"9780545139700",
"9780439784542",
Expand All @@ -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"]}]}""");
},
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -624,7 +624,7 @@ void pushEventsTest1() {
.setIndex("products")
.setUserToken("user-123456")
.setAuthenticatedUserToken("user-123456")
.setTimestamp(1719014400000L)
.setTimestamp(1719273600000L)
.setObjectIDs(List.of("9780545139700", "9780439784542"))
)
)
Expand All @@ -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
)
Expand All @@ -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()
Expand All @@ -663,7 +663,7 @@ void pushEventsTest1() {
.setIndex("products")
.setUserToken("user-123456")
.setAuthenticatedUserToken("user-123456")
.setTimestamp(1719014400000L)
.setTimestamp(1719273600000L)
.setObjectIDs(List.of("9780545139700", "9780439784542"))
)
)
Expand Down
12 changes: 6 additions & 6 deletions tests/output/javascript/src/requests/insights.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ describe('pushEvents', () => {
index: 'products',
userToken: 'user-123456',
authenticatedUserToken: 'user-123456',
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: ['9780545139700', '9780439784542'],
queryID: '43b15df305339e827f0ac0bdc5ebcaa7',
},
Expand All @@ -438,7 +438,7 @@ describe('pushEvents', () => {
index: 'products',
userToken: 'user-123456',
authenticatedUserToken: 'user-123456',
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: ['9780545139700', '9780439784542'],
},
],
Expand All @@ -454,7 +454,7 @@ describe('pushEvents', () => {
index: 'products',
userToken: 'user-123456',
authenticatedUserToken: 'user-123456',
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: ['9780545139700', '9780439784542'],
queryID: '43b15df305339e827f0ac0bdc5ebcaa7',
},
Expand All @@ -464,7 +464,7 @@ describe('pushEvents', () => {
index: 'products',
userToken: 'user-123456',
authenticatedUserToken: 'user-123456',
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: ['9780545139700', '9780439784542'],
},
],
Expand All @@ -479,7 +479,7 @@ describe('pushEvents', () => {
index: 'products',
userToken: 'user-123456',
authenticatedUserToken: 'user-123456',
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: ['9780545139700', '9780439784542'],
queryID: '43b15df305339e827f0ac0bdc5ebcaa7',
},
Expand All @@ -489,7 +489,7 @@ describe('pushEvents', () => {
index: 'products',
userToken: 'user-123456',
authenticatedUserToken: 'user-123456',
timestamp: 1719014400000,
timestamp: 1719273600000,
objectIDs: ['9780545139700', '9780439784542'],
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class InsightsTest {
index = "products",
userToken = "user-123456",
authenticatedUserToken = "user-123456",
timestamp = 1719014400000L,
timestamp = 1719273600000L,
objectIDs = listOf("9780545139700", "9780439784542"),
queryID = "43b15df305339e827f0ac0bdc5ebcaa7",
),
Expand All @@ -539,7 +539,7 @@ class InsightsTest {
index = "products",
userToken = "user-123456",
authenticatedUserToken = "user-123456",
timestamp = 1719014400000L,
timestamp = 1719273600000L,
objectIDs = listOf("9780545139700", "9780439784542"),
),
),
Expand All @@ -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)
},
)
}
Expand Down
10 changes: 5 additions & 5 deletions tests/output/php/src/requests/InsightsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public function testPushEvents1()
'index' => 'products',
'userToken' => 'user-123456',
'authenticatedUserToken' => 'user-123456',
'timestamp' => 1719014400000,
'timestamp' => 1719273600000,
'objectIDs' => [
'9780545139700',

Expand All @@ -646,7 +646,7 @@ public function testPushEvents1()
'index' => 'products',
'userToken' => 'user-123456',
'authenticatedUserToken' => 'user-123456',
'timestamp' => 1719014400000,
'timestamp' => 1719273600000,
'objectIDs' => [
'9780545139700',

Expand All @@ -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"]}]}'),
],
]);

Expand All @@ -673,7 +673,7 @@ public function testPushEvents1()
'index' => 'products',
'userToken' => 'user-123456',
'authenticatedUserToken' => 'user-123456',
'timestamp' => 1719014400000,
'timestamp' => 1719273600000,
'objectIDs' => [
'9780545139700',

Expand All @@ -687,7 +687,7 @@ public function testPushEvents1()
'index' => 'products',
'userToken' => 'user-123456',
'authenticatedUserToken' => 'user-123456',
'timestamp' => 1719014400000,
'timestamp' => 1719273600000,
'objectIDs' => [
'9780545139700',

Expand Down
14 changes: 7 additions & 7 deletions tests/output/python/tests/requests/insights_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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(
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
Loading

0 comments on commit 7a0ff1d

Please # to comment.