From 0a770052dad64cc810ef9ebf2a064174b45aa2d5 Mon Sep 17 00:00:00 2001 From: Matthias Viehweger Date: Thu, 1 Feb 2024 21:49:18 +0100 Subject: [PATCH] Add initial schema.json --- spec/support/graphiti/schema.json | 1579 +++++++++++++++++++++++++++++ 1 file changed, 1579 insertions(+) create mode 100644 spec/support/graphiti/schema.json diff --git a/spec/support/graphiti/schema.json b/spec/support/graphiti/schema.json new file mode 100644 index 00000000..966c2c73 --- /dev/null +++ b/spec/support/graphiti/schema.json @@ -0,0 +1,1579 @@ +{ + "resources": [ + { + "name": "AdditionalEmailResource", + "type": "additional_emails", + "graphql_entrypoint": "additionalEmails", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "label": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "public": { + "type": "boolean", + "readable": true, + "writable": true, + "description": null + }, + "contactable_id": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "contactable_type": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "email": { + "type": "string", + "readable": true, + "writable": true, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + }, + "label": { + }, + "public": { + }, + "contactable_id": { + }, + "contactable_type": { + }, + "email": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "label": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "public": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "contactable_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "contactable_type": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "email": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + } + }, + "relationships": { + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "GroupResource", + "type": "groups", + "graphql_entrypoint": "groups", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "short_name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "display_name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "description": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "layer": { + "type": "boolean", + "readable": true, + "writable": false, + "description": null + }, + "type": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "email": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "address": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "zip_code": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "town": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "country": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "require_person_add_requests": { + "type": "boolean", + "readable": true, + "writable": false, + "description": null + }, + "self_registration_url": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "archived_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "created_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "updated_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "deleted_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + } + }, + "extra_attributes": { + "logo": { + "type": "string", + "readable": true, + "description": null + } + }, + "sorts": { + "id": { + }, + "name": { + }, + "short_name": { + }, + "display_name": { + }, + "description": { + }, + "layer": { + }, + "type": { + }, + "email": { + }, + "address": { + }, + "zip_code": { + }, + "town": { + }, + "country": { + }, + "require_person_add_requests": { + }, + "self_registration_url": { + }, + "archived_at": { + }, + "created_at": { + }, + "updated_at": { + }, + "deleted_at": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "short_name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "display_name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "description": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "layer": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "type": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "email": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "address": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "zip_code": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "town": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "country": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "require_person_add_requests": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "self_registration_url": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "archived_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "created_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "updated_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "deleted_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "with_deleted": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "with_archived": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + } + }, + "relationships": { + "contact": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + }, + "creator": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + }, + "updater": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + }, + "deleter": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + }, + "parent": { + "type": "belongs_to", + "description": null, + "resource": "GroupResource" + }, + "layer_group": { + "type": "belongs_to", + "description": null, + "resource": "GroupResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "PersonResource", + "type": "people", + "graphql_entrypoint": "people", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "first_name": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "last_name": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "nickname": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "company_name": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "company": { + "type": "boolean", + "readable": true, + "writable": true, + "description": null + }, + "email": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "address": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "zip_code": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "town": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "country": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "primary_group_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "gender": { + "type": "string", + "readable": "guarded", + "writable": "guarded", + "description": null + }, + "birthday": { + "type": "date", + "readable": "guarded", + "writable": "guarded", + "description": null + }, + "language": { + "type": "string", + "readable": true, + "writable": true, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + }, + "first_name": { + }, + "last_name": { + }, + "nickname": { + }, + "company_name": { + }, + "company": { + }, + "email": { + }, + "address": { + }, + "zip_code": { + }, + "town": { + }, + "country": { + }, + "primary_group_id": { + }, + "gender": { + }, + "birthday": { + }, + "language": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "first_name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "last_name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "nickname": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "company_name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "company": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "email": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "address": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "zip_code": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "town": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "country": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "primary_group_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "gender": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "birthday": { + "type": "date", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "language": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "updated_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + } + }, + "relationships": { + "primary_group": { + "type": "belongs_to", + "description": null, + "resource": "GroupResource" + }, + "layer_group": { + "type": "has_one", + "description": null, + "resource": "GroupResource" + }, + "roles": { + "type": "has_many", + "description": null, + "resource": "RoleResource" + }, + "phone_numbers": { + "type": "has_many", + "description": null, + "resource": "PhoneNumberResource" + }, + "social_accounts": { + "type": "has_many", + "description": null, + "resource": "SocialAccountResource" + }, + "additional_emails": { + "type": "has_many", + "description": null, + "resource": "AdditionalEmailResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "PhoneNumberResource", + "type": "phone_numbers", + "graphql_entrypoint": "phoneNumbers", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "label": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "public": { + "type": "boolean", + "readable": true, + "writable": true, + "description": null + }, + "contactable_id": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "contactable_type": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "number": { + "type": "string", + "readable": true, + "writable": true, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + }, + "label": { + }, + "public": { + }, + "contactable_id": { + }, + "contactable_type": { + }, + "number": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "label": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "public": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "contactable_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "contactable_type": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "number": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + } + }, + "relationships": { + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "RoleResource", + "type": "roles", + "graphql_entrypoint": "roles", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "person_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "group_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "label": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "type": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "created_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "updated_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + }, + "deleted_at": { + "type": "datetime", + "readable": true, + "writable": false, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + }, + "person_id": { + }, + "group_id": { + }, + "label": { + }, + "type": { + }, + "created_at": { + }, + "updated_at": { + }, + "deleted_at": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "person_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "group_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "label": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "type": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "created_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "updated_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "deleted_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + } + }, + "relationships": { + "person": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + }, + "group": { + "type": "belongs_to", + "description": null, + "resource": "GroupResource" + }, + "layer_group": { + "type": "has_one", + "description": null, + "resource": "GroupResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "SocialAccountResource", + "type": "social_accounts", + "graphql_entrypoint": "socialAccounts", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "label": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "public": { + "type": "boolean", + "readable": true, + "writable": true, + "description": null + }, + "contactable_id": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "contactable_type": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "name": { + "type": "string", + "readable": true, + "writable": true, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + }, + "label": { + }, + "public": { + }, + "contactable_id": { + }, + "contactable_type": { + }, + "name": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "label": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "public": { + "type": "boolean", + "operators": [ + "eq" + ], + "single": true + }, + "contactable_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "contactable_type": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + }, + "name": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + } + }, + "relationships": { + }, + "stats": { + "total": [ + "count" + ] + } + } + ], + "endpoints": { + "/api/groups": { + "actions": { + "index": { + "resource": "GroupResource" + }, + "show": { + "resource": "GroupResource" + } + } + }, + "/api/people": { + "actions": { + "index": { + "resource": "PersonResource" + }, + "show": { + "resource": "PersonResource" + }, + "update": { + "resource": "PersonResource" + } + } + } + }, + "types": { + "integer_id": { + "kind": "scalar", + "description": "Base Type. Query/persist as integer, render as string." + }, + "uuid": { + "kind": "scalar", + "description": "Base Type. Like a normal string, but by default only eq/!eq and case-sensitive." + }, + "string_enum": { + "kind": "scalar", + "description": "String enum type. Like a normal string, but only eq/!eq and case-sensitive. Limited to only the allowed values." + }, + "integer_enum": { + "kind": "scalar", + "description": "Integer enum type. Like a normal integer, but only eq/!eq filters. Limited to only the allowed values." + }, + "string": { + "kind": "scalar", + "description": "Base Type." + }, + "integer": { + "kind": "scalar", + "description": "Base Type." + }, + "big_decimal": { + "kind": "scalar", + "description": "Base Type." + }, + "float": { + "kind": "scalar", + "description": "Base Type." + }, + "boolean": { + "kind": "scalar", + "description": "Base Type." + }, + "date": { + "kind": "scalar", + "description": "Base Type." + }, + "datetime": { + "kind": "scalar", + "description": "Base Type." + }, + "hash": { + "kind": "record", + "description": "Base Type." + }, + "array": { + "kind": "array", + "description": "Base Type." + }, + "array_of_integer_ids": { + "kind": "array", + "description": "Base Type." + }, + "array_of_uuids": { + "kind": "array", + "description": "Base Type." + }, + "array_of_string_enums": { + "kind": "array", + "description": "Base Type." + }, + "array_of_integer_enums": { + "kind": "array", + "description": "Base Type." + }, + "array_of_strings": { + "kind": "array", + "description": "Base Type." + }, + "array_of_integers": { + "kind": "array", + "description": "Base Type." + }, + "array_of_big_decimals": { + "kind": "array", + "description": "Base Type." + }, + "array_of_floats": { + "kind": "array", + "description": "Base Type." + }, + "array_of_dates": { + "kind": "array", + "description": "Base Type." + }, + "array_of_datetimes": { + "kind": "array", + "description": "Base Type." + } + } +} \ No newline at end of file