Skip to content

Commit 48bb50c

Browse files
authored
Merge branch 'main' into fix/update-crawler
2 parents 8adbc8b + ab2bc48 commit 48bb50c

File tree

34 files changed

+99
-139
lines changed

34 files changed

+99
-139
lines changed

clients/algoliasearch-client-swift/Sources/Core/Helpers/Extensions.swift

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,6 @@ public extension KeyedEncodingContainerProtocol {
161161
try self.encodeMap(pairs)
162162
}
163163
}
164-
165-
mutating func encode(_ value: Decimal, forKey key: Self.Key) throws {
166-
var mutableValue = value
167-
let stringValue = NSDecimalString(&mutableValue, Locale(identifier: "en_US"))
168-
try self.encode(stringValue, forKey: key)
169-
}
170-
171-
mutating func encodeIfPresent(_ value: Decimal?, forKey key: Self.Key) throws {
172-
if let value {
173-
try self.encode(value, forKey: key)
174-
}
175-
}
176164
}
177165

178166
public extension KeyedDecodingContainerProtocol {
@@ -213,34 +201,6 @@ public extension KeyedDecodingContainerProtocol {
213201

214202
return map
215203
}
216-
217-
func decode(_ type: Decimal.Type, forKey key: Self.Key) throws -> Decimal {
218-
let stringValue = try decode(String.self, forKey: key)
219-
guard let decimalValue = Decimal(string: stringValue) else {
220-
let context = DecodingError.Context(
221-
codingPath: [key],
222-
debugDescription: "The key \(key) couldn't be converted to a Decimal value"
223-
)
224-
throw DecodingError.typeMismatch(type, context)
225-
}
226-
227-
return decimalValue
228-
}
229-
230-
func decodeIfPresent(_ type: Decimal.Type, forKey key: Self.Key) throws -> Decimal? {
231-
guard let stringValue = try decodeIfPresent(String.self, forKey: key) else {
232-
return nil
233-
}
234-
guard let decimalValue = Decimal(string: stringValue) else {
235-
let context = DecodingError.Context(
236-
codingPath: [key],
237-
debugDescription: "The key \(key) couldn't be converted to a Decimal value"
238-
)
239-
throw DecodingError.typeMismatch(type, context)
240-
}
241-
242-
return decimalValue
243-
}
244204
}
245205

246206
extension HTTPURLResponse {

docs/bundled/insights-snippets.json

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

docs/snippets/csharp/src/Insights.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public async Task SnippetForInsightsClientPushEvents1()
509509
Index = "products",
510510
UserToken = "user-123456",
511511
AuthenticatedUserToken = "user-123456",
512-
Timestamp = 1738454400000L,
512+
Timestamp = 1738713600000L,
513513
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
514514
QueryID = "43b15df305339e827f0ac0bdc5ebcaa7",
515515
}
@@ -522,7 +522,7 @@ public async Task SnippetForInsightsClientPushEvents1()
522522
Index = "products",
523523
UserToken = "user-123456",
524524
AuthenticatedUserToken = "user-123456",
525-
Timestamp = 1738454400000L,
525+
Timestamp = 1738713600000L,
526526
ObjectIDs = new List<string> { "9780545139700", "9780439784542" },
527527
}
528528
),

docs/snippets/dart/lib/insights.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ void snippetForpushEvents1() async {
566566
index: "products",
567567
userToken: "user-123456",
568568
authenticatedUserToken: "user-123456",
569-
timestamp: 1738454400000,
569+
timestamp: 1738713600000,
570570
objectIDs: [
571571
"9780545139700",
572572
"9780439784542",
@@ -579,7 +579,7 @@ void snippetForpushEvents1() async {
579579
index: "products",
580580
userToken: "user-123456",
581581
authenticatedUserToken: "user-123456",
582-
timestamp: 1738454400000,
582+
timestamp: 1738713600000,
583583
objectIDs: [
584584
"9780545139700",
585585
"9780439784542",

docs/snippets/go/src/insights.go

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

docs/snippets/java/src/test/java/com/algolia/Insights.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ void snippetForPushEvents1() throws Exception {
490490
.setIndex("products")
491491
.setUserToken("user-123456")
492492
.setAuthenticatedUserToken("user-123456")
493-
.setTimestamp(1738454400000L)
493+
.setTimestamp(1738713600000L)
494494
.setObjectIDs(Arrays.asList("9780545139700", "9780439784542"))
495495
.setQueryID("43b15df305339e827f0ac0bdc5ebcaa7"),
496496
new ViewedObjectIDs()
@@ -499,7 +499,7 @@ void snippetForPushEvents1() throws Exception {
499499
.setIndex("products")
500500
.setUserToken("user-123456")
501501
.setAuthenticatedUserToken("user-123456")
502-
.setTimestamp(1738454400000L)
502+
.setTimestamp(1738713600000L)
503503
.setObjectIDs(Arrays.asList("9780545139700", "9780439784542"))
504504
)
505505
)

docs/snippets/javascript/src/insights.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export async function snippetForPushEvents1(): Promise<void> {
453453
index: 'products',
454454
userToken: 'user-123456',
455455
authenticatedUserToken: 'user-123456',
456-
timestamp: 1738454400000,
456+
timestamp: 1738713600000,
457457
objectIDs: ['9780545139700', '9780439784542'],
458458
queryID: '43b15df305339e827f0ac0bdc5ebcaa7',
459459
},
@@ -463,7 +463,7 @@ export async function snippetForPushEvents1(): Promise<void> {
463463
index: 'products',
464464
userToken: 'user-123456',
465465
authenticatedUserToken: 'user-123456',
466-
timestamp: 1738454400000,
466+
timestamp: 1738713600000,
467467
objectIDs: ['9780545139700', '9780439784542'],
468468
},
469469
],

docs/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Insights.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ class SnippetInsightsClient {
533533
index = "products",
534534
userToken = "user-123456",
535535
authenticatedUserToken = "user-123456",
536-
timestamp = 1738454400000L,
536+
timestamp = 1738713600000L,
537537
objectIDs = listOf("9780545139700", "9780439784542"),
538538
queryID = "43b15df305339e827f0ac0bdc5ebcaa7",
539539
),
@@ -543,7 +543,7 @@ class SnippetInsightsClient {
543543
index = "products",
544544
userToken = "user-123456",
545545
authenticatedUserToken = "user-123456",
546-
timestamp = 1738454400000L,
546+
timestamp = 1738713600000L,
547547
objectIDs = listOf("9780545139700", "9780439784542"),
548548
),
549549
),

docs/snippets/php/src/Insights.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ public function snippetForPushEvents1(): void
589589
'index' => 'products',
590590
'userToken' => 'user-123456',
591591
'authenticatedUserToken' => 'user-123456',
592-
'timestamp' => 1738454400000,
592+
'timestamp' => 1738713600000,
593593
'objectIDs' => [
594594
'9780545139700',
595595

@@ -603,7 +603,7 @@ public function snippetForPushEvents1(): void
603603
'index' => 'products',
604604
'userToken' => 'user-123456',
605605
'authenticatedUserToken' => 'user-123456',
606-
'timestamp' => 1738454400000,
606+
'timestamp' => 1738713600000,
607607
'objectIDs' => [
608608
'9780545139700',
609609

docs/snippets/python/insights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def snippet_for_push_events1():
634634
"index": "products",
635635
"userToken": "user-123456",
636636
"authenticatedUserToken": "user-123456",
637-
"timestamp": 1738454400000,
637+
"timestamp": 1738713600000,
638638
"objectIDs": [
639639
"9780545139700",
640640
"9780439784542",
@@ -647,7 +647,7 @@ def snippet_for_push_events1():
647647
"index": "products",
648648
"userToken": "user-123456",
649649
"authenticatedUserToken": "user-123456",
650-
"timestamp": 1738454400000,
650+
"timestamp": 1738713600000,
651651
"objectIDs": [
652652
"9780545139700",
653653
"9780439784542",

0 commit comments

Comments
 (0)