envoy-hooks 0.3.0 → 0.4.0

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: 9652ef54ad9d10e92e4d1953316b4422fecfcc56ff5215eda8d6e692487f4088
4
- data.tar.gz: c97991170af52414d7b4cdfb248b26afcc2eddf3e5c7bce6df61c3082d8ced94
3
+ metadata.gz: 66fb9535f6b020064f0210e548d9ff8432104ce9c542505b5cba7a1a4fecd238
4
+ data.tar.gz: 790a8014328d4503327692400738cc56666a57edd0366df87d5019d6f01c1228
5
5
  SHA512:
6
- metadata.gz: 2d28d4b89bfe107a2e3a6f35c5d138d5d151e49c476bef94ef3d037895fc3abb8c8a1e8f6a4660ce39680d5a00e98c0564a35b0cc8f0befae89a628c86ca8158
7
- data.tar.gz: e6c1c6f9bf722a11b7686fa266b0a99264fca88d6088470e317364f9f6a912bbec5dcd63460c267ebe62d405b6ac48771a6ed13539b99fd0a75fcdeed718e08d
6
+ metadata.gz: 7b54a7b95846810ccb5ef8d304db79cffc6ba2c91b1c85042ef4e1e8768983b6feab9224413a5c958fcc4bc63580d93a777f88b054b5ed41e614cf2b9a161287
7
+ data.tar.gz: d7567d3a3bbe1050944023264faa5863ae3ca30348c444b78159dd9f963155c64b20e0ee6c024db5c5c0e516805e87886c7fc1573b14fa2bf2ba55cd995883f7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- envoy-hooks (0.3.0)
4
+ envoy-hooks (0.4.0)
5
5
  faraday (~> 0.15.4)
6
6
  faraday-net_http (~> 1.0)
7
7
  faraday_middleware (~> 0.12.2)
@@ -15,7 +15,7 @@ GEM
15
15
  faraday-net_http (1.0.1)
16
16
  faraday_middleware (0.12.2)
17
17
  faraday (>= 0.7.4, < 1.0)
18
- multipart-post (2.1.1)
18
+ multipart-post (2.2.0)
19
19
  rake (13.0.6)
20
20
  rspec (3.10.0)
21
21
  rspec-core (~> 3.10.0)
@@ -42,4 +42,4 @@ DEPENDENCIES
42
42
  rspec (~> 3.0)
43
43
 
44
44
  BUNDLED WITH
45
- 2.3.5
45
+ 2.3.15
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Envoy
4
4
  class Hooks
5
- VERSION = "0.3.0"
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
data/lib/envoy/hooks.rb CHANGED
@@ -35,8 +35,9 @@ module Envoy
35
35
  if !subscriptionScope || !subscriptionScope[:type] || !subscriptionScope[:id]
36
36
  raise(Error, 'Must fully define a subscriptionScope for `upsertSubscription`')
37
37
  end
38
- validateEnum("subscriptionScope.type", subscriptionScope[:type], %w[LOCATION COMPANY USER])
39
- validateEnum("status", status, %w[ENABLED DISABLED PENDING])
38
+
39
+ validateEnum('subscriptionScope.type', subscriptionScope[:type], %w[LOCATION COMPANY USER])
40
+ validateEnum('status', status, %w[ENABLED DISABLED PENDING])
40
41
 
41
42
  faraday.post('/rest/v1/subscriptions', {
42
43
  subscriptionScope: subscriptionScope,
@@ -49,8 +50,7 @@ module Envoy
49
50
  })
50
51
  end
51
52
 
52
-
53
- def triggerUIHooks(locationId:, triggerName:, responseType:, resourceId: nil, accentColor: nil, uiHooks: [], previewMode: false)
53
+ def triggerUIHooks(locationId:, triggerName:, responseType:, resourceId: nil, accentColor: nil, uiHookIds: [], previewMode: false)
54
54
  validateEnum('responseType', responseType, %w[HTML JSON])
55
55
 
56
56
  faraday.post("/rest/v1/locations/#{locationId}/hooks/ui/trigger", {
@@ -60,7 +60,7 @@ module Envoy
60
60
  resourceId: resourceId,
61
61
  accentColor: accentColor,
62
62
  previewMode: previewMode,
63
- uiHooks: uiHooks
63
+ uiHookIds: uiHookIds
64
64
  })
65
65
  end
66
66
 
@@ -72,6 +72,15 @@ module Envoy
72
72
  })
73
73
  end
74
74
 
75
+ def triggerEventHooks(locationId:, triggerName:, resourceId: nil, eventHookIds: [])
76
+ faraday.post("/rest/v1/locations/#{locationId}/hooks/event/trigger", {
77
+ locationId: locationId,
78
+ triggerName: triggerName,
79
+ resourceId: resourceId,
80
+ eventHookIds: eventHookIds
81
+ })
82
+ end
83
+
75
84
  def syncClientConfig(
76
85
  clientId:,
77
86
  clientSecret:,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envoy-hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey-Biles-Envoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday