Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion config/schema/artifacts/data_warehouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ tables:
voltage INT,
manufacturer_id STRING
)
inspection_notes:
table_schema: |-
CREATE TABLE IF NOT EXISTS inspection_notes (
id STRING,
widget_inspection_guid STRING,
note STRING,
created_at TIMESTAMP
)
inspection_summaries:
table_schema: |-
CREATE TABLE IF NOT EXISTS inspection_summaries (
id STRING,
widget_inspection_guid STRING,
summary STRING,
created_at TIMESTAMP
)
manufacturers:
table_schema: |-
CREATE TABLE IF NOT EXISTS manufacturers (
Expand Down Expand Up @@ -161,5 +177,6 @@ tables:
amounts ARRAY<INT>,
fees ARRAY<STRUCT<currency STRING, amount_cents INT>>,
metadata STRING,
workspace_name STRING
workspace_name STRING,
inspection STRUCT<guid STRING>
)
64 changes: 64 additions & 0 deletions config/schema/artifacts/datastore_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,10 @@ index_templates:
type: keyword
workspace_name:
type: keyword
inspection:
properties:
guid:
type: keyword
__counts:
properties:
release_timestamps:
Expand Down Expand Up @@ -1670,6 +1674,66 @@ indices:
index.number_of_replicas: 1
index.number_of_shards: 1
index.max_result_window: 10000
inspection_notes:
aliases: {}
mappings:
dynamic: strict
properties:
id:
type: keyword
widget_inspection_guid:
type: keyword
note:
type: keyword
created_at:
type: date
format: strict_date_time
__sources:
type: keyword
__versions:
type: object
dynamic: 'false'
__typename:
type: constant_keyword
value: InspectionNote
_size:
enabled: true
settings:
index.mapping.ignore_malformed: false
index.mapping.coerce: false
index.number_of_replicas: 1
index.number_of_shards: 1
index.max_result_window: 10000
inspection_summaries:
aliases: {}
mappings:
dynamic: strict
properties:
id:
type: keyword
widget_inspection_guid:
type: keyword
summary:
type: keyword
created_at:
type: date
format: strict_date_time
__sources:
type: keyword
__versions:
type: object
dynamic: 'false'
__typename:
type: constant_keyword
value: InspectionSummary
_size:
enabled: true
settings:
index.mapping.ignore_malformed: false
index.mapping.coerce: false
index.number_of_replicas: 1
index.number_of_shards: 1
index.max_result_window: 10000
manufacturers:
aliases: {}
mappings:
Expand Down
76 changes: 76 additions & 0 deletions config/schema/artifacts/json_schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ json_schema_version: 1
- Component
- DirectWholesaler
- ElectricalPart
- InspectionNote
- InspectionSummary
- Manufacturer
- MechanicalPart
- OnlineStore
Expand Down Expand Up @@ -372,6 +374,62 @@ json_schema_version: 1
- coordinates
ID:
type: string
InspectionNote:
type: object
properties:
id:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
widget_inspection_guid:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
note:
anyOf:
- allOf:
- "$ref": "#/$defs/String"
- maxLength: 8191
- type: 'null'
created_at:
"$ref": "#/$defs/DateTime"
__typename:
type: string
const: InspectionNote
default: InspectionNote
required:
- id
- widget_inspection_guid
- note
- created_at
InspectionSummary:
type: object
properties:
id:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
widget_inspection_guid:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
summary:
anyOf:
- allOf:
- "$ref": "#/$defs/String"
- maxLength: 8191
- type: 'null'
created_at:
"$ref": "#/$defs/DateTime"
__typename:
type: string
const: InspectionSummary
default: InspectionSummary
required:
- id
- widget_inspection_guid
- summary
- created_at
Int:
type: integer
minimum: -2147483648
Expand Down Expand Up @@ -1068,6 +1126,10 @@ json_schema_version: 1
- "$ref": "#/$defs/Untyped"
- maxLength: 8191
- type: 'null'
inspection:
anyOf:
- "$ref": "#/$defs/WidgetInspection"
- type: 'null'
__typename:
type: string
const: Widget
Expand Down Expand Up @@ -1105,8 +1167,22 @@ json_schema_version: 1
- amounts
- fees
- metadata
- inspection
description: For more performant queries on this type, please filter on `workspace_id`
if possible.
WidgetInspection:
type: object
properties:
guid:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
__typename:
type: string
const: WidgetInspection
default: WidgetInspection
required:
- guid
WidgetInternalDetails:
type: object
properties:
Expand Down
106 changes: 106 additions & 0 deletions config/schema/artifacts/json_schemas_by_version/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ json_schema_version: 1
- Component
- DirectWholesaler
- ElectricalPart
- InspectionNote
- InspectionSummary
- Manufacturer
- MechanicalPart
- OnlineStore
Expand Down Expand Up @@ -471,6 +473,86 @@ json_schema_version: 1
- coordinates
ID:
type: string
InspectionNote:
type: object
properties:
id:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
ElasticGraph:
type: ID!
nameInIndex: id
widget_inspection_guid:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
ElasticGraph:
type: ID!
nameInIndex: widget_inspection_guid
note:
anyOf:
- allOf:
- "$ref": "#/$defs/String"
- maxLength: 8191
- type: 'null'
ElasticGraph:
type: String
nameInIndex: note
created_at:
"$ref": "#/$defs/DateTime"
ElasticGraph:
type: DateTime!
nameInIndex: created_at
__typename:
type: string
const: InspectionNote
default: InspectionNote
required:
- id
- widget_inspection_guid
- note
- created_at
InspectionSummary:
type: object
properties:
id:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
ElasticGraph:
type: ID!
nameInIndex: id
widget_inspection_guid:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
ElasticGraph:
type: ID!
nameInIndex: widget_inspection_guid
summary:
anyOf:
- allOf:
- "$ref": "#/$defs/String"
- maxLength: 8191
- type: 'null'
ElasticGraph:
type: String
nameInIndex: summary
created_at:
"$ref": "#/$defs/DateTime"
ElasticGraph:
type: DateTime!
nameInIndex: created_at
__typename:
type: string
const: InspectionSummary
default: InspectionSummary
required:
- id
- widget_inspection_guid
- summary
- created_at
Int:
type: integer
minimum: -2147483648
Expand Down Expand Up @@ -1476,6 +1558,13 @@ json_schema_version: 1
ElasticGraph:
type: Untyped
nameInIndex: metadata
inspection:
anyOf:
- "$ref": "#/$defs/WidgetInspection"
- type: 'null'
ElasticGraph:
type: WidgetInspection
nameInIndex: inspection
__typename:
type: string
const: Widget
Expand Down Expand Up @@ -1513,8 +1602,25 @@ json_schema_version: 1
- amounts
- fees
- metadata
- inspection
description: For more performant queries on this type, please filter on `workspace_id`
if possible.
WidgetInspection:
type: object
properties:
guid:
allOf:
- "$ref": "#/$defs/ID"
- maxLength: 8191
ElasticGraph:
type: ID!
nameInIndex: guid
__typename:
type: string
const: WidgetInspection
default: WidgetInspection
required:
- guid
WidgetInternalDetails:
type: object
properties:
Expand Down
Loading
Loading