forest_admin_datasource_zendesk 1.35.2 → 1.35.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 478d8fdb0459f5162aa947a6f66d86ea0937add9ddb7df82cf54dacc06435952
4
- data.tar.gz: 9865100baed679499151b742e6bc9eb9a8d5312b0cec55d5062017dc203bdb78
3
+ metadata.gz: 3a92dc21c5c89225cef2dc01275ec95578fb4aa1684d06cada3e1d0b353642f8
4
+ data.tar.gz: fc5d130f8c847694aac06a23d46b574010ab3624071c1e1fd443c13a203f7289
5
5
  SHA512:
6
- metadata.gz: 3ffd10553b69ce381670712dd7c87911b2f75d58d1f60f0a1dda72a695e29a04ff22f0fce7208e9d34cb76df2184be8102d9bf57a41d07fb23564e6cbae429a6
7
- data.tar.gz: 912b379ae2386fd354895f77f7b864c231e19841ea37b35090ac4726e7853fcfa0d6f3e7ee1f16e1e45fdb89d836c7e1efddf221a3aca58e3274a9576d484f7c
6
+ metadata.gz: 3b0549e3429c0aa1ee1cd3c5164409c8b8d875269fc71601b81fae6aa9eb200a1d952fc97d829d9e68f2d8339052d27e593d68536dee64204bd14e6c4848f7e4
7
+ data.tar.gz: 85684d25e5800abf5f9dcc85d32d6c497c67a1e27f0343243a1f4b67ea5d35856187e287698be110da8bda5ed0fee36f3d24bea69140c41efcdc7eb576e9cbfd
@@ -45,15 +45,24 @@ module ForestAdminDatasourceZendesk
45
45
 
46
46
  # Zendesk Search has no `id:` operator, so collections short-circuit
47
47
  # PK lookups to /resource/{id} when the filter is `id = N` or `id IN [...]`.
48
+ #
49
+ # The agent parses Number values through `to_f`, so an `id IN [...]` filter
50
+ # arrives as floats (e.g. `123.0`). Zendesk's REST ids are integers, so the
51
+ # values are normalised here before hitting /show_many or /resource/{id};
52
+ # otherwise the API rejects `123.0` (500) or the id-keyed result map misses.
48
53
  def extract_id_lookup(node)
49
54
  return nil unless node.is_a?(Leaf) && node.field == 'id'
50
55
 
51
56
  case node.operator
52
- when Operators::EQUAL then [node.value]
53
- when Operators::IN then Array(node.value)
57
+ when Operators::EQUAL then [normalize_id(node.value)]
58
+ when Operators::IN then Array(node.value).map { |v| normalize_id(v) }
54
59
  end
55
60
  end
56
61
 
62
+ def normalize_id(value)
63
+ Integer(value, exception: false) || value
64
+ end
65
+
57
66
  def project(record, projection)
58
67
  return record if projection.nil?
59
68
 
@@ -1,3 +1,3 @@
1
1
  module ForestAdminDatasourceZendesk
2
- VERSION = "1.35.2"
2
+ VERSION = "1.35.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_datasource_zendesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.35.2
4
+ version: 1.35.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Forest Admin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-03 00:00:00.000000000 Z
11
+ date: 2026-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport