workato-connector-sdk 1.3.10 → 1.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/workato/connector/sdk/block_invocation_refinements.rb +1 -1
- data/lib/workato/connector/sdk/dsl/stream_package.rb +1 -1
- data/lib/workato/connector/sdk/dsl/workato_package.rb +3 -0
- data/lib/workato/connector/sdk/operation.rb +11 -32
- data/lib/workato/connector/sdk/request.rb +33 -1
- data/lib/workato/connector/sdk/schema/type/time.rb +1 -1
- data/lib/workato/extension/content_encoding_decoder.rb +1 -1
- data/lib/workato/extension/string.rb +3 -1
- data/lib/workato/types/binary.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 956c62d7ff8d5f45ee006d40583f55839f13a725823c6c087b94689cce68dcb2
|
4
|
+
data.tar.gz: 267438cf0f54e21c622c90eb1f1ebf4430108ef1c0831a6b7102e3b82167b2d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f34ed256d0b3a598e84974ed12ba317b83211664c58aace84e87441e824022b120397822a59769c5780eee03eff0167328f9392ceaaffc2847ed9769c5f8415
|
7
|
+
data.tar.gz: b2f22c5f643b3a641d9a17819e991eba37c8f09774e27e3a2ad130df005089d636b095373d64c336767bf26bce0b0fd747a352bdb603af0639dba71d4853fcba
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.11
|
@@ -32,7 +32,7 @@ module Workato
|
|
32
32
|
|
33
33
|
sig { params(stream_name: String, input: SorbetTypes::StreamInputHash).returns(Stream::Proxy) }
|
34
34
|
def out(stream_name, input = {})
|
35
|
-
Stream::Proxy.new(input: input, name: stream_name, stream: streams[stream_name])
|
35
|
+
Stream::Proxy.new(input: Request.response!(input), name: stream_name, stream: streams[stream_name])
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
@@ -215,42 +215,21 @@ module Workato
|
|
215
215
|
def schema_fields(object_definitions_hash, settings, config_fields, &schema_proc)
|
216
216
|
return [] unless schema_proc
|
217
217
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
218
|
+
Array.wrap(
|
219
|
+
execute(settings, config_fields) do |connection, input|
|
220
|
+
T.unsafe(self).instance_exec(
|
221
|
+
object_definitions_hash,
|
222
|
+
connection,
|
223
|
+
input,
|
224
|
+
&schema_proc
|
225
|
+
)
|
226
|
+
end
|
227
|
+
)
|
226
228
|
end
|
227
229
|
|
228
230
|
sig { params(request_or_result: T.untyped).returns(T.untyped) }
|
229
231
|
def resolve_request(request_or_result)
|
230
|
-
|
231
|
-
when Request
|
232
|
-
resolve_request(request_or_result.response!)
|
233
|
-
when ::Array
|
234
|
-
request_or_result.each_with_index.inject(request_or_result) do |acc, (item, index)|
|
235
|
-
response_item = resolve_request(item)
|
236
|
-
if response_item.equal?(item)
|
237
|
-
acc
|
238
|
-
else
|
239
|
-
(acc == request_or_result ? acc.dup : acc).tap { |a| a[index] = response_item }
|
240
|
-
end
|
241
|
-
end
|
242
|
-
when ::Hash
|
243
|
-
request_or_result.inject(request_or_result) do |acc, (key, value)|
|
244
|
-
response_value = resolve_request(value)
|
245
|
-
if response_value.equal?(value)
|
246
|
-
acc
|
247
|
-
else
|
248
|
-
(acc == request_or_result ? acc.dup : acc).tap { |h| h[key] = response_value }
|
249
|
-
end
|
250
|
-
end
|
251
|
-
else
|
252
|
-
request_or_result
|
253
|
-
end
|
232
|
+
Request.response!(request_or_result)
|
254
233
|
end
|
255
234
|
|
256
235
|
sig { params(value: T.untyped).returns(T.untyped) }
|
@@ -257,6 +257,38 @@ module Workato
|
|
257
257
|
response!.try(...)
|
258
258
|
end
|
259
259
|
|
260
|
+
class << self
|
261
|
+
extend T::Sig
|
262
|
+
|
263
|
+
sig { params(request_or_result: T.untyped).returns(T.untyped) }
|
264
|
+
def response!(request_or_result)
|
265
|
+
case request_or_result
|
266
|
+
when Request
|
267
|
+
response!(request_or_result.response!)
|
268
|
+
when ::Array
|
269
|
+
request_or_result.each_with_index.inject(request_or_result) do |acc, (item, index)|
|
270
|
+
response_item = response!(item)
|
271
|
+
if response_item.equal?(item)
|
272
|
+
acc
|
273
|
+
else
|
274
|
+
(acc == request_or_result ? acc.dup : acc).tap { |a| a[index] = response_item }
|
275
|
+
end
|
276
|
+
end
|
277
|
+
when ::Hash
|
278
|
+
request_or_result.inject(request_or_result) do |acc, (key, value)|
|
279
|
+
response_value = response!(value)
|
280
|
+
if response_value.equal?(value)
|
281
|
+
acc
|
282
|
+
else
|
283
|
+
(acc == request_or_result ? acc.dup : acc).tap { |h| h[key] = response_value }
|
284
|
+
end
|
285
|
+
end
|
286
|
+
else
|
287
|
+
request_or_result
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
260
292
|
private
|
261
293
|
|
262
294
|
DEFAULT_RENDER_REQUEST = ->(_) {}
|
@@ -567,7 +599,7 @@ module Workato
|
|
567
599
|
end
|
568
600
|
|
569
601
|
def net_http_object(hostname, port)
|
570
|
-
net = super
|
602
|
+
net = super
|
571
603
|
net.extra_chain_cert = ssl_extra_chain_cert if ssl_extra_chain_cert
|
572
604
|
net
|
573
605
|
end
|
data/lib/workato/types/binary.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workato-connector-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Abolmasov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|