workato-connector-sdk 1.3.4 → 1.3.6
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/cli/exec_command.rb +1 -1
- data/lib/workato/cli/main.rb +8 -8
- data/lib/workato/cli/oauth2_command.rb +1 -1
- data/lib/workato/connector/sdk/action.rb +2 -2
- data/lib/workato/connector/sdk/connection.rb +72 -37
- data/lib/workato/connector/sdk/connector.rb +92 -66
- data/lib/workato/connector/sdk/core.rb +18 -18
- data/lib/workato/connector/sdk/dsl/aws.rb +1 -3
- data/lib/workato/connector/sdk/dsl/reinvoke_after.rb +1 -2
- data/lib/workato/connector/sdk/dsl/workato_package.rb +6 -8
- data/lib/workato/connector/sdk/dsl.rb +13 -13
- data/lib/workato/connector/sdk/lookup_tables.rb +1 -3
- data/lib/workato/connector/sdk/object_definitions.rb +4 -4
- data/lib/workato/connector/sdk/operation.rb +27 -23
- data/lib/workato/connector/sdk/request.rb +18 -23
- data/lib/workato/connector/sdk/schema/field/array.rb +1 -1
- data/lib/workato/connector/sdk/schema/field/date.rb +1 -1
- data/lib/workato/connector/sdk/schema/field/date_time.rb +1 -1
- data/lib/workato/connector/sdk/schema/field/integer.rb +1 -1
- data/lib/workato/connector/sdk/schema/field/number.rb +1 -1
- data/lib/workato/connector/sdk/schema/field/object.rb +1 -1
- data/lib/workato/connector/sdk/schema/field/string.rb +1 -1
- data/lib/workato/connector/sdk/schema.rb +11 -13
- data/lib/workato/connector/sdk/settings.rb +5 -5
- data/lib/workato/connector/sdk/stream.rb +1 -3
- data/lib/workato/connector/sdk/streams.rb +0 -2
- data/lib/workato/connector/sdk/trigger.rb +6 -8
- data/lib/workato/connector/sdk.rb +1 -2
- data/lib/workato/extension/currency.rb +2 -2
- data/lib/workato/extension/enumerable.rb +1 -1
- data/lib/workato/{extension → utilities}/hash_with_indifferent_access.rb +7 -4
- data/lib/workato/utilities/xml.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 187eed4920526bb473b0a180df102f7efae2670486ce494d3bd2cb63014583a2
|
4
|
+
data.tar.gz: ec8bee19f0db62e579a2dfc4284527e21f62009a2e3a24ccdee0b1895c3a715d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da690f559eb1147232cea5818d3bb1d697ae30a7daff2ddd115ec0f53ba648372f477b2052e534aae8ab8b539d8cb07346dd04ada2362e59956853a68e2dbd07
|
7
|
+
data.tar.gz: 9fc5327fbc5dc9b4cf58102afaeec169557e36d39085e12a6522c63309d4481d87096e67820205cca6df6403bdaed76095d966289b56d4dbc3f8a9b0a70eaecb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.6
|
data/lib/workato/cli/main.rb
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
|
4
4
|
require 'thor'
|
5
5
|
require 'workato/connector/sdk'
|
6
|
-
require_relative '
|
7
|
-
require_relative '
|
8
|
-
require_relative '
|
9
|
-
require_relative '
|
10
|
-
require_relative '
|
11
|
-
require_relative '
|
12
|
-
require_relative '
|
13
|
-
require_relative '
|
6
|
+
require_relative 'exec_command'
|
7
|
+
require_relative 'edit_command'
|
8
|
+
require_relative 'schema_command'
|
9
|
+
require_relative 'generate_command'
|
10
|
+
require_relative 'push_command'
|
11
|
+
require_relative 'oauth2_command'
|
12
|
+
require_relative 'generators/connector_generator'
|
13
|
+
require_relative 'generators/master_key_generator'
|
14
14
|
|
15
15
|
module Workato
|
16
16
|
module CLI
|
@@ -1,9 +1,7 @@
|
|
1
1
|
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require_relative '
|
5
|
-
|
6
|
-
using Workato::Extension::HashWithIndifferentAccess
|
4
|
+
require_relative 'block_invocation_refinements'
|
7
5
|
|
8
6
|
module Workato
|
9
7
|
module Connector
|
@@ -13,19 +11,29 @@ module Workato
|
|
13
11
|
T.any(
|
14
12
|
# oauth2
|
15
13
|
[
|
16
|
-
HashWithIndifferentAccess, # tokens
|
14
|
+
ActiveSupport::HashWithIndifferentAccess, # tokens
|
17
15
|
T.untyped, # resource_owner_id
|
18
|
-
T.nilable(HashWithIndifferentAccess) # settings
|
16
|
+
T.nilable(ActiveSupport::HashWithIndifferentAccess) # settings
|
19
17
|
],
|
20
18
|
[
|
21
|
-
HashWithIndifferentAccess, # tokens
|
19
|
+
ActiveSupport::HashWithIndifferentAccess, # tokens
|
22
20
|
T.untyped # resource_owner_id
|
23
21
|
],
|
24
22
|
[
|
25
|
-
HashWithIndifferentAccess # tokens
|
23
|
+
ActiveSupport::HashWithIndifferentAccess # tokens
|
26
24
|
],
|
27
25
|
# custom_auth
|
28
|
-
HashWithIndifferentAccess
|
26
|
+
ActiveSupport::HashWithIndifferentAccess
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
RefreshOutput = T.type_alias do
|
31
|
+
T.any(
|
32
|
+
[
|
33
|
+
ActiveSupport::HashWithIndifferentAccess,
|
34
|
+
T.nilable(String)
|
35
|
+
],
|
36
|
+
ActiveSupport::HashWithIndifferentAccess
|
29
37
|
)
|
30
38
|
end
|
31
39
|
end
|
@@ -37,7 +45,7 @@ module Workato
|
|
37
45
|
using BlockInvocationRefinements
|
38
46
|
|
39
47
|
# @api private
|
40
|
-
sig { returns(HashWithIndifferentAccess) }
|
48
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
41
49
|
attr_reader :source
|
42
50
|
|
43
51
|
class_attribute :on_settings_update, instance_predicate: false
|
@@ -52,8 +60,14 @@ module Workato
|
|
52
60
|
end
|
53
61
|
def initialize(connection: {}, methods: {}, settings: {})
|
54
62
|
super()
|
55
|
-
@methods_source = T.let(
|
56
|
-
|
63
|
+
@methods_source = T.let(
|
64
|
+
Utilities::HashWithIndifferentAccess.wrap(methods),
|
65
|
+
ActiveSupport::HashWithIndifferentAccess
|
66
|
+
)
|
67
|
+
@source = T.let(
|
68
|
+
Utilities::HashWithIndifferentAccess.wrap(connection),
|
69
|
+
ActiveSupport::HashWithIndifferentAccess
|
70
|
+
)
|
57
71
|
@settings = T.let(settings, SorbetTypes::SettingsHash)
|
58
72
|
end
|
59
73
|
|
@@ -64,7 +78,7 @@ module Workato
|
|
64
78
|
end
|
65
79
|
|
66
80
|
# @api private
|
67
|
-
sig { returns(HashWithIndifferentAccess) }
|
81
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
68
82
|
def settings
|
69
83
|
# we can't freeze or memoise because some developers modify it for storing something temporary in it.
|
70
84
|
# always return a new copy
|
@@ -89,11 +103,13 @@ module Workato
|
|
89
103
|
def authorization
|
90
104
|
raise ::NotImplementedError, 'define authorization: before use' if source[:authorization].blank?
|
91
105
|
|
92
|
-
@authorization
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
106
|
+
@authorization ||= T.let(
|
107
|
+
Authorization.new(
|
108
|
+
connection: self,
|
109
|
+
authorization: source[:authorization],
|
110
|
+
methods: methods_source
|
111
|
+
),
|
112
|
+
T.nilable(Authorization)
|
97
113
|
)
|
98
114
|
end
|
99
115
|
|
@@ -137,7 +153,7 @@ module Workato
|
|
137
153
|
|
138
154
|
private
|
139
155
|
|
140
|
-
sig { returns(HashWithIndifferentAccess) }
|
156
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
141
157
|
attr_reader :methods_source
|
142
158
|
|
143
159
|
sig { returns(Dsl::WithDsl) }
|
@@ -151,15 +167,15 @@ module Workato
|
|
151
167
|
sig do
|
152
168
|
params(
|
153
169
|
connection: Connection,
|
154
|
-
authorization: HashWithIndifferentAccess,
|
155
|
-
methods: HashWithIndifferentAccess
|
170
|
+
authorization: ActiveSupport::HashWithIndifferentAccess,
|
171
|
+
methods: ActiveSupport::HashWithIndifferentAccess
|
156
172
|
).void
|
157
173
|
end
|
158
174
|
def initialize(connection:, authorization:, methods:)
|
159
175
|
@connection = T.let(connection, Connection)
|
160
|
-
@connection_source = T.let(connection.source, HashWithIndifferentAccess)
|
161
|
-
@source = T.let(authorization, HashWithIndifferentAccess)
|
162
|
-
@methods_source = T.let(methods, HashWithIndifferentAccess)
|
176
|
+
@connection_source = T.let(connection.source, ActiveSupport::HashWithIndifferentAccess)
|
177
|
+
@source = T.let(authorization, ActiveSupport::HashWithIndifferentAccess)
|
178
|
+
@methods_source = T.let(methods, ActiveSupport::HashWithIndifferentAccess)
|
163
179
|
end
|
164
180
|
|
165
181
|
sig { returns(String) }
|
@@ -243,7 +259,7 @@ module Workato
|
|
243
259
|
connection: Connection.new(
|
244
260
|
connection: connection_source.merge(
|
245
261
|
authorization: source.merge(
|
246
|
-
apply: nil # only skip apply authorization for re-authorization request
|
262
|
+
apply: nil # only skip apply authorization for re-authorization request, but don't skip detect_on
|
247
263
|
)
|
248
264
|
),
|
249
265
|
methods: methods_source,
|
@@ -255,6 +271,11 @@ module Workato
|
|
255
271
|
end
|
256
272
|
end
|
257
273
|
|
274
|
+
sig { returns(T::Boolean) }
|
275
|
+
def reauthorizable?
|
276
|
+
oauth2? || source[:acquire].present?
|
277
|
+
end
|
278
|
+
|
258
279
|
sig do
|
259
280
|
params(
|
260
281
|
http_code: T.nilable(Integer),
|
@@ -263,7 +284,7 @@ module Workato
|
|
263
284
|
).returns(T::Boolean)
|
264
285
|
end
|
265
286
|
def refresh?(http_code, http_body, exception)
|
266
|
-
return false unless
|
287
|
+
return false unless reauthorizable?
|
267
288
|
|
268
289
|
refresh_on = self.refresh_on
|
269
290
|
refresh_on.blank? || refresh_on.any? do |pattern|
|
@@ -274,12 +295,16 @@ module Workato
|
|
274
295
|
end
|
275
296
|
|
276
297
|
# @api private
|
277
|
-
sig
|
298
|
+
sig do
|
299
|
+
params(
|
300
|
+
settings: ActiveSupport::HashWithIndifferentAccess
|
301
|
+
).returns(T.nilable(ActiveSupport::HashWithIndifferentAccess))
|
302
|
+
end
|
278
303
|
def refresh!(settings)
|
279
304
|
if oauth2?
|
280
305
|
refresh_oauth2_token(settings)
|
281
306
|
elsif source[:acquire].present?
|
282
|
-
T.cast(acquire(settings), T.nilable(HashWithIndifferentAccess))
|
307
|
+
T.cast(acquire(settings), T.nilable(ActiveSupport::HashWithIndifferentAccess))
|
283
308
|
end
|
284
309
|
end
|
285
310
|
|
@@ -287,9 +312,7 @@ module Workato
|
|
287
312
|
params(
|
288
313
|
settings: T.nilable(SorbetTypes::SettingsHash),
|
289
314
|
refresh_token: T.nilable(String)
|
290
|
-
).returns(
|
291
|
-
T.any([HashWithIndifferentAccess, T.nilable(String)], HashWithIndifferentAccess)
|
292
|
-
)
|
315
|
+
).returns(SorbetTypes::RefreshOutput)
|
293
316
|
end
|
294
317
|
def refresh(settings = nil, refresh_token = nil)
|
295
318
|
@connection.merge_settings!(settings) if settings
|
@@ -308,7 +331,7 @@ module Workato
|
|
308
331
|
end
|
309
332
|
|
310
333
|
# @api private
|
311
|
-
sig { returns(HashWithIndifferentAccess) }
|
334
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
312
335
|
def source
|
313
336
|
return @source unless multi?
|
314
337
|
|
@@ -331,13 +354,17 @@ module Workato
|
|
331
354
|
|
332
355
|
private
|
333
356
|
|
334
|
-
sig { returns(HashWithIndifferentAccess) }
|
357
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
335
358
|
attr_reader :connection_source
|
336
359
|
|
337
|
-
sig { returns(HashWithIndifferentAccess) }
|
360
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
338
361
|
attr_reader :methods_source
|
339
362
|
|
340
|
-
sig
|
363
|
+
sig do
|
364
|
+
params(
|
365
|
+
settings: ActiveSupport::HashWithIndifferentAccess
|
366
|
+
).returns(ActiveSupport::HashWithIndifferentAccess)
|
367
|
+
end
|
341
368
|
def refresh_oauth2_token(settings)
|
342
369
|
if source[:refresh].present?
|
343
370
|
refresh_oauth2_token_using_refresh(settings)
|
@@ -348,16 +375,24 @@ module Workato
|
|
348
375
|
end
|
349
376
|
end
|
350
377
|
|
351
|
-
sig
|
378
|
+
sig do
|
379
|
+
params(
|
380
|
+
settings: ActiveSupport::HashWithIndifferentAccess
|
381
|
+
).returns(ActiveSupport::HashWithIndifferentAccess)
|
382
|
+
end
|
352
383
|
def refresh_oauth2_token_using_refresh(settings)
|
353
384
|
new_tokens, new_settings = refresh(settings, settings[:refresh_token])
|
354
|
-
new_tokens = HashWithIndifferentAccess.wrap(new_tokens)
|
385
|
+
new_tokens = Utilities::HashWithIndifferentAccess.wrap(new_tokens)
|
355
386
|
return new_tokens unless new_settings
|
356
387
|
|
357
388
|
new_tokens.merge(new_settings)
|
358
389
|
end
|
359
390
|
|
360
|
-
sig
|
391
|
+
sig do
|
392
|
+
params(
|
393
|
+
settings: ActiveSupport::HashWithIndifferentAccess
|
394
|
+
).returns(ActiveSupport::HashWithIndifferentAccess)
|
395
|
+
end
|
361
396
|
def refresh_oauth2_token_using_token_url(settings)
|
362
397
|
if settings[:refresh_token].blank?
|
363
398
|
raise NotImplementedError, 'refresh_token is empty. ' \
|
@@ -1,20 +1,20 @@
|
|
1
1
|
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
using Workato::Extension::HashWithIndifferentAccess
|
5
|
-
|
6
4
|
module Workato
|
7
5
|
module Connector
|
8
6
|
module Sdk
|
9
7
|
module SorbetTypes
|
10
|
-
SourceHash = T.type_alias
|
8
|
+
SourceHash = T.type_alias do
|
9
|
+
T.any(ActiveSupport::HashWithIndifferentAccess, T::Hash[T.any(Symbol, String), T.untyped])
|
10
|
+
end
|
11
11
|
end
|
12
12
|
|
13
13
|
class Connector
|
14
14
|
extend T::Sig
|
15
15
|
|
16
16
|
# @api private
|
17
|
-
sig { returns(HashWithIndifferentAccess) }
|
17
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
18
18
|
attr_reader :source
|
19
19
|
|
20
20
|
sig { params(path_to_source_code: String, settings: SorbetTypes::SettingsHash).returns(Connector) }
|
@@ -24,10 +24,22 @@ module Workato
|
|
24
24
|
|
25
25
|
sig { params(definition: SorbetTypes::SourceHash, settings: SorbetTypes::SettingsHash).void }
|
26
26
|
def initialize(definition, settings = {})
|
27
|
-
@source = T.let(
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
@source = T.let(
|
28
|
+
Utilities::HashWithIndifferentAccess.wrap(definition),
|
29
|
+
ActiveSupport::HashWithIndifferentAccess
|
30
|
+
)
|
31
|
+
@settings = T.let(
|
32
|
+
Utilities::HashWithIndifferentAccess.wrap(settings),
|
33
|
+
ActiveSupport::HashWithIndifferentAccess
|
34
|
+
)
|
35
|
+
@connection_source = T.let(
|
36
|
+
Utilities::HashWithIndifferentAccess.wrap(@source[:connection]),
|
37
|
+
ActiveSupport::HashWithIndifferentAccess
|
38
|
+
)
|
39
|
+
@methods_source = T.let(
|
40
|
+
Utilities::HashWithIndifferentAccess.wrap(@source[:methods]),
|
41
|
+
ActiveSupport::HashWithIndifferentAccess
|
42
|
+
)
|
31
43
|
end
|
32
44
|
|
33
45
|
sig { returns(T.nilable(String)) }
|
@@ -37,23 +49,27 @@ module Workato
|
|
37
49
|
|
38
50
|
sig { returns(ActionsProxy) }
|
39
51
|
def actions
|
40
|
-
@actions
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
52
|
+
@actions ||= T.let(
|
53
|
+
ActionsProxy.new(
|
54
|
+
actions: source[:actions].presence || {},
|
55
|
+
methods: methods_source,
|
56
|
+
object_definitions: object_definitions,
|
57
|
+
connection: connection,
|
58
|
+
streams: streams
|
59
|
+
),
|
60
|
+
T.nilable(ActionsProxy)
|
47
61
|
)
|
48
62
|
end
|
49
63
|
|
50
64
|
sig { returns(MethodsProxy) }
|
51
65
|
def methods
|
52
|
-
@methods
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
66
|
+
@methods ||= T.let(
|
67
|
+
MethodsProxy.new(
|
68
|
+
methods: methods_source,
|
69
|
+
connection: connection,
|
70
|
+
streams: streams
|
71
|
+
),
|
72
|
+
T.nilable(MethodsProxy)
|
57
73
|
)
|
58
74
|
end
|
59
75
|
|
@@ -72,64 +88,74 @@ module Workato
|
|
72
88
|
|
73
89
|
sig { returns(TriggersProxy) }
|
74
90
|
def triggers
|
75
|
-
@triggers
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
91
|
+
@triggers ||= T.let(
|
92
|
+
TriggersProxy.new(
|
93
|
+
triggers: source[:triggers].presence || {},
|
94
|
+
methods: methods_source,
|
95
|
+
connection: connection,
|
96
|
+
object_definitions: object_definitions,
|
97
|
+
streams: streams
|
98
|
+
),
|
99
|
+
T.nilable(TriggersProxy)
|
82
100
|
)
|
83
101
|
end
|
84
102
|
|
85
103
|
sig { returns(ObjectDefinitions) }
|
86
104
|
def object_definitions
|
87
|
-
@object_definitions
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
105
|
+
@object_definitions ||= T.let(
|
106
|
+
ObjectDefinitions.new(
|
107
|
+
object_definitions: source[:object_definitions].presence || {},
|
108
|
+
methods: methods_source,
|
109
|
+
connection: connection
|
110
|
+
),
|
111
|
+
T.nilable(ObjectDefinitions)
|
92
112
|
)
|
93
113
|
end
|
94
114
|
|
95
115
|
sig { returns(PickListsProxy) }
|
96
116
|
def pick_lists
|
97
|
-
@pick_lists
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
117
|
+
@pick_lists ||= T.let(
|
118
|
+
PickListsProxy.new(
|
119
|
+
pick_lists: source[:pick_lists].presence || {},
|
120
|
+
methods: methods_source,
|
121
|
+
connection: connection
|
122
|
+
),
|
123
|
+
T.nilable(PickListsProxy)
|
102
124
|
)
|
103
125
|
end
|
104
126
|
|
105
127
|
sig { returns(Connection) }
|
106
128
|
def connection
|
107
|
-
@connection
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
129
|
+
@connection ||= T.let(
|
130
|
+
Connection.new(
|
131
|
+
methods: methods_source,
|
132
|
+
connection: connection_source,
|
133
|
+
settings: settings
|
134
|
+
),
|
135
|
+
T.nilable(Connection)
|
112
136
|
)
|
113
137
|
end
|
114
138
|
|
115
139
|
sig { returns(Streams) }
|
116
140
|
def streams
|
117
|
-
@streams
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
141
|
+
@streams ||= T.let(
|
142
|
+
Streams.new(
|
143
|
+
streams: streams_sources,
|
144
|
+
methods: methods_source,
|
145
|
+
connection: connection
|
146
|
+
),
|
147
|
+
T.nilable(Streams)
|
122
148
|
)
|
123
149
|
end
|
124
150
|
|
125
151
|
private
|
126
152
|
|
127
|
-
sig { returns(HashWithIndifferentAccess) }
|
153
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
128
154
|
def streams_sources
|
129
|
-
@streams_sources = T.let(@streams_sources, T.nilable(HashWithIndifferentAccess))
|
155
|
+
@streams_sources = T.let(@streams_sources, T.nilable(ActiveSupport::HashWithIndifferentAccess))
|
130
156
|
return @streams_sources if @streams_sources
|
131
157
|
|
132
|
-
@streams_sources = HashWithIndifferentAccess.new
|
158
|
+
@streams_sources = ActiveSupport::HashWithIndifferentAccess.new
|
133
159
|
@streams_sources.merge!(source[:streams].presence || {})
|
134
160
|
(source[:actions] || {}).values.map do |action|
|
135
161
|
@streams_sources.merge!(action[:streams] || {})
|
@@ -140,10 +166,10 @@ module Workato
|
|
140
166
|
@streams_sources
|
141
167
|
end
|
142
168
|
|
143
|
-
sig { returns(HashWithIndifferentAccess) }
|
169
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
144
170
|
attr_reader :methods_source
|
145
171
|
|
146
|
-
sig { returns(HashWithIndifferentAccess) }
|
172
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
147
173
|
attr_reader :connection_source
|
148
174
|
|
149
175
|
sig { returns(SorbetTypes::SettingsHash) }
|
@@ -155,9 +181,9 @@ module Workato
|
|
155
181
|
|
156
182
|
sig do
|
157
183
|
params(
|
158
|
-
actions: HashWithIndifferentAccess,
|
184
|
+
actions: ActiveSupport::HashWithIndifferentAccess,
|
159
185
|
object_definitions: ObjectDefinitions,
|
160
|
-
methods: HashWithIndifferentAccess,
|
186
|
+
methods: ActiveSupport::HashWithIndifferentAccess,
|
161
187
|
connection: Connection,
|
162
188
|
streams: Streams
|
163
189
|
).void
|
@@ -178,7 +204,7 @@ module Workato
|
|
178
204
|
|
179
205
|
private
|
180
206
|
|
181
|
-
sig { returns(HashWithIndifferentAccess) }
|
207
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
182
208
|
attr_reader :methods
|
183
209
|
|
184
210
|
sig { returns(Connection) }
|
@@ -190,7 +216,7 @@ module Workato
|
|
190
216
|
sig { returns(ObjectDefinitions) }
|
191
217
|
attr_reader :object_definitions
|
192
218
|
|
193
|
-
sig { params(actions_source: HashWithIndifferentAccess).void }
|
219
|
+
sig { params(actions_source: ActiveSupport::HashWithIndifferentAccess).void }
|
194
220
|
def define_action_methods(actions_source)
|
195
221
|
actions_source.each do |action, definition|
|
196
222
|
define_singleton_method(action) do |input_ = nil|
|
@@ -216,7 +242,7 @@ module Workato
|
|
216
242
|
|
217
243
|
sig do
|
218
244
|
params(
|
219
|
-
methods: HashWithIndifferentAccess,
|
245
|
+
methods: ActiveSupport::HashWithIndifferentAccess,
|
220
246
|
connection: Connection,
|
221
247
|
streams: Streams
|
222
248
|
).void
|
@@ -231,7 +257,7 @@ module Workato
|
|
231
257
|
|
232
258
|
private
|
233
259
|
|
234
|
-
sig { returns(HashWithIndifferentAccess) }
|
260
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
235
261
|
attr_reader :methods
|
236
262
|
|
237
263
|
sig { returns(Connection) }
|
@@ -265,8 +291,8 @@ module Workato
|
|
265
291
|
|
266
292
|
sig do
|
267
293
|
params(
|
268
|
-
pick_lists: HashWithIndifferentAccess,
|
269
|
-
methods: HashWithIndifferentAccess,
|
294
|
+
pick_lists: ActiveSupport::HashWithIndifferentAccess,
|
295
|
+
methods: ActiveSupport::HashWithIndifferentAccess,
|
270
296
|
connection: Connection
|
271
297
|
).void
|
272
298
|
end
|
@@ -279,13 +305,13 @@ module Workato
|
|
279
305
|
|
280
306
|
private
|
281
307
|
|
282
|
-
sig { returns(HashWithIndifferentAccess) }
|
308
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
283
309
|
attr_reader :methods
|
284
310
|
|
285
311
|
sig { returns(Connection) }
|
286
312
|
attr_reader :connection
|
287
313
|
|
288
|
-
sig { params(pick_lists_source: HashWithIndifferentAccess).void }
|
314
|
+
sig { params(pick_lists_source: ActiveSupport::HashWithIndifferentAccess).void }
|
289
315
|
def define_action_methods(pick_lists_source)
|
290
316
|
pick_lists_source.each do |pick_list, pick_list_proc|
|
291
317
|
define_singleton_method(pick_list) do |settings = nil, args = {}|
|
@@ -318,9 +344,9 @@ module Workato
|
|
318
344
|
|
319
345
|
sig do
|
320
346
|
params(
|
321
|
-
triggers: HashWithIndifferentAccess,
|
347
|
+
triggers: ActiveSupport::HashWithIndifferentAccess,
|
322
348
|
object_definitions: ObjectDefinitions,
|
323
|
-
methods: HashWithIndifferentAccess,
|
349
|
+
methods: ActiveSupport::HashWithIndifferentAccess,
|
324
350
|
connection: Connection,
|
325
351
|
streams: Streams
|
326
352
|
).void
|
@@ -341,7 +367,7 @@ module Workato
|
|
341
367
|
|
342
368
|
private
|
343
369
|
|
344
|
-
sig { returns(HashWithIndifferentAccess) }
|
370
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
345
371
|
attr_reader :methods
|
346
372
|
|
347
373
|
sig { returns(Connection) }
|
@@ -353,7 +379,7 @@ module Workato
|
|
353
379
|
sig { returns(ObjectDefinitions) }
|
354
380
|
attr_reader :object_definitions
|
355
381
|
|
356
|
-
sig { params(triggers_source: HashWithIndifferentAccess).void }
|
382
|
+
sig { params(triggers_source: ActiveSupport::HashWithIndifferentAccess).void }
|
357
383
|
def define_trigger_methods(triggers_source)
|
358
384
|
triggers_source.each do |trigger, definition|
|
359
385
|
define_singleton_method(trigger) do |input_ = nil, payload = {}, headers = {}, params = {}|
|
@@ -42,21 +42,21 @@ module Workato
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
require_relative '
|
48
|
-
require_relative '
|
49
|
-
require_relative '
|
50
|
-
require_relative '
|
51
|
-
require_relative '
|
52
|
-
require_relative '
|
53
|
-
require_relative '
|
54
|
-
require_relative '
|
55
|
-
require_relative '
|
56
|
-
require_relative '
|
57
|
-
require_relative '
|
58
|
-
require_relative '
|
59
|
-
require_relative '
|
60
|
-
require_relative '
|
61
|
-
require_relative '
|
62
|
-
require_relative '
|
45
|
+
require 'workato/utilities/hash_with_indifferent_access'
|
46
|
+
|
47
|
+
require_relative 'errors'
|
48
|
+
require_relative 'account_properties'
|
49
|
+
require_relative 'operation'
|
50
|
+
require_relative 'connection'
|
51
|
+
require_relative 'stream'
|
52
|
+
require_relative 'streams'
|
53
|
+
require_relative 'action'
|
54
|
+
require_relative 'lookup_tables'
|
55
|
+
require_relative 'object_definitions'
|
56
|
+
require_relative 'request'
|
57
|
+
require_relative 'settings'
|
58
|
+
require_relative 'summarize'
|
59
|
+
require_relative 'trigger'
|
60
|
+
require_relative 'version'
|
61
|
+
require_relative 'workato_schemas'
|
62
|
+
require_relative 'connector'
|