multiwoven-integrations 0.37.4 → 0.37.5
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59ea4a91d7a1b3f7f9850dc4510479cfa7ed041ca99a1fa9e7ab00438e9f3792
|
|
4
|
+
data.tar.gz: 9ff38a77ba515018547e30b952cc717747f29d8cb039a12c7353e019a967f5b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb3428f6243ff49687d8ab3384112f11572d107928ff51be3b273ac81b6942cd411e9ed5a383e6c9a02b3c9a8add019ed78b438fe4b0e3789e7e55f11d4b70f1
|
|
7
|
+
data.tar.gz: 149180ed9a2cd5cb71a32d4163b52252b887676fd72eff62ae659d675ade36d1305f59161da64ec8a5a2013bc7deecafa9bc9e764a496c63a77e1d7edbb7044b
|
|
@@ -56,7 +56,7 @@ module Multiwoven::Integrations::Source
|
|
|
56
56
|
connection_config = sync_config.source.connection_specification
|
|
57
57
|
connection_config = connection_config.with_indifferent_access
|
|
58
58
|
connection_config = create_connection(connection_config)
|
|
59
|
-
if sync_config.increment_strategy_config
|
|
59
|
+
if sync_config.increment_strategy_config&.increment_strategy == "page"
|
|
60
60
|
@limit = sync_config.increment_strategy_config.limit
|
|
61
61
|
@offset = sync_config.increment_strategy_config.offset
|
|
62
62
|
else
|
|
@@ -82,6 +82,19 @@ module Multiwoven::Integrations::Source
|
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
+
def duplicate_request?(connection_config)
|
|
86
|
+
signature = [
|
|
87
|
+
@url,
|
|
88
|
+
connection_config[:http_method],
|
|
89
|
+
connection_config[:params],
|
|
90
|
+
connection_config[:request_format]
|
|
91
|
+
].to_json
|
|
92
|
+
return true if @last_request_signature == signature
|
|
93
|
+
|
|
94
|
+
@last_request_signature = signature
|
|
95
|
+
false
|
|
96
|
+
end
|
|
97
|
+
|
|
85
98
|
def create_connection(connection_config)
|
|
86
99
|
@url = "#{connection_config[:base_url]}#{connection_config[:path]}"
|
|
87
100
|
connection_config
|
|
@@ -113,6 +126,8 @@ module Multiwoven::Integrations::Source
|
|
|
113
126
|
def query(connection_config, query)
|
|
114
127
|
connection_config = prepare_config(connection_config)
|
|
115
128
|
build_paginated_request(connection_config, query)
|
|
129
|
+
return [] if duplicate_request?(connection_config)
|
|
130
|
+
|
|
116
131
|
response = send_request(
|
|
117
132
|
url: @url,
|
|
118
133
|
http_method: connection_config[:http_method],
|
|
@@ -144,12 +159,11 @@ module Multiwoven::Integrations::Source
|
|
|
144
159
|
def parse_response(response_body, parse_response)
|
|
145
160
|
case parse_response
|
|
146
161
|
when Array
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
data = Hash[records[0].zip(row_values)]
|
|
162
|
+
headers = JsonPath.on(response_body, parse_response[0]).flatten(1)
|
|
163
|
+
values = JsonPath.on(response_body, parse_response[1])
|
|
164
|
+
rows = values.first.is_a?(Array) ? values : values.each_slice(headers.size).to_a
|
|
165
|
+
rows.map do |row_values|
|
|
166
|
+
data = Hash[headers.zip(row_values)]
|
|
153
167
|
RecordMessage.new(data: data, emitted_at: Time.now.to_i).to_multiwoven_message
|
|
154
168
|
end
|
|
155
169
|
else
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"parse_response": {
|
|
74
74
|
"title": "Parse Response",
|
|
75
|
-
"description": "
|
|
75
|
+
"description": "How to extract rows from the response. Three supported forms: (1) a JSONPath expression pointing to a single record whose keys become column names, e.g. `$.data[0]`; (2) a JSON array of two JSONPaths `[\"$.headers_path\", \"$.values_path\"]` where the first resolves to column names and the second to a flat stream of values sliced into rows; (3) the same two-path form where the values path resolves to a 2D array (array of row-arrays), useful for Microsoft Graph Excel range endpoints, e.g. `[\"$.values[0]\", \"$.values[1:]\"]`.",
|
|
76
76
|
"type": "string",
|
|
77
77
|
"x-response-format": true,
|
|
78
78
|
"order": 8,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: multiwoven-integrations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.37.
|
|
4
|
+
version: 0.37.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Subin T P
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|