diff --git a/.ruby-version b/.ruby-version index 8ffc1ad..06eda28 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.6 \ No newline at end of file +3.2.3 \ No newline at end of file diff --git a/.tool-versions b/.tool-versions index d294ebb..f093f89 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -ruby 3.0.6 +ruby 3.2.3 nodejs 16.15.0 yarn 1.22.19 diff --git a/spec/support/graphiti/schema.json b/spec/support/graphiti/schema.json index d68149e..04f43f4 100644 --- a/spec/support/graphiti/schema.json +++ b/spec/support/graphiti/schema.json @@ -143,6 +143,268 @@ ] } }, + { + "name": "Event::CourseResource", + "type": "courses", + "graphql_entrypoint": "courses", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "group_ids": { + "type": "array_of_integers", + "readable": true, + "writable": false, + "description": null + }, + "type": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "kind_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "description": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "application_conditions": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "motto": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "cost": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "location": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "application_opening_at": { + "type": "date", + "readable": true, + "writable": false, + "description": null + }, + "application_closing_at": { + "type": "date", + "readable": true, + "writable": false, + "description": null + }, + "application_contact_id": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "external_application_link": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "maximum_participants": { + "type": "integer", + "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 + }, + "state": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "training_days": { + "type": "float", + "readable": true, + "writable": false, + "description": null + }, + "applicant_count": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "participant_count": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "minimum_participants": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + }, + "number": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "teamer_count": { + "type": "integer", + "readable": true, + "writable": false, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "kind_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "updated_at": { + "type": "datetime", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "type": { + "type": "string", + "operators": [ + "eq" + ] + }, + "group_id": { + "type": "integer", + "operators": [ + "eq", + "not_eq" + ] + }, + "before_or_on": { + "type": "date", + "operators": [ + "eq" + ], + "single": true + }, + "after_or_on": { + "type": "date", + "operators": [ + "eq" + ], + "single": true + }, + "state": { + "type": "string", + "operators": [ + "eq", + "not_eq", + "eql", + "not_eql", + "prefix", + "not_prefix", + "suffix", + "not_suffix", + "match", + "not_match" + ] + } + }, + "relationships": { + "contact": { + "type": "belongs_to", + "description": null, + "resource": "PersonResource" + }, + "dates": { + "type": "has_many", + "description": null, + "resource": "Event::DateResource" + }, + "kind": { + "type": "belongs_to", + "description": null, + "resource": "Event::KindResource" + }, + "leaders": { + "type": "has_many", + "description": null, + "resource": "Person::NameResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, { "name": "Event::DateResource", "type": "dates", @@ -229,6 +491,139 @@ ] } }, + { + "name": "Event::KindCategoryResource", + "type": "event_kind_categories", + "graphql_entrypoint": "kindCategories", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "label": { + "type": "string", + "readable": true, + "writable": false, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + } + }, + "relationships": { + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "Event::KindResource", + "type": "event_kinds", + "graphql_entrypoint": "kinds", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "label": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "short_name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "general_information": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "application_conditions": { + "type": "string", + "readable": true, + "writable": false, + "description": null + }, + "minimum_age": { + "type": "integer", + "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 + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + } + }, + "relationships": { + "kind_category": { + "type": "belongs_to", + "description": null, + "resource": "Event::KindCategoryResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, { "name": "EventResource", "type": "events", @@ -265,13 +660,13 @@ "writable": false, "description": null }, - "state": { + "description": { "type": "string", "readable": true, "writable": false, "description": null }, - "number": { + "application_conditions": { "type": "string", "readable": true, "writable": false, @@ -302,19 +697,7 @@ "description": null }, "application_closing_at": { - "type": "date", - "readable": true, - "writable": false, - "description": null - }, - "participant_count": { - "type": "integer", - "readable": true, - "writable": false, - "description": null - }, - "training_days": { - "type": "float", + "type": "date", "readable": true, "writable": false, "description": null @@ -325,8 +708,8 @@ "writable": false, "description": null }, - "applicant_count": { - "type": "integer", + "external_application_link": { + "type": "string", "readable": true, "writable": false, "description": null @@ -379,21 +762,6 @@ "lte" ] }, - "state": { - "type": "string", - "operators": [ - "eq", - "not_eq", - "eql", - "not_eql", - "prefix", - "not_prefix", - "suffix", - "not_suffix", - "match", - "not_match" - ] - }, "updated_at": { "type": "datetime", "operators": [ @@ -449,7 +817,12 @@ "total": [ "count" ] - } + }, + "polymorphic": true, + "children": [ + "EventResource", + "Event::CourseResource" + ] }, { "name": "GroupResource", @@ -746,71 +1119,368 @@ "lte" ] }, - "town": { - "type": "string", + "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" + }, + "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": "InvoiceItemResource", + "type": "invoice_items", + "graphql_entrypoint": "invoiceItems", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null + }, + "invoice_id": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "name": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "description": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "unit_cost": { + "type": "float", + "readable": true, + "writable": true, + "description": null + }, + "vat_rate": { + "type": "float", + "readable": true, + "writable": true, + "description": null + }, + "cost": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "count": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "cost_center": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "account": { + "type": "string", + "readable": true, + "writable": true, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "invoice_id": { + "type": "integer", "operators": [ "eq", "not_eq", - "eql", - "not_eql", - "prefix", - "not_prefix", - "suffix", - "not_suffix", - "match", - "not_match" + "gt", + "gte", + "lt", + "lte" ] + } + }, + "relationships": { + "invoice": { + "type": "belongs_to", + "description": null, + "resource": "InvoiceResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "InvoiceResource", + "type": "invoices", + "graphql_entrypoint": "invoices", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null }, - "country": { + "title": { "type": "string", - "operators": [ - "eq", - "not_eq", - "eql", - "not_eql", - "prefix", - "not_prefix", - "suffix", - "not_suffix", - "match", - "not_match" - ] + "readable": true, + "writable": true, + "description": null }, - "require_person_add_requests": { - "type": "boolean", - "operators": [ - "eq" - ], - "single": true + "description": { + "type": "string", + "readable": true, + "writable": true, + "description": null }, - "self_registration_url": { + "state": { "type": "string", - "operators": [ - "eq", - "not_eq", - "eql", - "not_eql", - "prefix", - "not_prefix", - "suffix", - "not_suffix", - "match", - "not_match" - ] + "readable": true, + "writable": true, + "description": null }, - "archived_at": { - "type": "datetime", - "operators": [ - "eq", - "not_eq", - "gt", - "gte", - "lt", - "lte" - ] + "group_id": { + "type": "integer", + "readable": true, + "writable": true, + "description": null }, - "created_at": { - "type": "datetime", + "recipient_id": { + "type": "integer", + "readable": true, + "writable": true, + "description": null + }, + "due_at": { + "type": "date", + "readable": true, + "writable": true, + "description": null + }, + "issued_at": { + "type": "date", + "readable": true, + "writable": true, + "description": null + }, + "recipient_email": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "payment_information": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "payment_purpose": { + "type": "string", + "readable": true, + "writable": true, + "description": null + }, + "hide_total": { + "type": "boolean", + "readable": true, + "writable": true, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + } + }, + "filters": { + "id": { + "type": "integer_id", "operators": [ "eq", "not_eq", @@ -820,8 +1490,8 @@ "lte" ] }, - "updated_at": { - "type": "datetime", + "group_id": { + "type": "integer", "operators": [ "eq", "not_eq", @@ -831,8 +1501,8 @@ "lte" ] }, - "deleted_at": { - "type": "datetime", + "recipient_id": { + "type": "integer", "operators": [ "eq", "not_eq", @@ -841,54 +1511,83 @@ "lt", "lte" ] - }, - "with_deleted": { - "type": "boolean", - "operators": [ - "eq" - ], - "single": true - }, - "with_archived": { - "type": "boolean", - "operators": [ - "eq" - ], - "single": true } }, "relationships": { - "contact": { + "group": { "type": "belongs_to", "description": null, - "resource": "PersonResource" + "resource": "GroupResource" }, - "creator": { + "recipient": { "type": "belongs_to", "description": null, "resource": "PersonResource" }, - "updater": { - "type": "belongs_to", + "invoice_items": { + "type": "has_many", "description": null, - "resource": "PersonResource" + "resource": "InvoiceItemResource" + } + }, + "stats": { + "total": [ + "count" + ] + } + }, + { + "name": "Person::NameResource", + "type": "person-name", + "graphql_entrypoint": "names", + "description": null, + "attributes": { + "id": { + "type": "integer_id", + "readable": true, + "writable": true, + "description": null }, - "deleter": { - "type": "belongs_to", - "description": null, - "resource": "PersonResource" + "first_name": { + "type": "string", + "readable": true, + "writable": false, + "description": null }, - "parent": { - "type": "belongs_to", - "description": null, - "resource": "GroupResource" + "last_name": { + "type": "string", + "readable": true, + "writable": false, + "description": null + } + }, + "extra_attributes": { + }, + "sorts": { + "id": { + } + }, + "filters": { + "id": { + "type": "integer_id", + "operators": [ + "eq", + "not_eq", + "gt", + "gte", + "lt", + "lte" + ] }, - "layer_group": { - "type": "belongs_to", - "description": null, - "resource": "GroupResource" + "leads_course_id": { + "type": "integer", + "operators": [ + "eq" + ] } }, + "relationships": { + }, "stats": { "total": [ "count" @@ -1766,6 +2465,16 @@ } ], "endpoints": { + "/api/event_kinds": { + "actions": { + "index": { + "resource": "Event::KindResource" + }, + "show": { + "resource": "Event::KindResource" + } + } + }, "/api/events": { "actions": { "index": { @@ -1786,6 +2495,19 @@ } } }, + "/api/invoices": { + "actions": { + "index": { + "resource": "InvoiceResource" + }, + "show": { + "resource": "InvoiceResource" + }, + "update": { + "resource": "InvoiceResource" + } + } + }, "/api/people": { "actions": { "index": {