diff --git a/.data/aml/compose.yaml b/.data/aml/compose.yaml new file mode 100644 index 0000000..b1ea9a8 --- /dev/null +++ b/.data/aml/compose.yaml @@ -0,0 +1,60 @@ +name: ${CONTAINER_PREFIX} +services: + # Databases + postgres: + image: postgres + container_name: ${CONTAINER_PREFIX}_postgres + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + - ./postgres/:/docker-entrypoint-initdb.d/ + environment: + PGUSER: postgres + POSTGRES_USER: postgres + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + ports: + - "5432:5432" + healthcheck: + test: "pg_isready -q -h postgres" + interval: 10s + timeout: 5s + retries: 30 + + mongodb: + image: mongo + container_name: ${CONTAINER_PREFIX}_mongodb + restart: unless-stopped + ports: + - "27017:27017" + command: mongod --auth + volumes: + - mongodb-data:/data/db + - ./mongodb:/docker-entrypoint-initdb.d/ + environment: + - MONGO_INITDB_DATABASE=aml + - MONGO_INITDB_ROOT_USERNAME=root + - MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD} + + redis: + image: redis:latest + restart: unless-stopped + ports: + - 6379:6379 + + caching: + build: + context: https://github.com/hasura/engine-plugin-caching.git#f59acfe4004c869181de83be78d0f5d48459ef3c + restart: unless-stopped + ports: + - 8787:8787 + environment: + CACHING_PLUGIN_SECRET: ${CACHING_PLUGIN_SECRET} + CACHING_PLUGIN_REDIS_URL: ${CACHING_PLUGIN_REDIS_URL} + extra_hosts: + - local.hasura.dev=host-gateway + volumes: + - ../plugins/caching-config.js:/app/src/config.js + +volumes: + postgres-data: + mongodb-data: diff --git a/.data/aml/mongodb/accounts.bson b/.data/aml/mongodb/accounts.bson new file mode 100644 index 0000000..aadd5a3 --- /dev/null +++ b/.data/aml/mongodb/accounts.bson @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2e8643585cc369ee14d61f33a86551f7a9c45de19edf7edc0b3788d6aaac5f3 +size 185803 diff --git a/.data/aml/mongodb/mongoimport.sh b/.data/aml/mongodb/mongoimport.sh new file mode 100644 index 0000000..949c649 --- /dev/null +++ b/.data/aml/mongodb/mongoimport.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +echo "Starting MongoDB restore..." + +DB_NAME="aml" +INITDB_DIR="/docker-entrypoint-initdb.d" + +for bson_file in "$INITDB_DIR"/*.bson; do + collection_name=$(basename "$bson_file" .bson) + echo "Restoring collection: $collection_name" + mongorestore --db="$DB_NAME" --collection="$collection_name" "$bson_file" +done + +echo "MongoDB restore completed successfully." diff --git a/.data/aml/mongodb/sanctioned.bson b/.data/aml/mongodb/sanctioned.bson new file mode 100644 index 0000000..15135b4 --- /dev/null +++ b/.data/aml/mongodb/sanctioned.bson @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:452236d9908fc6510cbf44a8e34b1e927134f92384a0d5c67d2458d90341f5e1 +size 48757 diff --git a/.data/aml/mongodb/sanctioned_list.bson b/.data/aml/mongodb/sanctioned_list.bson new file mode 100644 index 0000000..9a7b2e0 --- /dev/null +++ b/.data/aml/mongodb/sanctioned_list.bson @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:402866e1db85fa0af37ecc9c56d0fda6b5efb81cf9c031af19a2ee386c397797 +size 6347438 diff --git a/.data/aml/mongodb/transactions.bson b/.data/aml/mongodb/transactions.bson new file mode 100644 index 0000000..5e7a71f --- /dev/null +++ b/.data/aml/mongodb/transactions.bson @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94c884c7432d1a07b9963244a8ce427da9cc265adaf16ac2bb576e0c7d152182 +size 758688268 diff --git a/.data/aml/postgres/1-import-pg.sql b/.data/aml/postgres/1-import-pg.sql new file mode 100644 index 0000000..3dbcaaf --- /dev/null +++ b/.data/aml/postgres/1-import-pg.sql @@ -0,0 +1,51 @@ +CREATE DATABASE aml; + +\c aml; + +CREATE TABLE IF NOT EXISTS saml_d ( + time TIME, + date DATE, + sender_account BIGINT, + receiver_account BIGINT, + amount DECIMAL(15,2), + payment_currency VARCHAR(20), + received_currency VARCHAR(20), + sender_bank_location VARCHAR(50), + receiver_bank_location VARCHAR(50), + payment_type VARCHAR(50), + is_laundering BOOLEAN, + laundering_type VARCHAR(50) +); + +CREATE TABLE IF NOT EXISTS customers ( + customer_id BIGSERIAL PRIMARY KEY, + name VARCHAR(255) NOT NULL, + account BIGINT UNIQUE NOT NULL, + dob DATE NOT NULL, + nationality VARCHAR(100), + risk_level VARCHAR(10) CHECK (risk_level IN ('low', 'medium', 'high')), + pep_status BOOLEAN DEFAULT FALSE, + blacklisted BOOLEAN DEFAULT FALSE +); + +CREATE TABLE IF NOT EXISTS sars ( + sar_id BIGSERIAL PRIMARY KEY, + customer_id BIGINT REFERENCES customers(customer_id) ON DELETE CASCADE, + transaction_id BIGINT NOT NULL, + reason TEXT NOT NULL, + status VARCHAR(10) CHECK (status IN ('pending', 'filed', 'dismissed')) DEFAULT 'pending', + filed_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +CREATE INDEX idx_customers_nationality ON customers(nationality); +CREATE INDEX idx_sars_customer_id ON sars(customer_id); +CREATE INDEX idx_sars_transaction_id ON sars(transaction_id); +CREATE INDEX idx_saml_d_sender_account ON saml_d(sender_account); +CREATE INDEX idx_saml_d_receiver_account ON saml_d(receiver_account); +CREATE INDEX idx_saml_d_date ON saml_d(date); +CREATE INDEX idx_saml_d_payment_type ON saml_d(payment_type); +CREATE INDEX idx_saml_d_is_laundering ON saml_d(is_laundering); + +COPY customers FROM '/docker-entrypoint-initdb.d/customers.csv' DELIMITER ',' CSV HEADER; +COPY sars FROM '/docker-entrypoint-initdb.d/sars.csv' DELIMITER ',' CSV HEADER; +COPY saml_d FROM '/docker-entrypoint-initdb.d/SAML-D.csv' DELIMITER ',' CSV HEADER; diff --git a/.data/aml/postgres/SAML-D.csv b/.data/aml/postgres/SAML-D.csv new file mode 100644 index 0000000..8ecbb59 --- /dev/null +++ b/.data/aml/postgres/SAML-D.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b71ce2ea7b47fe6f19da1aa151776b04ec74560a852c2c077df91d20b8b4ef9 +size 996168850 diff --git a/.data/aml/postgres/customers.csv b/.data/aml/postgres/customers.csv new file mode 100644 index 0000000..f90724d --- /dev/null +++ b/.data/aml/postgres/customers.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2d3a82b9920fbf23ae77bad89d0ed7d0669af5c49d745aa2b8c11ae14deb4d6 +size 7135067 diff --git a/.data/aml/postgres/generate.py b/.data/aml/postgres/generate.py new file mode 100644 index 0000000..9b11c7c --- /dev/null +++ b/.data/aml/postgres/generate.py @@ -0,0 +1,160 @@ +import csv +import random +import datetime +from faker import Faker + +# Initialize Faker for random data generation +fake = Faker() + +# Number of records to generate +NUM_CUSTOMERS = 100000 +NUM_SARS = 50000 + +# Risk levels and statuses +RISK_LEVELS = ["low", "medium", "high"] +SAR_STATUSES = ["pending", "filed", "dismissed"] + +# Generate customers data +def generate_customers(): + customers = [] + for customer_id in range(1, NUM_CUSTOMERS + 1): + name = fake.name() + account = str(random.randint(100000000, 9999999999)) + dob = fake.date_of_birth(minimum_age=18, maximum_age=80).strftime("%Y-%m-%d") + nationality = fake.country() + risk_level = random.choice(RISK_LEVELS) + pep_status = random.choice([True, False]) + blacklisted = random.choice([True, False]) if risk_level == "high" else False + customers.append([customer_id, name, account, dob, nationality, risk_level, pep_status, blacklisted]) + return customers + +# Generate SARs data +def generate_sars(customers): + import random + + aml_reasons = [ + "rapid large deposits", + "multiple small cash deposits", + "frequent wire transfers", + "high volume of transactions", + "unexplained wealth increase", + "rapid movement of funds", + "transactions just below reporting threshold", + "frequent ATM withdrawals", + "multiple high-value purchases", + "inconsistent deposit amounts", + "repeated failed transactions", + "high-risk merchant activity", + "large round-dollar transactions", + "unusual payment frequency", + "excessive refund requests", + "transactions with sanctioned countries", + "cross-border high-risk jurisdiction", + "frequent offshore transactions", + "use of multiple foreign accounts", + "payments to unknown international entities", + "transfers to high-risk tax havens", + "funds originating from conflict zones", + "frequent cross-border remittances", + "sudden shift in transaction locations", + "transactions from high-risk jurisdictions", + "shell company detected", + "business lacks operational activity", + "high volume of cash transactions", + "transactions do not match business profile", + "unregistered business receiving payments", + "high-risk industry involvement", + "front company suspected", + "misuse of business accounts", + "fake invoices detected", + "unusual supplier payments", + "business operating with no clear income source", + "charity receiving unexplained large donations", + "structuring detected", + "layering through multiple accounts", + "use of third-party intermediaries", + "funds rapidly transferred across multiple accounts", + "complex transaction chain with no clear purpose", + "transaction smurfing detected", + "rapid movement between personal and business accounts", + "multiple deposits from unknown sources", + "withdrawal pattern inconsistent with income", + "mismatched identity details", + "account holder uses multiple aliases", + "multiple accounts linked to single individual", + "synthetic identity detected", + "high-risk account takeover attempt", + "fraudulent ID used for onboarding", + "accounts opened with false information", + "loan applications using stolen credentials", + "identity inconsistencies across accounts", + "duplicate account credentials detected", + "large cash deposit without declared source", + "frequent deposits at multiple locations", + "cash transactions inconsistent with known income", + "sudden increase in cash deposits", + "high cash activity without justification", + "cash deposits followed by immediate withdrawals", + "large-volume cash business with no payroll activity", + "real estate purchase with no clear source of funds", + "luxury purchases inconsistent with income", + "high-value asset flipping detected", + "multiple property transactions in short period", + "unregistered ownership changes", + "cash purchase of high-value assets", + "credit card laundering suspected", + "excessive prepaid card loading", + "use of multiple credit cards in short time", + "digital wallet with frequent high-value deposits", + "unexplained gift card transactions", + "cryptocurrency exchange activity without declared source of funds", + "funds linked to darknet marketplaces", + "use of privacy coins", + "anonymized transactions detected", + "multiple IP addresses accessing account", + "high volume of online gambling transactions", + "sudden increase in e-commerce refunds", + "use of VPN or TOR network in transactions", + "payments to social media-based traders", + "funds received from unrelated third parties", + "transactions between linked individuals flagged", + "repeated transactions with same unknown entity", + "funds moved through multiple third-party accounts", + "proxy account suspected", + "multiple account holders accessing single device", + "third-party involvement without clear business reason", + "abnormal behavior detected in transaction monitoring", + "PEP transaction flagged", + "unusual financial product usage", + "misuse of government stimulus funds", + "emergency loans fraud detected", + "fake employment claims linked to account", + "transaction pattern linked to known fraud cases", + "large transactions immediately reversed" + ] + sars = [] + for sar_id in range(1, NUM_SARS + 1): + customer = random.choice(customers) + customer_id = customer[0] + transaction_id = random.randint(1000000000, 9999999999) + reason = random.choice(aml_reasons) + status = random.choice(SAR_STATUSES) + filed_date = fake.date_time_this_year().strftime("%Y-%m-%d %H:%M:%S") + sars.append([sar_id, customer_id, transaction_id, reason, status, filed_date]) + return sars + +# Save to CSV +def save_to_csv(filename, data, headers): + with open(filename, mode='w', newline='', encoding='utf-8') as file: + writer = csv.writer(file) + writer.writerow(headers) + writer.writerows(data) + print(f"✅ Generated {filename}") + +# Generate data +customers_data = generate_customers() +sars_data = generate_sars(customers_data) + +# Save data to CSV files +save_to_csv("customers.csv", customers_data, ["customer_id", "name", "account", "dob", "nationality", "risk_level", "pep_status", "blacklisted"]) +save_to_csv("sars.csv", sars_data, ["sar_id", "customer_id", "transaction_id", "reason", "status", "filed_date"]) diff --git a/.data/aml/postgres/sars.csv b/.data/aml/postgres/sars.csv new file mode 100644 index 0000000..c161529 --- /dev/null +++ b/.data/aml/postgres/sars.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5b88184e0f669bb91925a65fa7d8c4760cd7cc260f321303bc83ecd4b20cae1 +size 4440239 diff --git a/.data/starter/compose.yaml b/.data/starter/compose.yaml index c5a0b48..c6e27d3 100644 --- a/.data/starter/compose.yaml +++ b/.data/starter/compose.yaml @@ -7,7 +7,7 @@ services: restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data - - ../build/postgres/:/docker-entrypoint-initdb.d/ + - ./postgres/:/docker-entrypoint-initdb.d/ environment: PGUSER: postgres POSTGRES_USER: postgres @@ -20,40 +20,6 @@ services: timeout: 5s retries: 30 - pgvector: - image: ankane/pgvector:latest - container_name: ${CONTAINER_PREFIX}_pgvector - restart: unless-stopped - ports: - - "5433:5432" - volumes: - - pgvector-data:/var/lib/postgresql/data - - ../common/pgvector/:/docker-entrypoint-initdb.d/ - environment: - PGUSER: postgres - POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - healthcheck: - test: "pg_isready -q -h postgres" - interval: 10s - timeout: 5s - retries: 30 - - mongodb: - image: mongo - container_name: ${CONTAINER_PREFIX}_mongodb - restart: unless-stopped - ports: - - "27017:27017" - command: mongod --auth - volumes: - - mongodb-data:/data/db - - ../build/mongodb:/docker-entrypoint-initdb.d/ - environment: - - MONGO_INITDB_DATABASE=holotel - - MONGO_INITDB_ROOT_USERNAME=root - - MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD} - redis: image: redis:latest restart: unless-stopped @@ -76,5 +42,3 @@ services: volumes: postgres-data: - pgvector-data: - mongodb-data: diff --git a/.data/telco/compose.yaml b/.data/telco/compose.yaml index 1571c10..f3cf755 100644 --- a/.data/telco/compose.yaml +++ b/.data/telco/compose.yaml @@ -7,7 +7,7 @@ services: restart: unless-stopped volumes: - postgres-data:/var/lib/postgresql/data - - ../build/postgres/:/docker-entrypoint-initdb.d/ + - ./postgres/:/docker-entrypoint-initdb.d/ environment: PGUSER: postgres POSTGRES_USER: postgres @@ -28,7 +28,7 @@ services: - "5433:5432" volumes: - pgvector-data:/var/lib/postgresql/data - - ../common/pgvector/:/docker-entrypoint-initdb.d/ + - ./pgvector/:/docker-entrypoint-initdb.d/ environment: PGUSER: postgres POSTGRES_USER: postgres @@ -48,7 +48,7 @@ services: command: mongod --auth volumes: - mongodb-data:/data/db - - ../build/mongodb:/docker-entrypoint-initdb.d/ + - ./mongodb:/docker-entrypoint-initdb.d/ environment: - MONGO_INITDB_DATABASE=holotel - MONGO_INITDB_ROOT_USERNAME=root diff --git a/.data/common/mongodb/1-init-mongo.js b/.data/telco/mongodb/1-init-mongo.js similarity index 100% rename from .data/common/mongodb/1-init-mongo.js rename to .data/telco/mongodb/1-init-mongo.js diff --git a/.data/common/pgvector/1-init.sql b/.data/telco/pgvector/1-init.sql similarity index 100% rename from .data/common/pgvector/1-init.sql rename to .data/telco/pgvector/1-init.sql diff --git a/.data/common/pgvector/2-import-postgres.sql b/.data/telco/pgvector/2-import-postgres.sql similarity index 100% rename from .data/common/pgvector/2-import-postgres.sql rename to .data/telco/pgvector/2-import-postgres.sql diff --git a/.data/common/postgres/1-init.sql b/.data/telco/postgres/1-init.sql similarity index 100% rename from .data/common/postgres/1-init.sql rename to .data/telco/postgres/1-init.sql diff --git a/.data/common/postgres/2-import-auth.sql b/.data/telco/postgres/2-import-auth.sql similarity index 100% rename from .data/common/postgres/2-import-auth.sql rename to .data/telco/postgres/2-import-auth.sql diff --git a/.data/telco/postgres/2-import-customer.sql b/.data/telco/postgres/3-import-customer.sql similarity index 100% rename from .data/telco/postgres/2-import-customer.sql rename to .data/telco/postgres/3-import-customer.sql diff --git a/.data/telco/postgres/3-import-network.sql b/.data/telco/postgres/4-import-network.sql similarity index 100% rename from .data/telco/postgres/3-import-network.sql rename to .data/telco/postgres/4-import-network.sql diff --git a/.gitattributes b/.gitattributes index 8ddc99f..49e86e3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,3 @@ -*.hml linguist-language=yaml \ No newline at end of file +*.hml linguist-language=yaml +*.bson filter=lfs diff=lfs merge=lfs -text +.data/**/*.csv filter=lfs diff=lfs merge=lfs -text diff --git a/hasura/.env.aml.template b/hasura/.env.aml.template new file mode 100644 index 0000000..4609d42 --- /dev/null +++ b/hasura/.env.aml.template @@ -0,0 +1,26 @@ +APP_AML_AUTHORIZATION_HEADER="Bearer gV2TDEbeQ1TwYRa4R5lifQ==" +APP_AML_CONNECTION_URI="postgres://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5432/aml" +APP_AML_HASURA_SERVICE_TOKEN_SECRET="gV2TDEbeQ1TwYRa4R5lifQ==" +APP_AML_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +APP_AML_OTEL_SERVICE_NAME="app_aml" +APP_AML_READ_URL="http://local.hasura.dev:5882" +APP_AML_WRITE_URL="http://local.hasura.dev:5882" +APP_SANCTIONS_AUTHORIZATION_HEADER="Bearer XKfUQWpa2ngSO0vsxcCqsQ==" +APP_SANCTIONS_HASURA_SERVICE_TOKEN_SECRET="XKfUQWpa2ngSO0vsxcCqsQ==" +APP_SANCTIONS_MONGODB_DATABASE_URI="mongodb://root:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:27017/aml?authSource=admin" +APP_SANCTIONS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +APP_SANCTIONS_OTEL_SERVICE_NAME="app_sanctions" +APP_SANCTIONS_READ_URL="http://local.hasura.dev:8200" +APP_SANCTIONS_WRITE_URL="http://local.hasura.dev:8200" +GLOBALS_GLOBAL_FUNCTIONS_AUTHORIZATION_HEADER="Bearer YQ==" +GLOBALS_GLOBAL_FUNCTIONS_HASURA_CONNECTOR_PORT=5756 +GLOBALS_GLOBAL_FUNCTIONS_HASURA_SERVICE_TOKEN_SECRET="YQ==" +GLOBALS_GLOBAL_FUNCTIONS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317" +GLOBALS_GLOBAL_FUNCTIONS_OTEL_SERVICE_NAME="globals_global_functions" +GLOBALS_GLOBAL_FUNCTIONS_READ_URL="http://local.hasura.dev:5756" +GLOBALS_GLOBAL_FUNCTIONS_WRITE_URL="http://local.hasura.dev:5756" +CACHING_PLUGIN_PRE_PARSE_URL="http://local.hasura.dev:8787/pre-parse" +CACHING_PLUGIN_PRE_RESPONSE_URL="http://local.hasura.dev:8787/pre-response" +CACHING_PLUGIN_SECRET="zZkhKqFjqXR4g5MZCsJUZCnhCcoPyZ" +CACHING_PLUGIN_REDIS_URL="redis://local.hasura.dev:6379" +JWT_SECRET="hptj8supNeslwet7nhGGr5Uu5MombVVjDmcGMOyrWa8" diff --git a/hasura/.env.telco.template b/hasura/.env.telco.template index e3a8e80..7c2994d 100644 --- a/hasura/.env.telco.template +++ b/hasura/.env.telco.template @@ -70,7 +70,7 @@ SUPPORT_VECTOR_WRITE_URL="http://local.hasura.dev:5644" AUTH_AUTH_CONNECTION_URI="postgresql://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5432/auth" CUSTOMER_AURORA_CONNECTION_URI="postgres://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5432/customer" CUSTOMER_MONGO_MONGODB_DATABASE_URI="mongodb://presales:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:27017/holotel" -JWT_SECRET="hasura-hs384-secret-vbD*K2y\!HXr7@zJ9oLmEJpNtWc.gwQY" +JWT_SECRET="hptj8supNeslwet7nhGGr5Uu5MombVVjDmcGMOyrWa8" NETWORK_CLICKHOUSE_CLICKHOUSE_PASSWORD="hbGciOiJIUzI1NiIsInR5cCI6IkpX" NETWORK_CLICKHOUSE_CLICKHOUSE_URL="http://local.hasura.dev:8123" NETWORK_CLICKHOUSE_CLICKHOUSE_USERNAME="default" diff --git a/hasura/.hasura/context.yaml b/hasura/.hasura/context.yaml index f433fc3..29933a1 100644 --- a/hasura/.hasura/context.yaml +++ b/hasura/.hasura/context.yaml @@ -1,56 +1,32 @@ kind: Context version: v3 definition: - current: axiom-dev + current: telco contexts: - au: - project: axiom-au - supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml - subgraph: ../industry/telco/customer/subgraph.yaml - localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.au - axiom-dev: - project: axiom-dev - supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml - subgraph: ../industry/telco/customer/subgraph.yaml - localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.dev axiom-starter: project: axiom-starter supergraph: ../supergraph-config/starter/2-supergraph.yaml subgraph: ../industry/telco/customer/subgraph.yaml localEnvFile: ../.env.starter cloudEnvFile: ../.env.cloud.starter - axiom-test: - project: axiom-test - supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml - subgraph: ../industry/telco/customer/subgraph.yaml - localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.test - eu: - project: axiom-eu - supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml - subgraph: ../industry/telco/customer/subgraph.yaml - localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.eu - sg: - project: axiom-sg - supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml - subgraph: ../industry/telco/customer/subgraph.yaml - localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.sg - us-east: - project: axiom-us-east + aml: + project: aml + supergraph: ../supergraph-config/aml/2-supergraph.yaml + subgraph: ../industry/aml/app/subgraph.yaml + localEnvFile: ../.env.aml + cloudEnvFile: ../.env.cloud.aml + telco: + project: telco supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml subgraph: ../industry/telco/customer/subgraph.yaml localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.us-east - us-west: - project: axiom-us-west + cloudEnvFile: ../.env.cloud.telco + telco-test: + project: telco-test supergraph: ../supergraph-config/telco/4-supergraph-with-mutations.yaml subgraph: ../industry/telco/customer/subgraph.yaml localEnvFile: ../.env.telco - cloudEnvFile: ../.env.cloud.us-west + cloudEnvFile: ../.env.cloud.telco-test scripts: build-starter: bash: ddn supergraph build local --env-file .env.starter --env-file .env --supergraph supergraph-config/starter/2-supergraph.yaml @@ -58,24 +34,27 @@ definition: build-telco: bash: ddn supergraph build local --supergraph supergraph-config/telco/4-supergraph-with-mutations.yaml powershell: ddn supergraph build local --supergraph supergraph-config/telco/4-supergraph-with-mutations.yaml - demo-fsi: - bash: export DATASET=fsi; echo "not yet implemented" - powershell: $Env:DATASET = "fsi"; Write-Output "not yet implemented" - demo-healthcare: - bash: export DATASET=hc; echo "not yet implemented" - powershell: $Env:DATASET = "hc"; Write-Output "not yet implemented" + build-aml: + bash: ddn supergraph build local --supergraph supergraph-config/aml/2-supergraph.yaml + powershell: ddn supergraph build local --supergraph supergraph-config/aml/2-supergraph.yaml demo-starter: bash: ddn run docker-start-starter; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-starter.yaml up --build --pull always -d powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-starter.yaml up --build --pull always -d demo-telco: bash: ddn run docker-start-telco; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-telco.yaml --env-file .env.telco up --build --pull always -d powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-telco.yaml --env-file .env.telco up --build --pull always -d + demo-aml: + bash: ddn run docker-start-aml; HASURA_DDN_PAT=$(ddn auth print-pat) docker compose -f compose-aml.yaml --env-file .env.aml up --build --pull always -d + powershell: $Env:HASURA_DDN_PAT = ddn auth print-pat; docker compose -f compose-aml.yaml --env-file .env.aml up --build --pull always -d docker-start-starter: - bash: export DATASET=starter; ../.data/initdb-prepare.sh; docker compose -f ../.data/starter/compose.yaml --env-file ../.data/starter/.env up --build --pull always -d + bash: export DATASET=starter; docker compose -f ../.data/starter/compose.yaml --env-file ../.data/starter/.env up --build --pull always -d powershell: $Env:DATASET = "starter"; docker compose -f ../.data/starter/compose.yaml --env-file ../.data/starter/.env up --build --pull always -d docker-start-telco: - bash: export DATASET=telco; ../.data/initdb-prepare.sh; docker compose -f ../.data/telco/compose.yaml --env-file ../.data/telco/.env up --build --pull always -d - powershell: $Env:DATASET = "starter"; docker compose -f ../.data/telco/compose.yaml --env-file ../.data/telco/.env up --build --pull always -d + bash: export DATASET=telco; docker compose -f ../.data/telco/compose.yaml --env-file ../.data/telco/.env up --build --pull always -d + powershell: $Env:DATASET = "telco"; docker compose -f ../.data/telco/compose.yaml --env-file ../.data/telco/.env up --build --pull always -d + docker-start-aml: + bash: export DATASET=aml; docker compose -f ../.data/aml/compose.yaml --env-file ../.data/aml/.env up --build --pull always -d + powershell: $Env:DATASET = "aml"; docker compose -f ../.data/aml/compose.yaml --env-file ../.data/aml/.env up --build --pull always -d docker-stop: bash: for file in compose*.yaml $(find ../.data -type f -name "compose.yaml"); do docker compose -f $file down -v; done powershell: docker compose -f compose.yaml down -v; docker compose -f .data/compose.yaml down -v diff --git a/hasura/auth/connector/auth/compose.yaml b/hasura/auth/connector/auth/compose.yaml deleted file mode 100644 index 811c79d..0000000 --- a/hasura/auth/connector/auth/compose.yaml +++ /dev/null @@ -1,24 +0,0 @@ -services: - auth_auth: - build: - context: . - dockerfile_inline: |- - FROM ghcr.io/hasura/ndc-postgres:v1.1.1 - COPY ./ /etc/connector - develop: - watch: - - path: ./ - action: sync+restart - target: /etc/connector - environment: - CONNECTION_URI: $AUTH_AUTH_CONNECTION_URI - HASURA_SERVICE_TOKEN_SECRET: $AUTH_AUTH_HASURA_SERVICE_TOKEN_SECRET - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: $AUTH_AUTH_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - OTEL_SERVICE_NAME: $AUTH_AUTH_OTEL_SERVICE_NAME - extra_hosts: - - local.hasura.dev=host-gateway - ports: - - mode: ingress - target: 8080 - published: "6460" - protocol: tcp diff --git a/hasura/compose-aml.yaml b/hasura/compose-aml.yaml new file mode 100644 index 0000000..ae46f99 --- /dev/null +++ b/hasura/compose-aml.yaml @@ -0,0 +1,34 @@ +include: + - path: globals/connector/global_functions/compose.yaml + - path: industry/aml/app/connector/sanctions/compose.yaml + - path: industry/aml/app/connector/aml/compose.yaml +services: + engine: + build: + context: engine + dockerfile: Dockerfile.engine + pull: true + environment: + AUTHN_CONFIG_PATH: /md/auth_config.json + ENABLE_CORS: "true" + ENABLE_SQL_INTERFACE: "true" + INTROSPECTION_METADATA_FILE: /md/metadata.json + METADATA_PATH: /md/open_dd.json + OTLP_ENDPOINT: http://local.hasura.dev:4317 + extra_hosts: + - local.hasura.dev:host-gateway + labels: + io.hasura.ddn.service-name: engine + ports: + - 3280:3000 + otel-collector: + command: + - --config=/etc/otel-collector-config.yaml + environment: + HASURA_DDN_PAT: ${HASURA_DDN_PAT} + image: otel/opentelemetry-collector:0.104.0 + ports: + - 4317:4317 + - 4318:4318 + volumes: + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml diff --git a/hasura/compose-starter.yaml b/hasura/compose-starter.yaml index 10684cd..d6c8072 100644 --- a/hasura/compose-starter.yaml +++ b/hasura/compose-starter.yaml @@ -1,30 +1,25 @@ include: - - path: support/connector/atlas/compose.yaml - - path: support/connector/vector/compose.yaml - - path: auth/connector/auth/compose.yaml - path: globals/connector/global_functions/compose.yaml - path: industry/starter/example/connector/mypostgres/compose.yaml services: engine: build: context: engine - dockerfile_inline: |- - FROM ghcr.io/hasura/v3-engine - COPY ./build /md/ - develop: - watch: - - action: sync+restart - path: engine/build - target: /md/ - env_file: - - engine/.env.engine + dockerfile: Dockerfile.engine + pull: true + environment: + AUTHN_CONFIG_PATH: /md/auth_config.json + ENABLE_CORS: "true" + ENABLE_SQL_INTERFACE: "true" + INTROSPECTION_METADATA_FILE: /md/metadata.json + METADATA_PATH: /md/open_dd.json + OTLP_ENDPOINT: http://local.hasura.dev:4317 extra_hosts: - - local.hasura.dev=host-gateway + - local.hasura.dev:host-gateway + labels: + io.hasura.ddn.service-name: engine ports: - - mode: ingress - protocol: tcp - published: "3000" - target: 3000 + - 3280:3000 otel-collector: command: - --config=/etc/otel-collector-config.yaml @@ -32,13 +27,7 @@ services: HASURA_DDN_PAT: ${HASURA_DDN_PAT} image: otel/opentelemetry-collector:0.104.0 ports: - - mode: ingress - protocol: tcp - published: "4317" - target: 4317 - - mode: ingress - protocol: tcp - published: "4318" - target: 4318 + - 4317:4317 + - 4318:4318 volumes: - - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml \ No newline at end of file diff --git a/hasura/compose-telco.yaml b/hasura/compose-telco.yaml index 7970005..be84b3c 100644 --- a/hasura/compose-telco.yaml +++ b/hasura/compose-telco.yaml @@ -2,33 +2,31 @@ include: - path: industry/telco/customer/connector/aurora/compose.yaml - path: industry/telco/customer/connector/mongo/compose.yaml - path: industry/telco/customer/connector/logic/compose.yaml - - path: support/connector/atlas/compose.yaml - - path: support/connector/vector/compose.yaml + - path: industry/telco/support/connector/atlas/compose.yaml + - path: industry/telco/support/connector/vector/compose.yaml - path: industry/telco/network/connector/clickhouse/compose.yaml - - path: auth/connector/auth/compose.yaml + - path: industry/telco/auth/connector/auth/compose.yaml - path: industry/telco/network/connector/kafka_sink/compose.yaml - path: globals/connector/global_functions/compose.yaml services: engine: build: context: engine - dockerfile_inline: |- - FROM ghcr.io/hasura/v3-engine - COPY ./build /md/ - develop: - watch: - - action: sync+restart - path: engine/build - target: /md/ - env_file: - - engine/.env.engine + dockerfile: Dockerfile.engine + pull: true + environment: + AUTHN_CONFIG_PATH: /md/auth_config.json + ENABLE_CORS: "true" + ENABLE_SQL_INTERFACE: "true" + INTROSPECTION_METADATA_FILE: /md/metadata.json + METADATA_PATH: /md/open_dd.json + OTLP_ENDPOINT: http://local.hasura.dev:4317 extra_hosts: - - local.hasura.dev=host-gateway + - local.hasura.dev:host-gateway + labels: + io.hasura.ddn.service-name: engine ports: - - mode: ingress - protocol: tcp - published: "3000" - target: 3000 + - 3280:3000 otel-collector: command: - --config=/etc/otel-collector-config.yaml @@ -36,13 +34,7 @@ services: HASURA_DDN_PAT: ${HASURA_DDN_PAT} image: otel/opentelemetry-collector:0.104.0 ports: - - mode: ingress - protocol: tcp - published: "4317" - target: 4317 - - mode: ingress - protocol: tcp - published: "4318" - target: 4318 + - 4317:4317 + - 4318:4318 volumes: - - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml + - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml \ No newline at end of file diff --git a/hasura/compose.yaml b/hasura/compose.yaml index e7cfacd..dd4af7b 100644 --- a/hasura/compose.yaml +++ b/hasura/compose.yaml @@ -1,7 +1,4 @@ include: - - path: support/connector/atlas/compose.yaml - - path: support/connector/vector/compose.yaml - - path: auth/connector/auth/compose.yaml - path: globals/connector/global_functions/compose.yaml services: engine: @@ -22,7 +19,7 @@ services: ports: - mode: ingress protocol: tcp - published: "3000" + published: "3280" target: 3000 otel-collector: command: diff --git a/hasura/engine/Dockerfile.engine b/hasura/engine/Dockerfile.engine new file mode 100644 index 0000000..3613f0e --- /dev/null +++ b/hasura/engine/Dockerfile.engine @@ -0,0 +1,2 @@ +FROM ghcr.io/hasura/v3-engine +COPY ./build /md/ \ No newline at end of file diff --git a/hasura/globals/auth-config.hml b/hasura/globals/auth-config.hml index 8aabbe3..54c0b84 100644 --- a/hasura/globals/auth-config.hml +++ b/hasura/globals/auth-config.hml @@ -1,5 +1,5 @@ kind: AuthConfig -version: v3 +version: v2 definition: mode: noAuth: diff --git a/hasura/globals/connector/global_functions/connector.yaml b/hasura/globals/connector/global_functions/connector.yaml index 9155ab4..179ed23 100644 --- a/hasura/globals/connector/global_functions/connector.yaml +++ b/hasura/globals/connector/global_functions/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: GLOBALS_GLOBAL_FUNCTIONS_OTEL_EXPORTER_OTLP_ENDPOINT OTEL_SERVICE_NAME: fromEnv: GLOBALS_GLOBAL_FUNCTIONS_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/globals/subgraph-basic.yaml b/hasura/globals/subgraph-basic.yaml index ff81cf1..19169c4 100644 --- a/hasura/globals/subgraph-basic.yaml +++ b/hasura/globals/subgraph-basic.yaml @@ -8,15 +8,6 @@ definition: - auth-config.hml - compatibility-config.hml - graphql-config.hml - - plugin-config.hml envMapping: JWT_SECRET: fromEnv: JWT_SECRET - CACHING_PLUGIN_SECRET: - fromEnv: CACHING_PLUGIN_SECRET - CACHING_PLUGIN_REDIS_URL: - fromEnv: CACHING_PLUGIN_REDIS_URL - CACHING_PLUGIN_PRE_PARSE_URL: - fromEnv: CACHING_PLUGIN_PRE_PARSE_URL - CACHING_PLUGIN_PRE_RESPONSE_URL: - fromEnv: CACHING_PLUGIN_PRE_RESPONSE_URL diff --git a/hasura/auth/connector/auth/.ddnignore b/hasura/industry/aml/app/connector/aml/.ddnignore similarity index 100% rename from hasura/auth/connector/auth/.ddnignore rename to hasura/industry/aml/app/connector/aml/.ddnignore diff --git a/hasura/industry/aml/app/connector/aml/.hasura-connector/Dockerfile.aml b/hasura/industry/aml/app/connector/aml/.hasura-connector/Dockerfile.aml new file mode 100644 index 0000000..bd6c9cf --- /dev/null +++ b/hasura/industry/aml/app/connector/aml/.hasura-connector/Dockerfile.aml @@ -0,0 +1,2 @@ +FROM ghcr.io/hasura/ndc-postgres:v2.0.0 +COPY ./ /etc/connector \ No newline at end of file diff --git a/hasura/industry/aml/app/connector/aml/.hasura-connector/connector-metadata.yaml b/hasura/industry/aml/app/connector/aml/.hasura-connector/connector-metadata.yaml new file mode 100644 index 0000000..58ef7f1 --- /dev/null +++ b/hasura/industry/aml/app/connector/aml/.hasura-connector/connector-metadata.yaml @@ -0,0 +1,26 @@ +packagingDefinition: + type: PrebuiltDockerImage + dockerImage: ghcr.io/hasura/ndc-postgres:v2.0.0 +supportedEnvironmentVariables: + - name: CONNECTION_URI + description: The PostgreSQL connection URI + defaultValue: postgresql://read_only_user:readonlyuser@35.236.11.122:5432/v3-docs-sample-app + - name: CLIENT_CERT + description: The SSL client certificate (Optional) + defaultValue: "" + - name: CLIENT_KEY + description: The SSL client key (Optional) + defaultValue: "" + - name: ROOT_CERT + description: The SSL root certificate (Optional) + defaultValue: "" +commands: + update: hasura-ndc-postgres update +cliPlugin: + type: null + name: ndc-postgres + version: v2.0.0 +dockerComposeWatch: + - path: ./ + action: sync+restart + target: /etc/connector diff --git a/hasura/industry/aml/app/connector/aml/compose.postgres-adminer.yaml b/hasura/industry/aml/app/connector/aml/compose.postgres-adminer.yaml new file mode 100644 index 0000000..d47de34 --- /dev/null +++ b/hasura/industry/aml/app/connector/aml/compose.postgres-adminer.yaml @@ -0,0 +1,48 @@ +# Configuration used for adminer +configs: + adminer-index.php: + content: | + $$_ENV['ADMINER_DEFAULT_SERVER'], + 'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'], + 'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD'], + 'driver' => $$_ENV['ADMINER_DEFAULT_DRIVER'], + 'db' => $$_ENV['ADMINER_DEFAULT_DB'], + ]; + } + include './adminer.php'; + ?> +services: + # Adminer is a lightweight database management tool (optional) + adminer: + configs: + - source: adminer-index.php + target: /var/www/html/index.php + depends_on: + - postgres + environment: + ADMINER_DEFAULT_DB: dev + ADMINER_DEFAULT_DRIVER: pgsql + ADMINER_DEFAULT_PASSWORD: password + ADMINER_DEFAULT_SERVER: postgres + ADMINER_DEFAULT_USERNAME: user + image: adminer:latest + ports: + - 9425:8080 + restart: unless-stopped + # Bundled Postgres database with pgvector (optional) + postgres: + environment: + POSTGRES_DB: dev + POSTGRES_PASSWORD: password + POSTGRES_USER: user + image: pgvector/pgvector:pg17 + ports: + - 8345:5432 + restart: unless-stopped + volumes: + - db_data:/var/lib/postgresql/data +volumes: + db_data: {} diff --git a/hasura/industry/aml/app/connector/aml/configuration.json b/hasura/industry/aml/app/connector/aml/configuration.json new file mode 100644 index 0000000..01bb25e --- /dev/null +++ b/hasura/industry/aml/app/connector/aml/configuration.json @@ -0,0 +1,1281 @@ +{ + "version": "5", + "$schema": "schema.json", + "connectionSettings": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "metadata": { + "tables": { + "customers": { + "schemaName": "public", + "tableName": "customers", + "columns": { + "account": { + "name": "account", + "type": { + "scalarType": "int8" + }, + "nullable": "nonNullable", + "description": null + }, + "blacklisted": { + "name": "blacklisted", + "type": { + "scalarType": "bool" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "customer_id": { + "name": "customer_id", + "type": { + "scalarType": "int8" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "dob": { + "name": "dob", + "type": { + "scalarType": "date" + }, + "nullable": "nonNullable", + "description": null + }, + "name": { + "name": "name", + "type": { + "scalarType": "varchar" + }, + "nullable": "nonNullable", + "description": null + }, + "nationality": { + "name": "nationality", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "pep_status": { + "name": "pep_status", + "type": { + "scalarType": "bool" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "risk_level": { + "name": "risk_level", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": { + "customers_account_key": [ + "account" + ], + "customers_pkey": [ + "customer_id" + ] + }, + "foreignRelations": {}, + "description": null + }, + "saml_d": { + "schemaName": "public", + "tableName": "saml_d", + "columns": { + "amount": { + "name": "amount", + "type": { + "scalarType": "numeric" + }, + "nullable": "nullable", + "description": null + }, + "date": { + "name": "date", + "type": { + "scalarType": "date" + }, + "nullable": "nullable", + "description": null + }, + "is_laundering": { + "name": "is_laundering", + "type": { + "scalarType": "bool" + }, + "nullable": "nullable", + "description": null + }, + "laundering_type": { + "name": "laundering_type", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "payment_currency": { + "name": "payment_currency", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "payment_type": { + "name": "payment_type", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "received_currency": { + "name": "received_currency", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "receiver_account": { + "name": "receiver_account", + "type": { + "scalarType": "int8" + }, + "nullable": "nullable", + "description": null + }, + "receiver_bank_location": { + "name": "receiver_bank_location", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "sender_account": { + "name": "sender_account", + "type": { + "scalarType": "int8" + }, + "nullable": "nullable", + "description": null + }, + "sender_bank_location": { + "name": "sender_bank_location", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "description": null + }, + "time": { + "name": "time", + "type": { + "scalarType": "time" + }, + "nullable": "nullable", + "description": null + } + }, + "uniquenessConstraints": {}, + "foreignRelations": {}, + "description": null + }, + "sars": { + "schemaName": "public", + "tableName": "sars", + "columns": { + "customer_id": { + "name": "customer_id", + "type": { + "scalarType": "int8" + }, + "nullable": "nullable", + "description": null + }, + "filed_date": { + "name": "filed_date", + "type": { + "scalarType": "timestamp" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "reason": { + "name": "reason", + "type": { + "scalarType": "text" + }, + "nullable": "nonNullable", + "description": null + }, + "sar_id": { + "name": "sar_id", + "type": { + "scalarType": "int8" + }, + "nullable": "nonNullable", + "hasDefault": "hasDefault", + "description": null + }, + "status": { + "name": "status", + "type": { + "scalarType": "varchar" + }, + "nullable": "nullable", + "hasDefault": "hasDefault", + "description": null + }, + "transaction_id": { + "name": "transaction_id", + "type": { + "scalarType": "int8" + }, + "nullable": "nonNullable", + "description": null + } + }, + "uniquenessConstraints": { + "sars_pkey": [ + "sar_id" + ] + }, + "foreignRelations": { + "sars_customer_id_fkey": { + "foreignSchema": "public", + "foreignTable": "customers", + "columnMapping": { + "customer_id": "customer_id" + } + } + }, + "description": null + } + }, + "types": { + "scalar": { + "bool": { + "typeName": "bool", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "bool_and": { + "returnType": "bool" + }, + "bool_or": { + "returnType": "bool" + }, + "every": { + "returnType": "bool" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "bool", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "bool", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "bool", + "isInfix": true + } + }, + "typeRepresentation": "boolean" + }, + "date": { + "typeName": "date", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "date" + }, + "min": { + "returnType": "date" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "date", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "date", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "date", + "isInfix": true + } + }, + "typeRepresentation": "date" + }, + "int8": { + "typeName": "int8", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "bit_and": { + "returnType": "int8" + }, + "bit_or": { + "returnType": "int8" + }, + "bit_xor": { + "returnType": "int8" + }, + "max": { + "returnType": "int8" + }, + "min": { + "returnType": "int8" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "int8", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "int8", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "int8", + "isInfix": true + } + }, + "typeRepresentation": "int64AsString" + }, + "interval": { + "typeName": "interval", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "interval" + }, + "max": { + "returnType": "interval" + }, + "min": { + "returnType": "interval" + }, + "sum": { + "returnType": "interval" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "interval", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "interval", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "interval", + "isInfix": true + } + }, + "typeRepresentation": null + }, + "numeric": { + "typeName": "numeric", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "numeric" + }, + "max": { + "returnType": "numeric" + }, + "min": { + "returnType": "numeric" + }, + "stddev": { + "returnType": "numeric" + }, + "stddev_pop": { + "returnType": "numeric" + }, + "stddev_samp": { + "returnType": "numeric" + }, + "sum": { + "returnType": "numeric" + }, + "var_pop": { + "returnType": "numeric" + }, + "var_samp": { + "returnType": "numeric" + }, + "variance": { + "returnType": "numeric" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "numeric", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "numeric", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "numeric", + "isInfix": true + } + }, + "typeRepresentation": "bigDecimalAsString" + }, + "text": { + "typeName": "text", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "text", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "text", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "text", + "isInfix": false + } + }, + "typeRepresentation": "string" + }, + "time": { + "typeName": "time", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "avg": { + "returnType": "interval" + }, + "max": { + "returnType": "time" + }, + "min": { + "returnType": "time" + }, + "sum": { + "returnType": "interval" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "time", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "time", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "time", + "isInfix": true + } + }, + "typeRepresentation": "time" + }, + "timestamp": { + "typeName": "timestamp", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "timestamp" + }, + "min": { + "returnType": "timestamp" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "timestamp", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "timestamp", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "timestamp", + "isInfix": true + } + }, + "typeRepresentation": "timestamp" + }, + "varchar": { + "typeName": "varchar", + "schemaName": "pg_catalog", + "description": null, + "aggregateFunctions": { + "max": { + "returnType": "text" + }, + "min": { + "returnType": "text" + } + }, + "comparisonOperators": { + "_eq": { + "operatorName": "=", + "operatorKind": "equal", + "argumentType": "varchar", + "isInfix": true + }, + "_gt": { + "operatorName": ">", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_gte": { + "operatorName": ">=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_ilike": { + "operatorName": "~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_in": { + "operatorName": "IN", + "operatorKind": "in", + "argumentType": "varchar", + "isInfix": true + }, + "_iregex": { + "operatorName": "~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_like": { + "operatorName": "~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lt": { + "operatorName": "<", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_lte": { + "operatorName": "<=", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_neq": { + "operatorName": "<>", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nilike": { + "operatorName": "!~~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_niregex": { + "operatorName": "!~*", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nlike": { + "operatorName": "!~~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_nregex": { + "operatorName": "!~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "_regex": { + "operatorName": "~", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": true + }, + "starts_with": { + "operatorName": "starts_with", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + }, + "ts_match_tt": { + "operatorName": "ts_match_tt", + "operatorKind": "custom", + "argumentType": "varchar", + "isInfix": false + } + }, + "typeRepresentation": "string" + } + }, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "introspectionOptions": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "mutationsVersion": "v2", + "mutationsPrefix": "" +} diff --git a/hasura/industry/aml/app/connector/aml/connector.yaml b/hasura/industry/aml/app/connector/aml/connector.yaml new file mode 100644 index 0000000..5ce3071 --- /dev/null +++ b/hasura/industry/aml/app/connector/aml/connector.yaml @@ -0,0 +1,16 @@ +kind: Connector +version: v2 +definition: + name: aml + subgraph: app + source: hasura/postgres:v2.0.0 + context: . + envMapping: + CONNECTION_URI: + fromEnv: APP_AML_CONNECTION_URI + HASURA_SERVICE_TOKEN_SECRET: + fromEnv: APP_AML_HASURA_SERVICE_TOKEN_SECRET + OTEL_EXPORTER_OTLP_ENDPOINT: + fromEnv: APP_AML_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: + fromEnv: APP_AML_OTEL_SERVICE_NAME diff --git a/hasura/industry/aml/app/connector/aml/schema.json b/hasura/industry/aml/app/connector/aml/schema.json new file mode 100644 index 0000000..15e45a3 --- /dev/null +++ b/hasura/industry/aml/app/connector/aml/schema.json @@ -0,0 +1,1622 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ParsedConfiguration", + "description": "Initial configuration, just enough to connect to a database and elaborate a full 'Configuration'.", + "type": "object", + "required": [ + "version" + ], + "properties": { + "version": { + "$ref": "#/definitions/Version" + }, + "$schema": { + "description": "Jsonschema of the configuration format.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "connectionSettings": { + "description": "Database connection settings.", + "default": { + "connectionUri": { + "variable": "CONNECTION_URI" + }, + "poolSettings": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "isolationLevel": "ReadCommitted" + }, + "allOf": [ + { + "$ref": "#/definitions/DatabaseConnectionSettings" + } + ] + }, + "metadata": { + "description": "Connector metadata.", + "default": { + "tables": {}, + "types": { + "scalar": {}, + "composite": {} + }, + "nativeOperations": { + "queries": {}, + "mutations": {} + } + }, + "allOf": [ + { + "$ref": "#/definitions/Metadata" + } + ] + }, + "introspectionOptions": { + "description": "Database introspection options.", + "default": { + "excludedSchemas": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "unqualifiedSchemasForTables": [ + "public" + ], + "unqualifiedSchemasForTypesAndProcedures": [ + "public", + "pg_catalog", + "tiger" + ], + "comparisonOperatorMapping": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "introspectPrefixFunctionComparisonOperators": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "typeRepresentations": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + } + }, + "allOf": [ + { + "$ref": "#/definitions/IntrospectionOptions" + } + ] + }, + "mutationsVersion": { + "description": "Which version of the generated mutation procedures to include in the schema response", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/MutationsVersion" + }, + { + "type": "null" + } + ] + }, + "mutationsPrefix": { + "description": "Provide a custom prefix for generated mutation names. Defaults to mutations version.", + "default": null, + "type": [ + "string", + "null" + ] + } + }, + "definitions": { + "Version": { + "type": "string", + "enum": [ + "5" + ] + }, + "DatabaseConnectionSettings": { + "description": "Database connection settings.", + "type": "object", + "required": [ + "connectionUri" + ], + "properties": { + "connectionUri": { + "description": "Connection string for a Postgres-compatible database.", + "allOf": [ + { + "$ref": "#/definitions/ConnectionUri" + } + ] + }, + "poolSettings": { + "description": "Connection pool settings.", + "default": { + "maxConnections": 50, + "poolTimeout": 30, + "idleTimeout": 180, + "checkConnectionAfterIdle": 60, + "connectionLifetime": 600 + }, + "allOf": [ + { + "$ref": "#/definitions/PoolSettings" + } + ] + }, + "isolationLevel": { + "description": "Query isolation level.", + "default": "ReadCommitted", + "allOf": [ + { + "$ref": "#/definitions/IsolationLevel" + } + ] + } + } + }, + "ConnectionUri": { + "$ref": "#/definitions/Secret" + }, + "Secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "object", + "required": [ + "variable" + ], + "properties": { + "variable": { + "$ref": "#/definitions/Variable" + } + } + } + ] + }, + "Variable": { + "description": "The name of an an environment variable.", + "type": "string" + }, + "PoolSettings": { + "description": "Settings for the PostgreSQL connection pool", + "type": "object", + "properties": { + "maxConnections": { + "description": "maximum number of pool connections", + "default": 50, + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "poolTimeout": { + "description": "timeout for acquiring a connection from the pool (seconds)", + "default": 30, + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "idleTimeout": { + "description": "idle timeout for releasing a connection from the pool (seconds)", + "default": 180, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "checkConnectionAfterIdle": { + "description": "check the connection is alive after being idle for N seconds. Set to null to always check.", + "default": 60, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "connectionLifetime": { + "description": "maximum lifetime for an individual connection (seconds)", + "default": 600, + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + } + } + }, + "IsolationLevel": { + "description": "The isolation level of the transaction in which a query is executed.", + "oneOf": [ + { + "description": "Prevents reading data from another uncommitted transaction.", + "type": "string", + "enum": [ + "ReadCommitted" + ] + }, + { + "description": "Reading the same data twice is guaranteed to return the same result.", + "type": "string", + "enum": [ + "RepeatableRead" + ] + }, + { + "description": "Concurrent transactions behave identically to serializing them one at a time.", + "type": "string", + "enum": [ + "Serializable" + ] + } + ] + }, + "Metadata": { + "description": "Metadata information.", + "type": "object", + "properties": { + "tables": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/TablesInfo" + } + ] + }, + "types": { + "default": { + "scalar": {}, + "composite": {} + }, + "allOf": [ + { + "$ref": "#/definitions/Types" + } + ] + }, + "nativeOperations": { + "default": { + "queries": {}, + "mutations": {} + }, + "allOf": [ + { + "$ref": "#/definitions/NativeOperations" + } + ] + } + } + }, + "TablesInfo": { + "description": "Mapping from a \"table\" name to its information.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TableInfo" + } + }, + "TableInfo": { + "description": "Information about a database table (or any other kind of relation).", + "type": "object", + "required": [ + "columns", + "schemaName", + "tableName" + ], + "properties": { + "schemaName": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "columns": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ColumnInfo" + } + }, + "uniquenessConstraints": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/UniquenessConstraints" + } + ] + }, + "foreignRelations": { + "default": {}, + "allOf": [ + { + "$ref": "#/definitions/ForeignRelations" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "ColumnInfo": { + "description": "Information about a database column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "hasDefault": { + "$ref": "#/definitions/HasDefault" + }, + "isIdentity": { + "$ref": "#/definitions/IsIdentity" + }, + "isGenerated": { + "$ref": "#/definitions/IsGenerated" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "Type": { + "description": "The type of values that a column, field, or argument may take.", + "oneOf": [ + { + "type": "object", + "required": [ + "scalarType" + ], + "properties": { + "scalarType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "compositeType" + ], + "properties": { + "compositeType": { + "type": "string" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "arrayType" + ], + "properties": { + "arrayType": { + "$ref": "#/definitions/Type" + } + }, + "additionalProperties": false + } + ] + }, + "Nullable": { + "description": "Can this column contain null values", + "type": "string", + "enum": [ + "nullable", + "nonNullable" + ] + }, + "HasDefault": { + "description": "Does this column have a default value.", + "type": "string", + "enum": [ + "noDefault", + "hasDefault" + ] + }, + "IsIdentity": { + "description": "Is this column an identity column.", + "type": "string", + "enum": [ + "notIdentity", + "identityByDefault", + "identityAlways" + ] + }, + "IsGenerated": { + "description": "Is this column a generated column.", + "type": "string", + "enum": [ + "notGenerated", + "stored" + ] + }, + "UniquenessConstraints": { + "description": "A mapping from the name of a unique constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UniquenessConstraint" + } + }, + "UniquenessConstraint": { + "description": "The set of columns that make up a uniqueness constraint. We map each table column to their ndc field names.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "ForeignRelations": { + "description": "A mapping from the name of a foreign key constraint to its value.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ForeignRelation" + } + }, + "ForeignRelation": { + "description": "A foreign key constraint.", + "type": "object", + "required": [ + "columnMapping", + "foreignTable" + ], + "properties": { + "foreignSchema": { + "type": [ + "string", + "null" + ] + }, + "foreignTable": { + "type": "string" + }, + "columnMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Types": { + "description": "Information about types.", + "type": "object", + "required": [ + "composite", + "scalar" + ], + "properties": { + "scalar": { + "$ref": "#/definitions/ScalarTypes" + }, + "composite": { + "$ref": "#/definitions/CompositeTypes" + } + } + }, + "ScalarTypes": { + "description": "Map of all known/occurring scalar types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ScalarType" + } + }, + "ScalarType": { + "description": "Information about a scalar type. A scalar type is completely characterized by its name and the operations you can do on it.", + "type": "object", + "required": [ + "aggregateFunctions", + "comparisonOperators", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "aggregateFunctions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/AggregateFunction" + } + }, + "comparisonOperators": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ComparisonOperator" + } + }, + "typeRepresentation": { + "anyOf": [ + { + "$ref": "#/definitions/TypeRepresentation" + }, + { + "type": "null" + } + ] + } + } + }, + "AggregateFunction": { + "type": "object", + "required": [ + "returnType" + ], + "properties": { + "returnType": { + "type": "string" + } + } + }, + "ComparisonOperator": { + "description": "Represents a postgres binary comparison operator", + "type": "object", + "required": [ + "argumentType", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "type": "string" + }, + "operatorKind": { + "$ref": "#/definitions/OperatorKind" + }, + "argumentType": { + "type": "string" + }, + "isInfix": { + "default": true, + "type": "boolean" + } + } + }, + "OperatorKind": { + "description": "Is it a built-in operator, or a custom operator.", + "type": "string", + "enum": [ + "equal", + "in", + "custom" + ] + }, + "TypeRepresentation": { + "description": "Type representation of a scalar type.", + "oneOf": [ + { + "description": "JSON booleans", + "type": "string", + "enum": [ + "boolean" + ] + }, + { + "description": "Any JSON string", + "type": "string", + "enum": [ + "string" + ] + }, + { + "description": "float4", + "type": "string", + "enum": [ + "float32" + ] + }, + { + "description": "float8", + "type": "string", + "enum": [ + "float64" + ] + }, + { + "description": "int2", + "type": "string", + "enum": [ + "int16" + ] + }, + { + "description": "int4", + "type": "string", + "enum": [ + "int32" + ] + }, + { + "description": "int8 as integer", + "type": "string", + "enum": [ + "int64" + ] + }, + { + "description": "int8 as string", + "type": "string", + "enum": [ + "int64AsString" + ] + }, + { + "description": "numeric", + "type": "string", + "enum": [ + "bigDecimal" + ] + }, + { + "description": "numeric as string", + "type": "string", + "enum": [ + "bigDecimalAsString" + ] + }, + { + "description": "timestamp", + "type": "string", + "enum": [ + "timestamp" + ] + }, + { + "description": "timestamp with timezone", + "type": "string", + "enum": [ + "timestamptz" + ] + }, + { + "description": "time", + "type": "string", + "enum": [ + "time" + ] + }, + { + "description": "time with timezone", + "type": "string", + "enum": [ + "timetz" + ] + }, + { + "description": "date", + "type": "string", + "enum": [ + "date" + ] + }, + { + "description": "uuid", + "type": "string", + "enum": [ + "uUID" + ] + }, + { + "description": "geography", + "type": "string", + "enum": [ + "geography" + ] + }, + { + "description": "geometry", + "type": "string", + "enum": [ + "geometry" + ] + }, + { + "description": "Any JSON number", + "type": "string", + "enum": [ + "number" + ] + }, + { + "description": "Any JSON number, with no decimal part", + "type": "string", + "enum": [ + "integer" + ] + }, + { + "description": "An arbitrary json.", + "type": "string", + "enum": [ + "json" + ] + }, + { + "description": "One of the specified string values", + "type": "object", + "required": [ + "enum" + ], + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + ] + }, + "CompositeTypes": { + "description": "Map of all known composite types.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CompositeType" + } + }, + "CompositeType": { + "description": "Information about a composite type. These are very similar to tables, but with the crucial difference that composite types do not support constraints (such as NOT NULL).", + "type": "object", + "required": [ + "fields", + "schemaName", + "typeName" + ], + "properties": { + "typeName": { + "type": "string" + }, + "schemaName": { + "type": "string" + }, + "fields": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/FieldInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "FieldInfo": { + "description": "Information about a composite type field.", + "type": "object", + "required": [ + "fieldName", + "type" + ], + "properties": { + "fieldName": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeOperations": { + "description": "Metadata information of Native Operations.", + "type": "object", + "required": [ + "mutations", + "queries" + ], + "properties": { + "queries": { + "description": "Native Queries.", + "allOf": [ + { + "$ref": "#/definitions/NativeQueries" + } + ] + }, + "mutations": { + "description": "Native Mutations.", + "allOf": [ + { + "$ref": "#/definitions/NativeMutations" + } + ] + } + } + }, + "NativeQueries": { + "description": "Metadata information of Native Queries.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "NativeQueryInfo": { + "description": "Information about a Native Operation", + "type": "object", + "required": [ + "columns", + "sql" + ], + "properties": { + "sql": { + "description": "SQL expression to use for the Native Operation. We can interpolate values using `{{variable_name}}` syntax, such as `SELECT * FROM authors WHERE name = {{author_name}}`", + "allOf": [ + { + "$ref": "#/definitions/NativeQuerySql" + } + ] + }, + "columns": { + "description": "Columns returned by the Native Operation", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "arguments": { + "description": "Names and types of arguments that can be passed to this Native Operation", + "default": {}, + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReadOnlyColumnInfo" + } + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeQuerySql": { + "description": "Native Operation SQL location.", + "anyOf": [ + { + "description": "Refer to an external Native Operation SQL file.", + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "description": "Relative path to a sql file.", + "type": "string" + } + } + }, + { + "description": "Inline Native Operation SQL string.", + "type": "object", + "required": [ + "inline" + ], + "properties": { + "inline": { + "description": "An inline Native Operation SQL string.", + "allOf": [ + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + } + } + }, + { + "$ref": "#/definitions/InlineNativeQuerySql" + } + ] + }, + "InlineNativeQuerySql": { + "type": "string" + }, + "ReadOnlyColumnInfo": { + "description": "Information about a native query column.", + "type": "object", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/Type" + }, + "nullable": { + "default": "nullable", + "allOf": [ + { + "$ref": "#/definitions/Nullable" + } + ] + }, + "description": { + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "NativeMutations": { + "description": "Metadata information of Native Mutations.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NativeQueryInfo" + } + }, + "IntrospectionOptions": { + "description": "Options which only influence how the configuration is updated.", + "type": "object", + "properties": { + "excludedSchemas": { + "description": "Schemas which are excluded from introspection. The default setting will exclude the internal schemas of Postgres, Citus, Cockroach, and the PostGIS extension.", + "default": [ + "information_schema", + "pg_catalog", + "tiger", + "crdb_internal", + "columnar", + "columnar_internal" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTables": { + "description": "The names of Tables and Views in these schemas will be returned unqualified. The default setting will set the `public` schema as unqualified.", + "default": [ + "public" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "unqualifiedSchemasForTypesAndProcedures": { + "description": "The types and procedures in these schemas will be returned unqualified.", + "default": [ + "public", + "pg_catalog", + "tiger" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "comparisonOperatorMapping": { + "description": "The mapping of comparison operator names to apply when updating the configuration", + "default": [ + { + "operatorName": "=", + "exposedName": "_eq", + "operatorKind": "equal" + }, + { + "operatorName": "<=", + "exposedName": "_lte", + "operatorKind": "custom" + }, + { + "operatorName": ">", + "exposedName": "_gt", + "operatorKind": "custom" + }, + { + "operatorName": ">=", + "exposedName": "_gte", + "operatorKind": "custom" + }, + { + "operatorName": "<", + "exposedName": "_lt", + "operatorKind": "custom" + }, + { + "operatorName": "<>", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "!=", + "exposedName": "_neq", + "operatorKind": "custom" + }, + { + "operatorName": "LIKE", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "NOT LIKE", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "ILIKE", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "NOT ILIKE", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "SIMILAR TO", + "exposedName": "_similar", + "operatorKind": "custom" + }, + { + "operatorName": "NOT SIMILAR TO", + "exposedName": "_nsimilar", + "operatorKind": "custom" + }, + { + "operatorName": "~~", + "exposedName": "_like", + "operatorKind": "custom" + }, + { + "operatorName": "!~~", + "exposedName": "_nlike", + "operatorKind": "custom" + }, + { + "operatorName": "~~*", + "exposedName": "_ilike", + "operatorKind": "custom" + }, + { + "operatorName": "!~~*", + "exposedName": "_nilike", + "operatorKind": "custom" + }, + { + "operatorName": "~", + "exposedName": "_regex", + "operatorKind": "custom" + }, + { + "operatorName": "!~", + "exposedName": "_nregex", + "operatorKind": "custom" + }, + { + "operatorName": "~*", + "exposedName": "_iregex", + "operatorKind": "custom" + }, + { + "operatorName": "!~*", + "exposedName": "_niregex", + "operatorKind": "custom" + } + ], + "type": "array", + "items": { + "$ref": "#/definitions/ComparisonOperatorMapping" + } + }, + "introspectPrefixFunctionComparisonOperators": { + "description": "Which prefix functions (i.e., non-infix operators) to generate introspection metadata for.\n\nThis list will accept any boolean-returning function taking two concrete scalar types as arguments.\n\nThe default includes comparisons for various build-in types as well as those of PostGIS.", + "default": [ + "box_above", + "box_below", + "box_contain", + "box_contain_pt", + "box_contained", + "box_left", + "box_overabove", + "box_overbelow", + "box_overlap", + "box_overleft", + "box_overright", + "box_right", + "box_same", + "circle_above", + "circle_below", + "circle_contain", + "circle_contain_pt", + "circle_contained", + "circle_left", + "circle_overabove", + "circle_overbelow", + "circle_overlap", + "circle_overleft", + "circle_overright", + "circle_right", + "circle_same", + "contains_2d", + "equals", + "geography_overlaps", + "geometry_above", + "geometry_below", + "geometry_contained_3d", + "geometry_contains", + "geometry_contains_3d", + "geometry_contains_nd", + "geometry_left", + "geometry_overabove", + "geometry_overbelow", + "geometry_overlaps", + "geometry_overlaps_3d", + "geometry_overlaps_nd", + "geometry_overleft", + "geometry_overright", + "geometry_right", + "geometry_same", + "geometry_same_3d", + "geometry_same_nd", + "geometry_within", + "geometry_within_nd", + "inet_same_family", + "inter_lb", + "inter_sb", + "inter_sl", + "is_contained_2d", + "ishorizontal", + "isparallel", + "isperp", + "isvertical", + "jsonb_contained", + "jsonb_contains", + "jsonb_exists", + "jsonb_path_exists_opr", + "jsonb_path_match_opr", + "line_intersect", + "line_parallel", + "line_perp", + "lseg_intersect", + "lseg_parallel", + "lseg_perp", + "network_overlap", + "network_sub", + "network_subeq", + "network_sup", + "network_supeq", + "on_pb", + "on_pl", + "on_ppath", + "on_ps", + "on_sb", + "on_sl", + "overlaps_2d", + "path_contain_pt", + "path_inter", + "point_above", + "point_below", + "point_horiz", + "point_left", + "point_right", + "point_vert", + "poly_above", + "poly_below", + "poly_contain", + "poly_contain_pt", + "poly_contained", + "poly_left", + "poly_overabove", + "poly_overbelow", + "poly_overlap", + "poly_overleft", + "poly_overright", + "poly_right", + "poly_same", + "pt_contained_poly", + "st_3dintersects", + "st_contains", + "st_containsproperly", + "st_coveredby", + "st_covers", + "st_crosses", + "st_disjoint", + "st_equals", + "st_intersects", + "st_isvalid", + "st_orderingequals", + "st_overlaps", + "st_relatematch", + "st_touches", + "st_within", + "starts_with", + "ts_match_qv", + "ts_match_tq", + "ts_match_tt", + "ts_match_vq", + "tsq_mcontained", + "tsq_mcontains", + "xmlexists", + "xmlvalidate", + "xpath_exists" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "typeRepresentations": { + "description": "The type representations to pick for base scalar types.", + "default": { + "bit": "string", + "bool": "boolean", + "bpchar": "string", + "char": "string", + "date": "date", + "float4": "float32", + "float8": "float64", + "int2": "int16", + "int4": "int32", + "int8": "int64AsString", + "numeric": "bigDecimalAsString", + "text": "string", + "time": "time", + "timestamp": "timestamp", + "timestamptz": "timestamptz", + "timetz": "timetz", + "uuid": "uUID", + "varchar": "string" + }, + "allOf": [ + { + "$ref": "#/definitions/TypeRepresentations" + } + ] + } + } + }, + "ComparisonOperatorMapping": { + "description": "Define the names that comparison operators will be exposed as by the automatic introspection.", + "type": "object", + "required": [ + "exposedName", + "operatorKind", + "operatorName" + ], + "properties": { + "operatorName": { + "description": "The name of the operator as defined by the database", + "type": "string" + }, + "exposedName": { + "description": "The name the operator will appear under in the exposed API", + "type": "string" + }, + "operatorKind": { + "description": "Equal, In or Custom.", + "allOf": [ + { + "$ref": "#/definitions/OperatorKind" + } + ] + } + } + }, + "TypeRepresentations": { + "description": "The type representations that guide introspection.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/TypeRepresentation" + } + }, + "MutationsVersion": { + "description": "Which version of the generated mutations will be included in the schema", + "type": "string", + "enum": [ + "v1", + "v2" + ] + } + } +} diff --git a/hasura/support/connector/atlas/.configuration_metadata b/hasura/industry/aml/app/connector/sanctions/.configuration_metadata similarity index 100% rename from hasura/support/connector/atlas/.configuration_metadata rename to hasura/industry/aml/app/connector/sanctions/.configuration_metadata diff --git a/hasura/support/connector/atlas/.ddnignore b/hasura/industry/aml/app/connector/sanctions/.ddnignore similarity index 100% rename from hasura/support/connector/atlas/.ddnignore rename to hasura/industry/aml/app/connector/sanctions/.ddnignore diff --git a/hasura/industry/aml/app/connector/sanctions/.hasura-connector/Dockerfile.sanctions b/hasura/industry/aml/app/connector/sanctions/.hasura-connector/Dockerfile.sanctions new file mode 100644 index 0000000..5368f73 --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/.hasura-connector/Dockerfile.sanctions @@ -0,0 +1,2 @@ +FROM ghcr.io/hasura/ndc-mongodb:v1.6.0 +COPY ./ /etc/connector \ No newline at end of file diff --git a/hasura/industry/aml/app/connector/sanctions/.hasura-connector/connector-metadata.yaml b/hasura/industry/aml/app/connector/sanctions/.hasura-connector/connector-metadata.yaml new file mode 100644 index 0000000..dcec922 --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/.hasura-connector/connector-metadata.yaml @@ -0,0 +1,17 @@ +packagingDefinition: + type: PrebuiltDockerImage + dockerImage: ghcr.io/hasura/ndc-mongodb:v1.6.0 +supportedEnvironmentVariables: + - name: MONGODB_DATABASE_URI + description: The URI for the MongoDB database +commands: + update: hasura-ndc-mongodb update +cliPlugin: + type: null + name: ndc-mongodb + version: v1.6.0 +dockerComposeWatch: + - path: ./ + action: sync+restart + target: /etc/connector +documentationPage: https://hasura.info/mongodb-getting-started diff --git a/hasura/support/connector/atlas/configuration.json b/hasura/industry/aml/app/connector/sanctions/configuration.json similarity index 100% rename from hasura/support/connector/atlas/configuration.json rename to hasura/industry/aml/app/connector/sanctions/configuration.json diff --git a/hasura/industry/aml/app/connector/sanctions/connector.yaml b/hasura/industry/aml/app/connector/sanctions/connector.yaml new file mode 100644 index 0000000..dc4962f --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/connector.yaml @@ -0,0 +1,16 @@ +kind: Connector +version: v2 +definition: + name: sanctions + subgraph: app + source: hasura/mongodb:v1.6.0 + context: . + envMapping: + HASURA_SERVICE_TOKEN_SECRET: + fromEnv: APP_SANCTIONS_HASURA_SERVICE_TOKEN_SECRET + MONGODB_DATABASE_URI: + fromEnv: APP_SANCTIONS_MONGODB_DATABASE_URI + OTEL_EXPORTER_OTLP_ENDPOINT: + fromEnv: APP_SANCTIONS_OTEL_EXPORTER_OTLP_ENDPOINT + OTEL_SERVICE_NAME: + fromEnv: APP_SANCTIONS_OTEL_SERVICE_NAME diff --git a/hasura/industry/aml/app/connector/sanctions/schema/accounts.json b/hasura/industry/aml/app/connector/sanctions/schema/accounts.json new file mode 100644 index 0000000..03d0dc8 --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/schema/accounts.json @@ -0,0 +1,97 @@ +{ + "name": "accounts", + "collections": { + "accounts": { + "type": "accounts" + } + }, + "objectTypes": { + "accounts": { + "fields": { + "_id": { + "type": { + "scalar": "int" + } + }, + "contact_information": { + "type": { + "nullable": { + "object": "accounts_contact_information" + } + } + }, + "entity_type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "name": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "risk": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "transaction-limits": { + "type": { + "nullable": { + "object": "accounts_transaction-limits" + } + } + } + } + }, + "accounts_contact_information": { + "fields": { + "address": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "email": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "phone_number": { + "type": { + "nullable": { + "scalar": "string" + } + } + } + } + }, + "accounts_transaction-limits": { + "fields": { + "max-num-transactions": { + "type": { + "nullable": { + "scalar": "int" + } + } + }, + "max-transaction-limit": { + "type": { + "nullable": { + "scalar": "int" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/hasura/industry/aml/app/connector/sanctions/schema/sanctioned.json b/hasura/industry/aml/app/connector/sanctions/schema/sanctioned.json new file mode 100644 index 0000000..ae8fb4e --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/schema/sanctioned.json @@ -0,0 +1,70 @@ +{ + "name": "sanctioned", + "collections": { + "sanctioned": { + "type": "sanctioned" + } + }, + "objectTypes": { + "sanctioned": { + "fields": { + "List_type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "_id": { + "type": { + "scalar": "int" + } + }, + "address": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "entity_name": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "entity_type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "identifications": { + "type": { + "nullable": { + "arrayOf": { + "scalar": "string" + } + } + } + }, + "listed_date": { + "type": { + "nullable": { + "scalar": "date" + } + } + }, + "program": { + "type": { + "nullable": { + "scalar": "string" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/hasura/industry/aml/app/connector/sanctions/schema/sanctioned_list.json b/hasura/industry/aml/app/connector/sanctions/schema/sanctioned_list.json new file mode 100644 index 0000000..2d5e168 --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/schema/sanctioned_list.json @@ -0,0 +1,92 @@ +{ + "name": "sanctioned_list", + "collections": { + "sanctioned_list": { + "type": "sanctioned_list" + } + }, + "objectTypes": { + "sanctioned_list": { + "fields": { + " Call Sign": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + " Country": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + " Gross Registered Tonnage": { + "type": "extendedJSON" + }, + " Identifications": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + " Title": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + " Vessel Owner": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + " Vessel Type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "Name": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "Tonnage": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "Type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "Vessel Flag": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "_id": { + "type": { + "scalar": "int" + } + } + } + } + } +} \ No newline at end of file diff --git a/hasura/industry/aml/app/connector/sanctions/schema/transactions.json b/hasura/industry/aml/app/connector/sanctions/schema/transactions.json new file mode 100644 index 0000000..6f3dbee --- /dev/null +++ b/hasura/industry/aml/app/connector/sanctions/schema/transactions.json @@ -0,0 +1,128 @@ +{ + "name": "transactions", + "collections": { + "transactions": { + "type": "transactions" + } + }, + "objectTypes": { + "transactions": { + "fields": { + "AML_text": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "AML_vectors": { + "type": { + "nullable": { + "arrayOf": { + "scalar": "double" + } + } + } + }, + "_id": { + "type": { + "scalar": "objectId" + } + }, + "aml": { + "type": { + "nullable": { + "scalar": "int" + } + } + }, + "beneficiary_id": { + "type": { + "nullable": { + "scalar": "int" + } + } + }, + "beneficiary_type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "fraud": { + "type": { + "nullable": { + "scalar": "int" + } + } + }, + "fraud_text": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "fraud_vectors": { + "type": { + "nullable": { + "arrayOf": { + "scalar": "double" + } + } + } + }, + "originator_id": { + "type": { + "nullable": { + "scalar": "int" + } + } + }, + "originator_type": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "reported_beneficiary_address": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "reported_originator_address": { + "type": { + "nullable": { + "scalar": "string" + } + } + }, + "sanctioned": { + "type": { + "nullable": { + "scalar": "int" + } + } + }, + "transaction_amount": { + "type": { + "nullable": { + "scalar": "double" + } + } + }, + "transaction_date": { + "type": { + "nullable": { + "scalar": "date" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/hasura/industry/aml/app/metadata/.keep b/hasura/industry/aml/app/metadata/.keep new file mode 100644 index 0000000..e69de29 diff --git a/hasura/industry/aml/app/metadata/Accounts.hml b/hasura/industry/aml/app/metadata/Accounts.hml new file mode 100644 index 0000000..56edece --- /dev/null +++ b/hasura/industry/aml/app/metadata/Accounts.hml @@ -0,0 +1,369 @@ +--- +kind: ObjectType +version: v1 +definition: + name: AccountsContactInformation + fields: + - name: address + type: String + - name: email + type: String + - name: phoneNumber + type: String + graphql: + typeName: AccountsContactInformation + inputTypeName: AccountsContactInformationInput + dataConnectorTypeMapping: + - dataConnectorName: sanctions + dataConnectorObjectType: accounts_contact_information + fieldMapping: + address: + column: + name: address + email: + column: + name: email + phoneNumber: + column: + name: phone_number + +--- +kind: TypePermissions +version: v1 +definition: + typeName: AccountsContactInformation + permissions: + - role: admin + output: + allowedFields: + - address + - email + - phoneNumber + +--- +kind: ObjectType +version: v1 +definition: + name: AccountsTransactionLimits + fields: + - name: maxNumTransactions + type: Int + - name: maxTransactionLimit + type: Int + graphql: + typeName: AccountsTransactionLimits + inputTypeName: AccountsTransactionLimitsInput + dataConnectorTypeMapping: + - dataConnectorName: sanctions + dataConnectorObjectType: accounts_transaction-limits + fieldMapping: + maxNumTransactions: + column: + name: max-num-transactions + maxTransactionLimit: + column: + name: max-transaction-limit + +--- +kind: TypePermissions +version: v1 +definition: + typeName: AccountsTransactionLimits + permissions: + - role: admin + output: + allowedFields: + - maxNumTransactions + - maxTransactionLimit + +--- +kind: ObjectType +version: v1 +definition: + name: Accounts + fields: + - name: id + type: Int! + - name: contactInformation + type: AccountsContactInformation + - name: entityType + type: String + - name: name + type: String + - name: risk + type: String + - name: transactionLimits + type: AccountsTransactionLimits + graphql: + typeName: Accounts + inputTypeName: AccountsInput + dataConnectorTypeMapping: + - dataConnectorName: sanctions + dataConnectorObjectType: accounts + fieldMapping: + id: + column: + name: _id + contactInformation: + column: + name: contact_information + entityType: + column: + name: entity_type + name: + column: + name: name + risk: + column: + name: risk + transactionLimits: + column: + name: transaction-limits + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Accounts + permissions: + - role: admin + output: + allowedFields: + - id + - contactInformation + - entityType + - name + - risk + - transactionLimits + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: AccountsContactInformationBoolExp + operand: + object: + type: AccountsContactInformation + comparableFields: + - fieldName: address + booleanExpressionType: StringBoolExp + - fieldName: email + booleanExpressionType: StringBoolExp + - fieldName: phoneNumber + booleanExpressionType: StringBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: AccountsContactInformationBoolExp + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: AccountsTransactionLimitsBoolExp + operand: + object: + type: AccountsTransactionLimits + comparableFields: + - fieldName: maxNumTransactions + booleanExpressionType: IntBoolExp + - fieldName: maxTransactionLimit + booleanExpressionType: IntBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: AccountsTransactionLimitsBoolExp + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: AccountsBoolExp + operand: + object: + type: Accounts + comparableFields: + - fieldName: id + booleanExpressionType: IntBoolExp + - fieldName: contactInformation + booleanExpressionType: AccountsContactInformationBoolExp + - fieldName: entityType + booleanExpressionType: StringBoolExp + - fieldName: name + booleanExpressionType: StringBoolExp + - fieldName: risk + booleanExpressionType: StringBoolExp + - fieldName: transactionLimits + booleanExpressionType: AccountsTransactionLimitsBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: AccountsBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: AccountsAggExp + operand: + object: + aggregatedType: Accounts + aggregatableFields: + - fieldName: id + aggregateExpression: IntAggExp + - fieldName: entityType + aggregateExpression: StringAggExp + - fieldName: name + aggregateExpression: StringAggExp + - fieldName: risk + aggregateExpression: StringAggExp + count: + enable: true + graphql: + selectTypeName: AccountsAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: AccountsContactInformationOrderByExp + operand: + object: + orderedType: AccountsContactInformation + orderableFields: + - fieldName: address + orderByExpression: StringOrderByExp + - fieldName: email + orderByExpression: StringOrderByExp + - fieldName: phoneNumber + orderByExpression: StringOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: AccountsContactInformationOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: AccountsTransactionLimitsOrderByExp + operand: + object: + orderedType: AccountsTransactionLimits + orderableFields: + - fieldName: maxNumTransactions + orderByExpression: IntOrderByExp + - fieldName: maxTransactionLimit + orderByExpression: IntOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: AccountsTransactionLimitsOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: AccountsOrderByExp + operand: + object: + orderedType: Accounts + orderableFields: + - fieldName: id + orderByExpression: IntOrderByExp + - fieldName: contactInformation + orderByExpression: AccountsContactInformationOrderByExp + - fieldName: entityType + orderByExpression: StringOrderByExp + - fieldName: name + orderByExpression: StringOrderByExp + - fieldName: risk + orderByExpression: StringOrderByExp + - fieldName: transactionLimits + orderByExpression: AccountsTransactionLimitsOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: AccountsOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Accounts + objectType: Accounts + source: + dataConnectorName: sanctions + collection: accounts + filterExpressionType: AccountsBoolExp + aggregateExpression: AccountsAggExp + orderByExpression: AccountsOrderByExp + graphql: + selectMany: + queryRootField: accounts + subscription: + rootField: accounts + selectUniques: + - queryRootField: accountsById + uniqueIdentifier: + - id + subscription: + rootField: accountsById + filterInputTypeName: AccountsFilterInput + aggregate: + queryRootField: accountsAggregate + subscription: + rootField: accountsAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Accounts + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: beneficiaryTransactions + sourceType: Accounts + target: + model: + name: Transactions + relationshipType: Array + mapping: + - source: + fieldPath: + - fieldName: id + target: + modelField: + - fieldName: beneficiaryId + +--- +kind: Relationship +version: v1 +definition: + name: originatorTransactions + sourceType: Accounts + target: + model: + name: Transactions + relationshipType: Array + mapping: + - source: + fieldPath: + - fieldName: id + target: + modelField: + - fieldName: originatorId \ No newline at end of file diff --git a/hasura/industry/aml/app/metadata/Customers.hml b/hasura/industry/aml/app/metadata/Customers.hml new file mode 100644 index 0000000..5130b93 --- /dev/null +++ b/hasura/industry/aml/app/metadata/Customers.hml @@ -0,0 +1,262 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Customers + fields: + - name: account + type: Int8! + - name: blacklisted + type: Bool + - name: customerId + type: Int8! + - name: dob + type: Date_1! + - name: name + type: Varchar! + - name: nationality + type: Varchar + - name: pepStatus + type: Bool + - name: riskLevel + type: Varchar + graphql: + typeName: Customers + inputTypeName: CustomersInput + dataConnectorTypeMapping: + - dataConnectorName: aml + dataConnectorObjectType: customers + fieldMapping: + account: + column: + name: account + blacklisted: + column: + name: blacklisted + customerId: + column: + name: customer_id + dob: + column: + name: dob + name: + column: + name: name + nationality: + column: + name: nationality + pepStatus: + column: + name: pep_status + riskLevel: + column: + name: risk_level + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Customers + permissions: + - role: admin + output: + allowedFields: + - account + - blacklisted + - customerId + - dob + - name + - nationality + - pepStatus + - riskLevel + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: CustomersBoolExp + operand: + object: + type: Customers + comparableFields: + - fieldName: account + booleanExpressionType: Int8BoolExp + - fieldName: blacklisted + booleanExpressionType: BoolBoolExp + - fieldName: customerId + booleanExpressionType: Int8BoolExp + - fieldName: dob + booleanExpressionType: DateBoolExp_1 + - fieldName: name + booleanExpressionType: VarcharBoolExp + - fieldName: nationality + booleanExpressionType: VarcharBoolExp + - fieldName: pepStatus + booleanExpressionType: BoolBoolExp + - fieldName: riskLevel + booleanExpressionType: VarcharBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: CustomersBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: CustomersAggExp + operand: + object: + aggregatedType: Customers + aggregatableFields: + - fieldName: account + aggregateExpression: Int8AggExp + - fieldName: blacklisted + aggregateExpression: BoolAggExp + - fieldName: customerId + aggregateExpression: Int8AggExp + - fieldName: dob + aggregateExpression: DateAggExp_1 + - fieldName: name + aggregateExpression: VarcharAggExp + - fieldName: nationality + aggregateExpression: VarcharAggExp + - fieldName: pepStatus + aggregateExpression: BoolAggExp + - fieldName: riskLevel + aggregateExpression: VarcharAggExp + count: + enable: true + graphql: + selectTypeName: CustomersAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: CustomersOrderByExp + operand: + object: + orderedType: Customers + orderableFields: + - fieldName: account + orderByExpression: Int8OrderByExp + - fieldName: blacklisted + orderByExpression: BoolOrderByExp + - fieldName: customerId + orderByExpression: Int8OrderByExp + - fieldName: dob + orderByExpression: Date1OrderByExp + - fieldName: name + orderByExpression: VarcharOrderByExp + - fieldName: nationality + orderByExpression: VarcharOrderByExp + - fieldName: pepStatus + orderByExpression: BoolOrderByExp + - fieldName: riskLevel + orderByExpression: VarcharOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: CustomersOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Customers + objectType: Customers + source: + dataConnectorName: aml + collection: customers + filterExpressionType: CustomersBoolExp + aggregateExpression: CustomersAggExp + orderByExpression: CustomersOrderByExp + graphql: + selectMany: + queryRootField: customers + subscription: + rootField: customers + selectUniques: + - queryRootField: customersByAccount + uniqueIdentifier: + - account + subscription: + rootField: customersByAccount + - queryRootField: customersByCustomerId + uniqueIdentifier: + - customerId + subscription: + rootField: customersByCustomerId + filterInputTypeName: CustomersFilterInput + aggregate: + queryRootField: customersAggregate + subscription: + rootField: customersAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Customers + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: sendingSamlMatches + sourceType: Customers + target: + model: + name: SamlD + relationshipType: Array + mapping: + - source: + fieldPath: + - fieldName: account + target: + modelField: + - fieldName: senderAccount + +--- +kind: Relationship +version: v1 +definition: + name: receivingSamlMatches + sourceType: Customers + target: + model: + name: SamlD + relationshipType: Array + mapping: + - source: + fieldPath: + - fieldName: account + target: + modelField: + - fieldName: receiverAccount + +--- +kind: Relationship +version: v1 +definition: + name: sars + sourceType: Customers + target: + model: + name: Sars + relationshipType: Array + mapping: + - source: + fieldPath: + - fieldName: customerId + target: + modelField: + - fieldName: customerId \ No newline at end of file diff --git a/hasura/industry/aml/app/metadata/SamlD.hml b/hasura/industry/aml/app/metadata/SamlD.hml new file mode 100644 index 0000000..e459586 --- /dev/null +++ b/hasura/industry/aml/app/metadata/SamlD.hml @@ -0,0 +1,301 @@ +--- +kind: ObjectType +version: v1 +definition: + name: SamlD + fields: + - name: amount + type: Numeric + - name: date + type: Date_1 + - name: isLaundering + type: Bool + - name: launderingType + type: Varchar + - name: paymentCurrency + type: Varchar + - name: paymentType + type: Varchar + - name: receivedCurrency + type: Varchar + - name: receiverAccount + type: Int8 + - name: receiverBankLocation + type: Varchar + - name: senderAccount + type: Int8 + - name: senderBankLocation + type: Varchar + - name: time + type: Time + graphql: + typeName: SamlD + inputTypeName: SamlDInput + dataConnectorTypeMapping: + - dataConnectorName: aml + dataConnectorObjectType: saml_d + fieldMapping: + amount: + column: + name: amount + date: + column: + name: date + isLaundering: + column: + name: is_laundering + launderingType: + column: + name: laundering_type + paymentCurrency: + column: + name: payment_currency + paymentType: + column: + name: payment_type + receivedCurrency: + column: + name: received_currency + receiverAccount: + column: + name: receiver_account + receiverBankLocation: + column: + name: receiver_bank_location + senderAccount: + column: + name: sender_account + senderBankLocation: + column: + name: sender_bank_location + time: + column: + name: time + +--- +kind: TypePermissions +version: v1 +definition: + typeName: SamlD + permissions: + - role: admin + output: + allowedFields: + - amount + - date + - isLaundering + - launderingType + - paymentCurrency + - paymentType + - receivedCurrency + - receiverAccount + - receiverBankLocation + - senderAccount + - senderBankLocation + - time + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: SamlDBoolExp + operand: + object: + type: SamlD + comparableFields: + - fieldName: amount + booleanExpressionType: NumericBoolExp + - fieldName: date + booleanExpressionType: DateBoolExp_1 + - fieldName: isLaundering + booleanExpressionType: BoolBoolExp + - fieldName: launderingType + booleanExpressionType: VarcharBoolExp + - fieldName: paymentCurrency + booleanExpressionType: VarcharBoolExp + - fieldName: paymentType + booleanExpressionType: VarcharBoolExp + - fieldName: receivedCurrency + booleanExpressionType: VarcharBoolExp + - fieldName: receiverAccount + booleanExpressionType: Int8BoolExp + - fieldName: receiverBankLocation + booleanExpressionType: VarcharBoolExp + - fieldName: senderAccount + booleanExpressionType: Int8BoolExp + - fieldName: senderBankLocation + booleanExpressionType: VarcharBoolExp + - fieldName: time + booleanExpressionType: TimeBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: SamlDBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: SamlDAggExp + operand: + object: + aggregatedType: SamlD + aggregatableFields: + - fieldName: amount + aggregateExpression: NumericAggExp + - fieldName: date + aggregateExpression: DateAggExp_1 + - fieldName: isLaundering + aggregateExpression: BoolAggExp + - fieldName: launderingType + aggregateExpression: VarcharAggExp + - fieldName: paymentCurrency + aggregateExpression: VarcharAggExp + - fieldName: paymentType + aggregateExpression: VarcharAggExp + - fieldName: receivedCurrency + aggregateExpression: VarcharAggExp + - fieldName: receiverAccount + aggregateExpression: Int8AggExp + - fieldName: receiverBankLocation + aggregateExpression: VarcharAggExp + - fieldName: senderAccount + aggregateExpression: Int8AggExp + - fieldName: senderBankLocation + aggregateExpression: VarcharAggExp + - fieldName: time + aggregateExpression: TimeAggExp + count: + enable: true + graphql: + selectTypeName: SamlDAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: SamlDOrderByExp + operand: + object: + orderedType: SamlD + orderableFields: + - fieldName: amount + orderByExpression: NumericOrderByExp + - fieldName: date + orderByExpression: Date1OrderByExp + - fieldName: isLaundering + orderByExpression: BoolOrderByExp + - fieldName: launderingType + orderByExpression: VarcharOrderByExp + - fieldName: paymentCurrency + orderByExpression: VarcharOrderByExp + - fieldName: paymentType + orderByExpression: VarcharOrderByExp + - fieldName: receivedCurrency + orderByExpression: VarcharOrderByExp + - fieldName: receiverAccount + orderByExpression: Int8OrderByExp + - fieldName: receiverBankLocation + orderByExpression: VarcharOrderByExp + - fieldName: senderAccount + orderByExpression: Int8OrderByExp + - fieldName: senderBankLocation + orderByExpression: VarcharOrderByExp + - fieldName: time + orderByExpression: TimeOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: SamlDOrderByExp + +--- +kind: Model +version: v2 +definition: + name: SamlD + objectType: SamlD + source: + dataConnectorName: aml + collection: saml_d + filterExpressionType: SamlDBoolExp + aggregateExpression: SamlDAggExp + orderByExpression: SamlDOrderByExp + graphql: + selectMany: + queryRootField: samlD + subscription: + rootField: samlD + selectUniques: [] + filterInputTypeName: SamlDFilterInput + aggregate: + queryRootField: samlDAggregate + subscription: + rootField: samlDAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: SamlD + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: sanctionedAccounts + sourceType: SamlD + target: + model: + name: Accounts + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: senderAccount + target: + modelField: + - fieldName: id + +--- +kind: Relationship +version: v1 +definition: + name: sendingCustomer + sourceType: SamlD + target: + model: + name: Customers + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: senderAccount + target: + modelField: + - fieldName: account + +--- +kind: Relationship +version: v1 +definition: + name: receivingCustomer + sourceType: SamlD + target: + model: + name: Customers + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: receiverAccount + target: + modelField: + - fieldName: account + diff --git a/hasura/industry/aml/app/metadata/Sanctioned.hml b/hasura/industry/aml/app/metadata/Sanctioned.hml new file mode 100644 index 0000000..e2eb54c --- /dev/null +++ b/hasura/industry/aml/app/metadata/Sanctioned.hml @@ -0,0 +1,198 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Sanctioned + fields: + - name: id + type: Int! + - name: listType + type: String + - name: address + type: String + - name: entityName + type: String + - name: entityType + type: String + - name: identifications + type: "[String!]" + - name: listedDate + type: Date + - name: program + type: String + graphql: + typeName: Sanctioned + inputTypeName: SanctionedInput + dataConnectorTypeMapping: + - dataConnectorName: sanctions + dataConnectorObjectType: sanctioned + fieldMapping: + id: + column: + name: _id + listType: + column: + name: List_type + address: + column: + name: address + entityName: + column: + name: entity_name + entityType: + column: + name: entity_type + identifications: + column: + name: identifications + listedDate: + column: + name: listed_date + program: + column: + name: program + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Sanctioned + permissions: + - role: admin + output: + allowedFields: + - id + - listType + - address + - entityName + - entityType + - identifications + - listedDate + - program + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: SanctionedBoolExp + operand: + object: + type: Sanctioned + comparableFields: + - fieldName: id + booleanExpressionType: IntBoolExp + - fieldName: listType + booleanExpressionType: StringBoolExp + - fieldName: address + booleanExpressionType: StringBoolExp + - fieldName: entityName + booleanExpressionType: StringBoolExp + - fieldName: entityType + booleanExpressionType: StringBoolExp + - fieldName: listedDate + booleanExpressionType: DateBoolExp + - fieldName: program + booleanExpressionType: StringBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: SanctionedBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: SanctionedAggExp + operand: + object: + aggregatedType: Sanctioned + aggregatableFields: + - fieldName: id + aggregateExpression: IntAggExp + - fieldName: listType + aggregateExpression: StringAggExp + - fieldName: address + aggregateExpression: StringAggExp + - fieldName: entityName + aggregateExpression: StringAggExp + - fieldName: entityType + aggregateExpression: StringAggExp + - fieldName: listedDate + aggregateExpression: DateAggExp + - fieldName: program + aggregateExpression: StringAggExp + count: + enable: true + graphql: + selectTypeName: SanctionedAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: SanctionedOrderByExp + operand: + object: + orderedType: Sanctioned + orderableFields: + - fieldName: id + orderByExpression: IntOrderByExp + - fieldName: listType + orderByExpression: StringOrderByExp + - fieldName: address + orderByExpression: StringOrderByExp + - fieldName: entityName + orderByExpression: StringOrderByExp + - fieldName: entityType + orderByExpression: StringOrderByExp + - fieldName: listedDate + orderByExpression: DateOrderByExp + - fieldName: program + orderByExpression: StringOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: SanctionedOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Sanctioned + objectType: Sanctioned + source: + dataConnectorName: sanctions + collection: sanctioned + filterExpressionType: SanctionedBoolExp + aggregateExpression: SanctionedAggExp + orderByExpression: SanctionedOrderByExp + graphql: + selectMany: + queryRootField: sanctioned + subscription: + rootField: sanctioned + selectUniques: + - queryRootField: sanctionedById + uniqueIdentifier: + - id + subscription: + rootField: sanctionedById + filterInputTypeName: SanctionedFilterInput + aggregate: + queryRootField: sanctionedAggregate + subscription: + rootField: sanctionedAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Sanctioned + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + diff --git a/hasura/industry/aml/app/metadata/SanctionedList.hml b/hasura/industry/aml/app/metadata/SanctionedList.hml new file mode 100644 index 0000000..7cd70f5 --- /dev/null +++ b/hasura/industry/aml/app/metadata/SanctionedList.hml @@ -0,0 +1,252 @@ +--- +kind: ObjectType +version: v1 +definition: + name: SanctionedList + fields: + - name: callSign + type: String + - name: country + type: String + - name: grossRegisteredTonnage + type: ExtendedJson + - name: identifications + type: String + - name: title + type: String + - name: vesselOwner + type: String + - name: vesselType + type: String + - name: id + type: Int! + - name: name + type: String + - name: tonnage + type: String + - name: type + type: String + - name: vesselFlag + type: String + graphql: + typeName: SanctionedList + inputTypeName: SanctionedListInput + dataConnectorTypeMapping: + - dataConnectorName: sanctions + dataConnectorObjectType: sanctioned_list + fieldMapping: + callSign: + column: + name: " Call Sign" + country: + column: + name: " Country" + grossRegisteredTonnage: + column: + name: " Gross Registered Tonnage" + identifications: + column: + name: " Identifications" + title: + column: + name: " Title" + vesselOwner: + column: + name: " Vessel Owner" + vesselType: + column: + name: " Vessel Type" + id: + column: + name: _id + name: + column: + name: Name + tonnage: + column: + name: Tonnage + type: + column: + name: Type + vesselFlag: + column: + name: Vessel Flag + +--- +kind: TypePermissions +version: v1 +definition: + typeName: SanctionedList + permissions: + - role: admin + output: + allowedFields: + - callSign + - country + - grossRegisteredTonnage + - identifications + - title + - vesselOwner + - vesselType + - id + - name + - tonnage + - type + - vesselFlag + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: SanctionedListBoolExp + operand: + object: + type: SanctionedList + comparableFields: + - fieldName: callSign + booleanExpressionType: StringBoolExp + - fieldName: country + booleanExpressionType: StringBoolExp + - fieldName: grossRegisteredTonnage + booleanExpressionType: ExtendedJsonBoolExp + - fieldName: identifications + booleanExpressionType: StringBoolExp + - fieldName: title + booleanExpressionType: StringBoolExp + - fieldName: vesselOwner + booleanExpressionType: StringBoolExp + - fieldName: vesselType + booleanExpressionType: StringBoolExp + - fieldName: id + booleanExpressionType: IntBoolExp + - fieldName: name + booleanExpressionType: StringBoolExp + - fieldName: tonnage + booleanExpressionType: StringBoolExp + - fieldName: type + booleanExpressionType: StringBoolExp + - fieldName: vesselFlag + booleanExpressionType: StringBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: SanctionedListBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: SanctionedListAggExp + operand: + object: + aggregatedType: SanctionedList + aggregatableFields: + - fieldName: callSign + aggregateExpression: StringAggExp + - fieldName: country + aggregateExpression: StringAggExp + - fieldName: grossRegisteredTonnage + aggregateExpression: ExtendedJsonAggExp + - fieldName: identifications + aggregateExpression: StringAggExp + - fieldName: title + aggregateExpression: StringAggExp + - fieldName: vesselOwner + aggregateExpression: StringAggExp + - fieldName: vesselType + aggregateExpression: StringAggExp + - fieldName: id + aggregateExpression: IntAggExp + - fieldName: name + aggregateExpression: StringAggExp + - fieldName: tonnage + aggregateExpression: StringAggExp + - fieldName: type + aggregateExpression: StringAggExp + - fieldName: vesselFlag + aggregateExpression: StringAggExp + count: + enable: true + graphql: + selectTypeName: SanctionedListAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: SanctionedListOrderByExp + operand: + object: + orderedType: SanctionedList + orderableFields: + - fieldName: callSign + orderByExpression: StringOrderByExp + - fieldName: country + orderByExpression: StringOrderByExp + - fieldName: grossRegisteredTonnage + orderByExpression: ExtendedJsonOrderByExp + - fieldName: identifications + orderByExpression: StringOrderByExp + - fieldName: title + orderByExpression: StringOrderByExp + - fieldName: vesselOwner + orderByExpression: StringOrderByExp + - fieldName: vesselType + orderByExpression: StringOrderByExp + - fieldName: id + orderByExpression: IntOrderByExp + - fieldName: name + orderByExpression: StringOrderByExp + - fieldName: tonnage + orderByExpression: StringOrderByExp + - fieldName: type + orderByExpression: StringOrderByExp + - fieldName: vesselFlag + orderByExpression: StringOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: SanctionedListOrderByExp + +--- +kind: Model +version: v2 +definition: + name: SanctionedList + objectType: SanctionedList + source: + dataConnectorName: sanctions + collection: sanctioned_list + filterExpressionType: SanctionedListBoolExp + aggregateExpression: SanctionedListAggExp + orderByExpression: SanctionedListOrderByExp + graphql: + selectMany: + queryRootField: sanctionedList + subscription: + rootField: sanctionedList + selectUniques: + - queryRootField: sanctionedListById + uniqueIdentifier: + - id + subscription: + rootField: sanctionedListById + filterInputTypeName: SanctionedListFilterInput + aggregate: + queryRootField: sanctionedListAggregate + subscription: + rootField: sanctionedListAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: SanctionedList + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + diff --git a/hasura/industry/aml/app/metadata/Sars.hml b/hasura/industry/aml/app/metadata/Sars.hml new file mode 100644 index 0000000..2312b17 --- /dev/null +++ b/hasura/industry/aml/app/metadata/Sars.hml @@ -0,0 +1,197 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Sars + fields: + - name: customerId + type: Int8 + - name: filedDate + type: Timestamp + - name: reason + type: Text! + - name: sarId + type: Int8! + - name: status + type: Varchar + - name: transactionId + type: Int8! + graphql: + typeName: Sars + inputTypeName: SarsInput + dataConnectorTypeMapping: + - dataConnectorName: aml + dataConnectorObjectType: sars + fieldMapping: + customerId: + column: + name: customer_id + filedDate: + column: + name: filed_date + reason: + column: + name: reason + sarId: + column: + name: sar_id + status: + column: + name: status + transactionId: + column: + name: transaction_id + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Sars + permissions: + - role: admin + output: + allowedFields: + - customerId + - filedDate + - reason + - sarId + - status + - transactionId + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: SarsBoolExp + operand: + object: + type: Sars + comparableFields: + - fieldName: customerId + booleanExpressionType: Int8BoolExp + - fieldName: filedDate + booleanExpressionType: TimestampBoolExp + - fieldName: reason + booleanExpressionType: TextBoolExp + - fieldName: sarId + booleanExpressionType: Int8BoolExp + - fieldName: status + booleanExpressionType: VarcharBoolExp + - fieldName: transactionId + booleanExpressionType: Int8BoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: SarsBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: SarsAggExp + operand: + object: + aggregatedType: Sars + aggregatableFields: + - fieldName: customerId + aggregateExpression: Int8AggExp + - fieldName: filedDate + aggregateExpression: TimestampAggExp + - fieldName: reason + aggregateExpression: TextAggExp + - fieldName: sarId + aggregateExpression: Int8AggExp + - fieldName: status + aggregateExpression: VarcharAggExp + - fieldName: transactionId + aggregateExpression: Int8AggExp + count: + enable: true + graphql: + selectTypeName: SarsAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: SarsOrderByExp + operand: + object: + orderedType: Sars + orderableFields: + - fieldName: customerId + orderByExpression: Int8OrderByExp + - fieldName: filedDate + orderByExpression: TimestampOrderByExp + - fieldName: reason + orderByExpression: TextOrderByExp + - fieldName: sarId + orderByExpression: Int8OrderByExp + - fieldName: status + orderByExpression: VarcharOrderByExp + - fieldName: transactionId + orderByExpression: Int8OrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: SarsOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Sars + objectType: Sars + source: + dataConnectorName: aml + collection: sars + filterExpressionType: SarsBoolExp + aggregateExpression: SarsAggExp + orderByExpression: SarsOrderByExp + graphql: + selectMany: + queryRootField: sars + subscription: + rootField: sars + selectUniques: + - queryRootField: sarsBySarId + uniqueIdentifier: + - sarId + subscription: + rootField: sarsBySarId + filterInputTypeName: SarsFilterInput + aggregate: + queryRootField: sarsAggregate + subscription: + rootField: sarsAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Sars + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + +--- +kind: Relationship +version: v1 +definition: + name: customer + sourceType: Sars + target: + model: + name: Customers + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: customerId + target: + modelField: + - fieldName: customerId \ No newline at end of file diff --git a/hasura/industry/aml/app/metadata/Transactions.hml b/hasura/industry/aml/app/metadata/Transactions.hml new file mode 100644 index 0000000..e8aa116 --- /dev/null +++ b/hasura/industry/aml/app/metadata/Transactions.hml @@ -0,0 +1,324 @@ +--- +kind: ObjectType +version: v1 +definition: + name: Transactions + fields: + - name: id + type: ObjectId! + - name: amlText + type: String + - name: amlVectors + type: "[Double!]" + - name: aml + type: Int + - name: beneficiaryId + type: Int + - name: beneficiaryType + type: String + - name: fraud + type: Int + - name: fraudText + type: String + - name: fraudVectors + type: "[Double!]" + - name: originatorId + type: Int + - name: originatorType + type: String + - name: reportedBeneficiaryAddress + type: String + - name: reportedOriginatorAddress + type: String + - name: sanctioned + type: Int + - name: transactionAmount + type: Double + - name: transactionDate + type: Date + graphql: + typeName: Transactions + inputTypeName: TransactionsInput + dataConnectorTypeMapping: + - dataConnectorName: sanctions + dataConnectorObjectType: transactions + fieldMapping: + id: + column: + name: _id + amlText: + column: + name: AML_text + amlVectors: + column: + name: AML_vectors + aml: + column: + name: aml + beneficiaryId: + column: + name: beneficiary_id + beneficiaryType: + column: + name: beneficiary_type + fraud: + column: + name: fraud + fraudText: + column: + name: fraud_text + fraudVectors: + column: + name: fraud_vectors + originatorId: + column: + name: originator_id + originatorType: + column: + name: originator_type + reportedBeneficiaryAddress: + column: + name: reported_beneficiary_address + reportedOriginatorAddress: + column: + name: reported_originator_address + sanctioned: + column: + name: sanctioned + transactionAmount: + column: + name: transaction_amount + transactionDate: + column: + name: transaction_date + +--- +kind: TypePermissions +version: v1 +definition: + typeName: Transactions + permissions: + - role: admin + output: + allowedFields: + - id + - amlText + - amlVectors + - aml + - beneficiaryId + - beneficiaryType + - fraud + - fraudText + - fraudVectors + - originatorId + - originatorType + - reportedBeneficiaryAddress + - reportedOriginatorAddress + - sanctioned + - transactionAmount + - transactionDate + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TransactionsBoolExp + operand: + object: + type: Transactions + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdBoolExp + - fieldName: amlText + booleanExpressionType: StringBoolExp + - fieldName: aml + booleanExpressionType: IntBoolExp + - fieldName: beneficiaryId + booleanExpressionType: IntBoolExp + - fieldName: beneficiaryType + booleanExpressionType: StringBoolExp + - fieldName: fraud + booleanExpressionType: IntBoolExp + - fieldName: fraudText + booleanExpressionType: StringBoolExp + - fieldName: originatorId + booleanExpressionType: IntBoolExp + - fieldName: originatorType + booleanExpressionType: StringBoolExp + - fieldName: reportedBeneficiaryAddress + booleanExpressionType: StringBoolExp + - fieldName: reportedOriginatorAddress + booleanExpressionType: StringBoolExp + - fieldName: sanctioned + booleanExpressionType: IntBoolExp + - fieldName: transactionAmount + booleanExpressionType: DoubleBoolExp + - fieldName: transactionDate + booleanExpressionType: DateBoolExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TransactionsBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: TransactionsAggExp + operand: + object: + aggregatedType: Transactions + aggregatableFields: + - fieldName: id + aggregateExpression: ObjectIdAggExp + - fieldName: amlText + aggregateExpression: StringAggExp + - fieldName: aml + aggregateExpression: IntAggExp + - fieldName: beneficiaryId + aggregateExpression: IntAggExp + - fieldName: beneficiaryType + aggregateExpression: StringAggExp + - fieldName: fraud + aggregateExpression: IntAggExp + - fieldName: fraudText + aggregateExpression: StringAggExp + - fieldName: originatorId + aggregateExpression: IntAggExp + - fieldName: originatorType + aggregateExpression: StringAggExp + - fieldName: reportedBeneficiaryAddress + aggregateExpression: StringAggExp + - fieldName: reportedOriginatorAddress + aggregateExpression: StringAggExp + - fieldName: sanctioned + aggregateExpression: IntAggExp + - fieldName: transactionAmount + aggregateExpression: DoubleAggExp + - fieldName: transactionDate + aggregateExpression: DateAggExp + count: + enable: true + graphql: + selectTypeName: TransactionsAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: TransactionsOrderByExp + operand: + object: + orderedType: Transactions + orderableFields: + - fieldName: id + orderByExpression: ObjectIdOrderByExp + - fieldName: amlText + orderByExpression: StringOrderByExp + - fieldName: aml + orderByExpression: IntOrderByExp + - fieldName: beneficiaryId + orderByExpression: IntOrderByExp + - fieldName: beneficiaryType + orderByExpression: StringOrderByExp + - fieldName: fraud + orderByExpression: IntOrderByExp + - fieldName: fraudText + orderByExpression: StringOrderByExp + - fieldName: originatorId + orderByExpression: IntOrderByExp + - fieldName: originatorType + orderByExpression: StringOrderByExp + - fieldName: reportedBeneficiaryAddress + orderByExpression: StringOrderByExp + - fieldName: reportedOriginatorAddress + orderByExpression: StringOrderByExp + - fieldName: sanctioned + orderByExpression: IntOrderByExp + - fieldName: transactionAmount + orderByExpression: DoubleOrderByExp + - fieldName: transactionDate + orderByExpression: DateOrderByExp + orderableRelationships: [] + graphql: + expressionTypeName: TransactionsOrderByExp + +--- +kind: Model +version: v2 +definition: + name: Transactions + objectType: Transactions + source: + dataConnectorName: sanctions + collection: transactions + filterExpressionType: TransactionsBoolExp + aggregateExpression: TransactionsAggExp + orderByExpression: TransactionsOrderByExp + graphql: + selectMany: + queryRootField: transactions + subscription: + rootField: transactions + selectUniques: + - queryRootField: transactionsById + uniqueIdentifier: + - id + subscription: + rootField: transactionsById + filterInputTypeName: TransactionsFilterInput + aggregate: + queryRootField: transactionsAggregate + subscription: + rootField: transactionsAggregate + +--- +kind: ModelPermissions +version: v1 +definition: + modelName: Transactions + permissions: + - role: admin + select: + filter: null + allowSubscriptions: true + + +--- +kind: Relationship +version: v1 +definition: + name: beneficiaryAccount + sourceType: Transactions + target: + model: + name: Accounts + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: beneficiaryId + target: + modelField: + - fieldName: id + +--- +kind: Relationship +version: v1 +definition: + name: originatorAccount + sourceType: Transactions + target: + model: + name: Accounts + relationshipType: Object + mapping: + - source: + fieldPath: + - fieldName: originatorId + target: + modelField: + - fieldName: id \ No newline at end of file diff --git a/hasura/industry/aml/app/metadata/aml-types.hml b/hasura/industry/aml/app/metadata/aml-types.hml new file mode 100644 index 0000000..ba44be6 --- /dev/null +++ b/hasura/industry/aml/app/metadata/aml-types.hml @@ -0,0 +1,924 @@ +--- +kind: ScalarType +version: v1 +definition: + name: Int8 + graphql: + typeName: Int8 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: Int8BoolExp + operand: + scalar: + type: Int8 + comparisonOperators: + - name: _eq + argumentType: Int8! + - name: _gt + argumentType: Int8! + - name: _gte + argumentType: Int8! + - name: _in + argumentType: "[Int8!]!" + - name: _lt + argumentType: Int8! + - name: _lte + argumentType: Int8! + - name: _neq + argumentType: Int8! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: int8 + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: Int8BoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: int8 + representation: Int8 + graphql: + comparisonExpressionTypeName: Int8ComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Bool + graphql: + typeName: Bool + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: BoolBoolExp + operand: + scalar: + type: Bool + comparisonOperators: + - name: _eq + argumentType: Bool! + - name: _gt + argumentType: Bool! + - name: _gte + argumentType: Bool! + - name: _in + argumentType: "[Bool!]!" + - name: _lt + argumentType: Bool! + - name: _lte + argumentType: Bool! + - name: _neq + argumentType: Bool! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: bool + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: BoolBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: bool + representation: Bool + graphql: + comparisonExpressionTypeName: BoolComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Date_1 + graphql: + typeName: Date1 + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DateBoolExp_1 + operand: + scalar: + type: Date_1 + comparisonOperators: + - name: _eq + argumentType: Date_1! + - name: _gt + argumentType: Date_1! + - name: _gte + argumentType: Date_1! + - name: _in + argumentType: "[Date_1!]!" + - name: _lt + argumentType: Date_1! + - name: _lte + argumentType: Date_1! + - name: _neq + argumentType: Date_1! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: date + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DateBoolExp1 + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: date + representation: Date_1 + graphql: + comparisonExpressionTypeName: Date1ComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Varchar + graphql: + typeName: Varchar + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: VarcharBoolExp + operand: + scalar: + type: Varchar + comparisonOperators: + - name: _eq + argumentType: Varchar! + - name: _gt + argumentType: Varchar! + - name: _gte + argumentType: Varchar! + - name: _ilike + argumentType: Varchar! + - name: _in + argumentType: "[Varchar!]!" + - name: _iregex + argumentType: Varchar! + - name: _like + argumentType: Varchar! + - name: _lt + argumentType: Varchar! + - name: _lte + argumentType: Varchar! + - name: _neq + argumentType: Varchar! + - name: _nilike + argumentType: Varchar! + - name: _niregex + argumentType: Varchar! + - name: _nlike + argumentType: Varchar! + - name: _nregex + argumentType: Varchar! + - name: _regex + argumentType: Varchar! + - name: starts_with + argumentType: Varchar! + - name: ts_match_tt + argumentType: Varchar! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: varchar + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: VarcharBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: varchar + representation: Varchar + graphql: + comparisonExpressionTypeName: VarcharComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Numeric + graphql: + typeName: Numeric + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: NumericBoolExp + operand: + scalar: + type: Numeric + comparisonOperators: + - name: _eq + argumentType: Numeric! + - name: _gt + argumentType: Numeric! + - name: _gte + argumentType: Numeric! + - name: _in + argumentType: "[Numeric!]!" + - name: _lt + argumentType: Numeric! + - name: _lte + argumentType: Numeric! + - name: _neq + argumentType: Numeric! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: numeric + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: NumericBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: numeric + representation: Numeric + graphql: + comparisonExpressionTypeName: NumericComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: Int8AggExp + operand: + scalar: + aggregatedType: Int8 + aggregationFunctions: + - name: avg + returnType: Numeric + - name: bit_and + returnType: Int8 + - name: bit_or + returnType: Int8 + - name: bit_xor + returnType: Int8 + - name: max + returnType: Int8 + - name: min + returnType: Int8 + - name: stddev + returnType: Numeric + - name: stddev_pop + returnType: Numeric + - name: stddev_samp + returnType: Numeric + - name: sum + returnType: Numeric + - name: var_pop + returnType: Numeric + - name: var_samp + returnType: Numeric + - name: variance + returnType: Numeric + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: int8 + functionMapping: + avg: + name: avg + bit_and: + name: bit_and + bit_or: + name: bit_or + bit_xor: + name: bit_xor + max: + name: max + min: + name: min + stddev: + name: stddev + stddev_pop: + name: stddev_pop + stddev_samp: + name: stddev_samp + sum: + name: sum + var_pop: + name: var_pop + var_samp: + name: var_samp + variance: + name: variance + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: Int8AggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: BoolAggExp + operand: + scalar: + aggregatedType: Bool + aggregationFunctions: + - name: bool_and + returnType: Bool + - name: bool_or + returnType: Bool + - name: every + returnType: Bool + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: bool + functionMapping: + bool_and: + name: bool_and + bool_or: + name: bool_or + every: + name: every + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: BoolAggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DateAggExp_1 + operand: + scalar: + aggregatedType: Date_1 + aggregationFunctions: + - name: max + returnType: Date_1 + - name: min + returnType: Date_1 + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: date + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: DateAggExp1 + +--- +kind: ScalarType +version: v1 +definition: + name: Text + graphql: + typeName: Text + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TextBoolExp + operand: + scalar: + type: Text + comparisonOperators: + - name: _eq + argumentType: Text! + - name: _gt + argumentType: Text! + - name: _gte + argumentType: Text! + - name: _ilike + argumentType: Text! + - name: _in + argumentType: "[Text!]!" + - name: _iregex + argumentType: Text! + - name: _like + argumentType: Text! + - name: _lt + argumentType: Text! + - name: _lte + argumentType: Text! + - name: _neq + argumentType: Text! + - name: _nilike + argumentType: Text! + - name: _niregex + argumentType: Text! + - name: _nlike + argumentType: Text! + - name: _nregex + argumentType: Text! + - name: _regex + argumentType: Text! + - name: starts_with + argumentType: Text! + - name: ts_match_tt + argumentType: Text! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: text + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TextBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: text + representation: Text + graphql: + comparisonExpressionTypeName: TextComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: VarcharAggExp + operand: + scalar: + aggregatedType: Varchar + aggregationFunctions: + - name: max + returnType: Text + - name: min + returnType: Text + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: varchar + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: VarcharAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: Int8OrderByExp + operand: + scalar: + orderedType: Int8 + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: Int8OrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: BoolOrderByExp + operand: + scalar: + orderedType: Bool + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: BoolOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: Date1OrderByExp + operand: + scalar: + orderedType: Date_1 + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: Date1OrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: VarcharOrderByExp + operand: + scalar: + orderedType: Varchar + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: VarcharOrderByExp + +--- +kind: ScalarType +version: v1 +definition: + name: Time + graphql: + typeName: Time + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TimeBoolExp + operand: + scalar: + type: Time + comparisonOperators: + - name: _eq + argumentType: Time! + - name: _gt + argumentType: Time! + - name: _gte + argumentType: Time! + - name: _in + argumentType: "[Time!]!" + - name: _lt + argumentType: Time! + - name: _lte + argumentType: Time! + - name: _neq + argumentType: Time! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: time + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TimeBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: time + representation: Time + graphql: + comparisonExpressionTypeName: TimeComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: NumericAggExp + operand: + scalar: + aggregatedType: Numeric + aggregationFunctions: + - name: avg + returnType: Numeric + - name: max + returnType: Numeric + - name: min + returnType: Numeric + - name: stddev + returnType: Numeric + - name: stddev_pop + returnType: Numeric + - name: stddev_samp + returnType: Numeric + - name: sum + returnType: Numeric + - name: var_pop + returnType: Numeric + - name: var_samp + returnType: Numeric + - name: variance + returnType: Numeric + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: numeric + functionMapping: + avg: + name: avg + max: + name: max + min: + name: min + stddev: + name: stddev + stddev_pop: + name: stddev_pop + stddev_samp: + name: stddev_samp + sum: + name: sum + var_pop: + name: var_pop + var_samp: + name: var_samp + variance: + name: variance + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: NumericAggExp + +--- +kind: ScalarType +version: v1 +definition: + name: Interval + graphql: + typeName: Interval + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: IntervalBoolExp + operand: + scalar: + type: Interval + comparisonOperators: + - name: _eq + argumentType: Interval! + - name: _gt + argumentType: Interval! + - name: _gte + argumentType: Interval! + - name: _in + argumentType: "[Interval!]!" + - name: _lt + argumentType: Interval! + - name: _lte + argumentType: Interval! + - name: _neq + argumentType: Interval! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: interval + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: IntervalBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: interval + representation: Interval + graphql: + comparisonExpressionTypeName: IntervalComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: TimeAggExp + operand: + scalar: + aggregatedType: Time + aggregationFunctions: + - name: avg + returnType: Interval + - name: max + returnType: Time + - name: min + returnType: Time + - name: sum + returnType: Interval + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: time + functionMapping: + avg: + name: avg + max: + name: max + min: + name: min + sum: + name: sum + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: TimeAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: NumericOrderByExp + operand: + scalar: + orderedType: Numeric + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: NumericOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: TimeOrderByExp + operand: + scalar: + orderedType: Time + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: TimeOrderByExp + +--- +kind: ScalarType +version: v1 +definition: + name: Timestamp + graphql: + typeName: Timestamp + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TimestampBoolExp + operand: + scalar: + type: Timestamp + comparisonOperators: + - name: _eq + argumentType: Timestamp! + - name: _gt + argumentType: Timestamp! + - name: _gte + argumentType: Timestamp! + - name: _in + argumentType: "[Timestamp!]!" + - name: _lt + argumentType: Timestamp! + - name: _lte + argumentType: Timestamp! + - name: _neq + argumentType: Timestamp! + dataConnectorOperatorMapping: + - dataConnectorName: aml + dataConnectorScalarType: timestamp + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TimestampBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: aml + dataConnectorScalarType: timestamp + representation: Timestamp + graphql: + comparisonExpressionTypeName: TimestampComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: TimestampAggExp + operand: + scalar: + aggregatedType: Timestamp + aggregationFunctions: + - name: max + returnType: Timestamp + - name: min + returnType: Timestamp + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: timestamp + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: TimestampAggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: TextAggExp + operand: + scalar: + aggregatedType: Text + aggregationFunctions: + - name: max + returnType: Text + - name: min + returnType: Text + dataConnectorAggregationFunctionMapping: + - dataConnectorName: aml + dataConnectorScalarType: text + functionMapping: + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: TextAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: TimestampOrderByExp + operand: + scalar: + orderedType: Timestamp + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: TimestampOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: TextOrderByExp + operand: + scalar: + orderedType: Text + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: TextOrderByExp + diff --git a/hasura/industry/aml/app/metadata/aml.hml b/hasura/industry/aml/app/metadata/aml.hml new file mode 100644 index 0000000..1a7f558 --- /dev/null +++ b/hasura/industry/aml/app/metadata/aml.hml @@ -0,0 +1,1644 @@ +kind: DataConnectorLink +version: v1 +definition: + name: aml + url: + readWriteUrls: + read: + valueFromEnv: APP_AML_READ_URL + write: + valueFromEnv: APP_AML_WRITE_URL + headers: + Authorization: + valueFromEnv: APP_AML_AUTHORIZATION_HEADER + schema: + version: v0.1 + schema: + scalar_types: + bool: + representation: + type: boolean + aggregate_functions: + bool_and: + result_type: + type: nullable + underlying_type: + type: named + name: bool + bool_or: + result_type: + type: nullable + underlying_type: + type: named + name: bool + every: + result_type: + type: nullable + underlying_type: + type: named + name: bool + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: bool + _gte: + type: custom + argument_type: + type: named + name: bool + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: bool + _lte: + type: custom + argument_type: + type: named + name: bool + _neq: + type: custom + argument_type: + type: named + name: bool + date: + representation: + type: date + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: date + min: + result_type: + type: nullable + underlying_type: + type: named + name: date + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: date + _gte: + type: custom + argument_type: + type: named + name: date + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: date + _lte: + type: custom + argument_type: + type: named + name: date + _neq: + type: custom + argument_type: + type: named + name: date + int4: + representation: + type: int32 + aggregate_functions: {} + comparison_operators: {} + int8: + representation: + type: int64 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + bit_and: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + bit_or: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + bit_xor: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + max: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + min: + result_type: + type: nullable + underlying_type: + type: named + name: int8 + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: int8 + _gte: + type: custom + argument_type: + type: named + name: int8 + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: int8 + _lte: + type: custom + argument_type: + type: named + name: int8 + _neq: + type: custom + argument_type: + type: named + name: int8 + interval: + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: interval + max: + result_type: + type: nullable + underlying_type: + type: named + name: interval + min: + result_type: + type: nullable + underlying_type: + type: named + name: interval + sum: + result_type: + type: nullable + underlying_type: + type: named + name: interval + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: interval + _gte: + type: custom + argument_type: + type: named + name: interval + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: interval + _lte: + type: custom + argument_type: + type: named + name: interval + _neq: + type: custom + argument_type: + type: named + name: interval + numeric: + representation: + type: bigdecimal + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + max: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + min: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + stddev_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + sum: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_pop: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + var_samp: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + variance: + result_type: + type: nullable + underlying_type: + type: named + name: numeric + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: numeric + _gte: + type: custom + argument_type: + type: named + name: numeric + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: numeric + _lte: + type: custom + argument_type: + type: named + name: numeric + _neq: + type: custom + argument_type: + type: named + name: numeric + text: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: text + _gte: + type: custom + argument_type: + type: named + name: text + _ilike: + type: custom + argument_type: + type: named + name: text + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: text + _like: + type: custom + argument_type: + type: named + name: text + _lt: + type: custom + argument_type: + type: named + name: text + _lte: + type: custom + argument_type: + type: named + name: text + _neq: + type: custom + argument_type: + type: named + name: text + _nilike: + type: custom + argument_type: + type: named + name: text + _niregex: + type: custom + argument_type: + type: named + name: text + _nlike: + type: custom + argument_type: + type: named + name: text + _nregex: + type: custom + argument_type: + type: named + name: text + _regex: + type: custom + argument_type: + type: named + name: text + starts_with: + type: custom + argument_type: + type: named + name: text + ts_match_tt: + type: custom + argument_type: + type: named + name: text + time: + representation: + type: string + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: interval + max: + result_type: + type: nullable + underlying_type: + type: named + name: time + min: + result_type: + type: nullable + underlying_type: + type: named + name: time + sum: + result_type: + type: nullable + underlying_type: + type: named + name: interval + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: time + _gte: + type: custom + argument_type: + type: named + name: time + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: time + _lte: + type: custom + argument_type: + type: named + name: time + _neq: + type: custom + argument_type: + type: named + name: time + timestamp: + representation: + type: timestamp + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: timestamp + min: + result_type: + type: nullable + underlying_type: + type: named + name: timestamp + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: timestamp + _gte: + type: custom + argument_type: + type: named + name: timestamp + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: timestamp + _lte: + type: custom + argument_type: + type: named + name: timestamp + _neq: + type: custom + argument_type: + type: named + name: timestamp + varchar: + representation: + type: string + aggregate_functions: + max: + result_type: + type: nullable + underlying_type: + type: named + name: text + min: + result_type: + type: nullable + underlying_type: + type: named + name: text + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: varchar + _gte: + type: custom + argument_type: + type: named + name: varchar + _ilike: + type: custom + argument_type: + type: named + name: varchar + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: varchar + _like: + type: custom + argument_type: + type: named + name: varchar + _lt: + type: custom + argument_type: + type: named + name: varchar + _lte: + type: custom + argument_type: + type: named + name: varchar + _neq: + type: custom + argument_type: + type: named + name: varchar + _nilike: + type: custom + argument_type: + type: named + name: varchar + _niregex: + type: custom + argument_type: + type: named + name: varchar + _nlike: + type: custom + argument_type: + type: named + name: varchar + _nregex: + type: custom + argument_type: + type: named + name: varchar + _regex: + type: custom + argument_type: + type: named + name: varchar + starts_with: + type: custom + argument_type: + type: named + name: varchar + ts_match_tt: + type: custom + argument_type: + type: named + name: varchar + object_types: + customers: + fields: + account: + type: + type: named + name: int8 + blacklisted: + type: + type: nullable + underlying_type: + type: named + name: bool + customer_id: + type: + type: named + name: int8 + dob: + type: + type: named + name: date + name: + type: + type: named + name: varchar + nationality: + type: + type: nullable + underlying_type: + type: named + name: varchar + pep_status: + type: + type: nullable + underlying_type: + type: named + name: bool + risk_level: + type: + type: nullable + underlying_type: + type: named + name: varchar + delete_customers_by_account_response: + description: Responses from the 'delete_customers_by_account' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: customers + delete_customers_by_customer_id_response: + description: Responses from the 'delete_customers_by_customer_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: customers + delete_sars_by_sar_id_response: + description: Responses from the 'delete_sars_by_sar_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: sars + insert_customers_object: + fields: + account: + type: + type: named + name: int8 + blacklisted: + type: + type: nullable + underlying_type: + type: named + name: bool + customer_id: + type: + type: nullable + underlying_type: + type: named + name: int8 + dob: + type: + type: named + name: date + name: + type: + type: named + name: varchar + nationality: + type: + type: nullable + underlying_type: + type: named + name: varchar + pep_status: + type: + type: nullable + underlying_type: + type: named + name: bool + risk_level: + type: + type: nullable + underlying_type: + type: named + name: varchar + insert_customers_response: + description: Responses from the 'insert_customers' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: customers + insert_saml_d_object: + fields: + amount: + type: + type: nullable + underlying_type: + type: named + name: numeric + date: + type: + type: nullable + underlying_type: + type: named + name: date + is_laundering: + type: + type: nullable + underlying_type: + type: named + name: bool + laundering_type: + type: + type: nullable + underlying_type: + type: named + name: varchar + payment_currency: + type: + type: nullable + underlying_type: + type: named + name: varchar + payment_type: + type: + type: nullable + underlying_type: + type: named + name: varchar + received_currency: + type: + type: nullable + underlying_type: + type: named + name: varchar + receiver_account: + type: + type: nullable + underlying_type: + type: named + name: int8 + receiver_bank_location: + type: + type: nullable + underlying_type: + type: named + name: varchar + sender_account: + type: + type: nullable + underlying_type: + type: named + name: int8 + sender_bank_location: + type: + type: nullable + underlying_type: + type: named + name: varchar + time: + type: + type: nullable + underlying_type: + type: named + name: time + insert_saml_d_response: + description: Responses from the 'insert_saml_d' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: saml_d + insert_sars_object: + fields: + customer_id: + type: + type: nullable + underlying_type: + type: named + name: int8 + filed_date: + type: + type: nullable + underlying_type: + type: named + name: timestamp + reason: + type: + type: named + name: text + sar_id: + type: + type: nullable + underlying_type: + type: named + name: int8 + status: + type: + type: nullable + underlying_type: + type: named + name: varchar + transaction_id: + type: + type: named + name: int8 + insert_sars_response: + description: Responses from the 'insert_sars' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: sars + saml_d: + fields: + amount: + type: + type: nullable + underlying_type: + type: named + name: numeric + date: + type: + type: nullable + underlying_type: + type: named + name: date + is_laundering: + type: + type: nullable + underlying_type: + type: named + name: bool + laundering_type: + type: + type: nullable + underlying_type: + type: named + name: varchar + payment_currency: + type: + type: nullable + underlying_type: + type: named + name: varchar + payment_type: + type: + type: nullable + underlying_type: + type: named + name: varchar + received_currency: + type: + type: nullable + underlying_type: + type: named + name: varchar + receiver_account: + type: + type: nullable + underlying_type: + type: named + name: int8 + receiver_bank_location: + type: + type: nullable + underlying_type: + type: named + name: varchar + sender_account: + type: + type: nullable + underlying_type: + type: named + name: int8 + sender_bank_location: + type: + type: nullable + underlying_type: + type: named + name: varchar + time: + type: + type: nullable + underlying_type: + type: named + name: time + sars: + fields: + customer_id: + type: + type: nullable + underlying_type: + type: named + name: int8 + filed_date: + type: + type: nullable + underlying_type: + type: named + name: timestamp + reason: + type: + type: named + name: text + sar_id: + type: + type: named + name: int8 + status: + type: + type: nullable + underlying_type: + type: named + name: varchar + transaction_id: + type: + type: named + name: int8 + update_column_customers_account: + description: Update the 'account' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: int8 + update_column_customers_blacklisted: + description: Update the 'blacklisted' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: bool + update_column_customers_customer_id: + description: Update the 'customer_id' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: int8 + update_column_customers_dob: + description: Update the 'dob' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: date + update_column_customers_name: + description: Update the 'name' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: varchar + update_column_customers_nationality: + description: Update the 'nationality' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_customers_pep_status: + description: Update the 'pep_status' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: bool + update_column_customers_risk_level: + description: Update the 'risk_level' column in the 'customers' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_sars_customer_id: + description: Update the 'customer_id' column in the 'sars' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: int8 + update_column_sars_filed_date: + description: Update the 'filed_date' column in the 'sars' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: timestamp + update_column_sars_reason: + description: Update the 'reason' column in the 'sars' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: text + update_column_sars_sar_id: + description: Update the 'sar_id' column in the 'sars' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: int8 + update_column_sars_status: + description: Update the 'status' column in the 'sars' collection + fields: + _set: + description: Set the column to this value + type: + type: nullable + underlying_type: + type: named + name: varchar + update_column_sars_transaction_id: + description: Update the 'transaction_id' column in the 'sars' collection + fields: + _set: + description: Set the column to this value + type: + type: named + name: int8 + update_customers_by_account_response: + description: Responses from the 'update_customers_by_account' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: customers + update_customers_by_account_update_columns: + description: Update the columns of the 'customers' collection + fields: + account: + description: Update the 'account' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_account + blacklisted: + description: Update the 'blacklisted' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_blacklisted + customer_id: + description: Update the 'customer_id' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_customer_id + dob: + description: Update the 'dob' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_dob + name: + description: Update the 'name' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_name + nationality: + description: Update the 'nationality' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_nationality + pep_status: + description: Update the 'pep_status' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_pep_status + risk_level: + description: Update the 'risk_level' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_risk_level + update_customers_by_customer_id_response: + description: Responses from the 'update_customers_by_customer_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: customers + update_customers_by_customer_id_update_columns: + description: Update the columns of the 'customers' collection + fields: + account: + description: Update the 'account' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_account + blacklisted: + description: Update the 'blacklisted' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_blacklisted + customer_id: + description: Update the 'customer_id' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_customer_id + dob: + description: Update the 'dob' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_dob + name: + description: Update the 'name' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_name + nationality: + description: Update the 'nationality' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_nationality + pep_status: + description: Update the 'pep_status' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_pep_status + risk_level: + description: Update the 'risk_level' column in the 'customers' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_customers_risk_level + update_sars_by_sar_id_response: + description: Responses from the 'update_sars_by_sar_id' procedure + fields: + affected_rows: + description: The number of rows affected by the mutation + type: + type: named + name: int4 + returning: + description: Data from rows affected by the mutation + type: + type: array + element_type: + type: named + name: sars + update_sars_by_sar_id_update_columns: + description: Update the columns of the 'sars' collection + fields: + customer_id: + description: Update the 'customer_id' column in the 'sars' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_sars_customer_id + filed_date: + description: Update the 'filed_date' column in the 'sars' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_sars_filed_date + reason: + description: Update the 'reason' column in the 'sars' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_sars_reason + sar_id: + description: Update the 'sar_id' column in the 'sars' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_sars_sar_id + status: + description: Update the 'status' column in the 'sars' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_sars_status + transaction_id: + description: Update the 'transaction_id' column in the 'sars' collection. + type: + type: nullable + underlying_type: + type: named + name: update_column_sars_transaction_id + collections: + - name: customers + arguments: {} + type: customers + uniqueness_constraints: + customers_account_key: + unique_columns: + - account + customers_pkey: + unique_columns: + - customer_id + foreign_keys: {} + - name: saml_d + arguments: {} + type: saml_d + uniqueness_constraints: {} + foreign_keys: {} + - name: sars + arguments: {} + type: sars + uniqueness_constraints: + sars_pkey: + unique_columns: + - sar_id + foreign_keys: + sars_customer_id_fkey: + column_mapping: + customer_id: customer_id + foreign_collection: customers + functions: [] + procedures: + - name: delete_customers_by_account + description: Delete any row on the 'customers' collection using the 'account' key + arguments: + key_account: + type: + type: named + name: int8 + pre_check: + description: Delete permission predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + result_type: + type: named + name: delete_customers_by_account_response + - name: delete_customers_by_customer_id + description: Delete any row on the 'customers' collection using the 'customer_id' key + arguments: + key_customer_id: + type: + type: named + name: int8 + pre_check: + description: Delete permission predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + result_type: + type: named + name: delete_customers_by_customer_id_response + - name: delete_sars_by_sar_id + description: Delete any row on the 'sars' collection using the 'sar_id' key + arguments: + key_sar_id: + type: + type: named + name: int8 + pre_check: + description: Delete permission predicate over the 'sars' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: sars + result_type: + type: named + name: delete_sars_by_sar_id_response + - name: insert_customers + description: Insert into the customers table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_customers_object + post_check: + description: Insert permission predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + result_type: + type: named + name: insert_customers_response + - name: insert_saml_d + description: Insert into the saml_d table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_saml_d_object + post_check: + description: Insert permission predicate over the 'saml_d' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: saml_d + result_type: + type: named + name: insert_saml_d_response + - name: insert_sars + description: Insert into the sars table + arguments: + objects: + type: + type: array + element_type: + type: named + name: insert_sars_object + post_check: + description: Insert permission predicate over the 'sars' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: sars + result_type: + type: named + name: insert_sars_response + - name: update_customers_by_account + description: Update any row on the 'customers' collection using the 'account' key + arguments: + key_account: + type: + type: named + name: int8 + post_check: + description: Update permission post-condition predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + pre_check: + description: Update permission pre-condition predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + update_columns: + type: + type: named + name: update_customers_by_account_update_columns + result_type: + type: named + name: update_customers_by_account_response + - name: update_customers_by_customer_id + description: Update any row on the 'customers' collection using the 'customer_id' key + arguments: + key_customer_id: + type: + type: named + name: int8 + post_check: + description: Update permission post-condition predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + pre_check: + description: Update permission pre-condition predicate over the 'customers' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: customers + update_columns: + type: + type: named + name: update_customers_by_customer_id_update_columns + result_type: + type: named + name: update_customers_by_customer_id_response + - name: update_sars_by_sar_id + description: Update any row on the 'sars' collection using the 'sar_id' key + arguments: + key_sar_id: + type: + type: named + name: int8 + post_check: + description: Update permission post-condition predicate over the 'sars' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: sars + pre_check: + description: Update permission pre-condition predicate over the 'sars' collection + type: + type: nullable + underlying_type: + type: predicate + object_type_name: sars + update_columns: + type: + type: named + name: update_sars_by_sar_id_update_columns + result_type: + type: named + name: update_sars_by_sar_id_response + capabilities: + version: 0.1.6 + capabilities: + query: + aggregates: {} + variables: {} + explain: {} + nested_fields: + filter_by: {} + order_by: {} + exists: + nested_collections: {} + mutation: + transactional: {} + explain: {} + relationships: + relation_comparisons: {} + order_by_aggregate: {} diff --git a/hasura/industry/aml/app/metadata/sanctions-types.hml b/hasura/industry/aml/app/metadata/sanctions-types.hml new file mode 100644 index 0000000..cd3f47f --- /dev/null +++ b/hasura/industry/aml/app/metadata/sanctions-types.hml @@ -0,0 +1,594 @@ +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sanctions + dataConnectorScalarType: Int + representation: Int + graphql: + comparisonExpressionTypeName: IntComparisonExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sanctions + dataConnectorScalarType: String + representation: String + graphql: + comparisonExpressionTypeName: StringComparisonExp + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: IntBoolExp + operand: + scalar: + type: Int + comparisonOperators: + - name: _eq + argumentType: Int! + - name: _gt + argumentType: Int! + - name: _gte + argumentType: Int! + - name: _in + argumentType: "[Int!]!" + - name: _lt + argumentType: Int! + - name: _lte + argumentType: Int! + - name: _neq + argumentType: Int! + - name: _nin + argumentType: "[Int!]!" + dataConnectorOperatorMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: Int + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: IntBoolExp + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: StringBoolExp + operand: + scalar: + type: String + comparisonOperators: + - name: _eq + argumentType: String! + - name: _gt + argumentType: String! + - name: _gte + argumentType: String! + - name: _in + argumentType: "[String!]!" + - name: _iregex + argumentType: String! + - name: _lt + argumentType: String! + - name: _lte + argumentType: String! + - name: _neq + argumentType: String! + - name: _nin + argumentType: "[String!]!" + - name: _regex + argumentType: String! + dataConnectorOperatorMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: String + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: StringBoolExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: IntAggExp + operand: + scalar: + aggregatedType: Int + aggregationFunctions: + - name: avg + returnType: Int + - name: count + returnType: Int! + - name: max + returnType: Int + - name: min + returnType: Int + - name: sum + returnType: Int + dataConnectorAggregationFunctionMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: Int + functionMapping: + avg: + name: avg + count: + name: count + max: + name: max + min: + name: min + sum: + name: sum + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: IntAggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: StringAggExp + operand: + scalar: + aggregatedType: String + aggregationFunctions: + - name: count + returnType: Int! + - name: max + returnType: String + - name: min + returnType: String + dataConnectorAggregationFunctionMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: String + functionMapping: + count: + name: count + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: StringAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: IntOrderByExp + operand: + scalar: + orderedType: Int + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: IntOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: StringOrderByExp + operand: + scalar: + orderedType: String + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: StringOrderByExp + +--- +kind: ScalarType +version: v1 +definition: + name: Date + graphql: + typeName: Date + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DateBoolExp + operand: + scalar: + type: Date + comparisonOperators: + - name: _eq + argumentType: Date! + - name: _gt + argumentType: Date! + - name: _gte + argumentType: Date! + - name: _in + argumentType: "[Date!]!" + - name: _lt + argumentType: Date! + - name: _lte + argumentType: Date! + - name: _neq + argumentType: Date! + - name: _nin + argumentType: "[Date!]!" + dataConnectorOperatorMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: Date + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DateBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sanctions + dataConnectorScalarType: Date + representation: Date + graphql: + comparisonExpressionTypeName: DateComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DateAggExp + operand: + scalar: + aggregatedType: Date + aggregationFunctions: + - name: count + returnType: Int! + - name: max + returnType: Date + - name: min + returnType: Date + dataConnectorAggregationFunctionMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: Date + functionMapping: + count: + name: count + max: + name: max + min: + name: min + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: DateAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: DateOrderByExp + operand: + scalar: + orderedType: Date + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: DateOrderByExp + +--- +kind: ScalarType +version: v1 +definition: + name: ExtendedJson + graphql: + typeName: ExtendedJson + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: ExtendedJsonBoolExp + operand: + scalar: + type: ExtendedJson + comparisonOperators: + - name: _eq + argumentType: ExtendedJson! + - name: _gt + argumentType: ExtendedJson! + - name: _gte + argumentType: ExtendedJson! + - name: _in + argumentType: ExtendedJson! + - name: _iregex + argumentType: String! + - name: _lt + argumentType: ExtendedJson! + - name: _lte + argumentType: ExtendedJson! + - name: _neq + argumentType: ExtendedJson! + - name: _nin + argumentType: ExtendedJson! + - name: _regex + argumentType: String! + dataConnectorOperatorMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: ExtendedJSON + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: ExtendedJsonBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sanctions + dataConnectorScalarType: ExtendedJSON + representation: ExtendedJson + graphql: + comparisonExpressionTypeName: ExtendedJsonComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: ExtendedJsonAggExp + operand: + scalar: + aggregatedType: ExtendedJson + aggregationFunctions: + - name: avg + returnType: ExtendedJson! + - name: count + returnType: Int! + - name: max + returnType: ExtendedJson! + - name: min + returnType: ExtendedJson! + - name: sum + returnType: ExtendedJson! + dataConnectorAggregationFunctionMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: ExtendedJSON + functionMapping: + avg: + name: avg + count: + name: count + max: + name: max + min: + name: min + sum: + name: sum + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: ExtendedJsonAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: ExtendedJsonOrderByExp + operand: + scalar: + orderedType: ExtendedJson + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: ExtendedJsonOrderByExp + +--- +kind: ScalarType +version: v1 +definition: + name: ObjectId + graphql: + typeName: ObjectId + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: ObjectIdBoolExp + operand: + scalar: + type: ObjectId + comparisonOperators: + - name: _eq + argumentType: ObjectId! + - name: _in + argumentType: "[ObjectId!]!" + - name: _neq + argumentType: ObjectId! + - name: _nin + argumentType: "[ObjectId!]!" + dataConnectorOperatorMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: ObjectId + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: ObjectIdBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sanctions + dataConnectorScalarType: ObjectId + representation: ObjectId + graphql: + comparisonExpressionTypeName: ObjectIdComparisonExp + +--- +kind: ScalarType +version: v1 +definition: + name: Double + graphql: + typeName: Double + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DoubleBoolExp + operand: + scalar: + type: Double + comparisonOperators: + - name: _eq + argumentType: Double! + - name: _gt + argumentType: Double! + - name: _gte + argumentType: Double! + - name: _in + argumentType: "[Double!]!" + - name: _lt + argumentType: Double! + - name: _lte + argumentType: Double! + - name: _neq + argumentType: Double! + - name: _nin + argumentType: "[Double!]!" + dataConnectorOperatorMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: Double + operatorMapping: {} + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DoubleBoolExp + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sanctions + dataConnectorScalarType: Double + representation: Double + graphql: + comparisonExpressionTypeName: DoubleComparisonExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: ObjectIdAggExp + operand: + scalar: + aggregatedType: ObjectId + aggregationFunctions: + - name: count + returnType: Int! + dataConnectorAggregationFunctionMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: ObjectId + functionMapping: + count: + name: count + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: ObjectIdAggExp + +--- +kind: AggregateExpression +version: v1 +definition: + name: DoubleAggExp + operand: + scalar: + aggregatedType: Double + aggregationFunctions: + - name: avg + returnType: Double + - name: count + returnType: Int! + - name: max + returnType: Double + - name: min + returnType: Double + - name: sum + returnType: Double + dataConnectorAggregationFunctionMapping: + - dataConnectorName: sanctions + dataConnectorScalarType: Double + functionMapping: + avg: + name: avg + count: + name: count + max: + name: max + min: + name: min + sum: + name: sum + count: + enable: true + countDistinct: + enable: true + graphql: + selectTypeName: DoubleAggExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: ObjectIdOrderByExp + operand: + scalar: + orderedType: ObjectId + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: ObjectIdOrderByExp + +--- +kind: OrderByExpression +version: v1 +definition: + name: DoubleOrderByExp + operand: + scalar: + orderedType: Double + enableOrderByDirections: + enableAll: true + graphql: + expressionTypeName: DoubleOrderByExp + diff --git a/hasura/industry/aml/app/metadata/sanctions.hml b/hasura/industry/aml/app/metadata/sanctions.hml new file mode 100644 index 0000000..15b0fc9 --- /dev/null +++ b/hasura/industry/aml/app/metadata/sanctions.hml @@ -0,0 +1,1120 @@ +kind: DataConnectorLink +version: v1 +definition: + name: sanctions + url: + readWriteUrls: + read: + valueFromEnv: APP_SANCTIONS_READ_URL + write: + valueFromEnv: APP_SANCTIONS_WRITE_URL + headers: + Authorization: + valueFromEnv: APP_SANCTIONS_AUTHORIZATION_HEADER + schema: + version: v0.1 + schema: + scalar_types: + BinData: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: BinData + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: BinData + Bool: + representation: + type: boolean + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: Bool + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Bool + Date: + representation: + type: timestamp + aggregate_functions: + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: Date + min: + result_type: + type: nullable + underlying_type: + type: named + name: Date + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: Date + _gte: + type: custom + argument_type: + type: named + name: Date + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: Date + _lte: + type: custom + argument_type: + type: named + name: Date + _neq: + type: custom + argument_type: + type: named + name: Date + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Date + DbPointer: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: DbPointer + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: DbPointer + Decimal: + representation: + type: bigdecimal + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: Decimal + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: Decimal + min: + result_type: + type: nullable + underlying_type: + type: named + name: Decimal + sum: + result_type: + type: nullable + underlying_type: + type: named + name: Decimal + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: Decimal + _gte: + type: custom + argument_type: + type: named + name: Decimal + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: Decimal + _lte: + type: custom + argument_type: + type: named + name: Decimal + _neq: + type: custom + argument_type: + type: named + name: Decimal + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Decimal + Double: + representation: + type: float64 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: Double + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: Double + min: + result_type: + type: nullable + underlying_type: + type: named + name: Double + sum: + result_type: + type: nullable + underlying_type: + type: named + name: Double + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: Double + _gte: + type: custom + argument_type: + type: named + name: Double + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: Double + _lte: + type: custom + argument_type: + type: named + name: Double + _neq: + type: custom + argument_type: + type: named + name: Double + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Double + ExtendedJSON: + representation: + type: json + aggregate_functions: + avg: + result_type: + type: named + name: ExtendedJSON + count: + result_type: + type: named + name: Int + max: + result_type: + type: named + name: ExtendedJSON + min: + result_type: + type: named + name: ExtendedJSON + sum: + result_type: + type: named + name: ExtendedJSON + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: ExtendedJSON + _gte: + type: custom + argument_type: + type: named + name: ExtendedJSON + _in: + type: custom + argument_type: + type: named + name: ExtendedJSON + _iregex: + type: custom + argument_type: + type: named + name: String + _lt: + type: custom + argument_type: + type: named + name: ExtendedJSON + _lte: + type: custom + argument_type: + type: named + name: ExtendedJSON + _neq: + type: custom + argument_type: + type: named + name: ExtendedJSON + _nin: + type: custom + argument_type: + type: named + name: ExtendedJSON + _regex: + type: custom + argument_type: + type: named + name: String + Int: + representation: + type: int32 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: Int + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: Int + min: + result_type: + type: nullable + underlying_type: + type: named + name: Int + sum: + result_type: + type: nullable + underlying_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: Int + _gte: + type: custom + argument_type: + type: named + name: Int + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: Int + _lte: + type: custom + argument_type: + type: named + name: Int + _neq: + type: custom + argument_type: + type: named + name: Int + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Int + Javascript: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: {} + JavascriptWithScope: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: {} + Long: + representation: + type: int64 + aggregate_functions: + avg: + result_type: + type: nullable + underlying_type: + type: named + name: Long + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: Long + min: + result_type: + type: nullable + underlying_type: + type: named + name: Long + sum: + result_type: + type: nullable + underlying_type: + type: named + name: Long + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: Long + _gte: + type: custom + argument_type: + type: named + name: Long + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: Long + _lte: + type: custom + argument_type: + type: named + name: Long + _neq: + type: custom + argument_type: + type: named + name: Long + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Long + MaxKey: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: MaxKey + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: MaxKey + MinKey: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: MinKey + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: MinKey + "Null": + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: "Null" + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: "Null" + ObjectId: + representation: + type: string + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: ObjectId + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: ObjectId + Regex: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: {} + String: + representation: + type: string + aggregate_functions: + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: String + min: + result_type: + type: nullable + underlying_type: + type: named + name: String + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: String + _gte: + type: custom + argument_type: + type: named + name: String + _in: + type: in + _iregex: + type: custom + argument_type: + type: named + name: String + _lt: + type: custom + argument_type: + type: named + name: String + _lte: + type: custom + argument_type: + type: named + name: String + _neq: + type: custom + argument_type: + type: named + name: String + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: String + _regex: + type: custom + argument_type: + type: named + name: String + Symbol: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: Symbol + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Symbol + Timestamp: + aggregate_functions: + count: + result_type: + type: named + name: Int + max: + result_type: + type: nullable + underlying_type: + type: named + name: Timestamp + min: + result_type: + type: nullable + underlying_type: + type: named + name: Timestamp + comparison_operators: + _eq: + type: equal + _gt: + type: custom + argument_type: + type: named + name: Timestamp + _gte: + type: custom + argument_type: + type: named + name: Timestamp + _in: + type: in + _lt: + type: custom + argument_type: + type: named + name: Timestamp + _lte: + type: custom + argument_type: + type: named + name: Timestamp + _neq: + type: custom + argument_type: + type: named + name: Timestamp + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Timestamp + Undefined: + aggregate_functions: + count: + result_type: + type: named + name: Int + comparison_operators: + _eq: + type: equal + _in: + type: in + _neq: + type: custom + argument_type: + type: named + name: Undefined + _nin: + type: custom + argument_type: + type: array + element_type: + type: named + name: Undefined + object_types: + accounts: + fields: + _id: + type: + type: named + name: Int + contact_information: + type: + type: nullable + underlying_type: + type: named + name: accounts_contact_information + entity_type: + type: + type: nullable + underlying_type: + type: named + name: String + name: + type: + type: nullable + underlying_type: + type: named + name: String + risk: + type: + type: nullable + underlying_type: + type: named + name: String + transaction-limits: + type: + type: nullable + underlying_type: + type: named + name: accounts_transaction-limits + accounts_contact_information: + fields: + address: + type: + type: nullable + underlying_type: + type: named + name: String + email: + type: + type: nullable + underlying_type: + type: named + name: String + phone_number: + type: + type: nullable + underlying_type: + type: named + name: String + accounts_transaction-limits: + fields: + max-num-transactions: + type: + type: nullable + underlying_type: + type: named + name: Int + max-transaction-limit: + type: + type: nullable + underlying_type: + type: named + name: Int + sanctioned: + fields: + _id: + type: + type: named + name: Int + List_type: + type: + type: nullable + underlying_type: + type: named + name: String + address: + type: + type: nullable + underlying_type: + type: named + name: String + entity_name: + type: + type: nullable + underlying_type: + type: named + name: String + entity_type: + type: + type: nullable + underlying_type: + type: named + name: String + identifications: + type: + type: nullable + underlying_type: + type: array + element_type: + type: named + name: String + listed_date: + type: + type: nullable + underlying_type: + type: named + name: Date + program: + type: + type: nullable + underlying_type: + type: named + name: String + sanctioned_list: + fields: + ' Call Sign': + type: + type: nullable + underlying_type: + type: named + name: String + ' Country': + type: + type: nullable + underlying_type: + type: named + name: String + ' Gross Registered Tonnage': + type: + type: nullable + underlying_type: + type: named + name: ExtendedJSON + ' Identifications': + type: + type: nullable + underlying_type: + type: named + name: String + ' Title': + type: + type: nullable + underlying_type: + type: named + name: String + ' Vessel Owner': + type: + type: nullable + underlying_type: + type: named + name: String + ' Vessel Type': + type: + type: nullable + underlying_type: + type: named + name: String + _id: + type: + type: named + name: Int + Name: + type: + type: nullable + underlying_type: + type: named + name: String + Tonnage: + type: + type: nullable + underlying_type: + type: named + name: String + Type: + type: + type: nullable + underlying_type: + type: named + name: String + Vessel Flag: + type: + type: nullable + underlying_type: + type: named + name: String + transactions: + fields: + _id: + type: + type: named + name: ObjectId + AML_text: + type: + type: nullable + underlying_type: + type: named + name: String + AML_vectors: + type: + type: nullable + underlying_type: + type: array + element_type: + type: named + name: Double + aml: + type: + type: nullable + underlying_type: + type: named + name: Int + beneficiary_id: + type: + type: nullable + underlying_type: + type: named + name: Int + beneficiary_type: + type: + type: nullable + underlying_type: + type: named + name: String + fraud: + type: + type: nullable + underlying_type: + type: named + name: Int + fraud_text: + type: + type: nullable + underlying_type: + type: named + name: String + fraud_vectors: + type: + type: nullable + underlying_type: + type: array + element_type: + type: named + name: Double + originator_id: + type: + type: nullable + underlying_type: + type: named + name: Int + originator_type: + type: + type: nullable + underlying_type: + type: named + name: String + reported_beneficiary_address: + type: + type: nullable + underlying_type: + type: named + name: String + reported_originator_address: + type: + type: nullable + underlying_type: + type: named + name: String + sanctioned: + type: + type: nullable + underlying_type: + type: named + name: Int + transaction_amount: + type: + type: nullable + underlying_type: + type: named + name: Double + transaction_date: + type: + type: nullable + underlying_type: + type: named + name: Date + collections: + - name: accounts + arguments: {} + type: accounts + uniqueness_constraints: + accounts_id: + unique_columns: + - _id + foreign_keys: {} + - name: sanctioned + arguments: {} + type: sanctioned + uniqueness_constraints: + sanctioned_id: + unique_columns: + - _id + foreign_keys: {} + - name: sanctioned_list + arguments: {} + type: sanctioned_list + uniqueness_constraints: + sanctioned_list_id: + unique_columns: + - _id + foreign_keys: {} + - name: transactions + arguments: {} + type: transactions + uniqueness_constraints: + transactions_id: + unique_columns: + - _id + foreign_keys: {} + functions: [] + procedures: [] + capabilities: + version: 0.1.6 + capabilities: + query: + aggregates: {} + variables: {} + explain: {} + nested_fields: + filter_by: {} + order_by: {} + aggregates: {} + exists: + nested_collections: {} + mutation: {} + relationships: + relation_comparisons: {} diff --git a/hasura/industry/aml/app/subgraph.yaml b/hasura/industry/aml/app/subgraph.yaml new file mode 100644 index 0000000..883003c --- /dev/null +++ b/hasura/industry/aml/app/subgraph.yaml @@ -0,0 +1,27 @@ +kind: Subgraph +version: v2 +definition: + name: app + generator: + rootPath: . + namingConvention: graphql + includePaths: + - metadata + envMapping: + APP_AML_AUTHORIZATION_HEADER: + fromEnv: APP_AML_AUTHORIZATION_HEADER + APP_AML_READ_URL: + fromEnv: APP_AML_READ_URL + APP_AML_WRITE_URL: + fromEnv: APP_AML_WRITE_URL + APP_SANCTIONS_AUTHORIZATION_HEADER: + fromEnv: APP_SANCTIONS_AUTHORIZATION_HEADER + APP_SANCTIONS_READ_URL: + fromEnv: APP_SANCTIONS_READ_URL + APP_SANCTIONS_WRITE_URL: + fromEnv: APP_SANCTIONS_WRITE_URL + connectors: + - path: connector/sanctions/connector.yaml + connectorLinkName: sanctions + - path: connector/aml/connector.yaml + connectorLinkName: aml diff --git a/hasura/support/connector/vector/.ddnignore b/hasura/industry/telco/auth/connector/auth/.ddnignore similarity index 100% rename from hasura/support/connector/vector/.ddnignore rename to hasura/industry/telco/auth/connector/auth/.ddnignore diff --git a/hasura/auth/connector/auth/.hasura-connector/connector-metadata.yaml b/hasura/industry/telco/auth/connector/auth/.hasura-connector/connector-metadata.yaml similarity index 100% rename from hasura/auth/connector/auth/.hasura-connector/connector-metadata.yaml rename to hasura/industry/telco/auth/connector/auth/.hasura-connector/connector-metadata.yaml diff --git a/hasura/auth/connector/auth/configuration.json b/hasura/industry/telco/auth/connector/auth/configuration.json similarity index 100% rename from hasura/auth/connector/auth/configuration.json rename to hasura/industry/telco/auth/connector/auth/configuration.json diff --git a/hasura/auth/connector/auth/connector.yaml b/hasura/industry/telco/auth/connector/auth/connector.yaml similarity index 85% rename from hasura/auth/connector/auth/connector.yaml rename to hasura/industry/telco/auth/connector/auth/connector.yaml index c2aaa02..54c084a 100644 --- a/hasura/auth/connector/auth/connector.yaml +++ b/hasura/industry/telco/auth/connector/auth/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: AUTH_AUTH_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: AUTH_AUTH_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/auth/connector/auth/schema.json b/hasura/industry/telco/auth/connector/auth/schema.json similarity index 100% rename from hasura/auth/connector/auth/schema.json rename to hasura/industry/telco/auth/connector/auth/schema.json diff --git a/hasura/auth/metadata/DeleteUsersById.hml b/hasura/industry/telco/auth/metadata/DeleteUsersById.hml similarity index 100% rename from hasura/auth/metadata/DeleteUsersById.hml rename to hasura/industry/telco/auth/metadata/DeleteUsersById.hml diff --git a/hasura/auth/metadata/InsertUsers.hml b/hasura/industry/telco/auth/metadata/InsertUsers.hml similarity index 100% rename from hasura/auth/metadata/InsertUsers.hml rename to hasura/industry/telco/auth/metadata/InsertUsers.hml diff --git a/hasura/auth/metadata/UpdateUsersById.hml b/hasura/industry/telco/auth/metadata/UpdateUsersById.hml similarity index 100% rename from hasura/auth/metadata/UpdateUsersById.hml rename to hasura/industry/telco/auth/metadata/UpdateUsersById.hml diff --git a/hasura/auth/metadata/Users.hml b/hasura/industry/telco/auth/metadata/Users.hml similarity index 100% rename from hasura/auth/metadata/Users.hml rename to hasura/industry/telco/auth/metadata/Users.hml diff --git a/hasura/auth/metadata/auth-types.hml b/hasura/industry/telco/auth/metadata/auth-types.hml similarity index 100% rename from hasura/auth/metadata/auth-types.hml rename to hasura/industry/telco/auth/metadata/auth-types.hml diff --git a/hasura/auth/metadata/auth.hml b/hasura/industry/telco/auth/metadata/auth.hml similarity index 100% rename from hasura/auth/metadata/auth.hml rename to hasura/industry/telco/auth/metadata/auth.hml diff --git a/hasura/auth/subgraph.yaml b/hasura/industry/telco/auth/subgraph.yaml similarity index 100% rename from hasura/auth/subgraph.yaml rename to hasura/industry/telco/auth/subgraph.yaml diff --git a/hasura/industry/telco/customer/connector/aurora/connector.yaml b/hasura/industry/telco/customer/connector/aurora/connector.yaml index 3b7921e..08927a6 100644 --- a/hasura/industry/telco/customer/connector/aurora/connector.yaml +++ b/hasura/industry/telco/customer/connector/aurora/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: CUSTOMER_AURORA_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: CUSTOMER_AURORA_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/industry/telco/customer/connector/logic/connector.yaml b/hasura/industry/telco/customer/connector/logic/connector.yaml index 74ec073..2beefa2 100644 --- a/hasura/industry/telco/customer/connector/logic/connector.yaml +++ b/hasura/industry/telco/customer/connector/logic/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: CUSTOMER_LOGIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: CUSTOMER_LOGIC_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/industry/telco/customer/connector/mongo/connector.yaml b/hasura/industry/telco/customer/connector/mongo/connector.yaml index f2f52c9..8e7de76 100644 --- a/hasura/industry/telco/customer/connector/mongo/connector.yaml +++ b/hasura/industry/telco/customer/connector/mongo/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: CUSTOMER_MONGO_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: CUSTOMER_MONGO_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/industry/telco/network/connector/clickhouse/connector.yaml b/hasura/industry/telco/network/connector/clickhouse/connector.yaml index ef27402..4eab654 100644 --- a/hasura/industry/telco/network/connector/clickhouse/connector.yaml +++ b/hasura/industry/telco/network/connector/clickhouse/connector.yaml @@ -18,6 +18,3 @@ definition: fromEnv: NETWORK_CLICKHOUSE_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: NETWORK_CLICKHOUSE_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/industry/telco/network/connector/kafka_sink/connector.yaml b/hasura/industry/telco/network/connector/kafka_sink/connector.yaml index 9f98bdb..5c1aa7c 100644 --- a/hasura/industry/telco/network/connector/kafka_sink/connector.yaml +++ b/hasura/industry/telco/network/connector/kafka_sink/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: NETWORK_KAFKA_SINK_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: NETWORK_KAFKA_SINK_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/industry/telco/support/connector/atlas/.configuration_metadata b/hasura/industry/telco/support/connector/atlas/.configuration_metadata new file mode 100644 index 0000000..e69de29 diff --git a/hasura/industry/telco/support/connector/atlas/.ddnignore b/hasura/industry/telco/support/connector/atlas/.ddnignore new file mode 100644 index 0000000..ed72dd1 --- /dev/null +++ b/hasura/industry/telco/support/connector/atlas/.ddnignore @@ -0,0 +1,2 @@ +.env* +compose.yaml diff --git a/hasura/support/connector/atlas/.hasura-connector/connector-metadata.yaml b/hasura/industry/telco/support/connector/atlas/.hasura-connector/connector-metadata.yaml similarity index 100% rename from hasura/support/connector/atlas/.hasura-connector/connector-metadata.yaml rename to hasura/industry/telco/support/connector/atlas/.hasura-connector/connector-metadata.yaml diff --git a/hasura/industry/telco/support/connector/atlas/configuration.json b/hasura/industry/telco/support/connector/atlas/configuration.json new file mode 100644 index 0000000..95e0370 --- /dev/null +++ b/hasura/industry/telco/support/connector/atlas/configuration.json @@ -0,0 +1,10 @@ +{ + "introspectionOptions": { + "sampleSize": 100, + "noValidatorSchema": false, + "allSchemaNullable": true + }, + "serializationOptions": { + "extendedJsonMode": "canonical" + } +} \ No newline at end of file diff --git a/hasura/support/connector/atlas/connector.yaml b/hasura/industry/telco/support/connector/atlas/connector.yaml similarity index 86% rename from hasura/support/connector/atlas/connector.yaml rename to hasura/industry/telco/support/connector/atlas/connector.yaml index 950b5be..4860a59 100644 --- a/hasura/support/connector/atlas/connector.yaml +++ b/hasura/industry/telco/support/connector/atlas/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: SUPPORT_ATLAS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: SUPPORT_ATLAS_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/support/connector/atlas/schema/userProfiles.json b/hasura/industry/telco/support/connector/atlas/schema/userProfiles.json similarity index 100% rename from hasura/support/connector/atlas/schema/userProfiles.json rename to hasura/industry/telco/support/connector/atlas/schema/userProfiles.json diff --git a/hasura/industry/telco/support/connector/vector/.ddnignore b/hasura/industry/telco/support/connector/vector/.ddnignore new file mode 100644 index 0000000..ed72dd1 --- /dev/null +++ b/hasura/industry/telco/support/connector/vector/.ddnignore @@ -0,0 +1,2 @@ +.env* +compose.yaml diff --git a/hasura/support/connector/vector/.hasura-connector/connector-metadata.yaml b/hasura/industry/telco/support/connector/vector/.hasura-connector/connector-metadata.yaml similarity index 100% rename from hasura/support/connector/vector/.hasura-connector/connector-metadata.yaml rename to hasura/industry/telco/support/connector/vector/.hasura-connector/connector-metadata.yaml diff --git a/hasura/support/connector/vector/configuration.json b/hasura/industry/telco/support/connector/vector/configuration.json similarity index 100% rename from hasura/support/connector/vector/configuration.json rename to hasura/industry/telco/support/connector/vector/configuration.json diff --git a/hasura/support/connector/vector/connector.yaml b/hasura/industry/telco/support/connector/vector/connector.yaml similarity index 86% rename from hasura/support/connector/vector/connector.yaml rename to hasura/industry/telco/support/connector/vector/connector.yaml index 3f405a6..fdac535 100644 --- a/hasura/support/connector/vector/connector.yaml +++ b/hasura/industry/telco/support/connector/vector/connector.yaml @@ -14,6 +14,3 @@ definition: fromEnv: SUPPORT_VECTOR_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT OTEL_SERVICE_NAME: fromEnv: SUPPORT_VECTOR_OTEL_SERVICE_NAME - regionConfiguration: - - mode: ReadWrite - region: gcp-us-west2 diff --git a/hasura/support/connector/vector/schema.json b/hasura/industry/telco/support/connector/vector/schema.json similarity index 100% rename from hasura/support/connector/vector/schema.json rename to hasura/industry/telco/support/connector/vector/schema.json diff --git a/hasura/support/metadata/DeleteDocumentEmbeddingsByDocumentUuid.hml b/hasura/industry/telco/support/metadata/DeleteDocumentEmbeddingsByDocumentUuid.hml similarity index 100% rename from hasura/support/metadata/DeleteDocumentEmbeddingsByDocumentUuid.hml rename to hasura/industry/telco/support/metadata/DeleteDocumentEmbeddingsByDocumentUuid.hml diff --git a/hasura/support/metadata/DeleteDocumentsByUuid.hml b/hasura/industry/telco/support/metadata/DeleteDocumentsByUuid.hml similarity index 100% rename from hasura/support/metadata/DeleteDocumentsByUuid.hml rename to hasura/industry/telco/support/metadata/DeleteDocumentsByUuid.hml diff --git a/hasura/support/metadata/DocumentEmbeddings.hml b/hasura/industry/telco/support/metadata/DocumentEmbeddings.hml similarity index 100% rename from hasura/support/metadata/DocumentEmbeddings.hml rename to hasura/industry/telco/support/metadata/DocumentEmbeddings.hml diff --git a/hasura/support/metadata/Documents.hml b/hasura/industry/telco/support/metadata/Documents.hml similarity index 100% rename from hasura/support/metadata/Documents.hml rename to hasura/industry/telco/support/metadata/Documents.hml diff --git a/hasura/support/metadata/InsertDocumentEmbeddings.hml b/hasura/industry/telco/support/metadata/InsertDocumentEmbeddings.hml similarity index 100% rename from hasura/support/metadata/InsertDocumentEmbeddings.hml rename to hasura/industry/telco/support/metadata/InsertDocumentEmbeddings.hml diff --git a/hasura/support/metadata/InsertDocuments.hml b/hasura/industry/telco/support/metadata/InsertDocuments.hml similarity index 100% rename from hasura/support/metadata/InsertDocuments.hml rename to hasura/industry/telco/support/metadata/InsertDocuments.hml diff --git a/hasura/support/metadata/UpdateDocumentEmbeddingsByDocumentUuid.hml b/hasura/industry/telco/support/metadata/UpdateDocumentEmbeddingsByDocumentUuid.hml similarity index 100% rename from hasura/support/metadata/UpdateDocumentEmbeddingsByDocumentUuid.hml rename to hasura/industry/telco/support/metadata/UpdateDocumentEmbeddingsByDocumentUuid.hml diff --git a/hasura/support/metadata/UpdateDocumentsByUuid.hml b/hasura/industry/telco/support/metadata/UpdateDocumentsByUuid.hml similarity index 100% rename from hasura/support/metadata/UpdateDocumentsByUuid.hml rename to hasura/industry/telco/support/metadata/UpdateDocumentsByUuid.hml diff --git a/hasura/support/metadata/UserProfiles.hml b/hasura/industry/telco/support/metadata/UserProfiles.hml similarity index 100% rename from hasura/support/metadata/UserProfiles.hml rename to hasura/industry/telco/support/metadata/UserProfiles.hml diff --git a/hasura/support/metadata/atlas-types.hml b/hasura/industry/telco/support/metadata/atlas-types.hml similarity index 100% rename from hasura/support/metadata/atlas-types.hml rename to hasura/industry/telco/support/metadata/atlas-types.hml diff --git a/hasura/support/metadata/atlas.hml b/hasura/industry/telco/support/metadata/atlas.hml similarity index 100% rename from hasura/support/metadata/atlas.hml rename to hasura/industry/telco/support/metadata/atlas.hml diff --git a/hasura/support/metadata/vector-types.hml b/hasura/industry/telco/support/metadata/vector-types.hml similarity index 100% rename from hasura/support/metadata/vector-types.hml rename to hasura/industry/telco/support/metadata/vector-types.hml diff --git a/hasura/support/metadata/vector.hml b/hasura/industry/telco/support/metadata/vector.hml similarity index 100% rename from hasura/support/metadata/vector.hml rename to hasura/industry/telco/support/metadata/vector.hml diff --git a/hasura/support/subgraph.yaml b/hasura/industry/telco/support/subgraph.yaml similarity index 100% rename from hasura/support/subgraph.yaml rename to hasura/industry/telco/support/subgraph.yaml diff --git a/hasura/supergraph-config/aml/1-supergraph.yaml b/hasura/supergraph-config/aml/1-supergraph.yaml new file mode 100644 index 0000000..8930383 --- /dev/null +++ b/hasura/supergraph-config/aml/1-supergraph.yaml @@ -0,0 +1,6 @@ +kind: Supergraph +version: v2 +definition: + subgraphs: + - ../../globals/subgraph-basic.yaml + - ../../industry/aml/app/subgraph.yaml diff --git a/hasura/supergraph-config/aml/2-supergraph.yaml b/hasura/supergraph-config/aml/2-supergraph.yaml new file mode 100644 index 0000000..4a3df07 --- /dev/null +++ b/hasura/supergraph-config/aml/2-supergraph.yaml @@ -0,0 +1,7 @@ +kind: Supergraph +version: v2 +definition: + subgraphs: + - ../../globals/subgraph.yaml + - ../../industry/aml/app/subgraph.yaml + diff --git a/hasura/supergraph-config/starter/2-supergraph.yaml b/hasura/supergraph-config/starter/2-supergraph.yaml index 1e4b467..a83c6d4 100644 --- a/hasura/supergraph-config/starter/2-supergraph.yaml +++ b/hasura/supergraph-config/starter/2-supergraph.yaml @@ -4,6 +4,4 @@ definition: subgraphs: - ../../globals/subgraph.yaml - ../../industry/starter/example/subgraph.yaml - - ../../support/subgraph.yaml - - ../../auth/subgraph.yaml diff --git a/hasura/supergraph-config/telco/3-supergraph.yaml b/hasura/supergraph-config/telco/3-supergraph.yaml index e5c0e80..2b69691 100644 --- a/hasura/supergraph-config/telco/3-supergraph.yaml +++ b/hasura/supergraph-config/telco/3-supergraph.yaml @@ -3,7 +3,7 @@ version: v2 definition: subgraphs: - ../../globals/subgraph.yaml - - ../../support/subgraph.yaml - - ../../auth/subgraph.yaml + - ../../industry/telco/support/subgraph.yaml + - ../../industry/telco/auth/subgraph.yaml - ../../industry/telco/customer/subgraph-supergraph.yaml - ../../industry/telco/network/subgraph.yaml diff --git a/hasura/supergraph-config/telco/4-supergraph-with-mutations.yaml b/hasura/supergraph-config/telco/4-supergraph-with-mutations.yaml index a97eb66..74dbbac 100644 --- a/hasura/supergraph-config/telco/4-supergraph-with-mutations.yaml +++ b/hasura/supergraph-config/telco/4-supergraph-with-mutations.yaml @@ -3,7 +3,7 @@ version: v2 definition: subgraphs: - ../../globals/subgraph.yaml - - ../../support/subgraph.yaml - - ../../auth/subgraph.yaml + - ../../industry/telco/support/subgraph.yaml + - ../../industry/telco/auth/subgraph.yaml - ../../industry/telco/customer/subgraph-supergraph-mutations.yaml - ../../industry/telco/network/subgraph.yaml diff --git a/hasura/support/connector/atlas/compose.yaml b/hasura/support/connector/atlas/compose.yaml deleted file mode 100644 index 9d30177..0000000 --- a/hasura/support/connector/atlas/compose.yaml +++ /dev/null @@ -1,24 +0,0 @@ -services: - support_atlas: - build: - context: . - dockerfile_inline: |- - FROM ghcr.io/hasura/ndc-mongodb:v1.3.0 - COPY ./ /etc/connector - develop: - watch: - - path: ./ - action: sync+restart - target: /etc/connector - environment: - HASURA_SERVICE_TOKEN_SECRET: $SUPPORT_ATLAS_HASURA_SERVICE_TOKEN_SECRET - MONGODB_DATABASE_URI: $SUPPORT_ATLAS_MONGODB_DATABASE_URI - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: $SUPPORT_ATLAS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - OTEL_SERVICE_NAME: $SUPPORT_ATLAS_OTEL_SERVICE_NAME - extra_hosts: - - local.hasura.dev=host-gateway - ports: - - mode: ingress - target: 8080 - published: "7553" - protocol: tcp diff --git a/hasura/support/connector/vector/compose.yaml b/hasura/support/connector/vector/compose.yaml deleted file mode 100644 index b0f6a9e..0000000 --- a/hasura/support/connector/vector/compose.yaml +++ /dev/null @@ -1,24 +0,0 @@ -services: - support_vector: - build: - context: . - dockerfile_inline: |- - FROM ghcr.io/hasura/ndc-postgres:v1.1.1 - COPY ./ /etc/connector - develop: - watch: - - path: ./ - action: sync+restart - target: /etc/connector - environment: - CONNECTION_URI: $SUPPORT_VECTOR_CONNECTION_URI - HASURA_SERVICE_TOKEN_SECRET: $SUPPORT_VECTOR_HASURA_SERVICE_TOKEN_SECRET - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: $SUPPORT_VECTOR_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT - OTEL_SERVICE_NAME: $SUPPORT_VECTOR_OTEL_SERVICE_NAME - extra_hosts: - - local.hasura.dev=host-gateway - ports: - - mode: ingress - target: 8080 - published: "5644" - protocol: tcp diff --git a/scripts/deploy/deploy.mjs b/scripts/deploy/deploy.mjs index 3f67857..34c9083 100755 --- a/scripts/deploy/deploy.mjs +++ b/scripts/deploy/deploy.mjs @@ -12,8 +12,6 @@ import shellQuote from 'shell-quote'; import { Command } from 'commander'; const CONFIG = { - regions: ['gcp-australia-southeast1', 'gcp-europe-west1', 'gcp-asia-southeast1', 'gcp-us-east4', 'gcp-us-west2'], - defaultRegion: 'gcp-us-west2', logLevels: ['FATAL', 'ERROR', 'WARN', 'INFO', 'DEBUG'] }; @@ -25,7 +23,6 @@ class DeploymentManager { .option('-o, --override', 'Override checks', false) .option('-d, --dry-run', 'Simulate deployment', false) .option('-n, --no-interaction', 'Non-interactive mode', true) - .option('-g, --gcp-region ', 'GCP region', null) .option('-c, --context ', 'Deploy context', null) .option('-p, --profile ', 'Config profile', null) .option('-r, --rebuild-connectors', 'Rebuild connectors', false) @@ -79,21 +76,6 @@ class DeploymentManager { }); } - async updateRegions(region) { - const files = fs.readdirSync(this.paths.root, { recursive: true }) - .filter(f => f.endsWith('connector.yaml')) - .map(f => join(this.paths.root, f)); - - for (const file of files) { - const doc = yaml.parse(fs.readFileSync(file, 'utf8')); - if (doc.definition?.regionConfiguration) { - doc.definition.regionConfiguration.forEach(c => c.region = region); - !this.options.dryRun && fs.writeFileSync(file, yaml.stringify(doc)); - this.log('green', `Updated region to ${region} in ${file}`); - } - } - } - async deploy(context, authFile, tag, supergraph, rebuild) { if (!fs.existsSync(authFile)) throw new Error(`Missing auth config: ${authFile}`); @@ -141,13 +123,6 @@ class DeploymentManager { choices: Object.keys(contextYaml.definition.contexts) }])).context), - gcpRegion: this.options.gcpRegion && CONFIG.regions.includes(this.options.gcpRegion) ? - this.options.gcpRegion : this.options.noInteraction ? null : - (await inquirer.prompt([{ - type: 'list', name: 'gcpRegion', message: 'Select region:', - choices: CONFIG.regions - }])).gcpRegion, - fullMetadataBuild: this.options.fullMetadataBuild || (!this.options.noInteraction && (await inquirer.prompt([{ @@ -169,11 +144,11 @@ class DeploymentManager { this.log( 'magenta', - `Deploying: ${params.profile.name} to ${params.context} (${params.gcpRegion})` + - `${params.rebuildConnectors ? '[Connector rebuild]' : ''}` + + `Deploying: ${params.profile.name} to ${params.context}` + + `${params.rebuildConnectors ? ' [Connector rebuild]' : ''}` + `${params.fullMetadataBuild ? ' [Full metadata build]' : ''}` ); - if (!params.profile || !params.context || !params.gcpRegion) { + if (!params.profile || !params.context) { throw new Error('Missing required parameters in non-interactive mode'); } @@ -197,11 +172,9 @@ class DeploymentManager { if (status.files.length > 0) throw new Error('Uncommitted changes detected'); } - const { profile, context, gcpRegion, fullMetadataBuild, rebuildConnectors, contextYaml } = + const { profile, context, fullMetadataBuild, rebuildConnectors, contextYaml } = await this.getDeploymentParams(); - await this.updateRegions(gcpRegion); - const supergraphs = fs.readdirSync(profile.path) .filter(f => f.endsWith('.yaml')) .sort((a, b) => a.localeCompare(b, undefined, { numeric: true })) @@ -235,7 +208,6 @@ class DeploymentManager { ); } - await this.updateRegions(CONFIG.defaultRegion); await fs.copyFileSync(this.paths.noauth, join(this.paths.root, '/globals/auth-config.hml')); this.log('inverse', 'Deployment completed successfully'); } catch (error) { diff --git a/scripts/deploy/jwtauth.hml b/scripts/deploy/jwtauth.hml index b20c746..4ed983d 100644 --- a/scripts/deploy/jwtauth.hml +++ b/scripts/deploy/jwtauth.hml @@ -1,5 +1,5 @@ kind: AuthConfig -version: v3 +version: v2 definition: mode: jwt: diff --git a/scripts/deploy/noauth.hml b/scripts/deploy/noauth.hml index 8aabbe3..54c0b84 100644 --- a/scripts/deploy/noauth.hml +++ b/scripts/deploy/noauth.hml @@ -1,5 +1,5 @@ kind: AuthConfig -version: v3 +version: v2 definition: mode: noAuth: