embed_workflow 0.1.0 → 0.2.1

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: 9c3fb9638ce655db35c59a036d08ffd08b38bfcc04391e9bd3da8d66d0eb4bc4
4
- data.tar.gz: 5c54e0f84a92afe9e8c70bdf2fe27b6c0a03b6b380eac907cb20481705210389
3
+ metadata.gz: 2fcff57bde94551b5bb62037b9444713e9c308f9cfe69e1cbb49bb5d00155ab0
4
+ data.tar.gz: c1adcace9046c5a66257618dfaf6a732386e556e3abbe658520a3c04b3a4b728
5
5
  SHA512:
6
- metadata.gz: 3f479225062e4d0165e0d5bc138102b3a225b3dbfb5d73d01dd30b8cd37c8ab27216e9cfe7c80f9a61b8d5e1991ee52b32837d2d17af8651085fcbdbd511b804
7
- data.tar.gz: 7c5bfa850d070b851003c6f170ef0d85362860aab59928ebb6ff6f1e036b389d10c75bf086539dceb9e6cfa4b270aa68d7cca8cdcb3006978e38d05056abe2f3
6
+ metadata.gz: a99a3671d5c01b52b112cb71c4832760413213e10df78f0b90bbb708eedadc5a81f31dadf8d05328d6d5e8fd1370188cb0e5c660386b8fd91b279b37d070c204
7
+ data.tar.gz: fad1fd3c295dd970c779247021c9e25406cabb05382ea09aed6b81d6bdc83b88495bfe691db3e427df1909193ee20cbe01f60ea8f2d49bbdee8289a0be91a2b1
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "net/http"
4
+ require "uri"
5
+
6
+ module EmbedWorkflow
7
+ module AppConnections
8
+ class << self
9
+ include Base
10
+ include Client
11
+
12
+ RESOURCE_BASE_PATH = "#{BASE_API_PATH}/app_connections".freeze
13
+
14
+ def list(user_key: nil, starting_after: nil, ending_before: nil, limit: nil)
15
+ params = {
16
+ user_key: user_key,
17
+ starting_after: starting_after,
18
+ ending_before: ending_before,
19
+ limit: limit
20
+ }.compact
21
+
22
+ get_request(
23
+ path: RESOURCE_BASE_PATH,
24
+ params: params
25
+ )
26
+ end
27
+
28
+ def fetch(id:, user_key: nil)
29
+ params = { user_key: user_key }.compact
30
+
31
+ get_request(
32
+ path: "#{RESOURCE_BASE_PATH}/#{id}",
33
+ params: params
34
+ )
35
+ end
36
+
37
+ def create(name:, app_type:, config:, user_key: nil)
38
+ attrs = {
39
+ name: name,
40
+ app_type: app_type,
41
+ config: config,
42
+ user_key: user_key
43
+ }.compact
44
+
45
+ post_request(
46
+ path: RESOURCE_BASE_PATH,
47
+ body: attrs
48
+ )
49
+ end
50
+
51
+ def update(id:, name: nil, app_type: nil, config: nil, user_key: nil)
52
+ attrs = {
53
+ name: name,
54
+ app_type: app_type,
55
+ config: config,
56
+ user_key: user_key
57
+ }.compact
58
+
59
+ put_request(
60
+ path: "#{RESOURCE_BASE_PATH}/#{id}",
61
+ body: attrs
62
+ )
63
+ end
64
+
65
+ def delete(id:, user_key: nil)
66
+ params = { user_key: user_key }.compact
67
+
68
+ delete_request(
69
+ path: "#{RESOURCE_BASE_PATH}/#{id}",
70
+ params: params
71
+ )
72
+ end
73
+ end
74
+ end
75
+ end
@@ -11,12 +11,13 @@ module EmbedWorkflow
11
11
 
12
12
  RESOURCE_BASE_PATH = "#{BASE_API_PATH}/users".freeze
13
13
 
14
- def upsert(key:, name: nil, email: nil, config: nil)
14
+ def upsert(key:, name: nil, email: nil, data: nil, groups: nil)
15
15
  attrs = {
16
16
  key: key,
17
17
  name: name,
18
18
  email: email,
19
- config: config
19
+ data: data,
20
+ groups: groups
20
21
  }.compact
21
22
 
22
23
  put_request(
@@ -28,6 +29,23 @@ module EmbedWorkflow
28
29
  def fetch(key:)
29
30
  get_request(path: "#{RESOURCE_BASE_PATH}/#{key}")
30
31
  end
32
+
33
+ def list(starting_after: nil, ending_before: nil, limit: nil)
34
+ params = {
35
+ starting_after: starting_after,
36
+ ending_before: ending_before,
37
+ limit: limit
38
+ }.compact
39
+
40
+ get_request(
41
+ path: RESOURCE_BASE_PATH,
42
+ params: params
43
+ )
44
+ end
45
+
46
+ def delete(key:)
47
+ delete_request(path: "#{RESOURCE_BASE_PATH}/#{key}")
48
+ end
31
49
  end
32
50
  end
33
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EmbedWorkflow
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -45,10 +45,17 @@ module EmbedWorkflow
45
45
  )
46
46
  end
47
47
 
48
- def list(user_key: nil, starting_after: nil, ending_before: nil)
48
+ def list(user_key: nil, starting_after: nil, ending_before: nil, limit: nil)
49
+ params = {
50
+ user_key: user_key,
51
+ starting_after: starting_after,
52
+ ending_before: ending_before,
53
+ limit: limit
54
+ }.compact
55
+
49
56
  get_request(
50
57
  path: RESOURCE_BASE_PATH,
51
- params: { user_key: user_key, starting_after: starting_after, ending_before: ending_before }.compact
58
+ params: params
52
59
  )
53
60
  end
54
61
 
@@ -20,6 +20,7 @@ module EmbedWorkflow
20
20
  autoload :Client, "embed_workflow/client"
21
21
 
22
22
  autoload :Actions, "embed_workflow/actions"
23
+ autoload :AppConnections, "embed_workflow/app_connections"
23
24
  autoload :Executions, "embed_workflow/executions"
24
25
  autoload :Trigger, "embed_workflow/trigger"
25
26
  autoload :CatchHook, "embed_workflow/catch_hook"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embed_workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Embed Workflow
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-05 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler
@@ -60,6 +60,7 @@ extra_rdoc_files: []
60
60
  files:
61
61
  - lib/embed_workflow.rb
62
62
  - lib/embed_workflow/actions.rb
63
+ - lib/embed_workflow/app_connections.rb
63
64
  - lib/embed_workflow/base.rb
64
65
  - lib/embed_workflow/catch_hook.rb
65
66
  - lib/embed_workflow/client.rb
@@ -88,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0'
90
91
  requirements: []
91
- rubygems_version: 3.6.2
92
+ rubygems_version: 3.6.7
92
93
  specification_version: 4
93
94
  summary: API client for Embed Workflow
94
95
  test_files: []