webhookdb 1.3.0 → 1.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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/admin-dist/assets/{index-6aebf805.js → index-9306dd28.js} +39 -39
  3. data/admin-dist/index.html +1 -1
  4. data/data/messages/templates/errors/generic_backfill.email.liquid +30 -0
  5. data/data/messages/templates/errors/icalendar_fetch.email.liquid +8 -2
  6. data/data/messages/templates/specs/with_fields.email.liquid +6 -0
  7. data/db/migrations/045_system_log.rb +15 -0
  8. data/db/migrations/046_indices.rb +14 -0
  9. data/lib/webhookdb/admin.rb +6 -0
  10. data/lib/webhookdb/admin_api/data_provider.rb +1 -0
  11. data/lib/webhookdb/admin_api/entities.rb +8 -0
  12. data/lib/webhookdb/aggregate_result.rb +1 -1
  13. data/lib/webhookdb/api/helpers.rb +17 -0
  14. data/lib/webhookdb/api/organizations.rb +6 -0
  15. data/lib/webhookdb/api/service_integrations.rb +1 -0
  16. data/lib/webhookdb/connection_cache.rb +29 -3
  17. data/lib/webhookdb/console.rb +1 -1
  18. data/lib/webhookdb/customer/reset_code.rb +1 -1
  19. data/lib/webhookdb/customer.rb +3 -2
  20. data/lib/webhookdb/db_adapter.rb +1 -1
  21. data/lib/webhookdb/dbutil.rb +2 -0
  22. data/lib/webhookdb/errors.rb +34 -0
  23. data/lib/webhookdb/http.rb +1 -1
  24. data/lib/webhookdb/jobs/deprecated_jobs.rb +1 -0
  25. data/lib/webhookdb/jobs/model_event_system_log_tracker.rb +105 -0
  26. data/lib/webhookdb/jobs/monitor_metrics.rb +29 -0
  27. data/lib/webhookdb/jobs/renew_watch_channel.rb +3 -0
  28. data/lib/webhookdb/message/transport.rb +1 -1
  29. data/lib/webhookdb/message.rb +53 -2
  30. data/lib/webhookdb/messages/error_generic_backfill.rb +45 -0
  31. data/lib/webhookdb/messages/error_icalendar_fetch.rb +3 -0
  32. data/lib/webhookdb/messages/specs.rb +16 -0
  33. data/lib/webhookdb/organization/alerting.rb +7 -3
  34. data/lib/webhookdb/organization/database_migration.rb +1 -1
  35. data/lib/webhookdb/organization/db_builder.rb +1 -1
  36. data/lib/webhookdb/organization.rb +14 -1
  37. data/lib/webhookdb/postgres/model.rb +1 -0
  38. data/lib/webhookdb/postgres.rb +2 -1
  39. data/lib/webhookdb/replicator/base.rb +66 -39
  40. data/lib/webhookdb/replicator/column.rb +2 -0
  41. data/lib/webhookdb/replicator/fake.rb +6 -0
  42. data/lib/webhookdb/replicator/front_signalwire_message_channel_app_v1.rb +28 -19
  43. data/lib/webhookdb/replicator/icalendar_calendar_v1.rb +55 -11
  44. data/lib/webhookdb/replicator/intercom_v1_mixin.rb +25 -4
  45. data/lib/webhookdb/replicator/signalwire_message_v1.rb +31 -0
  46. data/lib/webhookdb/replicator/transistor_episode_v1.rb +11 -5
  47. data/lib/webhookdb/replicator/webhook_request.rb +8 -0
  48. data/lib/webhookdb/replicator.rb +2 -2
  49. data/lib/webhookdb/service/view_api.rb +1 -1
  50. data/lib/webhookdb/service.rb +10 -10
  51. data/lib/webhookdb/service_integration.rb +14 -1
  52. data/lib/webhookdb/spec_helpers/shared_examples_for_replicators.rb +153 -64
  53. data/lib/webhookdb/sync_target.rb +7 -5
  54. data/lib/webhookdb/system_log_event.rb +9 -0
  55. data/lib/webhookdb/version.rb +1 -1
  56. data/lib/webhookdb/webhook_subscription.rb +1 -1
  57. data/lib/webhookdb.rb +31 -7
  58. metadata +32 -16
  59. data/lib/webhookdb/jobs/customer_created_notify_internal.rb +0 -22
  60. /data/lib/webhookdb/jobs/{logged_webhook_replay.rb → logged_webhooks_replay.rb} +0 -0
  61. /data/lib/webhookdb/jobs/{logged_webhook_resilient_replay.rb → logged_webhooks_resilient_replay.rb} +0 -0
  62. /data/lib/webhookdb/jobs/{webhook_subscription_delivery_attempt.rb → webhook_subscription_delivery_event.rb} +0 -0
  63. /data/lib/webhookdb/jobs/{webhook_resource_notify_integrations.rb → webhookdb_resource_notify_integrations.rb} +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webhookdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WebhookDB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.8'
111
+ - !ruby/object:Gem::Dependency
112
+ name: browser
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '6.0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '6.0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: clipboard
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -702,20 +716,14 @@ dependencies:
702
716
  requirements:
703
717
  - - "~>"
704
718
  - !ruby/object:Gem::Version
705
- version: '1.6'
706
- - - ">="
707
- - !ruby/object:Gem::Version
708
- version: 1.6.2
719
+ version: '1.8'
709
720
  type: :runtime
710
721
  prerelease: false
711
722
  version_requirements: !ruby/object:Gem::Requirement
712
723
  requirements:
713
724
  - - "~>"
714
725
  - !ruby/object:Gem::Version
715
- version: '1.6'
716
- - - ">="
717
- - !ruby/object:Gem::Version
718
- version: 1.6.2
726
+ version: '1.8'
719
727
  - !ruby/object:Gem::Dependency
720
728
  name: sidekiq-cron
721
729
  requirement: !ruby/object:Gem::Requirement
@@ -802,7 +810,7 @@ executables: []
802
810
  extensions: []
803
811
  extra_rdoc_files: []
804
812
  files:
805
- - admin-dist/assets/index-6aebf805.js
813
+ - admin-dist/assets/index-9306dd28.js
806
814
  - admin-dist/favicon.ico
807
815
  - admin-dist/index.html
808
816
  - admin-dist/manifest.json
@@ -817,6 +825,7 @@ files:
817
825
  - data/messages/partials/signoff.liquid
818
826
  - data/messages/replicators/url-recorder.liquid
819
827
  - data/messages/styles/v1.liquid
828
+ - data/messages/templates/errors/generic_backfill.email.liquid
820
829
  - data/messages/templates/errors/icalendar_fetch.email.liquid
821
830
  - data/messages/templates/errors/signalwire_send_sms.email.liquid
822
831
  - data/messages/templates/invite.email.liquid
@@ -828,6 +837,7 @@ files:
828
837
  - data/messages/templates/specs/basic.fake.liquid
829
838
  - data/messages/templates/specs/with_field.email.liquid
830
839
  - data/messages/templates/specs/with_field.fake.liquid
840
+ - data/messages/templates/specs/with_fields.email.liquid
831
841
  - data/messages/templates/specs/with_include.email.liquid
832
842
  - data/messages/templates/specs/with_partial.email.liquid
833
843
  - data/messages/templates/verification.email.liquid
@@ -888,6 +898,8 @@ files:
888
898
  - db/migrations/042_sint_lock.rb
889
899
  - db/migrations/043_text_search.rb
890
900
  - db/migrations/044_oauth_session_token_cache.rb
901
+ - db/migrations/045_system_log.rb
902
+ - db/migrations/046_indices.rb
891
903
  - integration/async_spec.rb
892
904
  - integration/auth_spec.rb
893
905
  - integration/database_spec.rb
@@ -957,6 +969,7 @@ files:
957
969
  - lib/webhookdb/email_octopus.rb
958
970
  - lib/webhookdb/enumerable.rb
959
971
  - lib/webhookdb/envfixer.rb
972
+ - lib/webhookdb/errors.rb
960
973
  - lib/webhookdb/fixtures.rb
961
974
  - lib/webhookdb/fixtures/backfill_jobs.rb
962
975
  - lib/webhookdb/fixtures/customers.rb
@@ -994,7 +1007,6 @@ files:
994
1007
  - lib/webhookdb/jobs/backfill.rb
995
1008
  - lib/webhookdb/jobs/create_mirror_table.rb
