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 +4 -4
- data/Gemfile.lock +3 -3
- data/lib/envoy/hooks/version.rb +1 -1
- data/lib/envoy/hooks.rb +14 -5
- 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: 66fb9535f6b020064f0210e548d9ff8432104ce9c542505b5cba7a1a4fecd238
|
|
4
|
+
data.tar.gz: 790a8014328d4503327692400738cc56666a57edd0366df87d5019d6f01c1228
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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.
|
|
45
|
+
2.3.15
|
data/lib/envoy/hooks/version.rb
CHANGED
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
|
-
|
|
39
|
-
validateEnum(
|
|
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
|
-
|
|
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.
|
|
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-
|
|
11
|
+
date: 2022-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|