Skip to content

Commit 9471ee0

Browse files
authored
Merge branch 'main' into chore/renovateBaseBranch
2 parents 235bdf1 + 03df71f commit 9471ee0

File tree

22 files changed

+134
-148
lines changed

22 files changed

+134
-148
lines changed

tests/CTS/requests/ingestion/getAuthentications.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{
1111
"testName": "getAuthentications with query params",
1212
"parameters": {
13-
"itemsPerPage": 10,
13+
"itemsPerPage": 2,
1414
"page": 1,
1515
"type": [
1616
"basic",
@@ -20,42 +20,36 @@
2020
"none"
2121
],
2222
"sort": "createdAt",
23-
"order": "desc"
23+
"order": "asc"
2424
},
2525
"request": {
2626
"path": "/1/authentications",
2727
"method": "GET",
2828
"queryParameters": {
29-
"itemsPerPage": "10",
29+
"itemsPerPage": "2",
3030
"page": "1",
3131
"type": "basic%2Calgolia",
3232
"platform": "none",
3333
"sort": "createdAt",
34-
"order": "desc"
34+
"order": "asc"
3535
}
3636
},
3737
"response": {
3838
"statusCode": 200,
3939
"body": {
4040
"pagination": {
4141
"page": 1,
42-
"itemsPerPage": 10
42+
"itemsPerPage": 2
4343
},
4444
"authentications": [
4545
{
46-
"authenticationID": "b57a7ea5-8592-493b-b75b-6c66d77aee7f",
46+
"authenticationID": "474f050f-a771-464c-a016-323538029f5f",
4747
"type": "algolia",
48-
"name": "Auto-generated Authentication for T8JK9S7I7X - 1704732447751",
48+
"name": "algolia-auth-1677060483885",
4949
"input": {},
50-
"createdAt": "2024-01-08T16:47:31Z",
51-
"updatedAt": "2024-01-08T16:47:31Z"
50+
"createdAt": "2023-02-22T10:08:04Z",
51+
"updatedAt": "2023-10-25T08:41:56Z"
5252
},
53-
{},
54-
{},
55-
{},
56-
{},
57-
{},
58-
{},
5953
{}
6054
]
6155
}

tests/output/csharp/src/generated/requests/Ingestion.test.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ public async Task GetAuthenticationsTest0()
833833
public async Task GetAuthenticationsTest1()
834834
{
835835
await _client.GetAuthenticationsAsync(
836-
10,
836+
2,
837837
1,
838838
new List<AuthenticationType>
839839
{
@@ -842,15 +842,15 @@ await _client.GetAuthenticationsAsync(
842842
},
843843
new List<PlatformWithNone> { new PlatformWithNone(Enum.Parse<PlatformNone>("None")) },
844844
Enum.Parse<AuthenticationSortKeys>("CreatedAt"),
845-
Enum.Parse<OrderKeys>("Desc")
845+
Enum.Parse<OrderKeys>("Asc")
846846
);
847847

848848
var req = _echo.LastResponse;
849849
Assert.Equal("/1/authentications", req.Path);
850850
Assert.Equal("GET", req.Method.ToString());
851851
Assert.Null(req.Body);
852852
var expectedQuery = JsonSerializer.Deserialize<Dictionary<string, string>>(
853-
"{\"itemsPerPage\":\"10\",\"page\":\"1\",\"type\":\"basic%2Calgolia\",\"platform\":\"none\",\"sort\":\"createdAt\",\"order\":\"desc\"}"
853+
"{\"itemsPerPage\":\"2\",\"page\":\"1\",\"type\":\"basic%2Calgolia\",\"platform\":\"none\",\"sort\":\"createdAt\",\"order\":\"asc\"}"
854854
);
855855
Assert.NotNull(expectedQuery);
856856

@@ -867,7 +867,7 @@ await _client.GetAuthenticationsAsync(
867867
try
868868
{
869869
var resp = await _e2eClient.GetAuthenticationsAsync(
870-
10,
870+
2,
871871
1,
872872
new List<AuthenticationType>
873873
{
@@ -876,13 +876,13 @@ await _client.GetAuthenticationsAsync(
876876
},
877877
new List<PlatformWithNone> { new PlatformWithNone(Enum.Parse<PlatformNone>("None")) },
878878
Enum.Parse<AuthenticationSortKeys>("CreatedAt"),
879-
Enum.Parse<OrderKeys>("Desc")
879+
Enum.Parse<OrderKeys>("Asc")
880880
);
881881
// Check status code 200
882882
Assert.NotNull(resp);
883883

884884
JsonAssert.EqualOverrideDefault(
885-
"{\"pagination\":{\"page\":1,\"itemsPerPage\":10},\"authentications\":[{\"authenticationID\":\"b57a7ea5-8592-493b-b75b-6c66d77aee7f\",\"type\":\"algolia\",\"name\":\"Auto-generated Authentication for T8JK9S7I7X - 1704732447751\",\"input\":{},\"createdAt\":\"2024-01-08T16:47:31Z\",\"updatedAt\":\"2024-01-08T16:47:31Z\"},{},{},{},{},{},{},{}]}",
885+
"{\"pagination\":{\"page\":1,\"itemsPerPage\":2},\"authentications\":[{\"authenticationID\":\"474f050f-a771-464c-a016-323538029f5f\",\"type\":\"algolia\",\"name\":\"algolia-auth-1677060483885\",\"input\":{},\"createdAt\":\"2023-02-22T10:08:04Z\",\"updatedAt\":\"2023-10-25T08:41:56Z\"},{}]}",
886886
JsonSerializer.Serialize(resp, JsonConfig.Options),
887887
new JsonDiffConfig(true)
888888
);

tests/output/csharp/src/generated/requests/Insights.test.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ await _client.PushEventsAsync(
602602
Index = "products",
603603
UserToken = "user-123456",
604604
AuthenticatedUserToken = "user-123456",
605-
Timestamp = 1713312000000L,
605+
Timestamp = 1713571200000L,
606606
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
607607
QueryID = "43b15df305339e827f0ac0bdc5ebcaa7",
608608
}
@@ -615,7 +615,7 @@ await _client.PushEventsAsync(
615615
Index = "products",
616616
UserToken = "user-123456",
617617
AuthenticatedUserToken = "user-123456",
618-
Timestamp = 1713312000000L,
618+
Timestamp = 1713571200000L,
619619
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
620620
}
621621
)
@@ -627,7 +627,7 @@ await _client.PushEventsAsync(
627627
Assert.Equal("/1/events", req.Path);
628628
Assert.Equal("POST", req.Method.ToString());
629629
JsonAssert.EqualOverrideDefault(
630-
"{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1713312000000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1713312000000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}",
630+
"{\"events\":[{\"eventType\":\"conversion\",\"eventName\":\"Product Purchased\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1713571200000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"],\"queryID\":\"43b15df305339e827f0ac0bdc5ebcaa7\"},{\"eventType\":\"view\",\"eventName\":\"Product Detail Page Viewed\",\"index\":\"products\",\"userToken\":\"user-123456\",\"authenticatedUserToken\":\"user-123456\",\"timestamp\":1713571200000,\"objectIDs\":[\"9780545139700\",\"9780439784542\"]}]}",
631631
req.Body,
632632
new JsonDiffConfig(false)
633633
);
@@ -648,7 +648,7 @@ await _client.PushEventsAsync(
648648
Index = "products",
649649
UserToken = "user-123456",
650650
AuthenticatedUserToken = "user-123456",
651-
Timestamp = 1713312000000L,
651+
Timestamp = 1713571200000L,
652652
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
653653
QueryID = "43b15df305339e827f0ac0bdc5ebcaa7",
654654
}
@@ -661,7 +661,7 @@ await _client.PushEventsAsync(
661661
Index = "products",
662662
UserToken = "user-123456",
663663
AuthenticatedUserToken = "user-123456",
664-
Timestamp = 1713312000000L,
664+
Timestamp = 1713571200000L,
665665
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
666666
}
667667
)

tests/output/dart/test/requests/insights_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ void main() {
633633
index: "products",
634634
userToken: "user-123456",
635635
authenticatedUserToken: "user-123456",
636-
timestamp: 1713312000000,
636+
timestamp: 1713571200000,
637637
objectIDs: [
638638
"9780545139700",
639639
"9780439784542",
@@ -646,7 +646,7 @@ void main() {
646646
index: "products",
647647
userToken: "user-123456",
648648
authenticatedUserToken: "user-123456",
649-
timestamp: 1713312000000,
649+
timestamp: 1713571200000,
650650
objectIDs: [
651651
"9780545139700",
652652
"9780439784542",
@@ -659,7 +659,7 @@ void main() {
659659
expectPath(request.path, '/1/events');
660660
expect(request.method, 'post');
661661
expectBody(request.body,
662-
"""{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1713312000000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1713312000000,"objectIDs":["9780545139700","9780439784542"]}]}""");
662+
"""{"events":[{"eventType":"conversion","eventName":"Product Purchased","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1713571200000,"objectIDs":["9780545139700","9780439784542"],"queryID":"43b15df305339e827f0ac0bdc5ebcaa7"},{"eventType":"view","eventName":"Product Detail Page Viewed","index":"products","userToken":"user-123456","authenticatedUserToken":"user-123456","timestamp":1713571200000,"objectIDs":["9780545139700","9780439784542"]}]}""");
663663
},
664664
),
665665
);

tests/output/go/tests/requests/ingestion_test.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/output/go/tests/requests/insights_test.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/output/java/src/test/java/com/algolia/requests/Ingestion.test.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -837,12 +837,12 @@ void getAuthenticationsTest0() {
837837
void getAuthenticationsTest1() {
838838
assertDoesNotThrow(() -> {
839839
client.getAuthentications(
840-
10,
840+
2,
841841
1,
842842
List.of(AuthenticationType.fromValue("basic"), AuthenticationType.fromValue("algolia")),
843843
List.of(PlatformNone.fromValue("none")),
844844
AuthenticationSortKeys.fromValue("createdAt"),
845-
OrderKeys.fromValue("desc")
845+
OrderKeys.fromValue("asc")
846846
);
847847
});
848848
EchoResponse req = echo.getLastResponse();
@@ -852,7 +852,7 @@ void getAuthenticationsTest1() {
852852

853853
try {
854854
Map<String, String> expectedQuery = json.readValue(
855-
"{\"itemsPerPage\":\"10\",\"page\":\"1\",\"type\":\"basic%2Calgolia\",\"platform\":\"none\",\"sort\":\"createdAt\",\"order\":\"desc\"}",
855+
"{\"itemsPerPage\":\"2\",\"page\":\"1\",\"type\":\"basic%2Calgolia\",\"platform\":\"none\",\"sort\":\"createdAt\",\"order\":\"asc\"}",
856856
new TypeReference<HashMap<String, String>>() {}
857857
);
858858
Map<String, Object> actualQuery = req.queryParameters;
@@ -866,18 +866,16 @@ void getAuthenticationsTest1() {
866866
}
867867

868868
var res = clientE2E.getAuthentications(
869-
10,
869+
2,
870870
1,
871871
List.of(AuthenticationType.fromValue("basic"), AuthenticationType.fromValue("algolia")),
872872
List.of(PlatformNone.fromValue("none")),
873873
AuthenticationSortKeys.fromValue("createdAt"),
874-
OrderKeys.fromValue("desc")
874+
OrderKeys.fromValue("asc")
875875
);
876876
assertDoesNotThrow(() ->
877877
JSONAssert.assertEquals(
878-
"{\"pagination\":{\"page\":1,\"itemsPerPage\":10},\"authentications\":[{\"authenticationID\":\"b57a7ea5-8592-493b-b75b-6c66d77aee7f\",\"type\":\"algolia\",\"name\":\"Auto-generated" +
879-
" Authentication for T8JK9S7I7X -" +
880-
" 1704732447751\",\"input\":{},\"createdAt\":\"2024-01-08T16:47:31Z\",\"updatedAt\":\"2024-01-08T16:47:31Z\"},{},{},{},{},{},{},{}]}",
878+
"{\"pagination\":{\"page\":1,\"itemsPerPage\":2},\"authentications\":[{\"authenticationID\":\"474f050f-a771-464c-a016-323538029f5f\",\"type\":\"algolia\",\"name\":\"algolia-auth-1677060483885\",\"input\":{},\"createdAt\":\"2023-02-22T10:08:04Z\",\"updatedAt\":\"2023-10-25T08:41:56Z\"},{}]}",
881879
json.writeValueAsString(res),
882880
JSONCompareMode.LENIENT
883881
)

0 commit comments

Comments
 (0)