996
1009
  - lib/webhookdb/jobs/create_stripe_customer.rb
997
- - lib/webhookdb/jobs/customer_created_notify_internal.rb
998
1010
  - lib/webhookdb/jobs/demo_mode_sync_data.rb
999
1011
  - lib/webhookdb/jobs/deprecated_jobs.rb
1000
1012
  - lib/webhookdb/jobs/developer_alert_handle.rb
@@ -1004,9 +1016,11 @@ files:
1004
1016
  - lib/webhookdb/jobs/icalendar_enqueue_syncs.rb
1005
1017
  - lib/webhookdb/jobs/icalendar_sync.rb
1006
1018
  - lib/webhookdb/jobs/increase_event_handler.rb
1007
- - lib/webhookdb/jobs/logged_webhook_replay.rb
1008
- - lib/webhookdb/jobs/logged_webhook_resilient_replay.rb
1019
+ - lib/webhookdb/jobs/logged_webhooks_replay.rb
1020
+ - lib/webhookdb/jobs/logged_webhooks_resilient_replay.rb
1009
1021
  - lib/webhookdb/jobs/message_dispatched.rb
1022
+ - lib/webhookdb/jobs/model_event_system_log_tracker.rb
1023
+ - lib/webhookdb/jobs/monitor_metrics.rb
1010
1024
  - lib/webhookdb/jobs/organization_database_migration_notify_finished.rb
1011
1025
  - lib/webhookdb/jobs/organization_database_migration_notify_started.rb
1012
1026
  - lib/webhookdb/jobs/organization_database_migration_run.rb
@@ -1022,8 +1036,8 @@ files:
1022
1036
  - lib/webhookdb/jobs/sync_target_enqueue_scheduled.rb
1023
1037
  - lib/webhookdb/jobs/sync_target_run_sync.rb
1024
1038
  - lib/webhookdb/jobs/trim_logged_webhooks.rb
1025
- - lib/webhookdb/jobs/webhook_resource_notify_integrations.rb
1026
- - lib/webhookdb/jobs/webhook_subscription_delivery_attempt.rb
1039
+ - lib/webhookdb/jobs/webhook_subscription_delivery_event.rb
1040
+ - lib/webhookdb/jobs/webhookdb_resource_notify_integrations.rb
1027
1041
  - lib/webhookdb/json.rb
1028
1042
  - lib/webhookdb/liquid/expose.rb
1029
1043
  - lib/webhookdb/liquid/filters.rb
@@ -1039,6 +1053,7 @@ files:
1039
1053
  - lib/webhookdb/message/liquid_drops.rb
1040
1054
  - lib/webhookdb/message/template.rb
1041
1055
  - lib/webhookdb/message/transport.rb
1056
+ - lib/webhookdb/messages/error_generic_backfill.rb
1042
1057
  - lib/webhookdb/messages/error_icalendar_fetch.rb
1043
1058
  - lib/webhookdb/messages/error_signalwire_send_sms.rb
1044
1059
  - lib/webhookdb/messages/invite.rb
@@ -1186,6 +1201,7 @@ files:
1186
1201
  - lib/webhookdb/stripe.rb
1187
1202
  - lib/webhookdb/subscription.rb
1188
1203
  - lib/webhookdb/sync_target.rb
1204
+ - lib/webhookdb/system_log_event.rb
1189
1205
  - lib/webhookdb/tasks.rb
1190
1206
  - lib/webhookdb/tasks/admin.rb
1191
1207
  - lib/webhookdb/tasks/annotate.rb
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "webhookdb/async/job"
4
-
5
- class Webhookdb::Jobs::CustomerCreatedNotifyInternal
6
- extend Webhookdb::Async::Job
7
-
8
- on "webhookdb.customer.created"
9
-
10
- def _perform(event)
11
- customer = self.lookup_model(Webhookdb::Customer, event)
12
- Webhookdb::DeveloperAlert.new(
13
- subsystem: "Customer Created",
14
- emoji: ":hook:",
15
- fallback: "New customer created: #{customer.inspect}",
16
- fields: [
17
- {title: "Id", value: customer.id, short: true},
18
- {title: "Email", value: customer.email, short: true},
19
- ],
20
- ).emit
21
- end
22
- end