Skip to content

Commit

Permalink
Update config jsonschema
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Oct 26, 2023
1 parent a53c062 commit 9917494
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 143 deletions.
276 changes: 133 additions & 143 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,6 @@
}
]
},
{
"allOf": [
{
"$ref": "#/$defs/SubsquidOperationsIndexConfig"
}
]
},
{
"allOf": [
{
Expand Down Expand Up @@ -178,6 +171,13 @@
}
]
},
{
"allOf": [
{
"$ref": "#/$defs/TzktTokenBalancesIndexConfig"
}
]
},
{
"allOf": [
{
Expand All @@ -199,13 +199,6 @@
}
]
},
{
"allOf": [
{
"$ref": "#/$defs/SubsquidOperationsIndexConfig"
}
]
},
{
"allOf": [
{
Expand Down Expand Up @@ -247,6 +240,13 @@
"$ref": "#/$defs/TzktTokenTransfersIndexConfig"
}
]
},
{
"allOf": [
{
"$ref": "#/$defs/TzktTokenBalancesIndexConfig"
}
]
}
]
}
Expand Down Expand Up @@ -287,11 +287,19 @@
"default": null
},
"sentry": {
"allOf": [
"anyOf": [
{
"allOf": [
{
"$ref": "#/$defs/SentryConfig"
}
]
},
{
"$ref": "#/$defs/SentryConfig"
"type": "null"
}
]
],
"default": null
},
"prometheus": {
"anyOf": [
Expand Down Expand Up @@ -1116,124 +1124,9 @@
],
"default": null
},
"first_level": {
"type": "integer",
"default": 0
},
"last_level": {
"type": "integer",
"default": 0
}
},
"required": [
"kind",
"datasource",
"handlers"
]
},
"SubsquidOperationsHandlerConfig": {
"type": "object",
"title": "SubsquidOperationsHandlerConfig",
"properties": {
"callback": {
"type": "string"
},
"contract": {
"anyOf": [
{
"type": "string"
},
{
"allOf": [
{
"$ref": "#/$defs/EvmContractConfig"
}
]
}
]
},
"method": {
"type": "string"
},
"events": {
"type": "array",
"items": {}
}
},
"required": [
"callback",
"contract",
"method",
"events"
]
},
"SubsquidOperationsIndexConfig": {
"type": "object",
"title": "SubsquidOperationsIndexConfig",
"properties": {
"kind": {
"enum": [
"evm.subsquid.operations"
]
},
"datasource": {
"anyOf": [
{
"type": "string"
},
{
"allOf": [
{
"$ref": "#/$defs/SubsquidDatasourceConfig"
}
]
}
]
},
"handlers": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/$defs/SubsquidOperationsHandlerConfig"
}
]
}
},
"contracts": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/$defs/EvmContractConfig"
}
]
}
},
"abi": {
"anyOf": [
{
"allOf": [
{
"$ref": "#/$defs/AbiDatasourceConfig"
}
]
},
{
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/$defs/AbiDatasourceConfig"
}
]
}
},
{
"type": "null"
}
],
"default": null
"node_only": {
"type": "boolean",
"default": false
},
"first_level": {
"type": "integer",
Expand All @@ -1247,8 +1140,7 @@
"required": [
"kind",
"datasource",
"handlers",
"contracts"
"handlers"
]
},
"TzktBigMapsHandlerConfig": {
Expand Down Expand Up @@ -1936,6 +1828,94 @@
"datasource"
]
},
"TzktTokenBalancesHandlerConfig": {
"type": "object",
"title": "TzktTokenBalancesHandlerConfig",
"properties": {
"callback": {
"type": "string"
},
"contract": {
"anyOf": [
{
"type": "string"
},
{
"allOf": [
{
"$ref": "#/$defs/TezosContractConfig"
}
]
},
{
"type": "null"
}
],
"default": null
},
"token_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"callback"
]
},
"TzktTokenBalancesIndexConfig": {
"type": "object",
"title": "TzktTokenBalancesIndexConfig",
"properties": {
"kind": {
"enum": [
"tezos.tzkt.token_balances"
]
},
"datasource": {
"anyOf": [
{
"type": "string"
},
{
"allOf": [
{
"$ref": "#/$defs/TzktDatasourceConfig"
}
]
}
]
},
"handlers": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/$defs/TzktTokenBalancesHandlerConfig"
}
]
}
},
"first_level": {
"type": "integer",
"default": 0
},
"last_level": {
"type": "integer",
"default": 0
}
},
"required": [
"kind",
"datasource"
]
},
"IndexTemplateConfig": {
"type": "object",
"title": "IndexTemplateConfig",
Expand Down Expand Up @@ -2110,8 +2090,7 @@
"title": "SentryConfig",
"properties": {
"dsn": {
"type": "string",
"default": ""
"type": "string"
},
"environment": {
"anyOf": [
Expand Down Expand Up @@ -2161,7 +2140,10 @@
"type": "boolean",
"default": false
}
}
},
"required": [
"dsn"
]
},
"PrometheusConfig": {
"type": "object",
Expand Down Expand Up @@ -2274,11 +2256,19 @@
"default": false
},
"api": {
"allOf": [
"anyOf": [
{
"$ref": "#/$defs/ApiConfig"
"allOf": [
{
"$ref": "#/$defs/ApiConfig"
}
]
},
{
"type": "null"
}
]
],
"default": null
},
"metrics": {
"allOf": [
Expand Down
1 change: 1 addition & 0 deletions scripts/dump_schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# NOTE: Run `pdm add -G dev -e ../dc_schema` first.
from pathlib import Path

import orjson
Expand Down

0 comments on commit 9917494

Please sign in to comment.