bullet_train-outgoing_webhooks 1.6.26 → 1.6.28
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/app/models/concerns/webhooks/outgoing/delivery_attempt_support.rb +2 -1
- data/app/models/concerns/webhooks/outgoing/delivery_support.rb +1 -1
- data/app/models/webhooks/outgoing/event_type.rb +1 -1
- data/config/locales/en/webhooks/outgoing/deliveries.en.yml +15 -1
- data/config/locales/en/webhooks/outgoing/delivery_attempts.en.yml +19 -1
- data/config/locales/en/webhooks/outgoing/endpoints.en.yml +18 -0
- data/config/locales/en/webhooks/outgoing/events.en.yml +22 -0
- data/lib/bullet_train/outgoing_webhooks/version.rb +1 -1
- metadata +3 -4
- data/config/models/webhooks/outgoing/event_types.yml +0 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b12c28efea2d4d45f1c34129273e33e0d47ef0d7918369bc3b2475b6148d0bd2
|
|
4
|
+
data.tar.gz: 88d167a7ec480f623377450c0978ebaa078bb4d5b56f3283d34536024ef6bc86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 61acde4f571a3c259b71616b0ef4441cf35434e51a75ea03a5f43eb8671be55cfc28e55d9b2f3e967a6372600c634b6875fbb52a109eb78aafe13214c5c12684
|
|
7
|
+
data.tar.gz: 9d94011dbab452ca0d74a6793d6190eea2dbafd3931126551f80b0251db6fa74447c7c2fc1001991755e99265f9b93852957326d86fb2630cfe8a64d12511e11
|
|
@@ -9,7 +9,7 @@ module Webhooks::Outgoing::DeliveryAttemptSupport
|
|
|
9
9
|
has_one :team, through: :delivery unless BulletTrain::OutgoingWebhooks.parent_class_specified?
|
|
10
10
|
scope :successful, -> { where(response_code: SUCCESS_RESPONSE_CODES) }
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
after_initialize do
|
|
13
13
|
self.attempt_number = delivery.attempt_count + 1
|
|
14
14
|
end
|
|
15
15
|
|
|
@@ -35,6 +35,7 @@ module Webhooks::Outgoing::DeliveryAttemptSupport
|
|
|
35
35
|
unless allowed_uri?(uri)
|
|
36
36
|
self.response_code = 0
|
|
37
37
|
self.error_message = "URI is not allowed: " + uri
|
|
38
|
+
save
|
|
38
39
|
return false
|
|
39
40
|
end
|
|
40
41
|
end
|
|
@@ -34,7 +34,7 @@ module Webhooks::Outgoing::DeliverySupport
|
|
|
34
34
|
def deliver
|
|
35
35
|
# TODO If we ever do away with the `async: true` default for webhook generation, then I believe this needs to
|
|
36
36
|
# change otherwise we'd be attempting the first delivery of webhooks inline.
|
|
37
|
-
if delivery_attempts.
|
|
37
|
+
if delivery_attempts.new.attempt
|
|
38
38
|
touch(:delivered_at)
|
|
39
39
|
else
|
|
40
40
|
deliver_async
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
class Webhooks::Outgoing::EventType < ApplicationHash
|
|
2
|
-
self.data = YAML.load_file("config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
|
|
2
|
+
self.data = YAML.load_file("#{Rails.root}/config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
|
|
3
3
|
events.map { |event| (event == "crud") ? ["created", "updated", "deleted"] : event }.flatten.map { |event| {id: "#{topic}.#{event}"} }
|
|
4
4
|
end.flatten
|
|
5
5
|
|
|
@@ -24,11 +24,15 @@ en:
|
|
|
24
24
|
_: &id Delivery ID
|
|
25
25
|
label: *id
|
|
26
26
|
heading: *id
|
|
27
|
+
api_title: *id
|
|
28
|
+
api_description: *id
|
|
27
29
|
|
|
28
30
|
event_id: &event
|
|
29
31
|
_: &event_id Event
|
|
30
32
|
label: *event_id
|
|
31
33
|
heading: *event_id
|
|
34
|
+
api_title: *event_id
|
|
35
|
+
api_description: *event_id
|
|
32
36
|
placeholder: Select a Event
|
|
33
37
|
event: *event
|
|
34
38
|
|
|
@@ -36,24 +40,34 @@ en:
|
|
|
36
40
|
_: &endpoint_url Endpoint URL
|
|
37
41
|
label: *endpoint_url
|
|
38
42
|
heading: *endpoint_url
|
|
43
|
+
api_title: *endpoint_url
|
|
44
|
+
api_description: *endpoint_url
|
|
39
45
|
|
|
40
46
|
delivered_at:
|
|
41
47
|
_: &delivered_at Delivered At
|
|
42
48
|
label: *delivered_at
|
|
43
49
|
heading: *delivered_at
|
|
50
|
+
api_title: *delivered_at
|
|
51
|
+
api_description: *delivered_at
|
|
44
52
|
|
|
45
53
|
status:
|
|
46
|
-
heading: Status
|
|
54
|
+
heading: &status Status
|
|
55
|
+
api_title: *status
|
|
56
|
+
api_description: *status
|
|
47
57
|
|
|
48
58
|
# 🚅 super scaffolding will insert new fields above this line.
|
|
49
59
|
created_at:
|
|
50
60
|
_: &created_at Issued At
|
|
51
61
|
label: *created_at
|
|
52
62
|
heading: *created_at
|
|
63
|
+
api_title: *created_at
|
|
64
|
+
api_description: *created_at
|
|
53
65
|
updated_at:
|
|
54
66
|
_: &updated_at Updated
|
|
55
67
|
label: *updated_at
|
|
56
68
|
heading: *updated_at
|
|
69
|
+
api_title: *updated_at
|
|
70
|
+
api_description: *updated_at
|
|
57
71
|
api:
|
|
58
72
|
endpoint_id: Absolutely Abstract Endpoint ID
|
|
59
73
|
collection_actions: "Collection Actions for Deliveries"
|
|
@@ -24,44 +24,62 @@ en:
|
|
|
24
24
|
_: &id Delivery Attempt ID
|
|
25
25
|
label: *id
|
|
26
26
|
heading: *id
|
|
27
|
+
api_title: *id
|
|
28
|
+
api_description: *id
|
|
27
29
|
|
|
28
30
|
response_code:
|
|
29
31
|
_: &response_code Response Code
|
|
30
32
|
label: *response_code
|
|
31
33
|
heading: *response_code
|
|
34
|
+
api_title: *response_code
|
|
35
|
+
api_description: *response_code
|
|
32
36
|
|
|
33
37
|
response_body:
|
|
34
38
|
_: &response_body Response Body
|
|
35
39
|
label: *response_body
|
|
36
40
|
heading: *response_body
|
|
41
|
+
api_title: *response_body
|
|
42
|
+
api_description: *response_body
|
|
37
43
|
|
|
38
44
|
response_message:
|
|
39
45
|
_: &response_message Response Message
|
|
40
46
|
label: *response_message
|
|
41
47
|
heading: *response_message
|
|
48
|
+
api_title: *response_message
|
|
49
|
+
api_description: *response_message
|
|
42
50
|
|
|
43
51
|
error_message:
|
|
44
52
|
_: &error_message Error Message
|
|
45
53
|
label: *error_message
|
|
46
54
|
heading: *error_message
|
|
55
|
+
api_title: *error_message
|
|
56
|
+
api_description: *error_message
|
|
47
57
|
|
|
48
58
|
attempt_number:
|
|
49
59
|
_: &attempt_number Attempt Number
|
|
50
60
|
label: *attempt_number
|
|
51
61
|
heading: *attempt_number
|
|
62
|
+
api_title: *attempt_number
|
|
63
|
+
api_description: *attempt_number
|
|
52
64
|
|
|
53
65
|
status:
|
|
54
|
-
heading: Status
|
|
66
|
+
heading: &status Status
|
|
67
|
+
api_title: *status
|
|
68
|
+
api_description: *status
|
|
55
69
|
|
|
56
70
|
# 🚅 super scaffolding will insert new fields above this line.
|
|
57
71
|
created_at:
|
|
58
72
|
_: &created_at Attempted At
|
|
59
73
|
label: *created_at
|
|
60
74
|
heading: *created_at
|
|
75
|
+
api_title: *created_at
|
|
76
|
+
api_description: *created_at
|
|
61
77
|
updated_at:
|
|
62
78
|
_: &updated_at Updated
|
|
63
79
|
label: *updated_at
|
|
64
80
|
heading: *updated_at
|
|
81
|
+
api_title: *updated_at
|
|
82
|
+
api_description: *updated_at
|
|
65
83
|
api:
|
|
66
84
|
delivery_id: Absolutely Abstract Delivery ID
|
|
67
85
|
collection_actions: "Collection Actions for Delivery Attempts"
|
|
@@ -23,26 +23,36 @@ en:
|
|
|
23
23
|
_: &id Endpoint ID
|
|
24
24
|
label: *id
|
|
25
25
|
heading: *id
|
|
26
|
+
api_title: *id
|
|
27
|
+
api_description: *id
|
|
26
28
|
|
|
27
29
|
team_id:
|
|
28
30
|
_: &team_id Team ID
|
|
29
31
|
label: *team_id
|
|
30
32
|
heading: *team_id
|
|
33
|
+
api_title: *team_id
|
|
34
|
+
api_description: *team_id
|
|
31
35
|
|
|
32
36
|
name:
|
|
33
37
|
_: &name Name
|
|
34
38
|
label: *name
|
|
35
39
|
heading: *name
|
|
40
|
+
api_title: *name
|
|
41
|
+
api_description: *name
|
|
36
42
|
|
|
37
43
|
url:
|
|
38
44
|
_: &url URL
|
|
39
45
|
label: *url
|
|
40
46
|
heading: *url
|
|
47
|
+
api_title: *url
|
|
48
|
+
api_description: *url
|
|
41
49
|
|
|
42
50
|
api_version:
|
|
43
51
|
_: &api_version API Version
|
|
44
52
|
label: *api_version
|
|
45
53
|
heading: *api_version
|
|
54
|
+
api_title: *api_version
|
|
55
|
+
api_description: *api_version
|
|
46
56
|
options:
|
|
47
57
|
1: V1
|
|
48
58
|
|
|
@@ -50,6 +60,8 @@ en:
|
|
|
50
60
|
_: &event_type_ids Event Types
|
|
51
61
|
label: *event_type_ids
|
|
52
62
|
heading: *event_type_ids
|
|
63
|
+
api_title: *event_type_ids
|
|
64
|
+
api_description: *event_type_ids
|
|
53
65
|
all: All Events
|
|
54
66
|
event_types: *event_types
|
|
55
67
|
|
|
@@ -57,6 +69,8 @@ en:
|
|
|
57
69
|
_: &scaffolding_absolutely_abstract_creative_concept_id Within Creative Concept
|
|
58
70
|
label: *scaffolding_absolutely_abstract_creative_concept_id
|
|
59
71
|
heading: *scaffolding_absolutely_abstract_creative_concept_id
|
|
72
|
+
api_title: *scaffolding_absolutely_abstract_creative_concept_id
|
|
73
|
+
api_description: *scaffolding_absolutely_abstract_creative_concept_id
|
|
60
74
|
|
|
61
75
|
scaffolding_absolutely_abstract_creative_concept: *scaffolding_absolutely_abstract_creative_concept
|
|
62
76
|
|
|
@@ -65,10 +79,14 @@ en:
|
|
|
65
79
|
_: &created_at Added
|
|
66
80
|
label: *created_at
|
|
67
81
|
heading: *created_at
|
|
82
|
+
api_title: *created_at
|
|
83
|
+
api_description: *created_at
|
|
68
84
|
updated_at:
|
|
69
85
|
_: &updated_at Updated
|
|
70
86
|
label: *updated_at
|
|
71
87
|
heading: *updated_at
|
|
88
|
+
api_title: *updated_at
|
|
89
|
+
api_description: *updated_at
|
|
72
90
|
api:
|
|
73
91
|
team_id: Absolutely Abstract Team ID
|
|
74
92
|
collection_actions: "Collection Actions for Endpoints"
|
|
@@ -6,16 +6,22 @@ en:
|
|
|
6
6
|
_: &id Event ID
|
|
7
7
|
label: *id
|
|
8
8
|
heading: *id
|
|
9
|
+
api_title: *id
|
|
10
|
+
api_description: *id
|
|
9
11
|
|
|
10
12
|
team_id:
|
|
11
13
|
_: &team_id Team ID
|
|
12
14
|
label: *team_id
|
|
13
15
|
heading: *team_id
|
|
16
|
+
api_title: *team_id
|
|
17
|
+
api_description: *team_id
|
|
14
18
|
|
|
15
19
|
event_type_id: &event_type_id
|
|
16
20
|
_: &event_type Event Type
|
|
17
21
|
label: *event_type
|
|
18
22
|
heading: *event_type
|
|
23
|
+
api_title: *event_type
|
|
24
|
+
api_description: *event_type
|
|
19
25
|
|
|
20
26
|
event_type: *event_type_id
|
|
21
27
|
|
|
@@ -23,38 +29,54 @@ en:
|
|
|
23
29
|
_: &subject_id Subject ID
|
|
24
30
|
label: *subject_id
|
|
25
31
|
heading: *subject_id
|
|
32
|
+
api_title: *subject_id
|
|
33
|
+
api_description: *subject_id
|
|
26
34
|
|
|
27
35
|
subject_type:
|
|
28
36
|
_: &subject_type Subject Type
|
|
29
37
|
label: *subject_type
|
|
30
38
|
heading: *subject_type
|
|
39
|
+
api_title: *subject_type
|
|
40
|
+
api_description: *subject_type
|
|
31
41
|
|
|
32
42
|
payload:
|
|
33
43
|
_: &payload Payload
|
|
34
44
|
label: *payload
|
|
35
45
|
heading: *payload
|
|
46
|
+
api_title: *payload
|
|
47
|
+
api_description: *payload
|
|
36
48
|
|
|
37
49
|
uuid:
|
|
38
50
|
_: &uuid UUID
|
|
39
51
|
label: *uuid
|
|
40
52
|
heading: *uuid
|
|
53
|
+
api_title: *uuid
|
|
54
|
+
api_description: *uuid
|
|
41
55
|
|
|
42
56
|
short_uuid:
|
|
43
57
|
_: &short_uuid Short UUID
|
|
44
58
|
label: *short_uuid
|
|
45
59
|
heading: *short_uuid
|
|
60
|
+
api_title: *short_uuid
|
|
61
|
+
api_description: *short_uuid
|
|
46
62
|
|
|
47
63
|
event_type_name:
|
|
48
64
|
_: &event_type_name Event Type Name
|
|
49
65
|
label: *event_type_name
|
|
50
66
|
heading: *event_type_name
|
|
67
|
+
api_title: *event_type_name
|
|
68
|
+
api_description: *event_type_name
|
|
51
69
|
|
|
52
70
|
data:
|
|
53
71
|
_: &data Object Data
|
|
54
72
|
label: *data
|
|
55
73
|
heading: *data
|
|
74
|
+
api_title: *data
|
|
75
|
+
api_description: *data
|
|
56
76
|
|
|
57
77
|
created_at:
|
|
58
78
|
_: &created_at Happened At
|
|
59
79
|
label: *created_at
|
|
60
80
|
heading: *created_at
|
|
81
|
+
api_title: *created_at
|
|
82
|
+
api_description: *created_at
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bullet_train-outgoing_webhooks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.28
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Culver
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-01-
|
|
11
|
+
date: 2024-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: standard
|
|
@@ -138,7 +138,6 @@ files:
|
|
|
138
138
|
- config/locales/en/webhooks/outgoing/delivery_attempts.en.yml
|
|
139
139
|
- config/locales/en/webhooks/outgoing/endpoints.en.yml
|
|
140
140
|
- config/locales/en/webhooks/outgoing/events.en.yml
|
|
141
|
-
- config/models/webhooks/outgoing/event_types.yml
|
|
142
141
|
- config/routes.rb
|
|
143
142
|
- db/migrate/20180420013127_create_webhooks_outgoing_endpoints.rb
|
|
144
143
|
- db/migrate/20180420013505_create_webhooks_outgoing_endpoint_event_types.rb
|
|
@@ -191,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
191
190
|
- !ruby/object:Gem::Version
|
|
192
191
|
version: '0'
|
|
193
192
|
requirements: []
|
|
194
|
-
rubygems_version: 3.
|
|
193
|
+
rubygems_version: 3.5.3
|
|
195
194
|
signing_key:
|
|
196
195
|
specification_version: 4
|
|
197
196
|
summary: Allow users of your Rails application to subscribe and receive webhooks when
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# This is a default implementation of this file that we supply to help with gem tests.
|
|
2
|
-
# The version from the starter repo will take precedence when running the full app.
|
|
3
|
-
# You can think of the file in the starter repo as having been ejected from this gem.
|
|
4
|
-
|
|
5
|
-
# This file is here just to allow tests to pass when run from inside this gem directory.
|
|
6
|
-
# It wasn't found if I put the file in test/dummy/config/models/webhooks/outgoing, so
|
|
7
|
-
# maybe we need a better resolution method?
|
|
8
|
-
scaffolding/absolutely_abstract/creative_concept:
|
|
9
|
-
# This automatically generates `created`, `updated`, and `deleted` webhook events.
|
|
10
|
-
- crud
|
|
11
|
-
scaffolding/completely_concrete/tangible_thing:
|
|
12
|
-
- crud
|
|
13
|
-
invitation:
|
|
14
|
-
- crud
|
|
15
|
-
membership:
|
|
16
|
-
- crud
|