connectors_utility 8.6.0.4.pre.20221115T001453Z → 8.6.0.4.pre.20221115T002329Z

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: f8ce30cca8213ab393ffc87c34442b10e1a075d17a9df05589938bf0b88feb4c
4
- data.tar.gz: 53a95968b2481cc53febfa847555979fe7719a861648020467557991d4d14d2e
3
+ metadata.gz: 996cc59bf15e82bf245bc30716d0ac93861514fe9f8e73f92948f80e60adccc4
4
+ data.tar.gz: f904929c8d82a73e1763cf30536c7e703b885d633f05e9cdecbba310eb44d99d
5
5
  SHA512:
6
- metadata.gz: b900a27b30fd10a035d205011fe80d5a72c977c3761f201a2debaaa09a21579008831fdd326ca67652e32dff79855e84cec312e5a4a5e1231f6e0576074ff142
7
- data.tar.gz: 82d5f5851ed643a53faa95d773dfd41dcceef7afe4fadd065c7ab2613746c984473a7b6939b6809f79049a881ad2166f94b96c3a20accfe4e01571aed51e8294
6
+ metadata.gz: d22401f2411e468c734bb015e6027ede2858a64fcdeb6ea446ad9cc4871c68791e736dea230e5a2fcee2c77b84514c41314cd866f7766bb2906e4396b1c557e8
7
+ data.tar.gz: e3ed8f7cb8e0d10bfbc220520ff7d98dcc7d221ee65f4790976eb6e1f538f78ac781eaa453258896749ed56e41eb3cf3c065a206cbb209740d43dbe6b37f7b52
@@ -0,0 +1,17 @@
1
+ #
2
+ # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ # or more contributor license agreements. Licensed under the Elastic License;
4
+ # you may not use this file except in compliance with the Elastic License.
5
+ #
6
+
7
+ # frozen_string_literal: true
8
+
9
+ module Core
10
+ module Filtering
11
+ class ValidationStatus
12
+ INVALID = 'invalid'
13
+ VALID = 'valid'
14
+ EDITED = 'edited'
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,22 @@
1
+ #
2
+ # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ # or more contributor license agreements. Licensed under the Elastic License;
4
+ # you may not use this file except in compliance with the Elastic License.
5
+ #
6
+
7
+ # frozen_string_literal: true
8
+
9
+ module Utility
10
+ class Filtering
11
+ class << self
12
+ def extract_filter(filtering)
13
+ return {} unless filtering.present?
14
+
15
+ # assume for now, that first object in filtering array or a filter object itself is the only filtering object
16
+ filter = filtering.is_a?(Array) ? filtering.first : filtering
17
+
18
+ filter.present? ? filter : {}
19
+ end
20
+ end
21
+ end
22
+ end
data/lib/utility.rb CHANGED
@@ -12,6 +12,7 @@ require 'utility/elasticsearch/index/mappings'
12
12
  require 'utility/elasticsearch/index/text_analysis_settings'
13
13
  require 'utility/environment'
14
14
  require 'utility/errors'
15
+ require 'utility/filtering'
15
16
  require 'utility/es_client'
16
17
  require 'utility/exception_tracking'
17
18
  require 'utility/extension_mapping_util'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connectors_utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.6.0.4.pre.20221115T001453Z
4
+ version: 8.6.0.4.pre.20221115T002329Z
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
@@ -108,6 +108,7 @@ files:
108
108
  - lib/connectors_utility.rb
109
109
  - lib/core/connector_settings.rb
110
110
  - lib/core/elastic_connector_actions.rb
111
+ - lib/core/filtering/validation_status.rb
111
112
  - lib/core/scheduler.rb
112
113
  - lib/utility.rb
113
114
  - lib/utility/bulk_queue.rb
@@ -122,6 +123,7 @@ files:
122
123
  - lib/utility/es_client.rb
123
124
  - lib/utility/exception_tracking.rb
124
125
  - lib/utility/extension_mapping_util.rb
126
+ - lib/utility/filtering.rb
125
127
  - lib/utility/logger.rb
126
128
  homepage: https://github.com/elastic/connectors-ruby
127
129
  licenses: