neon_schemas 0.1.11 → 0.1.12

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: b76db960ae8315cf701cb9d6ea74c6b42399adef84d92c9b77496117554d1d04
4
- data.tar.gz: 5edd091b3c0f6dff6845041165c1eaba44b9b0f6fc90af350624d001738e26bd
3
+ metadata.gz: 12a8c6f859446c072d0f76e57cf4b3f615dff8c0d0c7215ce82a6efcea6a6e01
4
+ data.tar.gz: b7d48b608abf70d0d1e2bf3837daa7350961030d0a3c2ae58aa25a0930352f48
5
5
  SHA512:
6
- metadata.gz: 209761118aeb7008d81a7125b52c0246117c4cad693042c080ba873a7f0ca51e032b3065971f0063d265e61c3a60930166bcb8d62869d06f13daa9737aaca26c
7
- data.tar.gz: b2998be14518efae412bf6e7c55de5f43e035ac755d79c284b3a66a8ebdcbbdbe5781403a8d403a193d460ec1da880038af2e15efa1d6e0a67344a89699021fa
6
+ metadata.gz: 79afc50fb670a66ee987cab43c0fba02e16f43092a68cc77f8b0eaaec32a11b50ba1ab3e0080aa469a53e1711780ab710f814f29151459973545108ad1e313c5
7
+ data.tar.gz: acf8be65c9afe0e5a37409216dbf2bf84c73f258e93dd5a2d98a283e75c9cd75e7d40423ecb37a1890413cb0f35b1ec86e8e8b9b0445b42641ddab259151cedb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neon_schemas (0.1.11)
4
+ neon_schemas (0.1.12)
5
5
  avro (~> 1.10)
6
6
  dry-validation (= 1.6)
7
7
  neon_operations (= 0.0.6)
@@ -0,0 +1,26 @@
1
+ require "dry-validation"
2
+
3
+ module NeonSchemas::Contracts::OutboundEmails
4
+ class SendgridMailContract < Dry::Validation::Contract
5
+ json do
6
+ required(:from).filled(:string)
7
+ required(:to).filled(:string)
8
+ required(:subject).filled(:string)
9
+ required(:content).filled(:string)
10
+ end
11
+
12
+ rule(:from) do
13
+ if value != "support@neonlaw.com"
14
+ key.failure("emails must come from support@neonlaw.com")
15
+ end
16
+ end
17
+
18
+ rule(:to) do
19
+ email_regex = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/i
20
+
21
+ if email_regex.match?(value) == false
22
+ key.failure("has invalid format")
23
+ end
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module NeonSchemas
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neonlaw/schemas",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "license": "Apache-2.0",
5
5
  "author": "@neonlaw",
6
6
  "scripts": {
data/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "neon_schemas"
3
- version = "0.1.11"
3
+ version = "0.1.12"
4
4
  description = "Schemas for Neon Law"
5
5
  authors = ["neon law <support@neonlaw.com>"]
6
6
  license = "Apache-2.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neon_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neon Law
@@ -184,6 +184,7 @@ files:
184
184
  - lib/neon_schemas/avro.rb
185
185
  - lib/neon_schemas/contracts/authentication/successful_login_contract.rb
186
186
  - lib/neon_schemas/contracts/documents/process_document_contract.rb
187
+ - lib/neon_schemas/contracts/outbound_emails/sendgrid_mail_contract.rb
187
188
  - lib/neon_schemas/contracts/outbound_emails/welcome_email_contract.rb
188
189
  - lib/neon_schemas/contracts/slack/send_message_contract.rb
189
190
  - lib/neon_schemas/version.rb