neon_schemas 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ac5baa21377086c56370caf5d1ef34e543fb1ac29c56446aa89ea7d30cc6299
4
- data.tar.gz: '096c7af309d1e56cde6ecb88c9282f12943e222d36c0a30834c9fdcb4b7c4b8f'
3
+ metadata.gz: 256ab185a37500f1421db349c6592519b70f632ef546e9bc14f2743ed98240ba
4
+ data.tar.gz: 7521061a30c9d0209a300176c05ac2c3979755cd29e629a4fbae159de9edc36d
5
5
  SHA512:
6
- metadata.gz: ad977b9ed711e5e87afea9dbe8ce9b361d53494f2a005378eb8034824564c7515f1089adffa63e8bde93e01474216aefb9e458d899990bc515c60507e9f2f400
7
- data.tar.gz: d720d9c71af4aa32b8bc2c41df6d8220969908aa5aeff9292c5a193bae1ed7dcbdc1432a6b14070239c5943e0973cfaf25d1e5208ff3585f0914ee3b43288877
6
+ metadata.gz: 643cf45777e56a9fce7e850083bdef6d361c109b046a75d5f39f1ee7f26077aeaca4df196e07e9013ec71f5a7d7e1b3c49b1a74211412866750e131b34304ff9
7
+ data.tar.gz: eabcd65d93a71e80e8f19dc040d466b7b81998b4dd9c9406b522e647491c975a7b47f0ce077aa3729ec9d5549f9a35c8baabda6901412afdb19815c5386b31b6
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ .pytest_cache
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neon_schemas (0.1.1)
4
+ neon_schemas (0.1.2)
5
5
  avro (~> 1.10)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -38,3 +38,8 @@ gcloud pubsub subscriptions create outbound_email \
38
38
  --dead-letter-topic=outbound_email_dlq \
39
39
  --max-delivery-attempts=10
40
40
  ```
41
+
42
+ ## Schemas
43
+
44
+ * Outbound Emails
45
+ * Welcome Email
data/lib/neon_schemas.rb CHANGED
@@ -5,7 +5,7 @@ module NeonSchemas
5
5
  class Error < StandardError; end
6
6
 
7
7
  class Avro
8
- SCHEMA_DIRECTORY = "#{__dir__}/../src"
8
+ SCHEMA_DIRECTORY = "#{__dir__}/../schemas"
9
9
 
10
10
  def self.encode(record:, schema_name:)
11
11
  avro_schema = ::Avro::Schema.parse(
@@ -1,3 +1,3 @@
1
1
  module NeonSchemas
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.3"
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neonlaw/schemas",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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.0"
3
+ version = "0.1.2"
4
4
  description = "Schemas for Neon Law"
5
5
  authors = ["neon law <support@neonlaw.com>"]
6
6
  license = "Apache-2.0"
@@ -0,0 +1,17 @@
1
+ {
2
+ "namespace": "com.neon_law.authentication",
3
+ "name": "successful_login",
4
+ "type": "record",
5
+ "fields": [
6
+ {
7
+ "name": "email",
8
+ "type": "string",
9
+ "doc": "The email of the logged in user."
10
+ },
11
+ {
12
+ "type" : "string",
13
+ "name" : "sub",
14
+ "doc": "The 'sub' from Auth0 of the logged in user."
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "namespace": "com.neon_law.documents",
3
+ "name": "process_unprocessed_document",
4
+ "type": "record",
5
+ "fields": [
6
+ {
7
+ "name": "id",
8
+ "type": "string",
9
+ "doc": "The id of the unprocessed document."
10
+ },
11
+ {
12
+ "name" : "gcp_url",
13
+ "type": "string",
14
+ "doc": "The gcp url of the uploaded document."
15
+ },
16
+ {
17
+ "name" : "person_id",
18
+ "type": "string",
19
+ "doc": "The id of the person who uploaded the document."
20
+ },
21
+ {
22
+ "name" : "documentable_type",
23
+ "type": "string",
24
+ "doc": "The type of document like a matter_document or response_document"
25
+ },
26
+ {
27
+ "name" : "documentable_id",
28
+ "type": "string",
29
+ "doc": "The id of the row associated with the polymorphic association"
30
+ },
31
+ {
32
+ "name" : "document_template_id",
33
+ "type": "string",
34
+ "doc": "The id of the document_template that should be applied to the document"
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "namespace": "com.neon_law.outbound_email",
3
+ "name": "welcome_email",
4
+ "type": "record",
5
+ "fields": [
6
+ {
7
+ "name": "email",
8
+ "type": "string",
9
+ "doc": "The 'to' email to send the email to."
10
+ },
11
+ {
12
+ "type" : "string",
13
+ "name" : "sub",
14
+ "doc": "The 'sub' from Auth0."
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "namespace": "com.neon_law.slack",
3
+ "name": "send_message",
4
+ "type": "record",
5
+ "fields": [
6
+ {
7
+ "name": "body",
8
+ "type": "string",
9
+ "doc": "The body of the message, formatted with Slack text."
10
+ },
11
+ {
12
+ "name" : "channel",
13
+ "type": "string",
14
+ "doc": "The channel to send the message to."
15
+ }
16
+ ]
17
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neon_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neon Law
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-23 00:00:00.000000000 Z
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro
@@ -46,7 +46,10 @@ files:
46
46
  - package.json
47
47
  - poetry.lock
48
48
  - pyproject.toml
49
- - src/outbound_email.avsc
49
+ - schemas/authentication/successful_login.avsc
50
+ - schemas/documents/process_document.avsc
51
+ - schemas/outbound_emails/welcome_email.avsc
52
+ - schemas/slack/send_message.avsc
50
53
  homepage: https://github.com/neonlaw/codebase
51
54
  licenses: []
52
55
  metadata:
@@ -1,51 +0,0 @@
1
- {
2
- "namespace": "com.neon_law.email",
3
- "name": "outbound_email",
4
- "type": "record",
5
- "fields": [
6
- {
7
- "name": "email",
8
- "type": "string",
9
- "doc": "The 'to' email to send the email to."
10
- },
11
- {
12
- "name": "email_type",
13
- "type": [
14
- {
15
- "type" : "record",
16
- "name" : "new_registration",
17
- "namespace" : "com.neon_law.email",
18
- "fields" : [
19
- {
20
- "type" : "string",
21
- "name" : "sub"
22
- },
23
- {
24
- "type" : "string",
25
- "name" : "template",
26
- "pattern": "^new_registration$"
27
- }
28
- ],
29
- "doc:" : "Subscribers to this message can send a welcome email."
30
- },
31
- {
32
- "type" : "record",
33
- "name" : "new_document",
34
- "namespace" : "com.neon_law.email",
35
- "fields" : [
36
- {
37
- "type" : "string",
38
- "name" : "sub"
39
- },
40
- {
41
- "type" : "string",
42
- "name" : "template",
43
- "pattern": "^new_registration$"
44
- }
45
- ],
46
- "doc:" : "Subscribers to this message can send a welcome email."
47
- }
48
- ]
49
- }
50
- ]
51
- }